/* Reusable components (docs/DESIGN.md section 4). Later phases add the room board, attendance switch, child switcher,
   contact buttons and panels here. */

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--chip); border: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft);
}
.kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--g); }

.page-title { margin: 8px 0 0; font-size: clamp(28px, 4vw, 32px); font-weight: 600; line-height: 1.2; }

.card {
  background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 24px; animation: var(--rise);
}
.card h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
/* Card paragraphs are soft; the more specific rules keep their own colour (error red, hint grey) over this. */
.card p { margin: 0; color: var(--soft); }

.hero {
  background: var(--hero); color: var(--on-hero); border-radius: var(--r-card); box-shadow: var(--shadow-hero);
  padding: 24px; animation: var(--rise);
}
.hero p { margin: 0; }
.hero .figure { font-size: 40px; font-weight: 700; line-height: 1.1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  font: 600 14px var(--font); cursor: pointer;
}
.btn-primary { background: var(--g); border-color: var(--g); color: var(--on-g); }
.btn-round { width: 44px; padding: 0; }
.btn svg { width: 20px; height: 20px; }

.tag, .lang { padding: 2px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 500; }
.tag { display: inline-flex; align-items: center; gap: 6px; }
.tag-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag-warn { background: var(--warn-bg); color: var(--warn-fg); }
.tag-due { background: var(--due-bg); color: var(--due-fg); }

.lang-blue { background: var(--lang-blue-bg); color: var(--lang-blue-fg); }
.lang-amber { background: var(--lang-amber-bg); color: var(--lang-amber-fg); }
.lang-green { background: var(--lang-green-bg); color: var(--lang-green-fg); }
.lang-violet { background: var(--lang-violet-bg); color: var(--lang-violet-fg); }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

