/* =========================================================================
   ROASmind · The Agentic Revolution in Performance Marketing
   Editorial long-form report — McKinsey-grade longread layout
   ========================================================================= */

html { scroll-behavior: smooth; }
body { background: var(--ink); color: var(--bone-92); overflow-x: hidden; }

/* ─── Layout primitives ─── */
.shell { max-width: 1320px; margin: 0 auto; padding: 0 56px; }
.shell-narrow { max-width: 920px; margin: 0 auto; padding: 0 56px; }
.shell-wide { max-width: 1480px; margin: 0 auto; padding: 0 56px; }

.section { padding: 144px 0; position: relative; }
.section + .section { border-top: 1px solid var(--hairline-d); }

/* ─── Top nav · sticky bone-on-ink ─── */
.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--ink) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--hairline-d);
}
.topnav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 56px;
  max-width: 1480px;
  margin: 0 auto;
}
.topnav .brand {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-sans); font-weight: 500; font-size: 17px;
  letter-spacing: -0.01em; color: var(--bone);
}
.topnav .brand .mono { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--bone-mute); }
.topnav .brand .wordmark {
  height: 26px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 12px rgba(232, 93, 31, 0.25));
}
.topnav .meta { display: flex; align-items: center; gap: 28px; }

/* Top-nav CTA · Return to home */
.topnav .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 16px;
  background: var(--saffron-500);
  color: var(--paper);
  border-radius: 999px;
  border: 1px solid var(--saffron-500);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: -0.005em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 0 16px rgba(232, 93, 31, 0.28);
  transition: background 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.topnav .nav-cta:hover {
  background: var(--saffron-400);
  border-color: var(--saffron-400);
  box-shadow: 0 0 28px rgba(232, 93, 31, 0.50);
}
.topnav .nav-cta-arrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1;
  transform: translateY(-1px);
  transition: transform 220ms var(--ease-out);
}
.topnav .nav-cta:hover .nav-cta-arrow {
  transform: translate(3px, -1px);
}
@media (max-width: 880px) {
  .topnav .meta .pill-live { display: none; }
  .topnav .nav-cta { padding: 5px 12px; font-size: 11px; }
}
.topnav .pill-live {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--bone-soft);
}
.topnav .pill-live .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--saffron-500); box-shadow: 0 0 10px var(--saffron-500);
  animation: dotPulse 2.6s ease-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* ─── Three-layer signature ─── */
.eyebrow {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-soft);
  gap: 10px;
}
.eyebrow::before, .eyebrow::after {
  content: ""; display: inline-block;
  width: 12px; height: 1px; background: var(--saffron-500);
}
.eyebrow.bracketed::before, .eyebrow.bracketed::after { content: none; }
.eyebrow.bracketed { color: var(--saffron-400); }
.eyebrow.bracketed b { font-weight: 500; }
.eyebrow.bracketed .bracket {
  font-family: var(--font-mono); font-weight: 300; color: var(--saffron-500);
  margin: 0 2px;
}

/* ─── Section head: editorial 2-col ─── */
.section-head {
  display: grid; grid-template-columns: 1fr auto;
  gap: 48px; align-items: flex-end;
  padding-bottom: 40px; margin-bottom: 80px;
  border-bottom: 1px solid var(--hairline-d);
}
.section-head .lhs { display: flex; flex-direction: column; gap: 24px; max-width: 820px; }
.section-head .rhs {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-mute);
}
.section-head .rhs .num { color: var(--saffron-500); font-size: 13px; }
.section-head h2 {
  font-family: var(--font-sans); font-weight: 300;
  font-size: clamp(48px, 5.4vw, 76px);
  letter-spacing: -0.032em; line-height: 1.02;
  color: var(--bone); margin: 0;
  text-wrap: balance;
}
.section-head h2 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--saffron-400); letter-spacing: -0.02em;
}
.section-head .lede {
  font-family: var(--font-sans); font-weight: 300; font-size: 22px; line-height: 1.45;
  color: var(--bone-soft); max-width: 64ch; letter-spacing: -0.012em;
  text-wrap: pretty;
}

