/* =========================================================================
   Secure Acceleration — site styles
   Layout and components. Every colour comes from a token in palettes.css.
   ========================================================================= */

:root {
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 42rem;
  /* The outer column. The masthead fills it; the text sits centred within. */
  --wide: 66rem;
  /* How far figures and equations may extend past the text column. */
  --bleed: 0rem;
}

/* ------------------------------------------------------------------ base */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  -webkit-text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; }

a { color: inherit; }

::selection { background: var(--accent-soft); }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-family: var(--sans);
  font-size: 0.85rem;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---------------------------------------------------------------- layout */

main { min-width: 0; padding: 0 clamp(1.25rem, 4vw, 2.5rem) 6rem; }

/* -------------------------------------------------------------- chapters */

.chapter { max-width: var(--measure); margin: 0 auto; padding-top: clamp(2.5rem, 6vw, 4.5rem); }

.chapter-head { margin-bottom: 2.5rem; }

.chapter-title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.chapter-thesis {
  margin: 1.1rem 0 0;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-2);
}

/* Illustrations carry their own paper; a frame would only fight it. */
.chapter-hero { margin: 0 0 2.5rem; }

/* --------------------------------------------------- home link + contents */

/* One block, centred, so the gutters either side of it always match. */
.masthead {
  display: grid;
  grid-template-columns: auto auto;
  align-items: start;
  column-gap: clamp(2rem, 5vw, 4rem);
  width: fit-content;
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(2.5rem, 5vw, 3.75rem);
}

/* The wordmark is sized and placed off the nav beside it, so the ink of its
   two lines starts and ends exactly where the nav's three rows do: the cap of
   "Secure" on the cap of the first row, the baseline of "Acceleration" on the
   baseline of the third.

   Matching the boxes is not enough for that — a line box carries half-leading
   above the cap and a descender's worth below the baseline — so both are
   solved from Newsreader's own metrics, measured from the loaded font:

     size   F = (Fn(2·leading-n + cap) + 2·gap) / (leading-w + cap)
     shift  = nav-offset + Fn·k(leading-n) − F·k(leading-w),
              k(L) = (L − asc − desc)/2 + asc − cap

   Change the nav's size, leading or gap and the wordmark follows both ways. */
.masthead {
  --nav-size: clamp(0.95rem, 1.15vw, 1.06rem);
  --nav-leading: 1.35;
  --nav-gap: 0.55rem;
  --nav-offset: 0.3rem;
  --wordmark-leading: 1.1;

  /* Newsreader, as a fraction of the em. */
  --cap: 0.73;
  --asc: 0.74;
  --desc: 0.27;

  --wordmark-size: calc(
    (var(--nav-size) * (2 * var(--nav-leading) + var(--cap)) + 2 * var(--nav-gap)) /
      (var(--wordmark-leading) + var(--cap))
  );
  --wordmark-shift: calc(
    var(--nav-offset) +
      var(--nav-size) * ((var(--nav-leading) - var(--asc) - var(--desc)) / 2 + var(--asc) - var(--cap)) -
      var(--wordmark-size) *
      ((var(--wordmark-leading) - var(--asc) - var(--desc)) / 2 + var(--asc) - var(--cap))
  );
}

.masthead-title {
  display: block;
  max-width: 7em;
  margin-top: var(--wordmark-shift);
  font-size: var(--wordmark-size);
  font-weight: 600;
  line-height: var(--wordmark-leading);
  letter-spacing: -0.005em;
  text-decoration: none;
  color: var(--ink);
}
.masthead-title span { display: block; }

/* Three rows, each centred under the last. The starts of the words are not
   made to line up; the rows are. */
.masthead-nav {
  display: grid;
  gap: var(--nav-gap);
  margin-top: var(--nav-offset);
  font-size: var(--nav-size);
  line-height: var(--nav-leading);
}

.masthead-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem clamp(1.1rem, 2.1vw, 1.85rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.masthead-nav a,
.masthead-nav [aria-current="page"] {
  color: var(--ink);
  text-decoration: none;
  transition: color 160ms ease;
}
.masthead-nav a:hover { text-decoration: underline; text-underline-offset: 0.16em; }
.masthead-nav [aria-current="page"] { color: var(--ink-3); }

.masthead-num { margin-right: 0.3rem; color: var(--ink-3); }

@media (max-width: 52rem) {
  .masthead {
    grid-template-columns: minmax(0, 1fr);
    width: auto;
    row-gap: 1.1rem;
    padding-bottom: 2.25rem;
  }
  /* Stacked: the wordmark runs on one line above the nav, so it has no
     three-row height to match and takes its own size again. */
  .masthead-title {
    max-width: none;
    margin-top: 0;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
  }
  .masthead-title span { display: inline; }
  .masthead-title span + span::before { content: " "; }
}

/* Vertical, nested, collapsible — a plain box, no JavaScript. */
.toc-inline {
  margin: 0 0 3rem;
  border: 1px solid var(--rule);
  padding: 1rem 1.25rem;
}

.toc-inline > summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  list-style: none;
  cursor: pointer;
  color: var(--ink-3);
  font-size: 0.95rem;
}
.toc-inline > summary::-webkit-details-marker { display: none; }
.toc-inline > summary:hover { color: var(--ink); }

