/*
 * Content Engine — operator UI design system (SESSION_17).
 *
 * A calm, editorial legal/fintech aesthetic: a serif wordmark/headings for gravitas, a refined
 * slate/navy palette, a single muted-teal accent, and the publish-state colour tokens centralized
 * here (previously inline in review/templates/review/calendar.html). Everything is hand-authored
 * (no npm/Tailwind). Colours meet WCAG AA contrast on their stated surfaces and every interactive
 * element has a visible :focus-visible ring.
 *
 * Later UI sessions (18–23) extend the components below; they should reuse these tokens rather than
 * introduce new inline colours.
 */

/* ----------------------------------------------------------------------------------------------- */
/* Design tokens                                                                                    */
/* ----------------------------------------------------------------------------------------------- */
:root {
  /* Neutrals — deep navy ink on a warm-cool off-white. */
  --ink: #0f1b2d;          /* primary text / wordmark            */
  --ink-soft: #33425a;     /* secondary text                     */
  --muted: #64748b;        /* tertiary / meta text               */
  --line: #e2e8f0;         /* hairline borders                   */
  --line-strong: #cbd5e1;
  --bg: #f4f6f9;           /* page background                    */
  --surface: #ffffff;      /* cards / panels                     */
  --surface-sunken: #f8fafc;

  /* Brand accent — a single restrained deep teal (distinct from status-approved blue). */
  --accent: #0f6e72;
  --accent-strong: #0b5559;
  --accent-soft: #e2f1f1;
  --accent-bright: #2dd4bf;   /* teal that reads on the dark sidebar */
  --on-accent: #ffffff;

  /* Sidebar (dark navy rail). */
  --sidebar-bg: #0b1524;
  --sidebar-ink: #c4cfdf;
  --sidebar-ink-dim: #7d8da6;

  /* Publish-state tokens (canonical home; mirror content.state.PublishState). */
  --state-draft: #94a3b8;
  --state-awaiting_review: #d97706;
  --state-approved: #2563eb;
  --state-scheduled: #7c3aed;
  --state-published: #16a34a;
  --state-rejected: #dc2626;
  --state-failed: #b91c1c;

  /* Typography. Serif display for character without a web-font network dependency. */
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-body: ui-sans-serif, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", "Consolas", monospace;

  /* Spacing scale (4px base). */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;   --sp-8: 3rem;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15, 27, 45, 0.05), 0 1px 3px rgba(15, 27, 45, 0.04);
  --shadow-md: 0 6px 24px rgba(15, 27, 45, 0.09);
  --shadow-lg: 0 18px 48px rgba(15, 27, 45, 0.14);
  --ring: 0 0 0 3px rgba(15, 110, 114, 0.30);
}

/* ----------------------------------------------------------------------------------------------- */
/* Base                                                                                             */
/* ----------------------------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); font-weight: 600; line-height: 1.2; }
h1 { font-size: 1.65rem; margin: 0 0 var(--sp-2); letter-spacing: -0.01em; }
h2 { font-size: 1.2rem; margin: 0 0 var(--sp-3); }
h3 { font-size: 1rem; margin: 0 0 var(--sp-2); }

a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

p { margin: 0 0 var(--sp-3); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }

.muted { color: var(--muted); }
.small { font-size: 0.8rem; }

/* ----------------------------------------------------------------------------------------------- */
/* App shell: sidebar rail + content column                                                          */
/* ----------------------------------------------------------------------------------------------- */

/* Line-icon base — sized inline, coloured by currentColor via the enclosing link. */
.ico {
  width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.nav-toggle-cb { position: absolute; width: 0; height: 0; opacity: 0; }

.layout { display: flex; align-items: stretch; min-height: 100vh; }
.layout--plain { display: block; }

/* The dark navy rail. */
.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh; width: 256px; flex: none;
  display: flex; flex-direction: column;
  padding: var(--sp-4) var(--sp-3);
  background: var(--sidebar-bg); color: var(--sidebar-ink);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 50;
}

.side-brand {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3) var(--sp-5);
  font-family: var(--font-display); font-size: 1.12rem; font-weight: 600;
  color: #fff; letter-spacing: 0.01em;
}
.side-brand:hover { text-decoration: none; }
.side-brand-mark { width: 22px; height: 22px; fill: var(--accent-bright); stroke: none; }

