/* hMosaic journal — an editorial design system.
   Warm paper, ink serif, four tesserae. No external assets. */

/* Palette: HDFC blue and red, editorially tuned.
   Token names are legacy (indigo/coral/teal/gold) and now map to
   navy / red / azure / steel. */
:root {
  --paper: #f5f7fa;
  --panel: #ffffff;
  --ink: #10233f;
  --muted: #5b6b82;
  --line: rgba(16, 35, 63, 0.16);
  --line-soft: rgba(16, 35, 63, 0.09);

  --indigo: #11498f;   /* deep HDFC navy */
  --coral: #d62f28;    /* HDFC red */
  --teal: #2563c4;     /* vivid azure */
  --gold: #56729c;     /* steel blue */

  --art-1: #e3e9f1;
  --art-2: #d5deea;
  --art-3: #c3d0e2;

  --link-underline: rgba(17, 73, 143, 0.45);
  --chip-bg: rgba(16, 35, 63, 0.06);
  --chip-bg-hover: rgba(37, 99, 196, 0.16);
  --shadow: 0 22px 60px rgba(13, 34, 66, 0.1);

  --serif: "Charter", "Bitstream Charter", "Iowan Old Style", "Palatino Linotype",
           "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 66ch;
  --gutter: clamp(1.1rem, 4vw, 2.75rem);
}

html[data-theme="dark"] {
  --paper: #0e1726;
  --panel: #16233a;
  --ink: #e8edf5;
  --muted: #93a4bc;
  --line: rgba(232, 237, 245, 0.16);
  --line-soft: rgba(232, 237, 245, 0.09);

  --indigo: #8fb6f2;
  --coral: #f2837c;
  --teal: #5e9be8;
  --gold: #93a9c9;

  --art-1: #1d2a40;
  --art-2: #24334d;
  --art-3: #2d3f5f;

  --link-underline: rgba(143, 182, 242, 0.55);
  --chip-bg: rgba(232, 237, 245, 0.07);
  --chip-bg-hover: rgba(94, 155, 232, 0.25);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --paper: #0e1726;
    --panel: #16233a;
    --ink: #e8edf5;
    --muted: #93a4bc;
    --line: rgba(232, 237, 245, 0.16);
    --line-soft: rgba(232, 237, 245, 0.09);

    --indigo: #8fb6f2;
    --coral: #f2837c;
    --teal: #5e9be8;
    --gold: #93a9c9;

    --art-1: #1d2a40;
    --art-2: #24334d;
    --art-3: #2d3f5f;

    --link-underline: rgba(143, 182, 242, 0.55);
    --chip-bg: rgba(232, 237, 245, 0.07);
    --chip-bg-hover: rgba(94, 155, 232, 0.25);
    --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  }
}

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

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--paper);
  scroll-behavior: smooth;
}

body.journal {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* brand signature: the four-tessera strip along the very top */
body.journal::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--indigo) 0 25%,
    var(--coral) 25% 50%,
    var(--teal) 50% 75%,
    var(--gold) 75% 100%
  );
}

::selection { background: rgba(214, 47, 40, 0.24); }

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: -100vw;
  top: 0;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: var(--paper);
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.masthead-inner {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex-wrap: wrap;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}

.wordmark-text {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.015em;
}

.mini-mark {
  display: inline-grid;
  grid-template-columns: repeat(2, 8px);
  grid-auto-rows: 8px;
  gap: 2px;
}
.mini-mark i { border-radius: 2px; background: var(--indigo); }
.mini-mark i:nth-child(2) { background: var(--coral); }
.mini-mark i:nth-child(3) { background: var(--teal); }
.mini-mark i:nth-child(4) { background: var(--gold); }
.wordmark:hover .mini-mark i { transform: rotate(45deg); }
.mini-mark i { transition: transform 0.35s ease; }

.tool-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.2rem 0;
  border-bottom: 2px solid transparent;
}
.tool-link:hover { color: var(--ink); border-bottom-color: var(--coral); }

/* slidable topic strip under the masthead row */
.topic-strip { border-top: 1px solid var(--line-soft); }

