/* ================================================================== *
 * Legion — design system
 * Friendly & soft, warm light theme derived from the logo's
 * orange → crimson gradient. Fully responsive, accessible.
 * ================================================================== */

/* ---- Fonts (self-hosted, latin subset) --------------------------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/fraunces.woff2") format("woff2-variations");
}
@font-face {
  font-family: "Jakarta";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/assets/fonts/jakarta.woff2") format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("/assets/fonts/mono.woff2") format("woff2-variations");
}

/* ---- Tokens ------------------------------------------------------ */
:root {
  --ink: #2c1a10;
  --ink-soft: #6a5445;
  --ink-faint: #9c8879;
  --paper: #fbf6ef;
  --paper-2: #f5ece1;
  --card: #ffffff;
  --line: #ecddcd;
  --line-soft: #f3e8db;

  --brand: #e8712f;
  --brand-strong: #d9531f;
  --brand-deep: #b3311d;
  --brand-tint: #fce7d6;
  --brand-tint-2: #fdf3ea;
  --brand-ink: #8f2a17;

  --teal: #22736f;
  --teal-tint: #e4f0ee;
  --gold: #c98a25;
  --gold-tint: #f8edd4;

  --grad: linear-gradient(135deg, #f4a259 0%, #e8712f 45%, #c13a24 100%);
  --grad-soft: linear-gradient(135deg, #fdf3ea 0%, #fce7d6 100%);

  --shadow-xs: 0 1px 2px rgba(90, 42, 18, 0.06);
  --shadow-sm: 0 2px 6px -2px rgba(90, 42, 18, 0.12);
  --shadow: 0 12px 30px -14px rgba(120, 50, 20, 0.22);
  --shadow-lg: 0 30px 70px -28px rgba(120, 50, 20, 0.34);

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --r-xl: 36px;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Jakarta", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1240px;
  --reading: 43rem;
  --sidebar-w: 300px;
  --toc-w: 220px;
  --topbar-h: 68px;

  --soft: "SOFT" 55, "opsz" 40, "WONK" 0;
}

/* ---- Reset ------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + 20px);
}
body {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  background-image: radial-gradient(
      1200px 600px at 90% -10%,
      #fdeede 0%,
      transparent 60%
    ),
    radial-gradient(900px 500px at -10% 0%, #fbeadd 0%, transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--brand-deep);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button {
  font: inherit;
  cursor: pointer;
}
input {
  font: inherit;
}
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 12px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--r-xs);
  transition: top 0.2s;
}
.skip-link:focus {
  top: 12px;
}

/* ---- Brand ------------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover {
  text-decoration: none;
}
.brand__logo {
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.32rem;
  font-variation-settings: var(--soft);
  letter-spacing: -0.01em;
}
.brand__tag {
  font-size: 0.72rem;
  color: var(--ink-faint);
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* ---- Top bar ----------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  height: var(--topbar-h);
  background: rgba(251, 246, 239, 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar__inner {
  height: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar__nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 600;
  font-size: 0.95rem;
}
.topbar__nav a {
  color: var(--ink-soft);
}
.topbar__nav a:hover {
  color: var(--brand-deep);
  text-decoration: none;
}
.topbar__cta {
  background: var(--ink);
  color: #fff !important;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.topbar__cta:hover {
  background: var(--brand-deep);
}

/* hamburger */
.navtoggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 12px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.navtoggle__bar {
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.navtoggle[aria-expanded="true"] .navtoggle__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.navtoggle[aria-expanded="true"] .navtoggle__bar:nth-child(2) {
  opacity: 0;
}
.navtoggle[aria-expanded="true"] .navtoggle__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---- Layout ------------------------------------------------------ */
.layout {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.layout--home {
  display: block;
  max-width: none;
  padding: 0;
}

/* ---- Sidebar ----------------------------------------------------- */
.sidebar {
  position: sticky;
  top: var(--topbar-h);
  align-self: start;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  padding: 28px 8px 40px 0;
  scrollbar-width: thin;
}
.sidebar__head {
  display: none;
}
.sidenav__title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 800;
  color: var(--ink-faint);
  margin: 22px 0 8px 14px;
}
.sidenav__title:first-child {
  margin-top: 0;
}
.sidenav__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidenav__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 12px;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
  transition: background 0.15s, color 0.15s;
}
.sidenav__link:hover {
  background: var(--brand-tint-2);
  color: var(--brand-deep);
  text-decoration: none;
}
.sidenav__num {
  flex: none;
  width: 26px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-align: center;
}
.sidenav__link[aria-current="page"] {
  background: var(--grad-soft);
  color: var(--brand-deep);
  box-shadow: inset 0 0 0 1px var(--brand-tint);
}
.sidenav__link[aria-current="page"] .sidenav__num {
  color: var(--brand-strong);
}

/* ---- Main / doc -------------------------------------------------- */
.main {
  min-width: 0;
  padding: clamp(28px, 4vw, 52px) 0 40px;
}
.doc-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.doc {
  min-width: 0;
  max-width: var(--reading);
}

/* ---- Doc hero ---------------------------------------------------- */
.dochero {
  margin-bottom: 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}
.dochero__eyebrow {
  display: inline-block;
  font-weight: 800;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
  background: var(--brand-tint);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.dochero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: var(--soft);
  font-size: clamp(2.1rem, 5vw, 3.15rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.dochero__desc {
  margin-top: 16px;
  font-size: 1.24rem;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 36ch;
}
.dochero__meta {
  margin-top: 18px;
  display: flex;
  gap: 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-faint);
}
.dochero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.dochero__meta span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand);
}

/* ---- Prose typography -------------------------------------------- */
.prose {
  font-size: 1.075rem;
}
.prose > * + * {
  margin-top: 1.15em;
}
.prose h2,
.prose h3,
.prose h4 {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.15;
  scroll-margin-top: calc(var(--topbar-h) + 24px);
}
.prose h2 {
  font-size: clamp(1.55rem, 3.2vw, 1.95rem);
  margin-top: 2.4em;
  padding-top: 0.2em;
}
.prose h3 {
  font-size: 1.3rem;
  margin-top: 1.9em;
}
.prose h4 {
  font-size: 1.08rem;
  font-family: var(--font-sans);
  font-weight: 800;
  margin-top: 1.6em;
}
.prose h2 .anchor,
.prose h3 .anchor {
  color: var(--brand);
  opacity: 0;
  margin-left: 0.4em;
  font-weight: 400;
  text-decoration: none;
  transition: opacity 0.15s;
}
.prose h2:hover .anchor,
.prose h3:hover .anchor {
  opacity: 0.7;
}
.prose p {
  color: #3f2b1e;
}
.lead {
  font-size: 1.28rem;
  line-height: 1.6;
  color: var(--ink-soft);
}
.prose strong {
  font-weight: 700;
  color: var(--ink);
}
.prose a:not(.gterm):not(.doclink) {
  color: var(--brand-deep);
  text-decoration: underline;
  text-decoration-color: var(--brand-tint);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.prose a:not(.gterm):not(.doclink):hover {
  text-decoration-color: var(--brand);
}
.doclink {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--brand-tint);
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}
.doclink:hover {
  text-decoration-color: var(--brand);
}

/* lists */
.prose ul,
.prose ol {
  padding-left: 1.3em;
  color: #3f2b1e;
}
.prose li + li {
  margin-top: 0.5em;
}
.prose ul > li::marker {
  color: var(--brand);
}
.prose ol > li::marker {
  color: var(--brand-strong);
  font-weight: 700;
}

/* inline code */
.inline-code,
.prose code:not([class]) {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  padding: 0.12em 0.4em;
  border-radius: 7px;
  color: var(--brand-ink);
  word-break: break-word;
}
.kbd {
  font-family: var(--font-mono);
  font-size: 0.8em;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.1em 0.45em;
}

/* ---- Glossary term inline --------------------------------------- */
.gterm {
  color: var(--brand-deep);
  font-weight: 600;
  cursor: help;
  text-decoration: none;
  border-bottom: 2px dotted var(--brand);
  padding-bottom: 1px;
  transition: background 0.15s, color 0.15s;
  border-radius: 3px;
}
.gterm::after {
  content: "";
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-left: 0.24em;
  vertical-align: baseline;
  background: currentColor;
  opacity: 0.55;
  -webkit-mask: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1a7 7 0 100 14A7 7 0 008 1zm.9 10.6H7.1v-1.7h1.8v1.7zm.05-3.02c-.02.5-.4.72-.9.72-.53 0-.9-.25-.88-.78.01-.5.2-.9.65-1.3.5-.44.7-.7.7-1.06 0-.4-.3-.66-.78-.66-.5 0-.85.3-.9.83H5.2c.05-1.3 1-2.13 2.4-2.13 1.45 0 2.35.8 2.35 1.94 0 .72-.36 1.2-.9 1.65-.42.36-.55.56-.56.86z'/%3E%3C/svg%3E");
  mask: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='black' d='M8 1a7 7 0 100 14A7 7 0 008 1zm.9 10.6H7.1v-1.7h1.8v1.7zm.05-3.02c-.02.5-.4.72-.9.72-.53 0-.9-.25-.88-.78.01-.5.2-.9.65-1.3.5-.44.7-.7.7-1.06 0-.4-.3-.66-.78-.66-.5 0-.85.3-.9.83H5.2c.05-1.3 1-2.13 2.4-2.13 1.45 0 2.35.8 2.35 1.94 0 .72-.36 1.2-.9 1.65-.42.36-.55.56-.56.86z'/%3E%3C/svg%3E");
}
.gterm:hover,
.gterm.is-active {
  background: var(--brand-tint);
  text-decoration: none;
  border-bottom-color: var(--brand-deep);
}

/* ---- Callouts ---------------------------------------------------- */
.callout {
  border-radius: var(--r);
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.callout__label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--ink-soft);
}
.callout__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}
.callout__body > * + * {
  margin-top: 0.7em;
}
.callout--tldr {
  background: var(--grad-soft);
  border-color: var(--brand-tint);
}
.callout--tldr .callout__label {
  color: var(--brand-strong);
}
.callout--key {
  background: var(--gold-tint);
  border-color: #eeddb4;
}
.callout--key .callout__dot {
  background: var(--gold);
  box-shadow: 0 0 0 4px #f2e2bf;
}
.callout--key .callout__label {
  color: #96631a;
}
.callout--analogy {
  background: var(--teal-tint);
  border-color: #cfe6e2;
}
.callout--analogy .callout__dot {
  background: var(--teal);
  box-shadow: 0 0 0 4px #cfe6e2;
}
.callout--analogy .callout__label {
  color: #1a5b57;
}
.callout--warning {
  background: #fdeceb;
  border-color: #f5cfc9;
}
.callout--warning .callout__dot {
  background: #d9433a;
  box-shadow: 0 0 0 4px #f7d4cf;
}
.callout--warning .callout__label {
  color: #b0362c;
}

