/* ==========================================================================
   The Decision Factory — design system
   Editorial, print-derived, built for executives reading on a laptop.
   Ink and structure follow management-consulting convention: deep navy,
   generous white, thin rules, serif headlines over a neutral sans.
   Chart hues are validated for colour-vision deficiency; see .series-* below.
   ========================================================================== */

:root {
  /* ink */
  --ink:        #051C2C;   /* headlines, dark bands */
  --ink-2:      #2B4257;   /* body copy */
  --ink-3:      #5A6E7F;   /* secondary */
  --ink-4:      #8496A4;   /* captions, sources */

  /* surface */
  --paper:      #FFFFFF;
  --paper-2:    #F5F7F9;   /* tinted blocks */
  --paper-3:    #EDF1F4;
  --rule:       #DCE3E8;
  --rule-soft:  #E9EEF1;

  /* accent */
  --blue:       #2251FF;   /* links, primary emphasis */
  --blue-deep:  #163BC4;
  --cyan:       #00A9F4;   /* accent on dark bands only */
  --amber:      #B45309;   /* the opposing cost, in exhibits */
  --teal:       #0B7A5D;
  --violet:     #7C3AED;

  /* validated categorical series (white surface) */
  --s1: #2251FF;
  --s2: #B45309;
  --s3: #0B7A5D;
  --s4: #7C3AED;

  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --measure: 34rem;        /* the text column */
  --page:    74rem;        /* the outer container */
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

::selection { background: rgba(34, 81, 255, 0.16); }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   Layout primitives
   -------------------------------------------------------------------------- */

.shell { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 2rem; }

@media (max-width: 700px) { .shell { padding: 0 1.25rem; } }

/* The article grid: a numbered rail, the text column, and room to breathe.
   Exhibits opt out of the measure and run the full grid width. */
.article {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, var(--measure)) minmax(0, 1fr);
  column-gap: 2.5rem;
}

.article > * { grid-column: 2; }
.article > .full { grid-column: 2 / -1; }
.article > .rail { grid-column: 1; }

@media (max-width: 1080px) {
  .article { grid-template-columns: 3rem minmax(0, 1fr); column-gap: 1.5rem; }
  .article > .full { grid-column: 2 / -1; }
}

@media (max-width: 700px) {
  .article { grid-template-columns: minmax(0, 1fr); }
  .article > *, .article > .full { grid-column: 1; }
  .article > .rail { display: none; }
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}

.topbar .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.25rem;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.06rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark .mk { color: var(--blue); }

.topnav { display: flex; align-items: center; gap: 1.9rem; }

.topnav a {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.18s ease;
  white-space: nowrap;
}

.topnav a:hover, .topnav a:focus-visible, .topnav a[aria-current] { color: var(--blue); }

@media (max-width: 640px) {
  .topnav { gap: 1.1rem; }
  .topnav a.hide-sm { display: none; }
}

/* reading progress */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  background: var(--blue);
  z-index: 60;
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 1.1rem;
}

.eyebrow.on-dark { color: var(--cyan); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.016em;
  line-height: 1.14;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); line-height: 1.2; }
h3 { font-size: 1.16rem; line-height: 1.3; letter-spacing: -0.008em; }

p { margin: 0 0 1.15rem; }

strong { color: var(--ink); font-weight: 600; }

em { font-style: italic; }

.lede {
  font-size: clamp(1.09rem, 1.6vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-3);
  font-weight: 400;
}

a.link {
  color: var(--blue);
  text-decoration: none;
  border-bottom: 1px solid rgba(34, 81, 255, 0.32);
  transition: border-color 0.18s ease;
}

a.link:hover, a.link:focus-visible { border-bottom-color: var(--blue); }

/* --------------------------------------------------------------------------
   Dark band — used for the home hero and paper mastheads
   -------------------------------------------------------------------------- */

.band {
  background: var(--ink);
  color: #E6EDF2;
  position: relative;
  overflow: hidden;
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(52rem 30rem at 88% -20%, rgba(0, 169, 244, 0.16), transparent 62%);
}

.band .shell { position: relative; z-index: 1; }