.topic-strip-track {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0.55rem var(--gutter);
  display: flex;
  gap: 0.45rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  mask-image: linear-gradient(90deg, transparent, #000 1.1rem, #000 calc(100% - 1.6rem), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 1.1rem, #000 calc(100% - 1.6rem), transparent);
}
.topic-strip-track::-webkit-scrollbar { display: none; }

.strip-chip {
  flex: none;
  scroll-snap-align: start;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.24rem 0.75rem;
  transition: background 0.15s ease;
}
.strip-chip:hover { background: var(--chip-bg-hover); }
.strip-current { box-shadow: inset 0 0 0 1.5px var(--indigo); font-weight: 600; }

.strip-all {
  background: var(--indigo);
  color: var(--panel);
  font-weight: 600;
}
.strip-all:hover { background: var(--coral); color: var(--panel); }

/* reading progress along the bottom of article pages */
.read-progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  z-index: 30;
  pointer-events: none;
  background: transparent;
}
.read-progress i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--indigo), var(--teal) 45%, var(--gold) 72%, var(--coral));
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

.masthead-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.site-search { position: relative; }

.site-search input {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  padding: 0.3rem 0.1rem;
  width: clamp(9rem, 16vw, 15rem);
  transition: border-color 0.2s ease;
}
.site-search input::placeholder { color: var(--muted); font-style: italic; font-family: var(--serif); }
.site-search input:focus { border-bottom-color: var(--indigo); outline: none; }

.search-suggest {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 19rem;
  max-width: 24rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 0.35rem;
  z-index: 20;
}
.search-suggest a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: 7px;
  text-decoration: none;
}
.search-suggest a .s-title {
  display: block;
  font-family: var(--serif);
  font-size: 0.98rem;
}
.search-suggest a .s-topic {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.search-suggest a:hover,
.search-suggest a[aria-selected="true"] { background: var(--chip-bg-hover); }
.search-suggest .s-all {
  border-top: 1px solid var(--line-soft);
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.theme-toggle {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .tt-a { fill: var(--indigo); }
.theme-toggle .tt-b { fill: var(--coral); }
.theme-toggle .tt-c { fill: var(--teal); }
.theme-toggle .tt-d { fill: none; stroke: currentColor; stroke-width: 1.6; }
html[data-theme="dark"] .theme-toggle .tt-d,
.theme-toggle:hover .tt-d { fill: var(--gold); stroke: none; }
.theme-toggle:hover { border-color: var(--muted); }

/* ---------- shared page furniture ---------- */

main#main {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 4rem;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.9rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--ink); }
.eyebrow.accent-indigo { color: var(--indigo); }
.eyebrow.accent-coral { color: var(--coral); }
.eyebrow.accent-teal { color: var(--teal); }
.eyebrow.accent-gold { color: var(--gold); }

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}

.mosaic-rule {
  display: flex;
  gap: 5px;
  margin: 1.6rem 0 0;
}
.mosaic-rule i {
  width: 22px;
  height: 6px;
  border-radius: 2px;
  background: var(--indigo);
}
.mosaic-rule i:nth-child(2) { background: var(--coral); }
.mosaic-rule i:nth-child(3) { background: var(--teal); }
.mosaic-rule i:nth-child(4) { background: var(--gold); }

.minutes { color: var(--muted); font-size: 0.86rem; }

.read-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--link-underline);
  padding-bottom: 1px;
}
.read-link:hover { border-bottom-color: currentColor; }
.read-link.accent-indigo { color: var(--indigo); }
.read-link.accent-coral { color: var(--coral); }
.read-link.accent-teal { color: var(--teal); }
.read-link.accent-gold { color: var(--gold); }

/* chips (topics) */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
}
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.8rem;
  text-decoration: none;
  color: var(--ink);
  background: var(--chip-bg);
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  transition: background 0.15s ease;
}
.chip:hover { background: var(--chip-bg-hover); }
.chip-current { box-shadow: inset 0 0 0 1.5px var(--indigo); }
.chip-count { color: var(--muted); font-size: 0.72rem; }

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

.folio {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.folio-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1.1rem;
  font-weight: 700;
}
.folio-title a { text-decoration: none; }
.folio-title a:hover { color: var(--indigo); }

.folio-dek {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 1rem;
  max-width: 36rem;
}

.folio-hook {
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0 0 1.4rem;
  max-width: 34rem;
}

.folio-cta {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  margin: 0;
}

.folio-art {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
}
.folio-art svg { display: block; width: 100%; height: auto; }

/* front columns: ledger + rail */

.front-columns {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(1.8rem, 4vw, 3.8rem);
  padding-top: 2.4rem;
}

.ledger { min-width: 0; }

.ledger-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.1rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line-soft);
  align-items: start;
}
.ledger-row:last-of-type { border-bottom: 0; }

.ledger-index {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  padding-top: 0.2rem;
  min-width: 1.6rem;
}

.ledger-meta {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.3rem;
}

.ledger-title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 0.4rem;
  font-weight: 700;
}
.ledger-title a { text-decoration: none; }
.ledger-title a:hover { color: var(--indigo); }

