/* SKHERIA — V2 visual system.

   Two grounds, mapped to the product's own epistemology:
     THE OBSERVATORY (night)  — where the civilization is watched.
     THE ARCHIVE     (paper)  — where its evidence is read.

   One grammar: rings. Time is discrete; lives and history accrete in rings.
   Square rings (the Gnomon) = the built world. Round rings = grown lives.

   Voices (D-096): RECORD = serif roman · DERIVED = mono · NARRATION = sans ·
   EDITORIAL = serif italic behind an ember rule. */

:root {
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --gut: clamp(1.15rem, 4vw, 3.4rem);
  --band: clamp(2.6rem, 6vw, 5rem);
  --max: 1280px;
}

/* --- grounds --------------------------------------------------------------- */

.g-night {
  --bg: #0f1310;
  --bg-2: #151a15;
  --bg-3: #1b211b;
  --fg: #e9e4d6;
  --fg-2: #b5b0a0;
  --fg-3: #7d7a6c;
  --line: rgba(233, 228, 214, 0.16);
  --line-soft: rgba(233, 228, 214, 0.09);
  --ember: #d98a3a;
  --ember-soft: rgba(217, 138, 58, 0.22);
  --verd: #7fa893;
  --mute: #59615a;
}

.g-paper {
  --bg: #ece7d9;
  --bg-2: #f4f0e3;
  --bg-3: #e3ddcc;
  --fg: #1c1f19;
  --fg-2: #45483e;
  --fg-3: #74766a;
  --line: #c9c3af;
  --line-soft: #d9d4c2;
  --ember: #a85d18;
  --ember-soft: rgba(168, 93, 24, 0.16);
  --verd: #46705f;
  --mute: #a6a392;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: clamp(15px, 0.55vw + 13.6px, 17px);
  line-height: 1.55;
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
}

/* The observatory carries the faintest memory of the ring grammar. */
body.g-night::before {
  content: "";
  position: fixed;
  inset: -60vh -30vw;
  pointer-events: none;
  z-index: 0;
  background: repeating-radial-gradient(
    circle at 50% -20%,
    rgba(233, 228, 214, 0.05) 0 1px,
    transparent 1px 110px
  );
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 85%);
}

main, .masthead, .foot { position: relative; z-index: 1; }

a { color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--fg); color: var(--bg);
  padding: 0.6rem 1rem; z-index: 50;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

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

/* --- voices ---------------------------------------------------------------- */

