/* SULTAAN.AI - "The Court" theme.
   White marble, emerald and gold inlay by day (pietra dura); an emerald night court
   with burnished gold after dark. Garnet marks what is current or not yet done.
   Motifs: pointed arch, eight-pointed star (khatam), jali lattice, charter articles.
   No external fonts: a high-contrast system Didone for display, a transitional
   system serif for reading, system sans in letter-spaced caps for labels. */

:root {
  color-scheme: light dark;
  --bg: #f3f4ee;          /* marble */
  --surface: #fdfdf9;
  --surface-2: #e4ebe3;   /* jade wash */
  --ink: #0d2620;
  --muted: #3c534c;
  --accent: #0b6149;      /* emerald: text-safe accent on marble */
  --accent-2: #a01d3c;    /* garnet */
  --link: #0a5a44;
  --gold: #a98221;        /* inlay: decorative only on light */
  --line: #c9d5ca;
  --seal-bg: #0c3a2f;
  --seal-ink: #f6f1e0;
  --veil: rgba(243, 244, 238, 0);
  --veil-edge: rgba(243, 244, 238, 1);
  --shadow: 0 1px 0 rgba(13, 38, 32, .05), 0 18px 40px -28px rgba(13, 38, 32, .45);

  --display: "Bodoni 72", Didot, "Bodoni MT", Constantia, "Hoefler Text", "Noto Serif Display", "Noto Serif", Georgia, serif;
  --serif: Baskerville, Constantia, "Hoefler Text", "Libre Baskerville", "Noto Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Augmented-fourth scale (1.414), fluid at the top end */
  --step--1: .875rem;
  --step-0: 1.125rem;
  --step-1: clamp(1.25rem, 1.15rem + .5vw, 1.5rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 3rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4.25rem);
  --step-5: clamp(2.25rem, 1.3rem + 4.6vw, 5.25rem);

  --wrap: 72rem;
  --measure: 64ch;
  --radius: .5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #061a14;          /* emerald night */
    --surface: #0b2620;
    --surface-2: #0f2f27;
    --ink: #f2ecd9;
    --muted: #b9c9bf;
    --accent: #e6c06a;
    --accent-2: #ff9eae;
    --link: #f0cd7a;
    --gold: #e2b95c;
    --line: #24493d;
    --seal-bg: #e2b95c;
    --seal-ink: #06201a;
    --veil: rgba(6, 26, 20, 0);
    --veil-edge: rgba(6, 26, 20, 1);
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 18px 40px -26px rgba(0, 0, 0, .9);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.65;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-2); text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.005em;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.08; letter-spacing: -.01em; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; }

code, kbd, pre { font-family: var(--mono); font-size: .9em; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 46rem); margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; margin: -1px; padding: 0; border: 0;
}

/* ---------- Skip link ---------- */
.skip {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--seal-bg);
  color: var(--seal-ink);
  font-family: var(--sans);
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: 1rem; color: var(--seal-ink); }

/* ---------- Masthead: centred, symmetric, like a court gate ---------- */
.masthead {
  text-align: center;
  padding: 1.4rem 1rem .9rem;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }

.crest { width: 2.1rem; height: 2.1rem; flex: none; }
.crest-star rect { fill: var(--gold); }
.crest-core { fill: var(--bg); }
.crest-dot { fill: var(--gold); }

.wordmark {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: .32em;
  margin-right: -.32em;
}
.wordmark .dot { color: var(--accent); }

.masthead nav ul {
  list-style: none;
  margin: .85rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem 1.6rem;
}
.masthead nav a {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: .35rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
}
.masthead nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }
.masthead nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent-2); }

/* Status strip: the honest line under every masthead */
.status-strip {
  margin: 0;
  padding: .55rem 1rem;
  text-align: center;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.status-strip p { margin: 0; }
.status-strip strong { color: var(--accent-2); font-weight: 700; letter-spacing: .06em; }

/* ---------- The court: hero inside a pointed arch ---------- */
.court {
  position: relative;
  isolation: isolate;
  padding: clamp(2.5rem, 6vw, 5rem) 1rem clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}
.court::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--gold);
  -webkit-mask: url("jali.svg") center / 48px 48px repeat;
  mask: url("jali.svg") center / 48px 48px repeat;
  opacity: .16;
}
.court::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 45%, var(--veil-edge) 0%, var(--veil-edge) 30%, var(--veil) 75%);
}

