/*
    brochureCorpus UI — one stylesheet for every page.

    External rather than inline: helmet's default CSP is script-src/style-src 'self', so an
    inline <style> or <script> is refused and the page renders bare.

    The availability palette is load-bearing, not decoration. The corpus distinguishes four
    states and `unstated` is NOT `not_offered` — a brochure that never mentions a feature has
    made no claim about it. So `unstated` is drawn as a muted dash, never as a red cross, and
    never in the same colour family as a real negative.
*/

:root {
    --bg: #0f1115;
    --panel: #171a21;
    --panel-2: #1e222b;
    --line: #2a2f3a;
    --text: #e6e9ef;
    --muted: #9aa4b5;
    --dim: #6b7488;
    --accent: #5b9dff;
    --standard: #48c98a;
    --available: #d9b03c;
    --not-offered: #e05c6e;
    --unstated: #5a6478;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 22px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
}

header .brand { font-weight: 700; letter-spacing: .2px; }
header .brand span { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 12px; }

nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a {
    padding: 6px 11px;
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
}
nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
nav a.active { background: var(--panel-2); color: var(--text); }

main { padding: 22px; max-width: 1400px; margin: 0 auto; }

h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 26px 0 10px; color: var(--text); }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
}
.card .n { font-size: 24px; font-weight: 600; }
.card .k { color: var(--muted); font-size: 12px; margin-top: 2px; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
tbody tr:hover { background: var(--panel-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

.bar { height: 8px; border-radius: 4px; background: var(--panel-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.bar i.standard { background: var(--standard); }
.bar i.available { background: var(--available); }
.bar i.not_offered { background: var(--not-offered); }
.bar i.unstated { background: var(--unstated); }

.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.legend span::before {
    content: "";
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 2px;
    margin-right: 5px;
}
.legend .standard::before { background: var(--standard); }
.legend .available::before { background: var(--available); }
.legend .not_offered::before { background: var(--not-offered); }
.legend .unstated::before { background: var(--unstated); }

/* Availability cells. `unstated` is a dash, never a cross — see the header note. */
.av { font-weight: 600; font-size: 13px; }
.av.standard { color: var(--standard); }
.av.available { color: var(--available); }
.av.not_offered { color: var(--not-offered); }
.av.unstated { color: var(--unstated); font-weight: 400; }

.pill {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 20px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
}

input, select, textarea, button {
    font: inherit;
    color: var(--text);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 10px;
}
input:focus, select:focus, textarea:focus { outline: 1px solid var(--accent); }
button { cursor: pointer; background: var(--accent); color: #08111f; border-color: transparent; font-weight: 600; }
button:hover { filter: brightness(1.08); }
button.ghost { background: var(--panel-2); color: var(--text); border-color: var(--line); font-weight: 500; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }

pre {
    background: #0b0d12;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    overflow: auto;
    max-height: 60vh;
    font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #cfd6e4;
}

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }

.muted { color: var(--muted); }
.dim { color: var(--dim); }
.warn { color: var(--available); }
.bad { color: var(--not-offered); }
.good { color: var(--standard); }
.small { font-size: 12px; }
.right { text-align: right; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.split { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.list { max-height: 70vh; overflow: auto; }
.list .item { padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.list .item:hover { background: var(--panel-2); }
.list .item.sel { background: var(--panel-2); border-left: 2px solid var(--accent); }

.empty { color: var(--muted); padding: 22px; text-align: center; }
.err { color: var(--not-offered); padding: 10px 0; }

/* Spacing utilities. Inline style="" attributes are refused under style-src 'self', so every
   one-off margin needs a class rather than an attribute. */
.mt-0 { margin-top: 0; }
.mt-1 { margin: 10px 0 0; }
.mt-2 { margin-top: 12px; }
.note { margin: 10px 0 0; }
