/* Intelligence Hub: Executive Briefing pages
   Sovereign Elegance theme. Tokens mirror src/index.css so static HTML
   pages sit beside the React site without looking bolted on. */

:root {
  --background: 36 25% 97%; /* Bone */
  --foreground: 0 0% 8%; /* Midnight Charcoal */
  --primary: 40 45% 55%; /* Sovereign Gold */
  --primary-ink: 40 45% 33%; /* gold, darkened for small text on light ground */
  --secondary: 36 25% 92%;
  --muted: 36 15% 90%;
  --muted-foreground: 0 0% 42%;
  --border: 36 20% 85%;
  --card: 0 0% 100%;
  --radius: 0.375rem;

  /* Allocation heat. Water-colour washes over the warm ground. Each tint is an
     index of capital, so the palette carries meaning rather than decoration. */
  --heat-hot: 6 62% 96%;
  --heat-hot-line: 6 50% 86%;
  --heat-hot-mid: 6 58% 74%;
  --heat-hot-ink: 6 55% 34%;
  --heat-cool: 202 62% 96%;
  --heat-cool-line: 202 44% 86%;
  --heat-cool-mid: 202 52% 72%;
  --heat-cool-ink: 205 55% 33%;
  --heat-calm: 155 40% 95%;
  --heat-calm-line: 155 32% 84%;
  --heat-calm-mid: 155 38% 64%;
  --heat-calm-ink: 158 50% 28%;
  --heat-flat: 36 14% 95%;
  --heat-flat-line: 36 16% 87%;
  --heat-flat-mid: 36 14% 84%;
  --heat-flat-ink: 0 0% 38%;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  color: hsl(var(--foreground) / 0.92);
  background: hsl(var(--background));
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}

a {
  color: hsl(var(--primary-ink));
  text-underline-offset: 3px;
}

a:hover {
  color: hsl(var(--foreground));
}

:focus-visible {
  outline: 2px solid hsl(var(--primary-ink));
  outline-offset: 3px;
}

::selection {
  background: hsl(var(--primary) / 0.28);
}

/* Reading progress */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: hsl(var(--primary));
  z-index: 100;
}

/* Top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
}

.topbar__in {
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

a.brand:hover {
  color: hsl(var(--foreground));
}

.brand b {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: hsl(var(--foreground));
}

.brand span {
  color: hsl(var(--primary-ink));
}

.topbar nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-left: auto;
}

.topbar nav a {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  padding: 8px 10px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  transition: color 180ms ease;
}

.topbar nav a:hover {
  color: hsl(var(--primary-ink));
}

.btn {
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
  border-radius: var(--radius);
  padding: 9px 14px;
  min-height: 40px;
  cursor: pointer;
  transition: border-color 180ms ease, color 180ms ease;
}

.btn:hover {
  border-color: hsl(var(--primary));
  color: hsl(var(--primary-ink));
}

#menuBtn {
  display: none;
}

/* Hero */
.hero {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: 64px 0 56px;
  border-bottom: 2px solid hsl(var(--primary));
}

.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: hsl(var(--primary));
  margin-bottom: 24px;
}

.kicker::before {
  content: "";
  width: 28px;
  height: 1px;
  background: hsl(var(--primary));
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin-bottom: 24px;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
  color: hsl(var(--primary));
}

.hero .sub {
  color: hsl(var(--background) / 0.7);
  font-size: 15px;
  max-width: 62ch;
  margin-bottom: 8px;
}

.hero .byline {
  color: hsl(var(--background) / 0.55);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.chip {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--background) / 0.72);
  border: 1px solid hsl(var(--background) / 0.22);
  border-radius: var(--radius);
  padding: 5px 11px;
}

/* Layout shell */
.shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 88px;
}

.toc__title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid hsl(var(--border));
}

.toc ol {
  list-style: none;
}