.ledger-dek {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 46rem;
}

.ledger-art {
  display: block;
  width: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}
.ledger-art svg { display: block; width: 100%; height: auto; }

/* rail */

.front-rail {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.rail-block {
  border-top: 3px solid var(--ink);
  padding-top: 1rem;
}

.rail-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.9rem;
}

.chip-row-wrap { max-width: 100%; }

.rail-more { margin: 1rem 0 0; font-size: 0.9rem; }
.rail-more a { text-decoration: none; color: var(--indigo); font-weight: 600; }
.rail-more a:hover { text-decoration: underline; }

.rail-about p {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.65;
  margin: 0;
}

/* ---------- essay page ---------- */

.essay { padding-top: clamp(2rem, 5vw, 3.6rem); }

.essay-head { max-width: 46rem; }

.essay-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.4vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 700;
}

.essay-dek {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.9vw, 1.28rem);
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 1rem;
}

.essay-meta { font-size: 0.86rem; color: var(--muted); margin: 0; }

.essay-art {
  max-width: 46rem;
  margin: 2rem 0 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--panel);
}
.essay-art svg { display: block; width: 100%; height: auto; max-height: 200px; }

/* prose body */

.prose {
  max-width: var(--measure);
  margin-top: 2.4rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.75;
}

.prose p { margin: 0 0 1.25rem; }

.prose > p:first-child::first-letter {
  font-size: 3.4em;
  line-height: 0.82;
  float: left;
  padding: 0.08em 0.12em 0 0;
  font-weight: 700;
  color: var(--indigo);
}

.prose h2 {
  font-size: 1.4rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.4rem 0 0.9rem;
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}
.prose h2::before {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--coral);
  transform: translateY(-1px);
}
.prose h2:nth-of-type(4n+2)::before { background: var(--teal); }
.prose h2:nth-of-type(4n+3)::before { background: var(--gold); }
.prose h2:nth-of-type(4n)::before { background: var(--indigo); }

.prose h3 { font-size: 1.15rem; margin: 1.8rem 0 0.7rem; }

.prose a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--link-underline);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--indigo); text-decoration-color: currentColor; }

.prose a.topic-ref {
  text-decoration-style: dotted;
  text-decoration-thickness: 1.5px;
}

.prose blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.4rem;
  border-left: 3px solid var(--coral);
  font-size: 1.22rem;
  line-height: 1.55;
  font-style: italic;
  color: var(--ink);
}
.prose blockquote p { margin: 0; }

.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.prose li { margin-bottom: 0.45rem; }
.prose li::marker { color: var(--coral); }

.prose strong { font-weight: 700; }

.prose hr {
  border: 0;
  height: 6px;
  width: 96px;
  margin: 2.4rem 0;
  background:
    linear-gradient(90deg,
      var(--indigo) 0 22px, transparent 22px 27px,
      var(--coral) 27px 49px, transparent 49px 54px,
      var(--teal) 54px 76px, transparent 76px 81px,
      var(--gold) 81px 96px);
  border-radius: 2px;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.92rem;
  margin: 0 0 1.4rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line-soft);
}
.prose th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
}