.band h1, .band h2 { color: #FFFFFF; }

.band p { color: #B7C6D2; }

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */

.hero { padding: clamp(3rem, 9vw, 7.5rem) 2rem clamp(2.75rem, 8vw, 6.5rem); }

.hero h1 { max-width: 24ch; }

.hero .lede { max-width: 48ch; margin-top: 1.6rem; color: #B7C6D2; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.75rem;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-meta div { min-width: 8rem; }

.hero .btn-row { margin-top: 2.25rem; }

.hero-meta dt {
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #7C93A5;
  margin-bottom: 0.3rem;
}

.hero-meta dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.22rem;
  color: #FFFFFF;
  font-weight: 600;
}

/* section heading used across the home page */
.sec { padding: clamp(2.75rem, 6vw, 5.25rem) 0; }
.sec + .sec { border-top: 1px solid var(--rule); }

.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
  gap: 1rem 3.5rem;
  align-items: start;
  margin-bottom: 2.75rem;
}

.sec-head h2 { max-width: 16ch; }

.sec-head .sec-note {
  font-size: 0.98rem;
  color: var(--ink-3);
  max-width: 46ch;
  margin: 0;
}

@media (max-width: 800px) {
  .sec-head { grid-template-columns: 1fr; gap: 0.9rem; margin-bottom: 2rem; }
}

/* three findings, the report-landing strip */

.findings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2.5rem 3rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.75rem;
}

.finding .fnum {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--blue);
  margin: 0 0 0.75rem;
}

.finding h3 {
  font-size: 1.18rem;
  line-height: 1.28;
  margin: 0 0 0.75rem;
  max-width: 20ch;
}

.finding p {
  font-size: 0.95rem;
  line-height: 1.62;
  color: var(--ink-3);
  margin: 0 0 0.9rem;
}

.finding .fref {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.finding .fref a { border-bottom: 0; }

@media (max-width: 700px) {
  .findings { gap: 2rem; padding-top: 1.35rem; }
  .finding { border-bottom: 1px solid var(--rule); padding-bottom: 1.75rem; }
  .finding:last-child { border-bottom: 0; padding-bottom: 0; }
  .finding h3 { max-width: none; }
}

/* the series index */
.index-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) 8.5rem;
  gap: 0 1.75rem;
  align-items: baseline;
  padding: 1.5rem 0.75rem 1.5rem 0;
  border-top: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.18s ease;
}

.index-row:last-child { border-bottom: 1px solid var(--rule); }

a.index-row:hover, a.index-row:focus-visible { background: var(--paper-2); }

.ix-num {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

a.index-row .ix-num { color: var(--blue); }

.ix-title {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.014em;
  line-height: 1.25;
  transition: color 0.18s ease;
}

a.index-row:hover .ix-title { color: var(--blue); }

.ix-kind {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-4);
}

.ix-q {
  grid-column: 2;
  margin: 0.5rem 0 0;
  font-size: 0.96rem;
  color: var(--ink-3);
  line-height: 1.6;
  max-width: 52ch;
}

.ix-q b { color: var(--ink-2); font-weight: 600; }

.ix-state {
  font-size: 0.7rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink-4);
  text-align: right;
  white-space: nowrap;
}

a.index-row .ix-state { color: var(--blue); }

.index-row.soon .ix-title { color: var(--ink-3); }
.index-row.soon .ix-q { color: var(--ink-4); }

@media (max-width: 760px) {
  .index-row { grid-template-columns: 2.5rem minmax(0, 1fr); padding-right: 0; }
  .ix-state { grid-column: 2; text-align: left; margin-top: 0.6rem; }
}

/* --------------------------------------------------------------------------
   Paper masthead + body
   -------------------------------------------------------------------------- */

/* Papers run narrower than the home page, and the masthead is indented to sit
   on the same left edge as the text column below it. */
.paper-head, .paper-body { max-width: 66rem; }

.paper-head { padding: clamp(3rem, 6vw, 5rem) 2rem clamp(2.5rem, 5vw, 4rem); }

@media (min-width: 1081px) { .paper-head { padding-left: 9rem; } }
@media (min-width: 701px) and (max-width: 1080px) { .paper-head { padding-left: 6.5rem; } }

.paper-head h1 { max-width: 20ch; }

