/* ============================================
   algorithms.technology — Design System
   Protecting children in the age of AI
   ============================================ */

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

:root {
  --ink: #111827;
  --ink-light: #374151;
  --ink-muted: #6b7280;
  --surface: #ffffff;
  --surface-alt: #f9fafb;
  --surface-dark: #0c1222;
  --surface-dark-alt: #141d30;
  --accent: #dc4a3a;
  --accent-dark: #b93a2d;
  --accent-warm: #e67e22;
  --blue: #3061ff;
  --blue-dark: #1e40af;
  --blue-muted: #93a8f5;
  --teal: #10b981;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --gradient-hero: linear-gradient(135deg, #0c1222 0%, #1a2744 40%, #253551 70%, #2d3a5c 100%);
  --font-display: 'Cormorant Garamond', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-base: 1.0625rem; --text-lg: 1.25rem;
  --text-xl: 1.5rem; --text-2xl: 2rem; --text-3xl: 2.5rem; --text-4xl: 3.25rem; --text-5xl: 4rem;
  --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; --space-5xl: 8rem;
  --content-width: 720px; --wide-width: 960px; --max-width: 1200px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08); --shadow-md: 0 4px 12px rgba(0,0,0,0.1); --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 4px; --radius-md: 8px; --radius-lg: 12px; --radius-xl: 16px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); font-size: var(--text-base); line-height: 1.7; color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* --- Typography --- */
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: var(--text-4xl); font-weight: 600; margin-bottom: var(--space-xl); }
h2 { font-size: var(--text-3xl); font-weight: 600; margin-bottom: var(--space-lg); }
h3 { font-size: var(--text-2xl); font-weight: 600; margin-bottom: var(--space-md); }
h4 { font-size: var(--text-xl); font-weight: 600; margin-bottom: var(--space-sm); }

/* Spacing between consecutive content elements */
p + h2 { margin-top: var(--space-3xl); }
p + h3 { margin-top: var(--space-2xl); }
p + h4 { margin-top: var(--space-xl); }
ul + h2, ol + h2 { margin-top: var(--space-3xl); }
ul + h3, ol + h3 { margin-top: var(--space-2xl); }
p { margin-bottom: var(--space-lg); }
p:last-child { margin-bottom: 0; }
a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--blue-dark); text-decoration: underline; }
strong { font-weight: 600; }

blockquote { border-left: 3px solid var(--blue); padding: var(--space-xl) var(--space-2xl); margin: var(--space-2xl) 0; background: var(--surface-alt); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; color: var(--ink); font-style: italic; line-height: 1.5; }
blockquote cite { display: block; margin-top: var(--space-md); font-style: normal; font-size: var(--text-sm); color: var(--ink-muted); font-weight: 600; }

/* --- Layout --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-xl); }
.container--narrow { max-width: var(--content-width); }
.container--wide { max-width: var(--wide-width); }
.section { padding: var(--space-4xl) 0; }
.section--dark { background: var(--surface-dark); color: var(--surface); }
.section--dark h2, .section--dark h3, .section--dark h4 { color: var(--surface); }
.section--dark p, .section--dark li { color: #c8d0da; }
.section--alt { background: var(--surface-alt); }
.section--accent { background: var(--gradient-hero); color: var(--surface); position: relative; }
.section--accent h2, .section--accent h3, .section--accent p { color: var(--surface); }

/* --- Utilities --- */
.text-lg { font-size: var(--text-lg); }
.text-muted { color: var(--ink-muted); }
.text-center { text-align: center; }
.max-w-prose { max-width: var(--content-width); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-sm { max-width: 640px; }
.risk-safe { color: var(--teal); font-weight: 600; }
.btn-group--center { justify-content: center; }

/* Recommendation grid (homepage) */
.recommendation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-xl); }
.recommendation-grid--full { grid-column: 1 / -1; }