.court-frame {
  position: relative;
  max-width: 50rem;
  margin: 0 auto;
  padding: clamp(5.5rem, 12vw, 8rem) clamp(1.4rem, 6vw, 3.5rem) clamp(2rem, 5vw, 3rem);
  text-align: center;
}
/* The arch: an SVG crown whose height follows the frame's WIDTH (fixed aspect
   ratio), so the ogee keeps its shape on a tall phone screen, plus straight
   jambs drawn in CSS that run down to the floor. */
.arch {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.arch-top { display: block; flex: none; width: 100%; height: auto; aspect-ratio: 100 / 40; overflow: visible; }
.arch-top path { fill: none; stroke: var(--gold); stroke-width: 1.5; }
.arch-top .arch-inner { stroke-width: 1; opacity: .7; }
.arch-top .arch-fill { fill: var(--surface); stroke: none; }
.arch-sides {
  position: relative;
  flex: 1;
  margin: 0 1%;
  border-left: 1.5px solid var(--gold);
  border-right: 1.5px solid var(--gold);
}
.arch-sides::before { content: ""; position: absolute; inset: 0 2.04%; background: var(--surface); }
.arch-sides::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 3.06%; right: 3.06%;
  border-left: 1px solid var(--gold);
  border-right: 1px solid var(--gold);
  opacity: .7;
}

.seal {
  display: block;
  width: clamp(4.5rem, 12vw, 6.5rem);
  height: auto;
  margin: 0 auto 1.1rem;
}
.seal-ring { fill: none; stroke: var(--gold); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: .1 7.1; transform-box: fill-box; transform-origin: center; animation: turn 60s linear infinite; }
.seal-star rect { fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linejoin: round; }
.seal-core { fill: var(--gold); }
.seal-eye { fill: var(--bg); }

@keyframes turn { to { transform: rotate(360deg); } }

.eyebrow {
  font-family: var(--sans);
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .9rem;
}

.court h1 { font-size: var(--step-5); margin-bottom: .35em; }
.court h1.title-sm { font-size: var(--step-4); }

.lede {
  font-size: var(--step-1);
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 1.4rem;
}

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .28rem .7rem;
  border-radius: 999px;
  background: var(--seal-bg);
  color: var(--seal-ink);
  vertical-align: middle;
}
.badge-outline { background: transparent; color: var(--accent); border: 1px solid currentColor; }
.badge-done { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.badge-now { background: var(--accent-2); color: var(--bg); }

.status-line {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.status-line .badge { margin-right: .5rem; }

.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin: 0; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  background: transparent;
}
.btn:hover { color: var(--ink); border-color: var(--accent-2); background: var(--surface-2); }
.btn-primary { background: var(--seal-bg); color: var(--seal-ink); border-color: var(--seal-bg); }
.btn-primary:hover { background: var(--seal-bg); color: var(--seal-ink); border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--surface-2); }

/* ---------- Articles of the charter ---------- */
.article { padding: clamp(3rem, 7vw, 5rem) 0; }
.article + .article { border-top: 1px solid var(--line); }
.article-alt { background: var(--surface-2); }

.article-head { text-align: center; margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.numeral {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  margin: 0 0 .7rem;
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--accent);
}
.numeral::before, .numeral::after {
  content: "";
  width: clamp(1.5rem, 8vw, 4rem);
  height: 1px;
  background: var(--gold);
}
.article-head p.sub { color: var(--muted); max-width: 40rem; margin: 0 auto; }

.prose { max-width: var(--measure); margin-inline: auto; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }

/* Decree: the definition, set like an inscription */
.decree {
  position: relative;
  max-width: 44rem;
  margin: 0 auto 2rem;
  padding: 2.2rem clamp(1.2rem, 5vw, 3rem);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px 999px var(--radius) var(--radius) / 5rem 5rem var(--radius) var(--radius);
  box-shadow: var(--shadow);
}
.decree blockquote { margin: 0; }
.decree blockquote p {
  font-size: var(--step-2);
  font-style: italic;
  line-height: 1.35;
  margin: 0 0 1rem;
  text-wrap: balance;
}
.decree figcaption {
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
}

/* Chambers grid: mihrab-topped cards */
/* Flex, not grid, so an incomplete last row sits centred like a row of niches */
.chambers {
  --cols: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}