.v-record {
  font-family: var(--serif);
  color: var(--fg);
  font-size: 1.08em;
  line-height: 1.5;
  letter-spacing: -0.004em;
}
.v-derived {
  font-family: var(--mono);
  color: var(--verd);
  font-size: 0.76em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.v-narration { color: var(--fg-2); }
.v-editorial {
  font-family: var(--serif);
  font-style: italic;
  color: var(--fg);
  font-size: 1.06em;
  letter-spacing: -0.008em;
}
p.v-editorial { border-left: 2px solid var(--ember); padding-left: 1rem; }
.v-editorial-inline { color: var(--ember); font-style: italic; font-family: var(--serif); }

.cap-ember { color: var(--ember); }
.cap-verd { color: var(--verd); }

/* --- the Gnomon ------------------------------------------------------------ */

.gnomon path { fill: none; stroke-width: 2.1; stroke-linecap: butt; }
.gnomon .g-old { stroke: var(--fg-3); }
.gnomon .g-edge { stroke: var(--ember); }

/* --- ring-seals ------------------------------------------------------------ */

.seal { display: block; flex: none; }
.seal path { fill: none; stroke-linecap: butt; stroke-width: 3.6; }
.seal .s-words { stroke: var(--ember); }
.seal .s-proposal { stroke: var(--ember); stroke-width: 5.4; }
.seal .s-assent { stroke: var(--verd); }
.seal .s-private { stroke: var(--fg-2); stroke-dasharray: 2.4 2.2; }
.seal .s-silence { stroke: var(--mute); stroke-width: 1.4; opacity: 0.75; }
.seal-inline { display: inline-block; vertical-align: -0.22em; margin-right: 0.42em; }

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

.masthead {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem var(--gut) 0.95rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(1.1) blur(8px);
}
.wordmark { display: inline-flex; align-items: center; gap: 0.66rem; text-decoration: none; }
.wordmark-text { font-weight: 600; letter-spacing: 0.24em; font-size: 0.92rem; }

.nav { display: flex; flex-wrap: wrap; gap: clamp(0.7rem, 1.6vw, 1.5rem); font-size: 0.83rem; }
.nav a {
  text-decoration: none; color: var(--fg-2); padding-bottom: 2px;
  border-bottom: 1px solid transparent; letter-spacing: 0.02em;
}
.nav a:hover { color: var(--fg); border-color: var(--line); }
.nav a[aria-current="page"] { color: var(--fg); border-color: var(--ember); }

/* --- structure ------------------------------------------------------------- */

.band { padding: var(--band) var(--gut); max-width: var(--max); margin: 0 auto; }
.band + .band { padding-top: 0; }
.narrow { max-width: var(--max); }
.band.narrow > *, .page-head.narrow > * { max-width: 720px; }

.section-title {
  font-family: var(--mono);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 500;
  color: var(--fg-3); margin: 0 0 1.5rem;
  padding-bottom: 0.6rem; border-bottom: 1px solid var(--line);
}
.sub-title {
  font-family: var(--mono);
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 500;
  color: var(--fg-3); margin: 0 0 1rem;
}
.lede { max-width: 68ch; font-size: 1.02rem; }
.note { margin-top: 1.1rem; }
p.note.v-derived, .v-derived.note { color: var(--mute); }

.page-head { padding: clamp(2.1rem, 5vw, 3.4rem) var(--gut) clamp(1.3rem, 3vw, 1.9rem); max-width: var(--max); margin: 0 auto; }
.page-head + .band { padding-top: clamp(1.1rem, 2.6vw, 1.9rem); }
.page-title {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: -0.02em; font-weight: 400; margin: 0 0 1.1rem; line-height: 1.05;
}
.dateline { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 clamp(1.2rem, 2.6vw, 1.9rem); }
.dateline i { color: var(--line); font-style: normal; }
.dateline span { white-space: nowrap; }

/* --- NOW strip (World) ----------------------------------------------------- */

.now { max-width: var(--max); margin: 0 auto; padding: 1.35rem var(--gut) 0; }
.now-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.6rem 1.4rem; }
.now-dorm { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--fg-2); }
.now-dorm .elapsed { color: var(--fg); font-weight: 600; }
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ember);
  animation: pulse 3.6s ease-out infinite; flex: none;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--ember-soft); }
  65% { box-shadow: 0 0 0 11px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.ruler { display: flex; align-items: flex-end; gap: clamp(0.5rem, 1.4vw, 1.1rem); margin-top: 1rem; }
.beat { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.beat i { display: block; width: clamp(26px, 4vw, 44px); height: 10px; }
.beat.done i { background: var(--fg-3); }
.beat em {
  font-style: normal; font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.1em; color: var(--fg-3); text-transform: uppercase;
}
.beat.next i { background: transparent; border: 1px solid var(--ember); animation: waiting 3.6s ease-in-out infinite; }
.beat.next em { color: var(--ember); }
@keyframes waiting { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* --- hero (World) ---------------------------------------------------------- */

.hero { padding: clamp(2rem, 5vw, 3.6rem) var(--gut) clamp(1.6rem, 3.4vw, 2.6rem); max-width: var(--max); margin: 0 auto; }
.headline {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  font-weight: 400;
  margin: 0 0 clamp(1.4rem, 3vw, 2rem);
  max-width: 24ch;
}
.headline span { display: block; animation: rise 700ms cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--d, 0ms); }
.headline span + span { color: var(--ember); }
.standfirst { max-width: 64ch; }
.standfirst .v-narration { font-size: 1.05rem; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(-5px) scale(0.7); } to { opacity: 1; transform: none; } }

/* --- seal field (the fifteen) ---------------------------------------------- */

.seal-field {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft);
  margin-top: 1.6rem;
}
.dweller {
  background: var(--bg); padding: 1.35rem 1rem 1.2rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-decoration: none; text-align: center;
  transition: background 150ms ease;
  animation: rise 650ms cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--d, 0ms);
}
.dweller:hover { background: var(--bg-2); }
.dweller .seal { transition: transform 220ms cubic-bezier(0.2, 0.7, 0.3, 1); }
.dweller:hover .seal { transform: rotate(14deg) scale(1.06); }
.dweller b { font-family: var(--serif); font-weight: 500; font-size: 1.06rem; letter-spacing: -0.01em; margin-top: 0.15rem; }
.dweller:hover b { color: var(--ember); }
.dweller em {
  font-style: normal; font-family: var(--mono); font-size: 0.58rem; color: var(--fg-3);
  text-transform: uppercase; letter-spacing: 0.09em;
}
.dweller .v-derived { font-size: 0.6rem; color: var(--mute); }

/* --- what stands (World) --------------------------------------------------- */

.stands { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3.4rem); }
.law { border-left: 3px solid var(--ember); padding-left: clamp(1rem, 2.4vw, 1.7rem); }
.law-head { margin: 0 0 0.8rem; }
.law-head b { color: var(--ember); }
.law-text { margin: 0 0 0.9rem; font-size: 1.24rem; line-height: 1.46; }
.open-col { display: flex; flex-direction: column; }
.open-item { padding: 0.95rem 0; border-top: 1px solid var(--line-soft); }
.open-item:first-of-type { border-top: 0; padding-top: 0; }
.open-item .framed { margin: 0; }
.open-item .v-narration { font-size: 0.94rem; }

