:root {
  --bone: #efe9df;
  --paper: #f6f2ea;
  --ink: #171513;
  --ink-2: #3b3631;
  --muted: #6e665c;
  --line: #d9cfbf;
  --red: #b8301d;
  --red-ink: #9f2817;
  --card: #fbf8f2;
  --shadow: 0 30px 60px -20px rgba(40, 25, 10, .35), 0 12px 24px -12px rgba(40, 25, 10, .25);
  --serif-display: "DM Serif Display", Georgia, "Times New Roman", serif;
  --serif: "Libre Baskerville", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bone: #14120f; --paper: #1b1915; --ink: #efe8dc; --ink-2: #d7cfc2; --muted: #a39a8c;
    --line: #34302a; --red: #e0583f; --red-ink: #ef6a50; --card: #1e1b17;
    --shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 12px 24px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bone: #14120f; --paper: #1b1915; --ink: #efe8dc; --ink-2: #d7cfc2; --muted: #a39a8c;
  --line: #34302a; --red: #e0583f; --red-ink: #ef6a50; --card: #1e1b17;
  --shadow: 0 30px 60px -20px rgba(0,0,0,.7), 0 12px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bone); color: var(--ink);
  font-family: var(--serif); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.kicker { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--red); }
h1, h2, h3 { font-family: var(--serif-display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(34px, 5vw, 56px); }
h3 { font-size: 26px; line-height: 1.15; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.sans { font-family: var(--sans); }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bone) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { font-family: var(--serif-display); font-size: 21px; text-decoration: none; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.brand svg { width: 22px; height: 22px; }
.nav-links { display: flex; gap: 26px; align-items: center; font-family: var(--sans); font-size: 14px; }
.nav-links a { text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--red); }
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 999px; padding: 14px 24px; border: 1.5px solid var(--ink); transition: transform .15s ease, background .15s ease, color .15s ease; cursor: pointer; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bone); }
.btn-primary:hover { background: var(--red); border-color: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-soon { cursor: default; background: transparent; color: var(--ink-2); border-style: dashed; }
.btn-soon:hover { transform: none; border-color: var(--ink); color: var(--ink-2); }
.btn-soon small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }
.theme-toggle { background: none; border: 1px solid var(--line); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
@media (max-width: 760px) { .nav-links .hide-sm { display: none; } }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 96px; }
.hero .enso-bg { position: absolute; right: -180px; top: -120px; width: 760px; opacity: .08; pointer-events: none; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(56px, 9vw, 112px); line-height: .92; margin: 18px 0 26px; }
.hero h1 em { font-style: normal; color: var(--red); }
.lede { font-size: 20px; line-height: 1.6; color: var(--ink-2); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 18px; }
.meta { font-family: var(--sans); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px 18px; }
.meta span::before { content: "•"; color: var(--red); margin-right: 8px; }
.cover-stage { perspective: 1600px; display: flex; justify-content: center; }
.cover { width: min(380px, 80vw); aspect-ratio: 1600 / 2560; border-radius: 3px 6px 6px 3px; box-shadow: var(--shadow); transform: rotateY(-14deg) rotateX(3deg); transition: transform .6s cubic-bezier(.2,.7,.2,1); position: relative; }
.cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, rgba(0,0,0,.18) 0, rgba(255,255,255,.12) 2.5%, rgba(0,0,0,0) 6%, rgba(0,0,0,0) 100%); pointer-events: none; }
.cover img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.cover-stage:hover .cover { transform: rotateY(-4deg) rotateX(1deg); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .cover-stage { order: -1; }
  .cover { width: min(260px, 70vw); }
  .hero { padding-top: 40px; }
}

/* Sections */
section.band { padding: 104px 0; border-top: 1px solid var(--line); }
section.band.paper { background: var(--paper); }
.section-head { max-width: 760px; margin-bottom: 52px; }
.section-head h2 { margin: 14px 0 18px; }
.section-head p { font-size: 19px; color: var(--ink-2); }