.toc a {
  display: block;
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  padding: 7px 0 7px 14px;
  border-left: 2px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.toc a:hover {
  color: hsl(var(--foreground));
}

.toc a.active {
  color: hsl(var(--foreground));
  border-left-color: hsl(var(--primary));
}

main {
  min-width: 0;
}

/* Sections */
section {
  margin-bottom: 72px;
  scroll-margin-top: 88px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: hsl(var(--primary-ink));
  font-weight: 500;
  margin-bottom: 12px;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 2.9vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: hsl(var(--foreground));
  margin-bottom: 8px;
}

.section__note {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: hsl(var(--muted-foreground));
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid hsl(var(--border));
}

h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  color: hsl(var(--foreground));
  margin: 36px 0 10px;
}

p {
  margin-bottom: 1.35em;
  max-width: 74ch;
}

.lead {
  font-size: 19px;
  line-height: 1.7;
  color: hsl(var(--foreground) / 0.95);
  max-width: 68ch;
  margin-bottom: 1.5em;
}

ul.plain,
ol.plain {
  margin: 0 0 1.5em 1.4em;
  max-width: 74ch;
}

ul.plain li,
ol.plain li {
  margin-bottom: 0.6em;
}

/* 90-second synthesis */
.brief {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-top: 3px solid hsl(var(--primary));
  border-radius: var(--radius);
  padding: 36px 40px;
  position: relative;
}

.brief__label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--primary-ink));
  border: 1px solid hsl(var(--primary) / 0.45);
  border-radius: var(--radius);
  padding: 4px 10px;
  margin-bottom: 24px;
}

.brief p:last-child {
  margin-bottom: 0;
}

.brief strong {
  color: hsl(var(--foreground));
  font-weight: 600;
}

/* Key figures */
.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.figure {
  background: hsl(var(--card));
  padding: 22px 20px;
}

.figure b {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  color: hsl(var(--foreground));
  margin-bottom: 6px;
}

.figure span {
  font-size: 12.5px;
  line-height: 1.55;
  color: hsl(var(--muted-foreground));
  display: block;
}

/* Five-layer framework */
.layers {
  counter-reset: layer;
  border-left: 1px solid hsl(var(--border));
  margin-left: 6px;
}

.layer {
  counter-increment: layer;
  position: relative;
  padding: 0 0 36px 40px;
}

.layer:last-child {
  padding-bottom: 0;
}

.layer::before {
  content: counter(layer, decimal-leading-zero);
  position: absolute;
  left: -16px;
  top: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--primary) / 0.5);
  color: hsl(var(--primary-ink));
  font-family: var(--serif);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layer h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.layer p {
  margin: 0;
  font-size: 15px;
  color: hsl(var(--muted-foreground));
}

