/* The state desk (docs/plan/m19b-state-desk.md section 7), in the look of the
   owner's officer desk and ward lead (the design handoff's screens 44 and
   45): Figtree on a near-white surface, a left navigation, panels whose lists
   read as a queue of white cards, tables of figures as rows of their own.

   Figtree is the desk's own, served with it from fonts/ (SIL Open Font
   License, fonts/ofl.txt; font-src 'self'): nothing is fetched from anywhere
   else, and there is no image but data: SVG, a spot's photo and the street
   map (M34), each from the desk's own host.

   Colour carries meaning, as on the phone: green for the people's yes and for
   sending; blue for facts; warm red for genuine attention only (reopened,
   waiting, refused), never for decoration. Tints are 5 to 12 per cent of
   those colours, hairlines 6 to 14 per cent of ink. */

@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: Figtree;
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --ink: #191b1f;
  --text: #41444b;
  --text-2: #585c65;
  --text-3: #6e7280;
  --muted: #8a8e98;
  --surface: #fcfcfd;
  --page: #f0f1f4;
  --panel: #f7f7f9;
  --tile: #f4f5f7;
  --on-ink: #fbfbfc;
  --green: #116b4c;
  --green-ink: #0e5a40;
  --green-tint: rgba(17, 107, 76, 0.1);
  --green-line: rgba(17, 107, 76, 0.2);
  --blue: #1f5e96;
  --blue-ink: #1b5484;
  --blue-tint: rgba(31, 94, 150, 0.1);
  --blue-wash: rgba(31, 94, 150, 0.06);
  --blue-line: rgba(31, 94, 150, 0.16);
  --warm: #c2410c;
  --warm-ink: #9a3412;
  --warm-tint: rgba(194, 65, 12, 0.1);
  --warm-wash: rgba(194, 65, 12, 0.06);
  --warm-line: rgba(194, 65, 12, 0.18);
  --amber: #f9a83c;
  --line: rgba(25, 27, 31, 0.08);
  --line-soft: rgba(25, 27, 31, 0.06);
  --line-mid: rgba(25, 27, 31, 0.12);
  --line-strong: rgba(25, 27, 31, 0.14);
  --hover: rgba(25, 27, 31, 0.05);
  --on: rgba(25, 27, 31, 0.07);
  --lift: 0 8px 20px -16px rgba(25, 27, 31, 0.6);
  --frame: 0 30px 60px -30px rgba(25, 27, 31, 0.45), 0 0 0 1px rgba(25, 27, 31, 0.08);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav: 216px;
  /* The screens' widest: a 2,560 px window's less the navigation. Past it a
     row's name and its figure lie too far apart to read across (N-265). */
  --page-max: 2344px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--panel);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--panel);
  color: var(--ink);
  font-family: Figtree, "Helvetica Neue", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Gujarati", "Noto Sans Devanagari", Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
}

a:hover {
  color: var(--blue-ink);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

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

h1:focus,
.main:focus {
  outline: none;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 10px;
  z-index: 30;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-weight: 500;
  text-decoration: none;
}

.skip:focus {
  left: 14px;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.muted {
  color: var(--text-3);
}

.boot {
  margin: 0;
  padding: 72px 24px;
  color: var(--text-3);
  font-size: 13.5px;
  text-align: center;
}

@keyframes up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* What the browser walk clicks must not move under it: a page, a card or a
   story only fades in. */
@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* The mark: an ink disc, a white ring, a white dot. */
.mark {
  display: inline-block;
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink);
  flex: none;
}

.mark::before,
.mark::after {
  content: "";
  position: absolute;
  border-radius: 50%;
}

.mark::before {
  inset: 7.5px;
  border: 2px solid var(--on-ink);
}

.mark::after {
  inset: 12px;
  background: var(--on-ink);
}

/* ------------------------------------------------------------ the shell */

.shell {
  display: grid;
  grid-template-columns: var(--nav) minmax(0, 1fr);
  min-height: 100vh;
}

/* The navigation, as the design's: a quiet column, rows of 34 px, the one
   open on a soft ink tint. */
.rail {
  position: sticky;
  top: 0;
  z-index: 12;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 10px 22px 14px;
  background: var(--page);
  box-shadow: 1px 0 0 rgba(25, 27, 31, 0.07);
}

.rail-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 8px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.rail-mark:hover {
  color: var(--ink);
}

.rail-brand {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.rail-list::before {
  content: "";
  display: block;
  height: 1px;
  margin: 0 8px 10px;
  background: var(--line);
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.rail-item .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.rail-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-item:hover {
  background: var(--hover);
  color: var(--ink);
}

.rail-item.rail-on {
  background: var(--on);
  color: var(--ink);
  font-weight: 600;
}

.rail-item.rail-on .icon {
  color: var(--ink);
}

.body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

/* The top bar: 56 px, a hairline under it, the place as the context. */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-height: 56px;
  padding: 10px 28px;
  background: rgba(252, 252, 253, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-gap {
  flex: 1 1 0;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease);
}

.pill:hover {
  border-color: rgba(25, 27, 31, 0.24);
}

.pill .icon {
  width: 17px;
  height: 17px;
  color: var(--text-3);
}

.pill::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 13px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid var(--text-3);
  border-bottom: 1.5px solid var(--text-3);
  transform: rotate(45deg);
  pointer-events: none;
}

.pill:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pill-select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  height: 34px;
  padding: 0 24px 0 0;
  max-width: 280px;
  font-size: 13.5px;
  cursor: pointer;
  text-overflow: ellipsis;
}

.pill-select:focus-visible {
  outline: none;
}

.pill-select:disabled {
  cursor: default;
  color: var(--text-3);
}

.pill-place .pill-select {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  height: 36px;
  padding: 0 14px;
  background: var(--tile);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-3);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.search .icon {
  width: 17px;
  height: 17px;
}

.search:focus-within {
  background: var(--surface);
  border-color: var(--line-strong);
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13.5px;
  height: 34px;
}

.search-input:focus-visible {
  outline: none;
}

.search-input::placeholder {
  color: var(--text-3);
}

.search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px -16px rgba(25, 27, 31, 0.35);
  color: var(--ink);
  animation: up 0.35s var(--ease);
}

