/* ================================================================
   Carabase — shared stylesheet (manifesto + whitepaper pages)
   Homepage paper design system: cream paper, Helvetica Neue,
   moss/ember/blue accents, mono details, soft shadows.
   Legacy token names are kept as aliases so page-level styles
   (e.g. compare.html) keep working with zero markup changes.
   ================================================================ */
:root {
  --paper: #f4f0e7;
  --paper-2: #fbf8f2;
  --panel: #e8e2d7;
  --ink-core: #1b1a17;
  --rule: #c8c0b3;

  /* Legacy names, remapped to the paper palette */
  --bg: var(--paper);
  --bg-2: var(--paper-2);
  --surface: var(--paper-2);
  --surface-2: var(--paper);
  --surface-3: var(--panel);

  --cream: var(--panel);
  --ink: var(--ink-core);

  --fg: #1b1a17;
  --fg-2: #3f3b34;
  --muted: #68635b;
  --muted-2: #8e887e;

  --hairline: rgba(200, 192, 179, 0.55);
  --hairline-2: #c8c0b3;

  /* "ember" was the primary accent slot — remapped to homepage blue */
  --blue: #376fa8;
  --blue-light: #dce7f0;
  --ember: var(--blue);
  --ember-ink: var(--blue);
  --ember-dim: #5b8cbd;
  --ember-soft: rgba(55, 111, 168, 0.10);
  --ember-glow: rgba(55, 111, 168, 0.22);

  /* "moss" is the homepage moss green */
  --moss: #4f684e;
  --moss-dark: #27382a;
  --moss-light: #dde6da;
  --moss-dim: #40503e;
  --moss-bright: #4f684e;
  --moss-soft: rgba(79, 104, 78, 0.12);
  --moss-glow: rgba(79, 104, 78, 0.22);

  --ember-true: #bc5e35;
  --ember-true-light: #f0ded4;
  --destructive: #bc5e35;

  --f-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono: "SFMono-Regular", Menlo, Monaco, Consolas, monospace;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 999px;

  --shadow-sm: 0 10px 30px rgba(45, 41, 34, 0.08);
  --shadow: 0 28px 80px rgba(45, 41, 34, 0.10);
  --shadow-lg: 0 34px 90px rgba(45, 41, 34, 0.14);

  --reading-max: 44rem;
  --content-max: 76rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: normal;
  color: var(--fg);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* Soft moss wash — matches the homepage body background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 88% 3%, rgba(79, 104, 78, 0.10), transparent 28rem);
}

#app { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--moss); color: var(--paper-2); }

img, svg { display: block; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.reading {
  max-width: var(--reading-max);
  margin: 0 auto;
}

/* ================================================================
   Navigation — homepage nav language
   ================================================================ */
nav.site {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 240, 231, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(200, 192, 179, 0.7);
}

nav.site.scrolled { border-bottom-color: var(--rule); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
  padding: 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
}

.nav-brand .wordmark {
  width: 172px;
  height: auto;
}

.nav-brand .sigil {
  width: 24px;
  height: 24px;
  display: block;
  object-fit: cover;
}

.nav-brand span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.7rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--fg); }
.nav-links a.active { color: var(--fg); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  min-height: 50px;
  padding: 0.82rem 1.25rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--fg);
  font-family: var(--f-sans);
  font-weight: 650;
  font-size: 0.92rem;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--r-pill);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(27, 26, 23, 0.16);
  color: var(--fg);
}

.btn-primary {
  background: var(--ink-core);
  color: var(--paper-2);
  border-color: var(--ink-core);
  font-weight: 650;
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: var(--paper-2);
  background: var(--ink-core);
  box-shadow: 0 12px 32px rgba(27, 26, 23, 0.16);
}

.nav-links a.btn-primary {
  color: var(--paper-2);
  padding: 9px 16px;
}

.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid rgba(55, 111, 168, 0.28);
  outline-offset: 3px;
}

/* ================================================================
   Part header (manifesto essays)
   ================================================================ */
.part-header {
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(2rem, 5vh, 3.5rem);
}

.part-header .reading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.4rem;
}