/* Verdict scorecard */
.verdict {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1px;
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.score {
  background: hsl(var(--card));
  padding: 26px 22px;
}

.score__axis {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  display: block;
  margin-bottom: 12px;
}

.score__value {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  color: hsl(var(--foreground));
  margin-bottom: 12px;
}

.score__value small {
  font-size: 16px;
  color: hsl(var(--muted-foreground));
}

.score__basis {
  font-size: 13px;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
}

.verdict__total {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border-radius: var(--radius);
  padding: 30px 34px;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.verdict__total b {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 400;
  line-height: 1;
  color: hsl(var(--primary));
}

.verdict__total p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: hsl(var(--background) / 0.78);
  max-width: 52ch;
}

/* Tables */
.tw {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow-x: auto;
  background: hsl(var(--card));
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid hsl(var(--border));
  text-align: left;
  vertical-align: top;
}

thead th {
  background: hsl(var(--secondary));
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  font-weight: 600;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong {
  color: hsl(var(--foreground));
}

/* Callout */
.note {
  background: hsl(var(--secondary) / 0.65);
  border-left: 2px solid hsl(var(--primary));
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 14px;
  line-height: 1.7;
  color: hsl(var(--foreground) / 0.82);
  margin: 24px 0;
  max-width: 74ch;
}

.note strong {
  color: hsl(var(--foreground));
}

/* Implementation checklist */
.actions {
  list-style: none;
  display: grid;
  gap: 1px;
  background: hsl(var(--border));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow: hidden;
}

.actions li {
  background: hsl(var(--card));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px 20px;
}

.actions input {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  accent-color: hsl(var(--primary-ink));
  cursor: pointer;
}

.actions label {
  cursor: pointer;
  font-size: 15px;
  line-height: 1.6;
}

.actions input:checked + label {
  color: hsl(var(--muted-foreground));
  text-decoration: line-through;
}

/* Back link + footer */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  text-decoration: none;
}

.back-link:hover {
  color: hsl(var(--primary-ink));
}

.site-footer {
  border-top: 1px solid hsl(var(--border));
  margin-top: 64px;
  padding: 40px 24px 0;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer__brand {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: hsl(var(--foreground));
  margin-bottom: 6px;
}

.site-footer__brand em {
  font-style: italic;
  color: hsl(var(--primary-ink));
}

.site-footer__role {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: hsl(var(--primary-ink));
  margin-bottom: 20px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding-bottom: 28px;
}

.site-footer__links a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: hsl(var(--muted-foreground));
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.site-footer__links a:hover {
  color: hsl(var(--primary-ink));
}

.site-footer__meta {
  border-top: 1px solid hsl(var(--border));
  padding: 20px 0 40px;
  font-size: 12px;
  color: hsl(var(--muted-foreground));
}

/* Disclaimer block */
.disclaimer {
  background: hsl(var(--secondary) / 0.6);
  border: 1px solid hsl(var(--border));
  border-left: 2px solid hsl(var(--primary));
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 48px;
}

.disclaimer__label {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  color: hsl(var(--primary-ink));
  margin-bottom: 14px;
}

.disclaimer p:not(.disclaimer__label) {
  font-size: 14px;
  line-height: 1.7;
  color: hsl(var(--foreground) / 0.78);
  max-width: 92ch;
  margin-bottom: 10px;
}

.disclaimer p:last-of-type {
  margin-bottom: 0;
}

/* Disclosure */
.disclosure {
  margin-top: 24px;
  border-top: 1px solid hsl(var(--border));
  padding-top: 18px;
}

.disclosure summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: hsl(var(--primary-ink));
}

.disclosure summary::-webkit-details-marker {
  display: none;
}

.disclosure summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1;
  color: hsl(var(--muted-foreground));
}

.disclosure[open] summary::after {
  content: "\2013";
}

.disclosure__body { padding-top: 16px; }

.disclosure__tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 10px;
  padding: 2px 9px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.disclosure dl {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.disclosure dt {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  padding: 13px 24px 13px 0;
  border-top: 1px solid hsl(var(--border));
}

.disclosure dd {
  font-size: 13.5px;
  line-height: 1.65;
  color: hsl(var(--foreground) / 0.85);
  padding: 13px 0;
  border-top: 1px solid hsl(var(--border));
  overflow-wrap: anywhere;
}

/* ------------------------------------------------------------------
   Allocation heat map
   Four pale washes encode capital: how much a cell earns. They stay
   washes over the warm bone ground, so gold remains the one accent.
   ------------------------------------------------------------------ */

/* Focus legend */
.heat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
}

.heat-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.4;
  color: hsl(var(--foreground) / 0.82);
}