/* ---- Tables ------------------------------------------------------ */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}
.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  min-width: 30rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}
.data-table thead th {
  background: var(--brand-tint-2);
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid var(--brand-tint);
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}
.data-table tbody tr:hover td {
  background: #fff8f1;
}
.data-table code {
  white-space: nowrap;
}

/* ---- Code blocks ------------------------------------------------- */
.codeblock {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid #2c1f17;
  background: #241811;
  box-shadow: var(--shadow);
}
.codeblock__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #1c120c;
  border-bottom: 1px solid #35251b;
}
.codeblock__dots {
  display: inline-flex;
  gap: 6px;
}
.codeblock__dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #4a3527;
}
.codeblock__dots i:first-child {
  background: #e8712f;
}
.codeblock__lang {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #c9a88f;
  font-weight: 600;
}
.codeblock__copy {
  margin-left: auto;
  background: #33241a;
  color: #f0d9c6;
  border: 1px solid #4a3527;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 0.15s;
}
.codeblock__copy:hover {
  background: #48311f;
}
.codeblock__copy.is-copied {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.codeblock__pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.7;
  color: #f3e7dc;
  -webkit-overflow-scrolling: touch;
}
.codeblock__pre code {
  font-family: inherit;
}
.codeblock__cap {
  padding: 10px 16px;
  font-size: 0.82rem;
  color: #b9a08d;
  background: #1c120c;
  border-top: 1px solid #35251b;
}

