/* ============================================================
   Rethinking the University — companion site
   Theme derived from the book cover & figure series:
   warm paper, deep navy ink, Springer gold accent, rust italic.
   ============================================================ */

:root {
  --paper: #F2F7F4;
  --paper-2: #E4EFE8;
  --card: #FBFDFC;
  --ink: #0E3A33;
  --ink-deep: #07261F;
  --gold: #2E9E83;
  --orange: #67B7A4;
  --rust: #C2571A;
  --muted: #5C7A70;
  --border: #D6E5DC;
  --shadow: 0 2px 14px rgba(14, 58, 51, .08);
  --shadow-lift: 0 10px 30px rgba(14, 58, 51, .14);
  --serif: 'Lora', Cambria, Georgia, serif;
  --sans: 'Source Sans 3', 'Source Sans Pro', Calibri, 'Helvetica Neue', Arial, sans-serif;
  --maxw: 1120px;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); line-height: 1.18; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 .55em; }
h3 { font-size: 1.25rem; margin: 0 0 .45em; }
p  { margin: 0 0 1em; }
a  { color: var(--rust); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
code, pre { font-family: ui-monospace, Consolas, monospace; background: var(--paper-2); border-radius: 6px; }
code { padding: .1em .4em; font-size: .9em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--ink);
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 18px; min-height: 62px; flex-wrap: wrap;
}
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  color: var(--paper) !important; text-decoration: none !important;
  letter-spacing: .3px; white-space: nowrap; padding: 10px 0;
}
.brand .gold { color: var(--gold); }
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid rgba(248, 242, 230, .4); border-radius: 8px;
  color: var(--paper); font-size: 1.25rem; padding: 4px 12px; cursor: pointer;
}
nav.site-nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 2px; }
nav.site-nav a {
  color: rgba(248, 242, 230, .85); text-decoration: none;
  font-size: .82rem; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  padding: 8px 9px; border-radius: 6px;
}
nav.site-nav a:hover { color: var(--gold); background: rgba(255, 255, 255, .06); text-decoration: none; }
nav.site-nav a.active { color: var(--gold); border-bottom: 2px solid var(--gold); border-radius: 0; }

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  nav.site-nav {
    display: none; width: 100%; flex-direction: column; padding-bottom: 12px;
  }
  nav.site-nav.open { display: flex; }
  nav.site-nav a { padding: 10px 6px; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ---------- hero ---------- */
.hero { padding: 72px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }
.kicker {
  color: var(--rust); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: 2.5px; margin-bottom: 14px;
}
.hero .sub { font-size: 1.2rem; color: var(--muted); max-width: 56ch; }
.hero .authors { font-family: var(--serif); font-style: italic; font-size: 1.05rem; margin-top: 8px; }
.cover-frame { text-align: center; }
.cover-frame img {
  max-width: 320px; width: 100%;
  border-radius: 6px; box-shadow: var(--shadow-lift);
  border: 1px solid var(--border);
}
.cover-credit { font-size: .75rem; color: var(--muted); margin-top: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-weight: 700; font-size: .95rem; text-decoration: none !important;
  border: 2px solid transparent; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary { background: var(--ink); color: var(--paper) !important; }
.btn-gold { background: var(--gold); color: var(--ink) !important; }
.btn-outline { border-color: var(--ink); color: var(--ink) !important; background: transparent; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn-small { padding: 7px 14px; font-size: .82rem; border-radius: 6px; }

/* ---------- sections ---------- */
section.band { padding: 60px 0; }
section.band.alt { background: rgba(14, 58, 51, .035); }
section.band.dark { background: var(--ink); color: var(--paper); }
section.band.dark h2, section.band.dark h3 { color: var(--paper); }
section.band.dark p { color: rgba(248, 242, 230, .85); }
.section-kicker {
  color: var(--gold); font-weight: 700; font-size: .78rem;
  text-transform: uppercase; letter-spacing: 3px; margin-bottom: 8px;
}
.lede { font-size: 1.12rem; color: var(--muted); max-width: 66ch; }

/* ---------- story (home) ---------- */
.story-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center;
  padding: 44px 0; border-bottom: 1px dashed var(--border);
}
.story-row:last-child { border-bottom: none; }
.story-row.flip .story-fig { order: 2; }
@media (max-width: 860px) {
  .story-row, .story-row.flip { grid-template-columns: 1fr; }
  .story-row.flip .story-fig { order: 0; }
}
.story-fig img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.story-num {
  font-family: var(--serif); color: var(--gold); font-size: 2.4rem; font-weight: 700;
  line-height: 1; margin-bottom: 6px;
}

/* ---------- cards ---------- */
.grid { display: grid; gap: 22px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lift); }
.card .card-tagline { color: var(--muted); font-size: .95rem; }
.card-tag, .chip {
  display: inline-block; background: var(--paper-2); border: 1px solid var(--border);
  color: var(--muted); font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; border-radius: 999px; padding: 3px 11px; margin: 2px 4px 2px 0;
}
.chip-gold { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.chip-rust { background: var(--rust); color: #fff; border-color: var(--rust); }
.chip-navy { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- chapter blocks ---------- */
.part-head {
  margin: 56px 0 22px; padding-left: 16px; border-left: 6px solid var(--gold);
}
.part-head .roman { font-family: var(--serif); color: var(--rust); font-size: 1rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; }
.chapter-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 26px; overflow: hidden;
}
.chapter-card .ch-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0; }
@media (max-width: 860px) { .chapter-card .ch-grid { grid-template-columns: 1fr; } }
.chapter-card .ch-body { padding: 28px 30px; }
.chapter-card .ch-fig { background: var(--paper-2); display: flex; align-items: center; justify-content: center; padding: 18px; }
.chapter-card .ch-fig img { max-width: 320px; width: 100%; border-radius: 8px; }
.ch-num {
  font-family: var(--serif); font-size: .85rem; font-weight: 700; color: var(--rust);
  text-transform: uppercase; letter-spacing: 2px;
}
.ch-frameworks { margin: 10px 0 14px; }
.ch-links { margin-top: 14px; font-size: .9rem; }

/* ---------- filter toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 26px 0; }
.toolbar input[type="search"] {
  flex: 1 1 260px; padding: 11px 16px; font-size: 1rem; font-family: var(--sans);
  border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--ink);
}
.toolbar input[type="search"]:focus { outline: 2px solid var(--gold); }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row .tag {
  background: var(--card); border: 1px solid var(--border); color: var(--muted);
  border-radius: 999px; padding: 6px 16px; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.tag-row .tag:hover { border-color: var(--gold); color: var(--ink); }
.tag-row .tag.active { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.count-note { color: var(--muted); font-size: .85rem; margin-left: auto; }

/* ---------- tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.tbl th { background: var(--ink); color: var(--paper); text-align: left; padding: 12px 16px; font-size: .85rem; text-transform: uppercase; letter-spacing: 1px; }
table.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.tbl tr:last-child td { border-bottom: none; }

/* ---------- map / scan ---------- */
#map, .leaflet-map { height: 480px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--paper-2); }
.map-fallback { padding: 28px; background: var(--paper-2); border: 1px dashed var(--muted); border-radius: var(--radius); color: var(--muted); }
.scan-detail {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); padding: 28px; margin-top: 24px;
}
.dim-bar-row { display: grid; grid-template-columns: 220px 1fr 44px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .9rem; }
@media (max-width: 640px) { .dim-bar-row { grid-template-columns: 140px 1fr 38px; } }
.dim-bar-track { background: var(--paper-2); border-radius: 999px; height: 12px; overflow: hidden; border: 1px solid var(--border); }
.dim-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--gold), var(--orange)); }
.evidence-list { font-size: .9rem; }
.evidence-list li { margin-bottom: 8px; }
.badge-illustrative {
  display: inline-block; background: #E2F3EC; border: 1px solid var(--gold); color: #1d5c4c;
  font-size: .75rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .5px;
}

