/* The Refinery's "Tactical Bridge" theme (~/the-refinery/src/Refinery.Web/wwwroot/app.css) - Sean,
   2026-09-26: "build the look and feel of the refinery FARS". FARS Manifest plugs into the Refinery and
   an analyst moves between them, so it wears the same skin: same palette, same full-width shell, same
   top nav, same controls. The old token names are kept (mapped onto the Refinery's values) so the
   NHTSA-only screens - case coding, gap-field admin - pick the theme up without a rewrite. */
:root {
    color-scheme: dark;
    --bg-matte-carbon: #0d0d0d;
    --bg-dark-armor: #1a1a1a;
    --bg-dark-armor-raised: #232323;
    --text-brushed-aluminum: #d1d5db;
    --text-dim: #8b93a1;
    --accent-cyan-glow: #00e5ff;
    --danger: #ef4444;
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.18);

    --bg: var(--bg-matte-carbon);
    --surface: var(--bg-dark-armor);
    --surface-2: var(--bg-dark-armor-raised);
    --line: var(--border-strong);
    --text: var(--text-brushed-aluminum);
    --muted: var(--text-dim);
    --muted-2: #6b7280;
    --accent: var(--accent-cyan-glow);
    --accent-glow: #67f0ff;
    --accent-ink: #001a1f;
    --accent-dim: #0e4f58;
    --good: #34d399;
    --warn: #f59e0b;
    --radius: 8px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; height: 100%; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    background: var(--bg-matte-carbon);
    color: var(--text-brushed-aluminum);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

h1, h2, h3 { color: #f3f4f6; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
code { color: var(--accent-cyan-glow); background: rgba(0, 229, 255, 0.07); padding: 0 .25em; border-radius: 3px; }
code, .mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; }

button, input, select, textarea {
    font-family: inherit;
    font-size: 0.95em;
    background: var(--bg-dark-armor-raised);
    color: var(--text-brushed-aluminum);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    padding: 0.45em 0.8em;
}
button { cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .05s ease; }
button:hover:not(:disabled) { border-color: var(--accent-cyan-glow); }
button:active:not(:disabled) { transform: scale(0.97); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: #6b7280; }

/* --- shell: the Refinery's top-row nav, full-width content --- */
.top-row {
    background: var(--bg-dark-armor);
    border-bottom: 1px solid var(--border-strong);
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 0 0 auto;
}
.top-row .brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; letter-spacing: .04em; color: #fff; }
.top-row .brand:hover { text-decoration: none; }
.top-row .brand img { height: 30px; width: 30px; }
.top-row nav { display: inline-flex; gap: 1rem; }
.top-row nav a { color: var(--text-brushed-aluminum); }
.top-row nav a:hover { color: var(--accent-cyan-glow); text-decoration: none; }
.top-row nav a.active { color: var(--accent-cyan-glow); }

main {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    width: 100%;
}

/* The case-review IDE workspace opts out of main's centered/padded/scrolling column - it manages
   its own locked-viewport, dual-pane layout instead (2026-09-12 density redesign). */
main:has(.case-workspace) {
    max-width: none;
    padding: 0;
    overflow: hidden;
    display: flex;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.panel h2, .panel h3 { margin-top: 0; }

table { border-collapse: collapse; width: 100%; margin: .5rem 0; }
th, td { text-align: left; padding: .4rem .6rem; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
th { color: var(--text-dim); font-weight: 600; border-bottom: 1px solid var(--border-strong); }
tbody tr:hover { background: rgba(255, 255, 255, 0.03); }

/* The Refinery's two button shapes (.rf-btn-primary / .rf-btn-outline). .btn / .btn-secondary are
   kept as aliases so every existing screen follows along. */
.btn, .rf-btn-primary {
    display: inline-block;
    background: #475569; border: 1px solid #475569; color: #fff; font-weight: 600;
    border-radius: 8px; padding: .45em .9em; cursor: pointer; text-decoration: none; font-size: .95em;
}
.btn:hover:not(:disabled), .rf-btn-primary:hover:not(:disabled) { background: #64748b; border-color: #64748b; text-decoration: none; }
.btn:disabled, .rf-btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-secondary, .rf-btn-outline {
    background: transparent; color: var(--text-brushed-aluminum); border: 1px solid var(--border-strong); font-weight: 400;
}
.btn-secondary:hover:not(:disabled), .rf-btn-outline:hover:not(:disabled) { background: transparent; border-color: var(--accent-cyan-glow); color: var(--text-brushed-aluminum); }

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: .15rem .6rem;
    font-size: .8rem;
    font-weight: 600;
}
.badge-ready { background: rgba(51, 199, 245, .15); color: var(--accent-glow); }
.badge-sent { background: rgba(57, 217, 138, .15); color: var(--good); }
.badge-open { background: rgba(245, 185, 66, .15); color: var(--warn); }
.possible-match-hint { color: var(--good); font-size: .8rem; margin-top: .3rem; max-width: 22rem; }

.pre-report-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: .5rem;
}
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
.pre-report-form label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--muted); }
.pre-report-form input, .pre-report-form select, .pre-report-form textarea {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    padding: .4rem .55rem;
    font: inherit;
}
.pre-report-form h3 { margin: .5rem 0 .25rem; font-size: .95rem; }

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

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 800px) {
    .two-col { grid-template-columns: 1fr; }
}

