:root {
  --black: #0d0d0d;
  --white: #ffffff;
  --off: #f2f0eb;
  --orange: #f7931a;
  --orange-dark: #c96f00;
  --red: #e5383b;
  --muted: #5f5f5f;
  --line: #d9d6cf;
  --side: 280px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.6; color: var(--black); background: var(--off); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 { margin: 0 0 .5em; line-height: .95; letter-spacing: -0.04em; font-weight: 900; text-wrap: balance; }
h2 { font-size: clamp(2.4rem, 5vw, 4.4rem); text-transform: uppercase; }
h3 { font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1.1; }
p { margin: 0 0 1em; }

.notice { position: sticky; top: 0; z-index: 20; background: var(--orange); color: var(--black); font-family: var(--mono); font-size: .8rem; font-weight: 700; text-align: center; padding: 8px 16px; letter-spacing: .02em; }

.layout { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }

/* Sticky chapter index */
.side { position: sticky; top: 35px; align-self: start; height: calc(100vh - 35px); background: var(--black); color: var(--white); padding: 30px 26px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 900; font-size: 1.5rem; letter-spacing: -0.04em; }
.brand b { color: var(--orange); }
.side-tag { margin: 12px 0 30px; color: #9b9b9b; font-size: .92rem; }
.chapters { display: flex; flex-direction: column; border-top: 1px solid #2a2a2a; }
.chapters a { display: flex; align-items: baseline; gap: 14px; padding: 13px 0; border-bottom: 1px solid #2a2a2a; text-decoration: none; font-weight: 700; color: #d6d6d6; transition: color .15s, padding .15s; }
.chapters a i { font-style: normal; font-family: var(--mono); font-size: .78rem; color: var(--orange); }
.chapters a:hover { color: var(--white); padding-left: 6px; }
.chapters a.hot { color: #ff8d8f; }
.chapters a:focus-visible, input:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.content { min-width: 0; }

/* Poster opening */
.poster { padding: 90px 64px 80px; border-bottom: 6px solid var(--black); }
.poster-kicker { font-family: var(--mono); font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.4em; }
.poster h1 { font-size: clamp(3.4rem, 10vw, 9.5rem); text-transform: uppercase; }
.poster h1 span { color: var(--orange); }
.poster-lead { max-width: 30em; font-size: 1.2rem; margin-top: 1.4em; }

/* Chapters */
.chapter { display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 80px 64px; border-bottom: 2px solid var(--black); }
.ch-num { font-family: var(--mono); font-weight: 700; font-size: 2.6rem; line-height: 1; color: var(--orange); }
.ch-body { max-width: 900px; }
.big { font-size: clamp(1.4rem, 2.6vw, 2.1rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; max-width: 26em; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 10px; }
.cols p { color: #333; }

.chapter-dark { background: var(--black); color: var(--white); }
.chapter-dark .cols p { color: #cfcfcf; }
.chapter-orange { background: var(--orange); }
.chapter-orange .ch-num { color: var(--black); }
.chapter-orange .cols p { color: #1d1300; }
.chapter-alert { background: var(--white); border-left: 14px solid var(--red); }
.chapter-alert .ch-num { color: var(--red); }
.chapter-alert h2 { color: var(--red); }

.flow { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 2px solid var(--white); counter-reset: f; }
.flow li { padding: 20px 20px 22px 0; border-right: 1px solid #333; }
.flow li + li { padding-left: 20px; }
.flow li:last-child { border-right: 0; }
.flow b { display: block; font-size: 1.5rem; text-transform: uppercase; letter-spacing: -0.02em; margin-bottom: 6px; }
.flow b::before { counter-increment: f; content: counter(f, decimal-leading-zero) " "; font-family: var(--mono); font-size: .8rem; color: var(--orange); vertical-align: middle; }
.flow span { color: #cfcfcf; font-size: .95rem; }
.aside-line { margin-top: 26px; font-family: var(--mono); font-size: .9rem; color: var(--orange); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 2px solid var(--black); border-bottom: 2px solid var(--black); margin: 10px 0 28px; }
.facts div { padding: 22px 20px 20px 0; display: flex; flex-direction: column; }
.facts div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.facts b { font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -0.05em; }
.facts span { margin-top: 8px; font-size: .9rem; color: var(--muted); }

.sats { margin-top: 26px; background: var(--white); border: 2px solid var(--black); padding: 24px 26px; box-shadow: 8px 8px 0 var(--black); }
.sats p { color: var(--muted); }
.sats-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: end; }
.sats-row label { display: flex; flex-direction: column; gap: 6px; font-family: var(--mono); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.sats-row input { font-family: var(--mono); font-size: 1.3rem; font-weight: 700; padding: .55em .7em; border: 2px solid var(--black); background: var(--off); min-width: 0; width: 100%; }
.eq { font-size: 1.6rem; font-weight: 900; padding-bottom: 8px; }

.checker { margin-top: 28px; border: 2px solid var(--black); padding: 24px 26px; background: var(--off); }
.checker > p { color: var(--muted); }
.flags { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin: 6px 0 18px; }
.flags label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.flags input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.verdict { margin: 0; padding: 14px 16px; background: var(--white); border: 2px dashed var(--line); font-weight: 700; }
.verdict.is-bad { background: var(--red); border: 2px solid var(--red); color: var(--white); }

.words { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0; border-top: 2px solid var(--black); }
.words div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.words dt { font-weight: 900; font-size: 1.15rem; text-transform: uppercase; letter-spacing: -0.01em; }
.words dd { margin: 2px 0 0; color: var(--muted); }

.foot { padding: 40px 64px 50px; background: var(--black); color: #bdbdbd; font-size: .9rem; }
.foot b { color: var(--white); font-size: 1.1rem; } .foot b span { color: var(--orange); }
.foot .legal { color: #8a8a8a; font-size: .84rem; max-width: 60em; margin: 0; }

@media (max-width: 1100px) {
  .chapter { grid-template-columns: 1fr; gap: 8px; padding: 64px 40px; }
  .poster { padding: 70px 40px 60px; }
  .foot { padding: 36px 40px; }
  .flow { grid-template-columns: 1fr 1fr; }
  .flow li:nth-child(2) { border-right: 0; }
  .flow li:nth-child(3) { padding-left: 0; }
  .flow li:nth-child(n+3) { border-top: 1px solid #333; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: sticky; top: 35px; z-index: 10; height: auto; flex-direction: row; align-items: center; padding: 12px 16px; gap: 14px; }
  .side-tag { display: none; }
  .chapters { flex-direction: row; overflow-x: auto; border: 0; gap: 16px; margin-left: auto; scrollbar-width: none; }
  .chapters::-webkit-scrollbar { display: none; }
  .chapters a { border: 0; padding: 4px 0; white-space: nowrap; font-size: .85rem; }
  .chapters a:hover { padding-left: 0; }
  .brand { font-size: 1.2rem; flex: none; }
  .brand img { width: 34px; height: 34px; }
  html { scroll-padding-top: 100px; }
}
@media (max-width: 640px) {
  .chapters { display: none; }
  .poster { padding: 54px 16px 48px; }
  .chapter { padding: 52px 16px; }
  .chapter-alert { border-left-width: 8px; }
  .foot { padding: 30px 16px; }
  .cols, .flags, .words { grid-template-columns: 1fr; gap: 0 0; }
  .cols { gap: 0; }
  .flow { grid-template-columns: 1fr; }
  .flow li, .flow li + li { padding: 16px 0; border-right: 0; border-top: 1px solid #333; }
  .facts { grid-template-columns: 1fr; }
  .facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .sats, .checker { padding: 18px 16px; box-shadow: 5px 5px 0 var(--black); }
  .sats-row { grid-template-columns: 1fr; }
  .eq { display: none; }
  .notice { font-size: .72rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