/* ---------- self-scan quiz ---------- */
.quiz-q { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 14px; }
.quiz-q .q-dim { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--rust); }
.quiz-scale { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.quiz-scale label {
  flex: 1 1 0; min-width: 56px; text-align: center; cursor: pointer;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 4px; font-size: .8rem; background: var(--paper);
}
.quiz-scale input { display: none; }
.quiz-scale label:has(input:checked) { background: var(--ink); color: var(--gold); border-color: var(--ink); font-weight: 700; }

/* ---------- chat (ask AI) ---------- */
.chat-shell { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-log { height: 420px; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 85%; padding: 12px 16px; border-radius: 14px; font-size: .95rem; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--paper); border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--paper-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg.sys { align-self: center; background: none; color: var(--muted); font-size: .8rem; font-style: italic; }
.chat-input-row { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); }
.chat-input-row textarea {
  flex: 1; resize: none; padding: 10px 14px; min-height: 52px;
  border: 1px solid var(--border); border-radius: 10px; font-family: var(--sans); font-size: .95rem; background: var(--paper);
}
.key-panel { background: var(--paper-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 22px; }
.key-panel input, .key-panel select {
  padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem;
  background: var(--card); font-family: var(--sans); color: var(--ink);
}
.prompt-card { position: relative; }
.prompt-card pre {
  background: var(--paper-2); padding: 14px 16px; border-radius: 8px; font-size: .82rem;
  white-space: pre-wrap; border: 1px solid var(--border);
}
.copy-btn {
  position: absolute; top: 18px; right: 18px;
  background: var(--ink); color: var(--gold); border: none; border-radius: 6px;
  font-size: .72rem; font-weight: 700; padding: 5px 12px; cursor: pointer;
}

/* ---------- downloads ---------- */
.dl-row { display: flex; gap: 18px; align-items: flex-start; }
.dl-icon {
  flex: 0 0 52px; height: 52px; border-radius: 12px; background: var(--ink);
  color: var(--gold); display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: .8rem; letter-spacing: 1px;
}
.dl-meta { font-size: .8rem; color: var(--muted); }

/* ---------- footer ---------- */
footer.site-footer {
  margin-top: 70px; background: var(--ink); color: rgba(248, 242, 230, .8);
  border-top: 4px solid var(--gold); padding: 44px 0 36px; font-size: .88rem;
}
footer.site-footer a { color: var(--gold); }
footer .foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
@media (max-width: 860px) { footer .foot-grid { grid-template-columns: 1fr; } }
footer h4 { color: var(--paper); margin: 0 0 10px; font-size: 1rem; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 6px; }
.disclaimer { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 30px; padding-top: 20px; font-size: .8rem; color: rgba(248, 242, 230, .6); }

/* ---------- misc ---------- */
.connect-strip {
  background: var(--paper-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 24px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 34px 0;
}
.connect-strip strong { font-family: var(--serif); }
.notice {
  background: #E2F3EC; border: 1px solid var(--gold); border-radius: 10px;
  padding: 14px 18px; font-size: .9rem; margin: 18px 0;
}
.fig-inline { text-align: center; margin: 28px 0; }
.fig-inline img { max-width: 560px; width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.fig-inline figcaption { font-size: .82rem; color: var(--muted); margin-top: 8px; font-style: italic; }
hr.sep { border: none; border-top: 1px dashed var(--border); margin: 44px 0; }
.num-badge {
  display: inline-flex; width: 38px; height: 38px; border-radius: 50%;
  background: var(--gold); color: var(--ink); font-family: var(--serif); font-weight: 700;
  align-items: center; justify-content: center; margin-right: 10px; flex: 0 0 38px;
}
.empty-note { color: var(--muted); font-style: italic; padding: 30px; text-align: center; }

@media print {
  .site-header, footer.site-footer, .no-print, .btn { display: none !important; }
  body { background: #fff; font-size: 12px; }
  .scan-detail, .card { box-shadow: none; border: 1px solid #ccc; }
}

/* ---------- language switcher (top right) ---------- */
.lang-switch { margin-left: 14px; display: flex; align-items: center; gap: 4px; color: rgba(248,242,230,.5); }
.lang-switch button {
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  color: rgba(248,242,230,.7); font-size: .82rem; font-weight: 700; letter-spacing: 1px;
}
.lang-switch button:hover { color: var(--gold); }
.lang-switch button.active { color: var(--gold); border-bottom: 2px solid var(--gold); }
@media (max-width: 980px) { .lang-switch { margin-left: auto; } nav.site-nav { margin-left: 0; } }

/* ============================================================
   Two-tier header: utility row (top, small sans) + primary row
   (below, larger serif). Overrides the earlier single-row nav.
   ============================================================ */
.site-header { position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,.25); border-bottom: none; background: none; }
.site-header .nav-row { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* --- tier 1: utility --- */
.nav-top { background: var(--ink-deep); }
.nav-top .nav-row { min-height: 44px; }
.nav-top .brand { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; color: var(--paper) !important; text-decoration: none !important; letter-spacing: .3px; white-space: nowrap; padding: 8px 0; }
.util-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.util-nav > a { color: rgba(248,242,230,.6); text-decoration: none; font-family: var(--sans); font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; padding: 6px 10px; border-radius: 5px; }
.util-nav > a:hover { color: var(--gold); background: rgba(255,255,255,.06); text-decoration: none; }
.util-nav > a.active { color: var(--gold); }
.lang-switch { margin-left: 10px; display: flex; align-items: center; gap: 2px; color: rgba(248,242,230,.35); border-left: 1px solid rgba(248,242,230,.2); padding-left: 12px; }
.lang-switch i { font-style: normal; }
.lang-switch button { background: none; border: none; cursor: pointer; padding: 4px 5px; color: rgba(248,242,230,.6); font-size: .76rem; font-weight: 700; letter-spacing: 1px; }
.lang-switch button:hover { color: var(--gold); }
.lang-switch button.active { color: var(--gold); border-bottom: 2px solid var(--gold); }

/* --- tier 2: primary --- */
.nav-main { background: var(--ink); border-bottom: 4px solid var(--gold); }
.nav-main .nav-row { min-height: 52px; }
nav.site-nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: 0; }
nav.site-nav a { font-family: var(--serif); font-size: 1.02rem; font-weight: 600; text-transform: none; letter-spacing: .2px; color: rgba(248,242,230,.88); text-decoration: none; padding: 12px 14px; border-radius: 0; border-bottom: 3px solid transparent; }
nav.site-nav a:hover { color: var(--gold); background: rgba(255,255,255,.06); text-decoration: none; }
nav.site-nav a.active { color: var(--gold); border-bottom: 3px solid var(--gold); background: rgba(255,255,255,.04); }

.nav-toggle { display: none; background: none; border: 1px solid rgba(248,242,230,.4); border-radius: 8px; color: var(--paper); font-size: 1.15rem; padding: 3px 11px; cursor: pointer; margin-left: 10px; }
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav-main { display: block; }
  nav.site-nav { display: none; width: 100%; flex-direction: column; padding: 8px 0 12px; }
  nav.site-nav.open { display: flex; }
  nav.site-nav a { border-bottom: 1px solid rgba(255,255,255,.08); padding: 11px 6px; }
  .util-nav > a { display: none; }            /* utility links fold into less chrome on mobile */
  nav.site-nav.open::after { content: ""; }
}

.site-nav .util-in-menu { display: none; }
@media (max-width: 980px) { nav.site-nav.open .util-in-menu { display: flex; flex-direction: column; border-top: 2px solid rgba(255,255,255,.18); margin-top: 6px; padding-top: 6px; } .site-nav .util-in-menu a { font-family: var(--sans); font-size: .82rem; text-transform: uppercase; letter-spacing: 1.2px; color: rgba(248,242,230,.65); } }

/* ---------- clickable stat tiles (home) ---------- */
.stat-tile { display: block; text-align: center; text-decoration: none !important; color: inherit; padding: 14px 8px; border-radius: var(--radius); transition: transform .12s ease, background .12s ease; }
a.stat-tile { cursor: pointer; }
a.stat-tile:hover { transform: translateY(-3px); background: rgba(255,255,255,.07); }
a.stat-tile:hover .story-num { text-decoration: underline; text-underline-offset: 6px; }
section.band.dark .stat-tile { color: var(--paper); }

/* ---------- brand with subtitle ---------- */
.nav-top .brand { display: flex; flex-direction: column; line-height: 1.25; padding: 7px 0; }
.brand-title { font-family: var(--serif); font-weight: 700; font-size: 1.02rem; letter-spacing: .3px; white-space: nowrap; }
.brand-sub { font-family: var(--sans); font-weight: 400; font-style: italic; font-size: .68rem; letter-spacing: .4px; color: var(--gold); opacity: .85; white-space: nowrap; }
@media (max-width: 640px) { .brand-sub { white-space: normal; max-width: 230px; } }

/* brand wrap fix: long titles/subtitles must not overflow the utility row */
.brand-title { white-space: normal; max-width: 420px; line-height: 1.15; }
.brand-sub { white-space: normal; max-width: 420px; line-height: 1.2; }
@media (max-width: 980px) { .brand-title, .brand-sub { max-width: 60vw; } }

/* subtitle: match cover typography (no italic) */
.brand-sub { font-style: normal; font-weight: 600; }

/* ---------- scan page: map-first layout + methodology visuals ---------- */
.scan-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 22px; align-items: start; margin-top: 26px; }
@media (max-width: 980px) { .scan-grid { grid-template-columns: 1fr; } }
.scan-map { height: 440px; }
.scan-side { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; max-height: 560px; overflow-y: auto; }
.scan-side h3 { margin-top: 6px; }
.side-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.overall-num { font-family: var(--serif); font-weight: 700; font-size: 2.3rem; color: var(--ink); line-height: 1; }
.overall-num span { font-size: 1rem; color: var(--muted); font-weight: 400; }
.org-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.org-chip { background: var(--card); border: 1px solid var(--border); color: var(--muted); border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 700; cursor: pointer; font-family: var(--sans); }
.org-chip:hover { border-color: var(--gold); color: var(--ink); }
.org-chip.active { background: var(--ink); border-color: var(--ink); color: var(--gold); }
.method-step { position: relative; padding-top: 30px; }
.step-num { position: absolute; top: -18px; left: 22px; width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); }
.method-steps { margin-top: 30px; }
.dim-card h3 { font-size: 1.05rem; }
.method-meta { margin-top: 26px; }
.method-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 860px) { .method-meta-grid { grid-template-columns: 1fr; } }

/* ---------- Beta badge + scan disclaimer (research-initiative) ---------- */
.beta-badge {
  display: inline-block; vertical-align: super; margin-left: 5px;
  background: var(--rust); color: #fff;
  font-family: var(--sans); font-size: .56rem; font-weight: 700;
  line-height: 1; letter-spacing: .6px; text-transform: uppercase;
  padding: 3px 6px; border-radius: 999px;
}
.site-nav .beta-badge, .util-nav .beta-badge { font-size: .5rem; padding: 2px 5px; margin-left: 4px; }
h2 .beta-badge, h1 .beta-badge { vertical-align: middle; font-size: .8rem; padding: 4px 9px; }
.scan-disclaimer {
  background: var(--card); border: 1px solid var(--gold); border-left: 4px solid var(--rust);
  border-radius: var(--radius); padding: 16px 20px; margin: 18px 0 6px;
  font-size: .86rem; line-height: 1.6; color: var(--ink);
}
.scan-disclaimer .disc-head { display: block; font-weight: 700; margin-bottom: 6px; color: var(--rust); letter-spacing: .3px; }
.scan-disclaimer strong { color: var(--rust); }
.scan-disclaimer a { color: var(--rust); }

/* ---------- consultant/practitioner kit code gate ---------- */
.kit-lock { background: var(--card); border: 1px dashed var(--gold); border-radius: var(--radius); padding: 26px 24px; text-align: center; max-width: 560px; margin: 6px auto 0; }
.kit-lock-icon { font-size: 1.8rem; line-height: 1; margin-bottom: 8px; }
.kit-lock-lede { font-size: .9rem; color: var(--ink); margin: 0 auto 16px; max-width: 470px; }
.kit-lock-form { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.kit-lock-form input { font-family: var(--sans); font-size: 1.05rem; letter-spacing: .32em; text-transform: uppercase; text-align: center; width: 190px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--paper); color: var(--ink); }
.kit-lock-msg { min-height: 1.2em; font-size: .85rem; margin: 10px 0 0; color: var(--muted); }
.kit-lock-err { color: var(--rust); }
.kit-lock-req { margin: 14px 0 0; font-size: .85rem; }
.kit-lock-req a { color: var(--rust); font-weight: 600; }
.kit-ok { color: #2e7d32; font-weight: 600; margin: 0 0 14px; }
.btn-locked { background: var(--paper-2); color: var(--muted); border: 1px solid var(--border); cursor: not-allowed; font-weight: 600; }

/* ---------- IST instrument v2 (scan + report) ---------- */
.dim-bar-fill.bar-empty { background: repeating-linear-gradient(45deg, var(--border), var(--border) 4px, transparent 4px, transparent 8px); }

.ist-mini { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }
.ist-mini-cell { flex: 1 1 92px; background: var(--paper-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; text-align: center; }
.ist-mini-num { font-family: var(--serif); font-size: 1.15rem; font-weight: 700; color: var(--ink); line-height: 1.1; }
.ist-mini-lbl { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 3px; }

.k-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
@media (max-width: 560px) { .k-strip { grid-template-columns: repeat(2, 1fr); } }
.k-cell { border: 1px solid var(--border); border-radius: 10px; padding: 10px 8px; text-align: center; background: var(--card); }
.k-cell-num { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--ink); }
.k-cell-lbl { font-size: .72rem; font-weight: 700; color: var(--ink); margin-top: 2px; }
.k-cell-gloss { font-size: .64rem; color: var(--muted); margin-top: 2px; line-height: 1.25; }
.k-k1 { background: rgba(46, 158, 131, .06); }
.k-k2 { background: rgba(46, 158, 131, .12); }
.k-k3 { background: rgba(194, 87, 26, .10); }
.k-k4 { background: rgba(194, 87, 26, .18); }

.badge-k, .badge-vis {
  display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 6px; border-radius: 5px; margin-left: 5px; white-space: nowrap; vertical-align: middle;
}
.badge-k { background: var(--paper-2); color: var(--ink); border: 1px solid var(--border); }
.badge-k3, .badge-k4 { background: rgba(194, 87, 26, .12); border-color: rgba(194, 87, 26, .3); color: var(--rust); }
.badge-vis { border: 1px solid var(--border); text-transform: lowercase; }
.badge-vis.vis-hi { background: rgba(46, 158, 131, .16); color: var(--ink); }
.badge-vis.vis-mid { background: var(--paper-2); color: var(--muted); }
.badge-vis.vis-lo { background: rgba(194, 87, 26, .10); color: var(--rust); border-color: rgba(194, 87, 26, .3); }

.ist-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 14px; }
.ist-filter input[type="search"] { flex: 1 1 240px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: .9rem; background: var(--card); color: var(--ink); }
.ist-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ist-only { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.ist-sub { font-size: .8rem; color: var(--muted); }
.ist-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; }
.ist-note { font-size: .82rem; color: var(--muted); font-style: italic; border-left: 3px solid var(--border); padding-left: 10px; margin: 10px 0; }

.ist-field { margin-bottom: 20px; }
.ist-field-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.ist-field-head h3 { margin: 0; }
.ist-prop { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.ist-prop-head { font-weight: 700; font-size: .95rem; color: var(--ink); margin-bottom: 6px; }
.ist-count { font-size: .7rem; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ist-ind { border: 1px solid var(--border); border-radius: 8px; margin: 6px 0; background: var(--paper); }
.ist-ind > summary { cursor: pointer; padding: 8px 12px; font-size: .9rem; list-style-position: inside; }
.ist-ind[open] > summary { border-bottom: 1px solid var(--border); }
.ist-ind-name { font-weight: 600; }
.ist-ind-body { padding: 10px 14px 14px; font-size: .88rem; }
.ist-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rust); font-weight: 700; margin: 12px 0 4px; }
.metric-list { margin: 4px 0 0; padding-left: 18px; font-size: .86rem; }
.metric-list li { margin-bottom: 4px; }
.ist-quote { margin: 4px 0; padding-left: 12px; border-left: 3px solid var(--gold); font-style: italic; font-size: .85rem; color: var(--muted); }

.ist-prop-det { margin: 8px 0; }
.ist-prop-det > summary { cursor: pointer; font-weight: 600; font-size: .9rem; padding: 6px 0; }
.ind-row { border-top: 1px solid var(--border); padding: 8px 0 8px 12px; }
.ind-row-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.ind-name { font-size: .88rem; }
.ind-score { font-weight: 700; font-size: .85rem; color: var(--ink); white-space: nowrap; }
.ind-row-missing { opacity: .62; }
.ind-row-missing .ind-score { color: var(--muted); font-weight: 500; font-style: italic; }
.ind-row-meta { margin-top: 3px; }

.agenda { margin: 22px 0; }
.agenda-card { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--rust); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.agenda-num { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--rust); line-height: 1; }
.agenda-card h4 { margin: 2px 0 6px; font-size: 1rem; }

