/* ScopePack — inner-page design system: "the dossier"
   Confidential field-manual aesthetic. Shares the landing's paper + emerald +
   Clash Display / Hanken / IBM Plex Mono palette so the site reads as one brand,
   but uses its OWN structural vocabulary: margin §-numbers, hairline rules,
   classification stamps, dotted-leader registers, redaction bars, big tally
   numerals. Deliberately avoids generic card/grid/hero patterns and icon sets. */

:root {
  /* Palette matched to nextaiforge.com — white/stone, near-black ink, brass accent (no green, no pastels) */
  --paper: #ffffff;
  --paper-2: #f5f5f4;
  --paper-3: #ededec;
  --ink: #16191b;
  --ink-soft: #5d6160;
  --ink-faint: #8a8f8c;
  --line: #e6e4df;
  --line-soft: #efedea;
  --emerald: #9a6f1c;      /* brass — primary accent (rebranded away from green) */
  --emerald-deep: #7d5a16;
  --mint: #b5872e;         /* lighter brass for dots/tints */
  --terra: #b5503a;        /* muted brick for the cloud ✕ contrast */
  --cream: #f6f3ea;
  --slab: #16191b;         /* dark instrument panel */
  --slab-2: #1f2426;
  --slab-3: #272d2e;
  --slab-line: #39403f;
  --slab-mint: #d4a24a;    /* brass-gold glow on dark panels */
  --slab-text: #e7e5df;
  --slab-faint: #9aa09c;
  --display: "Bricolage Grotesque", "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --measure: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--paper-3); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

.shell { width: 100%; max-width: var(--measure); margin: 0 auto; padding-inline: 30px; }

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.bar.lit { border-color: var(--line); }
.bar-in { display: flex; align-items: center; justify-content: space-between; padding-block: 15px; max-width: var(--measure); margin: 0 auto; padding-inline: 30px; }
.sigil { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.sigil svg { width: 23px; height: 23px; display: block; }
.ways { display: flex; align-items: center; gap: 26px; }
.ways a:not(.act) { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.03em; color: var(--ink-soft); transition: color 0.2s; }
.ways a:not(.act):hover { color: var(--ink); }

/* ---------- Actions (buttons) ---------- */
.act {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 15px;
  padding: 13px 24px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.act--solid { background: var(--ink); color: var(--cream); }
.act--solid:hover { background: #000; transform: translateY(-2px); }
.act--line { border-color: var(--ink); color: var(--ink); }
.act--line:hover { transform: translateY(-2px); background: var(--ink); color: var(--cream); }
.act--mint { background: var(--emerald); color: #fff; }
.act--mint:hover { transform: translateY(-2px); background: var(--emerald-deep); }
.act--pill { padding: 10px 22px; background: var(--ink); color: var(--cream); }
.act--pill:hover { background: #000; }
.act--lg { padding: 16px 30px; font-size: 16.5px; }
.acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; align-items: center; }

/* ---------- Folio (page body with margin column) ---------- */
.folio { padding-block: clamp(40px, 6vw, 72px) clamp(60px, 9vw, 120px); }

/* ---------- Masthead ---------- */
.masthead { position: relative; padding-bottom: clamp(32px, 5vw, 56px); border-bottom: 2px solid var(--ink); }
.classline {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--emerald); display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
}
.classline::before { content: ""; width: 9px; height: 9px; background: var(--brass-lite, var(--mint)); border-radius: 50%; box-shadow: 0 0 0 0 rgba(154,111,28,0.5); animation: ping 2.6s infinite; }
@keyframes ping { 0%{box-shadow:0 0 0 0 rgba(154,111,28,0.5);} 70%{box-shadow:0 0 0 9px rgba(154,111,28,0);} 100%{box-shadow:0 0 0 0 rgba(154,111,28,0);} }
.masthead h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(40px, 6.4vw, 82px); line-height: 0.98; letter-spacing: -0.03em;
  margin-top: 26px; max-width: 16ch;
}
.masthead h1 em { font-style: italic; color: var(--emerald); }
.dek { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 60ch; margin-top: 24px; line-height: 1.55; }
.dek + .dek { margin-top: 14px; font-size: 16.5px; }

/* ---------- Classification stamp ---------- */
.stamp {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-weight: 600; font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--emerald); padding: 9px 15px;
  border: 2px solid var(--emerald); border-radius: 4px;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px color-mix(in srgb, var(--emerald) 40%, transparent);
  transform: rotate(-3.5deg);
  background: color-mix(in srgb, var(--emerald) 7%, var(--paper));
}
.stamp.float { position: absolute; top: 6px; right: 0; }
.stamp.terra { color: var(--terra); border-color: var(--terra); box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px color-mix(in srgb, var(--terra) 40%, transparent); background: color-mix(in srgb, var(--terra) 7%, var(--paper)); }
.stamp .dotmark { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Clause (section) ---------- */
.clause { position: relative; padding-top: clamp(48px, 7vw, 90px); }
.clause-no {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; color: var(--emerald);
  text-transform: uppercase; display: inline-block; margin-bottom: 18px;
}
.clause-no::after { content: ""; display: inline-block; width: 30px; height: 1px; background: var(--emerald); vertical-align: middle; margin-left: 12px; opacity: 0.5; }
.clause h2 { font-family: var(--display); font-weight: 600; font-size: clamp(28px, 4vw, 50px); line-height: 1.04; letter-spacing: -0.03em; max-width: 20ch; }
.clause h2 em { font-style: italic; color: var(--emerald); }
.clause > .dek { margin-top: 20px; }

.rule { height: 1px; background: var(--line); border: 0; width: 100%; }
.rule--ink { background: var(--ink); height: 2px; }

/* ---------- Tally (numbered protocol steps) ---------- */
.tally { margin-top: 44px; border-top: 1px solid var(--line); }
.tally-item { display: grid; grid-template-columns: clamp(72px, 9vw, 128px) 1fr; gap: clamp(18px, 3vw, 44px); padding: 30px 0; border-bottom: 1px solid var(--line); align-items: start; }
.tally-no { font-family: var(--display); font-weight: 600; font-size: clamp(40px, 5.5vw, 74px); line-height: 0.8; letter-spacing: -0.04em; color: var(--ink); -webkit-text-stroke: 0; }
.tally-item.key .tally-no { color: var(--emerald); }
.tally-body h3 { font-family: var(--display); font-weight: 600; font-size: clamp(20px, 2.2vw, 27px); letter-spacing: -0.02em; }
.tally-body p { color: var(--ink-soft); font-size: 16px; margin-top: 8px; max-width: 64ch; }
.tally-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--emerald); display: inline-block; margin-bottom: 8px; }

/* ---------- Ledger (dotted-leader register) ---------- */
.ledger { margin-top: 40px; }
.ledger-row { display: grid; grid-template-columns: minmax(0, auto) 1fr minmax(0, auto); align-items: baseline; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 1px solid var(--line); }
.ledger-term { font-family: var(--display); font-weight: 600; font-size: clamp(18px, 2vw, 23px); letter-spacing: -0.02em; }
.ledger-lead { border-bottom: 1.5px dotted var(--line); transform: translateY(-5px); }
.ledger-val { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; color: var(--emerald); text-transform: uppercase; white-space: nowrap; }
.ledger-val.no { color: var(--ink-faint); }
.ledger-note { grid-column: 1 / -1; color: var(--ink-soft); font-size: 15.5px; margin-top: 2px; max-width: 70ch; }

/* ---------- Marginalia / callouts ---------- */
.marginalia { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); letter-spacing: 0.01em; border-left: 2px solid var(--emerald); padding: 4px 0 4px 16px; margin-top: 26px; }
.callout { margin-top: 30px; padding: 24px 26px; border: 1px solid var(--line); border-left: 3px solid var(--emerald); background: color-mix(in srgb, var(--emerald) 5%, var(--paper)); }
.callout .label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--emerald); }
.callout p { margin-top: 8px; font-size: 16px; color: var(--ink-soft); }
.callout.warn { border-left-color: var(--terra); background: color-mix(in srgb, var(--terra) 5%, var(--paper)); }
.callout.warn .label { color: var(--terra); }
.callout.muted { border-left-color: var(--ink-faint); background: var(--paper-2); }
.callout.muted .label { color: var(--ink-soft); }