/* Sign-in screens (phase 1A): centred card, labelled fields, two-way switch, error line. */
.auth { width: 100%; max-width: 440px; margin: 0 auto; display: grid; gap: 16px; }
.auth .kicker { justify-self: start; }
.auth-title { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.25; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-strip);
  border: 1px solid var(--field-line); background: var(--paper); color: var(--ink); font: 400 16px var(--font); /* 16px: iOS does not zoom */
}
.field textarea { padding: 10px 14px; resize: vertical; line-height: 1.4; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { border-color: var(--g); }
.field [aria-invalid="true"] { border-color: var(--due-fg); }
.field-error { margin: 0; color: var(--due-fg); font-size: 13px; font-weight: 500; }
.field-error:empty { display: none; }
.field input.code-input { font-size: 20px; letter-spacing: .2em; }
.hint, .note, .card .hint, .card .note { margin: 0; color: var(--soft); font-size: 13px; }
.form-error, .card .form-error { margin: 0; padding: 10px 14px; border-radius: var(--r-strip); background: var(--due-bg); color: var(--due-fg); font-weight: 500; }
.form-error:empty { display: none; }
.form-error::before { content: '⚠ ' / ''; }
.btn-wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.link { color: var(--g); font-weight: 500; text-underline-offset: 3px; justify-self: start; min-height: 44px; display: inline-flex; align-items: center; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--track); }
.seg-btn {
  min-height: 44px; border: 1px solid transparent; border-radius: var(--r-pill); background: transparent; color: var(--soft);
  font: 600 13px var(--font); cursor: pointer; padding: 0 10px;
}
/* Selected: a border and a tick as well as the paper background, so it does not rely on colour alone. */
.seg-btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--field-line); }
.seg-btn[aria-pressed="true"]::before { content: '✓ ' / ''; }
.steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.secret {
  display: block; margin: 8px 0 4px; padding: 10px 14px; border-radius: var(--r-strip); background: var(--strip);
  font: 600 16px var(--mono); letter-spacing: .08em; word-break: break-all;
}
.recovery { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.recovery code { display: block; padding: 8px 10px; border-radius: var(--r-strip); background: var(--strip); font: 500 14px var(--mono); text-align: center; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check input { flex: none; width: 22px; height: 22px; accent-color: var(--g); }
.banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-radius: var(--r-strip); background: var(--warn-bg); color: var(--warn-fg); font-weight: 500;
}
.banner::before { content: '● ' / ''; }
.user-box { display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 500; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 600px) { .user-name { display: none; } }

/* Sot and Klasat screens (read-only). Language colours come from the --lang-* tokens; no raw colours here. */
.lang-neutral { background: var(--strip); color: var(--soft); border: 1px solid var(--line); }
.tag-plain { background: var(--strip); color: var(--soft); border: 1px solid var(--line); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.section-title { margin: 0; font-size: 18px; font-weight: 600; }
.btn-self { justify-self: start; text-decoration: none; }
.stack { display: grid; gap: 20px; }
a.card, a.btn { text-decoration: none; color: inherit; }
a.card { display: grid; gap: 6px; align-content: start; }
a.btn-primary { color: var(--on-g); }
a.card:focus-visible { outline-offset: 3px; }

.stats { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-hero { display: flex; align-items: center; }
.stat-hero .figure { font-size: 32px; }
.stat p { font-size: 13px; }
.stat-figure { font-size: 36px; font-weight: 300; line-height: 1.2; color: var(--ink); }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stat-hero { grid-column: 1 / -1; } }
@media (max-width: 480px) { .stats { gap: 12px; } .stat { padding: 16px; } .stat-figure { font-size: 28px; } }

/* Room board: rooms down, 08:00-21:00 across (13 hours). Scrolls sideways inside its card. */
.board-scroll { overflow-x: auto; margin: 12px -8px 0; padding: 0 8px 8px; }
.board { min-width: 1100px; }
.board-row { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: stretch; border-top: 1px solid var(--line); }
.board-head { border-top: 0; }
.board-label { display: flex; align-items: center; font-weight: 600; padding-right: 8px; position: sticky; left: 0; background: var(--paper); z-index: 2; }
.board-track {
  position: relative;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: calc(100% / 13) 100%;
}
.board-track-head { height: 32px; background-image: none; }
.board-hour { position: absolute; top: 6px; transform: translateX(-50%); font-size: 12px; color: var(--soft); }
.board-hour.first { transform: none; }
.board-hour.last { transform: translateX(-100%); }
.board-block {
  position: absolute; height: 60px; padding: 6px 10px; border-radius: var(--r-strip); overflow: hidden;
  display: grid; align-content: center; font-size: 12px; line-height: 1.3; text-decoration: none; border: 2px solid transparent;
}
.board-block > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-block.is-cancelled { border: 2px dashed currentColor; opacity: .85; }
.board-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--g); z-index: 1; pointer-events: none; }
.board-now-chip {
  position: absolute; top: 4px; transform: translateX(-50%); z-index: 3; padding: 1px 8px; border-radius: var(--r-pill);
  background: var(--g); color: var(--on-g); font-size: 11px; font-weight: 600;
}
.board-hint { margin-top: 8px; }
@media (min-width: 901px) { .board-hint { display: none; } }

/* Lists of lessons and sessions. */
.rows { list-style: none; margin: 8px 0 0; padding: 0; display: grid; }
.rows li + li { border-top: 1px solid var(--line); }
.row-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; color: inherit; text-decoration: none; }
.row-time { flex: none; width: 52px; font-weight: 600; }
.row-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.row-title { font-weight: 600; color: var(--ink); }
.row-sub { color: var(--soft); font-size: 13px; }