.heat-legend__swatch {
  flex: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.heat-legend__swatch--hot {
  background: hsl(var(--heat-hot-mid));
  box-shadow: 0 0 0 3px hsl(var(--heat-hot-line));
}

.heat-legend__swatch--cool {
  background: hsl(var(--heat-cool-mid));
  box-shadow: 0 0 0 3px hsl(var(--heat-cool-line));
}

.heat-legend__swatch--calm {
  background: hsl(var(--heat-calm-mid));
  box-shadow: 0 0 0 3px hsl(var(--heat-calm-line));
}

.heat-legend__swatch--flat {
  background: hsl(var(--heat-flat-mid));
  box-shadow: 0 0 0 3px hsl(var(--heat-flat-line));
}

/* The combined map figure */
.map-scroll {
  padding: 24px 22px 12px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow-x: auto;
}

.map-figure {
  display: block;
  width: 100%;
  height: auto;
  min-width: 660px;
}

.map-figure .mf-shape {
  stroke-width: 1.5;
}

.map-figure .mf-hot {
  fill: hsl(var(--heat-hot));
  stroke: hsl(var(--heat-hot-line));
}

.map-figure .mf-cool {
  fill: hsl(var(--heat-cool));
  stroke: hsl(var(--heat-cool-line));
}

.map-figure .mf-calm {
  fill: hsl(var(--heat-calm));
  stroke: hsl(var(--heat-calm-line));
}

.map-figure .mf-flat {
  fill: hsl(var(--heat-flat));
  stroke: hsl(var(--heat-flat-line));
}

.map-figure .mf-card {
  fill: hsl(var(--card));
  stroke: hsl(var(--border));
}

.map-figure .mf-caps {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  fill: hsl(var(--muted-foreground));
}

.map-figure .mf-band {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  fill: hsl(var(--foreground) / 0.9);
}

.map-figure .mf-sub {
  font-family: var(--sans);
  font-size: 10.5px;
  fill: hsl(var(--muted-foreground));
}

.map-figure .mf-num {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  fill: hsl(var(--foreground) / 0.85);
}

.map-figure .mf-line {
  fill: none;
  stroke: hsl(var(--border));
  stroke-width: 1;
}

.map-figure .mf-connector {
  fill: none;
  stroke: hsl(var(--primary));
  stroke-width: 1.5;
}

.map-figure .mf-arrow {
  fill: hsl(var(--primary));
}

.figcap {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: hsl(var(--muted-foreground));
  max-width: 88ch;
}

/* The heat matrix */
.heat {
  padding: 6px;
  background: hsl(var(--secondary) / 0.55);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  overflow-x: auto;
}

.heat table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 6px;
}

.heat th,
.heat td {
  padding: 0;
  border: 0;
  background: transparent;
  vertical-align: top;
}

.heat thead th {
  padding: 2px 4px 8px;
  background: transparent;
  text-align: left;
  font-weight: 600;
}

.heat thead th span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: hsl(var(--foreground) / 0.85);
}

.heat thead th small {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: hsl(var(--muted-foreground));
}

.heat th.heat__tier {
  width: 118px;
  padding: 14px 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 10px;
  text-align: left;
}

.heat__tier b {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  line-height: 1.1;
  color: hsl(var(--foreground));
}

.heat__tier span {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  line-height: 1.45;
  color: hsl(var(--muted-foreground));
}

.heat td.heat__cell {
  min-width: 156px;
  padding: 14px 15px;
  background: hsl(var(--heat-flat));
  border: 1px solid hsl(var(--heat-flat-line));
  border-radius: 10px;
}

.heat td.heat__cell--hot {
  background: hsl(var(--heat-hot));
  border-color: hsl(var(--heat-hot-line));
}

.heat td.heat__cell--cool {
  background: hsl(var(--heat-cool));
  border-color: hsl(var(--heat-cool-line));
}

.heat td.heat__cell--calm {
  background: hsl(var(--heat-calm));
  border-color: hsl(var(--heat-calm-line));
}

.heat__pct {
  display: block;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
  color: hsl(var(--heat-flat-ink));
}

.heat__cell--hot .heat__pct {
  color: hsl(var(--heat-hot-ink));
}

.heat__cell--cool .heat__pct {
  color: hsl(var(--heat-cool-ink));
}

.heat__cell--calm .heat__pct {
  color: hsl(var(--heat-calm-ink));
}

.heat__label {
  display: block;
  margin-top: 9px;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: hsl(var(--foreground) / 0.88);
}

.heat__note {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.5;
  color: hsl(var(--foreground) / 0.7);
}

.heat__flag {
  display: inline-block;
  margin-top: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: hsl(var(--heat-hot-mid) / 0.22);
  border: 1px solid hsl(var(--heat-hot-line));
  color: hsl(var(--heat-hot-ink));
}