/* --- Navigation --- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(15, 20, 25, 0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-xl); height: 64px; }
.nav__brand { font-family: var(--font-mono); font-size: var(--text-base); color: var(--surface); text-decoration: none; letter-spacing: 0.02em; font-weight: 600; flex-shrink: 0; }
.nav__brand:hover { color: var(--surface); text-decoration: none; }
.nav__brand span { color: var(--accent); }
.nav__links { display: flex; align-items: center; gap: 0; list-style: none; height: 100%; }
.nav__links > li { height: 100%; display: flex; align-items: center; }
.nav__links > li > a { color: rgba(255,255,255,0.55); font-size: var(--text-sm); font-weight: 500; text-decoration: none; transition: color 0.2s, background 0.2s; letter-spacing: 0.01em; padding: 0 var(--space-md); height: 100%; display: flex; align-items: center; position: relative; }
.nav__links > li > a:hover { color: rgba(255,255,255,0.9); text-decoration: none; }
.nav__links > li > a.active { color: var(--surface); text-decoration: none; }
.nav__links > li > a.active::after { content: ''; position: absolute; bottom: 0; left: var(--space-md); right: var(--space-md); height: 2px; background: var(--accent); border-radius: 1px; }
.nav__separator { width: 1px; height: 20px; background: rgba(255,255,255,0.1); margin: 0 var(--space-xs); flex-shrink: 0; }

.nav__dropdown { position: relative; height: 100%; display: flex; align-items: center; }
.nav__dropdown-toggle { cursor: pointer; display: flex; align-items: center; gap: 6px; }
.nav__dropdown-toggle svg { width: 10px; height: 10px; opacity: 0.5; transition: transform 0.2s, opacity 0.2s; }
.nav__dropdown:hover .nav__dropdown-toggle svg { transform: rotate(180deg); opacity: 0.8; }
.nav__dropdown-menu { display: none; position: absolute; top: 100%; left: 0; padding-top: 4px; min-width: 240px; list-style: none; }
.nav__dropdown:hover .nav__dropdown-menu { display: block; }
.nav__dropdown-menu-inner { background: rgba(15, 20, 25, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-lg); padding: var(--space-sm) 0; box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04); }
.nav__dropdown-menu-inner ul { list-style: none; padding: 0; margin: 0; }
.nav__dropdown-menu li a { display: flex; align-items: center; gap: var(--space-sm); padding: 10px var(--space-lg); color: rgba(255,255,255,0.55); font-size: var(--text-sm); font-weight: 400; text-decoration: none; transition: color 0.15s, background 0.15s; white-space: nowrap; }
.nav__dropdown-menu li a:hover { color: var(--surface); background: rgba(255,255,255,0.05); text-decoration: none; }
.nav__dropdown-menu li a.active { color: var(--surface); background: rgba(255,255,255,0.03); text-decoration: none; }
.nav__dropdown-menu li a.active::before { content: ''; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-right: var(--space-xs); flex-shrink: 0; }
.nav__dropdown-divider { height: 1px; background: rgba(255,255,255,0.08); margin: var(--space-xs) var(--space-lg); }

.nav__toggle { display: none; background: none; border: none; cursor: pointer; padding: var(--space-sm); color: var(--surface); }
.nav__toggle svg { width: 24px; height: 24px; }

.nav__mobile { display: none; position: fixed; top: 64px; left: 0; right: 0; bottom: 0; background: rgba(15, 20, 25, 0.98); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 99; padding: var(--space-xl); overflow-y: auto; }
.nav__mobile.is-open { display: block; }
.nav__mobile ul { list-style: none; padding: 0; }
.nav__mobile > ul > li { border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav__mobile > ul > li > a { display: block; padding: var(--space-lg) 0; color: rgba(255,255,255,0.7); font-size: var(--text-lg); font-weight: 500; text-decoration: none; }
.nav__mobile > ul > li > a.active, .nav__mobile > ul > li > a:hover { color: var(--surface); text-decoration: none; }
.nav__mobile-label { display: block; padding: var(--space-lg) 0 var(--space-sm); color: rgba(255,255,255,0.3); font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.nav__mobile-sub { padding: 0 0 var(--space-md) var(--space-lg); }
.nav__mobile-sub li a { display: block; padding: var(--space-sm) 0; color: rgba(255,255,255,0.5); font-size: var(--text-base); text-decoration: none; }
.nav__mobile-sub li a:hover, .nav__mobile-sub li a.active { color: var(--surface); text-decoration: none; }

/* --- Hero --- */
.hero { padding: calc(var(--space-5xl) + 80px) 0 var(--space-5xl); background: var(--gradient-hero); color: var(--surface); position: relative; overflow: hidden; min-height: 85vh; display: flex; align-items: center; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at 20% 80%, rgba(48, 97, 255, 0.12) 0%, transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(6, 182, 212, 0.06) 0%, transparent 50%), radial-gradient(ellipse at 50% 50%, rgba(220, 74, 58, 0.04) 0%, transparent 60%); pointer-events: none; }
.hero__content { position: relative; max-width: var(--wide-width); margin: 0 auto; padding: 0 var(--space-xl); }
.hero__eyebrow { font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--blue-muted); margin-bottom: var(--space-xl); display: flex; align-items: center; gap: var(--space-md); }
.hero__eyebrow::before { content: ''; display: inline-block; width: 32px; height: 2px; background: var(--blue); }
.hero h1 { font-size: var(--text-5xl); font-weight: 700; margin-bottom: var(--space-xl); max-width: 820px; line-height: 1.08; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--blue-muted), #06b6d4); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero__subtitle { font-size: var(--text-lg); color: rgba(255,255,255,0.65); max-width: 600px; line-height: 1.7; margin-bottom: var(--space-2xl); }