/* ─── Body prose ─── */
.prose { max-width: 68ch; }
.prose-wide { max-width: 86ch; }
.prose p, .prose li {
  font-family: var(--font-sans); font-weight: 400; font-size: 17px; line-height: 1.65;
  color: var(--bone-92); letter-spacing: -0.005em;
  text-wrap: pretty;
  margin: 0 0 22px;
}
.prose strong { color: var(--bone); font-weight: 600; }
.prose em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--bone); letter-spacing: -0.01em;
}
.prose sup {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--saffron-400); padding-left: 2px; vertical-align: super;
}
.prose h3 {
  font-family: var(--font-sans); font-weight: 500; font-size: 28px;
  letter-spacing: -0.02em; line-height: 1.18;
  color: var(--bone); margin: 56px 0 20px;
  text-wrap: balance;
}
.prose h3 em { color: var(--saffron-400); font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.prose h4 {
  font-family: var(--font-sans); font-weight: 500; font-size: 19px;
  letter-spacing: -0.012em; line-height: 1.3;
  color: var(--bone); margin: 36px 0 12px;
}
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 24px; }
.prose ul li { margin-bottom: 12px; }
.prose ul li::marker { color: var(--saffron-500); }

/* Drop cap on first paragraph of a section */
.dropcap::first-letter {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 5.2em; line-height: 0.86;
  float: left; padding: 6px 12px 0 0;
  color: var(--saffron-500);
}

/* ─── Marginalia rail (2-col mix) ─── */
.with-margin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 72px;
  align-items: start;
}
@media (max-width: 1100px) {
  .with-margin { grid-template-columns: 1fr; gap: 32px; }
}
.margin-note {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--bone-soft); line-height: 1.7;
  padding-top: 8px;
  border-top: 1px solid var(--saffron-500);
  position: sticky; top: 100px;
}
.margin-note .key { color: var(--saffron-400); display: block; margin-bottom: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-size: 10px; }
.margin-note .quote { font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--bone-92); line-height: 1.4; letter-spacing: -0.01em; text-transform: none; }
.margin-note .attr { margin-top: 16px; color: var(--bone-mute); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; }

/* ─── Pull quote ─── */
.pullquote {
  margin: 56px 0;
  padding: 32px 0;
  border-top: 1px solid var(--saffron-500);
  border-bottom: 1px solid var(--hairline-d);
  max-width: 28ch;
}
.pullquote .q {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 44px; line-height: 1.1; letter-spacing: -0.02em;
  color: var(--bone);
}
.pullquote .a {
  margin-top: 18px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-mute);
}

/* ─── Exhibit shell (figures, tables, charts) ─── */
.exhibit {
  margin: 56px 0;
  border: 1px solid var(--hairline-d);
  border-radius: 16px;
  background: var(--ink-2);
  overflow: hidden;
}
.exhibit.glow {
  background:
    radial-gradient(circle at top left, rgba(232,93,31,0.22), rgba(232,93,31,0.06) 30%, var(--ink-2) 62%),
    var(--ink-2);
  border-color: rgba(232,93,31,0.20);
}
.exhibit-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--hairline-d);
  gap: 32px;
}
.exhibit-head .lhs { display: flex; flex-direction: column; gap: 8px; max-width: 56ch; }
.exhibit-head .num {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--saffron-500);
}
.exhibit-head .title {
  font-family: var(--font-sans); font-weight: 500; font-size: 22px;
  letter-spacing: -0.016em; color: var(--bone); line-height: 1.2;
  text-wrap: balance;
}
.exhibit-head .sub {
  font-family: var(--font-sans); font-weight: 400; font-size: 14px;
  color: var(--bone-soft); line-height: 1.5;
}
.exhibit-head .rhs {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-mute); text-align: right;
  white-space: nowrap;
}
.exhibit-body { padding: 32px 28px; }
.exhibit-foot {
  padding: 18px 28px;
  border-top: 1px solid var(--hairline-d);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--bone-mute); line-height: 1.6;
  display: flex; gap: 24px; justify-content: space-between; align-items: center;
  background: var(--ink);
}
.exhibit-foot .src { text-transform: uppercase; letter-spacing: 0.14em; }