.heat__flag--cool {
  background: hsl(var(--heat-cool-mid) / 0.22);
  border-color: hsl(var(--heat-cool-line));
  color: hsl(var(--heat-cool-ink));
}

.heat__flag--calm {
  background: hsl(var(--heat-calm-mid) / 0.22);
  border-color: hsl(var(--heat-calm-line));
  color: hsl(var(--heat-calm-ink));
}

.heat__flag--flat {
  background: hsl(var(--heat-flat-mid) / 0.35);
  border-color: hsl(var(--heat-flat-line));
  color: hsl(var(--heat-flat-ink));
}

/* Capital quadrant bars */
.quad {
  display: grid;
  gap: 22px;
  margin-bottom: 26px;
}

.quad__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.quad__name {
  font-size: 14px;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.quad__name small {
  display: block;
  margin-top: 3px;
  font-size: 11.5px;
  font-weight: 400;
  color: hsl(var(--muted-foreground));
}

.quad__value {
  flex: none;
  font-family: var(--serif);
  font-size: 20px;
  color: hsl(var(--foreground));
}

.quad__track {
  height: 12px;
  border-radius: 999px;
  background: hsl(var(--muted));
  overflow: hidden;
}

.quad__fill {
  height: 100%;
  border-radius: 999px;
  background: hsl(var(--heat-flat-mid));
}

.quad__fill--hot {
  background: hsl(var(--heat-hot-mid));
}

.quad__fill--cool {
  background: hsl(var(--heat-cool-mid));
}

.quad__fill--calm {
  background: hsl(var(--heat-calm-mid));
}

/* Warning callout */
.note--warn {
  background: hsl(var(--heat-hot));
  border-left-color: hsl(var(--heat-hot-mid));
  color: hsl(var(--heat-hot-ink));
}

.note--warn strong {
  color: hsl(var(--heat-hot-ink));
}

/* Two-column helper */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Author's note */
.authornote {
  margin-top: 26px;
  padding: 34px 36px;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  border-left: 3px solid hsl(var(--primary));
  border-radius: var(--radius);
}

.authornote p {
  color: hsl(var(--background) / 0.8);
  max-width: 68ch;
}

.authornote strong {
  color: hsl(var(--background));
}

.authornote__sig {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  color: hsl(var(--primary));
}

/* Three-card premise block: the myth, the deficit, the directive.
   Each card borrows one wash from the heat palette so the reader meets the
   colour code before meeting the matrix. */
.premise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 18px;
  margin: 26px 0 30px;
}

.premise__card {
  padding: 24px 24px 26px;
  background: hsl(var(--heat-flat));
  border: 1px solid hsl(var(--heat-flat-line));
  border-top: 3px solid hsl(var(--heat-flat-mid));
  border-radius: 12px;
}

.premise__card--hot {
  background: hsl(var(--heat-hot));
  border-color: hsl(var(--heat-hot-line));
  border-top-color: hsl(var(--heat-hot-mid));
}

.premise__card--cool {
  background: hsl(var(--heat-cool));
  border-color: hsl(var(--heat-cool-line));
  border-top-color: hsl(var(--heat-cool-mid));
}

.premise__kicker,
.premise__tag,
.premise__value,
.premise__body {
  margin: 0;
  max-width: none;
}

.premise__kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--heat-flat-ink));
}

.premise__card--hot .premise__kicker {
  color: hsl(var(--heat-hot-ink));
}

.premise__card--cool .premise__kicker {
  color: hsl(var(--heat-cool-ink));
}

.premise__tag {
  margin-top: 9px;
  font-size: 12px;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
}

.premise__value {
  margin-top: 16px;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.28;
  color: hsl(var(--foreground));
}

.premise__body {
  margin-top: 12px;
  font-size: 13.5px;
  line-height: 1.62;
  color: hsl(var(--foreground) / 0.78);
}

/* Modern market paradigm callout: a book-style reading block. */
.paradigm {
  padding: 34px 36px 30px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--primary));
  border-radius: var(--radius);
}

