/*
  MT-Dispatch operator console.

  Tokens lifted from MT-Uptime's handoff (handoff/mt-uptime/mt-uptime-tokens.css) so the two consoles
  look like one company's work. Self-contained: real hex values, no @import, and the three fonts are
  self-hosted under wwwroot/fonts — the Content-Security-Policy is style-src 'self' and font-src 'self',
  so a Google Fonts link would be blocked and would have to widen the policy to work.

  One stylesheet, hand written. No npm, no bundler, no preprocessor (D4).
*/

@font-face{font-family:"DM Sans";src:url("../fonts/DMSans-Variable.woff2") format("woff2-variations");font-weight:400 700;font-style:normal;font-display:swap}
@font-face{font-family:"Geist";src:url("../fonts/Geist-Variable.woff2") format("woff2-variations");font-weight:300 900;font-style:normal;font-display:swap}
@font-face{font-family:"Geist Mono";src:url("../fonts/GeistMono-Variable.woff2") format("woff2-variations");font-weight:300 700;font-style:normal;font-display:swap}

:root{
    --font-display:"Geist","DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
    --font-body:"DM Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
    --font-mono:"Geist Mono",ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;

    --bg:#f6f7f9;
    --bg-soft:#edf0f3;
    --panel:#ffffff;
    --ink:#1f2430;
    --ink-strong:#1a1c1e;
    --body:#4a4f57;
    --muted:#6b7280;
    --faint:#9aa1ab;
    --border:#e3e6ea;
    --border-strong:#cfd4da;

    /* The Melsson red. Buttons and the footer rule. */
    --action:#dc1c12;
    --action-hover:#b41610;
    --action-soft:#fef2f1;
    --action-line:#fbd9d6;
    --action-ring:rgba(220,28,18,.16);

    /* MT-Dispatch's own accent. Eyebrows, active nav, links.

       A deliberate half-step from MT-Uptime's #2f6fed: the two consoles are the same design system and
       should not be the same product at a glance, because an operator will have both open. */
    --brand:#1f7a72;
    --brand-hover:#17615a;
    --brand-tint:#f1f8f7;
    --brand-line:#bfdedb;

    --up:#22a06b;
    --up-soft:#e7f6ee;
    --up-line:#b6e2c9;
    --down:#e5484d;
    --down-soft:#fdecec;
    --down-line:#f5c2c4;
    --pending:#f5a623;
    --warn-soft:#fef6e7;
    --warn-line:#f6ddb0;
    --off:#9aa1ab;

    --radius-sm:6px;
    --radius:10px;
    --radius-lg:14px;
    --radius-pill:999px;

    --shadow-xs:0 1px 2px rgba(31,36,48,.06);
    --shadow-sm:0 2px 6px rgba(31,36,48,.07);
    --shadow-md:0 8px 24px rgba(31,36,48,.08);

    --dur-fast:120ms;
    --ease:cubic-bezier(.2,0,.2,1);

    --shell:1180px;
    --shell-narrow:460px;
}

*,*::before,*::after{box-sizing:border-box}

html,body{margin:0;padding:0}

body{
    background:var(--bg);
    color:var(--body);
    font-family:var(--font-body);
    font-size:15px;
    line-height:1.55;
    -webkit-font-smoothing:antialiased;
}

h1,h2,h3{font-family:var(--font-display);color:var(--ink-strong);line-height:1.2;margin:0}
h1{font-size:1.75rem;font-weight:600;letter-spacing:-.02em}
h2{font-size:1.15rem;font-weight:600;letter-spacing:-.01em}

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

code,.mono{font-family:var(--font-mono);font-size:.875em}

/* ── shell ──────────────────────────────────────────────────────────────────────────────────── */

.shell{max-width:var(--shell);margin:0 auto;padding:0 24px;min-height:100vh;display:flex;flex-direction:column}
.shell-narrow{max-width:var(--shell-narrow)}

