/* The state desk (docs/plan/m19b-state-desk.md section 7), in the deck's
   look: white cards on a soft ground, a left rail, ink pills and rust
   accents. System fonts only (font-src 'self'); no image but data: SVG. */

:root {
  --ground: #f5f6f4;
  --card: #ffffff;
  --line: #e6e5e1;
  --line-soft: #efeeeb;
  --ink: #1f2124;
  --ink-2: #3d4146;
  --muted: #676b71;
  --blue: #1a6ce8;
  --blue-soft: #e7effd;
  --blue-ink: #1b4fa8;
  --bar: #24539f;
  --rust: #b4511f;
  --rust-soft: #fcf0e7;
  --rust-line: #ebbd9f;
  --rust-ink: #8f3b12;
  --focus: #c2501d;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(24, 28, 33, 0.04), 0 10px 28px rgba(24, 28, 33, 0.06);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(115deg, #e5f1eb 0%, #f4f6f3 36%, #f8f5f0 68%, #fbede1 100%) fixed;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Devanagari", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

:focus-visible {
  outline: 3px solid var(--focus);
  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: 8px;
  z-index: 30;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.skip:focus {
  left: 12px;
}

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

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

.boot {
  padding: 56px 24px;
  color: var(--muted);
  text-align: center;
  margin: 0;
}

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

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

.mark::before {
  inset: 11px;
  border: 2.5px solid #fff;
}

.mark::after {
  inset: 17px;
  background: #fff;
}

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

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

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 18px 8px;
  background: rgba(255, 255, 255, 0.55);
  border-right: 1px solid var(--line);
}

.rail-mark {
  display: inline-flex;
  border-radius: 50%;
}

.rail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.rail-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 80px;
  padding: 8px 4px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.rail-item:hover {
  background: rgba(31, 33, 36, 0.05);
  color: var(--ink);
}

.rail-item.rail-on {
  background: var(--blue);
  color: #fff;
  font-weight: 500;
}

.rail-item.rail-on::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
}

.body {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 28px;
  background: rgba(246, 247, 245, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

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

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(24, 28, 33, 0.04);
  color: var(--ink);
}

.pill::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 14px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
}

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

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

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

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

.pill-place .pill-select {
  font-weight: 500;
}

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  height: 40px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(24, 28, 33, 0.04);
  color: var(--muted);
}

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

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

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

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

.search-results {
  position: absolute;
  top: 46px;
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

.search-group {
  margin: 6px 8px 2px;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.search-hit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
}

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

.search-hit:hover,
.search-hit:focus {
  background: var(--blue-soft);
}

.search-empty {
  margin: 6px 8px;
  color: var(--muted);
}

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

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

.who-status {
  font-size: 13px;
  color: #8c2410;
}

.main {
  width: 100%;
  max-width: 1280px;
  padding: 6px 28px 48px;
}

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

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

.title {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--ink);
}

.head-sub {
  color: var(--muted);
  font-size: 15px;
}

.head .shade {
  align-self: center;
}

.crumbs {
  margin-top: 2px;
}

.crumbs a {
  font-size: 14px;
  color: var(--muted);
}

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

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

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

.card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
}

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

.card-count {
  font-weight: 600;
}

.strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink-2);
}

.strip-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
}

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

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

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