/* ─── Editorial tables ─── */
table.rm {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-sans); font-size: 14px;
}
table.rm th {
  text-align: left; font-weight: 500; font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--bone-mute); font-family: var(--font-mono);
  padding: 16px 24px; border-bottom: 1px solid var(--hairline-d);
  background: var(--ink-3);
  white-space: nowrap;
}
table.rm td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--hairline-d);
  color: var(--bone-92);
  vertical-align: top;
}
table.rm tr:last-child td { border-bottom: none; }
table.rm td.num, table.rm th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
table.rm td.label { color: var(--bone); font-weight: 500; }
table.rm td .delta-up { color: var(--positive); }
table.rm td .delta-down { color: var(--danger); }
table.rm tr.tot td { background: rgba(232,93,31,0.06); color: var(--bone); font-weight: 500; border-top: 1px solid rgba(232,93,31,0.22); }

/* ─── Pills ─── */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(245,237,216,0.04); border: 1px solid rgba(245,237,216,0.10);
  color: rgba(245,237,216,0.65);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; line-height: 1; white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--saffron-500); box-shadow: 0 0 8px var(--saffron-500); }
.pill.saffron { background: rgba(232,93,31,0.12); border-color: rgba(232,93,31,0.32); color: var(--saffron-300); }
.pill.amber { background: rgba(232,155,45,0.10); border-color: rgba(232,155,45,0.28); color: var(--amber-400); }
.pill.amber .dot { background: var(--amber-400); box-shadow: 0 0 8px var(--amber-400); }
.pill.danger { background: rgba(209,74,46,0.10); border-color: rgba(209,74,46,0.30); color: var(--danger); }
.pill.danger .dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.pill.pos { background: rgba(77,166,122,0.10); border-color: rgba(77,166,122,0.28); color: var(--positive); }
.pill.pos .dot { background: var(--positive); box-shadow: 0 0 8px var(--positive); }
.pill.ghost { background: transparent; }
.pill.solid { background: var(--saffron-500); border-color: var(--saffron-500); color: var(--paper); }

/* ─── KPI strip ─── */
.kpi-strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0; border: 1px solid var(--hairline-d); border-radius: 16px;
  overflow: hidden; background: var(--ink-2);
}
.kpi-strip .cell {
  padding: 32px 28px;
  border-right: 1px solid var(--hairline-d);
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.kpi-strip .cell:last-child { border-right: none; }
.kpi-strip .cell .k {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-mute);
}
.kpi-strip .cell .v {
  font-family: var(--font-sans); font-weight: 300;
  font-size: clamp(40px, 4vw, 56px); line-height: 1; letter-spacing: -0.04em;
  color: var(--saffron-500);
  display: inline-flex; align-items: baseline; gap: 4px;
}
.kpi-strip .cell .v em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 0.42em; color: var(--saffron-400);
}
.kpi-strip .cell .v.bone { color: var(--bone); }
.kpi-strip .cell .v.bone em { color: var(--saffron-400); }
.kpi-strip .cell .d {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em;
  color: var(--bone-soft); line-height: 1.5;
}
@media (max-width: 980px) {
  .kpi-strip { grid-template-columns: repeat(2, 1fr); }
  .kpi-strip .cell:nth-child(2) { border-right: none; }
  .kpi-strip .cell:nth-child(1), .kpi-strip .cell:nth-child(2) { border-bottom: 1px solid var(--hairline-d); }
}