.masthead{
    display:flex;align-items:center;gap:24px;
    padding:18px 0;border-bottom:1px solid var(--border);
}

.wordmark{font-family:var(--font-display);font-size:1.05rem;font-weight:600;letter-spacing:-.02em;color:var(--ink-strong)}
.wordmark:hover{text-decoration:none}
.wordmark-mt{color:var(--action)}
.wordmark-dash{color:var(--faint)}
.wordmark-name{color:var(--ink-strong)}

.nav{display:flex;gap:4px;margin-left:8px}
.nav-link{
    padding:6px 12px;border-radius:var(--radius-sm);color:var(--body);font-weight:500;
    transition:background var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease);
}
.nav-link:hover{background:var(--bg-soft);color:var(--ink);text-decoration:none}
.nav-link.active{background:var(--brand-tint);color:var(--brand)}

.who{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:.875rem}
.who-name{color:var(--ink);font-weight:500}
.who-org{color:var(--muted)}

.signout{margin:0}

.main{flex:1;padding:32px 0 56px}
.main-centred{display:flex;align-items:center;justify-content:center;min-height:80vh}

.footer{
    padding:18px 0;border-top:2px solid var(--action);
    color:var(--faint);font-size:.8125rem;
}

/* ── page furniture ─────────────────────────────────────────────────────────────────────────── */

.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:24px}
.lede{color:var(--muted);margin:6px 0 0;max-width:62ch}
.muted{color:var(--muted)}

.crumbs{font-size:.8125rem;color:var(--faint);margin-bottom:6px}
.crumbs span{margin:0 6px}

/* ── cards ──────────────────────────────────────────────────────────────────────────────────── */

.card{
    background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-lg);
    padding:24px;margin-bottom:20px;box-shadow:var(--shadow-xs);
}
.card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;margin-bottom:18px}
.card-head h2{margin-bottom:0}
.card > h2{margin-bottom:16px}

.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:16px}

.client-card{
    display:block;background:var(--panel);border:1px solid var(--border);border-radius:var(--radius-lg);
    padding:20px;color:inherit;
    transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease);
}
.client-card:hover{border-color:var(--brand-line);box-shadow:var(--shadow-md);text-decoration:none}
.client-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}

.empty{text-align:center;padding:44px 24px}
.empty h2{margin-bottom:10px}
.empty p{color:var(--muted);max-width:56ch;margin:0 auto}
.empty-inline{background:var(--bg-soft);border-radius:var(--radius);padding:18px}
.empty-inline p{margin:0 0 8px}
.empty-inline p:last-child{margin-bottom:0}

/* ── definition lists ───────────────────────────────────────────────────────────────────────── */

.meta{margin:0;display:grid;gap:7px}
.meta > div{display:flex;justify-content:space-between;gap:16px;font-size:.875rem}
.meta dt{color:var(--faint);margin:0}
.meta dd{margin:0;color:var(--ink);text-align:right;overflow-wrap:anywhere}

/* ── tabs ───────────────────────────────────────────────────────────────────────────────────── */

.tabs{display:flex;gap:2px;margin-bottom:20px;border-bottom:1px solid var(--border)}
.tab{
    appearance:none;background:none;border:0;border-bottom:2px solid transparent;
    padding:9px 16px;margin-bottom:-1px;cursor:pointer;
    font-family:var(--font-body);font-size:.9375rem;font-weight:500;color:var(--muted);
    transition:color var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease);
}
.tab:hover{color:var(--ink)}
.tab-on{color:var(--brand);border-bottom-color:var(--brand)}

/* ── forms ──────────────────────────────────────────────────────────────────────────────────── */

.form,.form-grid{display:grid;gap:16px}
.form-grid{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));margin-bottom:20px}

.field{display:flex;flex-direction:column;gap:6px}
.label{font-size:.8125rem;font-weight:600;color:var(--ink)}
.hint{font-size:.78125rem;color:var(--faint);line-height:1.45}

