/* ===== CSS Custom Properties ===== */
:root {
  --color-sky-50: #f0f7ff;
  --color-sky-100: #e0effe;
  --color-sky-200: #b9dffd;
  --color-sky-300: #7cc4fc;
  --color-sky-400: #36a5f8;
  --color-sky-500: #0c87e8;
  --color-sky-600: #006ac5;
  --color-sky-700: #0154a0;
  --color-sky-800: #064885;
  --color-sky-900: #0b3d6e;
  --color-sky-950: #072749;

  --color-warm-50: #fefcf8;
  --color-warm-100: #fdf6ec;
  --color-warm-200: #f9e8cc;
  --color-warm-300: #f3d4a4;
  --color-warm-400: #e8b46a;
  --color-warm-500: #d9943a;

  --color-slate-50: #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #0f172a;

  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);

  --transition: 0.2s ease;
  --max-width: 1120px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-slate-800);
  background: var(--color-warm-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-sky-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-sky-700);
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* ===== Utility ===== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-sky-600);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-md);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--color-slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--color-slate-900);
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.logo:hover {
  color: var(--color-sky-600);
}

.logo-icon {
  color: var(--color-sky-500);
  flex-shrink: 0;
}

.main-nav ul {
  display: flex;
  gap: var(--space-xs);
}

.main-nav a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  color: var(--color-slate-600);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.main-nav a:hover {
  background: var(--color-sky-50);
  color: var(--color-sky-700);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-sm);
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-slate-700);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.mobile-nav {
  border-top: 1px solid var(--color-slate-200);
  padding: var(--space-md) 0;
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.mobile-nav a {
  display: block;
  padding: var(--space-sm) var(--space-md);
  text-decoration: none;
  color: var(--color-slate-700);
  font-weight: 500;
  border-radius: var(--radius-sm);
}

.mobile-nav a:hover {
  background: var(--color-sky-50);
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--color-sky-950) 0%, var(--color-sky-800) 50%, var(--color-sky-700) 100%);
  color: #fff;
  padding: var(--space-4xl) 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-label {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--color-sky-200);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-sky-200);
  line-height: 1.6;
  margin-bottom: var(--space-2xl);
}

.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-warm-300);
  line-height: 1.2;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: var(--color-sky-300);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--color-warm-400);
  color: var(--color-slate-900);
  border-color: var(--color-warm-400);
}

.btn-primary:hover {
  background: var(--color-warm-500);
  border-color: var(--color-warm-500);
  color: var(--color-slate-900);
}

.btn-secondary {
  background: var(--color-sky-600);
  color: #fff;
  border-color: var(--color-sky-600);
}

.btn-secondary:hover {
  background: var(--color-sky-700);
  border-color: var(--color-sky-700);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--color-sky-600);
  border-color: var(--color-sky-200);
}

.btn-ghost:hover {
  background: var(--color-sky-50);
  color: var(--color-sky-700);
}

/* ===== Sections ===== */
section {
  padding: var(--space-3xl) 0;
}

section:nth-child(even) {
  background: #fff;
}

.section-intro {
  color: var(--color-slate-500);
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: var(--space-xl);
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-slate-900);
  margin-bottom: var(--space-sm);
}

/* ===== Fact Cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-lg);
}

.fact-card {
  background: #fff;
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.fact-card:hover {
  box-shadow: var(--shadow-md);
}

.fact-card-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  padding: var(--space-lg);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}

.fact-card-trigger:hover {
  background: var(--color-sky-50);
}

.fact-card-trigger:focus-visible {
  outline: 2px solid var(--color-sky-500);
  outline-offset: -2px;
}

.fact-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-sky-50);
  color: var(--color-sky-600);
  border-radius: var(--radius-md);
}

.fact-card-header-text {
  flex: 1;
  min-width: 0;
}

.fact-card-header-text h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-slate-900);
  margin-bottom: 2px;
}

.fact-card-header-text p {
  font-size: 0.85rem;
  color: var(--color-slate-500);
}

.fact-card-chevron {
  flex-shrink: 0;
  color: var(--color-slate-400);
  transition: transform var(--transition);
}

.fact-card-trigger[aria-expanded="true"] .fact-card-chevron {
  transform: rotate(180deg);
}

.fact-card-body {
  padding: 0 var(--space-lg) var(--space-lg);
  border-top: 1px solid var(--color-slate-100);
}

.fact-card-body p {
  color: var(--color-slate-600);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.fact-card-body ul {
  list-style: disc;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

.fact-card-body li {
  color: var(--color-slate-600);
  margin-bottom: var(--space-sm);
  line-height: 1.6;
}

.fact-source {
  font-size: 0.8rem;
  color: var(--color-slate-400);
  font-style: italic;
}

/* ===== Comparison Table ===== */
.comparison-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-slate-200);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th {
  background: var(--color-slate-50);
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-weight: 600;
  color: var(--color-slate-700);
  border-bottom: 2px solid var(--color-slate-200);
  white-space: nowrap;
}