.chambers > li { flex: 0 0 calc((100% - (var(--cols) - 1) * 1.25rem) / var(--cols)); }
@media (min-width: 36rem) { .chambers { --cols: 2; } }
@media (min-width: 52rem) { .chambers { --cols: 3; } }
@media (min-width: 66rem) { .chambers { --cols: 4; } }
.chamber {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px 999px var(--radius) var(--radius) / 4.5rem 4.5rem var(--radius) var(--radius);
  padding: 2.6rem 1.4rem 1.5rem;
  box-shadow: var(--shadow);
}
.chamber h3 { text-align: center; margin-bottom: .6rem; }
.chamber p { color: var(--muted); margin: 0; }
.chamber .mark {
  display: block;
  width: 1.6rem;
  height: 1.6rem;
  margin: 0 auto .75rem;
}
.mark rect { fill: none; stroke: var(--gold); stroke-width: 6; stroke-linejoin: round; }
.chamber-num {
  position: absolute;
  top: .9rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .2em;
  color: var(--accent);
}

/* Ledger: where it stands */
.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: 1.25rem;
}
.ledger section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem .6rem;
}
.ledger .ledger-built { border-top-color: var(--accent); }
.ledger .ledger-wait { border-top-color: var(--link); }
.ledger .ledger-not { border-top-color: var(--accent-2); }
.ledger h3 { display: flex; align-items: center; gap: .6rem; }
.ledger ul { margin: 0; padding-left: 1.15rem; }
.ledger li { margin-bottom: .7em; color: var(--muted); }
.ledger li strong { color: var(--ink); font-weight: 600; }
.pip {
  flex: none;
  width: 1rem; height: 1rem;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.ledger-built .pip { background: var(--accent); color: var(--accent); }
.ledger-wait .pip { color: var(--link); background: linear-gradient(90deg, var(--link) 50%, transparent 50%); }
.ledger-not .pip { color: var(--accent-2); background: transparent; }

/* Principles: a numbered charter list */
.charter {
  counter-reset: art;
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 52rem;
}
.charter li {
  counter-increment: art;
  position: relative;
  padding: 1.1rem 0 1.1rem 3.6rem;
  border-bottom: 1px solid var(--line);
}
.charter li:last-child { border-bottom: 0; }
.charter li::before {
  content: counter(art, upper-roman);
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 2.6rem;
  text-align: center;
  font-family: var(--display);
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--accent);
}
.charter h3 { margin: 0 0 .3rem; }
.charter p { margin: 0; color: var(--muted); }

