/* The mayor's computer. Two inks on pale paper, exact app windows, nothing faked with gradients or glass. */
:root {
  --paper: #e8ebf2;
  --sheet: #fdfdfe;
  --sheet-2: #f3f5f9;
  --sheet-3: #e8ecf4;
  --navy: #1c2b75;
  --navy-2: #414c84;
  --navy-3: #5a6596;
  --tint: #c8d0e7;
  --line: rgb(28 43 117 / 0.15);
  --line-2: rgb(28 43 117 / 0.08);
  --coral: #ff4a26;
  --coral-ink: #c5300f;
  --coral-tint: #ffe2d9;
  --over: #2b1231;
  --rail: 84px;
  --bar: 44px;
  --out: cubic-bezier(0.22, 1, 0.36, 1);
  --out-long: cubic-bezier(0.16, 1, 0.3, 1);
  --press: cubic-bezier(0.4, 0, 0.2, 1);
  --sheetin: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-rest: 0 0 0 1px rgb(28 43 117 / 0.1), 0 1px 2px rgb(28 43 117 / 0.06), 0 10px 24px -10px rgb(28 43 117 / 0.22);
  --shadow-front: 0 0 0 1px rgb(28 43 117 / 0.16), 0 2px 4px rgb(28 43 117 / 0.08), 0 28px 56px -18px rgb(28 43 117 / 0.38);
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", "WenQuanYi Micro Hei";
  --title: "Schibsted Grotesk Variable", var(--cjk), system-ui, sans-serif;
  --body: "Onest Variable", var(--cjk), system-ui, sans-serif;
  --mono: "Red Hat Mono Variable", var(--cjk), ui-monospace, monospace;
  --frame: transparent;
  --plate-x: 3px;
  --plate-y: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--navy);
  font: 400 15px/1.5 var(--body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code { font-family: var(--mono); }
input { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pic { width: 1em; height: 1em; fill: currentColor; flex: none; display: block; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* ------------------------------------------------ wallpaper: a two-plate print of the real street plan */
.plates { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.plates canvas { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: multiply; }
.plate-b { transform: translate(var(--plate-x), var(--plate-y)); transition: transform 500ms var(--out-long), opacity 500ms var(--out); opacity: 0.74; }
.plates::after { content: ""; position: absolute; inset: 0; background: url("../img/dust.png"); }
html[data-drama="fire"] { --plate-x: 9px; --plate-y: 6px; }
html[data-drama="monster"] { --plate-x: 14px; --plate-y: -9px; }
html[data-drama] .plate-b { opacity: 1; }

/* ------------------------------------------------ the frame of the machine */
.machine { position: fixed; inset: 0; z-index: 1; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: var(--bar) auto minmax(0, 1fr); }
.bar {
  grid-column: 2; grid-row: 1;
  display: flex; align-items: center; gap: 16px;
  padding: 0 12px 0 14px;
  font-size: 15px;
  background: var(--sheet);
  box-shadow: 0 0 0 1px var(--line);
  z-index: 4000;
  min-width: 0;
}
.saying { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.saying .pic { font-size: 18px; }
.saying-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
html[data-drama] .saying { color: var(--coral-ink); }
.bar-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px;
  border-radius: 999px; background: var(--navy); color: #fff;
  font: 700 13px/1 var(--title); letter-spacing: 0.02em; white-space: nowrap;
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); animation: ping 1.6s var(--press) infinite; }
@keyframes ping { 50% { transform: scale(0.55); } }
.tool {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px;
  border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--navy);
  transition: background-color 150ms var(--press), transform 150ms var(--press);
  white-space: nowrap; position: relative;
}
.tool::after { content: ""; position: absolute; inset: -6px 0; }
.tool .pic { font-size: 17px; }
.tool:hover { background: var(--sheet-3); }
.tool:active { transform: scale(0.97); }
.tool[aria-pressed="true"] { background: var(--navy); color: #fff; }
.clock { font: 500 13px/1 var(--mono); color: var(--navy-2); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------ the left menu: signs on one post */
.rail {
  grid-column: 1; grid-row: 1 / span 3;
  position: relative; z-index: 4001;
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 10px;
  background: var(--sheet);
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden auto;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail::before { content: ""; position: absolute; left: 50%; top: 40px; bottom: 0; width: 2px; margin-left: -1px; background: var(--tint); }
.rail-logo {
  position: relative; width: 44px; height: 44px; flex: none; margin-bottom: 8px;
  display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff;
  transition: transform 150ms var(--press);
}
.rail-logo:active { transform: scale(0.97); }
.rail-logo svg { width: 44px; height: 44px; display: block; }
.rail-group { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 100%; }
.rail-group + .rail-group { margin-top: auto; padding-top: 8px; }
.sign {
  position: relative; width: 100%; padding: 3px 0 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: var(--navy);
  transition: transform 150ms var(--press);
}
.sign:active { transform: scale(0.97); }
.sign[hidden] { display: none; }
.sign-plate {
  width: 42px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; background: var(--sheet);
  box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(28 43 117 / 0.08);
  transition: background-color 150ms var(--press), color 150ms var(--press), box-shadow 150ms var(--press);
}
.sign .pic { font-size: 18px; }
.sign-word { position: relative; padding: 0 5px; background: var(--sheet); font: 500 13px/1.25 var(--body); }
.sign:hover .sign-plate { background: var(--sheet-3); }
.sign.is-open .sign-plate { background: var(--tint); }
.sign.is-front .sign-plate { background: var(--navy); color: #fff; }
.sign:focus-visible { outline-offset: -2px; }
.sign.is-new .sign-plate { animation: signnew 900ms var(--out) 2; }
@keyframes signnew { 40% { transform: translateY(-3px) scale(1.08); background: var(--coral); color: var(--over); } }
html[data-drama] .sign.is-front .sign-plate { background: var(--coral); color: var(--over); }

/* ------------------------------------------------ the desktop surface */
.surface { grid-column: 2; grid-row: 3; position: relative; overflow: hidden; min-width: 0; }

/* what a visitor must know before trusting the numbers */
.alerts { grid-column: 2; grid-row: 2; z-index: 3999; display: flex; flex-direction: column; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); }
.alerts[hidden] { display: none; }
.alert { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 13px; line-height: 1.35; color: var(--navy); background: var(--sheet-2); }
.alert + .alert { border-top: 1px solid var(--line-2); }
.alert.is-hot { background: var(--coral-tint); color: var(--over); font-weight: 600; }
.alert .pic { font-size: 16px; color: var(--coral-ink); }
.live-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--navy-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-chip[hidden] { display: none; }
.live-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); animation: ping 1.6s var(--press) infinite; }
.live-chip.is-stale { color: var(--coral-ink); font-weight: 600; }
.live-chip.is-stale::before { background: var(--coral); animation: none; }
.tool-lang { font-weight: 600; min-width: 44px; justify-content: center; padding: 0 10px; }
html.gating body { visibility: hidden; }
html.is-stale .win[data-win="city"] .kpi-num { opacity: 0.55; }
[hidden] { display: none !important; }

/* windows */
.win {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column;
  background: var(--sheet);
  border-radius: 13px;
  box-shadow: var(--shadow-rest);
  outline: 0;
  min-width: 0;
  transition: box-shadow 200ms var(--out);
  will-change: translate;
}
.win.is-front { box-shadow: var(--shadow-front); }
.win[hidden] { display: none; }
.win.is-opening { animation: winopen 250ms var(--out) both; }
.win.is-closing { animation: winclose 150ms var(--press) both; pointer-events: none; }
.win.is-gliding { transition: translate 250ms var(--out), scale 250ms var(--out), box-shadow 200ms var(--out); }
@keyframes winopen { from { opacity: 0; scale: 0.96; } }
@keyframes winclose { to { opacity: 0; scale: 0.97; } }
/* the second plate: prints a coral frame slightly out of register when the city burns */
.win::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 2px var(--coral);
  mix-blend-mode: multiply; opacity: 0; transform: translate(0, 0);
  transition: opacity 200ms var(--out), transform 400ms var(--out-long);
}
html[data-drama] .win::before { opacity: 1; transform: translate(var(--plate-x), var(--plate-y)); }
.win-bar {
  flex: none; height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 5px 0 12px;
  border-bottom: 1px solid var(--line-2);
  border-radius: 13px 13px 0 0;
  cursor: grab; user-select: none; touch-action: none;
  transition: background-color 200ms var(--out), color 200ms var(--out);
}
.win-bar:active { cursor: grabbing; }
.win-bar .pic { font-size: 16px; }
.win-title { font: 650 15px/1 var(--title); letter-spacing: -0.005em; white-space: nowrap; }
.win-sub { font-size: 13px; color: var(--navy-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.win-sub .mono { font-size: 13px; }
.win-tools { margin-left: auto; display: flex; align-items: center; gap: 2px; flex: none; }
.win:not(.is-front) .win-title, .win:not(.is-front) .win-bar .pic { color: var(--navy-3); }
html[data-drama] .win-bar { background: var(--coral-tint); }
html[data-drama] .win-title { color: var(--coral-ink); }
html[data-drama] .win-bar .pic { color: var(--coral-ink); }
.icon-btn {
  position: relative; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  color: var(--navy-2);
  transition: background-color 150ms var(--press), transform 150ms var(--press), color 150ms var(--press);
}
.icon-btn::after { content: ""; position: absolute; inset: -7px; }
.icon-btn:hover { background: var(--sheet-3); color: var(--navy); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .pic { font-size: 14px; }
.win-body { flex: 1; min-height: 0; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--tint) transparent; border-radius: 0 0 13px 13px; }

/* ------------------------------------------------ the clay view */
.view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #dbe0eb; cursor: grab; touch-action: pan-y; }
.view.is-dragging { cursor: grabbing; }
.view::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: url("../img/speck.png"); opacity: 0.22; }
.view::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 15%; z-index: 1; pointer-events: none;
  -webkit-backdrop-filter: blur(1.1px); backdrop-filter: blur(1.1px);
  -webkit-mask-image: linear-gradient(#000 25%, transparent); mask-image: linear-gradient(#000 25%, transparent);
}
.view .clay-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.view > :not(.clay-canvas) { z-index: 2; }
.view-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--navy-2); font-size: 15px; }
.flat-canvas { cursor: default; }
.view-flat { position: absolute; left: 12px; top: 10px; max-width: min(70%, 420px); font-size: 13px; line-height: 1.35; color: var(--navy); padding: 6px 10px; border-radius: 9px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line); }
.view-tools { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.round-tool {
  position: relative; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--sheet); color: var(--navy);
  box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgb(28 43 117 / 0.14);
  transition: background-color 150ms var(--press), transform 150ms var(--press);
}
.round-tool::after { content: ""; position: absolute; inset: -4px; }
.round-tool:hover { background: var(--sheet-3); }
.round-tool:active { transform: scale(0.94); }
.round-tool[aria-pressed="true"] { background: var(--navy); color: #fff; }
.round-tool .pic { font-size: 15px; }
.view-note.has-tools { right: 60px; }
.view-note { position: absolute; right: 12px; bottom: 10px; font-size: 13px; line-height: 1.3; color: var(--navy-2); padding: 3px 8px; border-radius: 7px; background: rgb(253 253 254 / 0.92); pointer-events: none; }
.bubble {
  position: absolute; left: 0; top: 0; padding: 6px 14px; border-radius: 16px 16px 16px 4px;
  background: var(--sheet); color: var(--navy);
  font: 800 24px/1.1 var(--title); letter-spacing: -0.02em; white-space: nowrap;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px -6px rgb(28 43 117 / 0.36);
  opacity: 0; pointer-events: none; transform-origin: 0 100%;
}
.bubble.is-on { animation: bubble 1400ms var(--out) both; }
.bubble.is-hot { background: var(--coral); color: var(--over); box-shadow: 0 6px 16px -6px rgb(255 74 38 / 0.6); }
@keyframes bubble {
  0% { opacity: 0; transform: translate(var(--bx), var(--by)) scale(0.6); }
  14% { opacity: 1; transform: translate(var(--bx), var(--by)) scale(1.08); }
  24%, 82% { opacity: 1; transform: translate(var(--bx), var(--by)) scale(1); }
  100% { opacity: 0; transform: translate(var(--bx), calc(var(--by) - 8px)) scale(0.98); }
}
.maptip {
  position: absolute; left: 0; top: 0; pointer-events: none;
  display: flex; align-items: center; gap: 7px; min-width: 128px; padding: 6px 10px; border-radius: 9px;
  background: var(--sheet); font-size: 13px; line-height: 1.25; white-space: nowrap;
  box-shadow: 0 0 0 1px var(--line), 0 6px 16px -6px rgb(28 43 117 / 0.3);
  opacity: 0; transition: opacity 125ms ease-out;
}
.maptip.is-on { opacity: 1; }
.replay-chip { position: absolute; left: 50%; top: 12px; translate: -50% 0; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 13px; white-space: nowrap; }
.replay-chip[hidden] { display: none; }
.replay-chip .link-btn { color: #fff; }
.replay-chip .link-btn:hover { color: var(--tint); }
.replay-chip .pic { font-size: 16px; }
.maptip .pic { font-size: 15px; }

/* the word that hits the whole window in a disaster */
.bigword {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 800 clamp(96px, 15vw, 230px)/0.9 var(--title); letter-spacing: -0.05em; color: var(--coral);
  mix-blend-mode: multiply; opacity: 0;
}
.bigword.is-on { animation: bigword 1500ms var(--out) both; }
@keyframes bigword {
  0% { opacity: 0; transform: scale(1.3); }
  12% { opacity: 1; transform: scale(1); }
  70% { opacity: 1; transform: scale(0.98); }
  100% { opacity: 0; transform: scale(0.96); }
}

/* KPI strip under the view */
.readout { flex: none; display: flex; align-items: stretch; border-top: 1px solid var(--line-2); min-height: 66px; overflow: hidden; border-radius: 0 0 13px 13px; }
.kpi { flex: 1 1 0; min-width: 0; padding: 8px 12px 9px; border-left: 1px solid var(--line-2); }
.kpi:first-child { border-left: 0; }
.signpost { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; line-height: 1.25; font-weight: 500; color: var(--navy-2); white-space: nowrap; }
.signpost .pic { font-size: 14px; }
.kpi-num { display: block; margin-top: 1px; font: 500 24px/1.15 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; white-space: nowrap; }
.kpi-num small { font-size: 15px; color: var(--navy-2); letter-spacing: 0; }
.kpi.is-hot .kpi-num { color: var(--coral-ink); }
.asks {
  flex: none; display: flex; align-items: center; gap: 9px; padding: 0 14px 0 12px; border-left: 1px solid var(--line-2);
  text-align: left; font-size: 13px; line-height: 1.25; font-weight: 500; color: var(--navy); background: var(--sheet-2);
  transition: background-color 150ms var(--press);
}
.asks:hover { background: var(--sheet-3); }
.asks strong { display: block; font: 700 15px/1.2 var(--title); }
.asks .pic { font-size: 20px; color: var(--coral); }

/* rolling numbers */
.roll { display: inline-flex; vertical-align: top; font-variant-numeric: tabular-nums; }
.roll-d { display: inline-block; height: 1.15em; overflow: hidden; }
.roll-c { display: flex; flex-direction: column; transition: transform 500ms var(--out-long); will-change: transform; }
.roll-c > span { display: block; height: 1.15em; line-height: 1.15em; text-align: center; }
.roll-s { display: inline-block; line-height: 1.15em; }

/* ------------------------------------------------ big round buttons: gauges you press */
.gauge {
  --fill: 0; --ink: var(--navy); --pic: var(--coral); --ring: var(--navy);
  position: relative; flex: none; width: 74px; height: 74px; border-radius: 50%;
  isolation: isolate; color: var(--pic);
  transition: transform 150ms var(--press);
}
.gauge[data-group="destroy"] { --ink: var(--coral); --pic: var(--navy); --ring: var(--navy); }
.gauge-disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--sheet); box-shadow: inset 0 0 0 2px var(--ring); isolation: isolate; }
.gauge-disc > .pic { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; z-index: 0; transition: opacity 150ms var(--press); }
.gauge-level { position: absolute; left: -20%; right: -20%; top: 0; height: 100%; z-index: 1; mix-blend-mode: multiply; transform: translateY(calc((1 - var(--fill)) * 100% + var(--wobble, 0px))); transition: transform 500ms var(--out-long); }
.gauge-level::before { content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: -40%; background: var(--ink); }
.gauge-speck { position: absolute; inset: 0; z-index: 2; background: url("../img/speck.png"); pointer-events: none; opacity: 0.8; }
.gauge-plate { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--coral); mix-blend-mode: multiply; transform: translate(2px, 2px); transition: transform 150ms var(--press); pointer-events: none; }
.gauge[data-group="destroy"] .gauge-plate { box-shadow: inset 0 0 0 2px var(--navy); opacity: 0.45; }
.gauge:hover .gauge-plate { transform: translate(3.5px, 3px); }
.gauge:active { transform: scale(0.97); }
.gauge:active .gauge-plate { transform: translate(0, 0); }
a.gauge { display: block; }
.gauge-done { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; align-content: center; gap: 0; border-radius: 50%; background: var(--navy); color: #fff; font: 700 13px/1.1 var(--title); opacity: 0; scale: 0.25; filter: blur(4px); transition: opacity 240ms var(--out), scale 240ms var(--out), filter 240ms var(--out); }
.gauge-done .pic { font-size: 20px; margin-bottom: 2px; }
.gauge.is-copied .gauge-done { opacity: 1; scale: 1; filter: none; }
.gauge.is-full { animation: squish 500ms var(--out); }
@keyframes squish { 30% { transform: scale(1.12, 0.82); } 65% { transform: scale(0.92, 1.08); } }
.is-bump { animation: bump 700ms var(--out); }
@keyframes bump { 0% { box-shadow: inset 0 0 0 40px var(--coral-tint); } 100% { box-shadow: inset 0 0 0 40px transparent; } }

/* address line */
.addr { display: flex; align-items: center; gap: 2px; min-width: 0; }
.addr-code {
  flex: 1 1 auto; min-width: 0; font: 400 13px/1.3 var(--mono); color: var(--navy); overflow-wrap: anywhere;
  letter-spacing: -0.005em; user-select: all;
}
.swap { position: relative; display: grid; }
.swap > .pic { grid-area: 1 / 1; transition: opacity 240ms var(--out), scale 240ms var(--out), filter 240ms var(--out); }
.swap > .pic:last-child { opacity: 0; scale: 0.25; filter: blur(4px); }
.is-copied > .swap > .pic:first-child { opacity: 0; scale: 0.25; filter: blur(4px); }
.is-copied > .swap > .pic:last-child { opacity: 1; scale: 1; filter: none; }
.is-copied { color: var(--navy) !important; }

/* ------------------------------------------------ notifications */
.notes { position: fixed; z-index: 5000; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; pointer-events: none; }
.notes.is-left { align-items: flex-start; }
.note {
  pointer-events: auto; width: 306px; display: flex; gap: 10px; padding: 10px 12px; border-radius: 13px;
  background: var(--sheet); box-shadow: var(--shadow-front);
  font-size: 15px; line-height: 1.3;
  animation: notein 400ms var(--out) both;
  transition: opacity 150ms var(--press), scale 150ms var(--press);
}
.note.is-leaving { opacity: 0; scale: 0.97; }
@keyframes notein { from { opacity: 0; translate: 0 -14px; scale: 0.97; } }
.note-pic { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 17px; }
.note-pic .pic { font-size: 18px; }
.note.is-hot { background: var(--coral); color: var(--over); }
.note.is-hot .note-pic { background: var(--over); color: var(--coral); }
.note.is-hot .note-line { color: var(--over); }
.note-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.note-title { font: 700 15px/1.2 var(--title); }
.note-amount { font: 500 13px/1.2 var(--mono); }
.note-line { color: var(--navy-2); font-size: 13px; }
.note-body { flex: 1; min-width: 0; }

.wires { position: fixed; inset: 0; z-index: 4900; pointer-events: none; width: 100%; height: 100%; overflow: visible; }
.wires path { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.wires circle { fill: currentColor; }

/* ------------------------------------------------ shared list and table pieces */
.pad { padding: 14px 16px; }
.seg { position: relative; display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 2px; border-radius: 999px; background: var(--sheet-3); }
.seg-thumb { position: absolute; left: 2px; top: 2px; bottom: 2px; border-radius: 999px; background: var(--sheet); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgb(28 43 117 / 0.1); transition: transform 250ms var(--out), width 250ms var(--out); }
.seg button { position: relative; z-index: 1; height: 26px; padding: 0 12px; font-size: 13px; font-weight: 500; border-radius: 999px; color: var(--navy-2); transition: color 150ms var(--press), transform 150ms var(--press); }
.seg button::after { content: ""; position: absolute; inset: -8px 0; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { color: var(--navy); font-weight: 600; }
.seg button:active { transform: scale(0.97); }
.h-big { font: 700 17px/1.2 var(--title); letter-spacing: -0.01em; }
.quiet { color: var(--navy-2); }
.small { font-size: 13px; line-height: 1.4; }
.link-btn { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; transition: color 150ms var(--press), transform 150ms var(--press); display: inline-block; }
.link-btn:hover { color: var(--coral-ink); }
.link-btn:active { transform: scale(0.97); }

/* ------------------------------------------------ the Send window */
.send-price { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 14px 4px 14px; background: var(--sheet-2); border-bottom: 1px solid var(--line-2); font-size: 13px; }
.send-price:empty { display: none; }
.send-price .mono { font-size: 13px; font-weight: 600; }
.signpost.is-hot { color: var(--coral-ink); }
.send-list { display: flex; flex-direction: column; }
.act { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 0 14px; padding: 7px 8px 7px 12px; border-top: 1px solid var(--line-2); border-radius: 0; transition: background-color 150ms var(--press); align-items: center; }
.act:first-child { border-top: 0; }
.act.is-sought { animation: sought 1400ms var(--out); }
@keyframes sought { 0%, 60% { background: var(--coral-tint); } }
.act-top { display: flex; align-items: baseline; gap: 8px; justify-content: space-between; }
.act-name { font: 700 15px/1.25 var(--title); letter-spacing: -0.01em; display: flex; align-items: baseline; gap: 8px; min-width: 0; white-space: nowrap; }
.act-cap { font: 400 13px/1.25 var(--body); letter-spacing: 0; color: var(--navy-2); white-space: nowrap; }
.act-cap .mono { color: var(--navy); }
.act-ask { font: 600 13px/1 var(--body); color: var(--coral-ink); }
.act-fill { font: 500 13px/1.25 var(--mono); white-space: nowrap; font-variant-numeric: tabular-nums; }
.act-fill b { font-weight: 600; font-size: 15px; }
.act-fill span { color: var(--navy-2); }
.act-does { font-size: 13px; line-height: 1.3; color: var(--navy-2); margin-top: 1px; }
.pips { display: inline-flex; gap: 3px; margin-right: 1px; vertical-align: 1px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--coral); }
.pips i.on { background: var(--coral); }
.act .addr { margin-top: 1px; }
.send-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 14px; background: var(--sheet-2); border-top: 1px solid var(--line-2); font-size: 13px; }
.send-group .signpost { color: var(--navy); font-weight: 600; }
.send-group[data-group="destroy"] .signpost { color: var(--coral-ink); }
.send-honest { flex: none; display: flex; gap: 9px; padding: 9px 14px; font-size: 13px; line-height: 1.35; color: var(--navy); background: var(--coral-tint); border-radius: 0 0 13px 13px; border-top: 1px solid rgb(255 74 38 / 0.25); }
.send-honest .pic { font-size: 16px; color: var(--coral-ink); margin-top: 1px; }
.next-teaser { margin: 10px 14px 12px; padding: 10px 12px; border-radius: 10px; background: var(--sheet-2); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.next-teaser .pic { font-size: 18px; margin-top: 1px; }

/* ------------------------------------------------ the Books window */
.total { font: 500 24px/1.15 var(--mono); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.book-pad { padding: 8px 14px 8px; }
.book-top { display: flex; justify-content: space-between; gap: 10px; }
.book-top > div:last-child { text-align: right; }
.tug { position: relative; height: 18px; border-radius: 999px; background: var(--sheet-3); overflow: hidden; isolation: isolate; margin: 5px 0 4px; }
.tug i { position: absolute; top: 0; bottom: 0; mix-blend-mode: multiply; transition: width 500ms var(--out-long); }
.tug i::after { content: ""; position: absolute; inset: 0; background: url("../img/speck.png"); opacity: 0.7; }
.tug .tug-a { left: 0; background: var(--navy); }
.tug .tug-b { right: 0; background: var(--coral); }
.tug-legend { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.tug-legend b { font: 500 13px/1.25 var(--mono); }
.tug-legend b.is-text { font: 400 13px/1.25 var(--body); color: var(--navy-2); }
.tug-legend > div:last-child { text-align: right; }
.line-rule { font: 700 15px/1.3 var(--title); margin-top: 3px; }
.receipt { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; font-size: 13px; line-height: 1.4; }
.receipt dd { font: 500 13px/1.4 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.receipt dt { color: var(--navy-2); }
.receipt .sum { border-top: 1px solid var(--line); padding-top: 3px; margin-top: 3px; color: var(--navy); font-weight: 600; }

/* ------------------------------------------------ the Inbox */
.inbox-list { display: flex; flex-direction: column; }
.burn { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 6px 12px; min-height: 46px; border-top: 1px solid var(--line-2); transition: background-color 150ms var(--press); }
.burn:first-child { border-top: 0; }
.burn:hover { background: var(--sheet-2); }
.burn.is-new { animation: burnin 900ms var(--out) both; }
@keyframes burnin { from { background: var(--coral-tint); translate: 0 -8px; opacity: 0.2; } 40% { background: var(--coral-tint); translate: 0 0; opacity: 1; } }
.burn-pic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; }
.burn-pic[data-group="destroy"] { background: var(--coral); }
.burn-pic .pic { font-size: 15px; }
.burn-what { min-width: 0; font-size: 13px; line-height: 1.3; }
.burn-what > strong { white-space: nowrap; }
.proof-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.burn-what strong { font-weight: 600; font-size: 15px; }
.burn-who { font: 400 13px/1.3 var(--mono); color: var(--navy-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig { color: var(--navy-2); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--tint); transition: color 150ms var(--press); }
a.sig:hover { color: var(--navy); }
.sig.is-waiting { text-decoration: none; color: var(--coral-ink); font-weight: 500; }
.empty-line { padding: 14px 16px; font-size: 13px; color: var(--navy-2); list-style: none; }
.burn-amt { text-align: right; font: 500 15px/1.25 var(--mono); white-space: nowrap; }
.burn-amt small { display: block; font-size: 13px; font-weight: 400; color: var(--navy-2); }

/* ------------------------------------------------ Tax, Speech, Sponsor, Citizens, Replay, Ballot, Schedule */
.dial-wrap { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 14px; align-items: center; }
.dial { width: 190px; height: 190px; display: block; overflow: visible; }
.dial text { font-family: var(--mono); fill: var(--navy); }
.dial-needle { transition: transform 500ms var(--out-long); transform-origin: 95px 95px; }
.big-round {
  position: relative; display: inline-grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  color: #fff; text-align: center; text-decoration: none;
  font: 700 15px/1.12 var(--title); isolation: isolate;
  transition: transform 150ms var(--press);
}
.big-round::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--coral); z-index: -2; transform: translate(4px, 3px); transition: transform 150ms var(--press); }
.big-round::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--navy) url("../img/speck.png"); z-index: -1; pointer-events: none; }
.big-round:hover::before { transform: translate(7px, 5px); }
.big-round:active { transform: scale(0.97); }
.big-round:active::before { transform: translate(0, 0); }
.big-round:focus-visible { outline-offset: 6px; }
.big-round.is-light { color: var(--navy); }
.big-round.is-light::after { background: var(--sheet); box-shadow: inset 0 0 0 2px var(--navy); }
.big-round.is-small { width: 74px; height: 74px; font-size: 13px; }

.speech-doc { font-size: 17px; line-height: 1.5; max-width: 62ch; min-height: 6.2em; }
.speech-doc .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--coral); animation: caret 1000ms steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.news { display: flex; flex-direction: column; margin-top: 10px; }
.news li { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 15px; line-height: 1.35; }
.news time { font: 400 13px/1.35 var(--mono); color: var(--navy-2); white-space: nowrap; }