.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; min-height: 0; }
.side-link {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  color: var(--sidebar-ink); font-size: 0.9rem; font-weight: 500;
  transition: background 120ms ease, color 120ms ease;
}
.side-link .ico { width: 18px; height: 18px; color: var(--sidebar-ink-dim); transition: color 120ms ease; }
.side-link:hover { background: rgba(255, 255, 255, 0.055); color: #fff; text-decoration: none; }
.side-link:hover .ico { color: var(--sidebar-ink); }
.side-link.active { background: rgba(255, 255, 255, 0.09); color: #fff; }
.side-link.active .ico { color: var(--accent-bright); }
.side-link.active::before {
  content: ""; position: absolute; left: calc(-1 * var(--sp-3)); top: 6px; bottom: 6px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-bright);
}

.side-group-label {
  margin: var(--sp-4) var(--sp-3) var(--sp-1);
  font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--sidebar-ink-dim); font-weight: 700;
}

.side-foot { border-top: 1px solid rgba(255, 255, 255, 0.08); margin-top: var(--sp-3); padding-top: var(--sp-3); }
.side-tenant { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.82rem; color: var(--sidebar-ink); margin-bottom: var(--sp-2); }
.side-tenant-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-bright); flex: none; }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.side-user-email { font-size: 0.76rem; color: var(--sidebar-ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user form { margin: 0; }
.side-logout {
  display: inline-flex; padding: 6px; cursor: pointer;
  background: transparent; color: var(--sidebar-ink-dim);
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: var(--radius-sm);
}
.side-logout .ico { width: 16px; height: 16px; }
.side-logout:hover { color: #fff; border-color: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.06); }

/* Content column. */
.main-col { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
main.app-main {
  flex: 1 0 auto; width: 100%; max-width: 1180px;
  margin: var(--sp-6) auto var(--sp-8); padding: 0 var(--sp-6);
}
/* Wide pages (the review board + calendar grids) use the full content width so all columns fit. */
main.app-main--wide { max-width: 1640px; }

/* Mobile top bar (hidden on desktop; the hamburger toggles the off-canvas rail). */
.topbar { display: none; }
.scrim { display: none; }

.page-head { margin-bottom: var(--sp-5); }
.page-head .eyebrow { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent-strong); margin-bottom: var(--sp-1); font-weight: 700; }

/* Retained for the login/auth card wordmark. */
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; }
.brand .brand-mark { color: var(--accent); font-size: 1.35rem; line-height: 0; }
.brand:hover { text-decoration: none; }

.app-footer {
  width: 100%; max-width: 1180px; margin: 0 auto; padding: var(--sp-5) var(--sp-6);
  color: var(--muted); font-size: 0.78rem;
  border-top: 1px solid var(--line);
}

/* Mobile: rail slides in over a scrim, driven by the hidden #nav-toggle checkbox (CSS-only). */
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh;
    transform: translateX(-100%); transition: transform 220ms ease; box-shadow: var(--shadow-lg);
  }
  .nav-toggle-cb:checked ~ .layout .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; z-index: 45; background: rgba(8, 15, 28, 0.5); }
  .nav-toggle-cb:checked ~ .layout .scrim { display: block; }
  .topbar {
    display: flex; align-items: center; gap: var(--sp-3);
    position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 var(--sp-4);
    background: var(--sidebar-bg); color: #fff;
  }
  .hamburger { display: inline-flex; padding: 6px; border-radius: var(--radius-sm); color: #fff; cursor: pointer; }
  .hamburger:hover { background: rgba(255, 255, 255, 0.1); }
  .topbar-brand { display: flex; align-items: center; gap: var(--sp-2); color: #fff; font-family: var(--font-display); font-weight: 600; }
  .topbar-brand:hover { text-decoration: none; }
  .topbar-brand .ico { width: 20px; height: 20px; fill: var(--accent-bright); stroke: none; }
  main.app-main { margin-top: var(--sp-5); padding: 0 var(--sp-4); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar { transition: none; }
}

/* ----------------------------------------------------------------------------------------------- */
/* Components                                                                                        */
/* ----------------------------------------------------------------------------------------------- */

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: var(--sp-4); }
.card-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }

/* Grid helpers */
.grid { display: grid; gap: var(--sp-4); }
/* Grid/flex children default to min-width:auto, which lets nowrap text refuse to shrink and blows the
   track out (breaking truncation + causing horizontal scroll). Allow every grid child to shrink. */
.grid > * { min-width: 0; }
.grid-tiles { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 820px) { .cols-2 { grid-template-columns: 1fr; } }