/* ─── Card grids ─── */
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 980px) { .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--ink-2);
  border: 1px solid var(--hairline-d);
  border-radius: 16px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.card.glow {
  background:
    radial-gradient(circle at top left, rgba(232,93,31,0.22), rgba(232,93,31,0.06) 30%, var(--ink-2) 60%),
    var(--ink-2);
  border-color: rgba(232,93,31,0.20);
}
.card .num {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 56px; color: var(--saffron-500); line-height: 1; letter-spacing: -0.02em;
}
.card .ttl {
  font-family: var(--font-sans); font-weight: 500; font-size: 20px;
  letter-spacing: -0.014em; color: var(--bone); line-height: 1.25;
}
.card .ttl em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--saffron-400); }
.card .body {
  font-family: var(--font-sans); font-weight: 400; font-size: 14px;
  line-height: 1.55; color: var(--bone-soft); text-wrap: pretty;
}
.card .lbl {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-mute);
}

/* ─── Section number / running header ─── */
.runner {
  position: sticky; top: 64px; z-index: 5;
  padding: 14px 0;
  background: var(--ink);
  border-bottom: 1px solid var(--hairline-d);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-mute);
}
.runner .inner { display: flex; align-items: center; gap: 24px; max-width: 1480px; margin: 0 auto; padding: 0 56px; justify-content: space-between; }
.runner .left { color: var(--saffron-500); }

/* ─── COVER ─── */
.cover {
  min-height: 92vh; padding: 144px 0 96px; position: relative;
  overflow: hidden; background: var(--ink);
}
.cover::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(232,93,31,0.18), transparent 60%),
    radial-gradient(50% 40% at 10% 80%, rgba(232,155,45,0.08), transparent 60%);
  pointer-events: none;
}
.cover .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(245,237,216,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245,237,216,0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 60% at 50% 50%, #000 30%, transparent 75%);
}
.cover .inner { position: relative; max-width: 1480px; margin: 0 auto; padding: 0 56px; }
.cover h1 {
  font-family: var(--font-sans); font-weight: 200;
  font-size: clamp(64px, 8vw, 128px); letter-spacing: -0.045em;
  line-height: 0.92; color: var(--bone); margin: 32px 0 0;
  max-width: 18ch; text-wrap: balance;
}
.cover h1 em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--saffron-400); letter-spacing: -0.025em;
}
.cover .sub {
  margin-top: 36px; max-width: 56ch;
  font-family: var(--font-sans); font-weight: 300; font-size: 24px; line-height: 1.4;
  color: var(--bone-soft); letter-spacing: -0.014em;
}
.cover .colophon {
  margin-top: 96px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
  padding-top: 32px; border-top: 1px solid var(--hairline-d);
}
.cover .colophon .col { display: flex; flex-direction: column; gap: 10px; }
.cover .colophon .k {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--bone-mute);
}
.cover .colophon .v {
  font-family: var(--font-sans); font-weight: 400; font-size: 16px;
  color: var(--bone-92); line-height: 1.4;
}
.cover .colophon .v em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--saffron-400); }
@media (max-width: 980px) {
  .cover .colophon { grid-template-columns: 1fr 1fr; }
}

/* Hero abstract — saffron arc tracing */
.cover .hero-svg {
  position: absolute; right: -100px; top: 12%; width: 720px; height: 540px;
  opacity: 0.95; pointer-events: none;
}
@media (max-width: 1200px) {
  .cover .hero-svg { display: none; }
}

/* ─── TOC ─── */
.toc {
  display: grid; grid-template-columns: 64px 1fr 1fr 120px;
  gap: 24px; align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline-d);
  text-decoration: none; color: inherit;
}
.toc:first-child { border-top: 1px solid var(--hairline-d); }
.toc .n { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.04em; color: var(--saffron-500); }
.toc .t {
  font-family: var(--font-sans); font-weight: 400; font-size: 26px; letter-spacing: -0.018em;
  color: var(--bone); line-height: 1.2; text-wrap: balance;
}
.toc .t em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--saffron-400); }
.toc .d {
  font-family: var(--font-sans); font-weight: 300; font-size: 14px;
  color: var(--bone-soft); line-height: 1.45;
}
.toc .p {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--bone-mute); text-transform: uppercase; text-align: right;
}
@media (max-width: 900px) {
  .toc { grid-template-columns: 36px 1fr; }
  .toc .d, .toc .p { display: none; }
}

