/* UX: Global box-sizing for predictable layouts */
* , *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0 !important;
  padding: 0 !important;
}
body {
  display: block; /* avoid flex causing large empty space with empty sections */
}

/* Design tokens */
:root {
  --bg-grad-start: #e0e7ff;
  --bg-grad-end: #f8fafc;
  --page-bg: #eef2ff;
  --brand-indigo: #6366f1;
  --brand-blue: #3b82f6;
  --brand-green: #10b981;
  --brand-purple: #7c3aed;
  --brand-purple-dark: #6d28d9;
  --brand-orange: #f59e0b;
  --brand-orange-dark: #d97706;
  --text-primary: #1f2937;
  --text-secondary: #64748b;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.10);
  --ring-color: #c7d2fe;
  --content-top-gap: 1.5rem; /* use rem so spacing is consistent across sections */
  --content-bottom-gap: 2rem; /* extra breathing room below main home tile */
  /* Typography */
  --measure: 60ch;            /* max readable line length */
  --lh-text: 1.6;             /* default text line-height */
  --lh-heading: 1.25;         /* headings line-height */
  /* Animation timing */
  --transition-fast: 0.2s;
  --transition-normal: 0.3s;
  --transition-slow: 0.5s;
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  /* Typography design tokens */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  --font-size-xs: 0.75rem;     /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-size-4xl: 2.25rem;    /* 36px */
  
  /* Button design tokens */
  --btn-radius: 12px;
  --btn-padding-sm: 8px 16px;
  --btn-padding-md: 12px 20px;
  --btn-padding-lg: 16px 24px;
  --btn-font-weight: var(--font-weight-semibold);
  --btn-transition: all 0.2s var(--ease-smooth);
  --btn-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --btn-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --btn-transform-hover: translateY(-1px);
}

/* Unified Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: var(--btn-padding-md);
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: var(--btn-font-weight);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  min-height: 44px; /* Accessibility: minimum touch target */
  user-select: none;
}

.btn:hover {
  transform: var(--btn-transform-hover);
  box-shadow: var(--btn-shadow-hover);
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 2px solid var(--ring-color);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--btn-shadow);
}

/* Button Variants */
.btn-primary {
  background: linear-gradient(90deg, var(--brand-indigo) 0%, var(--brand-blue) 100%);
  color: #fff;
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
  background: #f8fafc;
  color: var(--brand-indigo);
  border-color: #e2e8f0;
}

.btn-secondary:hover {
  /* Hover effects handled by base .btn class */
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(90deg, var(--brand-purple) 0%, var(--brand-purple-dark) 100%);
  color: #fff;
}

.btn-success:hover {
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
}

.btn-outline {
  background: transparent;
  color: var(--brand-indigo);
  border-color: var(--brand-indigo);
}

.btn-outline:hover {
  /* Hover effects handled by base .btn class */
  transform: translateY(-1px);
}

/* Button Sizes */
.btn-sm {
  padding: var(--btn-padding-sm);
  font-size: var(--font-size-sm);
  min-height: 36px;
}

.btn-lg {
  padding: var(--btn-padding-lg);
  font-size: var(--font-size-lg);
  min-height: 52px;
}

/* Button Widths */
.btn-full {
  width: 100%;
}

.btn-icon-only {
  padding: 12px;
  min-width: 44px;
}

/* Improve type rendering */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* UX: Prefer reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.container, #page-content {
  flex: 0 0 auto; /* prevent empty #page-content from expanding the page */
}
#page-content:empty { display: block; height: var(--content-bottom-gap); }
body {
  background: var(--page-bg);
  font-family: 'Inter', Arial, sans-serif;
  margin: 0;
  min-height: 100vh;
  line-height: var(--lh-text);
  letter-spacing: -0.003em;
  color: var(--text-primary);
}
/* Ensure there's always breathing room below the last content on the page */
body::after { content: ''; display: block; height: var(--content-bottom-gap); }

/* Responsive container and tiles */
.property-details, .price-estimation, form {
  max-width: 900px;
  width: 90%;
}
.property-details table {
  width: 100%;
  table-layout: auto;
}
.price-estimation, .property-details {
  width: 100%;
  box-sizing: border-box;
}

.container {
  max-width: 900px;
  width: min(900px, 90vw);
  min-width: 320px;
  /* Reserve initial height to reduce CLS on content hydration */
  min-height: 60vh;
  margin: var(--content-top-gap) auto var(--content-bottom-gap) auto !important;
  box-sizing: border-box;
  padding: 0 clamp(1em, 3vw, 2em) clamp(1em, 3vw, 2em) clamp(1em, 3vw, 2em);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(99,102,241,0.08);
}
/* Single, clean rule for consistent top margins across all page types */
.container,
.pricing-page,
.info-page,
.contact-page {
  margin-top: var(--content-top-gap) !important;
}

/* Override any conflicting rules with maximum specificity */
html body .container,
html body .pricing-page,
html body .info-page,
html body .contact-page {
  margin-top: var(--content-top-gap) !important;
}
.container h1 {
  margin-top: 1.2em;
  margin-bottom: 0.7em;
}
.container form, .container #result {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

h1 {
  text-align: center;
  color: #1a237e;
  font-size: clamp(var(--font-size-3xl), 2.2vw + 1rem, var(--font-size-4xl));
  font-weight: var(--font-weight-extrabold);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.description {
  text-align: center;
  margin-bottom: 1em;
  color: #64748b;
  font-size: var(--font-size-lg);
  line-height: var(--lh-text);
  max-width: var(--measure);
  margin-left: auto;
  margin-right: auto;
}
.page-title {
  line-height: var(--lh-heading);
  font-size: clamp(var(--font-size-2xl), 1.2vw + 1.1rem, var(--font-size-3xl));
  font-weight: var(--font-weight-bold);
}
.page-text {
  max-width: var(--measure);
  line-height: var(--lh-text);
}

/* Paragraph rhythm */
p { margin: 0 0 0.85em 0; }

/* Link clarity */
a { text-underline-offset: 3px; }

/* Typography Utility Classes */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-extrabold { font-weight: var(--font-weight-extrabold); }

/* Tighten spacing between Address label and hint on home form */
#address-form label[for="address"] { margin-bottom: 0 !important; }
#address-form .field-hint { margin-top: 0 !important; margin-bottom: 10px !important; line-height: 1.35; }
#address-form small { margin-top: 0 !important; margin-bottom: 10px !important; line-height: 1.35; }


.trust-signal {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25em 1.5em;
  margin: 1.5em auto 2em auto;
  text-align: center;
  max-width: 600px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Reusable sub-card used inside About page */
.info-subcard {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25em 1.5em;
  margin: 1em 0 1.2em 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.info-subcard .section-title { margin-top: 0; padding-bottom: 0; border-bottom: none; position: static; }
.info-subcard .section-title::after { display: none; }
.info-subcard .page-list { margin-bottom: 0; }

.trust-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  font-size: 0.95em;
  color: #475569;
  line-height: 1.5;
}

.trust-icon {
  font-size: 1.2em;
  opacity: 0.9;
  flex-shrink: 0;
}

.trust-text {
  font-weight: 500;
  line-height: 1.4;
}

/* Desktop improvements for trust signal */
@media (min-width: 768px) {
  .trust-signal {
    max-width: 700px;
    padding: 1.2em 2em;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  .trust-content {
    gap: 1em;
    font-size: 1.05em;
  }
  
  .trust-icon {
    font-size: 1.4em;
  }
}

@media (min-width: 1024px) {
  .trust-signal {
    max-width: 800px;
    padding: 1.5em 2.5em;
  }
  
  .trust-content {
    gap: 1.2em;
    font-size: 1.1em;
  }
  
  .trust-icon {
    font-size: 1.6em;
  }
}

.steps-preview {
  display: flex;
  justify-content: space-between;
  gap: 1.5em;
  margin: 2em auto 2.5em auto;
  max-width: 800px;
  padding: 0 1em;
}

.step {
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75em;
}

.step-number {
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1em;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.step-content h3 {
  margin: 0 0 0.5em 0;
  color: #1f2937;
  font-size: 1.1em;
  font-weight: 600;
}

.step-content p {
  margin: 0;
  color: #6b7280;
  font-size: 0.9em;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .steps-preview {
    flex-direction: column;
    gap: 1.5em;
    margin: 1.5em auto 2em auto;
  }
  
  .step {
    flex-direction: row;
    text-align: left;
    gap: 1em;
  }
  
  .step-number {
    flex-shrink: 0;
  }
}

.address-form, #address-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 2em auto 2.5em auto;
  padding: 2em 2em;
  background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
  border: 1px solid #e6f0ff;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.address-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.compare-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.compare-btn:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.compare-btn:active {
  transform: translateY(0);
}

.compare-btn svg {
  flex-shrink: 0;
}

/* Comparison Modal Styles */
.comparison-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  /* Prevent flickering during scroll */
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Ensure modal is stable when visible */
.comparison-modal[style*="display: flex"] {
  transition: none !important;
}

.comparison-modal[style*="display: flex"] .comparison-content {
  transition: none !important;
}

.comparison-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  /* Prevent flickering during scroll */
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.comparison-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.comparison-header h2 {
  margin: 0;
  color: #1f2937;
  font-size: 1.5rem;
  font-weight: 700;
}

.close-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

.comparison-form {
  padding: 2rem;
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.comparison-description {
  color: #6b7280;
  font-size: 1rem;
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

.address-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.address-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.address-input-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #374151;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.address-input-group label svg {
  color: #6b7280;
  flex-shrink: 0;
}


.address-input-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #fafafa;
  color: #374151;
}

.address-input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  background: #ffffff;
  transform: translateY(-1px);
}

.address-input-group input::placeholder {
  color: #9ca3af;
  font-style: italic;
}

.comparison-actions {
  text-align: center;
}

.premium-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  padding: 1.25rem 2.5rem;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
  position: relative;
  overflow: hidden;
}

.premium-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.premium-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
}

.premium-btn:hover::before {
  left: 100%;
}

.premium-btn:active {
  transform: translateY(-1px);
}