/* Cards for a lesson or a class: a language-coloured edge on the left. */
.lesson-card, .class-card { border-left: 6px solid var(--line); }
.lang-edge-blue { border-left-color: var(--lang-blue-fg); }
.lang-edge-amber { border-left-color: var(--lang-amber-fg); }
.lang-edge-green { border-left-color: var(--lang-green-fg); }
.lang-edge-violet { border-left-color: var(--lang-violet-fg); }
.lesson-card .label, .lesson-hero .label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.lesson-hero .label { color: var(--on-hero); opacity: .85; }
.lesson-time { font-size: 22px; font-weight: 600; color: var(--ink); }
.lesson-card h2, .class-card h2 { margin: 0; }
.lesson-card .tag, .class-card .tag { justify-self: start; }
.lesson-hero { display: grid; gap: 8px; }
.lesson-hero .figure { font-size: 28px; }
.hero-tag .tag { background: var(--paper); color: var(--ink); }
.class-count { font-weight: 600; color: var(--ink); }

/* Child switcher: one segment per child. */
.seg-flex { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); overflow-x: auto; }
.seg-btn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Class detail. */
.facts { display: grid; gap: 12px; margin: 16px 0 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.fact dt { font-size: 12px; color: var(--soft); }
.fact dd { margin: 0; font-weight: 500; }
.table-wrap { overflow-x: auto; margin-top: 8px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 500; color: var(--soft); padding: 8px 12px 8px 0; }
.table td { padding: 10px 12px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; }

/* ---- Attendance, homework and contact (phase 2). Colours only from tokens. ---- */
[hidden] { display: none !important; }
.card-head { justify-content: space-between; }
.label-like { font-weight: 500; }

/* The bar at the bottom of a task screen (save attendance, send homework); the page keeps room for it. */
.main.has-bar { padding-bottom: 112px; }
.bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10; margin: 0 auto; max-width: 720px;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 18px;
  background: var(--bar); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-radius: var(--r-bar); box-shadow: var(--shadow);
}
.bar .btn { min-height: 48px; padding: 0 24px; }
.att-bar-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.att-summary { margin: 0; font-size: 13px; color: var(--soft); }
.att-status { margin: 0; font-weight: 600; color: var(--ok-fg); }
.att-status:empty { display: none; }
.att-bar .form-error { padding: 6px 10px; font-size: 13px; }
.hw-bar { padding: 10px; }
.hw-bar .btn { flex: 1; }

/* Lesson header: tinted with the language colour. */
.att-head { display: grid; gap: 12px; padding: 20px; border-radius: var(--r-card); box-shadow: var(--shadow); animation: var(--rise); }
.att-head-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.att-title { margin: 8px 0 0; font-size: 24px; font-weight: 600; line-height: 1.25; }
.att-meta { margin: 4px 0 0; }
.att-teacher { font-size: 13px; font-weight: 500; }
.att-head .field label { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.att-topic-read { margin: 0; font-weight: 500; }
.session-top { justify-content: space-between; }

/* The four-way switch: P V A M. The selected segment is filled with its --att-* colour; the letter stays. */
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.att-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px;
  background: var(--paper); border-radius: var(--r-tile); box-shadow: var(--shadow); padding: 4px 6px 4px 8px;
}
.att-name {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--ink);
  font: 500 15px/1.25 var(--font); text-align: left; cursor: pointer; border-radius: var(--r-strip);
}
.att-name-text { overflow-wrap: anywhere; }
.att-note-flag { color: var(--soft); }
.att-who { display: grid; padding: 8px 6px; min-width: 0; }
.att-switch { display: flex; padding: 2px; border-radius: var(--r-pill); background: var(--track); }
.att-btn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--soft);
  font: 600 15px var(--font); cursor: pointer;
}
.att-btn[aria-checked="true"] { font-weight: 700; box-shadow: 0 0 0 2px var(--paper); }
.att-btn.att-p[aria-checked="true"] { background: var(--att-p-bg); color: var(--att-p-fg); }
.att-btn.att-v[aria-checked="true"] { background: var(--att-v-bg); color: var(--att-v-fg); }
.att-btn.att-a[aria-checked="true"] { background: var(--att-a-bg); color: var(--att-a-fg); }
.att-btn.att-m[aria-checked="true"] { background: var(--att-m-bg); color: var(--att-m-fg); }
.att-more { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 6px 8px; }
.att-note {
  flex: 1; min-width: 160px; min-height: 44px; padding: 0 14px; border-radius: var(--r-strip);
  border: 1px solid var(--field-line); background: var(--paper); color: var(--ink); font: 400 16px var(--font);
}
@media (max-width: 340px) { .att-row { grid-template-columns: 1fr; } .att-switch { justify-self: end; } }

