/* Actsharper user app: the admin app's design (Actsharper.Admin/wwwroot/css/admin.css) in a light and a dark theme
   (decision U2 in docs/admin-app.md). The theme follows the system unless the user picks one: the choice is the
   cookie "theme", which the server writes as data-theme on <html> so the page renders in it without a flash. */

:root {
    color-scheme: light;
    --bg: #f6f7f9;
    --panel: #ffffff;
    --panel-2: #eef1f5;
    --border: #e1e5eb;
    --border-strong: #cdd4de;
    --text: #141a24;
    --muted: #4f5a6b;
    --faint: #5f6a7b;

    --brand: #2e4c8c;           /* the logo */
    --accent: #2e4c8c;
    --accent-text: #ffffff;
    --accent-soft: rgba(46, 76, 140, 0.08);
    --button-primary: #2e4c8c;
    --button-primary-hover: #26407a;

    --code-bg: #10141c;
    --code-text: #e4e8ef;

    --ok: #1f7a4d;
    --ok-soft: rgba(31, 122, 77, 0.1);
    --warn: #8a5a06;
    --warn-soft: rgba(176, 112, 10, 0.1);
    --err: #b42318;
    --err-soft: rgba(180, 35, 24, 0.08);

    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --radius: 10px;
    --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

/* The admin app's dark palette. Repeated: once for "follow the system", once for an explicit choice. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #0a0d13;
        --panel: #10141c;
        --panel-2: #151b25;
        --border: #1f2733;
        --border-strong: #2b3646;
        --text: #e4e8ef;
        --muted: #9aa5b8;
        --faint: #7d8899;
        --accent: #6d94ea;
        --accent-text: #0a0d13;
        --accent-soft: rgba(109, 148, 234, 0.12);
        --button-primary: #2e4c8c;
        --button-primary-hover: #355aa3;
        --code-bg: #05070b;
        --code-text: #e4e8ef;
        --ok: #3fb97f;
        --ok-soft: rgba(63, 185, 127, 0.12);
        --warn: #e0a83a;
        --warn-soft: rgba(224, 168, 58, 0.12);
        --err: #f0675e;
        --err-soft: rgba(240, 103, 94, 0.1);
        --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0a0d13;
    --panel: #10141c;
    --panel-2: #151b25;
    --border: #1f2733;
    --border-strong: #2b3646;
    --text: #e4e8ef;
    --muted: #9aa5b8;
    --faint: #7d8899;
    --accent: #6d94ea;
    --accent-text: #0a0d13;
    --accent-soft: rgba(109, 148, 234, 0.12);
    --button-primary: #2e4c8c;
    --button-primary-hover: #355aa3;
    --code-bg: #05070b;
    --code-text: #e4e8ef;
    --ok: #3fb97f;
    --ok-soft: rgba(63, 185, 127, 0.12);
    --warn: #e0a83a;
    --warn-soft: rgba(224, 168, 58, 0.12);
    --err: #f0675e;
    --err-soft: rgba(240, 103, 94, 0.1);
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 var(--sans);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }

.mono, code { font-family: var(--mono); font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 0.87em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Brand ─────────────────────────────────────────────────────────── */

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { display: block; border-radius: 6px; }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; color: var(--text); }

/* ── Buttons, forms, alerts ────────────────────────────────────────── */

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid var(--border-strong);
    background: var(--panel);
    color: var(--text);
    border-radius: 8px;
    padding: 0 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.button:hover { border-color: var(--accent); text-decoration: none; }