.premium-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.comparison-results {
  padding: 2rem;
  border-top: 1px solid #e5e7eb;
  /* Prevent flickering during scroll */
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Comparison Table */
.comparison-table {
  background: white;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-top: 1rem;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.comparison-table th {
  background: #f8fafc;
  color: #1f2937;
  font-weight: 700;
  padding: 1.25rem 1rem;
  text-align: center;
  border-bottom: 2px solid #e5e7eb;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.comparison-table th:first-child {
  text-align: left;
}

.comparison-table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table .address-cell {
  font-weight: 600;
  color: #1f2937;
  min-width: 200px;
  width: 25%;
  font-size: 0.95rem;
  line-height: 1.4;
}

.comparison-table .metric-cell {
  text-align: center;
  min-width: 120px;
  width: 12.5%;
}

.comparison-table .metric-value {
  font-weight: 600;
  font-size: 1rem;
  color: #1f2937;
  line-height: 1.3;
}

.comparison-table .metric-label {
  font-size: 0.75rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.comparison-table .price-value {
  color: #059669;
  font-weight: 700;
}

.comparison-table .price-value.na-value {
  color: #6b7280;
  font-weight: 500;
}

/* Average price styling */
.comparison-table .average-price {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-weight: 700;
  color: #1e293b;
}

.comparison-table .average-price .metric-value {
  color: #1e293b !important;
  font-weight: 700 !important;
}

/* PDF Download Button */
.pdf-download-btn {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  text-decoration: none;
}

.pdf-download-btn:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.pdf-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.pdf-download-btn svg {
  margin-right: 8px;
}

.comparison-table .score-value {
  color: #3b82f6;
  font-weight: 700;
}

.comparison-table .noise-value {
  color: #dc2626;
  font-weight: 700;
}

.comparison-table .energy-value {
  color: #059669;
  font-weight: 700;
  font-size: 1.1rem;
}

.comparison-table .energy-value.na-value {
  color: #6b7280;
  font-weight: 500;
}

.comparison-table .property-detail {
  font-size: 0.875rem;
  color: #4b5563;
}

/* Hide property type column on desktop */
@media (min-width: 768px) {
  .property-type-column {
    display: none !important;
  }
}

/* Best value highlighting - Professional Design */
.comparison-table .metric-cell.best-value,
.property-details-table .metric-cell.best-value,
.price-comparison-table .metric-cell.best-value {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%) !important;
  border: 1px solid #16a34a !important;
  border-radius: 6px !important;
  position: relative !important;
  font-weight: 600 !important;
  color: #14532d !important;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1), 0 1px 2px rgba(34, 197, 94, 0.06) !important;
  margin: 2px !important;
  transition: all 0.2s ease !important;
}

.comparison-table .metric-cell.best-value:hover,
.property-details-table .metric-cell.best-value:hover,
.price-comparison-table .metric-cell.best-value:hover {
  box-shadow: 0 4px 6px rgba(34, 197, 94, 0.15), 0 2px 4px rgba(34, 197, 94, 0.1) !important;
  transform: translateY(-1px) !important;
}

.comparison-table .metric-cell.best-value::before,
.property-details-table .metric-cell.best-value::before,
.price-comparison-table .metric-cell.best-value::before {
  content: "✓" !important;
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  background: #16a34a !important;
  color: white !important;
  border-radius: 50% !important;
  width: 18px !important;
  height: 18px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 10px !important;
  font-weight: bold !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
  z-index: 10 !important;
  border: 2px solid white !important;
}

.comparison-table .metric-cell.best-value .metric-value,
.comparison-table .metric-cell.best-value .price-value,
.comparison-table .metric-cell.best-value .score-value,
.comparison-table .metric-cell.best-value .noise-value,
.comparison-table .metric-cell.best-value .energy-value,
.property-details-table .metric-cell.best-value .metric-value,
.property-details-table .metric-cell.best-value .price-value,
.property-details-table .metric-cell.best-value .score-value,
.property-details-table .metric-cell.best-value .noise-value,
.property-details-table .metric-cell.best-value .energy-value,
.price-comparison-table .metric-cell.best-value .metric-value,
.price-comparison-table .metric-cell.best-value .price-value,
.price-comparison-table .metric-cell.best-value .score-value,
.price-comparison-table .metric-cell.best-value .noise-value,
.price-comparison-table .metric-cell.best-value .energy-value {
  color: #14532d !important;
  font-weight: 700 !important;
}

/* Enhanced typography for better readability */
.comparison-table   .metric-value.na-value {
    color: #6b7280;
    font-weight: 500;
    font-style: italic;
  }
  
  /* Best value highlighting for mobile cards */
  .metric-item.best-value {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%) !important;
    border: 1px solid #16a34a !important;
    position: relative !important;
    box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1), 0 1px 2px rgba(34, 197, 94, 0.06) !important;
    transition: all 0.2s ease !important;
  }
  
  .metric-item.best-value:hover {
    box-shadow: 0 4px 6px rgba(34, 197, 94, 0.15), 0 2px 4px rgba(34, 197, 94, 0.1) !important;
    transform: translateY(-1px) !important;
  }
  
  .metric-item.best-value::before {
    content: "✓" !important;
    position: absolute !important;
    top: -6px !important;
    right: -6px !important;
    background: #16a34a !important;
    color: white !important;
    border-radius: 50% !important;
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    font-weight: bold !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    z-index: 10 !important;
    border: 2px solid white !important;
  }
  
  .metric-item.best-value .metric-value {
    color: #14532d !important;
    font-weight: 700 !important;
  }

.comparison-table tr:hover {
  background-color: #f9fafb;
}

.comparison-table tr:hover .metric-value {
  transform: translateY(-1px);
  transition: transform 0.2s ease;
}

         /* Address Dropdown Styling */
         .address-dropdown {
           position: absolute;
           top: 100%;
           left: 0;
           right: 0;
           background: white;
           border: 1px solid #d1d5db;
           border-top: none;
           border-radius: 0 0 8px 8px;
           box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
           z-index: 1000;
           max-height: 200px;
           overflow-y: auto;
           display: none; /* Start hidden */
         }

.dropdown-item {
  padding: 0.875rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-item:hover {
  background-color: #f0f9ff;
  color: #1e40af;
  transform: translateX(4px);
}

.dropdown-item:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
}

.dropdown-item:first-child {
  border-radius: 8px 8px 0 0;
}

         .autocomplete-wrapper {
           position: relative;
         }

         /* Show dropdown when it has content */
         .address-dropdown:not(:empty) {
           display: block !important;
         }

         /* Responsive Design */
         @media (max-width: 768px) {
           .comparison-content {
             margin: 1rem;
             max-height: calc(100vh - 2rem);
           }
           
           .comparison-header {
             padding: 1rem 1.5rem;
           }
           
           .comparison-form {
             padding: 1.5rem;
           }
           
           
           .comparison-table {
             overflow-x: auto;
           }
           
          .comparison-table table {
            min-width: 1000px;
          }
         }

/* Tighter, consistent vertical rhythm inside the address form */
.address-form label, #address-form label { margin-bottom: 6px; }
.address-form input[type="text"], #address-form input[type="text"] { margin-bottom: 0; }
.address-form button[type="submit"], #address-form button[type="submit"] { margin-bottom: 0; }

label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #374151;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

input[type="text"] {
  width: 100%;
  padding: 1em 1.2em;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  font-size: 1.1em;
  margin-bottom: 0;
  box-sizing: border-box;
  transition: all 0.2s ease;
  background: #fafafa;
}

input[type="text"]:focus {
  border-color: #6366f1;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

small {
  color: #7b8190;
  margin-bottom: 2px;
  margin-top: 2px;
  font-size: 0.97rem;
  display: block;
  font-style: italic;
  padding-left: 2px;
  opacity: 0.85;
}

button[type="submit"] {
  /* Use unified button system as base */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  min-height: 56px;
  padding: var(--btn-padding-lg);
  border: none;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, #6366f1 0%, #5b21b6 100%);
  color: #fff;
  font-family: inherit;
  font-size: 1.125rem;
  font-weight: var(--btn-font-weight);
  line-height: 1;
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  margin-bottom: 1.5em;
  user-select: none;
}

button[type="submit"]:hover {
  transform: var(--btn-transform-hover);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.25);
}

button[type="submit"]:active { 
  transform: translateY(0); 
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15); 
}

button[type="submit"]:focus-visible { 
  outline: 2px solid var(--ring-color); 
  outline-offset: 2px; 
}

/* Copy Link Button Styling */
#copy-link-btn {
  /* Use unified button system */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: var(--btn-radius);
  background: #f8fafc;
  color: var(--brand-indigo);
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  min-height: 44px;
  min-width: 44px;
  flex-shrink: 0;
  user-select: none;
}

#copy-link-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: var(--btn-transform-hover);
  box-shadow: var(--btn-shadow-hover);
}

#copy-link-btn:active {
  transform: translateY(0);
  box-shadow: var(--btn-shadow);
}

#copy-link-btn:focus-visible {
  outline: 2px solid var(--ring-color);
  outline-offset: 2px;
}

#copy-link-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  transform: none;
  box-shadow: var(--btn-shadow);
}

/* Header Styling */
.site-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 56px; /* Reserve header height to avoid CLS */
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  min-height: 56px; /* Keep header stable while auth/lang controls appear */
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0.5rem 0.75rem;
  }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.menu-toggle {
  /* Use unified button system */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: var(--btn-radius);
  background: white;
  color: #374151;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  min-height: 40px;
  min-width: 40px;
}

.menu-toggle:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: var(--btn-transform-hover);
  box-shadow: var(--btn-shadow-hover);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--ring-color);
  outline-offset: 2px;
}

.brand-logo {
  display: none; /* Hidden by default, will be shown by JavaScript when hamburger is visible */
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Ensure brand logo is hidden on larger screens where hamburger menu is not visible */
@media (min-width: 1001px) {
  .brand-logo {
    display: none !important;
  }
}

/* ---- CLS hardening for home hero ---- */
/* Reserve space for the social proof card to avoid page jump while counters load */
.social-proof {
  min-height: 150px; /* accommodates title + counter + source */
}
/* Keep counter width stable before the number animates */
#addresses-checked { display: inline-block; min-width: 6ch; }

/* Trustpilot section toggles based on page; reserve height to avoid shifts */
.trustpilot-section { min-height: 72px; }

.logo-icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  /* Try multiple approaches to make favicon blue */
  
  /* Approach 1: CSS Filter */
  filter: 
    brightness(0) 
    saturate(100%) 
    invert(20%) 
    sepia(100%) 
    saturate(2000%) 
    hue-rotate(220deg) 
    brightness(0.7) 
    contrast(1.2) !important;
  -webkit-filter: 
    brightness(0) 
    saturate(100%) 
    invert(20%) 
    sepia(100%) 
    saturate(2000%) 
    hue-rotate(220deg) 
    brightness(0.7) 
    contrast(1.2) !important;
    
  /* Approach 2: CSS Mask as fallback */
  background-color: #1e40af;
  -webkit-mask: url('./favicon.png') no-repeat center;
  mask: url('./favicon.png') no-repeat center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.brand-name {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e40af;
  letter-spacing: -0.01em;
}

/* Brand logo styling consolidated above */

/* Home link with icon styling */
.home-link-with-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e40af;
  text-decoration: none;
  transition: color 0.2s ease;
}

.home-link-with-icon:hover {
  color: #1d4ed8;
}

.home-text {
  font-weight: 600;
  font-size: 1.1rem;
  color: #1e40af;
}



/* Extra-small screens: hide brand logo, keep text */
@media (max-width: 428px) {
  .brand-logo { display: none !important; }
  .home-link-with-icon .home-text { font-size: 1rem; }
}

/* Mobile responsive spacing */
@media (max-width: 768px) {
  .header-left {
    gap: 0.5rem;
  }
  
  .menu-toggle {
    padding: 0.4rem;
  }
}

/* Form button container styling */
#address-form .button-container {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

#address-form .button-container button[type="submit"] {
  flex: 1;
  min-width: 0;
}

/* Improved mobile button layout - keep buttons on same row */
@media (max-width: 600px) {
  #address-form .button-container {
    gap: 8px;
  }
  
  #address-form .button-container button[type="submit"] {
    flex: 1;
    min-width: 120px;
  }
  
  #address-form .button-container #copy-link-btn {
    flex-shrink: 0;
    min-width: 44px;
  }
}

/* Only stack buttons on very small screens */
@media (max-width: 300px) {
  #address-form .button-container {
    flex-direction: column;
    gap: 10px;
  }
  
  #address-form .button-container button[type="submit"],
  #address-form .button-container #copy-link-btn {
    width: 100%;
  }
}

/* Search Count Note Styling */
#search-count-note {
  margin: 8px 0 0 0 !important;
  text-align: left !important;
  font-style: italic !important;
  color: #64748b !important;
  font-size: 0.9rem !important;
  padding: 0 !important;
  width: 100% !important;
  order: 3 !important;
  flex-basis: 100% !important;
}

/* Submit button states */
button[type="submit"]:disabled,
button[type="submit"].disabled {
  background: linear-gradient(90deg, #9ca3af 0%, #6b7280 100%);
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--btn-shadow);
  opacity: 0.7;
}