/* ---- Figures / image placeholders -------------------------------- */
.figure {
  margin: 0;
}
.figure__frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--grad-soft);
  border: 1px solid var(--brand-tint);
  box-shadow: var(--shadow-sm);
}
.figure__img {
  width: 100%;
  height: auto;
  display: none;
}
.figure.is-loaded .figure__img {
  display: block;
}
.figure.is-loaded .figure__placeholder {
  display: none;
}
.figure__placeholder {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: clamp(22px, 5vw, 40px);
  min-height: 190px;
  background-image: radial-gradient(
      circle at 1px 1px,
      rgba(179, 49, 29, 0.14) 1px,
      transparent 0
    );
  background-size: 18px 18px;
}
.figure__badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-strong);
  background: rgba(255, 255, 255, 0.75);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--brand-tint);
}
.figure__id {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--brand-ink);
  font-weight: 600;
}
.figure__prompt {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 60ch;
}
.figure__cap {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--ink-faint);
  text-align: center;
  font-style: italic;
}
.figure.is-zoomable .figure__img {
  cursor: zoom-in;
}
.figure.is-zoomable .figure__img:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ---- Lightbox ---------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(24, 10, 7, 0.9);
}
.lightbox[hidden] {
  display: none;
}
/* The stage fills the whole viewport, so a zoomed image has the entire
   screen to pan across instead of a cramped box. */