.paper-head .lede { max-width: 52ch; margin-top: 1.5rem; color: #B7C6D2; }

.byline {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2.25rem;
  font-size: 0.83rem;
  color: #8FA5B4;
}

.byline b, .byline a {
  color: #FFFFFF;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.byline a:hover, .byline a:focus-visible { border-bottom-color: var(--cyan); color: var(--cyan); }

.paper-body { padding: clamp(3rem, 6vw, 4.75rem) 2rem 5rem; }

/* Sections span the whole grid so exhibits and tables can use the outer
   column; the prose inside them is held to the reading measure. */
.paper-body .article > section {
  grid-column: 2 / -1;
  margin-bottom: 3.25rem;
  scroll-margin-top: 5.5rem;
}

.paper-body h2 { margin-bottom: 1.15rem; max-width: 26ch; }

.paper-body h3 { margin: 2.25rem 0 0.75rem; max-width: 32ch; }

.paper-body p,
.paper-body ol.args,
.paper-body .callout { max-width: var(--measure); }

@media (max-width: 700px) {
  .paper-body .article > section { grid-column: 1; }
}

/* the numbered rail beside each section */
.rail-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-4);
  letter-spacing: 0.05em;
  padding-top: 0.55rem;
  border-top: 2px solid var(--ink);
  display: block;
}

/* executive summary */
.summary {
  background: var(--ink);
  color: #D5E0E8;
  border-radius: 3px;
  padding: clamp(1.75rem, 3vw, 2.4rem);
  margin: 0 0 3.25rem;
}

.summary .eyebrow { color: var(--cyan); margin-bottom: 1.15rem; }

.summary ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sm;
  display: grid;
  gap: 1.05rem;
}

.summary li {
  counter-increment: sm;
  position: relative;
  padding-left: 2.25rem;
  font-size: 1.005rem;
  line-height: 1.62;
  color: #C6D4DE;
}

.summary li::before {
  content: counter(sm, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--cyan);
}

.summary li b { color: #FFFFFF; font-weight: 600; }

/* key-point callout */
.callout {
  border-left: 3px solid var(--blue);
  background: var(--paper-2);
  padding: 1.35rem 1.6rem;
  margin: 2rem 0;
  border-radius: 0 3px 3px 0;
}

.callout .label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 0.6rem;
}

.callout p { margin: 0 0 0.7rem; font-size: 0.99rem; max-width: none; }
.callout p:last-child { margin-bottom: 0; }

/* pull quote */
.pull {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.68rem);
  line-height: 1.32;
  letter-spacing: -0.014em;
  color: var(--ink);
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 3px solid var(--blue);
  max-width: 30ch;
}

/* numbered argument list */
ol.args {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: ar;
  max-width: var(--measure);
}

ol.args li {
  counter-increment: ar;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 1.05rem;
}

ol.args li::before {
  content: counter(ar);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid var(--rule);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--blue);
  background: var(--paper);
}

/* --------------------------------------------------------------------------
   Exhibits
   -------------------------------------------------------------------------- */

.exhibit {
  margin: 2.75rem 0 3rem;
  border-top: 2px solid var(--ink);
  padding-top: 1rem;
  max-width: 54rem;
}

.exhibit-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 0.4rem;
}

.exhibit h4 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.32;
  margin: 0 0 1.35rem;
  max-width: 62ch;
}

.exhibit figure { margin: 0; }

.exhibit svg { display: block; width: 100%; height: auto; overflow: visible; }

.exhibit .source {
  margin: 1.1rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--ink-4);
  max-width: none;
}

.exhibit .source b { color: var(--ink-3); font-weight: 600; }

/* chart furniture */
.ch-axis  { stroke: var(--rule); stroke-width: 1; }
.ch-grid  { stroke: var(--rule-soft); stroke-width: 1; }
.ch-label { font-family: var(--sans); font-size: 12px; fill: var(--ink-3); }
.ch-tick  { font-family: var(--sans); font-size: 11px; fill: var(--ink-4); }
.ch-value { font-family: var(--sans); font-size: 12px; font-weight: 600; fill: var(--ink); }
.ch-note  { font-family: var(--sans); font-size: 11.5px; fill: var(--ink-3); }
.ch-key   { font-family: var(--sans); font-size: 12px; fill: var(--ink-2); }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.legend i {
  width: 11px;
  height: 11px;
  border-radius: 2px;
  flex: none;
}

/* --------------------------------------------------------------------------
   Tables (used for role transitions, checklists, comparisons)
   -------------------------------------------------------------------------- */

.tbl-wrap { overflow-x: auto; margin: 2rem 0 2.5rem; max-width: 54rem; }

table.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 34rem;
}

table.tbl caption {
  text-align: left;
  font-size: 0.78rem;
  color: var(--ink-4);
  padding-bottom: 0.7rem;
}

table.tbl th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 1.1rem 0.65rem 0;
  border-bottom: 2px solid var(--ink);
  vertical-align: bottom;
}

table.tbl td {
  padding: 0.95rem 1.1rem 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  line-height: 1.55;
  color: var(--ink-2);
}