/* --- last moments (World) -------------------------------------------------- */

.moments { display: grid; gap: 0; max-width: 78ch; }
.moment { padding: 1.1rem 0; border-top: 1px solid var(--line-soft); }
.moment:first-child { border-top: 0; }
.moment header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem; margin-bottom: 0.5rem; }
.moment blockquote { margin: 0; padding-left: 1rem; border-left: 2px solid var(--line); max-width: 72ch; }
.after-line { max-width: 68ch; margin-top: 1.6rem; }

/* --- next / doorway -------------------------------------------------------- */

.next-band { border-top: 1px solid var(--line); padding-top: clamp(1.6rem, 3.4vw, 2.4rem); }
.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.next-card { background: var(--bg); padding: 1.4rem 1.35rem 1.6rem; text-decoration: none; display: flex; flex-direction: column; gap: 0.45rem; transition: background 150ms ease; }
.next-card:hover { background: var(--bg-2); }
.next-card .v-derived { color: var(--mute); }
.next-card b { font-family: var(--serif); font-size: 1.22rem; font-weight: 500; letter-spacing: -0.014em; }
.next-card:hover b { color: var(--ember); }
.next-card em { font-style: normal; color: var(--fg-2); font-size: 0.88rem; }
.doorway {
  display: inline-block; margin-top: 1.6rem; font-family: var(--serif); font-size: 1.05rem;
  text-decoration: none; border-bottom: 1px solid var(--ember); padding-bottom: 2px; transition: color 140ms ease;
}
.doorway:hover { color: var(--ember); }

/* --- evidence & events ----------------------------------------------------- */

.framed { margin: 0 0 0.9rem; }
.framed > p { margin: 0 0 0.5rem; }

.evidence { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.45rem 0 0; }
.evidence-label {
  font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--mute); margin-right: 0.2rem;
}
.chip {
  font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.03em;
  padding: 0.16rem 0.42rem; border: 1px solid var(--line); color: var(--verd);
  text-decoration: none; background: var(--bg-2); transition: all 120ms ease;
}
a.chip:hover { border-color: var(--verd); background: var(--verd); color: var(--bg); }
.chip-more { color: var(--mute); background: transparent; }

.events { display: flex; flex-direction: column; }
.event { padding: 1.15rem 0; border-top: 1px solid var(--line-soft); scroll-margin-top: 5rem; }
.event:target { background: var(--ember-soft); box-shadow: -1rem 0 0 var(--ember-soft), 1rem 0 0 var(--ember-soft); }
.event-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem 0.7rem; margin-bottom: 0.55rem; }
.event-head .id, .event-head .tick { color: var(--mute); }
.event .who { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--ember); font-weight: 520; white-space: nowrap; }
.event .who:hover { color: var(--ember); }
.event .who.system { border-bottom-color: var(--line); color: var(--fg-3); }
.event .vis {
  font-family: var(--mono); font-size: 0.58rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ember); border: 1px solid var(--ember-soft); padding: 0.05rem 0.35rem;
}
.event blockquote { margin: 0.35rem 0 0; padding-left: 1.05rem; border-left: 2px solid var(--line); max-width: 74ch; }
.event.private blockquote { border-left-style: dashed; border-left-color: var(--ember-soft); }
.event .raw { margin-top: 0.7rem; }
.raw summary {
  font-family: var(--mono); font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--mute); cursor: pointer; list-style: none;
}
.raw summary::before { content: "+ "; }
.raw[open] summary::before { content: "− "; }
.raw summary:hover { color: var(--verd); }
.raw pre {
  margin: 0.6rem 0 0; padding: 0.9rem 1rem; background: var(--bg-2); border: 1px solid var(--line);
  font-family: var(--mono); font-size: 0.7rem; line-height: 1.5; color: var(--fg-2);
  overflow-x: auto; white-space: pre;
}
.tick-close {
  padding: 0.5rem 0; border-top: 1px solid var(--line-soft); color: var(--mute);
  display: flex; align-items: center; gap: 0.6rem; scroll-margin-top: 5rem;
}
.tick-close::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }

/* --- chronicle ------------------------------------------------------------- */

.voices { margin-top: 1.5rem; max-width: 76ch; text-transform: none; letter-spacing: 0.01em; font-size: 0.76rem; color: var(--fg-3); }
.voices b.v-record { font-weight: 500; color: var(--fg); }
.voices b.v-derived { font-size: 1em; }

.feature { border-top: 2px solid var(--fg); padding-top: 1.6rem; }
.kicker {
  font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--ember); margin: 0 0 0.8rem;
}
.feature-title { font-family: var(--serif); font-size: clamp(1.7rem, 3.8vw, 2.7rem); letter-spacing: -0.018em; font-weight: 400; margin: 0 0 1.8rem; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.35rem; max-width: 76ch; }
.steps li {
  display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.9rem; align-items: start;
  animation: rise 620ms cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--d, 0ms);
}
.step-n { padding-top: 0.18rem; color: var(--mute); }
.steps .framed { margin: 0; }
.close { margin-top: 2rem; max-width: 76ch; }