.lightbox__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  cursor: zoom-out; /* clicking the empty backdrop closes */
}
.lightbox__stage.is-zoomed {
  cursor: grab;
}
.lightbox__stage.is-panning {
  cursor: grabbing;
}
.lightbox__img {
  display: block;
  max-width: 94vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  background: var(--paper);
  border-radius: var(--r-md);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  transition: transform 0.1s ease-out;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
}
.lightbox__stage.is-zoomed .lightbox__img {
  cursor: inherit;
}
.lightbox__stage.is-panning .lightbox__img {
  transition: none;
}
/* Top bar keeps the controls clear of the image caption. */
.lightbox__bar {
  position: absolute;
  z-index: 2;
  top: clamp(12px, 2.5vw, 22px);
  left: clamp(12px, 2.5vw, 22px);
  right: clamp(12px, 2.5vw, 22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none; /* let clicks fall through to the stage… */
}
.lightbox__tools,
.lightbox__x {
  pointer-events: auto; /* …except on the actual controls */
}
.lightbox__tools {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}
.lightbox__tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.lightbox__tool--reset {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.lightbox__tool:hover {
  background: rgba(255, 255, 255, 0.18);
}
.lightbox__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s ease;
}
.lightbox__x:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox__cap {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: clamp(14px, 3vw, 26px);
  transform: translateX(-50%);
  margin: 0;
  max-width: min(90vw, 70ch);
  padding: 8px 16px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9rem;
  font-style: italic;
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 999px;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.lightbox__cap[hidden] {
  display: none;
}

/* ---- Pager ------------------------------------------------------- */
.pager {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pager__link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px 20px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.pager__link:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--brand-tint);
}
.pager__link--next {
  text-align: right;
}
.pager__dir {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.pager__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--ink);
}

/* ---- Table of contents ------------------------------------------ */
.toc {
  position: sticky;
  top: calc(var(--topbar-h) + 24px);
  align-self: start;
  font-size: 0.9rem;
  max-height: calc(100vh - var(--topbar-h) - 48px);
  overflow-y: auto;
}
.toc__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 12px;
}
.toc__list {
  list-style: none;
  padding: 0;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
}
.toc__list a {
  display: block;
  padding: 5px 0 5px 14px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  color: var(--ink-soft);
  line-height: 1.4;
  font-weight: 500;
}
.toc__list a:hover {
  color: var(--brand-deep);
  text-decoration: none;
}
.toc__list a.is-sub {
  padding-left: 26px;
  font-size: 0.85rem;
}
.toc__list a.is-active {
  color: var(--brand-deep);
  border-left-color: var(--brand);
  font-weight: 700;
}

/* ================================================================= *
 * HOME
 * ================================================================= */
.home-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 9vw, 104px) clamp(16px, 4vw, 32px)
    clamp(40px, 7vw, 84px);
}
.home-hero__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brand-strong);
  background: var(--card);
  border: 1px solid var(--brand-tint);
  padding: 7px 15px;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}
.home-hero__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}
.home-hero__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: clamp(2.7rem, 7vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-top: 22px;
  color: var(--ink);
}
.home-hero__title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-hero__sub {
  margin-top: 22px;
  font-size: 1.3rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 34ch;
}
.home-hero__actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}
.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn--primary:hover {
  box-shadow: var(--shadow-lg);
}
.btn--ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.btn--ghost:hover {
  border-color: var(--brand-tint);
}