/* ---------- Diagram ---------- */
.diagram {
  margin: 0 auto 2rem;
  max-width: 34rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.diagram svg { display: block; width: 100%; height: auto; }
.diagram figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); text-align: center; margin-top: .6rem; }
.dg-box { fill: var(--bg); stroke: var(--gold); stroke-width: 1.5; }
.dg-box-strong { fill: var(--surface-2); stroke: var(--accent); stroke-width: 1.5; }
.dg-box-dash { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 5 4; }
.dg-title { fill: var(--ink); font-family: var(--serif); font-size: 15px; font-weight: 600; }
.dg-text { fill: var(--muted); font-family: var(--sans); font-size: 13px; }
.dg-label { fill: var(--accent); font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.dg-line { stroke: var(--gold); stroke-width: 1.5; fill: none; }
.dg-head { fill: var(--gold); }

/* ---------- Detail lists ---------- */
.specs { margin: 0 0 1.5rem; }
.specs div { padding: .75rem 0; border-bottom: 1px solid var(--line); }
.specs dt { font-family: var(--sans); font-size: var(--step--1); font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.specs dd { margin: .2rem 0 0; }

.note {
  border-left: 3px solid var(--accent-2);
  background: var(--surface);
  padding: .9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--muted);
  margin: 1.5rem 0;
}
.note strong { color: var(--ink); }

pre {
  background: var(--seal-bg);
  color: var(--seal-ink);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.55;
  font-size: .85rem;
}
@media (prefers-color-scheme: dark) {
  pre { background: #03110d; color: var(--ink); border: 1px solid var(--line); }
}

/* ---------- Roadmap: a stair of phases ---------- */
.stair {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1rem 4.4rem;
  box-shadow: var(--shadow);
}
.step-num {
  position: absolute;
  left: 1rem;
  top: 1.3rem;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  font-family: var(--display);
  font-weight: 600;
  color: var(--accent);
}
.step-now { border-color: var(--accent-2); border-width: 2px; }
.step-now .step-num { background: var(--accent-2); color: var(--bg); border-color: var(--accent-2); }
.step h3 { margin: 0 0 .35rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; }
.step p { color: var(--muted); }
.step ul { margin: 0 0 .6rem; padding-left: 1.15rem; color: var(--muted); }
.step li { margin-bottom: .4em; }
.step li::marker { color: var(--accent); }

@media (min-width: 60rem) {
  .stair { grid-template-columns: repeat(5, 1fr); align-items: end; gap: .9rem; }
  .step { padding: 4rem 1.1rem 1rem; }
  .step-num { left: 1.1rem; top: 1.1rem; }
  .step:nth-child(1) { margin-bottom: 0; }
  .step:nth-child(2) { margin-bottom: 2rem; }
  .step:nth-child(3) { margin-bottom: 4rem; }
  .step:nth-child(4) { margin-bottom: 6rem; }
  .step:nth-child(5) { margin-bottom: 8rem; }
  .step h3 { font-size: 1.15rem; }
  .step p, .step ul { font-size: .95rem; }
}

/* Tier ladder table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
table { border-collapse: collapse; width: 100%; font-family: var(--sans); font-size: .92rem; }
caption { text-align: left; padding: .9rem 1rem .4rem; font-family: var(--display); font-size: var(--step-1); font-weight: 600; }
th, td { text-align: left; padding: .65rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
thead th { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); border-top: 0; }
tbody th { font-family: var(--serif); font-size: 1rem; color: var(--ink); white-space: nowrap; }
td { color: var(--muted); }
tr.row-done th, tr.row-done td { background: var(--surface-2); }

/* ---------- Origin: medallions and the inscription ---------- */
.medallions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (min-width: 48rem) { .medallions { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.medallion {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem .6rem 1.1rem;
  position: relative;
}
.medallion::before {
  content: "";
  display: block;
  width: .7rem;
  height: .7rem;
  margin: 0 auto .7rem;
  background: var(--gold);
  transform: rotate(45deg);
}
.medallion .figure {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.45rem, 1.1rem + 1.9vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: lining-nums tabular-nums;
}
.medallion .what { display: block; font-family: var(--sans); font-size: var(--step--1); color: var(--muted); margin-top: .35rem; }

.inscription {
  margin: 0 auto;
  max-width: 46rem;
  text-align: center;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem);
  border-top: 1px solid var(--gold);
  border-bottom: 1px solid var(--gold);
}
.inscription .label { font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0 0 1rem; }
.inscription blockquote { margin: 0; }
.inscription blockquote p { font-family: var(--display); font-size: var(--step-4); font-style: italic; line-height: 1.15; margin: 0 0 1rem; text-wrap: balance; }
.inscription figcaption { font-family: var(--sans); font-size: var(--step--1); color: var(--muted); }

.descent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem 1.25rem;
  font-family: var(--display);
  margin: 1.5rem 0 0;
}
.descent .from, .descent .to { font-size: var(--step-3); font-weight: 600; font-variant-numeric: lining-nums; }
.descent .to { color: var(--accent); }
.descent .arrow { font-family: var(--sans); color: var(--muted); }
.descent .cap { flex-basis: 100%; text-align: center; font-family: var(--sans); font-size: var(--step--1); color: var(--muted); }

.cannot {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: .75rem;
}
.cannot li {
  padding: .9rem 1rem;
  border: 1px dashed var(--accent-2);
  border-radius: var(--radius);
  background: var(--surface);
}
.cannot li strong { display: block; font-family: var(--sans); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2); }

/* ---------- Closing call ---------- */
.closing { text-align: center; }
.closing p:not(.numeral) { color: var(--muted); max-width: 38rem; margin-inline: auto; }

/* ---------- Footer ---------- */
.colophon {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  text-align: center;
  font-family: var(--sans);
  font-size: var(--step--1);
  color: var(--muted);
}
.colophon .crest { width: 1.8rem; height: 1.8rem; display: block; margin: 0 auto 1rem; }
.colophon p { max-width: 40rem; margin: 0 auto .9rem; }
.colophon ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .4rem 1.4rem;
}
.colophon a { font-weight: 600; }
.colophon .fine { font-size: .8rem; }

/* ---------- 404 ---------- */
.lost .court-frame { padding-top: clamp(5rem, 12vw, 7.5rem); }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 30rem) {
  .wordmark { font-size: 1.15rem; letter-spacing: .24em; margin-right: -.24em; }
  .step { padding-left: 1.2rem; padding-top: 4rem; }
  .step-num { left: 1.2rem; top: 1rem; }
  .charter li { padding-left: 2.8rem; }
  .charter li::before { width: 2rem; }
}

@media print {
  .court::before, .court::after, .arch, .seal, .skip { display: none; }
  body { background: #fff; color: #000; }
}

/* Section labels inside long-form prose */
.prose > .numeral + h2 { text-align: center; margin-top: 0; }
.chambers + .closing { margin: 2.25rem 0 0; }

.prose .cannot { padding-left: 0; margin-bottom: 1.25rem; }

@media (prefers-color-scheme: dark) { .court::before { opacity: .11; } }