.mode-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0 6px; }
.org-chip-v2 { border-color: var(--gold); }
.grid.cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 900px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .grid.cols-4 { grid-template-columns: 1fr; } }
@media print { .ist-ind, .ist-prop-det { break-inside: avoid; } }

/* ---------- About the scan ---------- */
.about-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 26px 0 30px; }
@media (max-width: 820px) { .about-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .about-stats { grid-template-columns: repeat(2, 1fr); } }
.about-stat { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 18px 14px; text-align: center; box-shadow: var(--shadow); }
.about-stat-n { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--gold); }
.about-stat-l { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 7px; opacity: .82; }

.prov-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; position: relative; }
@media (max-width: 900px) { .prov-flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .prov-flow { grid-template-columns: 1fr; } }
.prov-card { background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 18px 18px 16px; position: relative; }
.prov-card h3 { margin: 8px 0 6px; font-size: 1.02rem; }
.prov-n { position: absolute; top: -14px; left: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--ink-deep); font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.prov-card::after { content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 700; }
.prov-card:last-child::after { content: none; }
@media (max-width: 900px) { .prov-card::after { content: none; } }

svg.diagram { display: block; width: 100%; height: auto; max-width: 700px; margin: 22px auto; }

.about-table { width: 100%; border-collapse: collapse; margin: 16px 0 22px; font-size: .9rem; display: block; overflow-x: auto; }
.about-table thead th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); border-bottom: 2px solid var(--border); padding: 8px 10px; white-space: nowrap; }
.about-table td { border-bottom: 1px solid var(--border); padding: 10px; vertical-align: top; }
.about-table tbody tr:hover { background: var(--paper-2); }
.mono-none { color: var(--muted); }

