/* VerifiedCrude document dialect: shared by every long-form content page.
 *
 * WHY THIS FILE EXISTS
 * score.html, brief.html, audit.html and shadow-pilot.html each inline their own copy of the
 * same tokens, with the comment "tokens identical to /score" carrying the promise by hand.
 * That is the same failure vc-visit.js was created to end: four copies, no mechanism, and
 * nothing to stop the fifth from drifting. Content pages share this file instead.
 *
 * SCOPE
 * Reading pages: guides, case studies, glossary. The conversion pages (/score, /shadow-pilot)
 * keep their inlined tokens; they are forms, not documents, and rewriting them is not this
 * change. The token VALUES here are copied from shadow-pilot.html verbatim so the two dialects
 * cannot disagree about what amber is.
 *
 * The type is tuned for reading where the conversion pages are tuned for scanning: longer
 * measure, taller line-height, larger body size. Same voice, different room.
 */

:root{
  /* Ground + structure: verbatim from the command-center dialect */
  --bg:#0b1220;
  --surface:#111c2e;
  --surface2:#0e1727;
  --line:#1e2d47;
  --ink:#e9eef8;
  --soft:#8fa0bd;
  --faint:#5a6a87;
  --amber:#f2a81d;
  --teal:#57b6c9;
  --ok:#4fb286;
  --red:#d9645a;

  --disp:'Barlow Condensed',sans-serif;
  --mono:'IBM Plex Mono',monospace;
  --sans:'IBM Plex Sans',system-ui,sans-serif;

  /* Motion. Built-in CSS easings are too weak to read as intentional. */
  --ease-out:cubic-bezier(0.23,1,0.32,1);

  --measure:68ch;
  --wide:900px;
}

*{margin:0;box-sizing:border-box}

body{
  background:
    radial-gradient(1000px 560px at 82% -8%,rgba(242,168,29,.06),transparent 68%),
    radial-gradient(760px 460px at 6% 108%,rgba(87,182,201,.05),transparent 70%),
    var(--bg);
  background-attachment:fixed;
  color:var(--ink);
  font-family:var(--sans);
  font-size:17px;
  line-height:1.68;
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
}
::selection{background:var(--amber);color:var(--bg)}

a{color:var(--teal);text-underline-offset:3px;text-decoration-thickness:1px}
a:hover{color:var(--amber)}
:focus-visible{outline:2px solid var(--amber);outline-offset:3px}

/* ---------- chrome ---------- */
.bar{border-bottom:1px solid var(--line);padding:14px 0;position:relative;z-index:2}
.in{max-width:var(--wide);margin:0 auto;padding:0 24px}
.logo{display:flex;align-items:center;gap:9px;font-family:var(--disp);font-weight:700;font-size:20px;
  letter-spacing:.05em;text-transform:uppercase;color:inherit;text-decoration:none}
.logo:hover{color:var(--ink)}
.logo .sub{font-family:var(--mono);font-size:9px;letter-spacing:.2em;color:var(--faint)}

/* Breadcrumb doubles as the schema trail and the way back out of a deep page. */
.crumb{font-family:var(--mono);font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--soft);padding:18px 0 0}
.crumb a{color:var(--soft);text-decoration:none}
.crumb a:hover{color:var(--amber)}
.crumb span{margin:0 7px;opacity:.5}

/* ---------- headings ---------- */
.eyebrow{font-family:var(--mono);font-size:10px;letter-spacing:.2em;text-transform:uppercase;
  color:var(--amber);display:flex;align-items:center;gap:9px;margin-bottom:16px}
.eyebrow::before{content:"";width:15px;height:2px;background:var(--amber);flex:none}

h1{font-family:var(--disp);font-weight:700;font-size:clamp(38px,5.6vw,58px);line-height:1.04;
  text-transform:uppercase;letter-spacing:.005em;text-wrap:balance;max-width:19ch}
h2{font-family:var(--disp);font-weight:600;font-size:clamp(24px,3vw,30px);text-transform:uppercase;
  letter-spacing:.02em;margin:0 0 14px;text-wrap:balance}
h3{font-family:var(--sans);font-weight:600;font-size:18px;margin:26px 0 8px;color:var(--ink)}

.lede{color:var(--soft);font-size:20px;line-height:1.56;max-width:60ch;margin-top:18px}
.hero{padding:52px 0 32px}

section{padding:34px 0;border-top:1px solid var(--line)}
section > p, section > ul, section > ol{max-width:var(--measure);color:var(--soft)}
section > p + p{margin-top:14px}
p b, li b{color:var(--ink);font-weight:600}

ul,ol{padding-left:20px}
li{margin-bottom:9px}
li::marker{color:var(--faint)}

/* ---------- the answer block ----------
 * Answer engines quote the first self-contained paragraph that resolves the question in the
 * heading. Giving that paragraph a fixed place on every page is the whole AEO mechanism, 
 * the styling is just what makes it legible to the human who arrives after the citation. */