.input{
    font-family:var(--font-body);font-size:.9375rem;color:var(--ink);
    background:var(--panel);border:1px solid var(--border-strong);border-radius:var(--radius-sm);
    padding:9px 11px;width:100%;
    transition:border-color var(--dur-fast) var(--ease),box-shadow var(--dur-fast) var(--ease);
}
.input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-tint)}
.input[readonly]{background:var(--bg-soft);color:var(--muted)}
.input.mono{font-family:var(--font-mono);font-size:.875rem}

.validation-message{color:var(--down);font-size:.78125rem}

/* ── buttons ────────────────────────────────────────────────────────────────────────────────── */

.btn{
    appearance:none;display:inline-flex;align-items:center;justify-content:center;
    font-family:var(--font-body);font-size:.9375rem;font-weight:500;
    padding:9px 18px;border-radius:var(--radius-sm);border:1px solid transparent;cursor:pointer;
    transition:background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease);
}
.btn:disabled{opacity:.55;cursor:default}

.btn-action{background:var(--action);color:#fff}
.btn-action:hover:not(:disabled){background:var(--action-hover)}
.btn-action:focus-visible{outline:none;box-shadow:0 0 0 3px var(--action-ring)}

.btn-quiet{background:var(--panel);color:var(--ink);border-color:var(--border-strong)}
.btn-quiet:hover:not(:disabled){background:var(--bg-soft)}

.btn-small{padding:5px 11px;font-size:.8125rem}

/* ── tables ─────────────────────────────────────────────────────────────────────────────────── */

.table{width:100%;border-collapse:collapse;font-size:.875rem}
.table th{
    text-align:left;font-weight:600;color:var(--faint);font-size:.75rem;
    letter-spacing:.04em;text-transform:uppercase;
    padding:0 12px 9px;border-bottom:1px solid var(--border);
}
.table td{padding:11px 12px;border-bottom:1px solid var(--border);color:var(--ink);vertical-align:middle}
.table tr:last-child td{border-bottom:0}
.row-off td{color:var(--faint)}
.row-actions{text-align:right}

/* ── pills ──────────────────────────────────────────────────────────────────────────────────── */

.pill{
    display:inline-block;padding:2px 10px;border-radius:var(--radius-pill);
    font-size:.75rem;font-weight:600;line-height:1.6;white-space:nowrap;border:1px solid transparent;
}
.pill-active{background:var(--up-soft);color:var(--up);border-color:var(--up-line)}
.pill-onboarding{background:var(--warn-soft);color:#96620a;border-color:var(--warn-line)}
.pill-suspended{background:var(--down-soft);color:var(--down);border-color:var(--down-line)}
.pill-operator{background:var(--action-soft);color:var(--action);border-color:var(--action-line)}
.pill-role{background:var(--bg-soft);color:var(--body);border-color:var(--border)}

/* ── alerts ─────────────────────────────────────────────────────────────────────────────────── */

.alert{padding:11px 15px;border-radius:var(--radius-sm);font-size:.875rem;margin:0 0 18px;border:1px solid}
.alert-error{background:var(--down-soft);border-color:var(--down-line);color:#9b1c1f}
.alert-ok{background:var(--up-soft);border-color:var(--up-line);color:#15704a}
.alert-quiet{background:var(--bg-soft);border-color:var(--border-strong);color:var(--body)}

/* ── sign in ────────────────────────────────────────────────────────────────────────────────── */

.card-signin{width:100%;padding:36px 32px;margin:0}
.signin-title{font-size:1.4rem;margin-bottom:4px}
.signin-sub{color:var(--muted);font-size:.875rem;margin:0 0 26px}
.card-signin .btn{width:100%;margin-top:6px}

/* Blazor's reconnect overlay. Styled here because the CSP forbids the inline styles the default
   template ships with. */
#components-reconnect-modal{display:none}
#components-reconnect-modal.components-reconnect-show{
    display:block;position:fixed;inset:0;z-index:1000;
    background:rgba(31,36,48,.4);
}

@media (max-width:640px){
    .masthead{flex-wrap:wrap;gap:12px}
    .who{margin-left:0;order:3}
    .page-head{flex-direction:column}
    .form-grid{grid-template-columns:1fr}
}

/* ── the approval screen ────────────────────────────────────────────────────────────────────────

   Read on a phone, standing up, by somebody who was sent a link. So: one column of prose with the
   sources beside it on a desktop, stacked below 820px, and nothing that needs a pointer.

   The provenance marks are the one piece of visual design here that is load-bearing rather than
   decorative. A field taken from a message and a field with nothing behind it have to look different
   at a glance, because telling them apart is the entire job the approver is doing. */

.shell-approve{max-width:1060px}

.approve-masthead{padding:18px 0;border-bottom:1px solid var(--border)}

.approve-head{margin:8px 0 24px}
.approve-eyebrow{
    font-size:.75rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
    color:var(--brand);margin:0 0 6px;
}
.approve-head h1{font-size:1.6rem;margin-bottom:8px}
.approve-head .lede{font-size:1rem;margin:0}

.approve-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:20px;align-items:start}
.approve-story{min-width:0}
.approve-sources{min-width:0;position:sticky;top:20px}

/* ── fields and their provenance ─────────────────────────────────────────────────────────────── */

.approve-fields{margin:0 0 20px;display:grid;gap:10px}
.approve-field{display:grid;grid-template-columns:104px minmax(0,1fr);gap:14px;align-items:baseline}
.approve-field dt{
    color:var(--faint);margin:0;font-size:.75rem;font-weight:600;
    letter-spacing:.04em;text-transform:uppercase;
}
.approve-field dd{margin:0;color:var(--ink);overflow-wrap:anywhere}

.approve-mark{
    display:inline-block;min-width:18px;height:18px;padding:0 5px;margin-left:5px;
    border-radius:var(--radius-pill);vertical-align:1px;
    background:var(--brand-tint);border:1px solid var(--brand-line);color:var(--brand);
    font-family:var(--font-mono);font-size:.6875rem;font-weight:600;line-height:17px;text-align:center;
}

/* No source, no value (§5). A field the sources do not support has to read differently from one they
   do — rendering nothing would collapse exactly the distinction this screen exists to preserve. */
.approve-mark-none{
    background:var(--warn-soft);border-color:var(--warn-line);color:#96620a;
}

/* Corrected by hand (D24). Green rather than amber, and that is the whole point: a person wrote this,
   so it is the best attested value on the screen. Amber here would warn the approver off their own
   correction. */
.approve-mark-edited{
    background:var(--up-soft);border-color:var(--up-line);color:#14764c;
}

.approve-body{border-top:1px solid var(--border);padding-top:16px}
.approve-body p{margin:0 0 12px;color:var(--ink);line-height:1.6}
.approve-body p:last-of-type{margin-bottom:8px}

.approve-quote{margin:0;padding:0 0 0 16px;border-left:3px solid var(--brand-line)}
.approve-quote p{margin:0 0 6px;color:var(--ink);font-size:1.0625rem;line-height:1.5}
.approve-quote cite{color:var(--muted);font-size:.875rem;font-style:normal}

.approve-list{margin-bottom:14px}
.approve-list:last-child{margin-bottom:0}
.approve-list p{margin:3px 0 0;color:var(--ink)}

/* ── the sources panel ───────────────────────────────────────────────────────────────────────── */

.approve-sources .hint{display:block;margin:-6px 0 16px}

.approve-source{padding:14px 0;border-top:1px solid var(--border)}
.approve-source:first-of-type{border-top:0;padding-top:0}
.approve-source-head{display:flex;align-items:center;gap:8px;margin-bottom:7px}
.approve-source-head .approve-mark{margin-left:0}
.approve-source-meta{color:var(--faint);font-size:.78125rem}
.approve-source-text{
    margin:0;color:var(--body);font-size:.9375rem;line-height:1.5;white-space:pre-wrap;
    overflow-wrap:anywhere;
}

.approve-photo{margin:10px 0 0}
.approve-photo img{
    display:block;width:100%;height:auto;border-radius:var(--radius);border:1px solid var(--border);
}
.approve-photo-missing{
    padding:18px;border-radius:var(--radius);border:1px dashed var(--border-strong);
    background:var(--bg-soft);color:var(--muted);font-size:.875rem;text-align:center;
}
.approve-photo-note{
    margin-top:6px;padding:6px 10px;border-radius:var(--radius-sm);
    background:var(--warn-soft);border:1px solid var(--warn-line);color:#96620a;font-size:.78125rem;
}

/* ── the decision ────────────────────────────────────────────────────────────────────────────── */

.approve-decide{margin-top:20px}
.approve-decide .lede{margin:0 0 20px}

.approve-fieldset{border:0;padding:0;margin:0 0 20px;display:grid;gap:8px}
.approve-fieldset legend{padding:0;margin-bottom:4px}

.approve-radio,.approve-check{
    display:flex;gap:10px;align-items:flex-start;padding:10px 12px;cursor:pointer;
    border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--panel);
    transition:border-color var(--dur-fast) var(--ease),background var(--dur-fast) var(--ease);
}
.approve-radio:hover,.approve-check:hover{border-color:var(--brand-line);background:var(--brand-tint)}
.approve-radio input,.approve-check input{margin:3px 0 0;flex:none;accent-color:var(--brand)}
.approve-radio span,.approve-check span{display:block}
.approve-radio-label{color:var(--ink);font-weight:500}
.approve-radio .hint,.approve-check .hint{margin-top:2px}

.approve-decide .form-grid{margin-bottom:16px}
.approve-submit{margin-top:20px;width:100%}

.approve-reject{margin-top:0}
.approve-reject .lede{margin:0 0 16px}
.approve-reject .btn{margin-top:14px}

/* ── fixing it first (§12 step 12) ───────────────────────────────────────────────────────────────

   A native <details>, which is why there is no JavaScript on this page and still a third button. The
   approver page is statically rendered and reaches people on a bad mobile link from a job site; a
   disclosure the browser implements itself cannot fail to open. */

.approve-edit{margin-top:20px;padding:0}
.approve-edit>summary{
    display:flex;align-items:center;gap:8px;padding:18px 22px;cursor:pointer;
    color:var(--ink);font-family:var(--font-display);font-weight:600;
    list-style:none;border-radius:var(--radius-lg);
}
.approve-edit>summary::-webkit-details-marker{display:none}
.approve-edit>summary::before{
    content:"";width:0;height:0;flex:none;
    border-left:5px solid var(--faint);border-top:4px solid transparent;border-bottom:4px solid transparent;
    transition:transform var(--dur-fast) var(--ease);
}
.approve-edit[open]>summary::before{transform:rotate(90deg) translateX(1px)}
.approve-edit>summary:hover{background:var(--bg-soft)}
.approve-edit>summary .hint{margin-left:auto;font-weight:400}
.approve-edit-inner{padding:0 22px 22px}
.approve-edit-inner>.lede{margin:0 0 18px}
.approve-edit .field,.approve-edit .form-grid{margin-bottom:14px}
.approve-edit .btn{margin-top:6px}
.approve-edit-limits{display:block;margin:0 0 16px;padding-top:4px;border-top:1px solid var(--border)}

/* The people rows. Name and role side by side on a desktop, stacked on a phone — a role box at half
   a phone's width is unusable, and this form is read on a phone. */
.approve-edit-rows{border:0;padding:0;margin:0 0 14px;display:grid;gap:8px}
.approve-edit-rows legend{padding:0;margin-bottom:4px}
.approve-edit-rows .hint{margin-top:2px}
.approve-edit-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:8px}