button[type="submit"]:disabled:hover,
button[type="submit"].disabled:hover {
  background: linear-gradient(90deg, #9ca3af 0%, #6b7280 100%);
  transform: none;
  box-shadow: var(--btn-shadow);
}

/* Button spinner */
.btn-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Validation message styles */
.validation-message {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.validation-message.valid {
  background: #f5f3ff;
  color: #581c87;
  border: 1px solid #c4b5fd;
}

.validation-message.invalid {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.validation-message.loading {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Input validation states */
input[type="text"].valid {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.1);
}

input[type="text"].invalid {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.1);
}

input[type="text"].loading {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

#result {
  margin-top: 16px;
  text-align: center;
  font-size: 1.08rem;
  color: #2c3e50;
  min-height: 28px;
  padding: 10px 8px;
  max-width: 1200px;
  margin: 12px auto;
  padding: 0 20px;
}
#result.hint-active { position: relative; z-index: 30; pointer-events: none; }
#result:empty {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.kadaster-link {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 18px;
  background: #1a237e;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.kadaster-link:hover {
  background: #3949ab;
}
.info-links {
  margin: 18px 0 0 0;
  padding: 0 0 0 18px;
  font-size: 1.01rem;
}
.info-links li {
  margin-bottom: 6px;
}
.info-links a {
  color: #1a237e;
  text-decoration: underline;
  transition: color 0.2s;
}
.info-links a:hover {
  color: #3949ab;
}

.property-images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 18px;
}
.property-image {
  max-width: 180px;
  max-height: 140px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(60, 80, 180, 0.10);
  object-fit: cover;
  background: #f4f7fe;
  transition: all var(--transition-normal) var(--ease-smooth);
  transform-origin: center;
}

.property-image:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(60, 80, 180, 0.20);
}

/* Enhanced Property Card - Much Wider */
.property-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
  max-width: 100%;
  border: 1px solid #e1e5e9;
}
.property-title {
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
  color: #1a237e;
  margin-bottom: 26px;
  letter-spacing: 0.5px;
}
/* Property Image Styles - Larger */
.property-image-container {
  margin-bottom: 30px;
  text-align: center;
}

.property-main-image {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  max-height: 400px;
  object-fit: cover;
  width: 100%;
}

/* Price Estimation Styles - Enhanced */
.price-estimation {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5em;
  margin-bottom: 1em;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

/* UX: subtle lift and glow on hover/focus */
.price-estimation:hover,
.price-estimation:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 10px 36px rgba(59, 130, 246, 0.22);
}

.price-estimation::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.price-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75em;
  margin-bottom: 1em; /* slightly tighter */
  position: relative; /* allow absolute centering of the title */
}

/* Mobile optimizations for price title layout */
@media (max-width: 768px) {
  .price-title {
    gap: 0.5em;
  }
}

/* Force mobile layout to work properly */
@media (max-width: 768px) {
  .price-title {
    gap: 0.3em !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  
  .price-title > span:first-child {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  .price-title > span:nth-child(2) {
    flex: 1 !important;
    min-width: 0 !important;
    text-align: center !important;
    margin: 0 auto !important;
  }
  
  .tile-link-btn {
    flex-shrink: 0 !important;
    margin-left: 0.5em !important;
  }
  
  .source-badge {
    margin-left: 0 !important;
    flex-shrink: 0 !important;
  }
}

/* Force title centering for all screen sizes */
.price-title > span:nth-child(2) {
  text-align: center !important;
  flex: 1 !important;
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: clamp(1rem, 2.8vw, 1.15rem) !important;
  font-weight: 700 !important;
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  max-width: 70% !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Extra aggressive fix for very small screens */
@media (max-width: 480px) {
  .price-title {
    gap: 0.2em !important;
  }
  
  .price-title > span:nth-child(2) {
    font-size: 1.05em !important;
    text-align: center !important;
    flex: 1 !important;
  }
  
  .source-badge {
    font-size: 0.7em !important;
    padding: 0.2em 0.4em !important;
  }
}

@media (max-width: 480px) {
  .price-title {
    justify-content: flex-start !important;
    gap: 0.3em !important;
  }
  
  .price-title > div:first-child {
    justify-content: flex-start !important;
    gap: 0.3em !important;
  }
  
  .source-badge {
    margin-left: 0 !important;
    text-align: left !important;
  }
}

/* Make title wrap to 2 lines on small screens below 550px */
@media (max-width: 549px) {
  .price-title > span:nth-child(2) {
    white-space: normal !important;
    line-height: 1.2 !important;
    max-width: 100% !important;
  }
}

/* Ensure title stays on 1 line for screens 550px and above */
@media (min-width: 550px) {
  .price-title > span:nth-child(2) {
    white-space: nowrap !important;
  }
}

.source-badge {
  background: rgba(255, 255, 255, 0.15) !important;
  padding: 0.4em 0.8em !important;
  border-radius: 8px !important;
  font-size: 0.75em !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* Ensure consistent badge height for aligning the chain button */
  display: inline-flex;
  align-items: center;
  height: 32px;
}

/* Mobile optimizations for source badge */
@media (max-width: 768px) {
  .source-badge {
    padding: 0.3em 0.6em;
    font-size: 0.7em;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .source-badge {
    padding: 0.25em 0.5em;
    font-size: 0.65em;
    height: 26px;
  }
}

/* Make the chain link button square with same height as the badge */
.tile-link-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.45) !important;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease !important;
}

/* Ensure SVG fills the button proportionally */
.tile-link-btn svg { width: 26px !important; height: 26px !important; display: block; }
/* Make the icon clear but not chunky */
.tile-link-btn svg path { stroke-width: 3.0 !important; }

.tile-link-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); background: rgba(255,255,255,0.4) !important; }

@media (max-width: 768px) {
  .tile-link-btn {
    width: 30px !important;
    height: 30px !important;
    border-radius: 8px !important;
  }
  .tile-link-btn svg { width: 24px !important; height: 24px !important; }
}

@media (max-width: 480px) {
  .tile-link-btn {
    width: 28px !important;
    height: 28px !important;
    border-radius: 7px !important;
  }
  .tile-link-btn svg { width: 22px !important; height: 22px !important; }
}

/* Mobile optimizations for price estimation tiles */
@media (max-width: 768px) {
  .price-estimation {
    padding: 1.2em;
  }
  
  .price-amount {
    font-size: 1.6em;
  }
}

@media (max-width: 480px) {
  .price-estimation {
    padding: 1em;
  }
  
  .price-amount {
    font-size: 1.4em;
  }
}

/* Typographic rhythm for large numbers */
.price-amount {
  font-size: 1.8em;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.05; /* slightly tighter */
  margin: 0.35em 0 0.45em; /* consistent vertical rhythm */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-variant-numeric: tabular-nums; /* align numbers nicely */
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}

/* CheckDitHuis specific styling */
.price-estimation[style*="f59e42"] {
  background: linear-gradient(135deg, #f59e42 0%, #fbbf24 100%) !important;
  box-shadow: 0 8px 32px rgba(245, 158, 66, 0.15);
}


.confidence-interval {
  font-size: 1.1em;
  opacity: 0.9;
  margin-top: 10px;
  position: relative;
  z-index: 1;
  font-weight: 500;
}

/* Enhanced Property Table - Wider */
.property-table {
  width: 100%;
  border-collapse: collapse;
  margin: 30px 0;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
}

.property-table tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.property-table tr:last-child {
  border-bottom: none;
}

.property-table tr:hover {
  background-color: #f8f9fa;
  transform: translateY(-1px);
}

.property-key {
  padding: 18px 24px;
  font-weight: 600;
  color: #495057;
  background-color: #f8f9fa;
  border-right: 1px solid #e9ecef;
  width: 35%;
  vertical-align: top;
  font-size: 1.05em;
}

.property-value {
  padding: 18px 24px;
  color: #212529;
  font-weight: 500;
  font-size: 1.05em;
  line-height: 1.4;
}

/* Enhanced BAG ID styling */
.bag-id {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  color: #6c757d;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 0.9em;
  text-align: center;
  margin-top: 20px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Google Maps Link Styling */
.coordinates-link {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.coordinates-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

.coordinates-link::after {
  content: ' ↗';
  font-size: 0.8em;
}

.property-list {
  margin: 0 0 0 12px;
  padding: 0;
  list-style: disc inside;
  color: #374151;
  font-size: 1.04rem;
}
.property-null {
  opacity: 0.5;
}
.property-table tr {
  transition: background 0.15s;
}
.property-table tr:hover {
  background: #e3eaff;
}
@media (max-width: 900px) {
  .property-card {
    max-width: 98vw;
    min-width: unset;
    padding: 18px 4vw 14px 4vw;
  }
  .property-title {
    font-size: 1.15rem;
    margin-bottom: 16px;
  }
  .property-table {
    font-size: 0.98rem;
  }
  .property-key, .property-value {
    font-size: 0.98rem;
    padding-right: 6px;
    padding-left: 4px;
  }
}

@media (max-width: 600px) {
  .container {
    max-width: 98vw;
    margin: var(--content-top-gap) 1vw var(--content-bottom-gap) 1vw;
    padding: 22px 6vw 18px 6vw;
  }
  h1 {
    font-size: 1.5rem;
  }
  .description {
    font-size: 0.98rem;
    padding: 8px 2vw;
  }
  #result {
    font-size: 0.98rem;
    padding: 8px 2vw;
  }
  
  /* Mobile form improvements */
  .address-form, #address-form {
    padding: 1.5em 1.2em;
    margin: 1.5em auto 2em auto;
  }
  
  /* Mobile input improvements */
  #address {
    padding: 0.8em 0.9em;
    font-size: 1rem;
  }
  
  /* Mobile button improvements */
  button[type="submit"] {
    min-height: 52px;
    font-size: 1.1em;
  }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  #result {
    max-width: 1000px;
  }
  
  .price-amount {
    font-size: 2.4em;
  }
}

@media (max-width: 768px) {
  #result {
    max-width: 100%;
    padding: 0 15px;
  }
  
  .property-card {
    padding: 20px 15px;
  }
  
  .price-amount {
    font-size: 1.8em;
  }
  
  
  .price-estimation {
    padding: 25px 20px;
    border-radius: 14px;
  }
  
  .property-table {
    font-size: 0.95em;
  }
  
  .property-key,
  .property-value {
    padding: 12px 16px;
  }
  
  .property-main-image {
    max-height: 250px;
  }
} 

/* Data Sections Styling */
.data-section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.4em;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0.5em 0 12px 0;
  padding: 0 0 8px 0;
  border-bottom: 2px solid #e9ecef;
  position: relative;
}

.section-title::after {
  display: none;
}

/* About/Terms tiles lists spacing */
.info-card ul.page-list { margin: 0 0 18px 0; }
.info-card li { margin: 0 0 6px 0; }

/* CBS tooltip */
.cbs-info {
  position: relative;
  font-weight: 700;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 11px;
  line-height: 16px; /* center the glyph vertically */
  vertical-align: middle;
  top: -1px; /* fine-tune visual centering relative to baseline */
}
.cbs-info::after {
  content: attr(aria-label);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 130%;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  padding: 8px 10px;
  border-radius: 6px;
  width: 230px;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease;
}
.cbs-info:hover::after,
.cbs-info:focus::after {
  opacity: 1;
}

/* Remove old price comparison styles since we're not using them anymore */
.price-comparison,
.price-estimation.avm-price,
.price-estimation.woz-price {
  display: none;
} 

/* Credit Warning Styling */
.credit-warning {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.credit-warning p {
  margin: 5px 0;
  font-weight: 500;
}

.credit-warning p:first-child {
  font-weight: 600;
  font-size: 1.1em;
}

/* Source Info Styling */
.source-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  padding: 15px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid #e1e5e9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.source-info p {
  margin: 5px 0;
  font-size: 0.95em;
  color: #374151;
}

