:root {
  --accent: #22d3ee;
  --accent-2: #f472b6;
  --bg: #071018;
  --surface: #0e1b25;
  --ink: #eefbff;
  --muted: #9ab1bf;
  --line: #234251;
  --hero: #09141e;
  --hero-ink: #eefbff;
  --shadow: 0 18px 55px color-mix(in srgb, var(--ink) 10%, transparent);
  --radius: 22px;
  --footer-bg: color-mix(in srgb, var(--ink) 94%, black);
  --footer-ink: color-mix(in srgb, white 84%, var(--bg));
  --footer-muted: color-mix(in srgb, white 62%, transparent);
  --footer-faint: color-mix(in srgb, white 58%, transparent);
  --footer-line: color-mix(in srgb, white 16%, transparent);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Iowan Old Style, Charter, "Palatino Linotype", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-wrap: break-word;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; }
.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 99; padding: 10px 14px;
  background: var(--surface); transform: translateY(-150%); border-radius: 8px;
}
.skip-link:focus { transform: translateY(0); }
.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.wrap-narrow { width: min(780px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  position: relative; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.header-inner { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1.05; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: white; font-weight: 900;
}
.brand strong { display: block; font-size: 1.08rem; letter-spacing: -0.02em; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 0.68rem; letter-spacing: 0.02em; }
.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { color: var(--muted); font-size: 0.9rem; font-weight: 750; text-decoration: none; }
.main-nav a:hover { color: var(--accent); }
.menu-button {
  display: none; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); padding: 9px 13px; font-weight: 800;
}

.hero { background: var(--hero); color: var(--hero-ink); overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-grid { min-height: 610px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.75fr); align-items: center; gap: 72px; padding-block: 84px; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow {
  display: inline-block; color: var(--accent); font-size: 0.75rem; font-weight: 900;
  letter-spacing: 0.13em; line-height: 1.3; text-transform: uppercase;
}
.hero .eyebrow { color: color-mix(in srgb, var(--accent) 72%, white); }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -0.035em; text-wrap: balance; }
h1 { margin-bottom: 22px; font-family: var(--display); font-size: clamp(3rem, 6vw, 5.9rem); }
h2 { font-family: var(--display); font-size: clamp(2rem, 4vw, 3.25rem); }
h3 { font-size: 1.35rem; }
.dek { max-width: 760px; margin: 0 0 28px; color: color-mix(in srgb, currentColor 78%, transparent); font-size: clamp(1.08rem, 2vw, 1.28rem); line-height: 1.6; }
.transparency-badge { display: inline-flex; margin: 0 0 12px; padding: 8px 12px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 999px; background: color-mix(in srgb, currentColor 8%, transparent); color: currentColor; font-size: 0.76rem; font-weight: 850; letter-spacing: 0.02em; }
.byline { display: flex; align-items: center; gap: 12px; margin-block: 30px; }
.author-mark { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 50%; font-size: 0.78rem; font-weight: 900; }
.byline strong, .byline small { display: block; }
.byline small { opacity: 0.72; font-size: 0.78rem; margin-top: 3px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 999px;
  background: var(--accent); color: #071018; padding: 14px 22px; font-weight: 850; text-decoration: none;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 30%, transparent);
}
.button:hover { background: color-mix(in srgb, var(--accent) 88%, black); }
.hero-art { position: relative; min-height: 410px; transform: rotate(8deg); }
.hero-art::before {
  content: ""; position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--hero-ink) 20%, transparent);
  border-radius: 46% 46% 18% 18%; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 12%, transparent), transparent);
}
.lane { position: absolute; top: 8%; bottom: 8%; width: 2px; background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--hero-ink) 60%, transparent) 0 18px, transparent 18px 36px); }
.lane-a { left: 27%; } .lane-b { left: 50%; } .lane-c { left: 73%; }
.runner-dot {
  position: absolute; left: calc(50% - 19px); bottom: 16%; width: 38px; height: 38px;
  border-radius: 50% 50% 35% 35%; background: var(--accent-2); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent-2) 18%, transparent), 0 0 40px var(--accent-2);
}
.runner-dot::before { content: ""; position: absolute; width: 20px; height: 20px; left: 9px; top: -17px; border-radius: 50%; background: inherit; }