@media (max-width:640px){
    .approve-edit-row{grid-template-columns:minmax(0,1fr)}
}

/* ── outcomes and refusals ───────────────────────────────────────────────────────────────────── */

.approve-outcome{text-align:center;padding:40px 28px}
.approve-outcome h2{margin-bottom:12px}
.approve-outcome p{max-width:52ch;margin:0 auto 10px}

.approve-restrictions-head{font-weight:600;color:var(--ink);margin-top:18px}
.approve-restrictions{display:inline-block;text-align:left;margin:0;padding-left:20px;color:var(--ink)}

.approve-refusal-head{margin:0 0 6px;font-weight:600}
.approve-refusal{margin:0;padding-left:20px}
.approve-refusal li{margin-bottom:4px}
.approve-refusal li:last-child{margin-bottom:0}

@media (max-width:820px){
    .approve-grid{grid-template-columns:1fr}
    .approve-sources{position:static}
    .approve-field{grid-template-columns:1fr;gap:2px}
}

/* The approval link, shown once after issuing it. Breaks anywhere, because it is long and gets
   copied out of this box by hand until outbound messaging exists (step 14). */
.approve-issued{word-break:break-all;margin:6px 0 8px;font-size:.8125rem}

.approve-jsonld-note{margin-top:18px;padding-top:14px;border-top:1px solid var(--border)}