.search-group {
  margin: 8px 8px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

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

.search-hit {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 13.5px;
  text-decoration: none;
}

.search-hit .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.search-hit:hover,
.search-hit:focus {
  background: var(--on);
  color: var(--ink);
}

.search-empty {
  margin: 6px 8px;
  color: var(--text-3);
  font-size: 13.5px;
}

.who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 999px;
  background: var(--blue-tint);
  color: var(--blue-ink);
  font-size: 12px;
  font-weight: 600;
}

.holder {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-2);
  font-size: 13px;
}

/* The seat's role beside its holder (M28). */
.holder-role {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tile);
  color: var(--text-3);
  font-size: 11.5px;
  white-space: nowrap;
}

/* Your seat's filters, in the seats card's head. */
.filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.who-status {
  font-size: 12.5px;
  color: var(--warm-ink);
}

/* N-188: a seat of one passkey is asked for a second, above every screen. */
.notice.second-passkey {
  flex-wrap: nowrap;
  align-items: flex-start;
  max-width: calc(var(--page-max) - 56px);
  margin: 20px 28px 0;
}

.second-passkey .icon {
  flex: none;
}

/* The screens take the window's width, as the top bar does, up to
   --page-max: a wide window is not left half empty (N-265). What reads as
   text keeps its own measure (a form, her message), and the Brief's queues go
   side by side once their card is wide enough for two. */
.main {
  width: 100%;
  max-width: var(--page-max);
  padding: 24px 28px 56px;
}

/* ---------------------------------------------------------- the screens */

.screen {
  animation: fade 0.5s var(--ease);
}

.head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 2px 0 18px;
}

.title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: pretty;
}

.head-sub {
  color: var(--text-2);
  font-size: 13.5px;
}

.head .shade {
  align-self: center;
  margin-left: auto;
}

.crumbs {
  margin: 0 0 6px;
  font-size: 12.5px;
}

.crumbs a {
  color: var(--text-3);
  font-weight: 500;
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--ink);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  min-width: 0;
}

/* A card that holds a queue or a table is a panel, as the design's queue and
   office columns are: its rows are the white cards. */
.table-card,
.card:has(> .rows),
.card:has(> .rank),
.card:has(> .index-rows),
.brief-lists:has(.rows) {
  background: var(--panel);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.card-title-rule {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.card-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--on);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Today, as the design's top bar says its figures. */
.strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--text-2);
}

.strip-label {
  margin-right: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.dot {
  color: var(--muted);
}

.num {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.fewer {
  font-weight: 600;
  color: var(--ink);
}

.lead {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

/* A count of people, as the design's "23 others said the same": a fact, in
   blue, the number large. */
[data-test="topic-people"].lead,
[data-test="results-answered"].lead,
[data-test="round-asked"].lead {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 6px;
  margin: 4px 0 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--blue-wash);
  border: 1px solid var(--blue-line);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text);
}

[data-test="topic-people"].lead {
  margin: 0;
}

.lead .num {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--blue);
}

.lead .fewer {
  font-size: 15px;
  color: var(--blue);
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow-line {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow-line .dot {
  color: var(--muted);
}

.fine {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-2);
}

.empty {
  margin: 6px 2px;
  color: var(--text-3);
  font-size: 13.5px;
}

.loading {
  margin: 8px 2px;
  color: var(--text-3);
  font-size: 13.5px;
}

.status {
  min-height: 1.3em;
  margin: 0;
  font-size: 13px;
  color: var(--text);
}

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tile);
  border: 1px solid var(--line-soft);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
}