/* Fields beyond text inputs. */
.field textarea, .field select {
  min-height: 44px; padding: 10px 14px; border-radius: var(--r-strip); width: 100%;
  border: 1px solid var(--field-line); background: var(--paper); color: var(--ink); font: 400 16px var(--font);
}
.field textarea { resize: vertical; }
.field input[type="date"] { max-width: 100%; }
.hw-form { display: grid; gap: 20px; }
.hw-text { font-weight: 500; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Quick picks (due date) and minutes. */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 4px 18px;
  border-radius: var(--r-pill); border: 1px solid var(--field-line); background: var(--paper); color: var(--ink);
  font: 600 14px/1.2 var(--font); cursor: pointer;
}
.chip-sub { font-size: 11px; font-weight: 400; opacity: .85; }
.chip[aria-pressed="true"] { background: var(--g); border-color: var(--g); color: var(--on-g); }
.chip:disabled { opacity: .55; cursor: default; }

/* Files. */
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.file-list:empty { display: none; }
.file-row, .file-chip {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 8px; border-radius: var(--r-tile);
  background: var(--strip); color: var(--ink); text-decoration: none; min-width: 0;
}
.file-row .file-x { margin-left: auto; flex: none; }
.file-info { display: grid; min-width: 0; flex: 1; }
.file-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 12px; color: var(--soft); }
.file-down { flex: none; width: 44px; text-align: center; font-size: 18px; color: var(--g); }
.file-badge {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-strip);
  font-size: 11px; font-weight: 700; background: var(--strip); color: var(--soft); border: 1px solid var(--line);
}
.file-pdf { background: var(--due-bg); color: var(--due-fg); border-color: transparent; }
.file-doc { background: var(--lang-blue-bg); color: var(--lang-blue-fg); border-color: transparent; }
.file-img { background: var(--ok-bg); color: var(--ok-fg); border-color: transparent; }
.file-aud { background: var(--vb-bg); color: var(--vb-fg); border-color: transparent; }
.file-add { border-style: dashed; border-color: var(--field-line); color: var(--g); flex: 1; }
.file-chips { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; }
.file-chips .file-chip { flex: 1 1 200px; }
.hw-family { flex-wrap: wrap; }

/* Contact buttons and panel. */
.contact-btns { display: flex; gap: 8px; flex: none; }
.contact-btn {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--r-pill);
  font: 700 13px var(--font); text-decoration: none;
}
.contact-words { padding: 0 18px; font-size: 14px; }
.contact-wa { background: var(--ok-bg); color: var(--ok-fg); }
.contact-vb { background: var(--vb-bg); color: var(--vb-fg); }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 56px; padding: 6px 0; }
.contact-row + .contact-row, .contact-list > * + * { border-top: 1px solid var(--line); }
.contact-who { display: grid; min-width: 0; flex: 1 1 140px; }
.contact-open { color: var(--g); }
.alert-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; min-height: 56px; }

/* Dialogs: a centred card, and on a phone the contact panel rises from the bottom. */
dialog.modal {
  padding: 0; border: 0; background: var(--paper); color: var(--ink); border-radius: var(--r-card); box-shadow: var(--shadow);
  width: min(92vw, 460px); max-height: 90vh; max-height: 90dvh; overflow: auto;
}
dialog.modal::backdrop { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.modal-body { padding: 24px; display: grid; gap: 16px; }
.modal-title { margin: 0; font-size: 20px; font-weight: 600; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-grip { display: none; width: 40px; height: 4px; border-radius: var(--r-pill); background: var(--line); justify-self: center; }
.contact-list { display: grid; }
@media (max-width: 600px) {
  dialog.sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--r-card) var(--r-card) 0 0; }
  .sheet-grip { display: block; }
}