/* Stat tile (dashboard) */
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.tile .tile-count { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; color: var(--ink); }
.tile .tile-label { margin-top: var(--sp-2); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.tile.accent { border-left-color: var(--accent); }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: 999px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  background: var(--surface-sunken); color: var(--ink-soft);
  border: 1px solid var(--line);
}
.badge.solid { color: #fff; border-color: transparent; }
/* Business-line (stream) and origin badges — distinct, calm tints so the operator can tell an
   ebook-derived Studio piece from an ad-hoc reflection, and which business line it belongs to. */
.badge-stream { background: #eef1f7; color: #55608a; border-color: #e0e4f0; }
.badge-origin { background: #fbf4ec; color: #8a6a45; border-color: #f0e5d5; }

/* State badge / dot — driven by the --state-* tokens. */
.state-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--state-draft); }
.badge-state { border-color: transparent; color: #fff; }
.state-draft           { --s: var(--state-draft); }
.state-awaiting_review { --s: var(--state-awaiting_review); }
.state-approved        { --s: var(--state-approved); }
.state-scheduled       { --s: var(--state-scheduled); }
.state-published       { --s: var(--state-published); }
.state-rejected        { --s: var(--state-rejected); }
.state-failed          { --s: var(--state-failed); }
.badge-state.state-draft, .badge-state.state-awaiting_review, .badge-state.state-approved,
.badge-state.state-scheduled, .badge-state.state-published, .badge-state.state-rejected,
.badge-state.state-failed { background: var(--s); }
.state-dot.state-draft, .state-dot.state-awaiting_review, .state-dot.state-approved,
.state-dot.state-scheduled, .state-dot.state-published, .state-dot.state-rejected,
.state-dot.state-failed { background: var(--s); }
.tile.state-draft, .tile.state-awaiting_review, .tile.state-approved, .tile.state-scheduled,
.tile.state-published, .tile.state-rejected, .tile.state-failed { border-left-color: var(--s); }

/* Content-mix balance bars (strategy view) */
.bar-track { background: var(--line, #e5e7eb); border-radius: var(--radius-sm, 4px); height: 0.6rem; overflow: hidden; }
.bar-fill { background: var(--accent, #0d9488); height: 100%; }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  cursor: pointer; transition: background 120ms ease, border-color 120ms ease, transform 60ms ease;
}
.btn:hover { background: var(--surface-sunken); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent-strong); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Table */
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th, .table td { text-align: left; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.table tbody tr:hover { background: var(--surface-sunken); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Form */
.form { display: grid; gap: var(--sp-4); }
.field { display: grid; gap: var(--sp-2); }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
/* Text-like controls fill the field; checkboxes/radios keep their natural size (else a full-width
   checkbox breaks the platform picker's checkbox↔label alignment). */
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; padding: var(--sp-3); font: inherit; color: var(--ink);
  background-color: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.form-error { color: var(--state-rejected); font-size: 0.85rem; }
.errorlist { margin: 0; padding: 0; list-style: none; color: var(--state-rejected); font-size: 0.82rem; }

/* Messages (Django contrib.messages) */
.messages { list-style: none; margin: 0 0 var(--sp-5); padding: 0; display: grid; gap: var(--sp-2); }
.messages li {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
}
.messages li.success { border-left: 4px solid var(--state-published); }
.messages li.error   { border-left: 4px solid var(--state-rejected); }
.messages li.warning { border-left: 4px solid var(--state-awaiting_review); }
.messages li.info    { border-left: 4px solid var(--accent); }

/* Auth (login) — a single elegant centered card on a calm field. */
.auth-wrap { min-height: 82vh; display: grid; place-items: center; padding: var(--sp-6); }
.auth-card { width: 100%; max-width: 400px; padding: var(--sp-6); box-shadow: var(--shadow-md); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: var(--sp-2); font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; color: var(--ink); }
.auth-brand-mark { width: 24px; height: 24px; fill: var(--accent); stroke: none; }
.auth-title { text-align: center; margin: var(--sp-4) 0 var(--sp-1); font-size: 1.5rem; }
.auth-sub { text-align: center; margin-bottom: var(--sp-5); font-size: 0.9rem; }

/* Empty state */
.empty { color: var(--muted); font-style: italic; padding: var(--sp-3) 0; }

/* ----------------------------------------------------------------------------------------------- */
/* Review inbox & card (SESSION_18) — re-homed onto the shell; status colours come from the          */
/* canonical --state-* tokens above (no inline colours).                                             */
/* ----------------------------------------------------------------------------------------------- */

/* Filter bar */
.filters { display: flex; flex-wrap: wrap; gap: var(--sp-4); align-items: end; margin-bottom: var(--sp-5); }
.filters .field { gap: var(--sp-1); }

/* Review toolbar: a segmented view switch + inline filters. */
.review-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.seg-item { padding: var(--sp-1) var(--sp-4); border-radius: calc(var(--radius-sm) - 3px); color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.seg-item:hover { color: var(--ink); text-decoration: none; }
.seg-item.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.review-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.review-filters select {
  padding: var(--sp-2) 2.25rem var(--sp-2) var(--sp-3); font: inherit; font-size: 0.86rem; color: var(--ink-soft);
  background-color: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.review-filters select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

/* Status board — one column per publish state, calm scannable cards. */
.board { display: flex; gap: var(--sp-3); overflow-x: auto; align-items: flex-start; padding-bottom: var(--sp-3); }
.board-col { flex: 1 1 0; min-width: 224px; }
.board-focused { overflow-x: visible; }
.board-focused .board-col { flex: 0 1 700px; min-width: 300px; }
.board-col-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); padding: 0 var(--sp-1); }
.board-col-name { font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.count-pill-quiet { background: var(--surface-sunken); color: var(--muted); border: 1px solid var(--line); min-width: 1.4rem; height: 1.4rem; }
.board-col-body { display: flex; flex-direction: column; gap: var(--sp-3); }

.board-card {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--s, var(--state-draft));
  border-radius: var(--radius); padding: var(--sp-4);
  box-shadow: var(--shadow-sm); transition: box-shadow 120ms ease;
}
.board-card:hover { box-shadow: var(--shadow-md); }
.board-card-title {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--ink); font-weight: 600; line-height: 1.35;
}
.board-card-title:hover { color: var(--accent-strong); text-decoration: none; }
.board-card-excerpt {
  margin: var(--sp-2) 0 0; font-size: 0.85rem; line-height: 1.55; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 6; line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden;
}
.board-meta { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-top: var(--sp-3); }
.board-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.board-select { display: inline-flex; gap: var(--sp-1); align-items: center; font-size: 0.78rem; color: var(--muted); cursor: pointer; }
.board-empty { color: var(--muted); font-size: 0.82rem; font-style: italic; padding: var(--sp-4); text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }
.bulk-bar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-5); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
/* On phones the kanban stacks vertically (each status a full-width section) instead of scrolling sideways. */
@media (max-width: 700px) {
  .board { flex-direction: column; overflow-x: visible; }
  .board-col, .board-focused .board-col { width: 100%; min-width: 0; flex: none; }
}

/* Column visibility toggle (CSS-only): default hides the terminal/low-signal columns for width. */
.show-all-cb { position: absolute; width: 0; height: 0; opacity: 0; }
.review-bar-r { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.pill-toggle {
  display: inline-flex; align-items: center; cursor: pointer;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-soft); font-size: 0.86rem; font-weight: 600; white-space: nowrap;
}
.pill-toggle:hover { background: var(--surface-sunken); }
.when-expanded { display: none; }
.show-all-cb:checked ~ .review-bar .pill-toggle { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.show-all-cb:checked ~ .review-bar .pill-toggle .when-collapsed { display: none; }
.show-all-cb:checked ~ .review-bar .pill-toggle .when-expanded { display: inline; }
/* Terminal columns hidden by default; the toggle reveals them. A single-status filter always shows
   its column (board-focused never carries the secondary class). */
.board-col--secondary { display: none; }
.show-all-cb:checked ~ form .board-col--secondary { display: block; }

/* Compliance badge (board/list) — colour-coded verdict so it reads at a glance, distinct from the
   neutral platform badge next to it. */
.badge.compliance-passed  { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge.compliance-failed  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge.compliance-unknown { background: var(--surface-sunken); color: var(--muted); }

/* Compliance verdict banner on the card — must be unmissable (green PASS / red FAIL). */
.compliance-banner {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm);
  color: #fff; font-weight: 700; letter-spacing: 0.02em;
}
.compliance-banner.pass { background: var(--state-published); }
.compliance-banner.fail { background: var(--state-rejected); }
.violation { color: var(--state-rejected); }

/* Provenance verified / unverified atom flags. */
.verified   { color: var(--state-published); font-weight: 600; }
.unverified { color: var(--state-awaiting_review); font-weight: 600; }

/* Action alert (the 4xx UI-edge error surface — publish invariant held, INV-4). */
.alert {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm); margin-bottom: var(--sp-5);
}
.alert-error { border-left: 4px solid var(--state-rejected); }
.alert-success { border-left: 4px solid var(--state-published); }

/* Content calendar (SESSION_20): month/week grids over the renderings, placed by scheduled due-date
   (falling back to creation date), color-coded by publish state via the --state-* tokens. */
.cal-toolbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: var(--sp-3); margin-bottom: var(--sp-4);
}
/* Calendar view-switch: identical to the board's .seg segmented control (one visual language). */
.cal-views {
  display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.cal-view {
  padding: var(--sp-1) var(--sp-4); border-radius: calc(var(--radius-sm) - 3px);
  color: var(--muted); font-weight: 600; font-size: 0.85rem;
}
.cal-view:hover { color: var(--ink); text-decoration: none; }
.cal-view.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.cal-nav { display: inline-flex; gap: var(--sp-2); align-items: center; }
.cal-period { font-weight: 600; min-width: 11rem; text-align: center; }

.cal {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.cal-weekdays, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.cal-weekday {
  background: var(--surface-sunken); padding: var(--sp-2); text-align: center;
  font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.cal-day {
  background: var(--surface); min-height: 7rem; padding: var(--sp-2);
  display: flex; flex-direction: column; gap: var(--sp-1);
}
.cal-day-out { background: var(--surface-sunken); }
.cal-day-out .cal-daynum { color: var(--line); }
.cal-day-today { box-shadow: inset 0 0 0 2px var(--state-approved); }
.cal-daynum { font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.cal-day-today .cal-daynum { color: var(--state-approved); }
.cal-event {
  display: flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-1);
  border-radius: var(--radius-sm); border-left: 3px solid var(--s, var(--state-draft));
  background: var(--surface-sunken); color: var(--ink); font-size: 0.74rem; overflow: hidden;
}
.cal-event:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.cal-event-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-sched { margin-left: auto; flex: none; }
.cal-week-view .cal-day { min-height: 14rem; }

/* Content Studio (SESSION_19): compose form + generated-rendering result list. */
.field-legend { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.atom-picker { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-3); display: grid; gap: var(--sp-2); max-height: 16rem; overflow-y: auto; }
.atom-option { display: flex; gap: var(--sp-2); align-items: baseline; }
.rendering-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-4); }
.rendering-list .card { margin: 0; }

/* Inline action forms (approve / decline / regenerate row). */
.action-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.action-row form { margin: 0; display: flex; gap: var(--sp-2); align-items: center; }
.btn-danger { border-color: var(--state-rejected); color: var(--state-rejected); }
.btn-danger:hover { background: #fef2f2; }

/* Platform-true post previews. The colours below are the FB/IG *brand* palettes (deliberately not the
   app's design tokens) so the operator sees an accurate dry run of how the post will look in-feed. */
.preview { font-family: Helvetica, Arial, sans-serif; border-radius: 8px; }
.preview-head { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3); }
.preview-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.preview-body { padding: 0 var(--sp-3) var(--sp-3); white-space: pre-wrap; }

.preview-fb { max-width: 480px; border: 1px solid #dddfe2; color: #050505; }
.preview-fb .preview-avatar { background: #1877f2; }
.preview-fb .preview-name { font-weight: 600; color: #050505; }
.preview-fb .preview-sub { font-size: 0.72rem; color: #65676b; }
.preview-fb .preview-media { background: #f0f2f5; padding: var(--sp-5); text-align: center; color: #65676b; }
.preview-fb .preview-cta { padding: var(--sp-3); font-weight: 600; color: #1877f2; }
.preview-fb .preview-link { padding: 0 var(--sp-3) var(--sp-3); font-size: 0.72rem; color: #65676b; }

.preview-ig { max-width: 400px; border: 1px solid #dbdbdb; color: #262626; }
.preview-ig .preview-avatar { width: 32px; height: 32px; background: linear-gradient(45deg, #f09433, #bc1888); }
.preview-ig .preview-name { font-weight: 600; color: #262626; }
.preview-ig .preview-square {
  width: 100%; aspect-ratio: 1 / 1; background: #fafafa;
  display: flex; align-items: center; justify-content: center; color: #8e8e8e;
  border-top: 1px solid #efefef; border-bottom: 1px solid #efefef;
}

/* Library + Voice & Compliance control plane (SESSION_21). */
.badge.verified { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge.unverified { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge.sensitivity-low { background: var(--surface-sunken); color: var(--ink-soft); }
.badge.sensitivity-med { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.badge.sensitivity-high { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.lib-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.lib-list li { padding-bottom: var(--sp-2); border-bottom: 1px solid var(--line); }
.lib-list li:last-child { border-bottom: 0; }
.atom-table td { vertical-align: top; }

.config-group .config-family + .config-family { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.config-family-head { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-2); }
textarea.mono { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 0.82rem; }

/* Read-only display of an active config record's fields (so the operator can *see* the content). */
.config-fields { display: grid; grid-template-columns: 10rem 1fr; gap: var(--sp-1) var(--sp-3); margin: var(--sp-2) 0; }
.config-fields dt { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); }
.config-fields dd { margin: 0; min-width: 0; color: var(--ink); }
.config-fields pre {
  margin: 0; padding: var(--sp-2) var(--sp-3); background: var(--surface-sunken);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 0.78rem; white-space: pre-wrap; word-break: break-word; max-height: 14rem; overflow: auto;
}
@media (max-width: 640px) { .config-fields { grid-template-columns: 1fr; } }
.config-history { margin-top: var(--sp-3); }
.config-history summary { cursor: pointer; }

/* Onboarding / ingestion wizard (SESSION_22). */
.wizard-steps {
  list-style: none; padding: 0; margin: 0 0 var(--sp-4);
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
}
.wizard-steps li {
  display: flex; align-items: center; gap: var(--sp-2);
  color: var(--ink-soft); font-weight: 600;
}
.wizard-steps li span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  background: var(--surface-sunken); color: var(--ink-soft);
  border: 1px solid var(--line); font-size: 0.82rem; flex: none;
}
.wizard-steps li.is-active { color: var(--ink); }
.wizard-steps li.is-active span { background: var(--accent); color: #fff; border-color: var(--accent); }
.wizard-steps li.is-done span { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

.proposals .proposal {
  border: 1px solid var(--line); border-radius: 10px;
  padding: var(--sp-4); margin-top: var(--sp-4);
}
.proposals .proposal.is-active { background: #f6fdfb; border-color: #a7f3d0; }
.proposal-head {
  display: flex; flex-wrap: wrap; gap: var(--sp-2);
  align-items: baseline; justify-content: space-between; margin-bottom: var(--sp-3);
}
.proposal-head > div { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: baseline; }

/* Channels / Settings / Users / Audit ops screens (SESSION_23). */
.badge.channel-active { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge.channel-disabled { background: var(--surface-sunken); color: var(--ink-soft); }

table.kv th { text-align: left; white-space: nowrap; color: var(--ink-soft); font-weight: 600; width: 9rem; }
table.kv td { vertical-align: top; }

.role-form { display: flex; gap: var(--sp-2); align-items: center; margin: 0; }
.role-form select {
  padding: 0.35rem 1.9rem 0.35rem 0.6rem; border: 1px solid var(--line); border-radius: 6px;
  background-color: var(--surface); color: var(--ink); font-size: 0.85rem;
}

.audit-table td { vertical-align: top; }
.pager {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-top: var(--sp-4); justify-content: center;
}
.proposal-activate { margin-top: var(--sp-3); }

/* Media library & review-card media section */
.media-grid {
  display: flex; flex-wrap: wrap; gap: var(--sp-3);
}
.media-chip {
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-2); background: var(--surface);
  max-width: 160px;
}
.media-chip img { display: block; object-fit: cover; }

/* --- Busy indicator (htmx) ------------------------------------------------
   Generation runs synchronously inside the request (30-90s of real LLM work per
   platform), so without a visible "working" state the page looks frozen and the
   operator can't tell whether it's running or stuck — and re-clicks, which would
   generate (and bill) twice. htmx puts .htmx-request on the element issuing the
   request for the duration of the call; we reveal the indicator and lock the
   submit button off that class (no htmx-version-specific attributes needed). */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-flex; }
.busy { align-items: center; gap: var(--sp-2); opacity: 0.85; font-size: 0.9rem; }
.busy::before {
  content: ""; width: 0.9em; height: 0.9em; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: busy-spin 0.7s linear infinite;
}
.htmx-request button[type="submit"] { pointer-events: none; opacity: 0.55; }
@keyframes busy-spin { to { transform: rotate(360deg); } }

/* ----------------------------------------------------------------------------------------------- */
/* Dashboard (redesign): pipeline signature + review queue + immutable-audit ledger.                 */
/* ----------------------------------------------------------------------------------------------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.dash-head h1 { margin: 0; font-size: 1.95rem; }
.dash-sub { color: var(--muted); margin: var(--sp-2) 0 0; font-size: 0.95rem; }
.dash-sub strong { color: var(--ink-soft); font-weight: 600; }

.section-eyebrow {
  display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3);
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700;
}

/* Pipeline — content flowing through the human compliance gate (the product's core). */
.pipeline { margin-bottom: var(--sp-6); }
.pl-flow { display: flex; align-items: stretch; gap: var(--sp-2); overflow-x: auto; padding-bottom: var(--sp-1); }
.pl-node {
  flex: 1 1 0; min-width: 134px;
  background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--s, var(--line-strong));
  border-radius: var(--radius); padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.pl-count { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--ink); }
.pl-label { margin-top: var(--sp-2); font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.pl-gate { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm); }
.pl-cap { display: block; margin-top: var(--sp-2); font-size: 0.63rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-strong); }
.pl-arrow { flex: none; align-self: center; display: flex; color: var(--line-strong); }
.pl-arrow .ico { width: 18px; height: 18px; }
.pl-exceptions { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-3); }
.pl-exc { display: inline-flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-3); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.8rem; color: var(--ink-soft); }
.pl-exc::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--s, var(--muted)); }

/* Section card head (icon + title + optional count pill). */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.card-head-l { display: flex; align-items: center; gap: var(--sp-2); }
.card-head h2 { margin: 0; font-size: 1.05rem; }
.card-head .ico { width: 18px; height: 18px; color: var(--accent-strong); }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; height: 1.5rem; padding: 0 0.45rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 0.78rem; font-weight: 700; }

/* Review queue (awaiting approval). */
.queue { list-style: none; margin: 0; padding: 0; }
.queue li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.queue li:last-child { border-bottom: 0; padding-bottom: 0; }
.queue-main { min-width: 0; flex: 1; }
.queue-title { font-weight: 600; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-title:hover { color: var(--accent-strong); }
.queue-meta { display: flex; align-items: center; gap: var(--sp-2); flex: none; }

/* Dashboard body: review queue gets the width (priority), activity is a compact side panel. */
.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-4); align-items: start; }
.dash-grid > * { min-width: 0; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

/* Readable review-queue items: title + a real excerpt so a piece is judgeable without opening it. */
.qlist { list-style: none; margin: 0; padding: 0; }
.qitem { padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.qitem:first-child { padding-top: 0; }
.qitem:last-child { border-bottom: 0; padding-bottom: 0; }
.qitem-title {
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--ink); font-weight: 600; line-height: 1.35;
}
.qitem-title:hover { color: var(--accent-strong); text-decoration: none; }
.qitem-excerpt {
  margin: var(--sp-2) 0 0; font-size: 0.85rem; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.qitem-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-3); }
.qitem-open { margin-left: auto; font-size: 0.82rem; font-weight: 600; color: var(--accent-strong); white-space: nowrap; }

/* Immutable-audit ledger (recent activity) — mono timestamps read as an append-only record. */
.ledger { list-style: none; margin: 0; padding: 0; }
.ledger li { display: flex; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px dashed var(--line); }
.ledger li:last-child { border-bottom: 0; }
.ledger-time { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); flex: none; width: 8.5rem; }
.ledger-actor { margin-left: auto; font-size: 0.78rem; color: var(--ink-soft); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42%; }

/* ----------------------------------------------------------------------------------------------- */
/* Review card (redesign): two-column layout with a sticky decision rail + platform-true previews.   */
/* ----------------------------------------------------------------------------------------------- */
.back-link { margin-bottom: var(--sp-3); font-size: 0.85rem; }
.card-subline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); color: var(--muted); }
.dot-sep { color: var(--line-strong); }
.card-siblings { margin-top: var(--sp-2); }

.card-layout { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: var(--sp-4); align-items: start; }
@media (max-width: 960px) { .card-layout { grid-template-columns: 1fr; } }
.card-main { min-width: 0; }
.card-aside { min-width: 0; position: sticky; top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4); }
@media (max-width: 960px) { .card-aside { position: static; } }
/* Cards inside the columns already stack; drop the generic +card top margin here (gap handles it). */
.card-main .card + .card, .card-aside .card + .card { margin-top: 0; }

.panel-decision { display: flex; flex-direction: column; gap: var(--sp-3); }
.panel-decision .compliance-banner { display: flex; width: 100%; justify-content: center; }
.decision-violations { margin: 0; padding-left: var(--sp-4); display: grid; gap: var(--sp-1); }
.decision-channel { margin: 0; }
.decision-schedule { display: flex; flex-direction: column; gap: var(--sp-2); }
.decision-schedule input, .decision-decline input {
  padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; width: 100%;
}
.decision-secondary { display: flex; flex-direction: column; gap: var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.decision-decline { display: flex; flex-direction: column; gap: var(--sp-2); }
.decision-warn { color: var(--state-awaiting_review); }
.decision-pub { margin: 0; padding-top: var(--sp-2); border-top: 1px dashed var(--line); }
.decision-pub code { font-size: 0.72rem; }
.decision-kbd, .decision-delete { margin: 0; }
kbd { font-family: var(--font-mono); font-size: 0.72rem; background: var(--surface-sunken); border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 5px; }

.feedback-tags { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: var(--sp-3); display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.feedback-tags legend { padding: 0 var(--sp-1); }
.tag-check { display: inline-flex; gap: var(--sp-1); align-items: center; font-size: 0.85rem; }
.feedback-history { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--line); }
.provenance { margin-top: var(--sp-3); }
.provenance summary { cursor: pointer; font-weight: 600; font-size: 0.85rem; color: var(--ink-soft); }
.provenance-list { margin-top: var(--sp-2); }
.mt-3 { margin-top: var(--sp-3); }

/* Preview: X (Twitter) */
.preview-x { max-width: 480px; border: 1px solid #cfd9de; color: #0f1419; background: #fff; padding: var(--sp-3); }
.preview-x .preview-head { padding: 0; }
.preview-x .preview-avatar { width: 40px; height: 40px; background: #1d9bf0; }
.preview-x .preview-name { font-weight: 700; color: #0f1419; }
.preview-x .preview-handle { display: block; color: #536471; font-size: 0.8rem; }
.preview-x .preview-body { padding: var(--sp-2) 0 0; }
.preview-x-actions { display: flex; justify-content: space-between; max-width: 260px; margin-top: var(--sp-3); color: #536471; }

/* Preview: LinkedIn */
.preview-li { max-width: 480px; border: 1px solid #e0dfdc; color: #000000e6; background: #fff; }
.preview-li .preview-avatar { width: 44px; height: 44px; background: #0a66c2; }
.preview-li .preview-name { font-weight: 600; color: rgba(0,0,0,.9); }
.preview-li .preview-sub { font-size: 0.72rem; color: rgba(0,0,0,.6); }
.preview-li .preview-body { padding: var(--sp-2) var(--sp-3) var(--sp-3); white-space: pre-wrap; }
.preview-li-actions { display: flex; justify-content: space-around; flex-wrap: wrap; gap: var(--sp-2); padding: var(--sp-2); border-top: 1px solid #e0dfdc; color: rgba(0,0,0,.6); font-size: 0.78rem; font-weight: 600; }

/* Error states (403 / 404) — a calm centered message, consistent with the shell. */
.error-state { max-width: 460px; margin: var(--sp-8) auto; text-align: center; padding: var(--sp-6); }
.error-code { font-family: var(--font-display); font-size: 4rem; line-height: 1; color: var(--accent); }
.error-state h1 { margin: var(--sp-3) 0 var(--sp-2); }
.error-state p { color: var(--muted); }
.error-state .btn { margin-top: var(--sp-4); }

/* ----------------------------------------------------------------------------------------------- */
/* Polish: dark sidebar scrollbar + styled <select> controls.                                        */
/* ----------------------------------------------------------------------------------------------- */

/* The navy rail's nav list scrolls; theme its scrollbar dark so it doesn't read as a bright stripe. */
.side-nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.16) transparent; }
.side-nav::-webkit-scrollbar { width: 8px; }
.side-nav::-webkit-scrollbar-track { background: transparent; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.13); border-radius: 8px; }
.side-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.22); }

/* Styled dropdowns — custom chevron + design-system framing on the (closed) control. The option list
   the OS pops open on click is native and not CSS-styleable without a JS widget. */
select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.7rem center; background-size: 1rem;
  cursor: pointer;
}
select:hover { border-color: var(--line-strong); }
.field select { padding-right: 2.4rem; }