.toc-inline > summary::before {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 180ms ease;
}
.toc-inline[open] > summary::before { transform: rotate(45deg); }

.toc-inline-list { list-style: none; margin: 0.85rem 0 0.1rem; padding: 0; }
.toc-inline-list > li { margin: 0; }

.toc-inline a {
  display: inline-block;
  padding: 0.2rem 0;
  font-size: 1rem;
  line-height: 1.45;
  color: inherit;
  text-decoration: none;
}
.toc-inline a:hover { text-decoration: underline; text-underline-offset: 0.16em; }

.toc-sub { list-style: none; margin: 0 0 0.3rem; padding: 0 0 0 1.4rem; }
.toc-sub a { color: var(--ink-2); font-size: 0.96rem; }

/* ----------------------------------------------------------------- prose */

.prose > p { margin: 0 0 1.35rem; }

/* A hairline that only changes colour on hover. Nothing thickens or shifts. */
.prose a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.16em;
  transition: text-decoration-color 160ms ease, color 160ms ease;
}
.prose a:hover,
.prose a:focus-visible { text-decoration-color: var(--accent); color: var(--accent); }

.prose h2 {
  margin: 3.5rem 0 1.25rem;
  font-size: clamp(1.6rem, 3.4vw, 2rem);
  line-height: 1.18;
  font-weight: 600;
  letter-spacing: -0.015em;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
}

.prose h3 {
  margin: 2.75rem 0 1rem;
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.25;
}

/* The source marks a sub-topic with ***Run-in heading.*** — a third-level
   heading, so it is set as one, not as a small label. */
.prose h3.run-in {
  margin: 2.5rem 0 0.9rem;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-transform: none;
  color: var(--ink);
}

.heading-anchor {
  background: none !important;
  padding: 0 0 0 0.45rem;
  color: var(--ink-3);
  opacity: 0;
  font-weight: 400;
  text-decoration: none;
}
h2:hover .heading-anchor,
h3:hover .heading-anchor,
.heading-anchor:focus { opacity: 1; }

.prose strong { font-weight: 700; }
.prose em { font-style: italic; }

.prose p.has-lead-in > em > strong {
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.93em;
  letter-spacing: -0.005em;
}

.prose ul,
.prose ol { margin: 0 0 1.5rem; padding-left: 1.35rem; }
.prose li { margin-bottom: 0.55rem; }
.prose li::marker { color: var(--ink); }

.prose blockquote {
  margin: 2.5rem 0;
  padding: 0 0 0 1.4rem;
  border-left: 2px solid var(--accent);
  font-size: 1.3rem;
  line-height: 1.45;
  font-style: italic;
  color: var(--ink-2);
}
.prose blockquote p { margin: 0 0 0.4rem; }
.prose blockquote p:last-child {
  font-size: 0.82rem;
  font-family: var(--sans);
  font-style: normal;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* --------------------------------------------------------------- figures */

.figure,
.equation-figure {
  margin: 2.75rem 0;
  width: calc(100% + 2 * var(--bleed));
  margin-inline: calc(-1 * var(--bleed));
}

/* Only widen once the layout actually has room either side of the text. */
@media (min-width: 72rem) { :root { --bleed: 3rem; } }
@media (min-width: 85rem) { :root { --bleed: 5.5rem; } }

.figure-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--figure-bg);
  cursor: zoom-in;
  overflow: hidden;
}
.figure-zoom:hover { border-color: var(--rule-strong); }

.figure figcaption {
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.figure figcaption a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.figure figcaption a:hover { color: var(--accent); }
.figure figcaption strong { color: var(--ink-2); font-weight: 600; }

.figure--full .figure-zoom { border: 0; background: none; }

/* ------------------------------------------------------------- equations */

/* Each operator travels with the term that follows it, so a wrap never strands
   a dangling multiplication sign or splits a term from its under-brace. */
.equation {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem 0.6rem;
  padding: 1.9rem 1.1rem 1.5rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-2);
  font-family: var(--sans);
}

.eq-term { display: flex; flex: none; align-items: flex-start; gap: 0.6rem; }