.prose figure { margin: 2rem 0; }
.prose figcaption {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* essay end matter */

.essay-foot {
  max-width: var(--measure);
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}

.filed-under { margin-bottom: 2rem; }

.continue {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.continue-card {
  display: block;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  background: var(--panel);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.continue-card:hover { border-color: var(--indigo); transform: translateY(-2px); }
.continue-next { text-align: right; }
.continue-label {
  display: block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.continue-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}

.related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.related li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.related li:last-child { border-bottom: 0; }
.related a {
  font-family: var(--serif);
  font-size: 1.02rem;
  text-decoration: none;
}
.related a:hover { color: var(--indigo); }

/* ---------- standalone page head (topics, search, 404) ---------- */

.page-head {
  padding-top: clamp(2rem, 5vw, 3.4rem);
  padding-bottom: 1.8rem;
  max-width: 46rem;
}

.page-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.8rem;
  font-weight: 700;
}

.page-dek {
  font-family: var(--serif);
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.page-related { margin-top: 2.4rem; }

.empty-state {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 40rem;
}
.empty-state a { color: var(--indigo); }

.not-found { padding-bottom: 4rem; }

/* topic index book */

.index-book {
  columns: 2;
  column-gap: clamp(2rem, 6vw, 4.5rem);
  max-width: 60rem;
}

.index-group {
  break-inside: avoid;
  margin-bottom: 1.9rem;
}

.index-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: var(--coral);
}

.index-entries {
  list-style: none;
  margin: 0;
  padding: 0;
}
.index-entries li { border-bottom: 0; }
.index-entries a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.42rem 0;
  text-decoration: none;
}
.index-entries a:hover .index-term { color: var(--indigo); }
.index-term { font-family: var(--serif); font-size: 1.05rem; }
.index-leader {
  flex: 1;
  border-bottom: 2px dotted var(--line);
  transform: translateY(-4px);
}
.index-count { color: var(--muted); font-size: 0.85rem; }

/* search page */

.search-page-form {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.4rem;
  max-width: 34rem;
}
.search-page-form input {
  flex: 1;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.6rem 0.9rem;
}
.search-page-form input:focus { border-color: var(--indigo); outline: none; }
.search-page-form button {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 9px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}
.search-page-form button:hover { background: var(--indigo); color: #fff; }

/* ---------- colophon ---------- */

.colophon {
  border-top: 1px solid var(--line);
  background: var(--panel);
}

.colophon-inner {
  max-width: 74rem;
  margin: 0 auto;
  padding: 2.4rem var(--gutter) 2.6rem;
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: 2rem;
  align-items: start;
}

.colophon-brand { display: flex; gap: 0.9rem; align-items: flex-start; }
.colophon-brand p {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 30rem;
}

.colophon-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.92rem;
}
.colophon-nav a { text-decoration: none; color: var(--muted); }
.colophon-nav a:hover { color: var(--ink); }

.colophon-legal {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: right;
}

.author-door {
  color: var(--muted);
  opacity: 0.75;
  text-decoration: none;
  font-size: 0.82rem;
}
.author-door:hover { opacity: 1; color: var(--ink); text-decoration: underline; }

/* ---------- mosaic view ---------- */

.mosaic-stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 12%, var(--chip-bg) 0, transparent 42%),
    var(--panel);
  overflow: hidden;
  box-shadow: var(--shadow);
}

#mosaic-canvas {
  display: block;
  width: 100%;
  touch-action: none;
}

.mosaic-legend {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.legend-item i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend-article { background: var(--indigo); }
.legend-topic { background: var(--coral); }

.mosaic-alt {
  margin: 1.2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.mosaic-alt a { color: var(--indigo); }

/* ---------- full-width reading (no measure cap on article pages) ---------- */

body.reading-full .masthead-inner,
body.reading-full .topic-strip-track,
body.reading-full main#main,
body.reading-full .colophon-inner,
body.reading-full .compliance-strip p {
  max-width: none;
}

body.reading-full .essay-head,
body.reading-full .prose,
body.reading-full .essay-foot {
  max-width: none;
}

/* ---------- disclosures ---------- */

.disclosures {
  margin-top: 2.4rem;
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
}

.disclosures ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.disclosures li {
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 0.65rem;
  padding-left: 0.9rem;
  position: relative;
}
.disclosures li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 5px;
  height: 5px;
  border-radius: 1.5px;
  background: var(--gold);
}

.disclosures .disclosures-statutory {
  color: var(--ink);
  font-weight: 600;
}
.disclosures .disclosures-statutory::before { background: var(--coral); }

.compliance-strip {
  border-top: 1px solid var(--line-soft);
}
.compliance-strip p {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0.9rem var(--gutter) 0;
  font-size: 0.76rem;
  line-height: 1.55;
  color: var(--muted);
}
.compliance-strip p:last-child { padding-bottom: 1.6rem; }
.compliance-strip .compliance-statutory {
  color: var(--ink);
  font-weight: 600;
  padding-top: 0.5rem;
}

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

@media (max-width: 60rem) {
  .front-columns { grid-template-columns: 1fr; }
  .front-rail { flex-direction: column; }
  .colophon-inner { grid-template-columns: 1fr 1fr; }
  .colophon-legal { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (max-width: 46rem) {
  .folio { grid-template-columns: 1fr; }
  .folio-art { order: -1; max-width: 30rem; }

  .masthead-inner { gap: 0.8rem 1rem; }
  .masthead-tools { margin-left: auto; }
  .site-search input { width: clamp(7rem, 34vw, 12rem); }
  .search-suggest { right: auto; left: 0; min-width: min(19rem, 86vw); }

  .ledger-row { grid-template-columns: minmax(0, 1fr); }
  .ledger-index { display: none; }
  .ledger-art { display: none; }

  .continue { grid-template-columns: 1fr; }
  .continue-next { text-align: left; }

  .index-book { columns: 1; }

  .colophon-inner { grid-template-columns: 1fr; gap: 1.4rem; }
  .colophon-legal { flex-direction: row; justify-content: space-between; text-align: left; }
}

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