/* Teacher attendance buttons on the staff Sot. */
.lesson-item .tatt { padding: 0 0 12px 64px; display: grid; gap: 6px; }
.tatt-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.tatt-btn {
  min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--paper);
  color: var(--ink); font: 600 14px var(--font); cursor: pointer;
}
.tatt-btn[aria-pressed="true"] { border-color: transparent; }
.tatt-btn:nth-child(1)[aria-pressed="true"] { background: var(--ok-bg); color: var(--ok-fg); }
.tatt-btn:nth-child(2)[aria-pressed="true"] { background: var(--warn-bg); color: var(--warn-fg); }
.tatt-btn:nth-child(3)[aria-pressed="true"] { background: var(--due-bg); color: var(--due-fg); }
.tatt-btn[aria-pressed="true"]::before { content: '● ' / ''; }
@media (max-width: 480px) { .lesson-item .tatt { padding-left: 0; } }

/* Attendance meter on the family Sot. */
.meter { height: 8px; margin: 8px 0 12px; border-radius: var(--r-pill); background: var(--track); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--g); }

/* Demo sign-in card (demo deployment only): one big button per account. */
.demo-card { display: grid; gap: 10px; padding: 14px; border-radius: var(--r-strip); border: 1px dashed var(--g); }
.demo-card[hidden], .demo-card [hidden] { display: none; }
.demo-title { margin: 0; font-size: 18px; font-weight: 600; }
.demo-btn { display: grid; justify-content: stretch; justify-items: start; gap: 2px; width: 100%; min-height: 56px; padding: 8px 16px; border-radius: var(--r-strip); text-align: left; }
.demo-role { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.demo-name { font-size: 16px; }
.demo-email { font-size: 12px; font-weight: 400; color: var(--soft); overflow-wrap: anywhere; }

/* Settings, list editor, audit log (phase 1B). Tabs scroll sideways inside their own strip on a phone. */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -2px; scrollbar-width: thin; }
.tab { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); background: var(--paper); color: var(--soft); font-weight: 600; text-decoration: none; box-shadow: var(--shadow); }
.tab[aria-current="page"] { background: var(--g-soft); color: var(--ink); }
.settings-form { max-width: 640px; }
.field-fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; min-width: 0; }
.field-fieldset legend { padding: 0; font-weight: 500; margin-bottom: 4px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 0 12px; }
.colour-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.field input.colour-pick { width: 56px; min-width: 56px; padding: 4px; cursor: pointer; }
.field input.colour-hex { width: 9em; font-family: var(--mono); }
.colour-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--r-strip); background: var(--g); color: var(--on-g); font-weight: 600; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.save-status { margin: 0; color: var(--ok-fg); font-weight: 600; }
.save-status:empty { display: none; }
.stale-box { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.list-card { display: grid; gap: 12px; }
.list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.list-head .section-title { margin: 0; }
.list-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: var(--r-strip); background: var(--strip); }
.list-item-main { flex: 1 1 160px; min-width: 0; display: grid; gap: 4px; }
.list-item-name { font-weight: 600; overflow-wrap: anywhere; }
.list-item-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--soft); font-size: 13px; }
.list-item-actions { display: flex; gap: 8px; }
.year-switch { display: inline-flex; align-items: center; gap: 8px; }
.year-switch .year { min-width: 3.5em; text-align: center; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.filters .field { flex: 1 1 150px; min-width: 0; }
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.audit-row { display: grid; gap: 6px; }
.audit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--soft); font-size: 13px; }
.audit-time { font-weight: 600; color: var(--ink); }
.audit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; overflow-wrap: anywhere; }
.audit-diff { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 13px; overflow-wrap: anywhere; }
.audit-diff li { color: var(--ink); }