.side-threads { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.side h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 500; letter-spacing: -0.014em; margin: 0 0 0.7rem; padding-top: 0.9rem; border-top: 1px solid var(--ember); }

.tick { padding: 1.9rem 0 0.6rem; }
.tick + .tick { border-top: 1px solid var(--line); }
.tick-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.5rem; }
.tick-head h3 { margin: 0; font-family: var(--serif); font-size: 1.55rem; font-weight: 500; letter-spacing: -0.016em; }
.tick-head h3 .v-derived { font-size: 0.68rem; color: var(--mute); }
.tick-note { max-width: 70ch; margin: 0 0 0.5rem; }

.closing { border-top: 1px solid var(--line); padding-top: 1.8rem; max-width: 70ch; }

/* --- the stave ------------------------------------------------------------- */

.stave { margin: 0; }
.stave-grid { --cols: minmax(120px, 200px) repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stave-head, .stave-row { display: grid; grid-template-columns: var(--cols); align-items: stretch; }
.stave-head { border-bottom: 1px solid var(--line); }
.stave-tick {
  font-family: var(--mono); font-size: 0.68rem; color: var(--mute); letter-spacing: 0.1em;
  padding: 0.5rem 0; text-align: center; border-left: 1px solid var(--line-soft);
}
.stave-row { text-decoration: none; color: inherit; border-bottom: 1px solid var(--line-soft); transition: background 140ms ease; }
.stave-row:hover, .stave-row:focus-visible { background: var(--bg-2); }
.stave-row:hover .stave-name b { color: var(--ember); }
.stave-name { display: flex; align-items: center; gap: 0.55rem; padding: 0.5rem 0.9rem 0.5rem 0; min-width: 0; }
.stave-name b { font-family: var(--serif); font-weight: 500; font-size: 0.98rem; letter-spacing: -0.01em; transition: color 140ms ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell { display: grid; place-items: center; border-left: 1px solid var(--line-soft); min-height: 42px; }
.cell i { display: block; width: 13px; height: 13px; animation: settle 520ms cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--d, 0ms); }

.k-words i { background: var(--fg); }
.k-proposal i { background: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.k-assent i { background: var(--verd); width: 9px; height: 9px; }
.k-private i { border: 1.5px solid var(--fg-2); background: transparent; position: relative; }
.k-private i::after { content: ""; position: absolute; inset: 3.5px; background: var(--fg-2); }
.k-pass i { width: 3px; height: 3px; background: var(--mute); border-radius: 50%; }
.k-rejected i {
  border: 1px solid var(--mute);
  background: linear-gradient(45deg, transparent 44%, var(--mute) 44%, var(--mute) 56%, transparent 56%);
  opacity: 0.8;
}
.k-none i { background: transparent; }

.stave-legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.35rem; margin-top: 1.1rem;
  font-family: var(--mono); font-size: 0.65rem; color: var(--fg-3); letter-spacing: 0.04em;
}
.stave-legend span { display: inline-flex; align-items: center; gap: 0.45rem; }
.stave-legend i { width: 11px; height: 11px; display: block; }
.stave-legend .k-words { background: var(--fg); }
.stave-legend .k-proposal { background: var(--ember); }
.stave-legend .k-assent { width: 8px; height: 8px; background: var(--verd); }
.stave-legend .k-private { border: 1.5px solid var(--fg-2); }
.stave-legend .k-pass { width: 3px; height: 3px; border-radius: 50%; background: var(--mute); }
.stave-legend .k-rejected { border: 1px solid var(--mute); background: linear-gradient(45deg, transparent 44%, var(--mute) 44%, var(--mute) 56%, transparent 56%); }

/* --- inhabitant ------------------------------------------------------------ */

.presence { background: var(--bg); border-bottom: 1px solid var(--line); }
.presence-grid {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(2.2rem, 5vw, 3.6rem) var(--gut);
  display: flex; align-items: center; gap: clamp(1.4rem, 3.4vw, 2.8rem);
}
.seal-hero path { stroke-width: 3; }
.seal-hero .s-proposal { stroke-width: 4.6; }
.presence-text .page-title { margin-bottom: 0.7rem; }
.presence-line { margin: 0 0 0.5rem; }
.presence-note { color: var(--mute); }

.charter { display: grid; gap: 1px; margin: 0 0 1rem; }
.charter > div { background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); padding: 1.15rem 1.3rem; display: grid; grid-template-columns: minmax(110px, 150px) 1fr; gap: 1.2rem; align-items: start; }
.charter dt { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--fg-3); padding-top: 0.22rem; }
.charter dd { margin: 0; max-width: 62ch; }

