:root {
  --room: #111815; --room-2: #17211d; --room-3: #1e2b26; --rule: #2c3d36;
  --text: #e9e3d3; --text-dim: #a3afa6;
  --paper: #f2ebda; --paper-2: #e7dcc5; --paper-rule: #cbbd9f; --ink: #1e1a15; --ink-dim: #5a5245;
  --brass: #cba64f; --brass-ink: #7a5c14; --red: #e2776b; --red-ink: #9b1c14; --green-ink: #265c43;
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", system-ui, sans-serif;
  --typed: "Courier Prime", "Courier New", monospace;
  --glass: rgba(17, 24, 21, .86);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: #a3bdbf; color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.5; overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
h1:focus, h2:focus { outline: none; }
.label { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.is-grave { color: var(--red); }

/* ── the menu page ─────────────────────────────────────────── */
body.menu-page { background: var(--room); overflow: auto; }
.menu { max-width: 640px; margin: 0 auto; padding: 48px 16px 64px; display: flex; flex-direction: column; gap: 20px; }
.menu-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.menu-head svg { color: var(--brass); flex: none; }
.menu-head h1 { font-family: var(--display); font-weight: 400; font-size: 34px; line-height: 1.1; }
.menu-head p { color: var(--text-dim); }
.panel-box { background: var(--room-2); border: 1px solid var(--rule); border-radius: 4px; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.panel-box h2 { font-family: var(--display); font-weight: 400; font-size: 22px; }
.menu-row { display: flex; justify-content: space-between; align-items: center; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
.form input, .form select { min-height: 44px; padding: 10px 12px; background: var(--room); border: 1px solid var(--rule); border-radius: 3px; color: var(--text); font: inherit; }
.form-row { flex-direction: row; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 200px; }
.form-error { color: var(--red); font-size: 13.5px; }
.runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.run { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.run b { font-family: var(--serif); font-size: 17px; display: block; }
.run span { color: var(--text-dim); font-size: 12.5px; display: block; }
.run-actions { display: flex; align-items: center; gap: 10px; }
.btn-quiet.on-dark { color: var(--text-dim); }
.btn-quiet.on-dark:hover { color: var(--text); }

/* ── the map, the whole background ─────────────────────────── */
#map { position: fixed; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map.is-dragging { cursor: grabbing; }
#map .cell[data-region]:hover { filter: brightness(1.06); }
#map .cell[data-country]:hover { filter: brightness(1.04); }
#map text { pointer-events: none; }
#map.is-far .label-province, #map.is-far .town-minor .label-town { display: none; }
#map:not(.is-near) .town-minor .label-town { display: none; }

/* ── the bar ───────────────────────────────────────────────── */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 4; display: flex; align-items: center; gap: 20px; padding: 10px 20px; background: linear-gradient(to bottom, rgba(17,24,21,.92), rgba(17,24,21,.72)); backdrop-filter: blur(6px); }
.crest { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.crest svg { color: var(--brass); flex: none; }
.crest-name { font-family: var(--display); font-size: 20px; line-height: 1.1; }
.crest-date { color: var(--text-dim); font-size: 12.5px; }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.treasury { display: flex; align-items: baseline; gap: 8px; }
.treasury b { font-family: var(--display); font-size: 26px; font-weight: 400; }
.treasury span { color: var(--text-dim); font-size: 12.5px; }
.pending { color: var(--text-dim); font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 3px; border: 1px solid transparent; font-weight: 600; font-size: 14px; text-decoration: none; }
.btn-brass { background: var(--brass); color: #1b1505; }
.btn-brass:hover { background: #d8b765; }
.btn-brass:disabled { background: var(--room-3); color: var(--text-dim); border-color: var(--rule); }
.btn-line { background: transparent; border-color: var(--rule); color: var(--text); }
.btn-line:hover { border-color: var(--text-dim); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #38302a; }
.btn-ink:disabled { background: var(--paper-rule); color: var(--ink-dim); }
.btn-paper { background: transparent; border-color: var(--ink-dim); color: var(--ink); }
.btn-paper:hover { background: var(--paper-2); }
.btn-quiet { background: none; border: 0; padding: 10px 6px; min-height: 44px; color: var(--ink-dim); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.btn-quiet:hover { color: var(--ink); }

/* ── the rails: round buttons ──────────────────────────────── */
.rail { position: fixed; top: 50%; transform: translateY(-50%); z-index: 4; display: flex; flex-direction: column; gap: 12px; }
.rail-left { left: 18px; } .rail-right { right: 18px; }
.round { width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(203,166,79,.45); background: var(--glass); color: var(--brass); display: grid; place-items: center; box-shadow: 0 10px 24px -12px rgba(0,0,0,.8); position: relative; }
.round:hover { border-color: var(--brass); color: #e2c46f; }
.round[aria-expanded="true"] { background: var(--brass); color: #1b1505; }
.round svg { width: 24px; height: 24px; }
.round .count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red-ink); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.round .count.is-calm { background: var(--brass-ink); }
.round .hint { position: absolute; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--glass); color: var(--text); font-size: 12.5px; padding: 6px 10px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.rail-left .round .hint { left: 66px; } .rail-right .round .hint { right: 66px; }
.round:hover .hint, .round:focus-visible .hint { opacity: 1; }

/* ── side panels ───────────────────────────────────────────── */
.side { position: fixed; top: 64px; bottom: 0; width: min(440px, 92vw); z-index: 6; background: var(--glass); backdrop-filter: blur(10px); border-left: 1px solid var(--rule); padding: 22px 24px 32px; overflow: auto; display: flex; flex-direction: column; gap: 20px; }
.side-right { right: 0; } .side-left { left: 0; border-left: 0; border-right: 1px solid var(--rule); }
.side-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.side-head h2 { font-family: var(--display); font-weight: 400; font-size: 24px; }
.close { background: none; border: 1px solid var(--rule); border-radius: 50%; width: 36px; height: 36px; color: var(--text-dim); font-size: 18px; line-height: 1; }
.close:hover { color: var(--text); border-color: var(--text-dim); }
.side h3 { color: var(--text-dim); margin-bottom: 8px; }
.search { min-height: 44px; padding: 10px 14px; background: var(--room-2); border: 1px solid var(--rule); border-radius: 3px; color: var(--text); font: inherit; width: 100%; }
.search::placeholder { color: #7f8b83; }
.entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.entry { border-top: 1px solid var(--rule); padding-top: 10px; }
.entry b { font-family: var(--serif); font-size: 16px; font-weight: 700; display: block; }
.entry p { color: var(--text-dim); font-size: 13px; margin-top: 3px; }
.situations { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.situation-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.sev { width: 10px; height: 10px; flex: none; }
.sev-grave { background: var(--red); border-radius: 50%; }
.sev-serious { background: var(--brass); transform: rotate(45deg); }
.sev-calm { border: 2px solid #7fb59a; border-radius: 50%; }
.situation p { color: var(--text-dim); font-size: 12.5px; margin-top: 3px; }
.situation .since { color: var(--text-dim); font-size: 11.5px; margin-left: auto; font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--rule); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.ledger { list-style: none; margin: 0; padding: 0; font-family: var(--typed); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.extra { border: 1px solid var(--rule); border-radius: 3px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.extra b { font-family: var(--serif); font-size: 16px; }
.extra p { color: var(--text-dim); font-size: 13px; }
.extra .doc-actions { margin-top: 6px; }
.hint-text { color: var(--text-dim); font-size: 12.5px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--rule); margin-bottom: 4px; overflow-x: auto; }
.tab { background: none; border: 0; padding: 10px 12px; min-height: 44px; color: var(--text-dim); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--brass); }
.tab .n { font-size: 11px; color: var(--text-dim); }
.tab .n.is-grave { color: var(--red); font-weight: 700; }

/* ── bubbles on the map ────────────────────────────────────── */
.bubbles { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
/* the pins stand in the map in map units: close up they are large, from afar they are specks */
#map .pin { cursor: pointer; }
#map .pin .drop { fill: var(--paper); stroke: var(--ink); stroke-width: 0.14; stroke-linejoin: round; }
#map .pin .glyph { fill: var(--ink); font-family: var(--serif); pointer-events: none; }
#map .pin.is-crisis .drop { fill: var(--red-ink); stroke: #fff; }
#map .pin.is-crisis .glyph { fill: #fff; }
#map .pin.is-crisis .halo { fill: none; stroke: var(--red-ink); stroke-width: 0.2; transform-box: fill-box; transform-origin: center; animation: halo 2.4s infinite; }
@keyframes halo { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.4); opacity: 0; } }
#map .pin.is-bill .drop { fill: var(--ink); stroke: var(--paper); }
#map .pin.is-bill .glyph { fill: var(--paper); font-family: var(--typed); }
#map .pin.is-question .drop { fill: var(--brass); stroke: #1b1505; }
#map .pin.is-news .drop { fill: #fff; stroke-dasharray: 0.25 0.18; }
#map .pin.is-news .glyph { font-family: var(--typed); }
#map .pin:hover .drop, #map .pin.is-selected .drop { stroke-width: 0.22; }
#map .pin.is-selected .drop { stroke: var(--brass); }
.popover { position: absolute; z-index: 4; width: 300px; background: var(--paper); color: var(--ink); border-radius: 3px; padding: 14px 16px 16px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.75); pointer-events: auto; animation: arrive .25s ease-out; }
.popover .label { color: var(--ink-dim); display: block; margin-bottom: 4px; }
.popover .label.is-crisis { color: var(--red-ink); }
.popover h3 { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.25; }
.popover p { color: var(--ink-dim); font-size: 13.5px; margin-top: 6px; }
.popover .popover-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.popover .dismiss { background: none; border: 0; color: var(--ink-dim); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; padding: 8px 0; }

/* the broadsheet: a paper read in full */
.broadsheet { width: min(1040px, 100%); background: var(--paper); color: var(--ink); padding: 34px clamp(22px, 4vw, 56px) 44px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); border-radius: 2px; }
.masthead { text-align: center; border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 4px; }
.masthead b { display: block; font-family: var(--display); font-weight: 400; font-size: 54px; letter-spacing: .02em; line-height: 1.1; }
.broadsheet .dateline { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--typed); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); border-top: 3px double var(--ink); border-bottom: 1px solid var(--ink); padding: 5px 0; margin-bottom: 26px; }
.broadsheet h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(30px, 4.2vw, 46px); line-height: 1.08; letter-spacing: -.01em; max-width: 26ch; }
.broadsheet .byline { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin: 18px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--paper-rule); }
.broadsheet .body { column-count: 2; column-gap: 34px; column-rule: 1px solid var(--paper-rule); font-family: var(--serif); font-size: 16.5px; line-height: 1.6; }
.broadsheet .body p { margin: 0 0 .9em; }
.broadsheet .body p:first-child::first-letter { font-family: var(--display); font-size: 58px; line-height: .8; float: left; padding: 6px 8px 0 0; }
.broadsheet .others { margin-top: 30px; padding-top: 16px; border-top: 3px double var(--ink); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.broadsheet .others button { background: none; border: 0; padding: 0; text-align: left; color: var(--ink); }
.broadsheet .others b { display: block; font-family: var(--typed); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: 4px; }
.broadsheet .others span { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.25; text-decoration: underline; text-decoration-color: var(--paper-rule); text-underline-offset: 4px; }
.broadsheet .others button:hover span { text-decoration-color: var(--ink); }
.broadsheet .paper-foot { display: flex; justify-content: flex-end; margin-top: 26px; }

/* ── the sheet: what you are doing ─────────────────────────── */
.veil { position: fixed; inset: 0; z-index: 7; background: rgba(8, 12, 10, .55); display: flex; align-items: flex-start; justify-content: center; padding: 72px 16px 24px; overflow: auto; }
.sheet { width: min(900px, 100%); background: var(--room); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.9); padding: 28px clamp(18px, 3vw, 40px) 36px; }
.veil.is-papers .sheet { background: none; border: 0; box-shadow: none; padding: 0; width: min(780px, 100%); display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
.veil.is-papers .sheet-head { margin-bottom: 0; }
.veil.is-papers .sheet-head h1 { color: var(--paper); text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.veil.is-papers .record { background: var(--paper-2); color: var(--ink); border: 0; box-shadow: 0 18px 40px -20px rgba(0,0,0,.8); }
.veil.is-papers .record .label { color: var(--ink-dim); }
.veil.is-papers .busy { color: var(--paper); }
.veil.is-papers .after { justify-content: flex-end; }
.veil.is-papers .matters { margin-top: 0; }
.veil.is-broadsheet .sheet { background: none; border: 0; box-shadow: none; padding: 0; width: min(1040px, 100%); }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 20px; }
.sheet-head h1 { font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1.15; }
.sheet-head p { color: var(--text-dim); margin-top: 6px; }
.sheet-head .label { color: var(--brass); display: block; margin-bottom: 4px; }
.sheet-head .label.is-crisis { color: var(--red); }

.paper { background: var(--paper); color: var(--ink); border-radius: 2px; box-shadow: 0 22px 44px -24px rgba(0,0,0,.75), 0 1px 0 rgba(255,255,255,.5) inset; }
.room { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 28px; align-items: start; }
.transcript { display: flex; flex-direction: column; gap: 22px; max-width: 70ch; }
.line { animation: arrive .5s ease-out; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.line .who { color: var(--brass); display: block; margin-bottom: 5px; }
.line .said { font-family: var(--serif); font-size: 17px; line-height: 1.62; }
.line .said p + p { margin-top: .8em; }
.line.is-president { padding-left: 28px; border-left: 1px solid var(--rule); }
.line.is-president .who { color: var(--text-dim); }
.line.is-president .said { font-style: italic; color: #cfc9ba; }
.speaking { color: var(--text-dim); font-size: 13.5px; display: flex; align-items: center; gap: 10px; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brass); animation: pulse 1.1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .18s; } .dots i:nth-child(3) { animation-delay: .36s; }
@keyframes pulse { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composer { margin-top: 26px; max-width: 70ch; border-top: 1px solid var(--rule); padding-top: 18px; }
.composer > .label { color: var(--text-dim); display: block; margin-bottom: 10px; }
.cues { display: flex; flex-direction: column; gap: 8px; }
.cue { display: grid; grid-template-columns: 26px 1fr; gap: 10px; text-align: left; background: var(--room-2); border: 1px solid var(--rule); border-radius: 3px; padding: 12px 16px; min-height: 44px; font-family: var(--serif); font-size: 16px; line-height: 1.45; color: var(--text); }
.cue:hover { border-color: var(--brass); background: var(--room-3); }
.cue b { font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--brass); padding-top: 3px; }
.composer button:disabled, .composer input:disabled { opacity: .5; }
.closing-note { font-family: var(--serif); font-style: italic; color: var(--text-dim); margin-bottom: 12px; }
.own { display: flex; gap: 8px; margin-top: 12px; }
.own label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.own input { flex: 1; min-width: 0; min-height: 44px; padding: 10px 14px; background: var(--room-2); border: 1px solid var(--rule); border-radius: 3px; color: var(--text); font-family: var(--serif); font-size: 16px; }
.own input::placeholder { color: #7f8b83; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; gap: 12px; flex-wrap: wrap; }
.dossier { border: 1px solid var(--rule); border-radius: 3px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.dossier > .label { color: var(--text-dim); }
.person { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; }
.medal { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--brass); display: grid; place-items: center; font-family: var(--display); font-size: 17px; color: var(--brass); }
.person strong { display: block; font-family: var(--serif); font-size: 16px; }
.person span { display: block; color: var(--text-dim); font-size: 12.5px; }

.doc { padding: 28px clamp(20px, 4vw, 40px) 30px; max-width: 760px; }
.matters { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.matters:empty { margin-top: 0; }
.doc-head { font-family: var(--typed); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-dim); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--paper-rule); padding-bottom: 10px; margin-bottom: 18px; }
.doc-head .is-crisis { color: var(--red-ink); font-weight: 700; }
.doc h2 { font-family: var(--display); font-weight: 400; font-size: 30px; line-height: 1.2; }
.doc .lede { font-family: var(--serif); font-size: 16px; line-height: 1.6; margin-top: 10px; }
.doc .fine { font-family: var(--typed); font-size: 13px; color: var(--ink-dim); margin-top: 12px; }
.courses { border: 0; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 10px; }
.courses legend { padding: 0; margin-bottom: 10px; color: var(--ink-dim); }
.course { display: grid; grid-template-columns: 22px 1fr auto; gap: 4px 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--paper-rule); border-radius: 3px; cursor: pointer; }
.course:hover { background: var(--paper-2); }
.course:has(input:checked) { border-color: var(--ink); background: var(--paper-2); box-shadow: 0 0 0 1px var(--ink) inset; }
.course input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--ink); }
.course-title { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.3; }
.course-text { grid-column: 2 / -1; color: var(--ink-dim); font-size: 14px; line-height: 1.5; }
.cost { font-family: var(--typed); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; padding: 2px 8px; border: 1.5px solid currentColor; border-radius: 2px; color: var(--red-ink); margin-top: 2px; }
.cost.is-free { color: var(--ink-dim); border-style: dashed; }
.side .cost { color: var(--red); } .side .cost.is-free { color: var(--text-dim); }
.doc-actions { display: flex; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.decided { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--paper-rule); }
.stamp { font-family: var(--typed); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; border: 1.5px solid currentColor; padding: 2px 8px; border-radius: 2px; display: inline-block; }
.decided .stamp { color: var(--green-ink); }
.decided .stamp.is-open { color: var(--ink-dim); } .decided .stamp.is-veto { color: var(--red-ink); }
.decided p { font-family: var(--serif); font-size: 16px; margin-top: 10px; }
.events { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.events li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; font-size: 14px; line-height: 1.5; }
.events li::before { content: ""; width: 6px; height: 6px; margin-top: 8px; background: currentColor; opacity: .55; transform: rotate(45deg); }
.busy { display: flex; align-items: center; gap: 12px; color: var(--text-dim); font-family: var(--serif); font-style: italic; font-size: 16px; padding: 6px 0; }
.paper .busy { color: var(--ink-dim); }
.record { max-width: 760px; border: 1px solid var(--rule); border-radius: 3px; padding: 18px 22px; }
.record .label { color: var(--text-dim); display: block; margin-bottom: 8px; }
.record p { font-family: var(--serif); font-size: 16px; line-height: 1.6; }
.record.epilogue p + p, .record.opening p + p { margin-top: .9em; }
.record.opening { font-size: 17px; }
.after { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; }
.votes { margin-top: 20px; }
.votes-bar { display: flex; height: 14px; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.votes-bar i { display: block; }
.v-for { background: var(--ink); }
.v-against { background: repeating-linear-gradient(135deg, var(--paper) 0 4px, var(--ink-dim) 4px 5px); }
.v-abstain { background: var(--paper); border-left: 1px solid var(--ink); }
.votes-key { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 8px; font-family: var(--typed); font-size: 13px; color: var(--ink-dim); }
.votes-key b { color: var(--ink); }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.step { display: grid; grid-template-columns: 24px 1fr; gap: 12px; animation: arrive .5s ease-out; }
.step-mark { width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 1.5px solid var(--brass); display: grid; place-items: center; color: var(--brass); }
.step.is-busy .step-mark { border-style: dashed; animation: turn 2.4s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.step h3 { font-family: var(--serif); font-weight: 700; font-size: 17px; color: var(--text); }
.step.is-busy h3 { font-weight: 400; font-style: italic; color: var(--text-dim); }
.step .events { color: var(--text-dim); }

/* ── everything with a name is a reference: hover for a card, hold or click to pin it ── */
.ref { color: inherit; background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-decoration-color: rgba(203,166,79,.55); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help; text-align: inherit; }
.ref:hover { text-decoration-color: var(--brass); color: var(--brass); }
.paper .ref, .popover .ref, .card .ref, .broadsheet .ref { text-decoration-color: rgba(122,92,20,.5); }
.paper .ref:hover, .card .ref:hover, .popover .ref:hover, .broadsheet .ref:hover { color: var(--brass-ink); text-decoration-color: var(--brass-ink); }
.card { position: fixed; z-index: 9; width: 320px; max-height: 70vh; overflow: auto; background: var(--paper); color: var(--ink); border-radius: 3px; box-shadow: 0 18px 44px -16px rgba(0,0,0,.8); padding: 14px 16px 14px; font-size: 13.5px; animation: arrive .18s ease-out; }
.card.is-pinned { border: 1px solid var(--brass-ink); box-shadow: 0 0 0 3px rgba(203,166,79,.25), 0 18px 44px -16px rgba(0,0,0,.8); }
.card.is-pinned .card-head { cursor: grab; }
.card.is-pinned.is-dragging .card-head { cursor: grabbing; }
.card .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card .kind { color: var(--ink-dim); display: block; margin-bottom: 3px; }
.card .kind.is-grave { color: var(--red-ink); }
.card h4 { font-family: var(--serif); font-weight: 700; font-size: 17px; line-height: 1.25; }
.card .meta { color: var(--ink-dim); font-size: 12.5px; margin-top: 3px; }
.card .card-body p { margin-top: 8px; line-height: 1.5; }
.card .fields { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--paper-rule); font-size: 12.5px; }
.card .fields dt { color: var(--ink-dim); font-family: var(--sans); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding-top: 2px; }
.card .fields dd { margin: 0; line-height: 1.45; }
/* the ring that fills while the pointer rests: when it is full, the card is pinned */
.pin-ring { width: 24px; height: 24px; flex: none; transform: rotate(-90deg); }
.pin-ring .track { fill: none; stroke: var(--paper-rule); stroke-width: 2; }
.pin-ring .fill { fill: none; stroke: var(--brass-ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 56.55; stroke-dashoffset: 56.55; animation: ring 2s linear forwards; }
@keyframes ring { to { stroke-dashoffset: 0; } }
.card.is-locked .pin-ring .track { stroke: var(--brass-ink); opacity: .35; }
.card .refs { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--paper-rule); display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12.5px; }
.card .refs .label { width: 100%; color: var(--ink-dim); margin-bottom: 2px; }
.card .pin-hint { margin-top: 8px; color: var(--ink-dim); font-size: 11.5px; font-style: italic; }
.card .close { width: 28px; height: 28px; font-size: 15px; color: var(--ink-dim); border-color: var(--paper-rule); flex: none; }
.card .close:hover { color: var(--ink); border-color: var(--ink-dim); }

/* ── a word from the server ────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 12; background: var(--paper); color: var(--red-ink); padding: 10px 16px; border-radius: 3px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.75); font-size: 14px; max-width: min(560px, 92vw); }

@media (max-width: 760px) {
  body { font-size: 14px; }
  .room { grid-template-columns: minmax(0, 1fr); }
  .dossier { order: -1; }
  .course { grid-template-columns: 22px 1fr; } .course .cost { grid-column: 2; justify-self: start; }
  /* the rails become one row along the bottom: what you do on the left, what you know on the right */
  .rail { top: auto; bottom: 12px; transform: none; flex-direction: row; gap: 10px; }
  .rail-left { left: 12px; } .rail-right { right: 12px; }
  .round { width: 46px; height: 46px; }
  .round svg { width: 20px; height: 20px; }
  .round .hint { display: none; }
  .side { top: 56px; bottom: 0; width: 100vw; border: 0; padding: 16px 16px 90px; }
  .popover { width: min(300px, calc(100vw - 32px)); }
  .card { width: calc(100vw - 24px); max-height: 60vh; }
  .broadsheet .body { column-count: 1; }
  .masthead b { font-size: 34px; }
  .broadsheet { padding: 22px 16px 28px; }
  .sheet-head h1 { font-size: 24px; }
  .sheet { padding: 20px 14px 28px; }
  .veil { padding: 60px 8px 90px; }
  .doc { padding: 20px 16px 22px; }
  .bar { padding: 8px 12px; gap: 10px; }
  .crest-name { font-size: 16px; }
  .crest svg { width: 26px; height: 26px; }
  .treasury b { font-size: 20px; } .treasury span { display: none; }
  .pending { display: none; }
  .btn-brass#end-quarter { min-height: 38px; padding: 6px 12px; font-size: 13px; }
  .toast { bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