.button-primary { background: var(--button-primary); border-color: var(--button-primary); color: #fff; }
.button-primary:hover { background: var(--button-primary-hover); border-color: var(--button-primary-hover); }
.button-ghost { border-color: transparent; background: none; }
.button-ghost:hover { border-color: var(--border-strong); }
.button-large { min-height: 48px; padding: 0 22px; }
.button-small { min-height: 36px; padding: 0 12px; font-size: 0.9rem; }
.button-danger { color: var(--err); }
.button-danger:hover { border-color: var(--err); background: var(--err-soft); }

.icon-button {
    width: 44px; height: 44px;
    display: inline-grid; place-items: center;
    border: 1px solid var(--border-strong); border-radius: 8px;
    background: var(--panel); color: var(--muted);
    cursor: pointer;
}
.icon-button:hover { color: var(--text); border-color: var(--accent); }
.icon-button svg, .button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The theme toggle shows the sun in the dark theme and the moon in the light one. */
.theme-icon-dark { display: none; }
:root[data-theme="dark"] .theme-icon-dark { display: block; }
:root[data-theme="dark"] .theme-icon-light { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .theme-icon-dark { display: block; }
    :root:not([data-theme]) .theme-icon-light { display: none; }
}

.form { display: flex; flex-direction: column; gap: 18px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form .hint { font-size: 0.85rem; font-weight: 400; color: var(--muted); }
.field-error { font-size: 0.85rem; font-weight: 400; color: var(--err); }
.field-error:empty { display: none; }

input[type=email], input[type=password], input[type=text], input[type=tel] {
    min-height: 44px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text);
    font: inherit;
    font-weight: 400;
    padding: 0 12px;
    outline: none;
    width: 100%;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox] { accent-color: var(--accent); width: 16px; height: 16px; }

.alert { border-radius: 8px; padding: 12px 14px; font-size: 0.92rem; border: 1px solid; }
.alert-error { color: var(--err); background: var(--err-soft); border-color: color-mix(in srgb, var(--err) 40%, transparent); }
.alert-ok { color: var(--ok); background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.alert-warn { color: var(--warn); background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }

.code-row { display: flex; flex-wrap: wrap; gap: 8px; }
.code {
    flex: 1 1 300px;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    background: var(--code-bg);
    color: var(--code-text);
    border: 0;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: var(--mono);
    font-size: 0.87rem;
}
input.code { min-height: 44px; }
code.code { display: block; flex: none; }

/* ── Public pages: header, sections, footer ────────────────────────── */

.site-header { border-bottom: 1px solid var(--border); background: var(--panel); }
.site-header-inner, .section-inner, .site-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}
.site-header-inner { padding-top: 14px; padding-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.hero { padding-top: 72px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.eyebrow { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); letter-spacing: 0.02em; }
.hero h1 { font-size: 2.75rem; line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .actions { padding-top: 8px; }

.sheet { flex: 1 1 460px; min-width: 0; margin: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--panel); box-shadow: var(--shadow); }
.sheet-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: 0.85rem; }
.sheet-bar .fx { color: var(--muted); font-style: italic; }
.sheet-bar .formula { overflow-x: auto; white-space: nowrap; }
.sheet-grid { overflow-x: auto; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.sheet th { padding: 4px 8px; border: 1px solid var(--border); background: var(--panel-2); color: var(--muted); font-weight: 500; }
.sheet thead th:first-child { width: 36px; }
.sheet td { padding: 6px 10px; border: 1px solid var(--border); }
.sheet td.name { font-family: var(--mono); }
.sheet td.active { border: 2px solid var(--accent); }
.sheet td.label { color: var(--muted); }
.sheet td.strong { font-weight: 600; }
.sheet figcaption { padding: 10px 12px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--muted); }
.sheet figcaption code { color: var(--text); overflow-wrap: anywhere; }

.section { border-top: 1px solid var(--border); }
.section-alt { background: var(--panel); }
.section .section-inner { padding-top: 64px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 32px; }
.section h2 { font-size: 1.65rem; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.feature { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.feature h3 { font-size: 1.05rem; }
.feature p { color: var(--muted); }
.feature svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.steps li { display: flex; gap: 14px; }
.steps h3 { font-size: 1rem; margin-bottom: 4px; }
.steps p { color: var(--muted); }
.step-number { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; }

.coming .section-inner { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 24px; padding-top: 56px; padding-bottom: 56px; }
.coming-head { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.coming-head h2 { font-size: 1.4rem; }
.coming p { flex: 2 1 480px; min-width: 0; color: var(--muted); }
.tag { align-self: flex-start; font-family: var(--mono); font-size: 0.78rem; color: var(--accent); border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 10px; }

.cta .section-inner { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }

.site-footer { border-top: 1px solid var(--border); background: var(--panel); }
.site-footer-inner { padding-top: 24px; padding-bottom: 24px; font-size: 0.85rem; color: var(--muted); }

/* Request access: text on the left, the form in a panel on the right. */
.split { padding-top: 56px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 48px; align-items: flex-start; }
.split-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.split-text h1 { font-size: 2.1rem; line-height: 1.15; letter-spacing: -0.02em; }
.split-text .next { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.split-text .next h2 { font-size: 0.95rem; }
.split-text ol { margin: 0; padding-left: 20px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.panel { flex: 1 1 440px; min-width: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 28px; }
.done { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.done h2 { font-size: 1.25rem; }
.check-badge { width: 40px; height: 40px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.check-badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

/* ── Account pages (login, passwords) ──────────────────────────────── */

.auth-main { min-height: calc(100vh - 73px); display: grid; place-items: center; padding: 40px 16px; }
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.4rem; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 0.9rem; }

/* ── Logged in: sidebar + main ─────────────────────────────────────── */

.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; font-size: 14px; }

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 18px 12px;
}
.sidebar-top { display: flex; align-items: center; }
.sidebar-brand { padding: 2px 8px 18px; }
.sidebar-menu { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.menu-button { display: none; }
.menu-icon-close { display: none; }
.menu-button[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-button[aria-expanded="true"] .menu-icon-close { display: block; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-section {
    margin: 16px 10px 6px;
    color: var(--faint);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 500;
}
.nav-item svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
a.nav-item:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav-item.active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.active svg { color: var(--accent); }
.nav-item.soon { cursor: default; }
.soon-tag { margin-left: auto; font-size: 0.7rem; border: 1px solid var(--border-strong); border-radius: 999px; padding: 0 7px; }

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding: 14px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.who { display: flex; flex-direction: column; min-width: 0; }
.who-name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-company { color: var(--muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-actions { display: flex; gap: 8px; }
.sidebar-actions form { flex: 1; display: flex; }
.sidebar-actions .button { flex: 1; min-height: 40px; padding: 0 10px; font-weight: 500; }
.sidebar-actions .icon-button { width: 40px; height: 40px; flex-shrink: 0; }

.env {
    align-self: flex-start;
    font-family: var(--mono);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    color: var(--warn);
}

.main { min-width: 0; padding: 32px 40px 48px; }
.page { max-width: 860px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head h1 { font-size: 1.55rem; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.card h2 { font-size: 1rem; }
.card-accent { border-color: var(--accent); }

.checklist { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 16px; }
.checklist > li { display: flex; flex-direction: row; gap: 14px; }
.checklist .step-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.checklist h2 + p { margin-top: -8px; }
.step-mark { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 999px; display: grid; place-items: center; font-weight: 700; background: var(--panel-2); color: var(--muted); }
.step-mark.done { background: var(--ok-soft); color: var(--ok); }
.step-mark.current { background: var(--accent-soft); color: var(--accent); }
.step-mark svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.divider { border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form label { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }

.new-key { display: flex; flex-direction: column; gap: 10px; border-radius: 8px; background: var(--warn-soft); padding: 14px; }
.new-key strong { color: var(--warn); }

/* position: relative makes the wrapper the containing block of absolutely positioned content (.visually-hidden labels in
   table headers), so it scrolls with the table instead of widening the page on a phone. */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th {
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-strong);
    white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr.inactive td { color: var(--muted); }
.table td.actions { text-align: right; white-space: nowrap; }

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    padding: 1px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    white-space: nowrap;
    color: var(--muted);
}
.badge-ok { color: var(--ok); background: var(--ok-soft); border-color: transparent; }

/* ── Small screens ─────────────────────────────────────────────────── */

@media (max-width: 720px) {
    .hero { padding-top: 40px; gap: 32px; }
    .hero h1 { font-size: 2rem; }
    .section .section-inner { padding-top: 44px; padding-bottom: 44px; }
    .split { padding-top: 32px; gap: 32px; }
    .panel { padding: 20px; }

    .shell { grid-template-columns: 1fr; }
    /* The sidebar becomes a sticky top bar (logo + menu button); the menu opens as a drawer beneath it. */
    .sidebar { top: 0; z-index: 20; height: auto; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
    .sidebar.open { box-shadow: var(--shadow); }
    .sidebar-top { justify-content: space-between; gap: 12px; }
    .sidebar-brand { padding: 0; }
    .menu-button { display: inline-grid; place-items: center; width: 40px; height: 40px; }
    .sidebar-menu { max-height: calc(100dvh - 61px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 0 6px; }
    .js .sidebar:not(.open) .sidebar-menu { display: none; }
    .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 6px; }
    .nav-section { grid-column: 1 / -1; margin: 14px 10px 4px; }
    .nav-item { min-height: 44px; }
    .nav-item.soon { display: none; }
    .sidebar-footer { margin-top: 14px; padding: 12px 4px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; }
    .sidebar-footer .env { grid-column: 1 / -1; justify-self: start; }
    .sidebar-actions .button { flex: 0 0 auto; padding: 0 14px; }
    .main { padding: 20px 16px 40px; }
}

/* ── Documentation (phase U2) ──────────────────────────────────────── */

.page-wide { max-width: 1120px; }
.docs { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: start; }
.docs-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a { color: var(--muted); padding: 7px 10px; border-radius: 7px; font-weight: 500; }
.docs-nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.docs-nav a.active { color: var(--text); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }

.prose { min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; }
.prose h2 { font-size: 1.25rem; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1rem; margin-top: 8px; }
.prose p, .prose li { color: var(--text); }
.prose ul, .prose ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.prose code:not(pre code) { background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; font-size: 0.86em; overflow-wrap: anywhere; }
.prose .lead-text { font-size: 1.05rem; color: var(--muted); }
.prose .note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; }
.prose .table-wrap { border: 1px solid var(--border); border-radius: 8px; }
.prose .table { font-size: 0.88rem; }
.prose .table th, .prose .table td { vertical-align: top; }
.prose .table td:first-child { white-space: nowrap; }

.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--mono); font-size: 0.92rem; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
.method { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 5px; background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--warn-soft); color: var(--warn); }

.codeblock { margin: 0; border-radius: 8px; overflow: hidden; background: var(--code-bg); border: 1px solid var(--border); }
.codeblock figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 12px; font-family: var(--mono); font-size: 0.75rem; color: #9aa5b8; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.codeblock pre { margin: 0; padding: 12px 14px; overflow-x: auto; }
.codeblock code { font-family: var(--mono); font-size: 0.84rem; line-height: 1.55; color: var(--code-text); white-space: pre; }
.codeblock .link-button { color: #9db7f0; }

.link-button { background: none; border: none; padding: 0; color: var(--accent); font: inherit; cursor: pointer; white-space: nowrap; }
.link-button:hover { text-decoration: underline; }

.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.doc-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: var(--text); }
.doc-card:hover { border-color: var(--accent); text-decoration: none; }
.doc-card strong { color: var(--text); }
.doc-card span { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 900px) {
    .docs { grid-template-columns: 1fr; gap: 16px; }
    .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .docs-nav a { padding: 6px 10px; border: 1px solid var(--border); }
}

/* ── Usage (phase U2) ──────────────────────────────────────────────── */
/* Chart colours: series slot 1 and status critical of the dataviz reference palette, validated (2026-11-24) on the
   light panel #ffffff and the dark panel #10141c: CVD ΔE ≥ 23.8, normal-vision ΔE ≥ 31.6, contrast ≥ 3:1. */
:root { --series-1: #2a78d6; --series-err: #d03b3b; }
:root[data-theme="dark"] { --series-1: #3987e5; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --series-1: #3987e5; } }

.segmented { display: inline-flex; align-self: flex-start; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); }
.segmented a { padding: 6px 12px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.segmented a:hover { color: var(--text); text-decoration: none; background: var(--panel-2); }
.segmented a.active { background: var(--accent-soft); color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.stat-label { color: var(--muted); font-size: 0.82rem; font-weight: 500; }
.stat-value { font-family: var(--mono); font-size: 1.7rem; font-weight: 600; margin: 2px 0; letter-spacing: -0.02em; }
.stat-value-small { font-size: 1.05rem; padding: 8px 0 5px; }
.stat-note { color: var(--faint); font-size: 0.8rem; }
.warn-text { color: var(--warn); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

.usage-chart { position: relative; }
.usage-chart svg { display: block; width: 100%; height: auto; }
.usage-hover { fill: var(--panel-2); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 8px; font-size: 0.88rem; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.chart-grid line { stroke: var(--border); stroke-width: 1; }
.chart-tick { fill: var(--faint); font: 11px var(--mono); }
.chart-tip {
    position: absolute; pointer-events: none; z-index: 2;
    background: var(--panel); border: 1px solid var(--border-strong); border-radius: 8px;
    padding: 8px 10px; font-size: 0.85rem; box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 4px; min-width: 150px;
}
.chart-tip[hidden] { display: none; }
.chart-tip > div { display: flex; align-items: center; gap: 8px; }
.chart-tip-x { color: var(--muted); font-family: var(--mono); }
.table-toggle summary { cursor: pointer; color: var(--accent); font-size: 0.9rem; }
.table-toggle .table-wrap { max-height: 320px; overflow: auto; margin-top: 8px; }

@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
input[readonly] { color: var(--muted); background: var(--panel-2); }

/* ── Bases (phase U3) ──────────────────────────────────────────────── */

.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters input[type=search] { flex: 1 1 260px; min-width: 0; width: auto; }
.filters .check, label.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 0.9rem; }
input[type=search] {
    min-height: 44px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px;
    color: var(--text); font: inherit; padding: 0 12px; outline: none;
}
select {
    min-height: 44px; max-width: 100%;
    background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text);
    font: inherit; padding: 0 32px 0 12px; appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
    background-size: 5px 5px; background-repeat: no-repeat;
}
select:focus, input[type=search]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.htmx-request #bases-results, #bases-results.htmx-request { opacity: 0.6; transition: opacity 0.15s; }
.nowrap { white-space: nowrap; }
.badge-warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }

.basis-head { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.prewrap { white-space: pre-line; }

.eval { display: flex; flex-wrap: wrap; gap: 10px; }
.eval input { flex: 1 1 260px; min-width: 0; width: auto; }
.eval-slot:empty { display: none; }
.eval-result { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--bg); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.eval-result.ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.eval-result.err { border-color: color-mix(in srgb, var(--err) 45%, transparent); }
.eval-value { color: var(--ok); font-weight: 600; font-size: 1rem; }
.eval-error { color: var(--err); font-size: 0.9rem; }

.formulas { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.formula { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; background: var(--bg); min-width: 0; }
.formula-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.formula-sig { color: var(--accent); font-weight: 600; word-break: break-all; }
.formula-actions { display: inline-flex; gap: 12px; }
.formula-desc { font-size: 0.88rem; margin-top: 6px; }
.params { margin: 8px 0 0; padding-left: 18px; font-size: 0.84rem; }
.params li { margin: 2px 0; }

/* The chart (wwwroot/js/chart.js, from the admin app). Series colours: the reference palette's light steps validated on
   #ffffff (CVD ΔE ≥ 9.1, normal-vision ΔE ≥ 19.6; three below 3:1 contrast, relieved by the legend, the numbered line
   ends and the table view) and its dark steps on #10141c (CVD ΔE ≥ 8.4, all ≥ 3:1). Fixed order, never cycled. */
.chart-card { --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4; --series-6: #008300; --series-7: #6250d6; --series-8: #e34948; }
:root[data-theme="dark"] .chart-card { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #0ca30c; --series-7: #9085e9; --series-8: #e66767; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .chart-card { --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181; --series-6: #0ca30c; --series-7: #9085e9; --series-8: #e66767; }
}
.chart-form { display: flex; flex-direction: column; gap: 10px; }
.chart-rows { display: flex; flex-direction: column; gap: 8px; }
.chart-row { display: grid; grid-template-columns: auto 2fr 1.4fr auto; gap: 8px; align-items: center; }
.chart-row input { min-width: 0; }
.chart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.chart-controls label { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.88rem; }
input[type=number] { min-height: 40px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text); font: inherit; padding: 0 10px; outline: none; }
input[type=number]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input.narrow { width: 84px; }
.swatch { display: inline-grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 5px; font: 700 0.7rem/1 var(--mono); color: #fff; }
.chart-status:empty { display: none; }
.chart-status { color: var(--muted); }
.chart-status.err { color: var(--err); }
.chart-plot { position: relative; width: 100%; }
.chart-plot svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid line.axis, .chart-grid line.tick { stroke: var(--border-strong); }
.chart-axis-name { fill: var(--muted); font: 600 11px var(--mono); }
.chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.chart-dot { stroke: var(--panel); stroke-width: 2; }
.chart-endlabel circle { stroke: var(--panel); stroke-width: 2; }
.chart-endlabel-text { fill: #fff; font: 700 10px var(--mono); pointer-events: none; }
.chart-tip .swatch { width: 16px; height: 16px; font-size: 0.62rem; }
.chart-table { max-height: 360px; overflow: auto; margin-top: 8px; }
.chart-table th .swatch { width: 16px; height: 16px; font-size: 0.62rem; vertical-align: middle; }

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .chart-row { grid-template-columns: auto 1fr auto; }
    .chart-row input[name=b] { grid-column: 2 / 3; }
}

/* ── Technical bases: the timeline of an issuer (docs/technical-basis.md) ── */

.tb-head { align-items: flex-start; flex-wrap: wrap; }
.tb-head p { flex: 1 1 360px; margin: 0; }
.tb-date { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-date input[type=date] {
    min-height: 40px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 8px;
    color: var(--text); font: inherit; padding: 0 10px;
}
.tb-timeline { display: block; width: 100%; height: auto; }
.tb-axis { stroke: var(--border-strong); stroke-width: 2; }
.tb-tick { stroke: var(--border-strong); stroke-width: 1; }
.tb-year { fill: var(--faint); font-size: 13px; font-family: var(--mono); }
.tb-now { stroke: var(--warn); stroke-width: 2; stroke-dasharray: 3 3; }
.tb-ev { fill: var(--accent); stroke: var(--panel); stroke-width: 1.5; }
.tb-cp { fill: var(--panel); stroke: var(--accent); stroke-width: 2.5; }
.tb-timeline .tb-future { opacity: 0.35; }
.tb-timeline a:hover .tb-ev, .tb-timeline a:hover .tb-cp { stroke: var(--text); }
.tb-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; }
.tb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tb-pending { margin: 6px 0 0; padding-left: 18px; }

.tb-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.tb-outline { padding: 8px; gap: 2px; position: sticky; top: 16px; }
.tb-outline a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: baseline; gap: 6px; padding: 7px 8px; border-radius: 7px; color: var(--text); font-size: 0.88rem; }
.tb-outline a:hover { background: var(--panel-2); text-decoration: none; }
.tb-outline a.active { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.tb-num { color: var(--faint); font-size: 0.8rem; }
.tb-title { min-width: 0; overflow-wrap: anywhere; }
.tb-mark { font-size: 0.72rem; color: var(--faint); white-space: nowrap; }
.tb-mark-calc { color: var(--ok); font-weight: 600; }
.tb-section-title { font-size: 1.15rem; margin-top: 8px; }
.tb-h3 { font-size: 0.95rem; margin-top: 4px; }
.tb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tb-chips code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 7px; font-size: 0.8rem; }

.tb-changes { display: flex; flex-direction: column; }
.tb-change { padding: 14px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.tb-change:first-child { border-top: 0; padding-top: 0; }
.tb-change-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.tb-change-head h3 { font-size: 0.98rem; margin: 0; }
.tb-bases { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tb-base { font-family: var(--mono); font-size: 0.8rem; border-radius: 6px; padding: 2px 8px; border: 1px solid var(--border); }
.tb-base-old { color: var(--muted); text-decoration: line-through; background: var(--panel-2); }
.tb-base-new { color: var(--ok); background: var(--ok-soft); border-color: transparent; }
.tb-entries { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; }
.tb-entries li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; }

@media (max-width: 900px) {
    .tb-layout { grid-template-columns: minmax(0, 1fr); }
    .tb-outline { position: static; }
}
/* ── Models (phase M1) ─────────────────────────────────────────────── */

.stack { display: flex; flex-direction: column; gap: 16px; }
.section-title { font-size: 1rem; }
.templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.templates form { display: flex; }
.template {
    flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left;
    padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel);
    color: var(--text); font: inherit; cursor: pointer; min-height: 110px;
}
.template:hover { border-color: var(--accent); }
.template span { color: var(--muted); font-size: 0.88rem; }
.table td.actions { white-space: nowrap; text-align: right; }
.table td.actions form, .table td.actions a { margin-left: 6px; }

.model-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.model-name { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; }
.model-name input { font-size: 1.25rem; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.error-list { margin: 6px 0 0; padding-left: 20px; }

.rows { display: flex; flex-direction: column; gap: 8px; }
.row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; }

.diagram { width: 100%; height: auto; max-height: 420px; }
.diagram-box { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.diagram-box.absorbing { stroke-dasharray: 5 4; }
.diagram-state { fill: var(--text); font-size: 15px; font-weight: 600; }
.diagram-arrow { stroke: var(--muted); stroke-width: 1.6; }
.diagram-head { fill: var(--muted); }
.diagram-label { fill: var(--muted); font: 12px var(--mono); paint-order: stroke; stroke: var(--panel); stroke-width: 4px; }

.note-box { background: var(--accent-soft); border-radius: var(--radius); padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.note-box h2 { font-size: 0.95rem; }
.note-box code, .formula-help code { font-family: var(--mono); font-size: 0.88em; }

.table.transitions td { padding: 6px; }
.table.transitions input { min-height: 38px; }
.table.transitions .state-input { min-width: 90px; }
.table.transitions .basis-input { min-width: 170px; }
.table.transitions .expression-input { min-width: 160px; }
.table.transitions .group { border-left: 1px solid var(--border); }
.table.transitions thead tr:first-child th { border-bottom: 0; padding-bottom: 0; }
.state-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
.table.transitions .eval-error { display: inline-block; max-width: 220px; text-align: left; }
.formula-help summary { cursor: pointer; color: var(--accent); }
.formula-help ul { margin-top: 8px; font-size: 0.88rem; }
.plain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

.calc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.calc-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.calc-grid select { width: 100%; }

/* The model results chart (wwwroot/js/model-chart.js). Eight series colours: the reference palette's slots 1–8, validated
   on #ffffff (light; three below 3:1, relieved by the end labels, the legend and the table) and on #10141c (dark). */
.model-chart { position: relative; }
.model-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.legend-line { display: inline-block; width: 14px; height: 3px; border-radius: 2px; flex-shrink: 0; }
.chart-end-label { fill: var(--text); font-size: 12px; }
.result-table { max-height: 460px; overflow: auto; }
.result-table thead th { position: sticky; top: 0; background: var(--panel); }
.calc-form .calc-grid input[type=number] { width: 100%; min-height: 44px; }

/* Section texts (docs/technical-basis.md, "Section texts") */
.tb-mark-text { color: var(--accent); font-weight: 600; }
.tb-text-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 6px; }
.tb-text { border-top: 1px solid var(--border); padding-top: 12px; font-size: 0.94rem; line-height: 1.6; }
.tb-text h3 { font-size: 1rem; margin: 18px 0 6px; }
.tb-text h4 { font-size: 0.93rem; margin: 14px 0 4px; }
.tb-text p { margin: 0 0 10px; }
.tb-text ol, .tb-text ul { margin: 0 0 10px; padding-left: 22px; }
.tb-text table { border-collapse: collapse; margin: 4px 0 12px; font-size: 0.92rem; }
.tb-text table td, .tb-text table th { padding: 4px 12px 4px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.tb-text thead:has(th:empty) { display: none; }
.tb-text .math { overflow-x: auto; overflow-y: hidden; }
.tb-text div.math { margin: 6px 0 10px; }
.tb-live { color: var(--ok); background: var(--ok-soft); border-radius: 4px; padding: 0 4px; font-variant-numeric: tabular-nums; cursor: help; }
.tb-live-error { color: var(--err); background: var(--err-soft); }
.tb-live-table { margin: 4px 0 12px; }
.tb-live-table .table-wrap { display: inline-block; max-width: 100%; max-height: 340px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.tb-live-table p { margin-top: 6px; }
.tb-live-table table { margin: 0; width: auto; min-width: 260px; }
.tb-live-table th, .tb-live-table td { padding: 4px 14px; }
.tb-check { font-size: 0.82rem; color: var(--ok); margin: -4px 0 12px; }
.tb-check-fail { color: var(--err); }
.tb-notes summary { cursor: pointer; color: var(--accent); }
.tb-notes ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); }
/* ── Contracts (Pages/Contracts) ──────────────────────────────────── */
[hidden] { display: none !important; }
.chip {
    display: inline-block; padding: 1px 8px; margin: 0 4px 2px 0; border-radius: 999px; background: var(--accent-soft);
    color: var(--accent); font-size: 0.8rem; font-weight: 600; white-space: nowrap;
}
.product-picker { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.product-picker legend { font-weight: 600; margin-bottom: 6px; }
.product-picker h3 { margin-top: 4px; }
.template-check { min-height: 0; cursor: pointer; }
.template-check .template-top { color: var(--text); font-size: 0.95rem; display: flex; align-items: center; gap: 6px; }
.template-check:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.interest { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.interest legend { font-weight: 600; margin-bottom: 6px; }
label.inline { display: flex; align-items: center; gap: 8px; }
input.short { width: 90px; }
.unknown-choices { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.add-product { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.add-product select { max-width: 260px; }
.product { scroll-margin-top: 16px; }
.product-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.product-head .product-name { flex: 1 1 220px; width: auto; font-weight: 600; }
.table.parameters td { padding: 6px; }
.table.parameters td:first-child input { min-width: 140px; }
.table.parameters td:nth-child(2) input { min-width: 110px; }
.table.parameters td:nth-child(3) input { min-width: 220px; }
.payment {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; align-items: end;
    border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 0;
}
.payment label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); font-weight: 500; }
.payment select, .payment input { width: 100%; }
.payment-remove { display: flex; align-items: center; min-height: 40px; }
.legend-box { display: inline-block; width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }
.chart-band { fill: var(--accent-soft); }
.chart-grid line.axis { stroke: var(--muted); }

/* Regnskaber (/regnskaber): fields × years. The field column stays put while the years scroll. */
.subhead { font-size: 0.95rem; margin: 4px 0 8px; }
.field-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.92rem; }
.acc-table { font-size: 0.86rem; }
.acc-table td, .acc-table th { padding: 6px 8px; }
.acc-table th.num { text-align: right; }
.acc-table .acc-field {
    position: sticky; left: 0; z-index: 1; background: var(--panel);
    text-transform: none; letter-spacing: 0; font-size: 0.86rem; font-weight: 500; color: var(--text);
    min-width: 220px; white-space: normal;
}
.acc-table thead .acc-field { color: var(--faint); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.acc-table .acc-group th { background: var(--panel-2); color: var(--faint); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; position: sticky; left: 0; }
.acc-cell { white-space: nowrap; cursor: default; }
.acc-cell[title]:not(.acc-none) { text-decoration: underline dotted var(--border-strong); text-underline-offset: 3px; }
.acc-status { color: var(--muted); font-style: italic; font-size: 0.8rem; }
.acc-not_found { color: var(--warn); }
.acc-none { color: var(--faint); }
.acc-break { border-left: 2px solid var(--border-strong); }
.acc-mark { color: var(--accent); font-size: 0.68em; margin-left: 1px; }