.report-image-placeholder {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    color: var(--muted);
}

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: .75rem;
    padding-bottom: .5rem;
}
.section-tabs .tab {
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: .35rem .9rem;
    font-size: .85rem;
    cursor: pointer;
}
.section-tabs .tab:hover { color: var(--text); border-color: var(--accent-dim); }
.section-tabs .tab.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.section-tabs .tab-count { opacity: .75; font-size: .8em; margin-left: .15rem; }

.entity-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .75rem;
    margin-bottom: .75rem;
    background: var(--surface-2);
}
.entity-subcard {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .6rem .75rem;
    margin: .5rem 0 .5rem 1.25rem;
    background: var(--surface);
}
.entity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .35rem;
}

.submission-preview {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .75rem;
    margin-top: .5rem;
    max-height: 24rem;
    overflow: auto;
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--muted);
}

.gap-cluster { border-bottom: 1px solid var(--line); padding: .6rem 0; }
.gap-cluster:last-child { border-bottom: none; }
.gap-cluster > summary { cursor: pointer; }
.gap-cluster .elements { color: var(--accent-glow); font-size: .85rem; }
.gap-cluster .section { color: var(--muted-2); font-size: .8rem; }

/* Compact multi-column field grid (2026-09-12 density redesign) - small fields (a code dropdown,
   a short free-text box) pack several per row; a "select all that apply" checklist spans the full
   row width via .gap-field-wide so a long list never gets awkwardly squeezed into one column. */
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .6rem 1rem;
    padding: .5rem 0;
}
.gap-field { display: flex; flex-direction: column; gap: .3rem; }
.gap-field.gap-field-wide { grid-column: 1 / -1; }
.gap-field label { color: var(--text); font-size: .85rem; font-weight: 500; }
.gap-field select, .gap-field input[type="text"] {
    width: 100%;
    background: var(--surface-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .35rem .5rem;
}
.gap-field select:focus, .gap-field input[type="text"]:focus { outline: 1px solid var(--accent); }

/* Long narrative text (cluster notes, coded-field format hints) lives in a hover tooltip instead of
   a permanent paragraph - "strip text walls" density rule. Native title attribute - no JS needed. */
.info-icon { color: var(--muted-2); cursor: help; font-size: .85em; margin-left: .3rem; }
.info-icon:hover { color: var(--accent-glow); }

.multi-coded {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
    max-height: 12rem;
    overflow-y: auto;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: .5rem;
}
.multi-option { font-size: .85rem; display: flex; align-items: center; gap: .35rem; white-space: nowrap; }

/* ---------- IDE workspace: locked-viewport split screen (2026-09-12) ---------- */

.case-workspace {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
    min-height: 0;
}

.command-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: .6rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}
.command-bar-info { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.command-bar-actions { display: flex; gap: .5rem; flex: 0 0 auto; }

.alert-banner {
    padding: .4rem 1rem;
    font-size: .85rem;
    border-bottom: 1px solid var(--line);
    flex: 0 0 auto;
}
.alert-banner.ok { color: var(--good); background: rgba(57, 217, 138, .08); }
.alert-banner.err { color: #f2a6a8; background: rgba(229, 72, 77, .08); }

.split-panes {
    flex: 1 1 auto;
    display: flex;
    overflow: hidden;
    min-height: 0;
}
.pane { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.pane-left { flex: 0 0 42%; width: 42%; border-right: 1px solid var(--line); background: var(--surface); }
.pane-right { flex: 1 1 auto; background: var(--bg); }

.pane-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    flex: 0 0 auto;
    font-size: .85rem;
    flex-wrap: wrap;
}

.pane-scroll { flex: 1 1 auto; overflow: auto; padding: 1rem; min-height: 0; }
.pane-image-scroll { padding: 0; background: #0c0d10; }
/* "100%" (the default) means "fits the pane width," not the image's native pixel size - a real
   scanned form is typically wider than a 42%-viewport pane, so rendering it at native size caused a
   surprise horizontal scrollbar and cut-off content out of the box. width:100% establishes that
   fit-to-pane baseline; the zoom transform then scales up/down FROM it, not from native size. */
.pane-image-scroll img { display: block; width: 100%; transition: transform .1s ease; transform-origin: top left; }
.pane-image-scroll .report-image-placeholder { margin: 1rem; }
.report-pdf-canvas-host { display: flex; justify-content: center; padding: 1rem; }
.report-pdf-canvas-host canvas { display: block; max-width: none; box-shadow: 0 0 0 1px var(--line); }

.zoom-controls, .page-controls { display: flex; align-items: center; gap: .35rem; }
.zoom-controls button, .page-controls button {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 4px;
    min-width: 1.6rem;
    height: 1.6rem;
    cursor: pointer;
    font-size: .85rem;
}
.zoom-controls button:disabled, .page-controls button:disabled { opacity: .4; cursor: not-allowed; }

@media (max-width: 900px) {
    .split-panes { flex-direction: column; overflow: auto; }
    .pane-left { width: 100%; flex: 0 0 auto; max-height: 40vh; border-right: none; border-bottom: 1px solid var(--line); }
    .pane-right { flex: 1 1 auto; }
}

/* Vault data - compact grid instead of a single-column key/value table */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .5rem .75rem;
    margin-bottom: 1rem;
}
.vault-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .4rem .6rem; }
.vault-label { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; }
.vault-value { display: block; font-size: .88rem; margin-top: .15rem; word-break: break-word; }

/* Entity pill selector - switch between Vehicle 1/2/... (or Occupant 1/2/...) instead of stacking
   every entity's fields open at once. Inline remove (x) is the muted-destructive control - compact,
   not a separate full-width "Remove" button cluttering the screen. */
.entity-pills { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .5rem 0 .75rem; }
.entity-pills-sub { margin-left: .5rem; padding-left: .75rem; border-left: 2px solid var(--line); }
.entity-pill { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.entity-pill.active { border-color: var(--accent); background: rgba(51, 199, 245, .12); }
.entity-pill .pill-label { background: transparent; border: none; color: var(--text); padding: .3rem .85rem; cursor: pointer; font-size: .85rem; }
.entity-pill.active .pill-label { color: var(--accent-glow); font-weight: 600; }
.entity-pill .pill-remove {
    background: transparent;
    border: none;
    border-left: 1px solid var(--line);
    color: #b56b6d;
    padding: .3rem .55rem;
    cursor: pointer;
    font-size: .85rem;
    line-height: 1;
}
.entity-pill .pill-remove:hover { background: rgba(229, 72, 77, .16); color: #f2a6a8; }

.btn-sm { padding: .3rem .7rem; font-size: .85rem; }

/* ---- 2026-09-26: Refinery /fars parity - dashboard, work queue, match page, pills ---- */
.dash-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.dash-header h2 { margin: 0; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 38fr) minmax(0, 62fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-left .panel { position: sticky; top: 1rem; }
.form-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; }
.pre-report-form .form-grid2 input, .pre-report-form .form-grid2 select, .pre-report-form textarea { width: 100%; box-sizing: border-box; }
.person-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: .4rem; margin: .3rem 0; }
.person-row input, .person-row select {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
    color: var(--text); padding: .35rem .5rem; font: inherit; min-width: 0;
}
.ghost-x { background: none; border: none; color: #f2a6a8; font-size: 1.1rem; cursor: pointer; padding: 0 .3rem; }
.form-error { color: #f2a6a8; font-size: .85rem; margin-top: .35rem; }
td.small, .small { font-size: .88rem; }

.help-tip {
    display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem;
    border-radius: 50%; border: 1px solid var(--line); color: var(--muted); font-size: .72rem;
    font-weight: 700; cursor: help; vertical-align: middle;
}

.pill { display: inline-block; border-radius: 999px; padding: .12rem .6rem; font-size: .78rem; font-weight: 600; }
.pill-open { background: rgba(245, 185, 66, .15); color: var(--warn); }
.pill-matched { background: rgba(57, 217, 138, .15); color: var(--good); }
.pill-transmitted { background: rgba(51, 199, 245, .15); color: var(--accent); }
.pill-dismissed { background: rgba(229, 72, 77, .15); color: #f2a6a8; }

.tab-btn {
    background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 999px;
    padding: .25rem .8rem; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
}
.tab-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(51, 199, 245, .08); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: .6rem; margin-bottom: .75rem; font-size: .85rem; color: var(--muted); }
.filter-bar label { display: flex; flex-direction: column; gap: .2rem; }
.filter-bar input {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: .3rem .45rem; font: inherit;
}
.filter-bar input:disabled { opacity: .45; }
details > summary { cursor: pointer; font-weight: 600; }
.pager { display: flex; align-items: center; gap: .75rem; justify-content: flex-end; margin-top: .6rem; font-size: .85rem; }

/* match page */
.pane-half { flex: 0 0 50%; width: 50%; }
.match-banner {
    background: rgba(57, 217, 138, .1); border: 1px solid rgba(57, 217, 138, .35); color: var(--good);
    border-radius: 6px; padding: .5rem .75rem; margin-bottom: .6rem; font-size: .9rem;
}
.detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: .75rem; margin-top: .75rem; font-size: .9rem; }
.meta-table { margin-top: .4rem; }
.meta-table td { padding: .25rem .5rem; border-bottom: 1px solid var(--line); }
.meta-table td:first-child { color: var(--muted); width: 9rem; }
.decision-zone { margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.reject-zone { border: 1px solid rgba(229, 72, 77, .35); background: rgba(229, 72, 77, .06); border-radius: 6px; padding: .75rem; }
.reject-zone label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.reject-zone input {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; color: var(--text); padding: .35rem .5rem; font: inherit;
}
.btn-danger { background: rgba(229, 72, 77, .85); color: #fff; }
.btn-danger:hover { background: var(--danger); }
.btn-danger:disabled { background: rgba(229, 72, 77, .3); color: var(--muted); }
.dismissed-banner { border: 1px solid rgba(229, 72, 77, .35); background: rgba(229, 72, 77, .08); border-radius: 6px; padding: .75rem; font-size: .9rem; }

/* candidate report on the pre-report page */
.report-box { display: flex; flex-direction: column; height: 70vh; margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }

/* search: sticky filter bar + empty state */
.search-sticky { position: sticky; top: 0; z-index: 5; }
.empty-state { text-align: center; padding: 2rem 1rem; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
td .btn-sm, td a.btn { white-space: nowrap; }
.pane-right select {
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px;
    color: var(--text); padding: .45rem .55rem; font: inherit;
}


/* ==== Copied from the Refinery (2026-09-26, Sean: "build the look and feel of the refinery FARS") ====
   app.css .rf-helptip, and the <style> blocks of FarsWorklist.razor (.rf-fars-*), FarsCaseMatch.razor
   (.rf-fcm-*) and FarsSearch.razor (.rf-fs-*). Kept verbatim so the two apps stay in step - re-copy
   rather than hand-edit when the Refinery's screens change. */
.rf-helptip { position: relative; display: inline-flex; align-items: center; }
.rf-helptip-btn {
    width: 1.15rem; height: 1.15rem; border-radius: 50%; padding: 0; line-height: 1;
    font-size: .7rem; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--text-dim); border: 1px solid var(--border-strong);
    cursor: help;
}
.rf-helptip-btn:hover, .rf-helptip-btn:focus-visible { border-color: var(--accent-cyan-glow); color: var(--accent-cyan-glow); }
.rf-helptip-text {
    display: none; position: absolute; z-index: 30; top: 140%; left: 0;
    background: var(--bg-dark-armor-raised); border: 1px solid var(--border-strong); border-radius: 6px;
    padding: .55rem .7rem; width: max-content; max-width: 22rem; font-size: .82em; font-weight: normal;
    color: var(--text-brushed-aluminum); box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.rf-helptip:hover .rf-helptip-text, .rf-helptip:focus-within .rf-helptip-text { display: block; }
.rf-fars-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.rf-fars-header h1 { margin: 0; }

/* Day / night for the page content - the Refinery's Validation screen palette (ReviewRecord.razor's
   .rf-shell[data-theme="day"]). The top bar keeps the dark chrome, as in the Refinery. */
main[data-theme="day"] {
    color-scheme: light;
    --bg-matte-carbon: #f7f7f5; --bg-dark-armor: #ffffff; --bg-dark-armor-raised: #eef0f2;
    --text-brushed-aluminum: #16181d; --text-dim: #55606e;
    --border-subtle: rgba(0, 0, 0, 0.10); --border-strong: rgba(0, 0, 0, 0.22);
    --accent-cyan-glow: #007c91; --accent-glow: #0090a8; --accent-dim: #cfe8f0;
    --bg: var(--bg-matte-carbon); --surface: var(--bg-dark-armor); --surface-2: var(--bg-dark-armor-raised);
    --line: var(--border-strong); --text: var(--text-brushed-aluminum); --muted: var(--text-dim);
    --accent: var(--accent-cyan-glow);
    background: var(--bg-matte-carbon); color: var(--text-brushed-aluminum);
}
main[data-theme="day"] h1, main[data-theme="day"] h2, main[data-theme="day"] h3, main[data-theme="day"] .studio-title { color: #16181d; }
main[data-theme="day"] input, main[data-theme="day"] select, main[data-theme="day"] textarea {
    background: #ffffff; color: #16181d; border-color: rgba(0, 0, 0, .25);
}
main[data-theme="day"] code { color: var(--accent-cyan-glow); background: rgba(0, 124, 145, .08); }
main[data-theme="day"] .btn-primary { background: #007c91; border-color: #007c91; color: #fff; }
main[data-theme="day"] .btn-primary:hover:not(:disabled) { background: #0090a8; border-color: #0090a8; }
.rf-theme-btn {
    padding: .3rem .75rem; border-radius: 999px; font-size: .85em; cursor: pointer;
    background: var(--bg-dark-armor-raised); color: var(--text-brushed-aluminum); border: 1px solid var(--border-strong);
}
.rf-theme-btn[aria-pressed="true"] { border-color: var(--accent-cyan-glow); color: var(--accent-cyan-glow); }

.rf-fars-grid { display: flex; gap: 1rem; align-items: flex-start; }
.rf-fars-left { flex: 0 0 38%; min-width: 0; }
.rf-fars-right { flex: 1 1 62%; min-width: 0; }

.rf-fars-card {
    background: var(--bg-dark-armor); border: 1px solid var(--border-strong); border-radius: 8px;
    padding: 1rem;
}
.rf-fars-card h2 { margin: 0 0 .75rem; font-size: 1em; }
.rf-fars-field { display: flex; flex-direction: column; gap: .2rem; margin-bottom: .6rem; }
.rf-fars-field label { font-size: .8em; color: var(--text-dim); }
.rf-fars-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.rf-fars-person-row { display: flex; gap: .4rem; margin-bottom: .35rem; align-items: center; }
.rf-fars-person-row input, .rf-fars-person-row select { flex: 1 1 0; min-width: 0; }

.rf-fars-section { margin-bottom: 1.25rem; }
.rf-fars-section h2 { display: flex; align-items: center; gap: .4rem; font-size: 1em; margin: 0 0 .5rem; }
.rf-fars-table-wrap { width: 100%; overflow-x: auto; }
.rf-fars-table { width: 100%; border-collapse: collapse; font-size: .9em; }
.rf-fars-table thead th {
    text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--border-strong);
    color: var(--text-dim); font-size: .8em; text-transform: uppercase; letter-spacing: .04em;
}
.rf-fars-table td { padding: .5rem .6rem; border-bottom: 1px solid var(--border-strong); }
.rf-fars-table tbody tr:hover { background: var(--bg-dark-armor-raised); }

.rf-fars-pill {
    display: inline-flex; align-items: center; padding: .1rem .55rem; border-radius: 999px;
    font-size: .8em; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.rf-fars-pill-open { background: rgba(217,119,6,.15); color: #f59e0b; border-color: rgba(217,119,6,.4); }
.rf-fars-pill-matched { background: rgba(16,185,129,.12); color: #34d399; border-color: rgba(16,185,129,.4); }
.rf-fars-pill-transmitted { background: rgba(0,229,255,.1); color: var(--accent-cyan-glow); border-color: rgba(0,229,255,.35); }

.rf-fars-ghost-btn {
    border: 1px solid var(--border-strong); background: transparent; color: var(--text-brushed-aluminum);
    font-size: .8em; padding: .2rem .6rem; border-radius: 6px; cursor: pointer;
}
.rf-fars-ghost-btn:hover:not(:disabled) { background: var(--bg-dark-armor-raised); }

/* Pre-reports / Transmitted tab strip - same visual language as the Work Zone tabs, own class
   names since a Razor page's style block isn't shared with another page. */
.rf-fars-tab {
    border: 1px solid var(--border-strong); border-radius: 999px; background: var(--bg-dark-armor);
    color: var(--text-brushed-aluminum); padding: .3rem .8rem; font-size: .85em; cursor: pointer;
}
.rf-fars-tab:hover { border-color: var(--accent-cyan-glow); }
.rf-fars-tab.active { border-color: var(--accent-cyan-glow); background: rgba(0,229,255,.08); color: var(--accent-cyan-glow); font-weight: 600; }
.rf-fars-filterbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .6rem 0; font-size: .9em; }
.rf-fars-filterbar label { color: var(--text-dim); }
/* Locked 100vh command center, same shape as /workzone/{id} - the image pane and the match/
   disposition panel both size off one fixed height instead of the page growing past the
   viewport. */
.rf-fcm-shell { height: calc(100vh - 9rem); display: flex; gap: 1rem; align-items: stretch; }
.rf-fcm-image { flex: 0 0 50%; min-width: 0; height: 100%; }
/* Mirrors ReportImagePanel's own label-line layout (see the Work Zone redesign's own fix for
   this exact top-alignment issue, 2026-09-14) so the two panes' bordered boxes start level. */
.rf-fcm-side-wrap { flex: 1 1 50%; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.rf-fcm-side-spacer { flex: 0 0 auto; font-size: .85em; margin-bottom: .25rem; visibility: hidden; }
.rf-fcm-side {
    flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
    background: var(--bg-dark-armor); border: 1px solid var(--border-strong); border-radius: 8px;
    overflow: hidden;
}
.rf-fcm-scroll { flex: 1 1 auto; overflow-y: auto; padding: 1rem; }

.rf-fcm-meta { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.rf-fcm-meta tr { border-bottom: 1px solid var(--border-strong); }
.rf-fcm-meta tr:last-child { border-bottom: none; }
.rf-fcm-meta td { padding: .4rem .1rem; vertical-align: top; }
.rf-fcm-meta td:first-child { width: 40%; color: var(--text-dim); font-size: .85em; }

.rf-fcm-banner {
    border: 1px solid rgba(16,185,129,.4); background: rgba(16,185,129,.1); color: #34d399;
    border-radius: 6px; padding: .5rem .7rem; margin-bottom: .75rem; font-size: .9em;
}
.rf-fcm-detail-card {
    border: 1px solid var(--border-strong); border-radius: 6px; padding: .75rem; margin-top: .5rem;
    background: var(--bg-dark-armor-raised);
}

.rf-fcm-command { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-strong); }
.rf-fcm-confirm {
    display: block; width: 100%; padding: .55rem; border-radius: 8px; font-weight: 600;
    background: #475569; border: 1px solid #475569; color: #fff; cursor: pointer;
}
.rf-fcm-confirm:hover:not(:disabled) { background: #64748b; }
.rf-fcm-confirm:disabled { opacity: .5; cursor: default; }

.rf-fcm-reject {
    margin-top: 1rem; padding: .75rem; border: 1px solid rgba(244,63,94,.35);
    background: rgba(244,63,94,.06); border-radius: 8px;
}
.rf-fcm-reject input { width: 100%; margin-bottom: .5rem; }
.rf-fcm-reject button {
    width: 100%; padding: .5rem; border-radius: 6px; font-weight: 600;
    background: transparent; border: 1px solid rgba(244,63,94,.6); color: #fb7185; cursor: pointer;
}
.rf-fcm-reject button:hover:not(:disabled) { background: rgba(244,63,94,.12); }
.rf-fcm-reject button:disabled { opacity: .5; cursor: default; }

/* No button anywhere used to reverse a wrong "not a fatal" click (Sean, 2026-09-14) - the
   backend always supported it, this just gives it a face. */
.rf-fcm-dismissed-banner {
    padding: .9rem; border: 1px solid rgba(244,63,94,.35); background: rgba(244,63,94,.06);
    border-radius: 8px; font-size: .95em;
}
.rf-fcm-undo {
    width: 100%; padding: .5rem; border-radius: 6px; font-weight: 600; cursor: pointer;
    background: transparent; border: 1px solid var(--accent-cyan-glow); color: var(--accent-cyan-glow);
}
.rf-fcm-undo:hover:not(:disabled) { background: rgba(0,229,255,.08); }
.rf-fcm-undo:disabled { opacity: .5; cursor: default; }
.rf-fs-header { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.rf-fs-header h1 { margin: 0; }

.rf-fs-filterbar {
    position: sticky; top: 0; z-index: 2; background: var(--bg-matte-carbon);
    border: 1px solid var(--border-strong); border-radius: 8px; padding: .75rem;
    margin-bottom: .75rem;
}
.rf-fs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.rf-fs-field { display: flex; flex-direction: column; gap: .2rem; }
.rf-fs-field label { font-size: .8em; color: var(--text-dim); }
.rf-fs-actions { display: flex; gap: .5rem; margin-top: .6rem; }

.rf-fs-table-wrap { width: 100%; overflow-x: auto; }
.rf-fs-table { width: 100%; border-collapse: collapse; font-size: .92em; }
.rf-fs-table thead th {
    text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--border-strong);
    color: var(--text-dim); font-size: .8em; text-transform: uppercase; letter-spacing: .04em;
    background: var(--bg-dark-armor-raised);
}
.rf-fs-table td { padding: .55rem .7rem; border-bottom: 1px solid var(--border-strong); }
.rf-fs-table tbody tr:hover { background: var(--bg-dark-armor-raised); }

.rf-fs-empty { padding: 2rem 1rem; text-align: center; color: var(--text-dim); }

@media (max-width: 900px) { .rf-fs-grid { grid-template-columns: repeat(2, 1fr); } }
/* ==== end of the Refinery copy ==== */

/* FARS Manifest's own header differs from the Refinery's (no dev-auth strip), so the locked match
   view gets a little more height. */
.rf-fcm-shell { height: calc(100vh - 8.5rem); }
.rf-report-label { flex: 0 0 auto; font-size: .85em; margin-bottom: .25rem; color: var(--accent-cyan-glow); }
.rf-report-label span { color: var(--text-dim); }
.rf-report-frame { flex: 1 1 auto; min-height: 0; width: 100%; border: 1px solid var(--border-strong); overflow: hidden; background: #fff; }
.rf-report-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.rf-report-frame.rf-report-empty { background: var(--bg-dark-armor); color: var(--text-dim); display: flex; align-items: center; justify-content: center; padding: 1rem; text-align: center; }
.rf-report-frame.rf-report-image { overflow: auto; background: #0c0d10; }
.rf-report-frame.rf-report-image img { display: block; width: 100%; }
h1:focus, h1:focus-visible { outline: none; }

/* ==== FARS Data Studio (/case/{id}) - Sean, 2026-09-26 UI spec ====
   100vh locked below the top-row: the page never scrolls; the document pane and the coding pane each
   scroll on their own. Semantic classes only, on the Refinery theme's tokens. */
:root {
    --studio-card-bg: #1e1e1e;
    --studio-card-border: #2a2d33;
    --studio-derived: #8b93a1;
    --studio-gap: #f59e0b;
}
main:has(.fars-studio) { padding: 0; overflow: hidden; display: flex; }
.fars-studio { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; height: 100%; width: 100%; }

.studio-bar {
    flex: 0 0 auto; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
    padding: .55rem 1rem; background: var(--bg-dark-armor); border-bottom: 1px solid var(--border-strong);
    position: sticky; top: 0; z-index: 5;
}
.studio-title { font-weight: 600; color: #f3f4f6; }
.studio-status { font-size: .85em; color: var(--good); }
.studio-status.is-error { color: var(--danger); }
.studio-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.btn-primary {
    background: var(--accent-cyan-glow); border: 1px solid var(--accent-cyan-glow); color: #001a1f;
    font-weight: 700; border-radius: 8px; padding: .45em 1em; cursor: pointer;
}
.btn-primary:hover:not(:disabled) { background: #67f0ff; border-color: #67f0ff; }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.studio-warning {
    flex: 0 0 auto; padding: .35rem 1rem; font-size: .85em; color: #fca5a5;
    background: rgba(239, 68, 68, .08); border-bottom: 1px solid rgba(239, 68, 68, .3);
}

.studio-body { flex: 1 1 auto; min-height: 0; display: flex; }
.document-pane {
    flex: 0 0 44%; width: 44%; min-width: 0; padding: .6rem; display: flex; flex-direction: column;
    border-right: 1px solid var(--border-strong); background: var(--bg-matte-carbon);
}
.coding-pane { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; background: var(--bg-matte-carbon); }

.studio-tabs {
    flex: 0 0 auto; display: flex; gap: .25rem; padding: .5rem .75rem 0; overflow-x: auto;
    border-bottom: 1px solid var(--border-strong); background: var(--bg-dark-armor);
}
.studio-tab {
    background: transparent; border: 1px solid transparent; border-bottom: none; border-radius: 8px 8px 0 0;
    color: var(--text-dim); padding: .45rem .85rem; font-size: .9em; white-space: nowrap;
}
.studio-tab:hover:not(:disabled) { color: var(--text-brushed-aluminum); border-color: transparent; }
.studio-tab.active {
    color: var(--accent-cyan-glow); background: var(--bg-matte-carbon);
    border-color: var(--border-strong); font-weight: 600; margin-bottom: -1px;
}
/* The FARS work happens on this tab - make it findable (Sean, 2026-09-28: "i don't see that tab"). */
.studio-tab.studio-tab-gap { color: var(--accent-cyan-glow); border: 1px solid var(--accent-cyan-glow); border-bottom: none; font-weight: 600; }
.studio-tab.studio-tab-gap:not(.active) { background: rgba(0, 229, 255, .08); }
.studio-tab.studio-tab-gap:hover:not(:disabled) { color: var(--accent-cyan-glow); border-color: var(--accent-cyan-glow); background: rgba(0, 229, 255, .14); }
.coding-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: .9rem 1rem 2rem; }
.studio-empty { color: var(--text-dim); font-style: italic; padding: .75rem 0; }

.studio-pills { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .75rem; align-items: center; }
.studio-pills-sub { margin-top: -.25rem; padding-left: .75rem; border-left: 2px solid var(--border-strong); }
.studio-pill {
    display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--border-strong);
    border-radius: 999px; background: var(--bg-dark-armor); color: var(--text-brushed-aluminum);
    padding: .25rem .75rem; font-size: .85em;
}
.studio-pill.active { border-color: var(--accent-cyan-glow); color: var(--accent-cyan-glow); background: rgba(0, 229, 255, .08); }
.studio-pill-label, .studio-pill-x { background: none; border: none; padding: 0; color: inherit; font-size: 1em; }
.studio-pill-x { color: #fb7185; font-size: 1.05em; line-height: 1; }
.studio-pill-sub { color: var(--text-dim); font-size: .85em; }

.field-card {
    background: var(--studio-card-bg); border: 1px solid var(--studio-card-border); border-radius: 6px;
    padding: .85rem 1rem; margin-bottom: .75rem;
}
.field-card-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.field-card-head h3 { margin: 0; font-size: .95em; }
.derived-badge, .gap-badge {
    margin-left: auto; font-size: .7em; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    border-radius: 4px; padding: .1rem .45rem; white-space: nowrap;
}
.derived-badge { color: var(--studio-derived); border: 1px solid var(--border-strong); }
.gap-badge { color: var(--studio-gap); border: 1px solid rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .08); }
.gap-elements { font-size: .78em; color: var(--accent-cyan-glow); font-family: Consolas, "SFMono-Regular", Menlo, monospace; }

.kv-grid { display: grid; grid-template-columns: minmax(10rem, 38%) 1fr; margin: 0; }
.kv-grid dt, .kv-grid dd { margin: 0; padding: .32rem .25rem; border-bottom: 1px solid var(--border-subtle); font-size: .9em; }
.kv-grid dt { color: var(--text-dim); }
.kv-grid dd { color: var(--text-brushed-aluminum); display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.kv-grid dt:nth-last-child(2), .kv-grid dd:last-child { border-bottom: none; }
.code-badge {
    display: inline-block; min-width: 1.6rem; text-align: center; font-family: Consolas, "SFMono-Regular", Menlo, monospace;
    font-size: .82em; color: var(--accent-cyan-glow); background: rgba(0, 229, 255, .08);
    border: 1px solid rgba(0, 229, 255, .25); border-radius: 4px; padding: 0 .35rem;
}
.code-unknown { color: var(--warn); font-size: .85em; font-style: italic; }

.gap-header { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.gap-sections { display: flex; flex-wrap: wrap; gap: .4rem; }
.gap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem .9rem; }
.gap-field { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.gap-field-wide { grid-column: 1 / -1; }
.gap-field > label { font-size: .8em; color: var(--text-dim); display: flex; align-items: center; gap: .3rem; }
.gap-field select, .gap-field input[type=text] { width: 100%; box-sizing: border-box; font-size: .88em; }
.gap-card .multi-coded { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .2rem .8rem; }
.gap-card .multi-option { display: flex; align-items: baseline; gap: .35rem; font-size: .85em; color: var(--text-brushed-aluminum); }

.studio-copy { margin-left: auto; padding: .25rem .7rem; font-size: .85em; }
.wire-xml {
    margin: 0; max-height: none; overflow: auto; white-space: pre; font-size: .78em; line-height: 1.45;
    background: #111; border: 1px solid var(--studio-card-border); border-radius: 4px; padding: .75rem; color: #cbd5e1;
}

/* ---- Case file: every document in the fatal case (Sean, 2026-09-26) ---- */
.case-file { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.case-file-bar { flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; flex-wrap: wrap; }
.case-file-title { font-size: .85em; color: var(--accent-cyan-glow); white-space: nowrap; }
.case-file-picker { flex: 1 1 14rem; min-width: 0; font-size: .85em; padding: .3rem .5rem; }
.case-file-msg { flex: 0 0 auto; font-size: .82em; color: var(--good); margin-bottom: .35rem; }
.case-file-msg.is-error { color: var(--danger); }
.case-file-view { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.report-box .case-file { height: 100%; padding: .5rem; }

.gap-badge-update { color: var(--accent-cyan-glow); border-color: rgba(0, 229, 255, .4); background: rgba(0, 229, 255, .08); }

/* new-document notice strip in the Data Studio */
.studio-notice {
    flex: 0 0 auto; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .4rem 1rem; font-size: .88em;
    color: #fcd34d; background: rgba(245, 158, 11, .08); border-bottom: 1px solid rgba(245, 158, 11, .35);
}
.studio-notice strong { color: #fbbf24; font-weight: 600; }
.studio-notice-actions { margin-left: auto; display: flex; gap: .4rem; }

/* signed-in user, top-right (dev: Switch user) */
.top-user { margin-left: auto; display: inline-flex; align-items: center; gap: .5rem; font-size: .85em; color: var(--text-dim); }
.top-user-dev { font-size: .7em; text-transform: uppercase; letter-spacing: .05em; color: #f59e0b; border: 1px solid rgba(245,158,11,.45); border-radius: 4px; padding: 0 .3rem; }
.top-user-switch { font-size: .9em; padding: .2rem .4rem; }
/* Demo "Try it as" (Sean, 2026-09-28: "slide it left about two inches and make it stand out"). */
.top-user-switch.demo-try {
    margin-right: 2in; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent-glow);
    font-weight: 700; padding: .35rem .7rem; border-radius: 6px; cursor: pointer;
    box-shadow: 0 0 0 2px rgba(0, 229, 255, .25), 0 0 14px rgba(0, 229, 255, .55);
}
.top-user-switch.demo-try:hover { background: var(--accent-glow); }
.top-user-switch.demo-try option { background: var(--bg-dark-armor); color: var(--text-brushed-aluminum); font-weight: 400; }
@media (max-width: 800px) { .top-user-switch.demo-try { margin-right: 0; } }

/* ---- Reading tools + highlight / magnify (Sean, 2026-09-26) ---- */
.studio-readbar { flex: 0 0 auto; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-bottom: .45rem; font-size: .82em; }
.studio-readbar button, .studio-readbar select { padding: .25rem .55rem; font-size: 1em; }
.studio-readbar button[aria-pressed="true"] { border-color: var(--accent-cyan-glow); color: var(--accent-cyan-glow); }
.studio-popout { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-dim); cursor: pointer; }
.studio-popout input { width: auto; margin: 0; }
.rv-frame { background: #0d0d0d; }

/* state-derived rows (grid rows so the reading guide can dim / lift one at a time) */
.kv-grid { display: block; }
.kv-row { display: grid; grid-template-columns: minmax(10rem, 38%) 1fr 2rem; align-items: baseline; border-bottom: 1px solid var(--border-subtle); }
.kv-row:last-child { border-bottom: none; }
.kv-label, .kv-value { padding: .32rem .25rem; font-size: .9em; }
.kv-label { color: var(--text-dim); }
.kv-value { color: var(--text-brushed-aluminum); display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; }
.kv-locate { text-align: right; }
.kv-active { background: rgba(0, 229, 255, .07); box-shadow: inset 3px 0 0 var(--accent-cyan-glow); }
.locate-btn { background: none; border: 1px solid transparent; padding: .05rem .3rem; font-size: .9em; cursor: pointer; border-radius: 5px; line-height: 1.2; }
.locate-btn:hover:not(:disabled) { border-color: var(--accent-cyan-glow); }
.field-card-head .locate-btn { font-size: .8em; color: var(--accent-cyan-glow); }

/* reading guide: everything dims, the row you're on (hover or the one you jumped to) stays full */
.fars-studio.rv-guide .kv-row, .fars-studio.rv-guide .gap-field { opacity: .5; transition: opacity .15s ease; }
.fars-studio.rv-guide .kv-row:hover, .fars-studio.rv-guide .kv-row.kv-active,
.fars-studio.rv-guide .gap-field:hover, .fars-studio.rv-guide .gap-field:focus-within { opacity: 1; }

/* scan filters reach the inline report iframe here (a popped-out window colors itself) */
.fars-studio.rv-scan-inverted .rv-frame iframe { filter: invert(1); }
.fars-studio.rv-scan-boosted .rv-frame iframe { filter: contrast(1.6) brightness(1.05); }
.fars-studio.rv-scan-grayscale .rv-frame iframe { filter: grayscale(1) contrast(1.15); }

/* day mode for the Data Studio (the Refinery's review screens have the same choice) */
.fars-studio[data-theme="day"] {
    --bg-matte-carbon: #f7f7f5; --bg-dark-armor: #eef0f2; --bg-dark-armor-raised: #ffffff;
    --text-brushed-aluminum: #16181d; --text-dim: #55606e; --accent-cyan-glow: #007c91;
    --border-subtle: rgba(0,0,0,.08); --border-strong: rgba(0,0,0,.18);
    --studio-card-bg: #ffffff; --studio-card-border: #d7dbe0;
    background: var(--bg-matte-carbon); color: var(--text-brushed-aluminum);
}
.fars-studio[data-theme="day"] h1, .fars-studio[data-theme="day"] h2, .fars-studio[data-theme="day"] h3, .fars-studio[data-theme="day"] .studio-title { color: #16181d; }
.fars-studio[data-theme="day"] button, .fars-studio[data-theme="day"] input, .fars-studio[data-theme="day"] select, .fars-studio[data-theme="day"] textarea {
    background: #ffffff; color: #16181d; border-color: rgba(0,0,0,.25);
}
.fars-studio[data-theme="day"] .btn-primary { background: #007c91; border-color: #007c91; color: #fff; }
.fars-studio[data-theme="day"] .wire-xml { background: #f3f4f6; color: #1f2937; }
.fars-studio[data-theme="day"] .rv-frame { background: #f7f7f5; }

/* public demo banner */
.demo-banner { flex: 0 0 auto; padding: .35rem 1rem; font-size: .85em; color: #fcd34d; background: rgba(245, 158, 11, .1); border-bottom: 1px solid rgba(245, 158, 11, .35); }
.demo-banner strong { color: #fbbf24; }
.demo-reset { margin-left: .75rem; padding: .1rem .6rem; font-size: .95em; background: transparent; color: #fcd34d; border: 1px solid rgba(245,158,11,.5); border-radius: 6px; }
.demo-reset:hover:not(:disabled) { border-color: #fbbf24; }
.demo-manual { margin-left: .5rem; padding: .1rem .7rem; font-size: .95em; font-weight: 600; color: #1a1300; background: #fcd34d; border: 1px solid #fbbf24; border-radius: 6px; text-decoration: none; }
.demo-manual:hover { background: #fde68a; text-decoration: none; }