.part-eyebrow {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.part-eyebrow::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 5px var(--moss-soft);
}

.part-title {
  font-weight: 600;
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  color: var(--fg);
}

.part-subtitle {
  font-style: normal;
  font-size: clamp(1.08rem, 1.65vw, 1.32rem);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--muted);
}

.part-meta {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding-top: 1.1rem;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.part-meta > * {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-pill);
  padding: 0.48rem 0.65rem;
}

/* ================================================================
   Reading article
   ================================================================ */
.article {
  padding: clamp(2.5rem, 6vh, 4rem) 0 clamp(4rem, 10vh, 6rem);
}

.article .reading > * + * { margin-top: 1.25rem; }

.article p {
  font-size: clamp(1.02rem, 1.2vw, 1.15rem);
  line-height: 1.72;
  color: var(--fg-2);
}

.article h2 {
  font-weight: 600;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--fg);
  margin-top: 3rem !important;
  padding-top: 1.6rem;
  border-top: 1px solid var(--rule);
}

.article h3 {
  font-weight: 600;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-top: 2.25rem !important;
}

.article h3 .num {
  font-family: var(--f-mono);
  font-size: 0.62em;
  font-weight: 700;
  color: var(--blue);
  margin-right: 0.75em;
  letter-spacing: 0.06em;
}

.article ul,
.article ol {
  font-size: clamp(1.02rem, 1.2vw, 1.15rem);
  line-height: 1.68;
  color: var(--fg-2);
  padding-left: 1.5rem;
}

.article li + li { margin-top: 0.5rem; }

.article li strong {
  font-weight: 600;
  font-size: 1em;
  color: var(--fg);
}

.article em { font-style: italic; }

.article strong {
  font-weight: 600;
  color: var(--fg);
}

.article hr {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 2.5rem 0 !important;
}

.article blockquote {
  border-left: 3px solid var(--moss);
  background: var(--paper-2);
  border-radius: var(--r);
  border-top: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 1rem 1.4rem;
  font-style: normal;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--fg-2);
  margin-top: 1.5rem;
}

.article code {
  font-family: var(--f-mono);
  font-size: 0.84em;
  background: var(--panel);
  padding: 0.1em 0.45em;
  border-radius: 6px;
  color: var(--fg);
}

/* Drop cap on first paragraph */
.article .reading > p:first-of-type::first-letter {
  font-weight: 600;
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 0.06em 0.12em 0 0;
  color: var(--moss);
}

/* ================================================================
   Pager
   ================================================================ */
.pager {
  padding: clamp(3rem, 8vh, 5rem) 0;
}

.pager-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.pager-link {
  padding: 1.6rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: transform 0.18s ease, box-shadow 0.22s ease;
  min-height: 140px;
}

.pager-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.pager-link .dir {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.pager-link .title {
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--fg);
}

.pager-link .desc {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.55;
}

.pager-link.next { text-align: right; align-items: flex-end; }
.pager-link.disabled { opacity: 0.4; pointer-events: none; }

@media (max-width: 720px) {
  .pager-grid { grid-template-columns: 1fr; }
  .pager-link.next { text-align: left; align-items: flex-start; }
}

/* ================================================================
   CTA strip — homepage open-panel language
   ================================================================ */
.cta-strip {
  padding: clamp(3rem, 7vh, 4.5rem) 0;
}

.cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--moss-light);
  color: var(--fg);
  border: 1px solid var(--moss);
  border-radius: calc(var(--r-xl) + 8px);
  padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.75rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.cta-inner::after {
  content: "{ }";
  position: absolute;
  right: -1rem;
  bottom: -3.5rem;
  color: rgba(79, 104, 78, 0.08);
  font: 700 11rem/1 var(--f-mono);
  pointer-events: none;
}
.cta-inner > * { position: relative; z-index: 1; }

.cta-text {
  font-weight: 600;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -0.035em;
  color: var(--fg);
  max-width: 44ch;
}
.cta-inner .btn {
  background: transparent;
  border-color: rgba(79, 104, 78, 0.45);
  color: var(--fg);
}
.cta-inner .btn-primary {
  background: var(--ink-core);
  color: var(--paper-2);
  border-color: var(--ink-core);
}