.notice .icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.notice-quiet {
  background: var(--tile);
}

.notice-error {
  background: var(--warm-wash);
  border-color: var(--warm-line);
  color: var(--warm-ink);
}

/* M30: a topic reopened twice, shown to the CM's Office: attention, not an error. */
.notice-warm {
  background: var(--warm-wash);
  border-color: var(--warm-line);
  color: var(--warm-ink);
  font-weight: 500;
}

.notice-ok {
  background: rgba(17, 107, 76, 0.07);
  border-color: var(--green-line);
  color: var(--green-ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* The officer desk's two panes: the story in the middle, what can be done
   about it beside (a topic, a round, a question's answers). */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
}

.split-main,
.split-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.split-side > .actions {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.split-side > .actions::before {
  content: "What the desk can do";
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.split-side > .actions .btn {
  width: 100%;
  height: 44px;
}

.split-side > .actions .btn-ink {
  height: 48px;
  font-size: 15px;
}

/* The Brief: today's figures across, what is gathering speed and arriving as
   the queue, what the people reopened as the panel beside, which grows with a
   wide window. */
.screen-brief > .stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 28%);
  gap: 16px 20px;
  align-items: start;
}

/* The queue's two lists, gathering speed and arriving now: one under the
   other, under a rule; side by side, beside a rule, once the card is wide
   enough for two (N-265). */
.brief-lists {
  container-type: inline-size;
}

@container (min-width: 900px) {
  .brief-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brief-pair > .brief-part:first-child {
    padding-right: 22px;
  }

  .brief-pair > .brief-part + .brief-part {
    padding-left: 22px;
    border-left: 1px solid var(--line);
  }

  .brief-part > .card-title-rule {
    display: flex;
    align-items: center;
    min-height: 22px;
    margin: 0 0 10px;
    padding-top: 0;
    border-top: 0;
  }
}

.screen-brief > .stack > * {
  grid-column: 1 / -1;
}

.screen-brief > .stack > [data-test="brief-lists"] {
  grid-column: 1;
  grid-row: 2;
}

.screen-brief > .stack > [data-test="brief-reopened"] {
  grid-column: 2;
  grid-row: 2;
}

/* The clock: the design's "Answer due", while a round or a question takes
   answers. */
.clock {
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-ink);
}

.clock p {
  margin: 0;
}

.clock-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(251, 251, 252, 0.6);
}

.clock-time {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px !important;
}