/* ── the operator queue ─────────────────────────────────────────────────────────────────────────

   A list read the way a dispatcher reads one: scanning for the oldest thing, not browsing. So the
   load-bearing visual decisions are both about age — an overdue row has to be findable without
   reading any of it, and the age column has to be legible as a column rather than as prose. Nothing
   else here is allowed to compete with that. */

.queue-summary{
    display:flex;align-items:center;gap:12px;flex-wrap:wrap;
    margin:0 0 20px;font-size:.875rem;
}
.queue-count{font-weight:600;color:var(--ink)}

.queue-section{margin-bottom:16px}
.queue-section .card-head{margin-bottom:14px}

.queue-section-count{
    display:inline-block;margin-left:8px;padding:1px 9px;border-radius:var(--radius-pill);
    background:var(--brand-tint);border:1px solid var(--brand-line);color:var(--brand);
    font-family:var(--font-mono);font-size:.8125rem;font-weight:600;vertical-align:2px;
}

/* An empty section still renders, because "no failed jobs" is information. It reads quiet rather than
   absent. */
.queue-section-count-zero{
    background:var(--bg-soft);border-color:var(--border);color:var(--faint);
}
.queue-section-empty{margin:0;font-size:.875rem}

.queue-age{font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--body)}
.queue-age-late{color:var(--down);font-weight:600}