/* ================================================================
   Footer — homepage footer language
   ================================================================ */
footer {
  margin-top: 2rem;
  padding: 2.3rem 0;
  background: var(--ink-core);
  color: var(--paper-2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #8f918b;
}

.footer-left .wordmark {
  width: 145px;
  height: auto;
  filter: invert(1);
  opacity: 0.9;
}

.footer-left .sigil {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: cover;
  filter: invert(1);
  opacity: 0.9;
}

.footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.15rem;
}

.footer-right a {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: #b9bbb2;
  transition: color 0.15s;
}

.footer-right a:hover { color: white; }

/* ================================================================
   Manifesto index page
   ================================================================ */
.index-hero {
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(3rem, 6vh, 4rem);
}

.index-grid {
  padding: clamp(2rem, 6vh, 4rem) 0 clamp(3rem, 8vh, 5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.index-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) {
  .index-grid.four { grid-template-columns: repeat(2, 1fr); }
}

.index-card {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.18s ease, box-shadow 0.22s ease;
  min-height: 250px;
}

.index-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.index-card .part {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}

.index-card .title {
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--fg);
}

.index-card .desc {
  font-size: 0.84rem;
  line-height: 1.62;
  color: var(--muted);
  flex: 1;
}

.index-card .cta {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 650;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
}

.index-card:hover .cta { color: var(--moss); }

@media (max-width: 820px) {
  .index-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   Mobile nav
   ================================================================ */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--fg);
  padding: 0.7rem;
  cursor: pointer;
  font-family: var(--f-sans);
  font-size: 0.9rem;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 16px;
    right: 16px;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    padding: 1rem;
    gap: 0.25rem;
    align-items: stretch;
  }
  .nav-links.open a { font-size: 0.95rem; padding: 0.7rem; }
  .nav-links.open a.btn-primary { margin-top: 0.3rem; text-align: center; justify-content: center; display: inline-flex; }
}

/* ================================================================
   Whitepaper components (shared by /connectors, /cli, /architecture)
   ================================================================ */
.doc-meta {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-2);
}
.doc-meta-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-meta-cell .lbl { color: var(--muted-2); display: block; margin-bottom: 0.2rem; }
.doc-meta-cell .val { color: var(--fg); }
.doc-meta-cell.right { text-align: right; }
@media (max-width: 720px) {
  .doc-meta-inner { grid-template-columns: 1fr 1fr; row-gap: 0.85rem; }
  .doc-meta-cell.right { text-align: left; }
}

.sec-rule {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.25rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.5rem;
}
.sec-rule .sec-num {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
}
.sec-rule .sec-name {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.sec-rule .sec-pg {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}
@media (max-width: 540px) {
  .sec-rule { grid-template-columns: auto 1fr; }
  .sec-rule .sec-pg { display: none; }
}

.paper {
  padding: clamp(3rem, 7vh, 5rem) 0;
}
.paper:last-of-type { border-bottom: none; }

.paper h2 {
  font-weight: 600;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.0;
  letter-spacing: -0.05em;
  color: var(--fg);
  margin-bottom: 1.25rem;
  max-width: 24ch;
}
.paper h2 .sec-pref {
  font-family: var(--f-mono);
  font-size: 0.34em;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--blue);
  vertical-align: 0.6em;
  margin-right: 0.7em;
}
.paper-lede {
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.08rem, 1.55vw, 1.32rem);
  line-height: 1.5;
  letter-spacing: normal;
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 2rem;
}
.paper-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 62ch;
}
.paper-body + .paper-body { margin-top: 1rem; }
.paper-body strong { color: var(--fg); font-weight: 600; }
.paper-body code {
  font-family: var(--f-mono);
  font-size: 0.84em;
  background: var(--panel);
  padding: 0.1em 0.45em;
  border-radius: 6px;
  color: var(--fg);
}