.own-stave { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; }
.own-cell {
  background: var(--bg-2); box-shadow: 0 0 0 1px var(--line);
  padding: 1rem 0.6rem; display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  animation: rise 520ms cubic-bezier(0.2, 0.7, 0.3, 1) both; animation-delay: var(--d, 0ms);
}
.own-cell i { width: 15px; height: 15px; display: block; }
.own-cell.k-words i { background: var(--fg); }
.own-cell.k-proposal i { background: var(--ember); box-shadow: 0 0 0 3px var(--ember-soft); }
.own-cell.k-assent i { background: var(--verd); width: 11px; height: 11px; }
.own-cell.k-private i { border: 1.5px solid var(--fg-2); position: relative; }
.own-cell.k-private i::after { content: ""; position: absolute; inset: 4px; background: var(--fg-2); }
.own-cell.k-pass i { width: 4px; height: 4px; border-radius: 50%; background: var(--mute); }
.own-cell.k-rejected i { border: 1px solid var(--mute); background: linear-gradient(45deg, transparent 44%, var(--mute) 44%, var(--mute) 56%, transparent 56%); }
.own-tick { color: var(--mute); font-size: 0.66rem; }
.own-label { font-size: 0.7rem; color: var(--fg-3); text-align: center; line-height: 1.3; }

.empty { font-style: italic; max-width: 60ch; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; margin-bottom: 1.5rem; }
.fact { background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.3rem; }
.fact b { font-size: 1.8rem; font-family: var(--mono); color: var(--verd); letter-spacing: -0.02em; text-transform: none; }
.fact span { font-size: 0.82rem; color: var(--fg-3); }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 1px; }
.roster-item {
  background: var(--bg-2); box-shadow: 0 0 0 1px var(--line);
  padding: 0.8rem 0.95rem; text-decoration: none;
  display: flex; align-items: center; gap: 0.7rem; transition: background 130ms ease;
}
.roster-item:hover { background: var(--bg-3); }
.roster-item span { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.roster-item b { font-family: var(--serif); font-weight: 500; font-size: 0.95rem; }
.roster-item:hover b { color: var(--ember); }
.roster-item em { font-style: normal; font-family: var(--mono); font-size: 0.56rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- word & deed ----------------------------------------------------------- */

.rule-note { max-width: 68ch; margin-top: 1.4rem; }

.wd { border: 1px solid var(--line); background: var(--bg-2); padding: clamp(1.2rem, 2.6vw, 1.9rem); margin-bottom: 1.6rem; }
.wd-head { display: flex; align-items: center; gap: 0.95rem; padding-bottom: 0.95rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.wd-head > div { display: flex; flex-direction: column; gap: 0.15rem; }
.wd-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; letter-spacing: -0.016em; text-decoration: none; align-self: flex-start; border-bottom: 1px solid var(--ember); }
.wd-name:hover { color: var(--ember); }
.wd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.2rem, 3vw, 2.6rem); }
.wd-col h4 { margin: 0 0 0.2rem; font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--fg-3); font-weight: 500; }
.wd-col .small { margin: 0 0 0.7rem; font-size: 0.62rem; color: var(--mute); }
.wd-quote { margin: 0; padding-left: 0.95rem; border-left: 2px solid var(--line); max-width: 44ch; font-size: 1.18rem; line-height: 1.44; }
.wd-col ul { margin: 0; padding-left: 1.05rem; display: grid; gap: 0.45rem; }
.wd-col li::marker { color: var(--mute); }
.wd-verdict { margin: 1.35rem 0 0.6rem; padding: 0.75rem 0 0.75rem 1rem; border-left: 2px solid var(--ember); font-size: 1.08rem; }
.wd.consistent .wd-verdict { border-left-color: var(--verd); }
.wd-context { font-size: 0.9rem; max-width: 76ch; margin: 0 0 0.4rem; }

/* --- the Oracle disc ------------------------------------------------------- */

.disc-band { padding-top: clamp(1rem, 2.6vw, 2rem); }
.disc-figure { margin: 0; max-width: 920px; margin-inline: auto; }
.disc { width: 100%; height: auto; display: block; }