table.tbl td:first-child { color: var(--ink); font-weight: 600; }

table.tbl tr:last-child td { border-bottom: 1px solid var(--rule); }

/* --------------------------------------------------------------------------
   Contents
   -------------------------------------------------------------------------- */

.contents {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 1.4rem 0;
  margin: 0 0 3rem;
  max-width: 54rem;
}

.contents h2 {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin: 0 0 0.85rem;
}

.contents ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tc;
  columns: 2;
  column-gap: 2.5rem;
}

.contents li { counter-increment: tc; break-inside: avoid; margin-bottom: 0.4rem; }

.contents a {
  font-size: 0.93rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.18s ease;
}

.contents a::before {
  content: counter(tc, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-4);
  margin-right: 0.65rem;
}

.contents a:hover, .contents a:focus-visible { color: var(--blue); }

@media (max-width: 640px) { .contents ol { columns: 1; } }

/* --------------------------------------------------------------------------
   End-of-paper contact CTA
   -------------------------------------------------------------------------- */

.paper-cta {
  max-width: 54rem;
  margin: 2.75rem 0 0;
  padding: 1.6rem 1.75rem 1.75rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue);
  border-radius: 0 3px 3px 0;
  background: var(--paper-2);
}

.paper-cta .cta-label {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 0.65rem;
}

.paper-cta .cta-title {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.014em;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.7rem;
}

.paper-cta .cta-body {
  font-size: 0.99rem;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
  max-width: 40rem;
}

.paper-cta-form {
  background: transparent;
  border: none;
  padding: 0;
  gap: 0.95rem;
  max-width: 32rem;
}

.paper-cta-form .form-grid-2 { gap: 0.95rem; }

.paper-cta-form .form-row textarea { min-height: 5.5rem; }

/* --------------------------------------------------------------------------
   Next / prev paper
   -------------------------------------------------------------------------- */

.jump {
  border-top: 2px solid var(--ink);
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 3rem;
  max-width: 54rem;
}

.jump a { text-decoration: none; color: inherit; display: block; }

.jump .jl {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 0.4rem;
}

.jump .jt {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.28;
  transition: color 0.18s ease;
}

.jump a:hover .jt, .jump a:focus-visible .jt { color: var(--blue); }

/* --------------------------------------------------------------------------
   The book
   -------------------------------------------------------------------------- */

.book-band { background: var(--paper-2); border-top: 1px solid var(--rule); }

.book-grid {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 3rem;
  align-items: center;
  padding: clamp(3rem, 5vw, 4.5rem) 0;
}

.book-grid img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 1.25rem 2.5rem rgba(5, 28, 44, 0.18);
}

.book-grid h2 { max-width: 18ch; }

.book-grid .lede { margin: 1rem 0 1.5rem; max-width: 44ch; font-size: 1.03rem; }

.book-meta {
  font-size: 0.88rem;
  color: var(--ink-3);
  margin: 0 0 1.6rem;
}

.book-meta b { color: var(--ink); font-weight: 600; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: background-color 0.18s ease;
}

.btn:hover, .btn:focus-visible { background: var(--blue-deep); }

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}

.btn.ghost:hover, .btn.ghost:focus-visible { border-color: var(--ink); background: transparent; }