.anat-card { padding: 0; overflow: hidden; }
.anat-head { background: var(--paper-2); padding: 20px 24px; border-bottom: 1px solid var(--border); }
.anat-head h3 { margin: 4px 0 4px; }
.anat-part { display: flex; gap: 16px; padding: 18px 24px; border-bottom: 1px solid var(--border); }
.anat-part:last-child { border-bottom: 0; }
.anat-num { flex: 0 0 28px; height: 28px; border-radius: 50%; border: 2px solid var(--gold); color: var(--ink); font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; }
.anat-body { flex: 1 1 auto; min-width: 0; }
.anat-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--rust); font-weight: 700; margin-bottom: 6px; }
.anat-why { font-size: .82rem; color: var(--muted); font-style: italic; border-left: 3px solid var(--border); padding-left: 10px; margin: 10px 0 0; }
.anat-badges { margin: 0 0 6px; }
.anat-badges .badge-k:first-child, .anat-badges .badge-vis:first-child { margin-left: 0; }

.rubric-scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0 26px; }
@media (max-width: 820px) { .rubric-scale { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .rubric-scale { grid-template-columns: 1fr; } }
.rubric-cell { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--card); }
.rubric-cell.rub-0 { background: rgba(194, 87, 26, .16); }
.rubric-cell.rub-1 { background: rgba(194, 87, 26, .08); }
.rubric-cell.rub-2 { background: var(--paper-2); }
.rubric-cell.rub-3 { background: rgba(46, 158, 131, .12); }
.rubric-cell.rub-4 { background: rgba(46, 158, 131, .22); }
.rubric-v { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; line-height: 1; color: var(--ink); }
.rubric-l { font-weight: 700; font-size: .88rem; margin: 5px 0 4px; }
.rubric-d { font-size: .8rem; color: var(--muted); }