.disc .ring { fill: none; stroke: var(--fg); opacity: 0.22; }
.disc .root { stroke: var(--fg-3); stroke-width: 1; opacity: 0.5; }
.disc .chord { stroke-width: 1; opacity: 0.55; }
.disc .c-reply { stroke: var(--fg-2); }
.disc .c-whisper { stroke: var(--ember); stroke-dasharray: 3 4; }
.disc .c-assent { stroke: var(--verd); }
.disc .stm-arc { fill: none; stroke: var(--verd); stroke-width: 2; opacity: 0.55; }
.disc .stm-arc.adopted { stroke: var(--ember); stroke-width: 3.4; opacity: 0.9; }
.disc .act circle { transition: r 140ms ease; }
.disc .act .hit { fill: transparent; }
.disc .a-words circle:first-child { fill: var(--ember); }
.disc .a-proposal circle:first-child { fill: var(--ember); stroke: var(--fg); stroke-width: 1.4; }
.disc .a-assent circle:first-child { fill: var(--verd); }
.disc .a-private circle:first-child { fill: none; stroke: var(--fg); stroke-width: 1.3; stroke-dasharray: 2.4 2; }
.disc .act:hover circle:first-child { fill: var(--fg); stroke: var(--ember); }
.disc .disc-label text {
  font-family: var(--mono); font-size: 12.5px; fill: var(--fg-2); letter-spacing: 0.06em;
}
.disc .disc-label:hover text, .disc .disc-label:focus-visible text { fill: var(--ember); }
.disc .disc-label.silent text { fill: var(--fg-3); opacity: 0.8; }
.disc .genesis circle { fill: var(--fg); }
.disc .genesis text { font-family: var(--mono); font-size: 10.5px; fill: var(--fg-3); letter-spacing: 0.22em; }

.disc-figure figcaption { margin-top: 1.7rem; max-width: 76ch; margin-inline: auto; display: grid; gap: 0.7rem; }

@media (prefers-reduced-motion: no-preference) {
  .disc .grain { animation: rise 900ms ease both; }
  .disc .chords-g, .disc .stm-g { animation: rise 900ms ease both 500ms; }
  .disc .acts-g { animation: rise 900ms ease both 800ms; }
  .disc .labels-g { animation: rise 900ms ease both 1100ms; }
}

/* --- census & cards -------------------------------------------------------- */

.census { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 1px; }
.census-item { background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); padding: 1.1rem 1.2rem; }
.census-item b { display: block; font-family: var(--mono); font-size: 1.7rem; color: var(--verd); letter-spacing: -0.02em; text-transform: none; }
.census-item span { font-size: 0.8rem; }

.cards { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.card { background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); padding: 1.4rem; }
.card h3 { margin: 0 0 0.6rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 500; letter-spacing: -0.01em; }
.card .framed { margin: 0; }

/* --- entry ----------------------------------------------------------------- */

.big-para { font-size: 1.28rem; line-height: 1.5; max-width: 58ch; }
.pipeline { display: grid; gap: 1rem; max-width: 68ch; padding-left: 1.2rem; }
.pipeline li::marker { font-family: var(--mono); color: var(--mute); font-size: 0.8rem; }
.pipeline b { color: var(--fg); font-weight: 560; }
.doorway-band { border-top: 1px solid var(--line); padding-top: 2rem; }
.closing-line { margin-top: 2.2rem; font-size: 0.9rem; color: var(--ember); letter-spacing: 0.09em; }

/* --- footer ---------------------------------------------------------------- */