/* --- Stat Cards --- */
.stats-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-lg); margin: var(--space-3xl) 0; }
.stat-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius-lg); padding: var(--space-xl) var(--space-lg); text-align: center; transition: border-color 0.3s, background 0.3s; }
.stat-card:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); }
.stat-card--light { background: var(--surface); border: 1px solid var(--border); }
.stat-card--light:hover { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.stat-card__number { font-family: var(--font-display); font-size: var(--text-4xl); font-weight: 700; color: var(--surface); line-height: 1; margin-bottom: var(--space-sm); }
.stat-card--light .stat-card__number { color: var(--blue); }
.stat-card__label { font-size: var(--text-sm); color: rgba(255,255,255,0.5); line-height: 1.4; }
.stat-card--light .stat-card__label { color: var(--ink-muted); }

/* --- Content Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-xl); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-2xl); transition: box-shadow 0.3s, border-color 0.3s, transform 0.2s; text-decoration: none; color: inherit; display: block; }
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--blue); transform: translateY(-2px); text-decoration: none; color: inherit; }
.card--dark { background: var(--surface-dark-alt); border-color: rgba(255,255,255,0.06); }
.card__icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: var(--space-lg); }
.card__icon--red { background: rgba(231, 76, 60, 0.1); color: var(--accent); }
.card__icon--blue { background: rgba(41, 128, 185, 0.1); color: var(--blue); }
.card__icon--orange { background: rgba(230, 126, 34, 0.1); color: var(--accent-warm); }
.card__icon--teal { background: rgba(22, 160, 133, 0.1); color: var(--teal); }
.card h3 { font-size: var(--text-xl); margin-bottom: var(--space-md); }
.card p { color: var(--ink-muted); font-size: var(--text-base); }

/* --- Evidence Sections --- */
.evidence-block { padding: var(--space-3xl) 0; border-bottom: 1px solid var(--border); }
.evidence-block:last-child { border-bottom: none; }
.evidence-block__label { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: var(--space-md); }
.evidence-block h3 { margin-bottom: var(--space-lg); }
.evidence-block h4 { font-size: var(--text-lg); margin: var(--space-2xl) 0 var(--space-md); color: var(--ink-light); }
.evidence-block ul, .evidence-block ol { padding-left: var(--space-xl); margin-bottom: var(--space-lg); }
.evidence-block li { margin-bottom: var(--space-sm); color: var(--ink-light); }

/* --- Warning Callout --- */
.callout { border-radius: var(--radius-lg); padding: var(--space-xl); margin: var(--space-2xl) 0; }
.callout--danger { background: rgba(231, 76, 60, 0.06); border: 1px solid rgba(231, 76, 60, 0.15); border-left: 4px solid var(--accent); }
.callout--info { background: rgba(41, 128, 185, 0.06); border: 1px solid rgba(41, 128, 185, 0.15); border-left: 4px solid var(--blue); }
.callout--success { background: rgba(22, 160, 133, 0.06); border: 1px solid rgba(22, 160, 133, 0.15); border-left: 4px solid var(--teal); }
.callout__title { font-family: var(--font-body); font-weight: 700; font-size: var(--text-base); margin-bottom: var(--space-sm); }
.callout--danger .callout__title { color: var(--accent); }
.callout--info .callout__title { color: var(--blue); }
.callout--success .callout__title { color: var(--teal); }

/* --- Source List --- */
.sources { margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: 1px solid var(--border-light); }
.sources__title { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: var(--space-sm); }
.sources ul { list-style: none; padding: 0; }
.sources li { font-size: var(--text-sm); color: var(--ink-muted); margin-bottom: var(--space-xs); padding-left: var(--space-lg); position: relative; }
.sources li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.sources a { color: var(--blue); font-size: var(--text-sm); }

/* --- Tables --- */
.comparison-table { width: 100%; border-collapse: collapse; margin: var(--space-2xl) 0; font-size: var(--text-sm); }
.comparison-table th { font-family: var(--font-body); font-weight: 600; text-align: left; padding: var(--space-md) var(--space-lg); background: var(--surface-alt); border-bottom: 2px solid var(--border); font-size: var(--text-sm); color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.comparison-table td { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border-light); vertical-align: top; }
.comparison-table tr:hover td { background: var(--surface-alt); }
.risk-confirmed { color: var(--accent); font-weight: 600; }
.risk-active { color: var(--accent-warm); font-weight: 600; }
.risk-growing { color: var(--blue); font-weight: 600; }
.risk-table { width: 100%; border-collapse: collapse; margin: var(--space-2xl) 0; }
.risk-table th { text-align: left; padding: var(--space-md) var(--space-lg); background: var(--surface-dark); color: var(--surface); font-size: var(--text-sm); font-weight: 600; }
.risk-table td { padding: var(--space-md) var(--space-lg); border-bottom: 1px solid var(--border); font-size: var(--text-sm); }
.risk-table .severity-high { color: var(--accent); font-weight: 700; }
.risk-table .severity-active { color: var(--accent-warm); font-weight: 700; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: var(--space-sm); padding: var(--space-md) var(--space-xl); border-radius: var(--radius-md); font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600; text-decoration: none; transition: all 0.2s; border: none; cursor: pointer; letter-spacing: 0.02em; }
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--blue); color: var(--surface); }
.btn--primary:hover { background: var(--blue-dark); color: var(--surface); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(48, 97, 255, 0.35); }
.btn--outline { background: transparent; color: var(--surface); border: 1px solid rgba(255,255,255,0.2); }
.btn--outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.4); color: var(--surface); }
.btn--outline-dark { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn--outline-dark:hover { background: var(--surface-alt); border-color: var(--ink-muted); color: var(--ink); }
.btn-group { display: flex; gap: var(--space-md); flex-wrap: wrap; }

/* --- Timeline --- */
.timeline { position: relative; padding-left: var(--space-2xl); }
.timeline::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline__item { position: relative; margin-bottom: var(--space-2xl); }
.timeline__item::before { content: ''; position: absolute; left: calc(-1 * var(--space-2xl) - 5px); top: 0.5em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.timeline__date { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--accent); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-xs); }
.timeline__title { font-weight: 600; margin-bottom: var(--space-xs); }
.timeline__desc { color: var(--ink-muted); font-size: var(--text-sm); }