.source-link {
  color: #1a237e;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.source-link:hover {
  color: #3949ab;
  text-decoration: underline;
}

/* Original Link Styling */
.original-link {
  text-align: center;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.view-original-btn {
  display: inline-block;
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.view-original-btn:hover {
  background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

/* Debug Content Styling */
.property-value pre {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 12px;
  margin: 8px 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  color: #495057;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
} 

.property-details {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 2px 12px rgba(99,102,241,0.07);
  padding: 2.5em 2em 2em 2em;
  margin: 2.5em 0 2.5em 0;
  width: 100%;
  max-width: 1050px;
}
.details-title {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 1em;
  text-align: center;
}
.property-details table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.7em;
  font-size: 1.1em;
}
.property-details td {
  padding: 0.7em 1em;
  border-radius: 8px;
}
.property-details tr td:first-child {
  color: #6366f1;
  font-weight: 600;
  background: #f1f5ff;
  width: 40%;
}
.property-details tr td:last-child {
  color: #22223b;
  background: #f8fafc;
  font-weight: 500;
} 

@media (max-width: 1300px) {
  .container {
    max-width: 98vw !important;
    padding: 0 1.5em;
  }
} 

@media (max-width: 800px) {
  .container {
    max-width: 99vw !important;
    padding: 0 1em 1em 1em;
    margin: var(--content-top-gap) 1em var(--content-bottom-gap) 1em;
    border-radius: 14px;
  }
  form, .price-estimation, .property-details {
    padding: 1em 1em 1em 1em;
    margin: 1.2em 0 1.2em 0;
    max-width: 99vw;
    border-radius: 14px;
  }
  .price-title {
    font-size: 1.1em;
  }
  .price-amount {
    font-size: 1.6em;
  }
  .details-title {
    font-size: 1.1em;
  }
  .property-details table {
    font-size: 1em;
  }
}
@media (max-width: 600px) {
  .container {
    max-width: 100vw !important;
    padding: 0 1em 0.5em 1em;
    margin: var(--content-top-gap) 1em var(--content-bottom-gap) 1em;
    border-radius: 12px;
  }
  form, .price-estimation, .property-details {
    padding: 0.7em 1em 0.7em 1em;
    margin: 0.7em 0 0.7em 0;
    max-width: 100vw;
    border-radius: 12px;
  }
  .price-title {
    font-size: 1em;
  }
  .price-amount {
    font-size: 1.1em;
  }
  .details-title {
    font-size: 1em;
  }
  .property-details table {
    font-size: 0.95em;
  }
  
}
@media (max-width: 400px) {
  .container, .price-estimation, .property-details, form, .pricing-page {
    padding: 0.5em 0.8em;
    font-size: 0.95em;
  }
  .price-title, .details-title {
    font-size: 0.95em;
  }
  .price-amount {
    font-size: 0.9em;
  }
  
} 

.loading-card {
  background: white;
  border-radius: 16px;
  padding: 2.5em;
  margin: 2em auto;
  width: 100%;
  max-width: 700px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  text-align: center;
  animation: fadeIn 0.5s ease-in-out;
}

.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5em;
}

.loading-image {
  width: 100px;
  height: 100px;
  display: block;
  margin: 0 auto;
  animation: bounce 2s infinite;
}

.loading-text-container {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  align-items: center;
}

.loading-title {
  font-size: 1.4em;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  letter-spacing: -0.02em;
}

.loading-subtitle {
  font-size: 1em;
  color: #6b7280;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #6366f1;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
}

/* Fix spacing for loading card at medium screen sizes */
@media (min-width: 800px) and (max-width: 1300px) {
  .loading-card {
    margin: 2em auto 4em auto !important;
  }
  
  #result {
    padding-bottom: 2em !important;
  }
}

/* Ensure proper spacing for medium screen sizes (700-1300px) */
@media (min-width: 700px) and (max-width: 1300px) {
  .property-details {
    margin-bottom: 2rem;
  }
  
  #result {
    padding-bottom: 2rem;
  }
  
  .container {
    padding-bottom: 2rem;
  }
}

@media (max-width: 600px) {
  .loading-card {
    padding: 2em 1.5em;
    margin: 1.5em auto;
  }
  
  .loading-title {
    font-size: 1.2em;
  }
  
  .loading-subtitle {
    font-size: 0.9em;
  }
  
  .loading-image {
    width: 80px;
    height: 80px;
  }
} 

.vertical-spacer {
  height: 0.08em;
  width: 100%;
  display: block;
}
@media (max-width: 600px) {
  .vertical-spacer {
    height: 0.05em;
  }
} 

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  background: #fff;
  border: 1px solid #c7d2fe;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 16px rgba(99,102,241,0.08);
  max-height: 220px;
  overflow-y: auto;
  font-size: 1em;
}

/* Subtle inline address helper under the input */
/* Minimal inline helper */
.field-hint { margin-top: 0; margin-bottom: 4px; color: #64748b; font-size: .9em; line-height: 1.35; }
.address-form label[for="address"], label[for="address"] { margin-bottom: 2px; }
.field-hint .hint-strong { font-weight: 700; color: #475569; }
.autocomplete-wrapper.show-hint .autocomplete-dropdown { top: 100%; }

/* Address input: slightly larger and rounder for clarity */
#address {
  padding: 0.9em 1em;
  border-radius: 12px;
  font-size: 1.05em;
  margin-bottom: 12px; /* tighter, professional spacing before submit */
}

/* Facts tile animations */
@keyframes factsFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#facts-tile {
  animation: factsFadeIn 0.3s ease-out;
}

#fact-text {
  transition: opacity 0.2s ease;
}

/* Mobile responsive facts tile */
@media (max-width: 768px) {
  #facts-tile {
    margin: 1rem 0;
    padding: 1rem;
  }
  
  #facts-tile h3 {
    font-size: 1.3rem !important;
  }
  
  #fact-content {
    min-height: 60px !important;
    padding: 1rem !important;
  }
}
.autocomplete-suggestion {
  padding: 0.7em 1em;
  cursor: pointer;
  border-bottom: 1px solid #f1f5ff;
  transition: background-color 140ms ease, color 140ms ease; /* UX: smoother hover */
}
.autocomplete-suggestion:last-child {
  border-bottom: none;
}
.autocomplete-suggestion.active,
.autocomplete-suggestion:hover {
  background: #f1f5ff;
  color: #22223b;
} 

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(238, 242, 255, 0.9);
  backdrop-filter: saturate(140%) blur(8px);
  padding: 0.6em 0.2em;
  border-bottom: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 16px 0 rgba(99,102,241,0.04);
  width: 100%;
  max-width: 100%;
  display: block;
}

.site-header .header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header .header-actions { 
  margin-left: auto; 
  display: inline-flex; 
  align-items: center; 
  gap: 8px; 
}

@media (max-width: 768px) {
  .site-header .header-actions {
    gap: 6px;
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1.2rem;
  padding: 6px 10px;
  cursor: pointer;
}
.footer-nav {
  display: flex;
  gap: 0.5em;
  justify-content: flex-start;
  align-items: center;
}
.footer-nav a, .footer-nav button {
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  margin-top: 0;
}
.footer-nav a {
  color: #374151;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.01em;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background 0.18s, color 0.18s, box-shadow .18s;
}
.footer-nav a:hover, .footer-nav a:focus {
  background: rgba(30, 64, 175, 0.05);
  color: #1e40af;
}
.footer-nav a.is-active { background: #e0e7ff; box-shadow: inset 0 0 0 2px #c7d2fe; text-decoration: none; }
@media (max-width: 1000px) {
  .menu-toggle { display: inline-block; }
  .footer-nav { display: none; }
  .site-header { padding: 0.5em 0; }
  .site-header .header-inner { padding: 0 8px; }
  .site-header.open .footer-nav {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--page-bg);
    border-bottom: 1px solid #cbd5e1;
    padding: 10px 12px 12px 12px;
    gap: 12px;
    flex-direction: column;
    align-items: flex-start;
    z-index: 49;
  }
}

/* Medium screens - ensure navigation is properly visible when menu is open */
@media (min-width: 601px) and (max-width: 1000px) {
  .site-header.open .footer-nav {
    min-width: 300px;
    right: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 0;
  }
  
  .site-header.open .footer-nav a,
  .site-header.open .footer-nav button {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
  }
  
  .site-header.open .footer-nav a:hover,
  .site-header.open .footer-nav button:hover {
    background: #f1f5f9;
    transform: translateX(4px);
  }
} 

/* Move language/auth controls into header on the right (override fixed positioning) */
.site-header .lang-select-container {
  position: static;
  top: auto; right: auto;
  background: transparent;
  box-shadow: none;
  margin: 0;
}
.site-header #lang-select { margin: 0; }
.site-header .auth-btn { margin: 0 0 0 8px; }

.back-home-btn {
  /* Use unified button system with blue gradient like blog buttons */
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-top: 0;
  padding: var(--btn-padding-md);
  border: none;
  border-radius: var(--btn-radius);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 1.08em;
  font-weight: var(--btn-font-weight);
  text-decoration: none;
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
  min-height: 44px;
  user-select: none;
}

.back-home-btn:hover, .back-home-btn:focus {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  color: #fff;
  transform: var(--btn-transform-hover);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  text-decoration: none;
} 

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  margin-top: 0.5em;
  width: 100%;
  box-sizing: border-box;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
/* Responsive grid for contact form */
.contact-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}
.contact-form .form-group.full { grid-column: 1 / -1; }

/* Responsive tiles and layout */
@media (max-width: 700px) {
  .contact-form .form-grid { grid-template-columns: 1fr; }
  
  .container {
    width: 98vw;
    padding: 0 1em 1em 1em;
  }
  
  .price-estimation {
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  
  .price-estimation .price-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
  
  .source-badge {
    font-size: 0.7em !important;
    padding: 0.3em 0.6em !important;
  }
  
  /* Responsive tile layouts */
  .price-estimation {
    padding: clamp(1rem, 3vw, 1.5rem);
  }
  
  /* Better spacing between tiles */
  .price-estimation + .price-estimation {
    margin-top: 1.5rem;
  }
  
  /* Responsive font sizing */
  h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
  }
  
  .description {
    font-size: clamp(1rem, 2.5vw, 1.1em);
  }
}

@media (max-width: 480px) {
  .container {
    width: 100vw;
    border-radius: 0;
    margin: 0 !important;
  }
  
  .price-estimation {
    border-radius: 8px;
    margin-left: 0.5em;
    margin-right: 0.5em;
  }
  
  .price-amount {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
  }
  
  .price-title {
    font-size: 0.9em;
  }
  
  /* Better tile spacing on very small screens */
  .price-estimation + .price-estimation {
    margin-top: 1rem;
  }
  
  /* Responsive text sizing */
  .source-badge {
    font-size: 0.65em !important;
    padding: 0.25em 0.5em !important;
  }
  
  /* Responsive grid adjustments for dimension tiles */
  .price-estimation .price-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5em;
  }
}