/* ---------- Redaction reveal ---------- */
.redact { position: relative; color: transparent; background: var(--ink); border-radius: 2px; padding: 0 5px; cursor: help; transition: background 0.35s var(--ease), color 0.35s var(--ease); white-space: nowrap; }
.redact:hover, .redact:focus { background: color-mix(in srgb, var(--emerald) 16%, var(--paper)); color: var(--emerald); }

/* ---------- Spread (two-column prose) ---------- */
.spread { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 44px; border-top: 1px solid var(--line); }
.spread > div { padding: 30px clamp(20px, 3vw, 40px); border-bottom: 1px solid var(--line); }
.spread > div:first-child { border-right: 1px solid var(--line); padding-left: 0; }
.spread > div:last-child { padding-right: 0; }
.spread h3 { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--emerald); margin-bottom: 18px; }
.spread.cloudlocal > div:first-child h3 { color: var(--terra); }
.spread ul { list-style: none; display: grid; gap: 14px; }
.spread li { font-size: 15.5px; color: var(--ink-soft); padding-left: 22px; position: relative; }
.spread li strong { color: var(--ink); }
.spread.marks li::before { content: "→"; position: absolute; left: 0; color: var(--emerald); font-family: var(--mono); }
.spread.cloudlocal > div:first-child li::before { content: "✕"; position: absolute; left: 0; color: var(--terra); font-weight: 700; }
.spread.cloudlocal > div:last-child li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }

/* ---------- Figure (dark instrument panel) ---------- */
.figure {
  margin-top: 40px;
  background: linear-gradient(180deg, var(--slab-2), var(--slab));
  border: 1px solid var(--slab-line); border-radius: 12px; overflow: hidden;
  font-family: var(--mono); color: var(--slab-text);
  box-shadow: 0 50px 90px -50px rgba(8,18,13,0.85);
}
.figure-bar { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--slab-line); font-size: 12px; }
.figure-bar .lhs { display: inline-flex; align-items: center; gap: 9px; color: var(--slab-mint); letter-spacing: 0.04em; }
.figure-bar .lhs i { width: 8px; height: 8px; border-radius: 50%; background: var(--slab-mint); box-shadow: 0 0 10px var(--slab-mint); animation: blink 2.2s infinite; display: inline-block; }
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
.figure-bar .rhs { color: var(--slab-mint); letter-spacing: 0.06em; }
.figure-screen { padding: 16px; display: grid; gap: 9px; }
.figrow { display: flex; align-items: center; gap: 11px; font-size: 12.5px; background: var(--slab-2); border: 1px solid var(--slab-line); border-radius: 8px; padding: 11px 12px; }
.figrow .ck { width: 17px; height: 17px; border-radius: 50%; background: rgba(212,162,74,0.16); color: var(--slab-mint); display: grid; place-items: center; font-size: 10px; flex: none; }
.figrow .meta { margin-left: auto; font-size: 10.5px; padding: 2px 8px; border-radius: 5px; border: 1px solid var(--slab-line); color: var(--slab-mint); }
.figrow .meta.flag { color: #f2c879; border-color: rgba(242,200,121,0.4); }
.figcap { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-top: 14px; letter-spacing: 0.02em; }

/* ---------- Pull quote / manifesto prose ---------- */
.prose { max-width: 68ch; }
.prose p { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink); line-height: 1.7; margin-top: 22px; }
.prose p:first-child { margin-top: 0; }
.prose .lead-cap::first-letter { font-family: var(--display); font-weight: 600; font-size: 3.4em; float: left; line-height: 0.78; margin: 6px 12px 0 0; color: var(--emerald); }
.pullquote { font-family: var(--display); font-weight: 500; font-size: clamp(26px, 3.4vw, 42px); line-height: 1.22; letter-spacing: -0.02em; margin: 48px 0; padding-left: 28px; border-left: 3px solid var(--emerald); }
.pullquote em { font-style: italic; color: var(--emerald); }
.signature { font-family: var(--mono); font-size: 13px; color: var(--ink-soft); margin-top: 40px; letter-spacing: 0.03em; }
.signature a { color: var(--emerald); }