/* ─── Architecture stack (sections 5) ─── */
.stack {
  display: grid; grid-template-columns: 280px 1fr; gap: 32px;
  border: 1px solid var(--hairline-d); border-radius: 16px;
  background: var(--ink-2); overflow: hidden;
}
.stack-row {
  display: contents;
}
.stack-row .k {
  padding: 32px 28px;
  background: var(--ink-3);
  border-bottom: 1px solid var(--hairline-d);
  display: flex; flex-direction: column; gap: 12px;
}
.stack-row .v {
  padding: 32px 28px;
  border-bottom: 1px solid var(--hairline-d);
  display: flex; flex-direction: column; gap: 14px;
}
.stack-row:last-child .k, .stack-row:last-child .v { border-bottom: none; }
.stack-row .k .num {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 38px; color: var(--saffron-500); line-height: 1;
}
.stack-row .k .name {
  font-family: var(--font-sans); font-weight: 500; font-size: 22px;
  letter-spacing: -0.016em; color: var(--bone); line-height: 1.2;
}
.stack-row .k .tag {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--saffron-400);
}
.stack-row .v p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--bone-92); }
.stack-row .v p em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--bone); }
@media (max-width: 900px) {
  .stack { grid-template-columns: 1fr; }
  .stack-row .k, .stack-row .v { padding: 24px; }
}

/* ─── Marquee · brand band ─── */
.marquee {
  border-top: 1px solid var(--hairline-d);
  border-bottom: 1px solid var(--hairline-d);
  background: var(--ink);
  overflow: hidden; padding: 24px 0;
}
.marquee .track {
  display: flex; gap: 64px; white-space: nowrap;
  animation: marqueeRun 42s linear infinite;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee .item {
  display: inline-flex; align-items: center; gap: 18px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--bone-soft);
}
.marquee .item .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--saffron-500); box-shadow: 0 0 10px var(--saffron-500);
}
.marquee .item em {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 18px; letter-spacing: -0.01em; color: var(--saffron-400);
  text-transform: none;
}
@keyframes marqueeRun {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ─── Audit log style sidebar (for operations section) ─── */
.audit {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.8;
  color: var(--bone-soft); display: flex; flex-direction: column; gap: 2px;
}
.audit .ln { display: grid; grid-template-columns: 70px 80px 1fr; gap: 16px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--hairline-d); }
.audit .t { color: var(--bone-mute); letter-spacing: 0.06em; }
.audit .s { letter-spacing: 0.06em; text-transform: uppercase; }
.audit .s.kill { color: var(--danger); }
.audit .s.scale { color: var(--positive); }
.audit .s.refresh { color: var(--amber-400); }
.audit .s.push { color: var(--saffron-500); }
.audit .m { color: var(--bone-92); letter-spacing: 0.02em; }
.audit .m b { color: var(--bone); font-weight: 500; }

/* ─── Inline ROAS-style mini chart svg containers ─── */
.chart-host { width: 100%; }
.chart-host svg { width: 100%; height: auto; display: block; }