.section { padding-block: 100px; }
.section.compact { padding-block: 72px; }
.section-tint { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); border-block: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 40px; }
.section-heading h2 { margin: 8px 0 0; max-width: 760px; }
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); }
.summary-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.summary-list li { display: grid; grid-template-columns: auto 1fr; gap: 15px; padding: 28px; border-right: 1px solid var(--line); }
.summary-list li:last-child { border-right: 0; }
.summary-list span, .topic-number, .guide-index { color: var(--accent); font-weight: 900; font-size: 0.8rem; letter-spacing: 0.08em; }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.topic-card, .story-card {
  padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 10px 35px color-mix(in srgb, var(--ink) 5%, transparent);
}
.topic-card h3 { margin: 20px 0 14px; }
.topic-card p, .story-card p { color: var(--muted); margin-bottom: 0; }
.story-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.story-card { display: block; color: inherit; text-decoration: none; }
.story-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.story-kicker { color: var(--accent); font-size: 0.78rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.1em; }
.story-card h3 { margin: 16px 0 12px; font-family: var(--display); font-size: 1.9rem; }
.text-link { color: var(--accent); font-weight: 850; text-underline-offset: 4px; }
.story-card .text-link { display: inline-block; margin-top: 22px; }
.method-note { padding: 36px; border-left: 5px solid var(--accent); background: var(--surface); box-shadow: var(--shadow); }
.method-note h2 { font-size: 2rem; margin: 10px 0; }
.method-note p { color: var(--muted); }

.article-shell { padding-bottom: 90px; }
.article-header { padding-block: 86px 64px; }
.article-header h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); margin-top: 18px; }
.back-link { display: inline-block; margin-bottom: 40px; color: var(--muted); font-size: 0.88rem; font-weight: 800; text-underline-offset: 4px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 12px 24px; padding-block: 20px; border-block: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.article-body { font-family: var(--display); font-size: 1.2rem; line-height: 1.82; }
.article-intro { margin-bottom: 54px; padding: 28px; background: var(--surface); border: 1px solid var(--line); font-size: 1.28rem; }
.article-section { margin-block: 66px; }
.article-section h2 { margin: 10px 0 20px; }
.chapter { color: var(--accent); font-family: var(--sans); font-size: 0.76rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
.article-body .method-note, .article-body .callout { font-family: var(--sans); font-size: 1rem; line-height: 1.65; }
.next-reading { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 70px; }
.next-reading a { padding: 24px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; }
.next-reading small, .next-reading strong { display: block; }
.next-reading small { color: var(--accent); font-family: var(--sans); font-weight: 900; margin-bottom: 8px; }
.guide-list { list-style: none; margin: 0; padding: 0; }
.guide-list li { display: grid; grid-template-columns: 55px 1fr; gap: 22px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.guide-list h2 { margin-bottom: 10px; font-size: 2rem; }
.guide-list p { margin: 0; color: var(--muted); }
.callout { margin-block: 54px; padding: 30px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); }
.callout h2 { font-size: 1.6rem; margin-bottom: 10px; }

.legal-hero { padding-block: 82px; background: var(--hero); color: var(--hero-ink); border-bottom: 1px solid var(--line); }
.legal-hero h1 { margin: 14px 0; font-size: clamp(3rem, 7vw, 5rem); }
.legal-date { margin: 24px 0 0; opacity: 0.75; font-size: 0.85rem; }
.legal-body { padding-block: 70px 100px; }
.legal-body section { padding-block: 34px; border-bottom: 1px solid var(--line); }
.legal-body h2 { font-size: 1.9rem; margin-bottom: 14px; }
.legal-body p, .legal-body li { color: var(--muted); }
.legal-body a { color: var(--accent); font-weight: 800; }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr); gap: 36px; padding-block: 70px 100px; align-items: start; }
.info-panel, .contact-aside { padding: 34px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.info-panel .button { margin-top: 14px; }
.contact-aside { position: sticky; top: 24px; }
.contact-aside h2 { font-size: 2rem; margin: 10px 0; }
.contact-aside p { color: var(--muted); }
.contact-aside hr { border: 0; border-top: 1px solid var(--line); margin-block: 26px; }

.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding-block: 64px 24px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 40px; }
.footer-brand { color: white; font-family: var(--display); font-size: 1.7rem; font-weight: 850; }
.site-footer p { max-width: 480px; color: var(--footer-muted); }
.site-footer nav { display: grid; gap: 12px; }
.site-footer a { color: white; text-underline-offset: 4px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 50px; padding-top: 20px; border-top: 1px solid var(--footer-line); color: var(--footer-faint); font-size: 0.75rem; }