.field-label { display: flex; justify-content: space-between; font-size: 13px; color: var(--navy-2); font-weight: 500; margin-bottom: 4px; }
.field { width: 100%; height: 44px; padding: 0 12px; border-radius: 10px; border: 0; background: var(--sheet-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 600; font-family: var(--title); text-transform: uppercase; transition: box-shadow 150ms var(--press); }
.field:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--navy); }
.result { margin-top: 10px; display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--sheet-2); font-size: 13px; line-height: 1.35; animation: notein 250ms var(--out) both; }
.result .pic { font-size: 18px; margin-top: 1px; color: var(--navy); }
.sponsor-form { display: grid; grid-template-columns: minmax(0, 1fr) 84px; gap: 14px; align-items: end; }
.result.is-hot { background: var(--coral-tint); color: var(--over); }
.result.is-hot .pic { color: var(--coral-ink); }
.quote { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; background: var(--sheet-2); box-shadow: 0 0 0 1px var(--line); animation: notein 250ms var(--out) both; }
.quote-head { font: 700 15px/1.3 var(--title); }
.quote-prices dd { font-size: 15px; font-weight: 600; }
.quote-terms { font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--over); padding: 8px 10px; border-radius: 8px; background: var(--coral-tint); }
.big-round[disabled] { opacity: 0.5; cursor: not-allowed; }
.big-round[aria-busy="true"] { cursor: progress; }
.field:disabled { opacity: 0.6; cursor: not-allowed; }
.is-warn { color: var(--coral-ink); font-weight: 500; }
.proof { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); }
.proof-list dd.wrap { overflow-wrap: anywhere; max-width: 260px; text-align: right; }
.proof-hashes summary { cursor: pointer; font-size: 13px; }
.proof-hashes ol { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.proof-hashes li { display: flex; gap: 6px; font-size: 13px; }
.sched .is-next { background: var(--sheet-2); }
.ca-line { margin-top: 16px; display: flex; flex-direction: column; gap: 2px; }
.ca-line .addr-code { font-size: 13px; letter-spacing: -0.03em; }
.sponsor-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.sponsor-list strong { font: 700 15px/1.3 var(--title); letter-spacing: 0.01em; }

.rank { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 7px 14px; min-height: 48px; border-top: 1px solid var(--line-2); }
.rank:first-child { border-top: 0; }
.rank-n { font: 500 15px/1 var(--mono); color: var(--navy-2); text-align: right; }
.rank-title { font: 700 15px/1.25 var(--title); }
.rank-who { font: 400 13px/1.3 var(--mono); color: var(--navy-2); }
.rank-amt { font: 500 15px/1.2 var(--mono); text-align: right; }
.rank-camp { display: inline-flex; align-items: center; gap: 4px; font: 500 13px/1.2 var(--body); color: var(--navy-2); justify-content: flex-end; }
.rank-camp[data-camp="destroy"] { color: var(--coral-ink); }
.rank-camp .pic { font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.card { display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; background: var(--sheet-2); box-shadow: 0 0 0 1px var(--line-2); text-align: left; min-width: 0; }
.card-img { display: block; aspect-ratio: 4 / 3; width: 100%; background: #dbe0eb; position: relative; overflow: hidden; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-none { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; font-size: 13px; color: var(--navy-2); }
.card-body { padding: 8px 10px 8px; }
.card-kind { font: 700 15px/1.2 var(--title); display: flex; align-items: center; gap: 5px; }
.card-kind .pic { font-size: 14px; color: var(--coral); }
.card-meta { font-size: 13px; line-height: 1.35; color: var(--navy-2); margin: 2px 0 6px; }
.card-meta .mono { color: var(--navy); }
.card-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }

.candidates { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cand { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cand-head { display: flex; gap: 10px; align-items: center; }
.cand h3 { font: 700 15px/1.2 var(--title); }
.cand-votes { font: 500 15px/1.2 var(--mono); }
.cand .addr-code { font-size: 13px; }
.vote-bar { position: relative; height: 22px; border-radius: 999px; background: var(--sheet-3); overflow: hidden; isolation: isolate; margin: 10px 0 2px; }
.vote-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--navy); mix-blend-mode: multiply; }
.vote-bar i + i { left: auto; right: 0; background: var(--coral); }

.sched li { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 0 10px; padding: 7px 14px; border-top: 1px solid var(--line-2); font-size: 15px; line-height: 1.3; }
.sched li:first-child { border-top: 0; }
.sched time { font: 500 13px/1.45 var(--mono); }
.sched strong { font-weight: 600; display: block; }
.sched span { color: var(--navy-2); font-size: 13px; }

/* T+ preview: small, plainly a draft control */
.tplus { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--navy-2); }
.tplus .seg button { padding: 0; width: 25px; font-family: var(--mono); font-size: 13px; }
.tplus-next { color: var(--navy); font-weight: 500; white-space: nowrap; }
.tplus-phone .small { white-space: nowrap; }
.tplus-phone .tool { flex: none; width: 34px; padding: 0; justify-content: center; font: 500 13px/1 var(--mono); }

/* the mayor's own pointer: this is his computer, you are only watching */
.mayor-cursor {
  position: fixed; left: 0; top: 0; z-index: 4950; pointer-events: none; display: flex; align-items: flex-start;
  transition: translate 900ms cubic-bezier(0.45, 0.05, 0.2, 1);
}
.mayor-cursor svg { width: 22px; height: 22px; display: block; filter: drop-shadow(0 1px 1px rgb(28 43 117 / 0.35)); }
.mayor-cursor span { margin: 16px 0 0 -6px; padding: 2px 8px; border-radius: 999px; background: var(--navy); color: #fff; font: 600 13px/1.25 var(--body); white-space: nowrap; }
.mayor-cursor.is-click::before { content: ""; position: absolute; left: -11px; top: -11px; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--coral); animation: curclick 420ms var(--out) both; }
@keyframes curclick { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.mayor-cursor.is-scared svg, .mayor-cursor.is-scared span { animation: curshake 180ms linear infinite; }
.mayor-cursor.is-scared span { background: var(--coral); color: var(--over); }
@keyframes curshake { 25% { transform: translate(-2px, 1px); } 75% { transform: translate(2px, -1px); } }

/* Chinese: the same layout, with room for a system font that sits taller and needs no negative tracking */
html[lang^="zh"] .title, html[lang^="zh"] .doc-h, html[lang^="zh"] .band strong, html[lang^="zh"] .bubble, html[lang^="zh"] .bigword { letter-spacing: 0; }
html[lang^="zh"] .big-round { font-weight: 700; line-height: 1.2; }
html[lang^="zh"] .hero-line { line-height: 1.5; font-weight: 400; }
html[lang^="zh"] .win-title, html[lang^="zh"] .act-name, html[lang^="zh"] .note-title { font-weight: 700; }
html[lang^="zh"] .act-does, html[lang^="zh"] .doc-p, html[lang^="zh"] .answers p, html[lang^="zh"] .doc-list li { line-height: 1.6; }
html[lang^="zh"] .sign-word { font-size: 13px; }
html[lang^="zh"] .chip { letter-spacing: 0.04em; }

/* qr window */
.qr-body { display: flex; flex-direction: column; gap: 10px; align-items: center; padding: 14px 16px 16px; }
.qr-body svg { width: 100%; max-width: 300px; height: auto; display: block; }
.qr-body .addr { width: 100%; justify-content: center; }
.qr-body .addr-code { flex: 0 1 auto; text-align: center; }

/* ------------------------------------------------ the landing's wallpaper type */
.hero { position: absolute; left: 28px; top: 28px; width: clamp(292px, 25.5vw, 360px); z-index: 0; }
.title {
  position: relative; display: inline-block;
  font: 800 clamp(84px, 8vw, 140px)/0.92 var(--title); letter-spacing: -0.045em; color: var(--navy);
  filter: url(#bleed);
}
.title::after { content: attr(data-ink); position: absolute; left: 0; top: 0; color: var(--coral); mix-blend-mode: multiply; transform: translate(0.045em, 0.03em); transition: transform 500ms var(--out-long); }
html[data-drama] .title::after { transform: translate(0.11em, 0.06em); }
html[data-drama] .title { color: var(--coral); }
.hero-line { margin-top: 18px; font-size: 19px; line-height: 1.34; font-weight: 450; }
.hero-actions { margin-top: 22px; display: flex; align-items: flex-end; gap: 16px; }
.hero-actions .big-round { width: 126px; height: 126px; font-size: 19px; }
.hero-actions .big-round.is-light { width: 94px; height: 94px; font-size: 15px; }

.mini-gauges { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 10px 14px; }
.mini-gauge { display: grid; grid-template-columns: minmax(0, 1fr) 74px; gap: 10px; align-items: center; }
.mini-gauge strong { font: 700 15px/1.2 var(--title); display: block; }
.mini-gauge .mono { font-size: 13px; display: block; }
.mini-note { padding: 0 14px 12px; font-size: 13px; color: var(--navy-2); }
.slip li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 0 12px; padding: 10px 16px; border-top: 1px dashed var(--line); align-items: start; }
.slip li:first-child { border-top: 0; }
.slip .pic { font-size: 22px; margin-top: 2px; }
.slip strong { display: block; font: 700 15px/1.25 var(--title); }
.slip span { color: var(--navy-2); font-size: 13px; line-height: 1.4; display: block; }
.prose-sm { font-size: 15px; line-height: 1.45; }
.prose-sm + .prose-sm { margin-top: 8px; }

/* ------------------------------------------------ docs: one long document window */
.docs-main > .win-bar { cursor: default; }
.docs-scroll { height: 100%; overflow: hidden auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--tint) transparent; scroll-behavior: smooth; }
.doc-sec { padding: 40px clamp(20px, 5vw, 64px); border-top: 1px solid var(--line-2); scroll-margin-top: 40px; }
.doc-h { font: 800 clamp(30px, 3.4vw, 44px)/1.02 var(--title); letter-spacing: -0.03em; margin-bottom: 14px; max-width: 22ch; }
.doc-h3 { font: 700 17px/1.25 var(--title); margin: 22px 0 6px; }
.doc-list code, .doc-p code { font-size: 15px; padding: 1px 4px; border-radius: 4px; background: var(--sheet-3); overflow-wrap: anywhere; }
.doc-lede { font: 800 clamp(64px, 8vw, 118px)/0.92 var(--title); letter-spacing: -0.045em; }
.doc-p { font-size: 17px; line-height: 1.55; max-width: 66ch; color: var(--navy); }
.doc-p + .doc-p { margin-top: 10px; }
.doc-p.quiet { color: var(--navy-2); }
.itin { margin-top: 18px; border-radius: 12px; background: var(--sheet-2); box-shadow: 0 0 0 1px var(--line-2); overflow: hidden; max-width: 760px; }
.itin-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 0 12px; align-items: baseline; padding: 12px 16px; border-top: 1px dashed var(--line); font-size: 15px; }
.itin-row:first-child { border-top: 0; }
.itin-n { font: 500 15px/1.4 var(--mono); color: var(--navy-2); }
.itin-w { color: var(--navy-2); font-size: 13px; }
.itin-row strong { font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; align-items: start; margin-top: 12px; }
.split-num { font: 500 clamp(30px, 3.6vw, 44px)/1.05 var(--mono); letter-spacing: -0.04em; }
.receipt-card { padding: 14px 16px; border-radius: 12px; background: var(--sheet-2); box-shadow: 0 0 0 1px var(--line-2); font-size: 15px; }
.receipt-card dd { font-size: 15px; }
.sheets { margin-top: 18px; display: grid; }
.sheet { position: relative; padding: 18px 20px 20px; border-radius: 14px; }
.sheet + .sheet { margin-top: -6px; }
.sheet h3 { font: 800 17px/1.2 var(--title); letter-spacing: -0.01em; display: flex; justify-content: space-between; gap: 10px; }
.sheet h3 .mono { font-weight: 500; font-size: 17px; }
.sheet p { margin-top: 4px; font-size: 15px; line-height: 1.45; max-width: 60ch; }
.sheet-a { background: var(--navy); color: #fff; }
.sheet-b { background: var(--tint); color: var(--navy); }
.sheet-c { background: var(--coral); color: var(--over); }
.sheet::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: url("../img/speck.png"); pointer-events: none; opacity: 0.6; }
.doc-table { width: 100%; max-width: 620px; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.doc-table th { text-align: right; font: 600 13px/1.3 var(--body); color: var(--navy-2); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.doc-table td { text-align: right; font: 500 15px/1.3 var(--mono); padding: 11px 12px; border-bottom: 1px solid var(--line-2); }
.doc-table th:first-child, .doc-table td:first-child { text-align: left; padding-left: 0; }
.doc-list { margin-top: 12px; max-width: 66ch; }
.doc-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 0 8px; padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 17px; line-height: 1.45; }
.doc-list li:first-child { border-top: 0; }
.doc-list .pic { font-size: 18px; margin-top: 3px; }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; margin-top: 12px; }
.answers h3 { font: 700 17px/1.25 var(--title); margin-bottom: 4px; }
.answers p { font-size: 17px; line-height: 1.5; color: var(--navy-2); }
.band { padding: 24px clamp(20px, 5vw, 64px); background: var(--coral); color: var(--over); position: relative; }
.band::after { content: ""; position: absolute; inset: 0; background: url("../img/speck.png"); pointer-events: none; opacity: 0.7; }
.band strong { font: 800 clamp(30px, 3.4vw, 44px)/1.02 var(--title); letter-spacing: -0.03em; display: block; margin-bottom: 8px; max-width: 24ch; }
.band p { font-size: 17px; line-height: 1.45; max-width: 66ch; }
.reply { display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 24px; align-items: center; }
.reply-actions { display: flex; align-items: flex-end; gap: 14px; }
.reply-actions .big-round { width: 118px; height: 118px; font-size: 17px; }
.reply-actions .big-round.is-light { width: 94px; height: 94px; font-size: 15px; }
.foot { padding: 28px clamp(20px, 5vw, 64px) 34px; border-top: 1px solid var(--line-2); }
.foot-name { font: 800 17px/1.1 var(--title); letter-spacing: -0.01em; margin-bottom: 8px; }
.foot-list { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.foot-print { margin-top: 12px; font-size: 13px; color: var(--navy-2); max-width: 70ch; }
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr) 228px; gap: 0; height: 100%; min-height: 0; padding: 12px; }
.docs-main { min-width: 0; height: 100%; display: flex; flex-direction: column; background: var(--sheet); border-radius: 13px; box-shadow: var(--shadow-front); position: relative; overflow: hidden; }
.docs-side { position: relative; }
.docs-side .note-mayor { position: absolute; left: 12px; right: 0; bottom: 0; display: flex; flex-direction: column; background: var(--sheet); border-radius: 13px; box-shadow: var(--shadow-rest); overflow: hidden; }
.note-mayor .win-bar { cursor: default; }
.note-mayor-stage { position: relative; height: 240px; background: #dbe0eb; cursor: pointer; }
.note-mayor-stage .clay-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.note-mayor-stage .bubble { z-index: 2; }
.note-mayor p { padding: 8px 12px 10px; font-size: 13px; color: var(--navy-2); line-height: 1.35; }

/* ------------------------------------------------ all windows, side by side */
html.is-expo .win { cursor: pointer; }
html.is-expo .win > * { pointer-events: none; }
.expo-hint { position: absolute; left: 50%; bottom: 10px; translate: -50% 0; padding: 4px 12px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity 200ms var(--out); z-index: 3900; }
html.is-expo .expo-hint { opacity: 1; }

/* ------------------------------------------------ first load, only when script runs */
html.js .hero .title { opacity: 0; animation: bootrise 900ms var(--out-long) forwards; }
html.js .hero-line { opacity: 0; animation: bootrise 900ms var(--out-long) 120ms forwards; }
html.js .hero-actions { opacity: 0; animation: bootrise 900ms var(--out-long) 240ms forwards; }
@keyframes bootfade { to { opacity: 1; } }
@keyframes bootrise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

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

/* ------------------------------------------------ a phone: a stack of sheets */
@media (max-width: 980px) {
  body { overflow: auto; }
  html, body { height: auto; }
  .machine { position: relative; display: block; padding-bottom: 86px; min-height: 100svh; }
  .bar { position: sticky; top: 0; height: 48px; z-index: 4500; padding: 0 8px 0 10px; }
  .bar .clock { display: none; }
  .bar-tools { gap: 6px; }
  .tool span { display: none; }
  .rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; height: 72px; flex-direction: row; padding: 6px 8px;
    justify-content: flex-start; gap: 2px; overflow: auto hidden; z-index: 4600;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }
  .rail::before { left: 0; right: 0; top: 21px; bottom: auto; width: auto; height: 2px; margin: 0; }
  .rail-logo { width: 40px; height: 40px; margin: 6px 4px 0 0; }
  .rail-logo svg { width: 40px; height: 40px; }
  .rail-group { flex-direction: row; width: auto; gap: 2px; flex: none; }
  .rail-group + .rail-group { margin: 0 0 0 2px; padding: 0; }
  .sign { width: 64px; flex: none; }
  .surface { position: static; overflow: visible; overflow-x: clip; padding: 0 0 0; display: flex; flex-direction: column; }
  html[data-drama] .win::before { transform: none; }
  .hero, .tplus-phone { order: -1; }
  .win[data-win="city"] { order: 1; }
  .win[data-win="send"] { order: 2; }
  .win[data-win="how"] { order: 3; }
  .win[data-win="fees"] { order: 4; }
  .win[data-win="books"] { order: 5; }
  .win[data-win="inbox"] { order: 6; }
  .win[data-win="tax"] { order: 7; }
  .win[data-win="speech"] { order: 8; }
  .win[data-win="ballot"] { order: 9; }
  .win[data-win="citizens"] { order: 10; }
  .win[data-win="replay"] { order: 11; }
  .win[data-win="sponsor"] { order: 12; }
  .win[data-win="schedule"] { order: 13; }
  .field { font-size: 16px; }
  .act-name { flex-direction: column; gap: 0; white-space: normal; }
  .act-top { align-items: flex-start; }
  .act-fill { flex: none; }
  .win.is-city { padding-bottom: 14px; background: var(--sheet); }
  .burn-amt small { max-width: 112px; white-space: normal; }
  .win.is-qr.is-sheet { position: fixed; left: 0; right: 0; bottom: 0; width: auto !important; margin: 0; z-index: 4700 !important; max-height: 92svh; overflow: auto; }
  .win.is-qr.is-sheet .win-close { display: grid; }
  .win { position: relative; left: auto; top: auto; translate: none !important; scale: none !important; width: auto !important; height: auto !important; border-radius: 18px 18px 0 0; margin-top: -14px; box-shadow: 0 -1px 0 var(--line), 0 -12px 28px -14px rgb(28 43 117 / 0.32); z-index: auto !important; }
  .win[hidden] { display: flex !important; }
  .win[data-closed-util="1"][hidden] { display: none !important; }
  .win.is-qr[hidden] { display: none !important; }
  .win-bar { height: 46px; border-radius: 18px 18px 0 0; cursor: default; touch-action: auto; padding-left: 16px; position: relative; }
  .win-bar::before { content: ""; position: absolute; left: 50%; top: 5px; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: var(--tint); }
  .win-title { font-size: 16px; }
  .win-close { display: none; }
  .win-body { overflow: visible; border-radius: 0; }
  .win.is-city { position: sticky; top: 48px; margin-top: 0; border-radius: 0; z-index: 0 !important; box-shadow: none; }
  .win.is-city .win-bar { display: none; }
  .win.is-city .view { flex: none; height: 44svh; min-height: 280px; }
  .readout { border-radius: 0; flex-wrap: wrap; }
  .kpi { flex: 1 1 33%; padding: 6px 10px; }
  .kpi-num { font-size: 20px; }
  .machine > .alerts { position: sticky; top: 48px; z-index: 4400; }
  .bar .live-chip { font-size: 13px; }
  .bar .tool-lang { padding: 0 8px; min-width: 36px; }
  .ca-line { padding-top: 2px; }
  .asks { flex: 1 1 100%; min-height: 44px; border-left: 0; border-top: 1px solid var(--line-2); }
  .win:not(.is-city) { background: var(--sheet); }
  .notes { left: 8px !important; right: 8px !important; top: auto !important; bottom: 84px; align-items: stretch !important; }
  .note { width: auto; }
  .view-tools { display: none; }
  .mayor-cursor { display: none; }
  .view-note, .view-note.has-tools { left: auto; bottom: 6px; right: 8px; }
  .send-honest { border-radius: 0; }
  .hero { position: relative; left: auto; top: auto; width: auto; padding: 20px 18px 26px; }
  .title { font-size: 25vw; }
  .hero-line { font-size: 18px; margin-top: 12px; }
  .hero-actions { margin-top: 16px; }
  .plates { position: absolute; height: 640px; opacity: 0.55; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .candidates { grid-template-columns: minmax(0, 1fr); }
  .sponsor-form { grid-template-columns: minmax(0, 1fr) 84px; }
  .dial-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .tplus { display: none; }
  .tplus-phone { display: flex !important; padding: 8px 12px; background: var(--sheet-2); overflow-x: auto; gap: 8px; align-items: center; font-size: 13px; }
  .act { padding: 12px 14px; }
  .docs-layout { display: block; padding: 0; height: auto; }
  .docs-main { height: auto; border-radius: 0; box-shadow: none; overflow: visible; }
  .docs-scroll { height: auto; overflow: visible; }
  .docs-side { display: none; }
  .docs-main .win-bar { position: sticky; top: 48px; border-radius: 0; background: var(--sheet); z-index: 3; }
  .docs-main .win-bar::before { display: none; }
  .split, .reply, .answers { grid-template-columns: minmax(0, 1fr); }
  .doc-sec { padding: 28px 18px; }
  .itin-row { grid-template-columns: 34px minmax(0, 1fr); }
  .itin-w { grid-column: 2; }
  .desk-only { display: none !important; }
}
.tplus-phone { display: none; }
.tplus-phone[hidden] { display: none !important; }
.phone-only { display: none; }
@media (max-width: 980px) { .phone-only { display: block; } }
