/* Long-form white paper layout. Builds on ../styles.css tokens. */
.paper {
  --c1: #1d2f9e; --c2: #5a3f8f; --c3: #9a4a5c; --c4: #c9502f; --c5: #e2552f;
  --card: #0b0b0c;
}

/* Contents strip */
.toc {
  display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 40; background: #000;
}
.toc a {
  padding: 18px var(--gutter) 16px; font-family: var(--head); font-weight: 600; font-size: .78rem; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none; color: var(--muted); border-right: 1px solid var(--rule); line-height: 1.3;
}
.toc a:last-child { border-right: 0; }
.toc a span { display: block; color: var(--ink); margin-bottom: 2px; }
.toc a:hover { color: var(--ink); background: #0c0c0c; }
@media (max-width: 860px) { .toc { position: static; grid-template-columns: 1fr; } .toc a { border-right: 0; border-bottom: 1px solid var(--rule); padding: 12px 20px; } .toc a span { display: inline; margin-right: 10px; } }

/* Section scaffold */
.doc { padding: 110px var(--gutter) 90px; border-bottom: 1px solid var(--rule); scroll-margin-top: 60px; }
.doc-head { max-width: 50rem; margin-bottom: 56px; }
.part { font-family: var(--head); font-weight: 600; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.doc h2 { font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: clamp(2.2rem, 5vw, 4rem); line-height: 1; margin: 0 0 22px; }
.intro { font-size: 1.15rem; color: #d8d8d8; margin: 0; max-width: 44rem; }

.doc-body { max-width: 44rem; }
.prose-read { font-family: var(--read); font-size: 1.22rem; line-height: 1.7; color: #e3e3e3; }
.prose-read p { margin: 0 0 1.2em; }
.prose-read .first { font-size: 1.5rem; line-height: 1.5; color: var(--ink); }
.prose-read blockquote {
  margin: 2em 0 0; padding: 28px 0 0; border-top: 2px solid var(--c5);
  font-family: var(--head); font-weight: 600; text-transform: uppercase; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; color: var(--ink);
}

/* Model cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(21rem, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.model { background: var(--card); padding: 30px 28px 28px; display: flex; flex-direction: column; gap: 20px; }
.model header { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: baseline; }
.model .num { font-family: var(--head); font-weight: 700; font-size: .85rem; color: var(--muted); }
.model h3 { font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: 1.3rem; line-height: 1.1; letter-spacing: .01em; margin: 0; }
.model .stage { grid-column: 2; justify-self: start; font-family: var(--head); font-weight: 600; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; padding: 3px 9px; border-radius: 3px; color: #fff; }
.stage.s1 { background: var(--c1); } .stage.s2 { background: var(--c2); } .stage.s3 { background: var(--c3); } .stage.s4 { background: var(--c4); } .stage.s5 { background: var(--c5); color: #000; }
.pc { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pc h4 { font-family: var(--head); font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pc ul { list-style: none; margin: 0; padding: 0; font-size: .92rem; line-height: 1.45; color: #d6d6d6; }
.pc li { padding-left: 16px; position: relative; margin-bottom: 8px; }
.pc div:first-child li::before { content: "+"; position: absolute; left: 0; color: var(--ink); font-weight: 600; }
.pc div:last-child li::before { content: "–"; position: absolute; left: 0; color: var(--c5); font-weight: 600; }
.impl { margin: auto 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-family: var(--read); font-size: 1.05rem; line-height: 1.5; color: var(--ink); }
@media (max-width: 420px) { .pc { grid-template-columns: 1fr; } .cards { grid-template-columns: 1fr; } }

.takeaway {
  max-width: 50rem; margin: 56px 0 0; padding-left: 24px; border-left: 3px solid var(--c5);
  font-family: var(--read); font-size: 1.35rem; line-height: 1.5; color: var(--ink);
}

/* Maturity staircase */
.stairs { margin: 0 0 64px; position: relative; }
.stairs ol { list-style: none; margin: 0; padding: 0 0 0 40px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; align-items: end; height: 26rem; }
.st { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.st .block { filter: url(#rough); margin-bottom: 16px; }
.st.s1 .block { height: 18%; background: var(--c1); }
.st.s2 .block { height: 34%; background: var(--c2); }
.st.s3 .block { height: 50%; background: var(--c3); }
.st.s4 .block { height: 66%; background: var(--c4); }
.st.s5 .block { height: 82%; background: var(--c5); }
.st b { font-family: var(--head); font-size: 2rem; line-height: 1; }
.st strong { font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: .95rem; letter-spacing: .02em; margin-top: 6px; }
.st small { color: var(--muted); font-size: .85rem; }
.stairs .axis { position: absolute; left: 0; top: 0; bottom: 5.8rem; width: 24px; border-left: 1px solid var(--muted); }
.stairs .axis::before { content: ""; position: absolute; left: -6px; top: -2px; border: 6px solid transparent; border-bottom: 9px solid var(--muted); border-top: 0; }
.stairs .axis span { position: absolute; left: 12px; bottom: 0; transform-origin: 0 100%; transform: rotate(-90deg) translateY(100%); white-space: nowrap; font-family: var(--head); font-weight: 600; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stairs figcaption { margin-top: 22px; font-size: .85rem; color: var(--muted); font-style: italic; }
@media (max-width: 760px) {
  .stairs ol { height: 20rem; gap: 6px; padding-left: 30px; }
  .st b { font-size: 1.4rem; } .st strong { font-size: .7rem; } .st small { display: none; }
  .stairs .axis { bottom: 4.2rem; }
}

.stages { max-width: 52rem; }
.stage-row { display: grid; grid-template-columns: 18px 1fr; gap: 22px; padding: 26px 0; border-top: 1px solid var(--rule); }
.stage-row .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 8px; }
.dot.s1 { background: var(--c1); } .dot.s2 { background: var(--c2); } .dot.s3 { background: var(--c3); } .dot.s4 { background: var(--c4); } .dot.s5 { background: var(--c5); }
.stage-row h3 { font-family: var(--head); font-weight: 700; text-transform: uppercase; font-size: 1.25rem; margin: 0 0 8px; }
.stage-row h3 em { font-style: normal; font-weight: 500; text-transform: none; color: var(--muted); font-size: 1rem; margin-left: 8px; }
.stage-row p { margin: 0; color: #d6d6d6; }

/* Questions */
.questions { list-style: none; counter-reset: q; margin: 0; padding: 0; max-width: 58rem; }
.questions li {
  counter-increment: q; display: grid; grid-template-columns: 5rem 1fr; gap: 16px; align-items: baseline;
  padding: 26px 0; border-top: 1px solid var(--rule);
  font-family: var(--read); font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.35;
}
.questions li:last-child { border-bottom: 1px solid var(--rule); }
.questions li::before { content: counter(q, decimal-leading-zero); font-family: var(--head); font-weight: 700; font-size: 1rem; color: var(--c5); }
@media (max-width: 640px) { .questions li { grid-template-columns: 2.6rem 1fr; } }

.prose-read a { text-decoration-color: var(--c5); text-underline-offset: 4px; }

/* Author */
.author { display: grid; grid-template-columns: 15rem 1fr; gap: 44px; align-items: center; padding: 90px var(--gutter) 110px; max-width: 64rem; }
.author-photo { aspect-ratio: 4 / 5; background: #111; overflow: hidden; }
.author-photo img { width: 100%; height: 100%; object-fit: cover; }
.author-photo.empty { background: radial-gradient(circle at 50% 38%, #222 0 22%, transparent 23%), radial-gradient(ellipse at 50% 100%, #1b1b1b 0 45%, #0e0e0e 46%); }
.author p:not(.part) { color: #d6d6d6; margin: 0 0 28px; max-width: 40rem; }
.author-actions { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 700px) { .author { grid-template-columns: 1fr; } .author-photo { max-width: 14rem; } }

/* Print: the same page becomes the redesigned PDF */
@media print {
  @page { size: letter; margin: 0; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  html { font-size: 12px; }
  body { background: #000; font-size: 12px; }
  .panel.article-hero .comp-right { transform: translate(-330px, 40px) scale(1.1); }
  .panel.article-hero::after { background: linear-gradient(0deg, #000 0%, #000d 30%, #0000 60%); }
  .panel.article-hero h1 { font-size: 5.6rem; }
  .panel.article-hero .copy { max-width: 100%; }
  .panel.article-hero .lead { font-size: 1.5rem; max-width: 34rem; }
  .doc-head { margin-bottom: 32px; }
  .model { padding: 20px 20px 18px; gap: 14px; }
  .takeaway { margin-top: 28px; }
  .stairs ol { height: 22rem; }
  .questions li { padding: 16px 0; }
  .site-header, .toc, .site-footer, .author-actions { display: none !important; }
  .panel .art { animation: none; }
  .panel.article-hero { min-height: 11in; height: 11in; break-after: page; }
  .doc { padding: .6in .55in .4in; break-inside: auto; border-bottom: 0; }
  .conclusion { padding-bottom: .2in; }
  #models, #managed, #maturity, #choosing { break-before: page; }
  .model { break-inside: avoid; }
  .cards { grid-template-columns: 1fr 1fr; background: none; border: 0; gap: 10px; align-items: start; }
  .model { border: 1px solid var(--rule); }
  .pc ul { font-size: .88rem; }
  .impl { font-size: .98rem; }
  .stairs, .stage-row, .questions li { break-inside: avoid; }
  .author { padding: .6in; break-inside: avoid; }
}