/* §13's 72 hours, as a row you cannot miss while scanning. A left border rather than a background,
   so it survives a printed page and does not fight the pills in the same row. */
.queue-overdue{box-shadow:inset 3px 0 0 var(--down)}
.queue-overdue td:first-child{padding-left:15px}

.queue-stage{display:block;font-weight:600;color:var(--ink)}
.queue-stage-sub{display:block;color:var(--muted);font-size:.8125rem;margin-top:2px}

/* The error a job parked with. Truncated in the database at 1000 characters and clamped here to three
   lines: it is a scanning aid, and the full text is in the log. */
.queue-error{
    color:var(--body);font-size:.8125rem;max-width:42ch;overflow-wrap:anywhere;
    display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}

/* ── the archive confirmation ───────────────────────────────────────────────────────────────────

   Archiving revokes any outstanding approval link, and there is no un-archive in the console. That
   earns a second click and somewhere to say why, inline under the row it belongs to rather than in a
   dialog that hides which row it is about. */

.queue-confirm-row td{background:var(--bg-soft)}
.queue-confirm{padding:4px 0}
.queue-confirm-head{margin:0 0 4px;color:var(--ink);font-size:.875rem}
.queue-confirm p.muted{margin:0 0 10px;font-size:.8125rem}

.queue-confirm-row-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.queue-confirm-row-actions .input{flex:1 1 280px;min-width:0;font-size:.875rem;padding:6px 10px}