/* Frozen man */
.frozen { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.frozen .prose p { font-size: 18px; }
.pull { font-family: var(--serif-display); font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; border-left: 3px solid var(--red); padding-left: 24px; margin: 0; }
.pull small { display: block; font-family: var(--sans); font-size: 13px; color: var(--muted); margin-top: 16px; letter-spacing: .04em; }
.ledger { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.ledger li { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.ledger b { font-family: var(--sans); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); padding-top: 4px; }
@media (max-width: 860px) { .frozen { grid-template-columns: 1fr; gap: 40px; } .ledger li { grid-template-columns: 1fr; gap: 2px; } }

/* Council */
.council { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.member { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px 26px; display: flex; flex-direction: column; }
.member .glyph { font-family: var(--serif-display); font-size: 44px; color: var(--red); line-height: 1; height: 52px; }
.member .role { font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.member h3 { font-size: 26px; margin-bottom: 14px; }
.member p { font-size: 15px; color: var(--ink-2); }
.member blockquote { margin: auto 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-style: italic; font-size: 15px; }
@media (max-width: 980px) { .council { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .council { grid-template-columns: 1fr; } }

/* Method */
.method { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--card); }
.method > div { padding: 40px 40px 34px; }
.method .divider { width: 1px; background: var(--line); padding: 0; }
.method h3 { font-size: 40px; margin-bottom: 8px; }
.method .sub { font-family: var(--sans); font-size: 13px; color: var(--muted); letter-spacing: .06em; margin-bottom: 22px; }
.method ul { margin: 0; padding: 0; list-style: none; }
.method li { padding: 9px 0 9px 26px; position: relative; border-bottom: 1px dashed var(--line); font-size: 16px; }
.method li::before { position: absolute; left: 0; top: 9px; color: var(--red); font-family: var(--sans); font-weight: 700; }
.method .still li::before { content: "○"; }
.method .strike li::before { content: "／"; }
.method-foot { text-align: center; margin-top: 26px; font-family: var(--sans); font-size: 14px; color: var(--muted); }
@media (max-width: 820px) { .method { grid-template-columns: 1fr; } .method .divider { width: auto; height: 1px; } .method > div { padding: 30px 24px; } }

/* Rules */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tab { font-family: var(--sans); font-size: 14px; font-weight: 600; border: 1.5px solid var(--line); background: transparent; color: var(--ink-2); border-radius: 999px; padding: 9px 16px; cursor: pointer; }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.part-intro { font-size: 17px; color: var(--ink-2); max-width: 720px; margin-bottom: 22px; }
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; position: relative; transition: border-color .15s, transform .15s; }
.rule:hover { border-color: var(--red); transform: translateY(-2px); }
.rule .n { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .16em; color: var(--red); }
.rule h3 { font-size: 23px; margin: 8px 0 10px; }
.rule p { font-size: 15px; color: var(--ink-2); margin: 0; }
@media (max-width: 900px) { .rules { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .rules { grid-template-columns: 1fr; } }

/* Anatomy */
.anatomy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--ink); }
.anatomy div { padding: 22px 18px 24px 0; border-bottom: 1px solid var(--line); }
.anatomy b { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); margin-bottom: 6px; }
.anatomy span { font-size: 15px; color: var(--ink-2); }
@media (max-width: 820px) { .anatomy { grid-template-columns: 1fr 1fr; } }

/* Quote band */
.quote-band { background: var(--ink); color: var(--bone); padding: 110px 0; text-align: center; position: relative; overflow: hidden; }
.quote-band blockquote { margin: 0 auto; max-width: 900px; font-family: var(--serif-display); font-size: clamp(32px, 4.6vw, 58px); line-height: 1.1; }
.quote-band cite { display: block; margin-top: 26px; font-family: var(--sans); font-style: normal; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: color-mix(in srgb, var(--bone) 70%, transparent); }
.quote-band .enso-bg { position: absolute; left: 50%; top: 50%; width: 620px; transform: translate(-50%, -50%); opacity: .12; }
:root[data-theme="dark"] .quote-band, :root:not([data-theme="light"]) .quote-band { }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .quote-band { background: #0b0a08; color: #efe8dc; } }
:root[data-theme="dark"] .quote-band { background: #0b0a08; color: #efe8dc; }

/* Tools */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool { border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px; background: var(--card); display: flex; flex-direction: column; gap: 10px; text-decoration: none; transition: border-color .15s, transform .15s; }
.tool:hover { border-color: var(--red); transform: translateY(-2px); }
.tool .k { font-family: var(--sans); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); font-weight: 700; }
.tool h3 { font-size: 28px; }
.tool p { font-size: 15px; color: var(--ink-2); margin: 0; }
.tool .go { margin-top: auto; padding-top: 12px; font-family: var(--sans); font-weight: 600; font-size: 14px; }
@media (max-width: 900px) { .tools { grid-template-columns: 1fr; } }

/* Inside */
.inside { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 48px; }
.inside div { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.inside .num { font-family: var(--serif-display); font-size: 34px; color: var(--red); min-width: 64px; line-height: 1; }
.inside b { display: block; font-family: var(--sans); font-size: 15px; }
.inside span { font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px) { .inside { grid-template-columns: 1fr; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-family: var(--serif-display); font-size: 24px; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--red); font-size: 26px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 14px 0 0; color: var(--ink-2); max-width: 760px; }

/* Final CTA */
.final { text-align: center; padding: 120px 0; }
.final h2 { font-size: clamp(44px, 7vw, 84px); margin-bottom: 18px; }
.final .cta-row { justify-content: center; }

footer { border-top: 1px solid var(--line); padding: 40px 0 60px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
footer .wrap { display: grid; gap: 14px; }
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--ink-2); }

/* Reader page */
.reader { max-width: 680px; margin: 0 auto; padding: 56px 24px 100px; }
.reader h1 { font-size: clamp(40px, 6vw, 60px); text-align: center; margin: 80px 0 34px; }
.reader h1 .rn { display: block; font-family: var(--sans); font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--red); margin-bottom: 14px; }
.reader h1 .sep { display: none; }
.reader h2 { font-size: 32px; margin: 2em 0 .6em; }
.reader h3 { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.reader p { font-size: 18px; line-height: 1.8; }
.reader blockquote { margin: 1.6em 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); font-size: 17px; }
.reader blockquote p { font-size: 17px; }
.reader .attrib { display: block; font-family: var(--sans); font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.reader .attrib::before { content: "— "; }
.reader .epigraph { text-align: center; font-style: italic; margin: 0 auto 48px; max-width: 520px; color: var(--ink-2); }
.reader .epigraph p { font-size: 17px; }
.reader .fox, .reader .invert, .reader .drill, .reader .carry { background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 12px; padding: 24px 26px 10px; margin: 28px 0; }
.reader .fox p, .reader .invert li, .reader .drill p, .reader .carry li { font-size: 16px; }
.reader li { margin-bottom: .5em; }
.reader .end { text-align: center; margin-top: 70px; padding-top: 40px; border-top: 1px solid var(--line); }

/* Audit */
.audit { max-width: 820px; margin: 0 auto; padding: 56px 24px 100px; }
.audit h1 { font-size: clamp(44px, 7vw, 72px); margin: 14px 0 18px; }
.domain { margin-top: 44px; }
.domain h2 { font-size: 34px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.domain h2 .score { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 600; }
.q { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; font-family: var(--sans); font-size: 13px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 12px; color: var(--ink-2); }
.seg input:checked + span { background: var(--ink); color: var(--bone); }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: -2px; }
.result { margin-top: 48px; background: var(--card); border: 1px solid var(--line); border-top: 3px solid var(--red); border-radius: 14px; padding: 28px; }
.result h3 { font-size: 30px; margin-bottom: 14px; }
.bars { display: grid; gap: 12px; margin: 18px 0; }
.bar { display: grid; grid-template-columns: 110px 1fr 70px; gap: 12px; align-items: center; font-family: var(--sans); font-size: 14px; }
.bar .track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar .fill { height: 100%; width: 0; background: var(--red); border-radius: 99px; transition: width .4s ease; }
@media (max-width: 600px) { .q { grid-template-columns: 1fr; gap: 8px; } .bar { grid-template-columns: 80px 1fr 56px; } }
.card-print { margin-top: 64px; border: 2px dashed var(--line); border-radius: 16px; padding: 30px; }
.card-print ol { padding-left: 1.2em; }
.card-print li { margin-bottom: 8px; }
@media print {
  .nav, footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .cover { transform: none; } }
.nav-links a.btn-primary { color: var(--bone); }
.nav-links a.btn-primary:hover { color: #fff; }
.nav .btn-sm { white-space: nowrap; }
.bar .fill { transition: none; }
@media (max-width: 520px) {
  .hide-xs { display: none; }
  .brand { font-size: 17px; gap: 8px; }
  .nav-links { gap: 10px; }
  .nav .wrap { padding: 0 16px; }
  .wrap { padding: 0 16px; }
  section.band { padding: 72px 0; }
  .hero h1 { font-size: 54px; }
  .lede { font-size: 18px; }
}