.clock-left {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.clock-when {
  font-size: 12.5px;
  color: rgba(251, 251, 252, 0.7);
}

.clock .bar {
  height: 5px;
  margin-top: 10px;
}

.clock-then {
  margin-top: 8px !important;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(251, 251, 252, 0.7);
}

/* Rows: a queue of white cards, as the design's messages to answer. */
.rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.fine + .rows {
  margin-top: 10px;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 16px;
  padding: 12px 14px;
  border: 1px solid rgba(25, 27, 31, 0.07);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

a.row:hover {
  color: inherit;
  border-color: rgba(25, 27, 31, 0.28);
  box-shadow: var(--lift);
}

a.row:focus-visible {
  border-color: var(--ink);
  box-shadow: var(--lift);
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.row-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.row-title a {
  color: var(--ink);
  text-decoration: none;
}

.row-title a:hover {
  color: var(--blue-ink);
  text-decoration: underline;
}

.row-sub {
  font-size: 12px;
  color: var(--text-2);
}

.row-fig {
  max-width: 24em;
  padding-top: 1px;
  text-align: right;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.row-due {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* In a side panel a row's figure goes under it, as the queue's meta line. */
.split-side .row {
  grid-template-columns: minmax(0, 1fr);
}

.split-side .row-fig {
  max-width: none;
  padding-top: 0;
  text-align: left;
}

/* A reopened topic is the design's slipping office: a warm row. */
.card-rust .row {
  background: var(--surface);
  border-color: var(--warm-line);
}

.card-rust a.row:hover {
  border-color: rgba(194, 65, 12, 0.45);
}

/* Bars (SVG: no style attributes). */
.bar {
  display: block;
  width: 100%;
  height: 6px;
}

.bar-bg {
  fill: rgba(25, 27, 31, 0.07);
}

.bar-fg {
  fill: var(--blue);
}

.bar-due .bar-bg {
  fill: rgba(251, 251, 252, 0.16);
}

.bar-due .bar-fg {
  fill: var(--amber);
}

/* A share not known (a count shown as "fewer than N") is the track hatched
   as far as the count can reach, drawn in its svg (bar, N-265); the line
   under the list says what the hatch is. */
.rank + .fine,
.index-rows + .fine {
  margin-top: 12px;
}

/* Topics, ranked: the ward lead's office table. */
.rank-head,
.index-head {
  display: grid;
  gap: 14px;
  padding: 0 13px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rank-head {
  grid-template-columns: 30px minmax(0, 1fr) minmax(120px, 26%) minmax(130px, auto);
}

.rank-head > :last-child,
.index-head > :last-child {
  text-align: right;
}

.rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rank-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(120px, 26%) minmax(130px, auto);
  align-items: center;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.rank-row:hover,
.index-row:hover {
  color: inherit;
  border-color: rgba(25, 27, 31, 0.28);
  box-shadow: var(--lift);
}

.rank-n {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.rank-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.rank-fig {
  text-align: right;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

/* The index. */
.index-head {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(90px, 0.8fr) minmax(0, 0.7fr);
  margin-top: 12px;
}

.index-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.index-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr) minmax(90px, 0.8fr) minmax(0, 0.7fr);
  align-items: center;
  gap: 14px;
  padding: 13px 13px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.index-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.index-fig {
  font-size: 13px;
  color: var(--text);
}

.index-fig > b {
  font-weight: 600;
  color: var(--blue);
}

.index-works {
  text-align: right;
  font-size: 12.5px;
  color: var(--text-2);
}

/* Tables: the ward lead's rows, each a white card of its own. */
.data {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  margin: -6px 0;
  font-size: 13px;
  color: var(--text);
}

.data th {
  padding: 6px 12px 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  color: var(--text-3);
}

.data td {
  padding: 10px 12px;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.data td:first-child {
  border-left: 1px solid var(--line-soft);
  border-radius: 10px 0 0 10px;
}

.data td:last-child {
  border-right: 1px solid var(--line-soft);
  border-radius: 0 10px 10px 0;
}

.data a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}

.data a:hover {
  color: var(--blue-ink);
  text-decoration: underline;
}

.data .n {
  width: 44px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.data .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* N-249: under the people who raise a topic at a place, how many of them
   chose the place; and what that means, under the table. The figure may wrap
   where its number does not. */
.data .where-chosen {
  margin-top: 2px;
  white-space: normal;
}

.where-chosen-why {
  margin-top: 12px;
}

.table-foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text);
}

.place-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.swatch {
  width: 14px;
  height: 14px;
  flex: none;
}

.swatch-edge {
  stroke: rgba(25, 27, 31, 0.12);
  stroke-width: 1;
}

/* Chips: the design's status chip, a dot and a tint. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px 5px 12px;
  border-radius: 999px;
  background: var(--on);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.3;
}

.chip-rust {
  background: var(--warm-tint);
  color: var(--text);
}

.chip-rust b {
  color: var(--warm-ink);
  font-weight: 600;
}

/* A chip that narrows the page (an index, a topic shading the map) is a
   fact about the view, not a warning: blue. */
.chip-rust:has(.chip-x) {
  background: var(--blue-tint);
}

.chip-rust:has(.chip-x) b {
  color: var(--blue-ink);
}

.chip-x {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
  font-size: 15px;
  line-height: 1;
}

.chip-x:hover {
  background: rgba(25, 27, 31, 0.08);
  color: inherit;
}

.pill-shade {
  padding-left: 14px;
}

.pill-shade label {
  font-size: 13px;
  color: var(--text-3);
  white-space: nowrap;
}

/* Buttons: the design's, fully round. Ink leads, green sends, an outline
   follows. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  background: var(--tile);
  border-color: rgba(25, 27, 31, 0.24);
  color: var(--ink);
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-ink {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}

.btn-ink:hover {
  border-color: #2c2f35;
  background: #2c2f35;
  color: var(--on-ink);
}

.btn-go {
  border-color: var(--green);
  background: var(--green);
  color: var(--on-ink);
}

.btn-go:hover {
  border-color: var(--green-ink);
  background: var(--green-ink);
  color: var(--on-ink);
}

.btn-quiet {
  border-color: transparent;
  background: transparent;
  color: var(--text);
}

.btn-quiet:hover {
  border-color: transparent;
  background: var(--hover);
}

/* Taking a seat back (M28): the one button that cannot be undone. */
.btn-warn {
  border-color: var(--warm);
  background: var(--surface);
  color: var(--warm-ink);
}

.btn-warn:hover {
  border-color: var(--warm-ink);
  background: var(--warm-wash);
  color: var(--warm-ink);
}

.btn-small {
  height: 32px;
  padding: 0 13px;
  font-size: 12.5px;
}

.btn-big {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn.btn-on {
  border-color: var(--ink);
  background: var(--on);
  color: var(--ink);
}

/* People's note's tabs: the design's queue tabs. */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}

.tab {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 13px;
  border: 1px solid var(--line-mid);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.tab:hover {
  border-color: rgba(25, 27, 31, 0.24);
  color: var(--ink);
}

.tab.tab-on {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--on-ink);
}

/* Her story: the design's opened message, as she approved it. */
.stories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0;
}

.stories:empty {
  display: none;
}

.stories-card .actions {
  margin-top: 4px;
}

.story {
  padding: 18px 20px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  animation: fade 0.5s var(--ease);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.tag .icon {
  width: 14px;
  height: 14px;
}

.tag-soft {
  background: var(--green-tint);
  color: var(--green-ink);
}

.tag-blue {
  background: var(--blue-tint);
  color: var(--blue-ink);
}

.story-meta {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--text-2);
}

.story-meta .eyebrow {
  display: inline;
  margin-right: 6px;
}

/* Her message, as she approved it: one paragraph a part. */
.story-message {
  max-width: 680px;
  margin: 0 0 16px;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-wrap: pretty;
}

.story-message:not(:last-child) {
  margin-bottom: 10px;
}

/* The map. */
.map-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.map-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
}

.region {
  stroke: var(--surface);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.2s var(--ease);
}

.region-link:focus {
  outline: none;
}

.region-link:hover .region,
.region-link:focus .region {
  stroke: var(--ink);
  stroke-width: 2;
}

.region-link:focus-visible .region {
  stroke: var(--blue);
  stroke-width: 3;
}

/* A frame of its own for places that lie far from the others (N-265). */
.map-frame {
  fill: none;
  stroke: var(--line-mid);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* A place too small to see at its frame's scale, drawn as a dot too. */
.region-dot {
  stroke: var(--text-3);
}

.map-label {
  fill: var(--ink);
  font-family: inherit;
  font-weight: 500;
  paint-order: stroke;
  stroke: rgba(252, 252, 253, 0.85);
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-note {
  color: var(--text-3);
}

.legend-none {
  flex-basis: 100%;
  color: var(--text-3);
}

.map-card .fine {
  margin-top: 12px;
}

/* People's note: two queues side by side, the forms, the answers. */
.note-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.form-card {
  max-width: 860px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

fieldset {
  min-width: 0;
}

.part {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 14px 16px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

legend {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label {
  font-size: 12.5px;
  color: var(--text-2);
}

.field .lang {
  font-weight: 600;
  color: var(--ink);
}

.field.langs {
  margin: 0;
  padding: 0;
  border: 0;
}

.field.langs legend {
  padding: 0;
  margin-bottom: 6px;
}

.field-input,
.field-area,
.field-select {
  width: 100%;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%236E7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.field-input:hover,
.field-area:hover,
.field-select:hover {
  border-color: rgba(25, 27, 31, 0.24);
}

.field-input:focus,
.field-area:focus,
.field-select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 0.5px var(--ink);
  outline: none;
}

.field-select:disabled {
  color: var(--text-3);
  cursor: default;
}

/* The reply panel's box, as the design draws it: ink, 1.5 px. */
.split-side .field-area {
  border: 1.5px solid var(--ink);
}

.field-area {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.radio-row .field-select {
  width: auto;
  min-width: 200px;
  max-width: 100%;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--line-mid);
}

.option .btn {
  align-self: flex-start;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.check input,
.radio-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
}

.radio-row input {
  accent-color: var(--ink);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 14px;
}

.radio-off label {
  color: var(--muted);
}

.form-error {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--warm-wash);
  border: 1px solid var(--warm-line);
  color: var(--warm-ink);
  font-size: 13.5px;
}

/* What a send did: the design's status chip, larger. */
.told {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin: 0;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--tile);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
}

.told .icon {
  width: 17px;
  height: 17px;
}

.told-ok {
  background: var(--green-tint);
  color: var(--green-ink);
}

.told-none {
  background: var(--tile);
  color: var(--text-2);
}

.summary .lead {
  margin-bottom: 12px;
}

.part-result {
  margin: 4px 0 20px;
}

.part-result .fine {
  margin-top: 8px;
}

.part-result:last-child {
  margin-bottom: 4px;
}

.part-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.stack-bar {
  display: block;
  width: 100%;
  height: 10px;
  margin-bottom: 10px;
  border-radius: 5px;
}

.option-results {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.option-result {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-result b {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.own-text .quote {
  margin: 6px 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tile);
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.part-line {
  margin: 6px 0;
  font-size: 13.5px;
  color: var(--text);
}

/* Is it better now?: Mark it done, a topic's rounds, a round. Warm is reopened,
   green is confirmed by the people. */
.chip .icon {
  width: 14px;
  height: 14px;
}

.chip-tight,
.outcome .chip,
.month-top > .chip {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.chip-tight::before,
.outcome .chip::before,
.month-top > .chip::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 999px;
  background: currentColor;
}

.chip-tight:has(.icon)::before,
.outcome .chip:has(.icon)::before {
  display: none;
}

.chip-rust.chip-tight,
.outcome .chip-rust,
.month-top > .chip-rust {
  color: var(--warm-ink);
}

.chip-ink {
  background: var(--blue-tint);
  color: var(--blue-ink);
}

.chip-ink:has(.icon) {
  background: var(--green-tint);
  color: var(--green-ink);
}

.card-rust {
  border-color: var(--warm-line);
}

.card-rust > .card-head .card-title {
  color: var(--warm-ink);
}

.card-rust .card-count {
  background: var(--warm-tint);
  color: var(--warm-ink);
}

.card-quiet {
  background: var(--panel);
  border-color: var(--line);
}

.card-quiet > .card-head .card-title {
  color: var(--ink);
}

.card-quiet .empty {
  margin: 0 2px;
}

.done-slot:empty,
.done-result-slot:empty {
  display: none;
}

.done-card {
  max-width: none;
}

.done-what {
  margin: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.rule-line {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}

.rule-line b {
  color: var(--warm-ink);
  font-weight: 600;
}

.done-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.told-pending {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--text);
}

.round-row .row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.row-quote {
  margin-top: 2px;
  font-size: 13px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.outcome {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 14px;
}

.outcome-said {
  color: var(--text);
  font-size: 14px;
}

.outcome-notice {
  margin-bottom: 14px;
}

.round-sum {
  margin-top: 12px;
}

.round-sum + .fine {
  margin-top: 6px;
}

.facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  margin: 10px 0 0;
}

.facts dt {
  color: var(--text-3);
  font-size: 12.5px;
}

.facts dd {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* The monthly note: its figures, locked; the note as a phone shows it. */
.month-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.month-head .lead {
  margin: 0;
}

.month-head .notice {
  margin-bottom: 14px;
}

.month-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 1fr);
  gap: 20px;
  align-items: start;
}

.locked {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 2px 0 12px;
  font-size: 13.5px;
}

.locked b {
  font-weight: 600;
}

.locked .icon {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--tile);
}

.tile-n {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.tile-n.tile-fewer {
  font-size: 18px;
  line-height: 1.35;
}

.tile-label {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text-2);
}

.goes-to {
  margin: 0;
  font-size: 15px;
  color: var(--text);
}

.preview-card {
  position: sticky;
  top: 80px;
}

.phone {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  margin: 8px auto 0;
  padding: 28px 22px 22px;
  border: 1px solid rgba(25, 27, 31, 0.1);
  border-radius: 30px;
  background:
    radial-gradient(80% 54% at 50% 30%, rgba(252, 252, 253, 0.96) 0 40%, rgba(252, 252, 253, 0.8) 100%),
    radial-gradient(60% 40% at 0% 0%, rgba(28, 151, 108, 0.28), rgba(28, 151, 108, 0) 70%),
    radial-gradient(60% 40% at 100% 0%, rgba(249, 168, 60, 0.32), rgba(249, 168, 60, 0) 70%),
    var(--surface);
  box-shadow: inset 0 0 0 6px var(--surface), 0 24px 48px -28px rgba(25, 27, 31, 0.4);
}

.phone p {
  margin: 0;
}

.phone-from {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.phone-title {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.phone-lead {
  font-size: 15px;
  color: var(--ink);
}

.phone-line {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
}

.phone-own {
  padding: 10px 12px;
  border-left: 3px solid var(--blue);
  border-radius: 0 12px 12px 0;
  background: var(--blue-wash);
  font-size: 14.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.phone-own-part {
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}

.phone-section {
  font-size: 14px;
  font-weight: 600;
}

.phone-fine,
.phone-foot {
  font-size: 12.5px;
  color: var(--text-2);
}

.phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin-top: 4px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 15px;
  font-weight: 500;
}

/* Nothing for the seat here: nothing at an address, or a note it may not send. */
.later {
  padding: 56px 24px;
  text-align: center;
  background: var(--panel);
}

.later-text {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.later .fine {
  max-width: 460px;
  margin: 8px auto 0;
}

.later .btn {
  margin-top: 14px;
}

/* --------------------------------------------- sign-in and the seat page */

/* The design's ground: soft green, amber, warm and blue light under a white
   veil. */
.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 32px 16px;
  background:
    radial-gradient(64% 56% at 50% 46%, rgba(252, 252, 253, 0.94) 0 38%, rgba(252, 252, 253, 0.6) 72%, rgba(252, 252, 253, 0) 100%),
    radial-gradient(40% 46% at 10% 14%, rgba(28, 151, 108, 0.36), rgba(28, 151, 108, 0) 70%),
    radial-gradient(36% 44% at 90% 12%, rgba(249, 168, 60, 0.42), rgba(249, 168, 60, 0) 70%),
    radial-gradient(38% 46% at 88% 90%, rgba(236, 121, 66, 0.3), rgba(236, 121, 66, 0) 70%),
    radial-gradient(42% 48% at 12% 92%, rgba(56, 132, 196, 0.3), rgba(56, 132, 196, 0) 70%),
    var(--page);
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(480px, 100%);
  padding: 30px 32px 28px;
  background: rgba(252, 252, 253, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  box-shadow: var(--frame);
  font-size: 14.5px;
  color: var(--text);
  animation: fade 0.6s var(--ease);
}

.auth-card p {
  margin: 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.auth-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.auth-title {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: pretty;
}

.auth-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-card .btn-big {
  align-self: stretch;
  height: 54px;
  margin-top: 4px;
  font-size: 16px;
}

.auth-card .btn-big .icon {
  width: 18px;
  height: 18px;
}

.auth-card .fine {
  font-size: 12.5px;
}

.auth-card .status:empty {
  min-height: 0;
}

.seat-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 16px;
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--tile);
}

.seat-facts dt {
  color: var(--text-3);
  font-size: 12.5px;
}

.seat-facts dd {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* A phone's page (phonePage) and sign-in help: why, and what to do, in
   order. */

.away-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-top: 6px;
  border-radius: 16px;
  background: var(--blue-tint);
  color: var(--blue-ink);
}

.away-icon .icon {
  width: 26px;
  height: 26px;
}

.auth-card .away-lead {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
}

.away-why {
  color: var(--text-2);
}

.away-how {
  margin: 6px 0 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.away-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.away-steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.away-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 12.5px;
  font-weight: 600;
}

.away-steps li > div {
  padding-top: 2px;
}

.away-steps strong {
  font-weight: 600;
  color: var(--ink);
}

.away-address {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tile);
}

.away-address > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.away-copied {
  flex: 1 0 100%;
  font-size: 12.5px;
  color: var(--text-2);
}

.away-copied:empty {
  display: none;
}

/* ------------------------------------------------------------ narrower */

@media (max-width: 1240px) {
  .search {
    width: 240px;
  }

  .holder {
    max-width: 150px;
  }

  .split {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .screen-brief > .stack {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 1120px) {
  .map-grid,
  .note-grid,
  .month-grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-card {
    position: static;
  }
}

/* A tablet: the navigation keeps its icons only. */
@media (max-width: 960px) {
  :root {
    --nav: 68px;
  }

  .rail {
    padding: 16px 8px;
    align-items: center;
  }

  .rail-brand,
  .rail-label {
    display: none;
  }

  .rail-mark,
  .rail-item {
    justify-content: center;
    padding: 0;
    width: 44px;
  }

  .rail-item {
    min-height: 40px;
  }

  .rail-list::before {
    margin: 0 4px 10px;
  }

  .topbar {
    padding: 10px 18px;
  }

  .topbar-gap {
    display: none;
  }

  .search {
    flex: 1 1 220px;
    width: auto;
  }

  .notice.second-passkey {
    margin: 16px 18px 0;
  }

  .main {
    padding: 20px 18px 40px;
  }

  .title {
    font-size: 24px;
  }

  .screen-brief > .stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .screen-brief > .stack > [data-test="brief-lists"],
  .screen-brief > .stack > [data-test="brief-reopened"] {
    grid-column: 1;
    grid-row: auto;
  }

  .rank-head,
  .rank-row {
    grid-template-columns: 28px minmax(0, 1fr) minmax(110px, auto);
  }

  .rank-row .bar,
  .rank-head > :nth-child(3) {
    display: none;
  }

  .index-head {
    display: none;
  }

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

  .index-row .bar {
    display: none;
  }

  /* The line saying what a hatched bar is goes with the bars (N-265). */
  .hatched-why {
    display: none;
  }

  .index-works {
    text-align: left;
  }

  .holder {
    display: none;
  }
}

/* A narrow window: the navigation becomes a strip. (A phone gets
   phonePage.) */
@media (max-width: 640px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: sticky;
    top: 0;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 8px;
    box-shadow: 0 1px 0 rgba(25, 27, 31, 0.07);
  }

  .rail-list {
    flex-direction: row;
  }

  .rail-list::before {
    display: none;
  }

  .topbar {
    position: static;
  }

  .row {
    grid-template-columns: minmax(0, 1fr);
  }

  .row-fig {
    max-width: none;
    text-align: left;
  }

  .tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  .tile {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
  }

  .tile-n {
    font-size: 22px;
  }

  .phone {
    padding: 22px 16px 16px;
  }
}

/* M29: a topic's "Seen, working on it" answers, one line under its facts. */
.seen-row {
  grid-template-columns: minmax(0, 1fr);
}

.quote {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

/* M31: a topic's last answer under its name in the Topics list. */
.rank-answer {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 400;
}

/* M34: spots and codes. The street map (MapLibre, drawn from the host's map
   kit), the spots as pins on it, a spot's photo, its codes. Its card is its
   own: the Map screen's card keeps a card's padding, which this rule, written
   for .map-card, took from it, so the place shapes and their labels ran to
   its edge and the caption under them with them (N-265). */
.street-card {
  padding: 0;
  overflow: hidden;
}

.street-card > .notice,
.street-card > .loading {
  margin: 16px;
}

.spot-map {
  height: 420px;
  width: 100%;
}

.map-pin {
  display: block;
  width: 28px;
  height: 28px;
  color: var(--blue);
  cursor: pointer;
}

.map-pin .icon {
  width: 28px;
  height: 28px;
  fill: var(--surface);
  stroke-width: 2;
}

.map-pin-retired {
  color: var(--muted);
}

.map-pin-mine {
  color: var(--warm);
  cursor: grab;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.spot-photo {
  display: block;
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  margin: 8px 0 12px;
}

.code-list {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
}

.code-row {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.code-id {
  color: var(--ink);
  font-size: 13px;
}

.code-row .fine {
  margin: 4px 0 8px;
}

.btn-danger,
.btn-danger:hover {
  border-color: var(--warm-line);
  background: var(--warm-tint);
  color: var(--warm-ink);
}

/* M34 part C: the invitation, its link and its QR. */
.invite-link code {
  word-break: break-all;
  color: var(--ink);
}

.invite-qr .qr {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  aspect-ratio: 1;
  margin: 8px auto 0;
}

/* N-207: a seat's one-time link's QR, beside its copy button. */
.seat-link-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.seat-link-qr {
  margin: 0;
  text-align: center;
}

.seat-link-qr .qr {
  display: block;
  width: 148px;
  height: auto;
  aspect-ratio: 1;
}

.seat-link-qr figcaption {
  margin-top: 4px;
}

/* The posters, printed from a spot's codes: only the sheet is printed, each
   size on a page of its own size. */
.print-root {
  display: none;
}

@page a4 {
  size: A4;
  margin: 0;
}

@page a5 {
  size: A5;
  margin: 0;
}

@page sticker {
  size: A4;
  margin: 0;
}

@media print {
  body > :not(.print-root) {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .print-root {
    display: block;
    color: #000;
  }

  .sheet-a4 {
    page: a4;
    width: 210mm;
    height: 296mm;
    padding: 18mm 16mm;
  }

  .sheet-a5 {
    page: a5;
    width: 148mm;
    height: 209mm;
    padding: 12mm 11mm;
  }

  .sheet-a4,
  .sheet-a5 {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
  }

  .poster-product {
    margin: 0;
    font-size: 15pt;
    font-weight: 700;
    letter-spacing: 0.02em;
  }

  .poster-names {
    margin: 8mm 0 6mm;
  }

  .poster-name {
    margin: 0 0 2mm;
    font-size: 26pt;
    font-weight: 700;
    line-height: 1.2;
  }

  .sheet-a5 .poster-name {
    font-size: 19pt;
  }

  .poster-qr .qr {
    display: block;
    width: 120mm;
    height: 120mm;
  }

  .sheet-a5 .poster-qr .qr {
    width: 86mm;
    height: 86mm;
  }

  .poster-calls {
    margin: 6mm 0 3mm;
  }

  .poster-call {
    margin: 0 0 1.5mm;
    font-size: 14pt;
  }

  .poster-lines p {
    margin: 0 0 1mm;
    font-size: 11pt;
  }

  .poster-code {
    margin-top: auto;
    font-size: 8pt;
    color: #444;
  }

  .sheet-sticker {
    page: sticker;
    box-sizing: border-box;
    width: 210mm;
    height: 296mm;
    padding: 10mm 8mm;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 4mm;
  }

  .sticker {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 0.2mm dashed #999;
    text-align: center;
    overflow: hidden;
  }

  .sticker .qr {
    width: 46mm;
    height: 46mm;
  }

  .sticker-name {
    margin: 1mm 2mm 0;
    font-size: 9pt;
    font-weight: 700;
  }

  .sticker-code {
    margin: 0;
    font-size: 6pt;
    color: #444;
  }
}

/* M35: held stories. The reason a story was flagged is genuine attention,
   so warm; a part of her message, opened for the moderator. */
.tag-warm {
  background: var(--warm-tint);
  color: var(--warm-ink);
}

.message-part {
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.message-part .muted {
  margin: 0 0 4px;
  font-size: 12px;
}