/* ─── Footer ─── */
.report-footer {
  padding: 96px 0 64px;
  border-top: 1px solid var(--hairline-d);
  background: var(--ink);
}
.report-footer .inner {
  max-width: 1320px; margin: 0 auto; padding: 0 56px;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 48px;
}
.report-footer .col { display: flex; flex-direction: column; gap: 14px; }
.report-footer .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--bone-mute); }
.report-footer .v { font-family: var(--font-sans); font-weight: 400; font-size: 15px; color: var(--bone-92); line-height: 1.5; }
.report-footer .v em { font-family: var(--font-serif); font-style: italic; font-weight: 400; color: var(--saffron-400); }
.report-footer .mark {
  font-family: var(--font-serif); font-style: italic; font-weight: 400;
  font-size: 64px; line-height: 1; color: var(--saffron-500); margin-bottom: 8px;
  letter-spacing: -0.02em;
}
@media (max-width: 980px) {
  .report-footer .inner { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── Citations · works cited ─── */
.cites {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--hairline-d);
}
.cite {
  display: grid; grid-template-columns: 38px 1fr; gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--hairline-d);
  font-family: var(--font-sans); font-size: 13px; line-height: 1.55;
  color: var(--bone-soft);
}
.cite:nth-child(odd) { border-right: 1px solid var(--hairline-d); }
.cite .n { font-family: var(--font-mono); font-size: 11px; color: var(--saffron-500); letter-spacing: 0.06em; padding-top: 2px; }
.cite .t { color: var(--bone-92); }
.cite .u {
  display: block; margin-top: 6px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.04em;
  color: var(--bone-mute); word-break: break-all;
}
@media (max-width: 900px) {
  .cites { grid-template-columns: 1fr; }
  .cite:nth-child(odd) { border-right: none; }
}

/* ─── Architecture diagram (Brand Brain SVG host) ─── */
.diagram {
  background: var(--ink);
  border-radius: 12px;
  padding: 32px;
  position: relative;
  overflow: hidden;
}
.diagram::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(232,93,31,0.12), transparent 60%);
  pointer-events: none;
}

/* ─── Floating · Return to Home ─── */
.return-home {
  position: fixed;
  right: 28px; bottom: 28px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 12px;
  background: var(--saffron-500);
  color: var(--paper);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1px solid rgba(232, 93, 31, 0.55);
  box-shadow:
    0 0 28px rgba(232, 93, 31, 0.32),
    0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms var(--ease-out);
}
.return-home.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.return-home:hover {
  background: var(--saffron-400);
  box-shadow:
    0 0 40px rgba(232, 93, 31, 0.55),
    0 8px 24px rgba(0, 0, 0, 0.45);
}
.return-home .rh-icon {
  display: inline-grid;
  place-items: center;
  width: 24px; height: 24px;
  border-radius: 999px;
  background: rgba(14, 10, 6, 0.18);
  color: var(--paper);
}
.return-home .rh-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.return-home .rh-arrow {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1;
  margin-left: 2px;
  transform: translateY(-1px);
}
@media (max-width: 720px) {
  .return-home { right: 16px; bottom: 16px; padding: 10px 14px 10px 10px; }
  .return-home .rh-label { display: none; }
}

/* ─── WHITE (paper) SURFACE OVERRIDES ───
   Applied via `.section.paper` on a section. Flips the substrate to true
   white #FFFFFF with ink-based text, ink hairlines, and saffron accents.
   Cards switch to paper #F5EDD8 (warm cream) with ink hairlines. The rest of the
   report stays on its dark warm-ink substrate. */

.section.paper {
  background: #ffffff;
  color: var(--ink);
  position: relative;
}
.section.paper::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 50% at 80% 20%, rgba(232,93,31,0.05), transparent 60%);
  pointer-events: none;
}
.section.paper > .shell { position: relative; }