/* Enforce row layout for price titles on mobile (overrides above) */
@media (max-width: 700px) {
  .price-estimation .price-title {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
  .price-estimation .price-title > span:nth-child(2) {
    flex: 1 !important;
    text-align: center !important;
    min-width: 0 !important;
  }
  .price-estimation .price-title .tile-link-btn {
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}

/* Fix overlap for Leefbaarometer tile title on mobile by using grid header */
@media (max-width: 768px) {
  .leefbaarometer-tile .price-title {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 0.3em !important;
  }
  .leefbaarometer-tile .price-title > span:nth-child(2) {
    position: static !important;
    left: auto !important;
    transform: none !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    margin: 0 !important;
  }
}

/* Prevent overlap for CBS tile header on mobile */
@media (max-width: 768px) {
  .cbs-tile .price-title {
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 0.3em !important;
  }
  .cbs-tile .price-title > span:nth-child(2) {
    position: static !important;
    left: auto !important;
    transform: none !important;
    max-width: 100% !important;
    white-space: normal !important;
    text-align: center !important;
    margin: 0 !important;
  }
}

@media (max-width: 480px) {
  .price-estimation .price-title {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    gap: 0.25em !important;
  }
  .price-estimation .price-title > span:nth-child(2) {
    flex: 1 !important;
    text-align: center !important;
    min-width: 0 !important;
  }
  .price-estimation .price-title .tile-link-btn {
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }
}
.contact-form label {
  display: block;
  font-weight: 700;
  color: #283593;
  margin-bottom: 10px;
  font-size: 1.09rem;
  letter-spacing: 0.01em;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
  padding: 1.1em 1.2em;
  border-radius: 12px;
  border: 1px solid #c7d2fe;
  font-size: 1.05em;
  box-sizing: border-box;
  background: #f8fafc;
  transition: border 0.18s, box-shadow 0.18s, background 0.18s;
  width: 100%;
  max-width: 100%;
  min-height: 50px;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: #6366f1;
  background: #eaf1ff;
  box-shadow: 0 0 0 2px #c7d2fe;
  outline: none;
}
.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
.contact-form button[type="submit"] {
  margin-top: 0.7em;
}
.contact-success {
  text-align: center;
  padding: 2.5em 1.5em 2em 1.5em;
  background: #f1f5ff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(99,102,241,0.07);
  margin-top: 2em;
}
.contact-success h2 {
  margin-bottom: 0.7em;
}
@media (max-width: 600px) {
  .contact-form {
    gap: 0.7em;
  }
  .contact-success {
    padding: 1.2em 0.5em 1em 0.5em;
  }
} 

.contact-page, .info-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0 0 2em 0; /* no extra top padding */
  background: none;
}
#page-content { padding-top: 0; }

.contact-card, .info-card {
  background: #fff;
  border: none;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(99,102,241,0.08);
  padding: 2.5em 2.5em 2em 2.5em;
  width: 100%;
  margin: 0 auto 2em auto; /* avoid margin-collapsing; spacing provided by #page-content */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}
.contact-title, .page-title {
  color: #1a237e; /* brand for main titles only */
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 0.5em;
  text-align: center;
  margin-top: 0; /* prevent extra top offset variance */
}
.page-title {
  margin-top: 0; /* prevent extra top offset variance */
}
.page-text { margin-top: 0.6rem; }
.contact-desc, .page-text {
  color: #64748b;
  font-size: 1.08rem;
  margin-bottom: 1.2em;
  line-height: 1.5;
  text-align: center;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}
.page-list {
  margin-bottom: 1.2em;
  font-size: 1.05em;
  color: #1f2937;
  padding-left: 1.2em;
}
.contact-email-link {
  color: var(--brand-purple);
  text-decoration: underline;
  font-weight: 600;
}
.contact-email-link:hover {
  color: var(--brand-purple-dark);
}

.contact-telegram-link {
  color: #0088cc;
  text-decoration: underline;
  font-weight: 600;
}

.contact-telegram-link:hover {
  color: #006699;
}
@media (max-width: 600px) {
  .contact-card, .info-card {
    padding: 1.1em 0.7em 1em 0.7em;
    max-width: 98vw;
  }
  .contact-title, .page-title {
    font-size: 1.3rem;
  }
  
  /* Blog page mobile adjustments */
  .info-page .info-card {
    max-width: 98vw;
    width: 98vw;
    padding: 1.1em 0.7em 1em 0.7em;
  }
} 

.lang-select-container {
  position: fixed;
  top: 24px;
  right: 36px;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(99,102,241,0.07);
  padding: 0.1em 0.3em;
  display: inline-flex;
  align-items: center;
  width: auto;
  min-width: 0;
}
#lang-select {
  padding: 0.4em 1em;
  border-radius: 8px;
  font-size: 1em;
  border: 1.2px solid #c7d2fe;
  background: #f8fafc;
  color: #283593;
  font-weight: 600;
  outline: none;
  transition: border 0.18s, box-shadow 0.18s;
  min-width: 80px;
}

#lang-select option {
  font-size: 1em;
  padding: 0.5em;
}
/* User Account Dropdown Styles */
.user-account-container {
  position: relative;
  margin-left: 8px;
  display: none; /* Hidden by default to prevent flash */
}

.user-profile-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-pro-badge {
  background: var(--brand-purple);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
}

.user-avatar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #e5e7eb;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.user-avatar-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
  border-color: #a5b4fc;
}

.user-avatar-btn:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: 2px;
}

.user-avatar-letter {
  line-height: 1;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  min-width: 280px;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown-header {
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e5e7eb;
}

.user-email {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  margin-bottom: 4px;
  word-break: break-all;
}

.user-subscription-status {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-subscription-status.premium {
  color: var(--brand-purple);
  font-weight: 600;
}

.user-subscription-status.premium::before {
  content: "";
}

.user-subscription-status.free::before {
  content: "";
}

.user-dropdown-divider {
  height: 1px;
  background: #e5e7eb;
}

.user-dropdown-item {
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  text-align: left;
}

.user-dropdown-item:hover {
  background: #f9fafb;
}

.user-dropdown-item:focus-visible {
  outline: 2px solid #a5b4fc;
  outline-offset: -2px;
}



/* Legacy auth button styles (for sign in state) */
.auth-btn {
  /* Use unified button system */
  display: none; /* Hidden by default to prevent flash */
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
  min-height: 36px;
  user-select: none;
}

.auth-btn:hover { 
  filter: brightness(1.05);
  transform: var(--btn-transform-hover);
}

.auth-btn:focus-visible { 
  outline: 2px solid #a5b4fc; 
  outline-offset: 2px; 
}

.pro-badge {
  display: none;
  background: var(--brand-purple);
  color: #fff;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 0.75em;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(124, 58, 237, 0.3);
}
#lang-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px #c7d2fe;
}
@media (max-width: 600px) {
  .lang-select-container {
    top: 10px;
    right: 10px;
    padding: 0.05em 0.1em;
    border-radius: 7px;
  }
  #lang-select {
    font-size: 0.98em;
    padding: 0.3em 0.7em;
  }
} 

.footer-support-btn {
  /* Use unified button system */
  display: inline-flex;
  align-items: center;
  padding: var(--btn-padding-md);
  border: none;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, #38bdf8 0%, var(--brand-indigo) 100%);
  color: #fff;
  font-size: 1.08em;
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  margin: 0;
  min-height: 40px;
  user-select: none;
}