/* Pre / code block — ink terminal, echoes the homepage dark sections */
.codeblock {
  font-family: var(--f-mono);
  font-size: 12.5px;
  line-height: 1.7;
  background: var(--ink-core);
  border: 1px solid rgba(27, 26, 23, 0.9);
  border-radius: var(--r);
  padding: 1.1rem 1.3rem;
  white-space: pre;
  overflow-x: auto;
  color: rgba(251, 248, 242, 0.85);
  box-shadow: var(--shadow-sm);
  margin: 1.4rem 0;
}
.codeblock .cmt { color: rgba(251, 248, 242, 0.42); }
.codeblock .cmd { color: #a9c2a5; }

/* Connectors table */
.matrix {
  margin-top: 1.5rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-xl);
  padding: 0.5rem 1.4rem 1.4rem;
}
.matrix-group {
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0 0.5rem;
}
.matrix-group:last-child { border-bottom: none; }
.matrix-group-head {
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 1rem;
}
.matrix-row {
  display: grid;
  grid-template-columns: 1.4fr 2fr 0.6fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.matrix-row:last-child { border-bottom: none; }
.matrix-row .name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--fg);
  line-height: 1.3;
}
.matrix-row .shape {
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}
.matrix-row .tier {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 650;
  color: var(--moss);
  letter-spacing: 0.02em;
  text-align: right;
}
@media (max-width: 720px) {
  .matrix-row { grid-template-columns: 1fr; row-gap: 0.25rem; }
  .matrix-row .tier { text-align: left; }
}

.figure {
  margin-top: 2rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--rule);
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.figure .figure-num { color: var(--blue); margin-right: 0.6rem; }

/* Exhibit — homepage side-note language (ember card) */
.exhibit {
  background: var(--ember-true-light);
  border: 1px solid var(--ember-true);
  border-left-width: 3px;
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.5rem;
}
.exhibit .exhibit-tag {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ember-true);
}
.exhibit .exhibit-body {
  font-weight: 600;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem);
  line-height: 1.3;
  letter-spacing: -0.025em;
  color: var(--fg);
}
@media (max-width: 540px) {
  .exhibit { grid-template-columns: 1fr; gap: 0.6rem; }
}

.colophon {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0;
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  text-transform: uppercase;
}
.colophon-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}
.colophon span strong { color: var(--fg); margin-left: 0.35rem; font-weight: 650; }

/* TOC sidebar for long pages */
.toc {
  position: sticky;
  top: 6rem;
  font-family: var(--f-mono);
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.2rem;
}
.toc-head {
  color: var(--moss);
  margin-bottom: 0.85rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toc a {
  color: var(--muted);
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  transition: color 0.15s;
}
.toc a .num { color: var(--blue); font-size: 0.6rem; min-width: 2.5rem; }
.toc a:hover { color: var(--fg); }
.with-toc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14rem;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
@media (max-width: 900px) {
  .with-toc { grid-template-columns: 1fr; }
  .toc { display: none; }
}

/* Section-level h3 inside .paper */
.paper h3 {
  font-weight: 600;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--fg);
  margin: 2rem 0 0.75rem;
  max-width: 30ch;
}
.paper h3 .sub-num {
  font-family: var(--f-mono);
  font-size: 0.48em;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin-right: 0.65em;
  vertical-align: 0.4em;
  font-weight: 700;
}

/* Hero shared by whitepaper pages */
.paper-hero {
  padding: clamp(3.5rem, 9vh, 6rem) 0 clamp(2.5rem, 6vh, 4rem);
}
.paper-hero .eyebrow {
  font-family: var(--f-mono);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--moss);
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.paper-hero .eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--moss);
  box-shadow: 0 0 0 5px var(--moss-soft);
}
.paper-hero .eyebrow .sep { display: none; }
.paper-hero h1 {
  font-weight: 600;
  font-size: clamp(2.8rem, 6.4vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.065em;
  margin-top: 1.25rem;
  max-width: 20ch;
  color: var(--fg);
}
.paper-hero .deck {
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.08rem, 1.65vw, 1.32rem);
  line-height: 1.55;
  letter-spacing: normal;
  color: var(--muted);
  margin-top: 1.4rem;
  max-width: 52ch;
}
.paper-hero .byline {
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}
.paper-hero .byline strong { color: var(--fg); margin-left: 0.35rem; font-weight: 650; }