.answer{background:var(--surface);border:1px solid var(--line);border-top:2px solid var(--amber);
  padding:20px 22px;max-width:var(--measure);margin:0 0 8px}
.answer p{color:var(--ink);font-size:17px}
.answer p + p{margin-top:12px}
.answer .tag{font-family:var(--mono);font-size:9.5px;letter-spacing:.18em;text-transform:uppercase;
  color:var(--amber);display:block;margin-bottom:9px}

/* ---------- cards ---------- */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:12px;margin-top:8px}
.card{background:var(--surface);border:1px solid var(--line);padding:18px;
  transition:border-color 180ms var(--ease-out)}
.card h3{font-family:var(--mono);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--amber);margin:0 0 8px;font-weight:600}
.card p{color:var(--soft);font-size:14.5px;line-height:1.6}

/* A whole card that is a link. Hover only where a pointer really exists: touch devices fire
 * hover on tap and leave the state stuck on. */
a.card{display:block;text-decoration:none;color:inherit}
a.card .go{font-family:var(--mono);font-size:10px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--soft);margin-top:12px;display:inline-block;
  transition:color 180ms var(--ease-out),transform 180ms var(--ease-out)}
@media (hover:hover) and (pointer:fine){
  a.card:hover{border-color:var(--amber)}
  a.card:hover .go{color:var(--amber);transform:translateX(3px)}
}
a.card:active{transform:scale(.995)}

/* ---------- index entry ----------
 * A full-width row for a guide or case study. The first attempt reused .card, which left a
 * third of the row empty on desktop because the prose is capped at a readable measure and
 * nothing occupied the rest. Here the category and the read cue take that column, so the
 * width is used rather than merely spanned. */
.entries{display:grid;gap:12px}
.entry{display:grid;grid-template-columns:170px 1fr;gap:26px;background:var(--surface);
  border:1px solid var(--line);padding:24px 26px;text-decoration:none;color:inherit;
  transition:border-color 180ms var(--ease-out)}
.entry .meta{display:flex;flex-direction:column;justify-content:space-between;gap:14px}
.entry .kind{font-family:var(--mono);font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--amber);font-weight:600}
.entry .go{font-family:var(--mono);font-size:10px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--soft);transition:color 180ms var(--ease-out),transform 180ms var(--ease-out)}
.entry .t{font-family:var(--disp);font-size:clamp(23px,2.6vw,28px);text-transform:uppercase;
  line-height:1.08;color:var(--ink);margin:0 0 9px;font-weight:600;text-wrap:balance}
.entry p{color:var(--soft);font-size:15.5px;line-height:1.62;margin:0;max-width:60ch}
@media (hover:hover) and (pointer:fine){
  .entry:hover{border-color:var(--amber)}
  .entry:hover .go{color:var(--amber);transform:translateX(3px)}
}
.entry:active{transform:scale(.997)}
@media (max-width:700px){
  .entry{grid-template-columns:1fr;gap:12px;padding:20px}
  .entry .meta{flex-direction:row;justify-content:space-between;align-items:baseline;gap:10px}
}

/* ---------- numbers ---------- */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1px;
  background:var(--line);border:1px solid var(--line);margin:20px 0}
.stat{background:var(--surface);padding:16px 15px}
.stat .n{font-family:var(--mono);font-size:26px;font-weight:600;color:var(--amber);
  font-variant-numeric:tabular-nums;line-height:1.1}
.stat .l{font-family:var(--mono);font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--soft);margin-top:6px;line-height:1.45}

/* ---------- steps ---------- */
ol.steps{list-style:none;counter-reset:s;padding:0;max-width:var(--measure)}
ol.steps li{counter-increment:s;position:relative;padding:0 0 20px 46px;color:var(--soft)}
ol.steps li::before{content:counter(s);position:absolute;left:0;top:-1px;width:30px;height:30px;
  border:1px solid var(--line);display:grid;place-items:center;font-family:var(--mono);
  font-size:13px;color:var(--amber)}
ol.steps b{color:var(--ink);font-weight:600}

/* ---------- table ---------- */
.tw{overflow-x:auto;border:1px solid var(--line);margin:18px 0}
table{border-collapse:collapse;width:100%;min-width:540px;font-size:14.5px}
th,td{padding:11px 15px;text-align:left;border-bottom:1px solid var(--line);vertical-align:top}
thead th{font-family:var(--mono);font-size:9.5px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--soft);background:var(--surface2)}
tbody td{color:var(--soft)}
tbody th{font-weight:600;color:var(--ink);font-size:15px}
tbody tr:last-child td,tbody tr:last-child th{border-bottom:none}

/* ---------- callouts ---------- */
.note{background:var(--surface2);border:1px solid var(--line);padding:16px 18px;
  max-width:var(--measure);margin:18px 0;font-size:15px;color:var(--soft)}