.footer-support-btn:hover, .footer-support-btn:focus {
  background: linear-gradient(90deg, var(--brand-indigo) 0%, #38bdf8 100%);
  color: #e0f2f1;
  transform: var(--btn-transform-hover);
  box-shadow: var(--btn-shadow-hover);
} 

.footer-get-updates-btn {
  /* Use unified button system */
  display: inline-flex;
  align-items: center;
  padding: var(--btn-padding-md);
  border: none;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, #fbbf24 0%, var(--brand-indigo) 100%);
  color: #fff;
  font-size: 1.08em;
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  margin-left: 0.5em;
  min-height: 40px;
  user-select: none;
}

.footer-get-updates-btn:hover, .footer-get-updates-btn:focus {
  background: linear-gradient(90deg, var(--brand-indigo) 0%, #fbbf24 100%);
  color: #e0f2f1;
  transform: var(--btn-transform-hover);
  box-shadow: var(--btn-shadow-hover);
} 

.tile-link-btn {
  /* Use unified button system with tile-specific styling */
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0; /* size controlled by earlier width/height rule */
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  background: transparent;
  color: rgba(255, 255, 255, 1);
  font-size: 0.9em;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: none;
  margin: 0;
  backdrop-filter: blur(10px);
  user-select: none;
}

/* Accessibility: clear focus ring */
.tile-link-btn:focus-visible {
  outline: 2px solid rgba(255,255,255,0.95);
  outline-offset: 2px;
}

.tile-link-btn .icon {
  font-size: 1em;
  margin: 0;
  line-height: 1;
  display: inline-block;
}

.tile-link-btn:hover, .tile-link-btn:focus {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: var(--btn-transform-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile optimizations for tile buttons */
@media (max-width: 768px) {
  .tile-link-btn {
    padding: 0.4em 0.6em;
    font-size: 0.8em;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
  }
  
  .tile-link-btn .icon {
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .tile-link-btn {
    padding: 0.3em 0.5em;
    font-size: 0.75em;
    min-width: 32px;
    min-height: 32px;
  }
  
  .tile-link-btn .icon {
    font-size: 0.85em;
  }
}

/* Inputs: consistent placeholder + focus */
input::placeholder,
textarea::placeholder {
  color: #94a3b8;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--ring-color);
}

/* Buttons: ensure keyboard focus visible */
.back-home-btn:focus-visible,
.footer-support-btn:focus-visible,
.footer-get-updates-btn:focus-visible,
.contact-send-btn:focus-visible {
  outline: 2px solid #94a3b8;
  outline-offset: 2px;
}

/* Autocomplete: stronger elevation */
.autocomplete-dropdown {
  box-shadow: 0 12px 28px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
}

/* Screen reader only class for accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
} 

/* Pricing page */
.pricing-page {
  max-width: 900px;
  width: 90%;
  min-width: 350px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(99,102,241,0.08);
  border: none;
  padding: 2em 2em 1.5em 2em;
  box-sizing: border-box;
}
.pricing-header h2 { color: var(--brand-indigo); margin: 0 0 .25em 0; font-weight: 800; }
.pricing-header p { margin: 0 0 1.2em 0; color: var(--text-secondary); font-size: 1.05em; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.plan-card {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.25em 1.25em 1.1em 1.25em;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.plan-card.plan-premium { border-width: 2px; border-color: var(--brand-indigo); background: linear-gradient(180deg, #ffffff 0%, #f8f9ff 100%); }
.plan-badge {
  position: absolute; top: -10px; right: 12px; background: var(--brand-indigo); color: #fff; padding: 4px 8px; border-radius: 999px; font-size: .8em; font-weight: 700;
}
.plan-title { margin: 0 0 0.25em 0; font-size: 1.15em; font-weight: 800; color: #111827; }
.plan-subtitle { margin: 0; opacity: .8; color: #374151; }
.pricing-features { margin: 1em 0; padding-left: 1.2em; color: #1f2937; }
.price-row { display: flex; align-items: baseline; gap: 6px; margin: 1em 0; }
.price-amount { font-size: 1.8em; font-weight: 800; letter-spacing: -0.02em; }
.price-period { opacity: .8; }
.pricing-cta { width: 100%; height: 48px; border-radius: 12px; font-weight: 800; cursor: pointer; border: 1px solid transparent; transition: all 0.2s ease; }
.pricing-cta.primary { background: #6366f1; color: #fff; box-shadow: 0 4px 14px rgba(99,102,241,0.18); }
.pricing-cta.outline { background: #f3f4f6; color: var(--brand-purple-dark); border-color: var(--brand-purple); }
.pricing-cta.primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99,102,241,0.25); }
.pricing-cta.outline:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.free-trial-badge:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important; }
.plan-note { opacity: .8; font-size: .9em; margin-top: .75em; }
.pricing-note { opacity: .75; font-size: .9em; margin-top: 1.25em; }

/* Noise features highlight section */
.noise-features-highlight {
  position: relative;
  overflow: hidden;
}

.noise-features-highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.noise-features-highlight > div {
  position: relative;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(180deg); }
}

.noise-features-highlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(124,58,237,0.25);
  transition: all 0.3s ease;
}
.back-link-btn { margin-top: 1.25em; display: inline-flex; align-items: center; gap: 8px; }

/* Extra scroll space under Pricing back button */
#pricing-back-btn-outer {
  margin-bottom: 120px;
}
@media (max-width: 800px) {
  .pricing-page {
    max-width: 99vw !important;
    padding: 0 1em 1em 1em;
    margin: var(--content-top-gap) 1em var(--content-bottom-gap) 1em;
    border-radius: 14px;
  }
}

@media (max-width: 700px) {
  #pricing-back-btn-outer { margin-bottom: 90px; }
}

@media (max-width: 600px) {
  :root { --content-top-gap: 1rem; }
  .pricing-page { 
    max-width: calc(100vw - 2em) !important;
    width: calc(100vw - 2em) !important;
    padding: 1.5em 1.2em 1.2em 1.2em; 
    border-radius: 16px; 
    margin: var(--content-top-gap) 1em var(--content-bottom-gap) 1em;
    box-sizing: border-box;
  }
  .plans-grid { 
    grid-template-columns: 1fr; 
    gap: 16px;
  }
  
  /* Mobile plan card improvements */
  .plan-card {
    padding: 1.8em 1.4em 1.5em 1.4em;
    border-radius: 16px;
    margin: 0 0.5em;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  }
  
  .plan-title {
    font-size: 1.3em;
    margin-bottom: 0.5em;
    text-align: center;
  }
  
  .plan-subtitle {
    font-size: 0.95em;
    margin-bottom: 1.5em;
    text-align: center;
    opacity: 0.8;
  }
  
  .pricing-features {
    margin: 1.5em 0;
    padding-left: 1.2em;
    font-size: 0.95em;
    line-height: 1.6;
  }
  
  .pricing-features li {
    margin-bottom: 0.6em;
    position: relative;
  }
  
  .pricing-features li::marker {
    color: #6366f1;
  }
  
  .price-row {
    margin: 1.5em 0 1.2em 0;
    justify-content: center;
  }
  
  .price-amount {
    font-size: 2em;
  }
  
  .price-period {
    font-size: 1em;
  }
  
  .pricing-cta {
    height: 56px;
    font-size: 1.1em;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
  }
  
  .pricing-cta:active {
    transform: translateY(1px);
  }
  
  /* Free trial badge mobile styling */
  .free-trial-badge {
    font-size: 0.85em !important;
    padding: 6px 10px !important;
    margin: 0.6em 0 !important;
  }
  
  .plan-badge {
    top: -8px;
    right: 10px;
    padding: 6px 10px;
    font-size: 0.75em;
  }
  
  /* Mobile pricing trust section */
  .pricing-trust {
    flex-direction: column !important;
    gap: 8px !important;
    margin: 12px 0 20px 0 !important;
    font-size: 0.9em !important;
  }
  
  .pricing-trust span {
    display: block !important;
  }
  
  .pricing-trust span[style*="opacity:.6"] {
    display: none !important;
  }
}

/* Extra small mobile screens */
@media (max-width: 480px) {
  .pricing-page {
    max-width: calc(100vw - 1.5em) !important;
    width: calc(100vw - 1.5em) !important;
    padding: 1.3em 1em 1em 1em !important;
    margin: var(--content-top-gap) 0.75em var(--content-bottom-gap) 0.75em !important;
  }
  
  .plan-card {
    padding: 1.6em 1.2em 1.3em 1.2em;
    margin: 0 0.3em;
  }
  
  .plan-title {
    font-size: 1.2em;
  }
  
  .plan-subtitle {
    font-size: 0.9em;
  }
  
  .pricing-features {
    font-size: 0.9em;
    padding-left: 0.8em;
  }
  
  .price-amount {
    font-size: 1.8em;
  }
  
  .pricing-cta {
    height: 50px;
    font-size: 1em;
  }
  
  .plan-badge {
    top: -6px;
    right: 8px;
    padding: 4px 8px;
    font-size: 0.7em;
  }
  
  .pricing-trust {
    font-size: 0.85em !important;
    margin: 10px 0 16px 0 !important;
  }
  
  .free-trial-badge {
    font-size: 0.8em !important;
    padding: 5px 8px !important;
    margin: 0.5em 0 !important;
  }
}

/* Very small screens */
@media (max-width: 360px) {
  .pricing-page {
    max-width: calc(100vw - 1em) !important;
    width: calc(100vw - 1em) !important;
    padding: 1.2em 0.8em 0.8em 0.8em !important;
    margin: var(--content-top-gap) 0.5em var(--content-bottom-gap) 0.5em !important;
  }
  
  .plan-card {
    padding: 1.4em 1em 1.2em 1em;
    margin: 0 0.2em;
  }
  
  .plan-title {
    font-size: 1.15em;
  }
  
  .pricing-features {
    font-size: 0.85em;
    padding-left: 0.6em;
  }
  
  .price-amount {
    font-size: 1.6em;
  }
  
  .pricing-cta {
    height: 48px;
    font-size: 0.95em;
  }
}

#woz-history-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#funda-research-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Funda Info Button and Tooltip Styles */
.funda-info-btn {
  transition: all 0.2s ease !important;
  min-width: 20px !important;
  min-height: 20px !important;
}

.funda-info-btn:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3) !important;
}

.funda-info-btn:active {
  transform: scale(0.95) !important;
}

/* Tooltip positioning handled by JavaScript */

/* Arrow removed - clean tooltip design */

/* Mobile-friendly touch targets */
@media (max-width: 768px) {
  .funda-info-btn {
    width: 24px !important;
    height: 24px !important;
    font-size: 14px !important;
  }
  
  .funda-tooltip {
    max-width: calc(100vw - 60px) !important;
    min-width: 280px !important;
    font-size: 12px !important;
    padding: 12px 16px !important;
  }
}

@media (max-width: 480px) {
  .funda-tooltip {
    max-width: calc(100vw - 40px) !important;
    min-width: 250px !important;
    font-size: 13px !important;
    padding: 14px 18px !important;
  }
}

/* Custom bullet points for Funda analysis lists */
.funda-analysis-tile ul li::before {
  content: "•";
  color: rgba(255, 255, 255, 0.7);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
} 

.contact-send-btn {
  /* Use unified button system */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  width: 100%;
  min-height: 56px;
  padding: var(--btn-padding-lg);
  border: none;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, #667eea 0%, #5eaefd 100%);
  color: #fff;
  font-size: 1.15em;
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  user-select: none;
}

.contact-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: var(--btn-shadow);
}

.contact-send-btn:hover:enabled {
  transform: var(--btn-transform-hover);
  box-shadow: 0 4px 16px rgba(94, 174, 253, 0.25);
} 

/* AI Chat */
.hidden { display: none; }
.ai-chat {
  margin: 1.5em auto 0 auto;
  max-width: 800px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  overflow: hidden;
}
.ai-chat-header {
  padding: 16px 18px 10px 18px;
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}
.ai-chat-title {
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 8px; /* subtle gap under the title */
}
.ai-chat-subtitle {
  font-size: 0.95em;
  color: #64748b;
}
.ai-chip {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #1f2937;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
}
.ai-chip:hover { background: #eaf1ff; }
.ai-chat-messages {
  height: 200px; /* a bit taller by default */
  max-height: 420px;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-chat-hint {
  margin: auto;
  color: #6b7280;
  font-style: italic;
  text-align: center;
}

.ai-chat-tip {
  text-align: right;
  font-size: 12px;
  color: #6b7280;
  margin: 6px 16px 12px 16px;
}
.ai-chat-tip a { color: #6366f1; text-decoration: underline; }

/* Feedback thumbs section */
.service-feedback {
  margin: 10px auto 8px auto;
  max-width: 800px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
}
.service-feedback-title {
  font-size: 0.95rem;
  color: #334155;
}
.service-feedback-actions { display: flex; align-items: center; gap: 10px; }
.fb-btn {
  /* Use unified button system */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: var(--btn-radius);
  background: #f8fafc;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  min-height: 36px;
  user-select: none;
}

.fb-btn:hover { 
  transform: var(--btn-transform-hover); 
  box-shadow: var(--btn-shadow-hover);
  border-color: #cbd5e1;
}
.fb-thanks { color: #64748b; font-size: 0.9rem; }

/* Expanded chat when the user starts talking */
.ai-chat.expanded .ai-chat-messages {
  height: 420px;
  max-height: 640px;
}
.ai-msg {
  padding: 10px 12px;
  border-radius: 12px;
  max-width: 85%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  text-align: left; /* ensure left alignment */
}
.ai-msg.user {
  align-self: flex-end;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}
.ai-msg.assistant {
  align-self: flex-start;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}
.ai-msg.assistant.typing { 
  opacity: 0.8; 
  font-style: italic; 
  position: relative;
}

.thinking-dots {
  display: inline-block;
  position: relative;
  width: 20px;
  height: 16px;
  margin-left: 8px;
  vertical-align: baseline;
}

.thinking-dots::before,
.thinking-dots::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6b7280;
  animation: thinkingPulse 1.4s ease-in-out infinite both;
}

.thinking-dots::before {
  left: 0;
  animation-delay: -0.32s;
}

.thinking-dots::after {
  left: 8px;
  animation-delay: -0.16s;
}

.thinking-dots .dot {
  position: absolute;
  top: 8px;
  left: 16px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #6b7280;
  animation: thinkingPulse 1.4s ease-in-out infinite both;
  animation-delay: 0s;
}

@keyframes thinkingPulse {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

.thinking-text {
  animation: thinkingFade 2s ease-in-out infinite;
}

@keyframes thinkingFade {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}
.ai-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #eef2f7;
  padding: 12px 16px 16px 16px;
  background: #ffffff;
  width: 100%;
}
.ai-chat-form input[type="text"]#ai-chat-input {
  flex: 1 1 auto;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  height: 56px;
  line-height: 32px;
  font-size: 1rem;
  margin-bottom: 0; /* override global input margin */
  box-sizing: border-box;
  background: #ffffff;
}
.ai-chat-form input[type="text"]#ai-chat-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px var(--ring-color);
  background: #ffffff;
}
.ai-chat-form button[type="submit"],
.ai-chat-send {
  /* Use unified button system */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0 20px;
  border: none;
  border-radius: var(--btn-radius);
  background: linear-gradient(90deg, var(--brand-indigo) 0%, var(--brand-blue) 100%);
  color: #fff;
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
  width: auto;
  flex: 0 0 auto;
  height: 56px;
  min-width: 110px;
  margin: 0;
  user-select: none;
}

.ai-chat-send:hover { 
  transform: var(--btn-transform-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

/* Sending state */
.ai-chat-form.is-sending .ai-chat-send {
  opacity: 0.6;
  pointer-events: none;
}

@media (max-width: 700px) {
  .ai-chat { border-radius: 12px; }
  /* Compact on mobile by default */
  .ai-chat-messages { height: 20vh; max-height: 32vh; }
  /* Expand on mobile after conversation starts */
  .ai-chat.expanded .ai-chat-messages { height: 50vh; max-height: 70vh; }
  .ai-chat-form { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .ai-chat-form .ai-chat-send { width: 100%; }
}

/* Attention animation for the bidding strategy CTA */
@keyframes shakeWithPause {
  0% { transform: translateX(0); }
  2% { transform: translateX(1px); }
  4% { transform: translateX(-1px); }
  6% { transform: translateX(1px); }
  8% { transform: translateX(-1px); }
  10% { transform: translateX(1px); }
  12% { transform: translateX(-1px); }
  14% { transform: translateX(0); }
  15%, 100% { transform: translateX(0); } /* pause for remainder of cycle */
}

/* Add a gentle pulse + shake when the button is on screen */
.ai-button {
  position: relative;
  animation: shakeWithPause 6s ease-in-out infinite; /* ~1s shake + ~5s pause */
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .ai-button { animation: none; }
}

/* Enhanced noise tile styling (no animations) */
.noise-tile {
  position: relative;
}

/* Reusable limit notice card */
.limit-card {
  background: #fff8f6;
  border: 1px solid #fbd5d5;
  color: #991b1b;
  border-radius: 12px;
  padding: 18px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.limit-card .limit-title { font-weight: 800; line-height: 1.35; }
.limit-card .limit-cta {
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%) !important;
  color: #fff !important;
  padding: 14px 24px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.025em;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.limit-card .limit-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.limit-card .limit-cta:hover::before {
  left: 100%;
}

.limit-card .limit-cta:hover { 
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.4), 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.limit-card .limit-cta:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Stacked layout for narrow or centered notices */
.limit-card.stack {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}
/* Removed the grey line above page titles */
.steps-preview { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; margin: 2em auto 2.5em auto; max-width: 900px; padding: 0 1em; }
@media (max-width: 900px) { .steps-preview { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; } }
@media (max-width: 560px) { .steps-preview { grid-template-columns: 1fr; gap: 14px; } }

/* Blog Page Mobile Responsiveness */
@media (max-width: 768px) {
  .blog-article-page {
    padding: 20px;
    margin-bottom: 20px;
  }
  
  .blog-article-title-page {
    font-size: 1.375rem;
  }
  
  .blog-article-meta-page {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .blog-article-content-page {
    padding: 20px;
  }
  
  .blog-article-content-page h3 {
    font-size: 1.25rem;
  }
  
  .blog-article-toggle-page {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .blog-article-page {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .blog-article-title-page {
    font-size: 1.25rem;
  }
  
  .blog-article-content-page {
    padding: 16px;
  }
}

/* Blog Page Styles - Clean and Simple */
.info-page {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0 !important;
}

.info-page .info-card {
  max-width: 900px !important;
  width: 90% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  position: relative !important;
  left: 0 !important;
  transform: none !important;
}

/* Override page-content constraints for blog page */
#page-content:has(.info-page),
#page-content .info-page {
  max-width: none !important;
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  padding: 0 !important;
}

.blog-articles-container {
  margin-top: 2em;
}

.blog-article-page {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.blog-article-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #7c3aed);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-article-page:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.blog-article-page:hover::before {
  opacity: 1;
}

.blog-article-header-page {
  margin-bottom: 20px;
}

.blog-article-category-badge-page {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.blog-article-title-page {
  margin: 0 0 16px 0;
  color: #0f172a;
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.blog-article-meta-page {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.875rem;
  color: #64748b;
  flex-wrap: wrap;
}

.blog-article-date-page, .blog-article-read-time-page {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.blog-article-excerpt-page {
  color: #475569;
  line-height: 1.7;
  margin: 0 0 24px 0;
  font-size: 1.05rem;
  font-weight: 400;
}

.blog-article-content-page {
  color: #1e293b;
  line-height: 1.8;
  font-size: 1.05rem;
}

/* SEO-Enhanced Blog Elements */
.blog-internal-links {
  background: #f8fafc;
  border-left: 4px solid #6366f1;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
}

.blog-internal-links h4 {
  color: #1f2937;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.blog-internal-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-internal-links li {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.blog-internal-links li:last-child {
  border-bottom: none;
}

.blog-internal-links a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.blog-internal-links a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* Old social sharing styles removed - now using inline buttons */

/* Inline Social Sharing Layout */
.blog-article-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  gap: 1rem;
}

.blog-social-buttons-inline {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.social-btn-inline {
  /* Use unified button system */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: var(--btn-radius);
  background: #fff;
  color: #374151;
  font-size: 16px;
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: var(--btn-shadow);
  min-width: 40px;
  height: 40px;
  user-select: none;
}

.social-btn-inline img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.2s;
}

.social-btn-inline:hover img {
  filter: grayscale(0%);
}

.social-btn-inline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  transform: var(--btn-transform-hover);
  box-shadow: var(--btn-shadow-hover);
}

.social-btn-inline.twitter:hover {
  border-color: #1da1f2;
  color: #1da1f2;
  background: #f0f9ff;
}

.social-btn-inline.linkedin:hover {
  border-color: #0077b5;
  color: #0077b5;
  background: #f0f9ff;
}

.social-btn-inline.facebook:hover {
  border-color: #1877f2;
  color: #1877f2;
  background: #f0f9ff;
}

.social-btn-inline.copy-link:hover {
  border-color: #6366f1;
  color: #6366f1;
  background: #f0f9ff;
}

.blog-article-content-page {
  margin: 24px 0;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
}

.blog-article-content-page h3 {
  color: #1e293b;
  font-size: 1.375rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  line-height: 1.4;
}

.blog-article-content-page p {
  margin: 0 0 16px 0;
  color: #374151;
}

.blog-article-content-page ul {
  margin: 16px 0;
  padding-left: 24px;
}

.blog-article-content-page li {
  margin: 8px 0;
  color: #374151;
}

.blog-article-content-page strong {
  color: #1e293b;
  font-weight: 600;
}

.blog-article-toggle-page {
  /* Use unified button system */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--btn-radius);
  background: linear-gradient(135deg, var(--brand-blue) 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: var(--btn-font-weight);
  cursor: pointer;
  transition: var(--btn-transition);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
  user-select: none;
}

.blog-article-toggle-page:hover {
  transform: var(--btn-transform-hover);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}

.blog-article-toggle-page .toggle-icon {
  transition: transform 0.3s ease;
}

.blog-citations {
  margin-top: 40px;
  padding: 24px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.blog-citations h4 {
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  border-bottom: 2px solid #3b82f6;
  padding-bottom: 8px;
}

.blog-citations ul {
  margin: 0;
  padding-left: 20px;
}

.blog-citations li {
  margin: 12px 0;
  color: #374151;
  line-height: 1.6;
}

.blog-citations a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.blog-citations a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.blog-citations strong {
  color: #1e293b;
  font-weight: 600;
}

/* Blog Styles - removed empty ruleset */

/* Mobile responsive button layout */
@media (max-width: 768px) {
  .blog-article-actions {
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
  }
  
  .blog-read-full-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1.1rem;
  }
  
  .blog-share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
  }
  
  .blog-share-btn {
    width: 48px;
    height: 48px;
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .blog-article-actions {
    gap: 20px;
  }
  
  .blog-read-full-btn {
    padding: 18px 20px;
    font-size: 1rem;
  }
  
  .blog-share-buttons {
    gap: 16px;
  }
  
  .blog-share-btn {
    width: 44px;
    height: 44px;
    padding: 10px;
  }
}

.blog-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
}

.blog-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.blog-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
  max-width: 90vw;
  max-height: 90vh;
  width: 900px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 36px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

.blog-modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
}

.blog-modal-title h2 {
  margin: 0 0 8px 0;
  color: #0f172a;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.blog-modal-subtitle {
  margin: 0;
  color: #64748b;
  font-size: 1rem;
  font-weight: 500;
}

.blog-modal-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 8px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.blog-modal-close:hover {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
  transform: scale(1.05);
}

.blog-modal-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.blog-articles {
  padding: 36px;
  overflow-y: auto;
  max-height: calc(90vh - 140px);
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
}

.blog-article {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.blog-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #7c3aed);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-article:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-4px);
}

.blog-article:hover::before {
  opacity: 1;
}

.blog-article-header {
  margin-bottom: 20px;
}

.blog-article-category-badge {
  display: inline-block;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.blog-article-title {
  margin: 0 0 16px 0;
  color: #0f172a;
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.blog-article-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.875rem;
  color: #64748b;
  flex-wrap: wrap;
}

.blog-article-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* Professional styling for article meta */
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: #64748b;
}

.article-date {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.8rem;
}

.article-category {
  background: #3b82f6;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Custom Language Selector */
.language-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.language-selector:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.language-icon {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.language-text {
  font-weight: 600;
  font-size: 0.875rem;
  color: #1e293b;
}

.language-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: none;
  margin-top: 4px;
}

.language-dropdown.show {
  display: block;
}

.language-option {
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-weight: 500;
  font-size: 0.875rem;
  color: #1e293b;
}

.language-option:hover {
  background-color: #f1f5f9;
}

.language-option:first-child {
  border-radius: 8px 8px 0 0;
}

.language-option:last-child {
  border-radius: 0 0 8px 8px;
}

.blog-article-meta svg {
  opacity: 0.7;
}

.blog-article-date, .blog-article-read-time {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-article-excerpt {
  color: #475569;
  line-height: 1.7;
  margin: 0 0 24px 0;
  font-size: 1.05rem;
  font-weight: 400;
}

.blog-article-read-more {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25);
}

.blog-article-read-more svg {
  transition: transform 0.2s ease;
}

.blog-article-read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.blog-article-read-more:hover svg {
  transform: translateX(4px);
}

.blog-full-article {
  padding: 0;
}

.blog-back-to-list {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 32px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-back-to-list:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateX(-2px);
}

.blog-back-to-list:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.blog-article-content {
  color: #1e293b;
  line-height: 1.8;
  font-size: 1.05rem;
}

.blog-lead {
  font-size: 1.2rem;
  color: #374151;
  font-weight: 500;
  line-height: 1.6;
  margin: 0 0 32px 0;
  padding: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: 12px;
  border-left: 4px solid #3b82f6;
}

.blog-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.blog-feature-item {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-feature-item h4 {
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.blog-feature-item p {
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

.blog-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.blog-stat-item {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

.blog-stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #0369a1;
  margin-bottom: 8px;
}

.blog-stat-label {
  font-size: 0.875rem;
  color: #0c4a6e;
  font-weight: 600;
  line-height: 1.4;
}

.blog-process-steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 32px 0;
}

.blog-step {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
}

.blog-step-number {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.blog-step-content h4 {
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.blog-step-content p {
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

.blog-tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 32px 0;
}

.blog-tech-item {
  text-align: center;
  padding: 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.blog-tech-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.blog-tech-item h4 {
  color: #1e293b;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.blog-tech-item p {
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

.blog-insight-box {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 24px;
  margin: 32px 0;
  position: relative;
}

.blog-insight-box h4 {
  color: #92400e;
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.blog-insight-box p {
  color: #78350f;
  line-height: 1.6;
  margin: 0;
  font-weight: 500;
}

.blog-article-content h2 {
  color: #1e293b;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 32px 0 16px 0;
  line-height: 1.3;
}

.blog-article-content h3 {
  color: #1e293b;
  font-size: 1.375rem;
  font-weight: 600;
  margin: 24px 0 12px 0;
  line-height: 1.4;
}

.blog-article-content p {
  margin: 0 0 16px 0;
  color: #374151;
}

.blog-article-content ul {
  margin: 16px 0;
  padding-left: 24px;
}

.blog-article-content li {
  margin: 8px 0;
  color: #374151;
}

.blog-article-content strong {
  color: #1e293b;
  font-weight: 600;
}

.blog-article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
  flex-wrap: wrap;
  gap: 20px;
}

.blog-article-footer-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.blog-article-footer-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.blog-article-footer-meta .blog-article-category {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-article-share {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.blog-share-btn {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.blog-share-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .blog-modal-content {
    width: 95vw;
    max-height: 95vh;
    margin: 20px;
  }
  
  .blog-modal-header {
    padding: 24px 28px;
  }
  
  .blog-modal-title h2 {
    font-size: 1.75rem;
  }
  
  .blog-articles {
    padding: 28px;
    max-height: calc(95vh - 120px);
  }
  
  .blog-article {
    padding: 24px;
    margin-bottom: 24px;
  }
  
  .blog-article-title {
    font-size: 1.375rem;
  }
  
  .blog-article-meta {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .blog-feature-grid,
  .blog-stats-grid,
  .blog-tech-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .blog-article-content h2 {
    font-size: 1.75rem;
  }
  
  .blog-article-content h3 {
    font-size: 1.375rem;
  }
  
  .blog-article-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .blog-modal-content {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    margin: 0;
  }
  
  .blog-modal-header {
    padding: 16px 20px;
  }
  
  .blog-articles {
    padding: 20px;
    max-height: calc(100vh - 80px);
  }
  
  .blog-article {
    padding: 16px;
    margin-bottom: 16px;
  }
  
  .blog-article-title {
    font-size: 1.125rem;
  }
  
  .blog-article-read-more {
    width: 100%;
    justify-content: center;
  }
}

/* Social Proof Styling */
#addresses-text {
  font-size: 0.7em;
  color: #1e40af;
  font-weight: 700;
  opacity: 0.9;
  margin-left: 0.2em;
  vertical-align: baseline;
}

/* Mobile Comparison Cards */
@media (max-width: 768px) {
  .comparison-table {
    background: transparent;
    box-shadow: none;
    margin-top: 0;
    overflow: visible;
  }
  
  .comparison-table table {
    display: none;
  }
  
  .comparison-cards {
    display: block;
  }
  
  .comparison-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
  }
  
  .comparison-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  }
  
  .comparison-card:last-child {
    margin-bottom: 0;
  }
  
  .card-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
  }
  
  .card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 1px;
  }
  
  .card-address {
    font-weight: 800;
    color: #1e293b;
    font-size: 1.15rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    letter-spacing: -0.01em;
  }
  
  .card-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .metric-item {
    text-align: center;
    padding: 1rem 0.75rem;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 80px;
  }
  
  .metric-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }
  
  .metric-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    flex-shrink: 0;
  }
  
  .metric-value {
    font-weight: 700;
    color: #1f2937;
    font-size: 1.1rem;
    line-height: 1.2;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    text-align: center;
  }
  
  .metric-item.price .metric-value {
    color: #059669;
    font-size: 1.1rem;
    font-weight: 800;
    min-height: 2rem;
  }
  
  .metric-item.energy .metric-value {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 800;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #93c5fd;
    min-height: 2rem;
    width: fit-content;
    margin: 0 auto;
  }
  
  .metric-item.property .metric-value {
    color: #6b7280;
    font-size: 0.875rem;
  }
  
  /* N/A values should not be green */
  .metric-value.na-value {
    color: #6b7280 !important;
    font-weight: 600;
  }
  
  /* Full width metrics for important data */
  .metric-item.full-width {
    grid-column: 1 / -1;
  }
}

/* Very small screens - narrower tiles */
@media (max-width: 430px) {
  .metric-item {
    padding: 0.75rem 0.5rem;
    min-height: 70px;
  }
  
  .metric-label {
    font-size: 0.65rem;
    margin-bottom: 0.4rem;
  }
  
  .metric-value {
    font-size: 1rem;
    min-height: 1.5rem;
  }
  
  .metric-item.price .metric-value {
    font-size: 1rem;
  }
  
  .metric-item.energy .metric-value {
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    min-height: 1.5rem;
  }
}

/* Desktop - hide cards, show table */
@media (min-width: 769px) {
  .comparison-cards {
    display: none;
  }
}

/* Two-table comparison layout */
.property-details-table,
.price-comparison-table {
  margin-bottom: 2rem;
}

.property-details-table h3,
.price-comparison-table h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.property-details-table table,
.price-comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.property-details-table th,
.price-comparison-table th {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  color: #374151;
  font-weight: 700;
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.property-details-table td,
.price-comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.property-details-table tr:hover,
.price-comparison-table tr:hover {
  background-color: #f9fafb;
}

.property-details-table tr:hover .metric-value,
.price-comparison-table tr:hover .metric-value {
  transform: translateY(-1px);
}

/* Best value highlighting for two-table layout */
.property-details-table .best-value,
.price-comparison-table .best-value {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border: 2px solid #22c55e;
  border-radius: 8px;
  position: relative;
  font-weight: 700;
  color: #166534;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2);
}

.property-details-table .best-value::before,
.price-comparison-table .best-value::before {
  content: "★";
  position: absolute;
  top: -8px;
  right: -8px;
  background: #22c55e;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.property-details-table .best-value .metric-value,
.property-details-table .best-value .price-value,
.property-details-table .best-value .score-value,
.property-details-table .best-value .noise-value,
.property-details-table .best-value .energy-value,
.price-comparison-table .best-value .metric-value,
.price-comparison-table .best-value .price-value,
.price-comparison-table .best-value .score-value,
.price-comparison-table .best-value .noise-value,
.price-comparison-table .best-value .energy-value {
  color: #166534;
  font-weight: 800;
}

/* Mobile responsive for two tables */
@media (max-width: 768px) {
  .property-details-table,
  .price-comparison-table {
    margin-bottom: 1.5rem;
  }
  
  .property-details-table h3,
  .price-comparison-table h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }
  
  .property-details-table table,
  .price-comparison-table table {
    font-size: 0.875rem;
  }
  
  .property-details-table th,
  .price-comparison-table th,
  .property-details-table td,
  .price-comparison-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* Mobile card sections */
.card-section {
  margin-bottom: 1.5rem;
}

.card-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Mobile responsive adjustments for card sections */
@media (max-width: 768px) {
  .card-section {
    margin-bottom: 1.25rem;
  }
  
  /* Hide all section titles on mobile - multiple selectors for maximum coverage */
  .section-title,
  .card-section h4,
  .card-section .section-title,
  .comparison-cards .section-title,
  .comparison-cards h4,
  .comparison-cards .card-section h4,
  .comparison-cards .card-section .section-title,
  h4.section-title,
  .comparison-table h3 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }
}

/* Additional mobile-specific rule for comparison cards */
@media (max-width: 768px) {
  .comparison-cards .card-section h4.section-title {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    font-size: 0 !important;
    line-height: 0 !important;
  }
  
  /* Hide desktop-only elements on mobile */
  .desktop-only {
    display: none !important;
  }
}

/* Show desktop-only elements on desktop */
@media (min-width: 769px) {
  .desktop-only {
    display: block !important;
  }
}

/* Mobile: unify tile widths and centering to match address tile */
@media (max-width: 768px) {
  .price-estimation,
  .property-details,
  .comparison-card {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Right-align values in two-column rows inside tiles on mobile */
  .price-estimation div[style*="justify-content:space-between"] > span:last-child {
    text-align: right !important;
  }
}

/* Site Footer */
.site-footer {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #e2e8f0;
  margin-top: 80px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding: 50px 0 30px;
  border-bottom: 1px solid #475569;
}

.footer-brand {
  max-width: 400px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.footer-logo-img {
  width: 28px; /* match intrinsic ratio 716x815 -> ~0.88; set fixed width to avoid CLS */
  height: 32px;
  border-radius: 6px;
  filter: brightness(0) invert(1);
}

.footer-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.025em;
}

.footer-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 16px 0;
  letter-spacing: 0.025em;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 8px;
}

.footer-section a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-block;
}

.footer-section a:hover {
  color: #3b82f6;
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  font-size: 0.875rem;
}

.footer-copyright {
  color: #94a3b8;
}

.footer-copyright p {
  margin: 0;
}

.footer-attribution {
  color: #94a3b8;
}

.footer-attribution p {
  margin: 0;
}

.footer-attribution a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.footer-attribution a:hover {
  color: #60a5fa;
  text-decoration: underline;
}

.footer-attribution .genai-link {
  color: #ffffff !important;
  font-weight: 600;
}

.footer-attribution .genai-link:hover {
  color: #f1f5f9 !important;
  text-decoration: underline;
}

/* Mobile responsive footer */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .site-footer {
    margin-top: 60px;
  }
  
  .footer-content {
    padding: 0 16px;
  }
  
  .footer-main {
    padding: 40px 0 24px;
    gap: 32px;
  }
  
  .footer-links {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 20px 0;
  }
  
  .footer-brand {
    text-align: center;
  }
  
  .footer-logo {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-main {
    padding: 32px 0 20px;
  }
  
  .footer-section h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }
  
  .footer-section a {
    font-size: 0.85rem;
  }
  
  .footer-description {
    font-size: 0.9rem;
  }
}

/* Mobile responsive AI research subtext */
@media (max-width: 768px) {
  .ai-research-subtext {
    font-size: 0.75em !important;
    line-height: 1.1 !important;
  }
}

@media (max-width: 480px) {
  .ai-research-subtext {
    font-size: 0.7em !important;
    line-height: 1.05 !important;
  }
}

/* Reserve main hero height to reduce initial CLS on home */
@media (min-width: 320px) {
  body[data-page="home"] .container { min-height: 70vh; }
}

/* Reserve space for address form controls to avoid shifts when styles apply */
#address-form button,#address-form input { min-height: 40px; }

/* Keep submit container height stable */
#address-form .button-container { min-height: 48px; }

/* Trustpilot review button area reserved */
.trustpilot-section { min-height: 72px; }

/* Authentication Modal Styles */
.auth-modal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 10000 !important;
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

.auth-modal.show {
  display: flex !important;
}

.auth-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.3s ease-out;
  z-index: 10001;
  text-align: left;
  display: flex;
  flex-direction: column;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0) scale(1);
  }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px 0 24px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.auth-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.auth-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.auth-modal-body {
  padding: 0 24px 16px 24px;
}

.auth-provider-selection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 0;
  margin: 0;
}

.auth-provider-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
  min-height: 56px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 12px;
}

.auth-provider-btn:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.auth-provider-btn.google-btn:hover {
  border-color: #4285f4;
  background: #f8f9fa;
}

.auth-provider-btn.apple-btn {
  color: #000000;
}

.auth-provider-btn.apple-btn:hover {
  border-color: #000000;
  background: #f5f5f7;
}

.auth-provider-btn.email-btn:hover {
  border-color: #6366f1;
  background: #f8fafc;
}

.auth-provider-btn svg {
  flex-shrink: 0;
}

.auth-email-form {
  margin-top: 16px;
}

.auth-explanation {
  margin-bottom: 12px;
  margin-top: 0;
}

.auth-explanation p {
  margin: 0;
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

.auth-form-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 24px;
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.auth-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
}

.auth-tab:hover {
  color: #374151;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.auth-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.auth-form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.auth-form-group input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  box-sizing: border-box;
}

.auth-form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.auth-form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.auth-submit-btn {
  width: 100%;
  padding: 12px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-sizing: border-box;
}

.auth-submit-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.auth-forgot-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 0.875rem;
  cursor: pointer;
  text-align: center;
  padding: 8px;
  transition: all 0.2s;
}

.auth-forgot-btn:hover {
  color: #2563eb;
  text-decoration: underline;
}

.auth-error {
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 16px;
}

.auth-success {
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  color: #16a34a;
  font-size: 0.875rem;
  margin-top: 16px;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
  .auth-modal {
    padding: 10px !important;
  }
  
  .auth-modal-content {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 20px);
    margin: 0;
  }
  
  .auth-modal-header {
    padding: 16px 16px 0 16px;
  }
  
  .auth-modal-body {
    padding: 0 16px 16px 16px;
  }
  
  .auth-provider-btn {
    padding: 16px;
    font-size: 1.1rem;
  }
  
  .auth-form-group input {
    padding: 16px;
    font-size: 1.1rem;
  }
  
  .auth-submit-btn {
    padding: 16px 24px;
    font-size: 1.1rem;
  }
}

/* Extra small screens */
@media (max-width: 375px) {
  .auth-modal {
    padding: 5px !important;
  }
  
  .auth-modal-content {
    max-height: calc(100vh - 10px);
  }
  
  .auth-modal-header h2 {
    font-size: 1.25rem;
  }
  
  .auth-provider-btn {
    padding: 14px;
    font-size: 1rem;
  }
}