.paradigm__lede {
  margin: 0;
  max-width: 66ch;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.72;
  font-style: italic;
  color: hsl(var(--foreground) / 0.92);
}

.paradigm__mistake {
  margin: 24px 0 0;
  padding: 20px 22px;
  background: hsl(var(--heat-hot));
  border: 1px solid hsl(var(--heat-hot-line));
  border-radius: 10px;
}

.paradigm__mistake-label {
  margin: 0 0 9px;
  max-width: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: hsl(var(--heat-hot-ink));
}

.paradigm__mistake p {
  margin: 0;
  max-width: none;
  font-size: 14px;
  line-height: 1.68;
  color: hsl(var(--foreground) / 0.82);
}

.paradigm__mistake strong {
  color: hsl(var(--heat-hot-ink));
}

.paradigm__turn {
  margin: 24px 0 0;
  max-width: 70ch;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: hsl(var(--foreground));
}

.paradigm__turn em {
  color: hsl(var(--primary-ink));
}

.paradigm__checks {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.paradigm__checks li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding-top: 14px;
  border-top: 1px solid hsl(var(--border));
}

.paradigm__checks li:first-child {
  padding-top: 0;
  border-top: 0;
}

.paradigm__tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  background: hsl(var(--heat-calm));
  border: 1px solid hsl(var(--heat-calm-line));
  color: hsl(var(--heat-calm-ink));
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.paradigm__checks li > span + span {
  font-size: 14px;
  line-height: 1.68;
  color: hsl(var(--foreground) / 0.82);
}

.paradigm__checks strong {
  color: hsl(var(--foreground));
}

@media (max-width: 940px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 32px;
  }

  .toc {
    position: static;
  }

  .toc ol {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }

  .toc.open ol {
    display: grid;
  }

  #menuBtn {
    display: inline-flex;
    align-items: center;
  }

  .topbar nav {
    display: none;
  }

  .hero {
    padding: 44px 0 40px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15.5px;
  }

  .wrap,
  .shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .shell {
    padding-bottom: 64px;
  }

  .brief {
    padding: 26px 22px;
  }

  .layer {
    padding-left: 32px;
  }

  .layer::before {
    left: -15px;
    width: 30px;
    height: 30px;
  }

  h3 {
    font-size: 19px;
  }

  .toc ol {
    grid-template-columns: 1fr;
  }

  .disclaimer {
    padding: 22px 20px;
  }

  .map-scroll {
    padding: 16px 16px 8px;
  }

  .authornote {
    padding: 26px 22px;
  }

  .paradigm {
    padding: 24px 20px 22px;
  }

  .disclosure dl {
    grid-template-columns: 1fr;
  }

  .disclosure dd {
    border-top: 0;
    padding-top: 0;
    padding-bottom: 16px;
  }

  .site-footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media print {
  #progress,
  .topbar,
  .toc,
  .back-link,
  .site-footer__links {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 11pt;
  }

  .shell {
    display: block;
    padding: 0;
    max-width: none;
  }

  .hero {
    background: #fff;
    color: #000;
    border-bottom: 2px solid #000;
    padding: 0 0 16px;
  }

  .hero h1 em,
  .hero .byline,
  .kicker {
    color: #000;
  }

  .chip {
    color: #333;
    border-color: #999;
  }

  .disclaimer {
    background: #fff;
    border: 1px solid #ccc;
    border-left: 2px solid #000;
  }

  .brief,
  .figure,
  .score,
  .tw,
  .actions li,
  .note {
    border-color: #ccc;
  }

  .heat,
  .heat__cell,
  .heat th.heat__tier,
  .heat-legend,
  .map-scroll,
  .quad__track,
  .premise__card,
  .paradigm__mistake,
  .paradigm__tick,
  .authornote {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .heat td.heat__cell,
  .heat th.heat__tier,
  .heat-legend,
  .map-scroll,
  .premise__card {
    border-color: #bbb;
  }

  section {
    break-inside: avoid-page;
  }
}