.btn.on-dark { background: #FFFFFF; color: var(--ink); }
.btn.on-dark:hover, .btn.on-dark:focus-visible { background: #DCE9F2; }

.formats {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.formats a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.formats a:hover, .formats a:focus-visible { color: var(--blue); border-bottom-color: var(--blue); }
.formats span { color: var(--ink-4); padding: 0 0.5rem; }

.formats .audio {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.76rem;
  color: var(--ink-4);
  letter-spacing: 0.02em;
}

@media (max-width: 760px) {
  .book-grid { grid-template-columns: 9rem minmax(0, 1fr); gap: 1.75rem; }
}

@media (max-width: 520px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-grid .cover { max-width: 9rem; }
}

/* --------------------------------------------------------------------------
   About the authors
   -------------------------------------------------------------------------- */

.about-band { padding-bottom: clamp(2.5rem, 5vw, 4rem); }

.profile {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.profile + .profile { border-top: 1px solid var(--rule); }

.profile-grid {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1.25rem 2.5rem rgba(5, 28, 44, 0.16);
}

.profile-tagline {
  font-size: 0.95rem;
  color: var(--ink-3);
  font-style: italic;
  margin: 0.35rem 0 1.4rem;
  font-family: var(--serif);
}

.profile-bio p { max-width: var(--measure); }

.profile-facts {
  display: grid;
  /* Fixed column count, not auto-fit: an auto-fit/minmax(11rem,1fr) track
     nested inside another minmax(0,1fr) track computes its column count
     against unconstrained content width and can blow out past its own
     container. minmax(0,1fr) here has no such issue. */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
  margin: 1.75rem 0;
  padding: 1.35rem 1.5rem;
  background: var(--paper-2);
  border-radius: 3px;
  max-width: 42rem;
}

.profile-facts dt {
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 0.25rem;
}

.profile-facts dd { margin: 0; font-size: 0.9rem; color: var(--ink); line-height: 1.5; }

.profile-links {
  margin: 1.5rem 0 0;
  font-size: 0.85rem;
  color: var(--ink-3);
}

.profile-links a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.profile-links a:hover, .profile-links a:focus-visible { color: var(--blue); border-bottom-color: var(--blue); }
.profile-links span { color: var(--ink-4); padding: 0 0.5rem; }

.profile .pull { max-width: 34ch; }

.contact-band { background: var(--paper-2); border-top: 1px solid var(--rule); }

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: 3.5rem;
  align-items: start;
  padding: clamp(3rem, 5vw, 4.5rem) 0;
}

.contact-grid h2 { max-width: 16ch; }
.contact-grid .lede { max-width: 32ch; margin-top: 1rem; }

.contact-form {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }

.form-row { display: flex; flex-direction: column; gap: 0.4rem; }

.form-row label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

.form-row input, .form-row textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font: inherit;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.7rem 0.85rem;
  resize: vertical;
}

.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--blue); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.contact-actions { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }

button.btn { border: none; cursor: pointer; font-family: var(--sans); }

.form-status { font-size: 0.85rem; color: var(--ink-3); margin: 0; }
.form-status.is-ok { color: var(--teal); font-weight: 600; }
.form-status.is-error { color: var(--amber); font-weight: 600; }

@media (max-width: 760px) {
  .profile-grid { grid-template-columns: 8.5rem minmax(0, 1fr); gap: 1.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-grid h2, .contact-grid .lede { max-width: none; }
}

@media (max-width: 480px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-photo { max-width: 9rem; }
  .profile-facts { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

footer.site {
  background: var(--ink);
  color: #8FA5B4;
  padding: 3rem 0 2.5rem;
}

footer.site .shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.5rem 3rem;
  align-items: end;
}

footer.site .fm {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 0.4rem;
}

footer.site .fd { font-size: 0.85rem; margin: 0; max-width: 42ch; color: #8FA5B4; }

footer.site .fd a.fd-link {
  color: #C6D4DE;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(198, 212, 222, 0.35);
  transition: color 0.18s ease, border-color 0.18s ease;
}

footer.site .fd a.fd-link:hover, footer.site .fd a.fd-link:focus-visible {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.foot-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

footer.site a.foot-link,
footer.site button.foot-link {
  font: inherit;
  color: #8FA5B4;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.18s ease;
}

footer.site a.foot-link:hover, footer.site button.foot-link:hover,
footer.site a.foot-link:focus-visible, footer.site button.foot-link:focus-visible { color: var(--cyan); }

@media (max-width: 640px) {
  footer.site .shell { grid-template-columns: 1fr; align-items: start; }
}

/* --------------------------------------------------------------------------
   Cookie consent
   -------------------------------------------------------------------------- */

.consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: #FFFFFF;
  border-top: 2px solid var(--ink);
  box-shadow: 0 -0.75rem 2rem rgba(5, 28, 44, 0.12);
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.consent.is-open { transform: none; }

.consent-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 1.15rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.consent-text {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52rem;
  flex: 1 1 20rem;
}

.consent-text a { color: var(--blue); text-decoration: none; border-bottom: 1px solid rgba(34,81,255,0.3); white-space: nowrap; }

.consent-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

.consent-btn {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.65rem 1.45rem;
  border-radius: 2px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.consent-btn:hover, .consent-btn:focus-visible { background: var(--blue-deep); border-color: var(--blue-deep); }

.consent-btn.ghost { background: transparent; color: var(--ink-2); border-color: var(--rule); }
.consent-btn.ghost:hover, .consent-btn.ghost:focus-visible { background: transparent; color: var(--ink); border-color: var(--ink); }

@media (max-width: 560px) {
  .consent-inner { padding: 1rem 1.25rem; gap: 0.9rem; }
  .consent-actions { width: 100%; }
  .consent-btn { flex: 1; }
}

/* --------------------------------------------------------------------------
   Legal pages
   -------------------------------------------------------------------------- */

.legal dl.terms { margin: 1.5rem 0; max-width: var(--measure); }

.legal dl.terms dt {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--blue);
  margin-top: 1.4rem;
}

.legal dl.terms dt:first-of-type { margin-top: 0; }

.legal dl.terms dd { margin: 0.35rem 0 0; line-height: 1.65; }

.legal code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.05em 0.35em;
  color: var(--ink);
}


/* ==========================================================================
   Small screens
   The design is built on a 34rem measure and 720-unit exhibits. Below the
   stacking breakpoint the measure collapses to the viewport, the gutters have
   to be restored explicitly, and exhibits pan rather than shrink to illegible.
   ========================================================================== */

@media (max-width: 700px) {
  body { font-size: 16px; line-height: 1.62; }

  .shell { padding-left: 1.35rem; padding-right: 1.35rem; }
  .paper-body { padding-left: 1.35rem; padding-right: 1.35rem; }
  .paper-head { padding-left: 1.35rem; padding-right: 1.35rem; }
  .hero { padding-left: 1.35rem; padding-right: 1.35rem; }

  h1 { font-size: clamp(1.85rem, 8.5vw, 2.4rem); line-height: 1.15; }
  h2 { font-size: clamp(1.35rem, 6.2vw, 1.6rem); }
  .paper-body h2, .paper-body h3 { max-width: none; }

  .lede { font-size: 1.02rem; line-height: 1.55; }

  .topbar .shell { height: 3.5rem; }
  .wordmark { font-size: 0.95rem; }
  .topnav { gap: 1rem; }
  .topnav a { font-size: 0.7rem; letter-spacing: 0.04em; }

  /* buttons go full width rather than crowding two to a row */
  .btn-row { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .btn { text-align: center; padding: 0.85rem 1.25rem; }

  .hero-meta { gap: 1.1rem 1.75rem; margin-top: 2rem; padding-top: 1.4rem; }
  .hero-meta div { min-width: 6.5rem; }
  .hero-meta dd { font-size: 1.08rem; }

  .summary { padding: 1.4rem 1.25rem; margin-bottom: 2.5rem; }
  .summary li { padding-left: 1.9rem; font-size: 0.96rem; }

  .pull { font-size: 1.16rem; padding-left: 1.1rem; max-width: none; }

  .callout { padding: 1.1rem 1.15rem; }

  ol.args li { padding-left: 2.1rem; }

  .paper-body .article > section { margin-bottom: 2.5rem; }

  .contents { padding: 1.15rem 0; margin-bottom: 2.25rem; }

  .jump { gap: 1.25rem; }
}

/* Exhibits and tables pan horizontally on small screens. Shrinking a 720-unit
   chart to 350px renders its labels at about six pixels, which is not a chart. */
.plot { margin: 0; }

@media (max-width: 760px) {
  .plot, .tbl-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    margin-left: -1.35rem;
    margin-right: -1.35rem;
    padding-left: 1.35rem;
    padding-right: 1.35rem;
  }
  .plot > svg { min-width: 33rem; }
  table.tbl { min-width: 40rem; }

  .plot::after, .tbl-wrap::after {
    content: "Scroll to see the whole exhibit";
    display: block;
    padding-top: 0.6rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-4);
  }
  .tbl-wrap::after { content: "Scroll to see the whole table"; }

  .exhibit { margin: 2rem 0 2.25rem; }
  .exhibit h4 { font-size: 1.02rem; max-width: none; margin-bottom: 0.9rem; }
  .exhibit .source { font-size: 0.75rem; }
}

/* Very small handsets */
@media (max-width: 380px) {
  .shell, .paper-body, .paper-head, .hero { padding-left: 1.1rem; padding-right: 1.1rem; }
  .plot, .tbl-wrap { margin-left: -1.1rem; margin-right: -1.1rem; padding-left: 1.1rem; padding-right: 1.1rem; }
  /* The wordmark (nowrap, serif, bold) plus the two visible nav links no
     longer both fit at the narrowest handset widths (~320px); this is what
     actually overflows there, not any page's own content. */
  .topbar .shell { gap: 0.5rem; }
  .wordmark { font-size: 0.86rem; }
  .topnav { gap: 0.55rem; }
  .topnav a { font-size: 0.7rem; letter-spacing: 0.03em; }
}