/* Section heads on white */
.section.paper .section-head { border-bottom-color: rgba(14,10,6,0.12); }
.section.paper .section-head h2 { color: var(--ink); }
.section.paper .section-head h2 em { color: var(--saffron-600); }
.section.paper .section-head .lede { color: #2A241E; }
.section.paper .section-head .rhs { color: #6E6557; }
.section.paper .section-head .rhs .num { color: var(--saffron-600); }

/* Eyebrow */
.section.paper .eyebrow { color: #5D5447; }
.section.paper .eyebrow::before,
.section.paper .eyebrow::after { background: var(--saffron-600); }
.section.paper .eyebrow.bracketed { color: var(--saffron-700); }
.section.paper .eyebrow.bracketed .bracket { color: var(--saffron-600); }

/* Prose */
.section.paper .prose p,
.section.paper .prose li { color: #1A140E; }
.section.paper .prose strong { color: #000; }
.section.paper .prose em { color: var(--ink); }
.section.paper .prose sup { color: var(--saffron-600); }
.section.paper .prose h3 { color: var(--ink); }
.section.paper .prose h3 em { color: var(--saffron-600); }
.section.paper .prose h4 { color: var(--ink); }
.section.paper .prose ul li::marker { color: var(--saffron-600); }
.section.paper .dropcap::first-letter { color: var(--saffron-600); }

/* Pull quotes */
.section.paper .pullquote {
  border-top-color: var(--saffron-600);
  border-bottom-color: rgba(14,10,6,0.10);
}
.section.paper .pullquote .q { color: var(--ink); }
.section.paper .pullquote .q em { color: var(--saffron-700); }
.section.paper .pullquote .a { color: #6E6557; }

/* Marginalia */
.section.paper .margin-note { color: #2A241E; border-top-color: var(--saffron-600); }
.section.paper .margin-note .key { color: var(--saffron-700); }
.section.paper .margin-note .quote { color: var(--ink); }
.section.paper .margin-note .attr { color: #6E6557; }

/* TOC entries */
.section.paper .toc { border-bottom-color: rgba(14,10,6,0.10); }
.section.paper .toc:first-child { border-top-color: rgba(14,10,6,0.10); }
.section.paper .toc .n { color: var(--saffron-600); }
.section.paper .toc .t { color: var(--ink); }
.section.paper .toc .t em { color: var(--saffron-600); }
.section.paper .toc .d { color: #2A241E; }
.section.paper .toc .p { color: #6E6557; }
.section.paper .toc:hover { background: rgba(232,93,31,0.04); }
.section.paper .toc:hover .t { color: var(--saffron-700); }

/* Cards */
.section.paper .card {
  background: var(--paper);
  border-color: rgba(14,10,6,0.10);
  color: var(--ink);
}
.section.paper .card.glow {
  background:
    radial-gradient(circle at top left, rgba(232,93,31,0.26), rgba(232,93,31,0.08) 32%, var(--paper) 68%),
    var(--paper);
  border-color: rgba(232,93,31,0.35);
}
.section.paper .card .num { color: var(--saffron-600); }
.section.paper .card .ttl { color: var(--ink); }
.section.paper .card .ttl em { color: var(--saffron-600); }
.section.paper .card .body { color: #2A241E; }
.section.paper .card .lbl { color: #6E6557; }

/* Exhibits */
.section.paper .exhibit {
  background: var(--paper);
  border-color: rgba(14,10,6,0.10);
}
.section.paper .exhibit.glow {
  background:
    radial-gradient(circle at top left, rgba(232,93,31,0.26), rgba(232,93,31,0.08) 32%, var(--paper) 68%),
    var(--paper);
  border-color: rgba(232,93,31,0.35);
}
.section.paper .exhibit-head { border-bottom-color: rgba(14,10,6,0.10); }
.section.paper .exhibit-head .num { color: var(--saffron-600); }
.section.paper .exhibit-head .title { color: var(--ink); }
.section.paper .exhibit-head .title em { color: var(--saffron-600); }
.section.paper .exhibit-head .sub { color: #2A241E; }
.section.paper .exhibit-head .rhs { color: #6E6557; }
.section.paper .exhibit-foot {
  background: var(--paper-2);
  border-top-color: rgba(14,10,6,0.10);
  color: #6E6557;
}

/* Tables on white */
.section.paper table.rm th {
  background: var(--paper-2);
  color: #5D5447;
  border-bottom-color: rgba(14,10,6,0.10);
}
.section.paper table.rm td {
  color: var(--ink);
  border-bottom-color: rgba(14,10,6,0.08);
}
.section.paper table.rm td.label { color: var(--ink); }
.section.paper table.rm tr.tot td {
  background: rgba(232,93,31,0.10);
  color: var(--ink);
  border-top-color: rgba(232,93,31,0.30);
}

/* Pills on white — re-tone for legibility */
.section.paper .pill {
  background: rgba(14,10,6,0.04);
  border-color: rgba(14,10,6,0.12);
  color: #3A332B;
}
.section.paper .pill.saffron {
  background: rgba(232,93,31,0.12);
  border-color: rgba(232,93,31,0.40);
  color: var(--saffron-700);
}
.section.paper .pill.amber {
  background: rgba(232,155,45,0.14);
  border-color: rgba(232,155,45,0.40);
  color: #8B5400;
}
.section.paper .pill.pos {
  background: rgba(77,166,122,0.14);
  border-color: rgba(77,166,122,0.40);
  color: #2F6E4D;
}
.section.paper .pill.pos .dot { background: #2F6E4D; }
.section.paper .pill.danger {
  background: rgba(209,74,46,0.12);
  border-color: rgba(209,74,46,0.40);
  color: #8E2A19;
}
.section.paper .pill.danger .dot { background: #8E2A19; }
.section.paper .pill.ghost { background: transparent; }
.section.paper .pill.solid { background: var(--saffron-500); border-color: var(--saffron-500); color: #ffffff; }

/* Stack (architectural) */
.section.paper .stack {
  background: var(--paper);
  border-color: rgba(14,10,6,0.10);
}
.section.paper .stack-row .k {
  background: var(--paper-2);
  border-bottom-color: rgba(14,10,6,0.10);
}
.section.paper .stack-row .v { border-bottom-color: rgba(14,10,6,0.10); color: var(--ink); }
.section.paper .stack-row .k .num { color: var(--saffron-600); }
.section.paper .stack-row .k .name { color: var(--ink); }
.section.paper .stack-row .k .name em { color: var(--saffron-600); }
.section.paper .stack-row .k .tag { color: var(--saffron-700); }
.section.paper .stack-row .v p { color: var(--ink); }
.section.paper .stack-row .v p em { color: var(--ink); }

/* Pre-launch checklist mini-cards inside the stack — true white tiles on the cream stack */
.section.paper .stack-row .v [style*="background:var(--ink)"] {
  background: #ffffff !important;
  border-color: rgba(14,10,6,0.14) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 0 rgba(14,10,6,0.04);
}
.section.paper .stack-row .v [style*="color:var(--bone);"] { color: var(--ink) !important; }
.section.paper .stack-row .v [style*="color:var(--bone-soft);"] { color: #2A241E !important; }

/* Diagram backdrop — keep as a dark inset card for contrast on white */
.section.paper .diagram {
  background: var(--ink);
  border: 1px solid rgba(14,10,6,0.10);
}

/* Cites (works cited) */
.section.paper .cites { border-top-color: rgba(14,10,6,0.10); }
.section.paper .cite {
  border-bottom-color: rgba(14,10,6,0.10);
  color: #2A241E;
  background: transparent;
}
.section.paper .cite:nth-child(odd) { border-right-color: rgba(14,10,6,0.10); }
.section.paper .cite .n { color: var(--saffron-600); }
.section.paper .cite .t { color: var(--ink); }
.section.paper .cite .u { color: #6E6557; }

/* KPI strip on white */
.section.paper .kpi-strip {
  background: var(--paper);
  border-color: rgba(14,10,6,0.10);
}
.section.paper .kpi-strip .cell { border-right-color: rgba(14,10,6,0.10); }
.section.paper .kpi-strip .cell .k { color: #6E6557; }
.section.paper .kpi-strip .cell .v { color: var(--saffron-600); }
.section.paper .kpi-strip .cell .v em { color: var(--saffron-700); }
.section.paper .kpi-strip .cell .v.bone { color: var(--ink); }
.section.paper .kpi-strip .cell .v.bone em { color: var(--saffron-700); }
.section.paper .kpi-strip .cell .d { color: #2A241E; }

/* Section seam at the white/dark boundary */
.section.paper + .section,
.section + .section.paper { border-top-color: rgba(14,10,6,0.10); }

/* ─── Print rules ─── */
@media print {
  body { background: white; color: black; }
  .topnav, .runner, .marquee, .return-home { display: none; }
  .section { padding: 64px 0; }
}