html[data-layout="journal"] { --radius: 2px; }
html[data-layout="journal"] .hero-grid { grid-template-columns: 1.4fr 0.6fr; }
html[data-layout="journal"] .hero-copy { border-left: 8px solid var(--accent-2); padding-left: 34px; }
html[data-layout="journal"] .brand-mark { border-radius: 50%; }
html[data-layout="neon"] { --display: "SFMono-Regular", Consolas, "Liberation Mono", monospace; --radius: 6px; --footer-bg: #04090e; --footer-ink: #d6e6ee; --footer-muted: #9ab1bf; --footer-faint: #7f96a4; --footer-line: #1c3442; }
html[data-layout="neon"] h1, html[data-layout="neon"] h2, html[data-layout="neon"] h3 { overflow-wrap: anywhere; letter-spacing: -0.02em; }
html[data-layout="neon"] body { background-image: linear-gradient(color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px); background-size: 46px 46px; }
html[data-layout="neon"] .site-header, html[data-layout="neon"] .section-tint { background: color-mix(in srgb, var(--bg) 94%, transparent); }
html[data-layout="neon"] .hero-art::before, html[data-layout="neon"] .topic-card, html[data-layout="neon"] .story-card { box-shadow: 0 0 32px color-mix(in srgb, var(--accent) 12%, transparent); }
html[data-layout="calm"] { --radius: 34px; }
html[data-layout="calm"] .hero-art { transform: none; }
html[data-layout="calm"] .hero-art::before { border-radius: 50%; }
html[data-layout="track"] .hero-art { transform: skew(-8deg) rotate(4deg); }
html[data-layout="track"] .story-card:first-child { border-top: 8px solid var(--accent); }
html[data-layout="track"] .story-card:last-child { border-top: 8px solid var(--accent-2); }

@media (max-width: 860px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { width: min(100% - 28px, 780px); }
  .header-inner { min-height: 72px; }
  .brand small { display: none; }
  .menu-button { display: inline-flex; }
  .main-nav {
    display: none; position: absolute; left: 14px; right: 14px; top: calc(100% + 8px);
    padding: 16px; flex-direction: column; align-items: stretch; background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .main-nav[data-open="true"] { display: flex; }
  .main-nav a { padding: 8px; color: var(--ink); }
  .hero-grid { min-height: auto; grid-template-columns: 1fr; gap: 30px; padding-block: 62px; }
  .hero h1 { font-size: clamp(2.7rem, 14vw, 4.3rem); }
  .hero-art { min-height: 270px; width: min(100%, 380px); margin-inline: auto; }
  .section { padding-block: 70px; }
  .section-heading { display: block; }
  .section-heading > p, .section-heading > a { display: inline-block; margin-top: 14px; }
  .summary-list, .topic-grid, .story-grid, .next-reading, .footer-grid, .contact-layout { grid-template-columns: 1fr; }
  .summary-list li { border-right: 0; border-bottom: 1px solid var(--line); padding-inline: 0; }
  .summary-list li:last-child { border-bottom: 0; }
  .topic-card, .story-card, .info-panel, .contact-aside { padding: 24px; }
  .contact-aside { position: static; }
  .footer-bottom { flex-direction: column; }
  html[data-layout="journal"] .hero-copy { padding-left: 20px; }
  html[data-layout="journal"] .hero-grid { grid-template-columns: 1fr; }
  html[data-layout="neon"] h1, html[data-layout="neon"] .legal-hero h1, html[data-layout="neon"] .article-header h1 { font-size: clamp(2rem, 9.5vw, 3.4rem); }
  html[data-layout="neon"] .guide-list h2, html[data-layout="neon"] .legal-body h2, html[data-layout="neon"] .info-panel h2, html[data-layout="neon"] .contact-aside h2 { font-size: 1.45rem; }
}

@media (max-width: 400px) {
  .wrap, .wrap-narrow { width: min(100% - 24px, 780px); }
  h1 { font-size: clamp(2.2rem, 12vw, 3rem); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