.comparison-table td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--color-slate-100);
  color: var(--color-slate-600);
}

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

.comparison-table tr.highlight-row td {
  background: var(--color-success-bg);
  color: var(--color-slate-800);
  font-weight: 500;
}

.comparison-table tr.highlight-row td:first-child {
  font-weight: 700;
  color: var(--color-sky-800);
}

.risk-bar {
  display: inline-block;
  width: 80px;
  height: 8px;
  background: var(--color-slate-200);
  border-radius: 4px;
  vertical-align: middle;
  margin-right: var(--space-sm);
  overflow: hidden;
}

.risk-bar-fill {
  display: block;
  height: 100%;
  background: var(--color-sky-500);
  border-radius: 4px;
  min-width: 2px;
}

.comparison-notes {
  color: var(--color-slate-500);
  font-size: 0.9rem;
}

.comparison-notes p {
  margin-bottom: var(--space-sm);
}

/* ===== Reassurance Card ===== */
.reassurance-card {
  background: linear-gradient(135deg, var(--color-sky-900), var(--color-sky-800));
  color: #fff;
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.rc-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.rc-header h3 {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
}

.rc-icon {
  color: var(--color-warm-300);
  flex-shrink: 0;
}

.rc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.rc-item {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
}

.rc-item strong {
  display: block;
  color: var(--color-warm-300);
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.rc-item span {
  font-size: 0.85rem;
  color: var(--color-sky-200);
  line-height: 1.5;
}

.rc-footer {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--color-sky-300);
}

.reassurance-actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ===== FAQ ===== */
.faq-list {
  max-width: 760px;
}

.faq-item {
  border-bottom: 1px solid var(--color-slate-200);
}

.faq-trigger {
  width: 100%;
  text-align: left;
  padding: var(--space-lg) 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-slate-800);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}

.faq-trigger:hover {
  color: var(--color-sky-600);
}

.faq-trigger::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-sky-400);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-trigger[aria-expanded="true"]::after {
  content: '−';
}

.faq-item dd {
  padding-bottom: var(--space-lg);
  color: var(--color-slate-600);
  line-height: 1.7;
}

/* ===== Methodology ===== */
.methodology {
  background: var(--color-slate-50) !important;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.method-block h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-slate-800);
  margin-bottom: var(--space-sm);
}

.method-block p {
  font-size: 0.9rem;
  color: var(--color-slate-500);
  line-height: 1.6;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--color-slate-900);
  color: var(--color-slate-400);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2xl);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

.footer-brand p {
  font-size: 0.9rem;
  margin-top: var(--space-sm);
  max-width: 280px;
}

.footer-brand .logo {
  color: #fff;
}

.footer-nav {
  display: flex;
  gap: var(--space-3xl);
}

.footer-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-nav a {
  color: var(--color-slate-400);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-nav a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-slate-800);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--color-sky-400);
}

.footer-bottom a:hover {
  color: var(--color-sky-300);
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  background: var(--color-slate-800);
  color: #fff;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  animation: toast-in 0.3s ease;
}

.toast.fade-out {
  animation: toast-out 0.3s ease forwards;
}

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

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

/* ===== Print Styles ===== */
@media print {
  .site-header,
  .site-footer,
  .reassurance-actions,
  .hero-stats,
  .hero-label,
  .btn,
  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .reassurance-card {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 2px solid #333;
    box-shadow: none;
  }

  .reassurance-card * {
    color: #000 !important;
  }

  .rc-item {
    background: #e8e8e8;
    border: 1px solid #ccc;
  }

  section {
    padding: 1rem 0;
    break-inside: avoid;
  }

  .fact-card {
    break-inside: avoid;
  }

  .fact-card-body {
    display: block !important;
  }
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .hero-stat-number {
    font-size: 1.4rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .rc-grid {
    grid-template-columns: 1fr;
  }

  .rc-footer {
    flex-direction: column;
    gap: var(--space-xs);
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-nav {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .comparison-table th,
  .comparison-table td {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .fact-card-trigger {
    padding: var(--space-md);
  }

  .reassurance-card {
    padding: var(--space-lg);
  }

  .reassurance-actions {
    flex-direction: column;
  }

  .reassurance-actions .btn {
    justify-content: center;
  }
}

/* ===== Focus Styles ===== */
*:focus-visible {
  outline: 2px solid var(--color-sky-500);
  outline-offset: 2px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}


/* Factory-injected deployment helpers. The AI owns the site design above this block. */
.ad-unit {
  width: min(100%, 720px);
  min-height: 120px;
  margin: 24px auto;
  display: block;
}

.legal-page {
  width: min(900px, calc(100% - 32px));
  margin: 40px auto;
}

.factory-fallback-nav {
  width: min(900px, calc(100% - 32px));
  margin: 24px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  font-size: 0.95rem;
}

.factory-fallback-nav a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