.callout { background: var(--paper-2); border-left: 5px solid var(--rust); border-radius: var(--radius); padding: 22px 26px; margin: 26px 0; }
.callout h3 { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.vis-ladder { margin: 18px 0 8px; }
.vis-row { display: grid; grid-template-columns: 230px 1fr 46px; gap: 12px; align-items: center; margin-bottom: 9px; font-size: .88rem; }
@media (max-width: 640px) { .vis-row { grid-template-columns: 140px 1fr 38px; } }
.vis-bar { height: 12px; background: var(--paper-2); border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.vis-bar.mini { height: 8px; max-width: 90px; }
.vis-fill { height: 100%; background: var(--gold); }
.vis-count { text-align: right; font-weight: 700; }
.vis-total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .9rem; }

.rollup { margin: 22px 0 28px; max-width: 620px; }
.rollup-row { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; }
.rollup-n { flex: 0 0 58px; text-align: center; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--gold); }
.rollup-l { font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .74rem; color: var(--ink); }
.rollup-arrow { text-align: center; color: var(--muted); font-size: 1.2rem; line-height: 1; margin: 6px 0; padding-left: 22px; }

.formula-card code.formula { display: block; background: var(--paper-2); border: 1px solid var(--border); border-radius: 7px; padding: 8px 11px; margin: 8px 0 10px; font-size: .82rem; color: var(--ink); word-break: break-word; }