/* hero art: orbiting devices */
.home-hero__art {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.orbit {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
  border: 1.5px dashed var(--brand-tint);
}
.orbit--1 {
  width: 62%;
  height: 62%;
}
.orbit--2 {
  width: 100%;
  height: 100%;
}
.orbit__core {
  width: 40%;
  height: 40%;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: var(--shadow-lg), 0 0 0 12px rgba(232, 113, 47, 0.08);
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  text-align: center;
  font-size: 1rem;
  padding: 10px;
  z-index: 2;
}
.node-chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.node-chip b {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
}
.node-chip--a {
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
}
.node-chip--b {
  top: 40%;
  right: -6%;
}
.node-chip--c {
  bottom: 6%;
  right: 12%;
}
.node-chip--d {
  bottom: 6%;
  left: 12%;
}
.node-chip--e {
  top: 40%;
  left: -6%;
}

/* home sections */
.home-section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) clamp(16px, 4vw, 32px);
}
.home-section__head {
  max-width: 40ch;
  margin-bottom: 36px;
}
.home-section__eyebrow {
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.home-section__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-top: 10px;
  color: var(--ink);
}
.home-section__lead {
  margin-top: 14px;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.home-section--tint {
  max-width: none;
  background: linear-gradient(180deg, transparent, #fdf1e6 30%, #fdf1e6 70%, transparent);
}
.home-section--tint > * {
  max-width: var(--wrap);
  margin-left: auto;
  margin-right: auto;
}

/* path cards */
.path-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.path-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.path-card:hover {
  text-decoration: none;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-tint);
}
.path-card__badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.3rem;
  color: #fff;
  background: var(--grad);
  box-shadow: var(--shadow-sm);
}
.path-card__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--ink);
}
.path-card__blurb {
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.path-card__go {
  margin-top: auto;
  font-weight: 700;
  color: var(--brand-strong);
  font-size: 0.92rem;
}

/* value / feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.feature {
  padding: 28px 26px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.feature__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: var(--grad-soft);
  border: 1px solid var(--brand-tint);
  margin-bottom: 16px;
}
.feature__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.3rem;
  margin-bottom: 8px;
  color: var(--ink);
}
.feature__text {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

/* comparison */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.compare__card {
  border-radius: var(--r-lg);
  padding: 28px 26px;
  border: 1px solid var(--line);
}
.compare__card--old {
  background: #f6efe8;
}
.compare__card--new {
  background: var(--grad-soft);
  border-color: var(--brand-tint);
}
.compare__tag {
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.compare__card--new .compare__tag {
  color: var(--brand-strong);
}
.compare__list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.compare__list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--ink);
}
.compare__list li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: no-repeat center / 12px;
}
.compare__card--old .compare__list li::before {
  background-color: #eadfd4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='%23a08874' stroke-width='2' stroke-linecap='round' d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E");
}
.compare__card--new .compare__list li::before {
  background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}

/* chapter index grid */
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.chapter-card {
  display: flex;
  gap: 16px;
  padding: 22px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.chapter-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--brand-tint);
}
.chapter-card__num {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-strong);
  background: var(--brand-tint-2);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}
.chapter-card__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.14rem;
  color: var(--ink);
  line-height: 1.2;
}
.chapter-card__desc {
  margin-top: 5px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* big CTA band */
.cta-band {
  max-width: var(--wrap);
  margin: 0 auto clamp(40px, 7vw, 80px);
  padding: clamp(36px, 6vw, 64px);
  border-radius: var(--r-xl);
  background: var(--grad);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle at 2px 2px,
    rgba(255, 255, 255, 0.16) 1.5px,
    transparent 0
  );
  background-size: 26px 26px;
  opacity: 0.5;
}
.cta-band > * {
  position: relative;
}
.cta-band__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
}
.cta-band__sub {
  margin-top: 14px;
  font-size: 1.2rem;
  opacity: 0.94;
  max-width: 44ch;
  margin-inline: auto;
}
.cta-band .btn--ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(4px);
}
.cta-band .btn--light {
  background: #fff;
  color: var(--brand-deep);
  box-shadow: var(--shadow);
}