/* ---------- Docket (mono fact strip) ---------- */
.docket { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 30px; font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); letter-spacing: 0.02em; }
.docket span { display: inline-flex; align-items: center; gap: 8px; }
.docket span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--mint); }

/* ---------- FAQ register ---------- */
.faqs { margin-top: 40px; }
.entry { border-top: 1px solid var(--line); }
.entry:last-child { border-bottom: 1px solid var(--line); }
.entry summary { cursor: pointer; list-style: none; padding: 22px 2px; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-family: var(--display); font-weight: 500; font-size: clamp(18px, 1.8vw, 21px); letter-spacing: -0.01em; }
.entry summary::-webkit-details-marker { display: none; }
.entry .pm { flex: none; font-family: var(--mono); font-size: 16px; color: var(--emerald); transition: transform 0.3s var(--ease); }
.entry[open] .pm { transform: rotate(45deg); }
.entry p { color: var(--ink-soft); font-size: 16px; padding: 0 2px 24px; max-width: 72ch; }
.entry .idx { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); margin-right: 4px; }

/* ---------- Pricing slips ---------- */
.slips { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 40px; border: 1px solid var(--ink); }
.slip { padding: 34px; border-right: 1px solid var(--line); }
.slip:last-child { border-right: 0; background: var(--slab); color: var(--slab-text); }
.slip .pn { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.slip:last-child .pn { color: var(--slab-mint); }
.slip .amt { font-family: var(--display); font-weight: 600; font-size: 50px; letter-spacing: -0.03em; margin: 12px 0 4px; }
.slip:last-child .amt { color: #fff; }
.slip .amt span { font-family: var(--body); font-size: 16px; color: var(--ink-faint); font-weight: 500; }
.slip:last-child .amt span { color: var(--slab-faint); }
.slip ul { list-style: none; margin: 22px 0 26px; display: grid; gap: 11px; }
.slip li { font-size: 14.5px; color: var(--ink-soft); padding-left: 22px; position: relative; }
.slip:last-child li { color: var(--slab-text); }
.slip li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 700; }
.slip:last-child li::before { color: var(--slab-mint); }
.slip .act { width: 100%; justify-content: center; }

/* ---------- Reveal motion ---------- */
/* On-load fade-up — pure CSS, no JS/scroll dependency, content always ends visible */
@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.rise { animation: riseIn 0.6s var(--ease) both; }
.rise[data-s="1"] { animation-delay: 0.07s; }
.rise[data-s="2"] { animation-delay: 0.14s; }
.rise[data-s="3"] { animation-delay: 0.21s; }
@media (prefers-reduced-motion: reduce) { .rise, .classline::before, .figure-bar .lhs i { animation: none; } }

/* ---------- Colophon (footer) ---------- */
.colophon { border-top: 2px solid var(--ink); padding-block: 40px; margin-top: clamp(60px, 9vw, 110px); background: var(--paper-2); }
.colophon-in { max-width: var(--measure); margin: 0 auto; padding-inline: 30px; }
.colophon-top { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.colophon .ways2 { display: flex; gap: 22px; flex-wrap: wrap; font-family: var(--mono); font-size: 12.5px; }
.colophon .ways2 a { color: var(--ink-soft); }
.colophon .ways2 a:hover { color: var(--ink); }
.fineprint { margin-top: 26px; font-size: 12.5px; color: var(--ink-faint); max-width: 84ch; line-height: 1.6; }
.imprint { margin-top: 16px; font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: 0.03em; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .ways a:not(.act) { display: none; }
  .spread, .slips { grid-template-columns: 1fr; }
  .spread > div:first-child { border-right: 0; padding-left: 0; }
  .spread > div { padding-inline: 0; }
  .slip { border-right: 0; border-bottom: 1px solid var(--line); }
  .stamp.float { position: static; display: inline-flex; margin-top: 20px; }
}
@media (max-width: 540px) {
  .shell { padding-inline: 22px; }
  .tally-item { grid-template-columns: 1fr; gap: 6px; }
  .tally-no { font-size: 44px; }
  .ledger-row { grid-template-columns: 1fr auto; }
  .ledger-lead { display: none; }
}