/* --- Sidebar TOC --- */
.page-layout { display: grid; grid-template-columns: 1fr 240px; gap: var(--space-3xl); max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-xl); }
.page-layout__content { min-width: 0; }
.toc { position: sticky; top: calc(60px + var(--space-xl)); align-self: start; padding: var(--space-lg); border-left: 1px solid var(--border); max-height: calc(100vh - 100px); overflow-y: auto; }
.toc__title { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-bottom: var(--space-md); }
.toc ul { list-style: none; padding: 0; }
.toc li { margin-bottom: var(--space-sm); }
.toc a { font-size: var(--text-sm); color: var(--ink-muted); text-decoration: none; display: block; padding: var(--space-xs) 0; transition: color 0.2s; }
.toc a:hover, .toc a.active { color: var(--ink); text-decoration: none; }

/* --- Footer --- */
.footer { background: var(--surface-dark); color: #8899aa; padding: var(--space-3xl) 0; border-top: 1px solid rgba(255,255,255,0.06); }
.footer__inner { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-xl); display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: var(--space-2xl); }
.footer__brand { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--surface); letter-spacing: 0.05em; }
.footer__brand span { color: var(--accent); }
.footer__text { font-size: var(--text-sm); }
.footer__credit { font-size: var(--text-xs); color: rgba(255,255,255,0.3); }
.footer__nav { display: flex; gap: var(--space-3xl); }
.footer__col-title { font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.4); margin-bottom: var(--space-md); }
.footer__links { list-style: none; padding: 0; }
.footer__links--vertical li { margin-bottom: var(--space-sm); }
.footer__links a { color: #8899aa; font-size: var(--text-sm); text-decoration: none; }
.footer__links a:hover { color: var(--surface); text-decoration: none; }

/* --- Motion Template --- */
.motion-block { background: var(--surface-alt); border: 2px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-2xl); margin: var(--space-2xl) 0; font-family: var(--font-body); }
.motion-block__title { font-family: var(--font-display); font-size: var(--text-xl); margin-bottom: var(--space-lg); color: var(--ink); }
.motion-block h4 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-lg); margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
.motion-block p { margin-bottom: var(--space-md); }
.motion-block .motion-field { display: block; margin-top: var(--space-md); padding-bottom: var(--space-xs); border-bottom: 1px solid var(--border); color: var(--ink-muted); font-size: var(--text-sm); }