.foot { border-top: 1px solid var(--line); background: var(--bg-2); margin-top: var(--band); }
.foot-grid {
  max-width: var(--max); margin: 0 auto; padding: 2.4rem var(--gut) 3rem;
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 2rem;
}
.foot p { margin: 0 0 0.6rem; max-width: 58ch; font-size: 0.88rem; }
.foot .quiet { color: var(--fg-3); }
.foot .quiet a { color: inherit; }
.foot-links { display: flex; flex-direction: column; gap: 0.55rem; align-items: flex-start; }
.foot-links a { text-decoration: none; font-size: 0.88rem; border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.foot-links a:hover { border-color: var(--ember); color: var(--ember); }

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

@media (max-width: 1080px) {
  .stands { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 860px) {
  .wd-cols { grid-template-columns: 1fr; gap: 1.4rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .charter > div { grid-template-columns: 1fr; gap: 0.4rem; }
  .own-stave { grid-template-columns: repeat(3, 1fr); }
  .presence-grid { gap: 1.4rem; }
  .seal-hero { width: 96px; height: 96px; }
}

@media (max-width: 720px) {
  .disc .disc-label text { font-size: 15px; }
  .disc-figure { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .disc { min-width: 620px; }
}

@media (max-width: 620px) {
  .masthead { flex-direction: column; align-items: flex-start; gap: 0.7rem; position: static; }
  .nav { gap: 0.85rem; }
  .now-line { flex-direction: column; gap: 0.5rem; }
  .headline { max-width: none; }
  .seal-field { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); }
  .stave-grid { --cols: minmax(92px, 1.5fr) repeat(6, minmax(0, 1fr)); }
  .stave-name { padding-right: 0.4rem; gap: 0.4rem; }
  .stave-name b { font-size: 0.82rem; }
  .stave-name .seal { display: none; }
  .cell { min-height: 36px; }
  .cell i { width: 11px; height: 11px; }
  .cell.k-pass i { width: 4px; height: 4px; border-radius: 50%; }
  .cell.k-assent i { width: 8px; height: 8px; }
  .steps li { grid-template-columns: 1.9rem 1fr; gap: 0.6rem; }
  .event blockquote { padding-left: 0.8rem; }
  .presence-grid { flex-direction: column; align-items: flex-start; }
  .law-text { font-size: 1.1rem; }
  .big-para { font-size: 1.14rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* --- V2 fixes -------------------------------------------------------------- */

/* A scoped ground must re-resolve inherited text colour, not only tokens. */
.g-night, .g-paper { color: var(--fg); }

/* Support fans on the disc: recorded supports converging on the proposal. */
.disc .fan { stroke: var(--verd); stroke-width: 1; opacity: 0.4; }
.disc .fan.adopted { stroke: var(--ember); stroke-width: 1.5; opacity: 0.66; }

/* World hero: stakes above the fold on wide screens. */
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.8rem, 4.5vw, 4rem); align-items: start; }
.hero-open { border-left: 1px solid var(--line); padding-left: clamp(1rem, 2.4vw, 1.8rem); }
.hero-open .open-item { padding: 0.8rem 0; }
.hero-open .v-narration { font-size: 0.9rem; }
.stands-solo { grid-template-columns: 1fr; max-width: 82ch; }
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero-open { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 1.4rem; }
}

/* --- V2 review pass -------------------------------------------------------- */

/* Masthead: the archive's serif voice owns the wordmark; the mark is heavier. */
.gnomon-mast path { stroke-width: 2.6; }
.wordmark-text {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.14em;
  font-size: 1.04rem;
}

/* Seals are seals, not spinners: a fixed origin at twelve o'clock and, at
   recognition sizes, the inhabitant's initial in the archive serif. */
.seal .seal-origin { fill: var(--fg-3); }
.seal path { stroke-width: 4.2; }
.seal .s-proposal { stroke-width: 6; }
.seal .s-silence { stroke-width: 1.8; opacity: 0.8; }
.seal-hero path { stroke-width: 3.2; }
.seal-hero .s-proposal { stroke-width: 4.8; }
.seal .seal-initial {
  font-family: var(--serif);
  font-size: 15px;
  fill: var(--fg-2);
}

/* Evidence citations, not dev-tool pills. */
.chip {
  border: 0;
  background: transparent;
  padding: 0;
  border-bottom: 1px dotted var(--verd);
}
a.chip:hover { background: transparent; color: var(--ember); border-bottom-color: var(--ember); }
.chip-more { border-bottom: 0; }

/* Census and standing as ruled ledger rows, not KPI tiles. */
.census, .facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 clamp(1.4rem, 3.4vw, 3rem); }
.census-item, .fact {
  background: transparent; box-shadow: none;
  display: flex; flex-direction: row; align-items: baseline; gap: 0.8rem;
  padding: 0.62rem 0; border-top: 1px solid var(--line);
}
.census-item b, .fact b { font-size: 1.28rem; min-width: 2.6ch; text-align: right; }
.census-item span, .fact span { font-size: 0.86rem; color: var(--fg-2); }
.census-item em.v-derived { margin-left: auto; font-style: normal; color: var(--mute); font-size: 0.56rem; }
.facts { margin-bottom: 1.5rem; }

/* The world's open threads speak with recorded voices. */
.open-voice { margin: 0.65rem 0 0; padding-left: 0.95rem; border-left: 2px solid var(--line); }
.open-voice p { margin: 0 0 0.35rem; font-size: 0.98rem; }
.open-voice footer { display: flex; align-items: baseline; gap: 0.6rem; }
.open-voice .who { font-size: 0.82rem; text-decoration: none; border-bottom: 1px solid var(--ember); }
.open-voice .who:hover { color: var(--ember); }

.ruler-note { margin: 0.85rem 0 0; color: var(--mute); }

/* Oracle head: ceremonial, centred on the disc's axis. */
.head-center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.head-center .lede { max-width: 62ch; }
.head-center .dateline { justify-content: center; }

/* Entry: the door is marked by the Gnomon, and the rhythm closes up. */
.entry-head { position: relative; }
.entry-ornament {
  position: absolute; right: var(--gut); top: 50%; transform: translateY(-38%);
  opacity: 0.34; pointer-events: none;
}
.entry-ornament .g-old { stroke: var(--fg-3); }
.page-head.narrow { padding-bottom: 0.6rem; }

/* Mobile refinements from review. */
.disc-figure.has-scroll .drag-hint {
  display: block; text-align: center; margin-top: 0.7rem;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--mute);
}
.drag-hint { display: none; }

@media (max-width: 900px) {
  .entry-ornament { opacity: 0.14; width: 150px; height: 150px; }
}
@media (max-width: 620px) {
  .section-title { letter-spacing: 0.12em; }
  .presence-note { color: var(--fg-3); }
  .page-head .note { overflow-wrap: anywhere; }
}