@media (max-width:820px){
    /* Tables this wide cannot reflow into a phone, and a horizontally scrolled table is still readable
       where a squashed one is not. */
    .queue-section .table{display:block;overflow-x:auto;white-space:nowrap}
    .queue-error{white-space:normal}
}

/* ── the project list, and the loop it exists for ────────────────────────────────────────────────

   The aliases are the load-bearing field on this page, not the name — a project matched only by its
   full name will rarely match anything, because nobody types a full name into WhatsApp. So the alias
   editor gets the width, and the match tester's verdict gets the only colour on the page. */

.project-form{
    background:var(--bg-soft);border-radius:var(--radius);padding:20px;margin-bottom:20px;
}
.project-form-head{
    font-family:var(--font-display);font-size:1rem;font-weight:600;color:var(--ink-strong);
    margin:0 0 16px;
}
.project-form .form-grid{margin-bottom:16px}
.project-form-actions{display:flex;gap:8px;margin-top:16px}

/* Full width and a monospace face: this is a list of short strings read line by line, and a
   proportional font makes a stray leading space invisible. */
.project-aliases textarea{font-family:var(--font-mono);font-size:.875rem;resize:vertical}

.project-aliases-list{color:var(--body);font-size:.8125rem}

/* ── the match tester ───────────────────────────────────────────────────────────────────────────

   Three outcomes, three colours, because the difference between them is the whole point: matched is
   the goal, ambiguous is a question the crew will be asked every time, and nothing is a story that
   publishes with no location. */

.probe-result{
    margin-top:16px;padding:14px 16px;border-radius:var(--radius);border:1px solid;
}
.probe-head{margin:0 0 4px;font-weight:600}
.probe-result p.muted{margin:0;font-size:.875rem}

.probe-matched{background:var(--brand-tint);border-color:var(--brand-line)}
.probe-matched .probe-head{color:var(--brand)}

.probe-ambiguous{background:var(--warn-soft);border-color:var(--warn-line)}
.probe-ambiguous .probe-head{color:#96620a}

.probe-nomatch{background:var(--bg-soft);border-color:var(--border-strong)}
.probe-nomatch .probe-head{color:var(--ink)}

/* ── submissions that matched nothing ───────────────────────────────────────────────────────────

   A button per row rather than a table: the only thing to do with one is load it into the tester, and
   making the whole row the control means not hunting for a link at the end of a line of message text. */

.unmatched{list-style:none;margin:0;padding:0;display:grid;gap:8px}

.unmatched-row{
    width:100%;text-align:left;appearance:none;cursor:pointer;
    background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);
    padding:11px 14px;font-family:var(--font-body);font-size:.875rem;color:var(--ink);
    display:flex;align-items:baseline;justify-content:space-between;gap:16px;
    transition:border-color var(--dur-fast) var(--ease),background var(--dur-fast) var(--ease);
}
.unmatched-row:hover{border-color:var(--brand-line);background:var(--brand-tint)}

/* Clamped to two lines. A voice-note transcript can be a paragraph, and this list is scanned rather
   than read — the full text lands in the tester when the row is clicked. */
.unmatched-text{
    min-width:0;overflow-wrap:anywhere;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.unmatched-meta{
    flex:0 0 auto;color:var(--faint);font-size:.75rem;white-space:nowrap;
    display:flex;align-items:center;gap:8px;
}

@media (max-width:640px){
    .unmatched-row{flex-direction:column;gap:6px}
    .unmatched-meta{white-space:normal}
}