/* --- Step Cards --- */
.steps { counter-reset: step; }
.step { counter-increment: step; position: relative; padding-left: var(--space-3xl); margin-bottom: var(--space-2xl); }
.step::before { content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--surface); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: var(--text-sm); }
.step h4 { font-family: var(--font-body); font-weight: 700; font-size: var(--text-lg); margin-bottom: var(--space-sm); }
.step p { color: var(--ink-light); }

/* --- Page Header --- */
.page-header { padding: calc(64px + var(--space-4xl)) 0 var(--space-3xl); background: var(--gradient-hero); color: var(--surface); position: relative; }
.page-header::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse at 30% 100%, rgba(48, 97, 255, 0.08) 0%, transparent 50%); pointer-events: none; }
.page-header .container { position: relative; }
.page-header h1 { font-size: var(--text-4xl); font-weight: 700; margin-bottom: var(--space-md); letter-spacing: -0.02em; }
.page-header p { font-size: var(--text-lg); color: rgba(255,255,255,0.6); max-width: 640px; line-height: 1.6; }

/* --- Skip Nav --- */
.skip-nav { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-nav:focus { position: fixed; top: var(--space-sm); left: var(--space-sm); width: auto; height: auto; padding: var(--space-md) var(--space-xl); background: var(--surface); color: var(--ink); z-index: 200; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }

/* --- Contact Form --- */
.contact-form { max-width: 480px; margin: 0 auto; }
.contact-form .form-row { margin-bottom: var(--space-md); }
.contact-form .form-row-half { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
.contact-form label { display: block; font-size: var(--text-sm); font-weight: 500; color: rgba(255,255,255,0.7); margin-bottom: var(--space-xs); }
.contact-form input, .contact-form select { width: 100%; padding: 12px var(--space-md); border: 1px solid rgba(255,255,255,0.15); border-radius: var(--radius-md); background: rgba(255,255,255,0.06); color: var(--surface); font-family: var(--font-body); font-size: var(--text-sm); transition: border-color 0.2s, background 0.2s; }
.contact-form input::placeholder { color: rgba(255,255,255,0.3); }
.contact-form input:focus, .contact-form select:focus { outline: none; border-color: var(--blue); background: rgba(255,255,255,0.08); }
.contact-form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' fill-opacity='0.4' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.contact-form select option { background: var(--surface-dark); color: var(--surface); }
.contact-form button[type="submit"] { width: 100%; margin-top: var(--space-sm); }
.contact-form .hp { position: absolute; left: -9999px; }
#form-message { margin-top: var(--space-md); font-size: var(--text-sm); font-weight: 500; text-align: center; min-height: 1.5em; }
.contact-form--light label { color: var(--ink-muted); }
.contact-form--light input, .contact-form--light select { border-color: var(--border); background: var(--surface); color: var(--ink); }
.contact-form--light input::placeholder { color: var(--ink-muted); }
.contact-form--light input:focus, .contact-form--light select:focus { border-color: var(--blue); background: var(--surface); }

/* --- Page Navigation --- */
.page-nav { display: flex; justify-content: space-between; padding: var(--space-2xl) 0; border-top: 1px solid var(--border); margin-top: var(--space-3xl); }
.page-nav a { font-size: var(--text-sm); font-weight: 500; }

/* --- Responsive --- */
@media (max-width: 768px) {
  :root { --text-4xl: 2.25rem; --text-5xl: 2.75rem; --text-3xl: 2rem; --text-2xl: 1.5rem; }
  .page-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .hero h1 { font-size: var(--text-3xl); }
  .page-header { padding: calc(64px + var(--space-2xl)) 0 var(--space-2xl); }
  .page-header h1 { font-size: var(--text-3xl); }
  .recommendation-grid { grid-template-columns: 1fr; }
  .comparison-table, .risk-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .comparison-table th, .comparison-table td, .risk-table th, .risk-table td { padding: var(--space-sm) var(--space-md); min-width: 100px; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { flex-direction: column; gap: var(--space-xl); }
  .footer__links--vertical { text-align: center; }
  .contact-form .form-row-half { grid-template-columns: 1fr; }
  .section { padding: var(--space-3xl) 0; }
  blockquote { padding: var(--space-lg); font-size: var(--text-lg); }
}

@media (max-width: 480px) {
  :root { --text-3xl: 1.75rem; --text-4xl: 2rem; --text-5xl: 2.25rem; }
  .stats-strip { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .hero h1 { font-size: var(--text-2xl); }
  .hero { min-height: 70vh; }
  .hero__subtitle { font-size: var(--text-base); }
}