/* Contrast floor for small mono on both grounds. */
.g-paper { --mute: #8f8c7b; }
.g-night { --mute: #6b7268; }

/* --- Editorial clarity layer (Sitting II) ---------------------------------
   Additive only: reuses the existing grounds, voices, rules and type scale.
   No colour, font or spacing token is redefined. */

.intro { padding: clamp(3rem, 8vw, 5.5rem) var(--gut) clamp(1.4rem, 3vw, 2.2rem); max-width: var(--max); margin: 0 auto; }
.intro-title { font-family: var(--serif); font-size: clamp(2.6rem, 7vw, 4.4rem); letter-spacing: 0.06em; margin: 0 0 0.7rem; font-weight: 500; }
.intro-lede { font-size: clamp(1.15rem, 2.4vw, 1.5rem); max-width: 34ch; margin: 0 0 0.9rem; }
.intro-sub { max-width: 62ch; margin: 0 0 1.6rem; }
.intro-cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 0; }
.cta { display: inline-block; padding: 0.62rem 1.15rem; border: 1px solid var(--edge, #d98a3a); color: inherit; text-decoration: none; font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.cta:hover { background: var(--edge, #d98a3a); color: var(--bg, #0f1411); }
.cta.ghost { border-color: var(--line); }

.current-state { padding-top: clamp(1rem, 2.4vw, 1.6rem); }
.status-note { margin-top: 1.2rem; border-left: 2px solid var(--edge, #d98a3a); padding-left: 1.1rem; max-width: 70ch; display: grid; gap: 0.55rem; }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; max-width: 72ch; }
.timeline > li { border-left: 1px solid var(--line); padding-left: 1.2rem; position: relative; }
.timeline > li::before { content: ""; position: absolute; left: -4px; top: 0.45rem; width: 7px; height: 7px; background: var(--edge, #d98a3a); }
.timeline > li > b { display: block; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.4rem; }
.timeline p { margin: 0; }

.glossary { display: grid; gap: 0.1rem; max-width: 74ch; margin: 0; }
.glossary dt { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.04em; margin-top: 1rem; }
.glossary dd { margin: 0.25rem 0 0; }

.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 74ch; counter-reset: flow; }
.flow > li { counter-increment: flow; display: grid; grid-template-columns: 2.4rem 1fr; gap: 0.9rem; padding: 0.95rem 0; border-top: 1px solid var(--line-soft); align-items: baseline; }
.flow > li:last-child { border-bottom: 1px solid var(--line-soft); }
.flow > li::before { content: counter(flow); font-family: var(--mono); font-size: 0.78rem; color: var(--edge, #d98a3a); }
.flow > li > b { font-family: var(--mono); font-size: 0.84rem; letter-spacing: 0.05em; text-transform: uppercase; }
.flow > li > span { grid-column: 2; display: block; margin-top: 0.3rem; }
.flow.tight > li { padding: 0.6rem 0; }

.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.compare-col { background: var(--bg-2); padding: 1.5rem; }
.compare-col h3 { margin: 0 0 0.3rem; font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.compare-col ul { list-style: none; margin: 0.9rem 0; padding: 0; display: grid; gap: 0.35rem; font-family: var(--mono); font-size: 0.86rem; }
.compare-col ul b { color: var(--edge, #d98a3a); }

.act-cards { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); background: var(--line-soft); border: 1px solid var(--line-soft); }
.act-card { background: var(--bg-2); padding: 1.35rem; }
.act-card h3 { margin: 0.35rem 0 0.5rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 500; }
.act-card p { margin: 0 0 0.3rem; }
.act-card .raw { margin-top: 0.9rem; }
.act-title { font-family: var(--serif); font-size: clamp(1.3rem, 3vw, 1.75rem); font-weight: 500; margin: 0.2rem 0 1rem; }
.act-fields { display: grid; grid-template-columns: minmax(84px, 120px) 1fr; gap: 0.55rem 1rem; margin: 0.6rem 0; }
.act-fields dt { font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; opacity: 0.75; }
.act-fields dd { margin: 0; }
.act-body { white-space: pre-wrap; }
.break { word-break: break-all; }
.lifecycle { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.4rem; font-size: 0.92rem; }
.lifecycle blockquote { margin: 0.4rem 0 0; padding-left: 0.9rem; border-left: 1px solid var(--line); }

.plain { border-left: 2px solid var(--line); padding-left: 1.1rem; margin: 1.2rem 0; max-width: 72ch; display: grid; gap: 0.5rem; }
.label-strong { font-family: var(--mono); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--edge, #d98a3a); margin: 1.1rem 0 0.5rem; }

.chron { display: grid; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.chron-entry { background: var(--bg-2); padding: 1.35rem; }
.chron-entry h3 { margin: 0.3rem 0 0.55rem; font-family: var(--serif); font-size: 1.08rem; font-weight: 500; }
.chron-entry p { margin: 0 0 0.4rem; }

.dwellers { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 1px; }

@media (max-width: 640px) {
  .act-fields { grid-template-columns: 1fr; gap: 0.2rem 0; }
  .flow > li { grid-template-columns: 1.8rem 1fr; }
}