.lead {
  margin: 0;
  font-size: 17px;
  color: var(--ink-2);
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow-line {
  margin: 0 0 8px;
  font-size: 12.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.fine {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.empty {
  margin: 8px 2px;
  color: var(--muted);
  font-size: 14.5px;
}

.loading {
  margin: 8px 2px;
  color: var(--muted);
}

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

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.notice-quiet {
  background: #f5f4f1;
}

.notice-error {
  background: #fdeeea;
  border-color: #f2c4b9;
  color: #8c2410;
}

.notice-ok {
  background: #edf7ef;
  border-color: #bfe0c6;
  color: #1d5b2b;
}

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

/* Rows: Brief's lists, the questions and notes. */
.rows {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  text-decoration: none;
}

.row:last-child {
  border-bottom: 0;
}

a.row:hover {
  background: #fafaf8;
}

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

.row-title {
  font-size: 16px;
  color: var(--ink);
  overflow-wrap: anywhere;
}

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

.row-title a:hover {
  text-decoration: underline;
}

.row-sub {
  font-size: 13.5px;
  color: var(--muted);
}

.row-fig {
  flex: none;
  max-width: 50%;
  text-align: right;
  font-size: 14.5px;
  color: var(--ink-2);
}

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

.bar-bg {
  fill: #eef0f3;
}

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

/* Topics, ranked. */
.rank {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(120px, 28%) minmax(130px, auto);
  align-items: center;
  gap: 14px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  text-decoration: none;
}

.rank-row:hover {
  background: #fafaf8;
}

.rank-n {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

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

.rank-fig {
  text-align: right;
  color: var(--ink-2);
  white-space: nowrap;
}

/* The index. */
.index-rows {
  display: flex;
  flex-direction: column;
  margin-top: 6px;
}

.index-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) minmax(90px, 0.8fr) minmax(0, 0.7fr);
  align-items: center;
  gap: 14px;
  padding: 14px 6px;
  border-bottom: 1px solid var(--line-soft);
  color: inherit;
  text-decoration: none;
}

.index-row:hover {
  background: #fafaf8;
}

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

.index-fig {
  color: var(--ink-2);
}

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

/* Tables. */
.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.data th {
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  color: var(--muted);
}

.data td {
  padding: 7px 6px;
  border-bottom: 1px solid var(--line-soft);
}

.data a {
  text-decoration: none;
}

.data a:hover {
  text-decoration: underline;
}

.data .n {
  width: 34px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

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

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

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

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

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

/* Chips: "Shaded by", the index a list is narrowed to. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 14px;
}

.chip-rust {
  border-color: var(--rust-line);
  background: var(--rust-soft);
  color: var(--ink-2);
}

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

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

.chip-x:hover {
  background: rgba(31, 33, 36, 0.08);
}

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

.pill-shade label {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

/* Buttons: ink pills. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: #f3f3f1;
}

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

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-ink:hover {
  background: #33363b;
}

.btn-quiet {
  border-color: var(--line);
}

.btn-small {
  height: 32px;
  padding: 0 12px;
  font-size: 13.5px;
}

.btn-big {
  height: 46px;
  padding: 0 22px;
  font-size: 16px;
}

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

/* People's note's tabs. */
.tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(31, 33, 36, 0.06);
}

.tab {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.7);
}

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

/* Her story. */
.stories {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0;
}

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

.story {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 13px;
}

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

.tag-soft {
  background: #f0efec;
  color: var(--ink-2);
}

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

.story-meta {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--muted);
}

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

.story-words {
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.story-office {
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.story-office ul {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-2);
}

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

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

.region {
  stroke: #ffffff;
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
}

.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(--focus);
  stroke-width: 3;
}

.map-label {
  fill: var(--ink);
  font-family: inherit;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 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: 12px;
  font-size: 13px;
  color: var(--ink-2);
}

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

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

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

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

/* People's note: lists, forms and answers. */
.note-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

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

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

fieldset {
  min-width: 0;
}

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

legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

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

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

.field .lang {
  font-weight: 600;
}

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

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

.field-input,
.field-area,
.field-select {
  width: 100%;
  max-width: 100%;
  padding: 9px 12px;
  border: 1px solid #d3d2cd;
  border-radius: 10px;
  background: #fbfbfa;
  font-size: 15px;
  color: var(--ink);
}

.field-area {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

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

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

.option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  border-left: 3px solid #ecebe6;
}

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

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

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

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

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

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

.form-error {
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: #fdeeea;
  color: #8c2410;
}

.told {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin: 0;
  padding: 8px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  font-weight: 500;
}

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

.told-none {
  border-color: var(--muted);
  color: var(--muted);
}

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

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

.part-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 500;
}