.k-spectrum-wrap { margin: 20px 0; }
.k-spectrum-head { display: flex; justify-content: space-between; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.k-spectrum { display: flex; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.k-seg { padding: 16px 10px; text-align: center; min-width: 0; }
.k-seg strong { display: block; font-size: .78rem; }
.k-seg span { font-size: .72rem; color: var(--muted); }
.k-spectrum-split { text-align: center; font-size: .76rem; color: var(--muted); margin-top: 8px; font-style: italic; }

.worked { margin: 20px 0; }
.worked-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.worked-head h3 { margin: 0; }
.worked-step { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 8px; font-size: .92rem; }
.worked-k { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .76rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }

.limit-card { border-top: 3px solid var(--rust); }
.chg { padding: 10px 0; border-bottom: 1px solid var(--border); }
.chg:last-child { border-bottom: 0; }
.chg-v { font-weight: 700; font-family: var(--serif); }

@media print { .about-stat { background: none; color: var(--ink); border: 1px solid var(--border); } .anat-part, .prov-card, .formula-card, .rubric-cell { break-inside: avoid; } }

/* small gaps: named grid cell + the "request inclusion" box distinguished from the beta box */
.vis-name { font-weight: 600; }
.scan-disclaimer.scan-request { border-left-color: var(--gold); background: rgba(46, 158, 131, .07); }
.scan-disclaimer.scan-request .disc-head { color: var(--ink); }

/* ---------- Indicator catalogue (About page) ---------- */
.cat-jump { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 26px; padding: 12px 14px; background: var(--paper-2); border-radius: var(--radius); }
.cat-jump .tag em { font-style: normal; opacity: .6; font-size: .78em; }
.cat-field { margin: 0 0 40px; padding-top: 8px; scroll-margin-top: 20px; }
.cat-field-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; justify-content: space-between; border-bottom: 3px solid var(--gold); padding-bottom: 8px; margin-bottom: 12px; }
.cat-field-head h3 { margin: 0; }
.cat-field-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.cat-quotes { margin: 12px 0 6px; }
.cat-prop { margin: 22px 0 0; }
.cat-prop-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; background: var(--paper-2); border-left: 4px solid var(--gold); padding: 9px 14px; border-radius: 0 8px 8px 0; }
.cat-prop-head h4 { margin: 0; font-size: 1rem; }
.cat-ind { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin: 12px 0 12px 14px; scroll-margin-top: 20px; }
@media (max-width: 640px) { .cat-ind { margin-left: 0; padding: 14px 15px; } }
.cat-ind-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.cat-ind-n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .76rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.cat-ind-head h5 { margin: 2px 0 5px; font-family: var(--serif); font-size: 1.02rem; }
.cat-ind-meta { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cat-ind-meta code { font-size: .72rem; background: var(--paper-2); padding: 2px 6px; border-radius: 4px; color: var(--muted); }
.cat-row { display: grid; grid-template-columns: 158px 1fr; gap: 16px; padding: 9px 0; border-top: 1px solid var(--border); }
@media (max-width: 700px) { .cat-row { grid-template-columns: 1fr; gap: 3px; } }
.cat-row-l { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: var(--rust); font-weight: 700; padding-top: 2px; }
.cat-row-b { font-size: .89rem; min-width: 0; }
.cat-row-b p { margin: 0 0 6px; }
.cat-row-b p:last-child { margin-bottom: 0; }

/* ---------- Verifiable audit (About page) ---------- */
.audit-card { padding: 24px 26px; }
.legend { display: grid; grid-template-columns: max-content 1fr; gap: 7px 12px; align-items: center; margin: 8px 0 22px; font-size: .85rem; }
.deriv { display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.deriv-tri { background: rgba(46, 158, 131, .22); color: var(--ink-deep); }
.deriv-single { background: var(--paper-2); color: var(--muted); border: 1px solid var(--border); }
.deriv-approx { background: rgba(194, 87, 26, .14); color: var(--rust); border: 1px solid rgba(194, 87, 26, .3); }
.deriv-unscored { background: transparent; color: var(--muted); border: 1px dashed var(--border); }
.deriv-none { background: rgba(194, 87, 26, .22); color: var(--rust); }
.about-table tr.tr-total td { border-top: 2px solid var(--ink); background: var(--paper-2); }

.arith-field { margin: 14px 0 20px; }
.arith-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--border); padding-bottom: 5px; }
.arith-out { font-family: var(--serif); font-weight: 700; color: var(--gold); }
.arith-field .about-table { margin: 8px 0 0; }
.arith-final { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 14px 20px; margin: 18px 0; font-size: .95rem; }
.arith-final strong { font-family: var(--serif); font-size: 1.5rem; color: var(--gold); }