.eq-lhs {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.15;
  font-size: 0.88rem;
  font-weight: 600;
  padding-top: 0.55rem;
}
.eq-lhs span:last-child { color: var(--ink-3); font-weight: 500; font-size: 0.75rem; }

.eq-op { flex: none; padding-top: 0.6rem; font-size: 1.1rem; color: var(--ink-3); }
.eq-op--inner { padding-top: 0; align-self: center; font-size: 0.9rem; }

.eq-unit { display: flex; flex: none; flex-direction: column; align-items: center; gap: 0.45rem; }
.eq-boxes { display: flex; align-items: stretch; gap: 0.45rem; }

.eq-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.65rem;
  min-height: 2.4rem;
  border: 1px solid var(--rule-strong);
  border-radius: 3px;
  background: var(--paper);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
}
.eq-box--accent { border-color: var(--accent); color: var(--accent); }

.eq-box--frac { flex-direction: column; gap: 0.1rem; padding: 0.35rem 0.7rem; }
.eq-num { font-size: 0.85rem; }
.eq-den {
  font-size: 0.85rem;
  border-top: 1px solid currentColor;
  padding-top: 0.1rem;
}

.eq-brace {
  width: 100%;
  height: 0.45rem;
  border: 1px solid var(--rule-strong);
  border-top: 0;
  border-radius: 0 0 5px 5px;
  position: relative;
}
.eq-brace::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.3rem;
  width: 1px;
  height: 0.3rem;
  background: var(--rule-strong);
}

.eq-label {
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: center;
  max-width: 11rem;
  line-height: 1.35;
}

.equation-figure figcaption {
  margin-top: 0.85rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--ink-3);
}

@media (max-width: 38rem) {
  .equation { padding: 1.4rem 0.8rem 1.15rem; gap: 1.2rem 0.45rem; }
  .eq-lhs { width: 100%; align-items: flex-start; }
  .eq-box { font-size: 0.78rem; padding: 0.45rem 0.5rem; min-height: 2.15rem; }
  .eq-label { font-size: 0.58rem; max-width: 7.5rem; }
}

/* ----------------------------------------------------------------- notes */

.note {
  margin: 2.5rem 0;
  padding: 1.5rem 1.6rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--rule-strong);
  border-radius: 3px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-2);
}
.note > p { margin: 0 0 1rem; }
.note > p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink); }

.note-label {
  font-family: var(--sans);
  font-size: 0.68rem !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.75rem !important;
}

/* --------------------------------------------------------- call to action */

.cta {
  margin: 3.5rem 0 1rem;
  padding: 2rem 1.9rem 1.75rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent-soft);
}

.cta-kicker {
  margin: 0 0 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  /* The deeper accent: the tinted box costs the plain one its 4.5:1. */
  color: var(--accent-ink);
}

.cta-title {
  margin: 0 0 1.25rem;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 600;
}

.cta-body { font-size: 1rem; line-height: 1.6; }
.cta-body p { margin: 0 0 1.1rem; }
.cta-body p:last-child { margin-bottom: 0; }
.cta-body h3.run-in { margin: 1.5rem 0 0.5rem; }
.cta-body p.has-lead-in > em > strong {
  display: block;
  font-style: normal;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.cta-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
}
.cta-body a:hover { color: var(--accent-ink); }

/* -------------------------------------------------------------- timeline */

.timeline { list-style: none; margin: 2.25rem 0; padding: 0; }
.timeline > li {
  position: relative;
  padding: 0 0 1.75rem 1.9rem;
  border-left: 1px solid var(--rule-strong);
  margin: 0;
}
.timeline > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline > li::before {
  content: "";
  position: absolute;
  left: -0.3rem;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--ink);
}
.timeline-when {
  margin: 0 0 0.35rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.timeline-what p { margin: 0 0 0.6rem; }
.timeline-what p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------- proposals */

.chapter--cta .prose > p { font-size: 1.16rem; }

.proposal {
  margin: 2.5rem 0;
  padding: 1.9rem 1.8rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper-2);
}
.proposal-number {
  margin: 0 0 0.7rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.prose h2.proposal-title,
.proposal-title {
  margin: 0 0 1.1rem;
  font-size: 1.42rem;
  line-height: 1.28;
  font-weight: 600;
  border: 0;
  padding: 0;
}
.proposal-items { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.proposal-items li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: 0.6rem;
  font-size: 1.02rem;
  color: var(--ink-2);
}
.proposal-items li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.55rem;
  height: 1px;
  background: var(--ink);
}
.proposal-link {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
  text-decoration: none;
}
.proposal-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------- pager */

.pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rule);
  /* The previous/next titles are the report's own page names, so they read in
     the text face rather than the furniture's. */
  font-family: var(--serif);
}
.pager-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  max-width: 48%;
}
.pager-next { text-align: right; margin-left: auto; }
.pager-dir {
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pager-title { font-size: 1rem; font-weight: 600; color: var(--ink); }
.pager-num { color: var(--ink-3); font-weight: 400; margin-right: 0.4rem; }
.pager-link:hover .pager-title { color: var(--accent); }

/* ------------------------------------------------------------ title page */

.hero-eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hero-tagline {
  margin: 1.1rem 0 0;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.35;
  color: var(--ink-2);
  font-style: italic;
}

.hero-authors {
  margin: 2.25rem 0 0.35rem;
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
}
.toc-head {
  margin: 0 0 1.5rem;
  font-size: clamp(1.7rem, 3.6vw, 2.1rem);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.toc-intro {
  max-width: 38rem;
  margin: 0 0 2.25rem;
  font-size: 1.05rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--ink-2);
}
.toc-intro a { color: inherit; text-decoration: underline; text-underline-offset: 0.16em; }
.toc-intro strong { font-style: normal; font-weight: 600; color: var(--ink); }

.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list > li { margin: 0 0 1.75rem; }

.toc-list > li:last-child { margin-bottom: 0; }

/* Parts of a page are inset beneath it, whole: numeral, title and thesis all
   move together, so everything in the entry still shares one left edge. */
.toc-item--part { padding-left: 2rem; }

/* Otherwise the contents runs flush left: the numeral sits a word-space from
   its title rather than in a column of its own, and the thesis starts under
   the numeral, not under the title. */
.toc-line {
  display: flex;
  gap: 0.4rem;
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}
.toc-num { flex: none; color: var(--ink-3); font-weight: 400; }
.toc-line a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--rule-strong);
  transition: text-decoration-color 160ms ease;
}
.toc-line a:hover { text-decoration-color: currentColor; }

.toc-thesis {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.6;
}

/* ------------------------------------------------------------- lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(15, 13, 11, 0.9);
  backdrop-filter: blur(4px);
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  background: #fff;
  border-radius: 4px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

/* ------------------------------------------------------------ responsive */


@media (max-width: 38rem) {
  body { font-size: 1.06rem; }
  .pager { flex-direction: column; gap: 1.5rem; }
  .pager-link, .pager-next { max-width: 100%; text-align: left; margin-left: 0; }
}

/* ---------------------------------------------------------------- print */

@media print {
  .controls, .pager, .toc-inline, .masthead-nav, .lightbox { display: none !important; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .chapter { max-width: none; }
  .figure-zoom { break-inside: avoid; }
}

/* ------------------------------------------------------- floating controls */

.controls {
  position: fixed;
  right: clamp(0.85rem, 2vw, 1.5rem);
  bottom: calc(clamp(0.85rem, 2vw, 1.5rem) + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  font-family: var(--sans);
}

.control-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.5rem;
  padding: 0 0.85rem 0 0.75rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.control-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.control-btn[hidden] { display: none; }

/* The icon shows the theme the button switches to. */
.theme-icon { width: 1rem; height: 1rem; flex: none; }
.theme-icon--sun { display: none; }
:root[data-theme="dark"] .theme-icon--moon { display: none; }
:root[data-theme="dark"] .theme-icon--sun { display: block; }

@media print {
  .controls { display: none !important; }
}

/* ----------------------------------------------------- introduction contents */

.report-toc {
  margin: 4.5rem 0 0;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}

/* ------------------------------------------------------------ sign-off */

.ack {
  margin: 4rem 0 0;
  font-size: 0.95rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-3);
}
.ack p { margin: 0 0 0.8rem; }
.ack p:last-child { margin-bottom: 0; }
.ack a { color: inherit; text-decoration: underline; text-underline-offset: 0.16em; }

/* ------------------------------------------------------------- front page */

/* The first page is the title page as well as the introduction. */
.chapter-head--home { margin-bottom: 2.5rem; container-type: inline-size; }

/* "Secure Acceleration:" runs on one line, the colon handing over to the
   subtitle beneath. The line is 8.93em wide in this face, so sizing it at
   a ninth of the column keeps it on one line at any width, up to the old
   5.4rem cap on wide screens. */
.chapter-head--home .chapter-title {
  font-size: min(5.4rem, calc(100cqi / 9));
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.chapter-head--home .hero-eyebrow { margin-bottom: 1.25rem; }
.chapter-head--home .hero-tagline { margin-top: 1.1rem; }
.chapter-head--home .hero-authors { margin: 1.75rem 0 0; }

/* Parts of a page, listed on the parent page itself. */
.toc-list--parts { margin-top: 2.5rem; }