.stack-bar {
  display: block;
  width: 100%;
  height: 12px;
  margin-bottom: 8px;
}

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

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

.own-text .quote {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.part-line {
  margin: 4px 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* Is it done?: Mark it done, a topic's rounds, a round. Rust is reopened. */
.chip .icon {
  width: 15px;
  height: 15px;
}

.chip-tight {
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.chip-rust.chip-tight {
  color: var(--rust-ink);
}

.chip-ink {
  border-color: var(--ink);
  color: var(--ink);
}

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

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

.card-quiet {
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.72);
}

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

.btn.btn-on {
  background: #ecebe7;
}

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

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

.rule-line {
  margin: 0;
  font-size: 14.5px;
}

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

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

.told-pending {
  border-style: dashed;
  border-color: var(--muted);
  color: var(--ink-2);
}

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

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

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

.outcome .chip {
  padding: 5px 14px;
  font-weight: 500;
}

.outcome-reopened .chip-rust {
  color: var(--rust-ink);
}

.outcome-said {
  color: var(--ink-2);
}

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

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

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

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

.facts dt {
  color: var(--muted);
  font-size: 13.5px;
}

.facts dd {
  margin: 0;
  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: 12px;
}

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

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

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

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

.locked .icon {
  width: 18px;
  height: 18px;
  color: var(--rust);
}

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

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

.tile-n {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

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

.tile-label {
  font-size: 13.5px;
  color: var(--muted);
}

.goes-to {
  margin: 0;
  font-size: 17px;
  color: var(--ink-2);
}

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

.phone {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  margin: 8px auto 0;
  padding: 24px 20px 20px;
  border: 1px solid #dcdad4;
  border-radius: 30px;
  background: #fbfaf7;
  box-shadow: inset 0 0 0 6px #ffffff, 0 6px 18px rgba(24, 28, 33, 0.08);
}

.phone p {
  margin: 0;
}

.phone-from {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.phone-title {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.phone-lead {
  font-size: 16px;
}

.phone-line {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

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

.phone-own-part {
  padding: 10px 12px;
  border: 1px dashed #d8d6d0;
  border-radius: 12px;
}

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

.phone-fine,
.phone-foot {
  font-size: 13px;
  color: var(--muted);
}

.phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 500;
}

/* Not in this build yet. */
.later {
  padding: 44px 20px;
  text-align: center;
}

.later-text {
  margin: 0;
  font-size: 18px;
  color: var(--ink-2);
}

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

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

.auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
}

.auth-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(480px, 100%);
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.auth-card p {
  margin: 0;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-name {
  font-size: 17px;
  font-weight: 500;
}

.auth-title {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 500;
}

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

.auth-card .btn-big {
  align-self: flex-start;
}

.seat-facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 14px;
  margin: 0;
}

.seat-facts dt {
  color: var(--muted);
  font-size: 13.5px;
}

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

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

@media (max-width: 1180px) {
  .search {
    width: 260px;
  }

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

  .preview-card {
    position: static;
  }
}

/* A tablet: the deck's device. */
@media (max-width: 960px) {
  .shell {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .rail {
    padding: 14px 6px;
  }

  .rail-item {
    width: 66px;
    font-size: 11px;
  }

  .rail-item.rail-on::before {
    left: -6px;
  }

  .topbar {
    padding: 12px 18px;
  }

  .topbar-gap {
    display: none;
  }

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

  .main {
    padding: 4px 18px 36px;
  }

  .title {
    font-size: 26px;
  }

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

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

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

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

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

  .holder {
    max-width: 120px;
  }
}

/* A phone, should one open it: the rail becomes a strip. */
@media (max-width: 640px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: sticky;
    top: 0;
    z-index: 12;
    height: auto;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
  }

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

  .rail-item.rail-on::before {
    display: none;
  }

  .topbar {
    position: static;
  }

  .holder {
    display: none;
  }

  .row {
    flex-wrap: wrap;
  }

  .row-fig {
    max-width: 100%;
    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: 20px 16px 16px;
  }
}