/* ---- Footer ------------------------------------------------------ */
.footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  margin-top: 40px;
}
.footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) clamp(16px, 4vw, 32px) 32px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px;
}
.footer__blurb {
  margin-top: 16px;
  color: var(--ink-soft);
  max-width: 38ch;
}
.footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.footer__title {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.footer__col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer__col a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
}
.footer__col a:hover {
  color: var(--brand-deep);
  text-decoration: none;
}
.footer__base {
  border-top: 1px solid var(--line);
  padding: 20px clamp(16px, 4vw, 32px);
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ================================================================= *
 * Glossary page
 * ================================================================= */
.gsearch {
  margin-top: 22px;
}
.gsearch__input {
  width: 100%;
  max-width: 420px;
  padding: 13px 18px 13px 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239c8879' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E")
    no-repeat 15px center / 18px;
  box-shadow: var(--shadow-xs);
}
.gsearch__input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}
.glossary-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gentry {
  scroll-margin-top: calc(var(--topbar-h) + 24px);
  padding: 22px 24px;
  border-radius: var(--r);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}
.gentry:target {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-tint);
}
.gentry.is-hidden {
  display: none;
}
.gentry__term {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
}
.gentry__def {
  margin-top: 8px;
  color: var(--ink-soft);
}
.gentry__def + .gentry__def {
  margin-top: 10px;
}
.gentry__analogy {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--teal-tint);
  color: #1a5b57;
  font-size: 0.94rem;
}
.gempty {
  padding: 30px;
  text-align: center;
  color: var(--ink-faint);
}
.gletter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-strong);
  margin: 26px 0 4px;
  letter-spacing: 0.1em;
}
.gletter:first-child {
  margin-top: 0;
}

/* ================================================================= *
 * Glossary popover + modal (client-driven)
 * ================================================================= */
.gpopover {
  position: absolute;
  z-index: 120;
  width: min(320px, calc(100vw - 32px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 16px 18px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s;
  pointer-events: none;
}
.gpopover.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.gpopover__term {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.06rem;
  color: var(--brand-deep);
  margin-bottom: 5px;
}
.gpopover__short {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.gpopover__hint {
  margin-top: 10px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

.gmodal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
}
.gmodal[hidden] {
  display: none;
}
.gmodal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 26, 16, 0.42);
  backdrop-filter: blur(3px);
  animation: fade 0.2s ease;
}
.gmodal__dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  animation: pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.gmodal__x {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink-soft);
}
.gmodal__x:hover {
  background: var(--brand-tint);
  color: var(--brand-deep);
}
.gmodal__eyebrow {
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-strong);
}
.gmodal__title {
  font-family: var(--font-display);
  font-variation-settings: var(--soft);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--ink);
  margin: 6px 0 14px;
  padding-right: 40px;
}
.gmodal__body {
  color: var(--ink-soft);
  font-size: 1.02rem;
}
.gmodal__body p + p {
  margin-top: 12px;
}
.gmodal__analogy {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--teal-tint);
  color: #1a5b57;
  font-size: 0.96rem;
}
.gmodal__more {
  display: inline-block;
  margin-top: 20px;
  font-weight: 700;
  color: var(--brand-strong);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
}

/* ================================================================= *
 * Responsive
 * ================================================================= */
@media (max-width: 1100px) {
  :root {
    --sidebar-w: 250px;
  }
  .doc-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}

@media (max-width: 860px) {
  .home-hero__inner {
    grid-template-columns: 1fr;
  }
  .home-hero__art {
    max-width: 380px;
    margin: 0 auto;
    order: -1;
  }
  .footer__inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .compare {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .topbar__nav {
    display: none;
  }
  .navtoggle {
    display: flex;
  }
  .layout {
    display: block;
    padding: 0 clamp(16px, 5vw, 28px);
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(320px, 84vw);
    height: 100%;
    z-index: 110;
    background: var(--paper);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 20px 18px 40px;
    transform: translateX(-102%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar__head {
    display: block;
    margin-bottom: 20px;
  }
  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(44, 26, 16, 0.4);
    backdrop-filter: blur(2px);
  }
  .nav-backdrop[hidden] {
    display: none;
  }
  .pager {
    grid-template-columns: 1fr;
  }
  .main {
    padding-top: 24px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }
  .gmodal__dialog {
    padding: 24px 20px;
  }
  .cta-band .btn {
    width: 100%;
    justify-content: center;
  }
  .footer__base {
    flex-direction: column;
  }
}

/* ---- Motion / print --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar,
  .sidebar,
  .toc,
  .pager,
  .footer,
  .navtoggle {
    display: none !important;
  }
  .layout {
    display: block;
  }
}