.audit-field { margin: 26px 0 0; }
.audit-field h4 { border-bottom: 2px solid var(--gold); padding-bottom: 5px; }
.audit-prop { margin: 16px 0 0; }
.audit-prop-head { font-weight: 700; font-size: .9rem; background: var(--paper-2); padding: 7px 12px; border-radius: 7px; }
.audit-ind { border-left: 3px solid var(--gold); padding: 12px 0 12px 14px; margin: 10px 0 10px 8px; }
.audit-ind.audit-unscored { border-left-style: dashed; border-left-color: var(--border); }
.audit-ind-head { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.audit-ind-name { font-weight: 600; font-size: .92rem; }
.audit-ind-name code { font-size: .7rem; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; color: var(--muted); }
.audit-ind-score { white-space: nowrap; font-size: .9rem; }
.audit-ind-score strong { font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.audit-badges { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0 0; }
.audit-badges .badge-k, .audit-badges .badge-vis { margin-left: 0; }
.audit-block { margin-top: 9px; }
.audit-block .ist-h { margin: 8px 0 3px; }

@media print { .cat-ind, .audit-ind, .arith-field, .cat-prop { break-inside: avoid; } .cat-jump { display: none; } }

/* ---------- Signal archive ---------- */
.archive-card { margin: 18px 0; }
.archive-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.archive-head h3 { margin: 0; }
.archive-table td { font-size: .85rem; }
.archive-table code { font-size: .72rem; background: var(--paper-2); padding: 1px 5px; border-radius: 4px; color: var(--muted); }
.archive-quote { margin: 7px 0 0; font-size: .82rem; }
.src-type { display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 5px; white-space: nowrap; }
.src-type.src-indep { background: rgba(46, 158, 131, .22); color: var(--ink-deep); }
.src-type.src-self { background: var(--paper-2); color: var(--muted); border: 1px solid var(--border); }
.src-type.src-other { background: rgba(194, 87, 26, .12); color: var(--rust); }
.archive-layout pre { background: var(--ink); color: #DCEDE6; border-radius: var(--radius); padding: 18px 20px; overflow-x: auto; font-size: .78rem; line-height: 1.65; margin: 18px 0; }
@media print { .archive-card, .archive-layout { break-inside: avoid; } }