.note b{color:var(--ink)}

blockquote{border-left:1px solid var(--amber);padding-left:20px;margin:20px 0;max-width:var(--measure)}
blockquote p{color:var(--ink);font-size:19px;line-height:1.55;font-style:italic}
blockquote cite{display:block;font-style:normal;font-family:var(--mono);font-size:10.5px;
  letter-spacing:.12em;text-transform:uppercase;color:var(--soft);margin-top:12px}

/* ---------- Q&A ---------- */
.qa{max-width:var(--measure);border-top:1px solid var(--line)}
.qa details{border-bottom:1px solid var(--line)}
.qa summary{padding:16px 0;cursor:pointer;font-weight:600;color:var(--ink);font-size:16.5px;
  list-style:none;display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.qa summary::-webkit-details-marker{display:none}
.qa summary::after{content:"+";font-family:var(--mono);color:var(--amber);font-size:19px;flex:none;
  line-height:1.2;transition:transform 180ms var(--ease-out)}
.qa details[open] summary::after{transform:rotate(45deg)}
.qa details p{color:var(--soft);padding:0 0 18px;font-size:16px}
.qa details p + p{padding-top:0;margin-top:-6px;padding-bottom:18px}

/* ---------- glossary ---------- */
.terms{display:grid;gap:1px;background:var(--line);border:1px solid var(--line)}
.term{background:var(--surface);padding:18px 20px;scroll-margin-top:20px}
.term dt{font-family:var(--disp);font-size:22px;font-weight:600;text-transform:uppercase;
  letter-spacing:.02em;color:var(--ink)}
.term .abbr{font-family:var(--mono);font-size:10px;letter-spacing:.14em;color:var(--amber);
  margin-left:9px;text-transform:uppercase}
.term dd{margin:7px 0 0;color:var(--soft);font-size:15.5px;max-width:var(--measure)}

/* ---------- CTA ---------- */
.cta{background:var(--surface2);border:1px solid var(--line);padding:26px;margin-top:10px;
  max-width:var(--measure)}
.cta h2{margin-bottom:10px}
.cta p{color:var(--soft);margin-bottom:18px}
.btn{display:inline-block;background:var(--amber);color:var(--bg);border:none;padding:13px 26px;
  font-size:16px;font-weight:600;font-family:var(--sans);cursor:pointer;border-radius:4px;
  text-decoration:none;transition:transform 160ms var(--ease-out),filter 160ms var(--ease-out)}
.btn:hover{color:var(--bg);filter:brightness(1.07)}
.btn:active{transform:scale(.97)}
.btn.ghost{background:transparent;color:var(--ink);border:1px solid var(--line)}
.btn.ghost:hover{border-color:var(--amber);color:var(--amber)}
.btns{display:flex;gap:10px;flex-wrap:wrap}

footer{border-top:1px solid var(--line);margin-top:46px;padding:22px 0 54px;font-family:var(--mono);
  font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:var(--faint);line-height:2}
footer a{color:var(--soft);text-decoration:none}
footer a:hover{color:var(--amber)}

/* ---------- entrance ----------
 * One staggered reveal on the hero, nothing below the fold. These pages are read once, not
 * operated hundreds of times a day, so a short entrance earns its place, but it stays under
 * 300ms per item and never gates interaction. */
/* Progressive enhancement, deliberately. An earlier version set opacity:0 in the base rule and
 * animated up to 1, which means the h1 and lede are invisible to anything that does not run the
 * animation. That is the page's most important text. The hidden state is therefore scoped inside
 * a no-preference query: the default state is visible, and motion is added only where it is both
 * supported and wanted. */
@media (prefers-reduced-motion:no-preference){
  .rise{opacity:0;transform:translateY(9px);animation:rise 420ms var(--ease-out) forwards}
  .rise:nth-child(2){animation-delay:60ms}
  .rise:nth-child(3){animation-delay:110ms}
  @keyframes rise{to{opacity:1;transform:translateY(0)}}
}

@media (prefers-reduced-motion:reduce){
  *{transition-duration:.01ms!important;animation-duration:.01ms!important}
}

@media (max-width:640px){
  body{font-size:16px}
  .hero{padding:34px 0 24px}
  .lede{font-size:18px}
  section{padding:26px 0}
  .in{padding:0 18px}
}

/* Print: a guide someone hands to their auditor should survive the printer. */
@media print{
  body{background:#fff;color:#000;font-size:11pt}
  .bar,footer,.cta,.crumb{display:none}
  a{color:#000;text-decoration:underline}
  .answer,.card,.note,.stat{border:1px solid #999;background:#fff}
  h1,h2,.stat .n,.eyebrow,.card h3{color:#000}
  .lede,section > p,.card p,td,dd{color:#222}
}
