/* rater193 design system. Dark neutrals, one green accent, max 4px corners, no purple. */
:root {
    color-scheme: dark;
    --bg: #0f1411;
    --sidebar: #121915;
    --surface: #171f1a;
    --raised: #1e2923;
    --field: #0d120f;
    --border: #2a372e;
    --border-strong: #3c4d41;
    --text: #e6ece7;
    --text-2: #a9b6ad;
    --muted: #8a9a8f;
    --accent: #6fcf97;
    --accent-hover: #8be0ac;
    --accent-ink: #08140d;
    --accent-subtle: #1b3225;
    --danger: #ee8a82;
    --danger-subtle: #3a1f1d;
    --warn: #dcb764;
    --warn-subtle: #382f17;
    --info: #78bfd8;
    --info-subtle: #162d36;

    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 3px;
    --radius-lg: 4px;

    --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-md: 0.9375rem;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;

    --sidebar-width: 224px;
    --content-max: 1180px;
    --control-height: 34px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 var(--text-base)/1.5 var(--font);
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 2px; }
img, svg { max-width: 100%; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
time { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-subtle); color: var(--text); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--space-3); top: -48px; z-index: 100; padding: var(--space-2) var(--space-3); background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-lg); font-weight: 600; }
.skip-link:focus { top: var(--space-3); }
.muted, .meta, .help { color: var(--muted); }
.meta { font-size: var(--text-sm); }
.help { font-size: var(--text-sm); }
.sep { color: var(--border-strong); }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: var(--space-2); color: var(--text); font-size: var(--text-md); font-weight: 600; letter-spacing: 0.01em; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand b { color: var(--accent); font-weight: 600; }
.brand img { display: block; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: var(--space-4);
    padding: var(--space-4) var(--space-3); background: var(--sidebar); border-right: 1px solid var(--border); overflow-y: auto;
}
.sidebar .brand { padding: var(--space-1) var(--space-2) var(--space-2); }
.nav { display: flex; flex-direction: column; gap: var(--space-4); flex: 1; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label { padding: 0 var(--space-2) var(--space-1); color: var(--muted); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-link {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px var(--space-2);
    border: 0; border-left: 2px solid transparent; border-radius: var(--radius-md); background: none;
    color: var(--text-2); font: inherit; font-weight: 500; text-align: left; cursor: pointer;
}
.nav-link:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--accent-subtle); border-left-color: var(--accent); color: var(--text); }
.nav-link[aria-current="page"] .icon { color: var(--accent); }
.nav-link-quiet { min-height: 30px; color: var(--muted); font-size: var(--text-sm); font-weight: 400; }
.account { display: flex; flex-direction: column; gap: 2px; padding-top: var(--space-3); border-top: 1px solid var(--border); }
.account-id { display: flex; align-items: center; gap: 10px; padding: var(--space-1) var(--space-2) var(--space-2); min-width: 0; }
.account-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.account-text strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text small { color: var(--muted); font-size: var(--text-xs); }
.avatar {
    display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px;
    background: var(--accent-subtle); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
    color: var(--accent); font-size: var(--text-sm); font-weight: 600;
}
.content { min-width: 0; width: 100%; max-width: calc(var(--content-max) + 2 * var(--space-6)); margin: 0 auto; padding: var(--space-5) var(--space-6) 64px; }
.mobile-bar, .scrim { display: none; }

/* ---------- Page header ---------- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-5); }
.page-header h1 { font-size: 1.375rem; line-height: 1.25; font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.page-header p { margin-top: var(--space-1); color: var(--text-2); }
.page-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--space-3); color: var(--text-2); font-size: var(--text-sm); }
.back-link:hover { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--control-height); padding: 0 14px;
    border: 1px solid transparent; border-radius: var(--radius-lg); font: inherit; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer;
    transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-secondary { background: var(--raised); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: #26332b; color: var(--text); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--raised); color: var(--text); }
.btn-danger { background: var(--danger-subtle); border-color: #6a3a36; color: var(--danger); }
.btn-danger:hover { background: #4a2724; color: var(--danger); }
.btn-sm { min-height: 28px; padding: 0 10px; font-size: var(--text-sm); }
.btn-icon { width: var(--control-height); padding: 0; }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); }
.form-inline { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(160px, 1.2fr) minmax(140px, 0.8fr) auto; gap: var(--space-3); align-items: end; padding: var(--space-4); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.field-row > .field { flex: 1 1 200px; }
.field-row > .field-side { flex: 0 1 220px; }
.field label, .check { color: var(--text); font-weight: 500; }
.field-foot { display: flex; justify-content: space-between; gap: var(--space-3); min-height: 18px; }
.counter { margin-left: auto; color: var(--muted); font-size: var(--text-sm); }
.counter.is-near { color: var(--warn); }
.counter.is-over { color: var(--danger); font-weight: 600; }
input:not([type="checkbox"]), select, textarea {
    width: 100%; min-height: var(--control-height); padding: 6px 10px; background: var(--field); border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg); color: var(--text); font: inherit; line-height: 1.4;
}
textarea { resize: vertical; min-height: 84px; }
textarea.tall { min-height: 280px; line-height: 1.6; }
textarea.mono, input.mono { font-family: var(--mono); font-size: var(--text-sm); }
input::placeholder, textarea::placeholder { color: #6a7a6f; }
input:hover, select:hover, textarea:hover { border-color: #56695b; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input:user-invalid, textarea:user-invalid { border-color: var(--danger); }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px; background-size: 5px 5px; background-repeat: no-repeat; }
input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: var(--space-2); cursor: pointer; }
.form-actions { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.form-actions-bar { justify-content: flex-end; padding-top: var(--space-3); border-top: 1px solid var(--border); }
input[type="search"] { padding-left: 10px; }

/* ---------- Surfaces ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px var(--space-4); border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: var(--text-md); font-weight: 600; }
.panel-foot { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); }
.pad { padding: var(--space-3) var(--space-4); }
.pad-x { padding: 0 var(--space-4) var(--space-3); }
.count { display: inline-block; min-width: 22px; padding: 0 6px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--text-xs); font-weight: 600; line-height: 18px; text-align: center; vertical-align: middle; }
.figure { font-size: 1.5rem; font-weight: 600; line-height: 1; margin-right: 4px; }
.link-quiet { color: var(--text-2); font-size: var(--text-sm); }
.stack { display: flex; flex-direction: column; gap: var(--space-4); }
.section { margin-top: var(--space-5); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; margin-bottom: var(--space-3); }
.section-head h2 { font-size: var(--text-md); font-weight: 600; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-5); align-items: start; }
.split-wide { grid-template-columns: minmax(0, 1fr) 300px; }
.badge {
    display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; background: var(--accent-subtle); border: 1px solid #2a4b37;
    border-radius: var(--radius-sm); color: var(--accent); font-size: var(--text-xs); font-weight: 600; line-height: 18px; white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge-warn { background: var(--warn-subtle); border-color: #5b4b22; color: var(--warn); }
.badge-bad { background: var(--danger-subtle); border-color: #6a3a36; color: var(--danger); }
.badge-muted { background: var(--raised); border-color: var(--border-strong); color: var(--text-2); }

/* ---------- Lists ---------- */
.rows { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.row { padding: 14px var(--space-4); border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
.row:hover { background: #1a241e; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; color: var(--muted); font-size: var(--text-sm); }
.news-row h3 { margin-top: 6px; font-size: var(--text-md); font-weight: 600; line-height: 1.35; }
.news-row h3 a { color: var(--text); }
.news-row h3 a:hover { color: var(--accent); }
.news-row p { margin-top: 4px; color: var(--text-2); max-width: 72ch; }
.row-head, .row-head:hover { display: grid; grid-template-columns: minmax(0, 1fr) 80px 120px; gap: var(--space-4); padding: 8px var(--space-4); background: var(--sidebar); color: var(--muted); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 120px; gap: var(--space-4); align-items: center; }
.topic-row h3 { font-size: var(--text-md); font-weight: 500; overflow-wrap: anywhere; }
.topic-row h3 a { color: var(--text); }
.topic-row h3 a:hover { color: var(--accent); }
.col-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.col-when { text-align: right; color: var(--muted); font-size: var(--text-sm); }
.compact li { padding: 10px var(--space-4); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.compact li:first-child { border-top: 0; }
.compact a { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.compact a:hover { color: var(--accent); }
.compact li.is-current { background: var(--accent-subtle); box-shadow: inset 2px 0 0 var(--accent); }
.checklist { padding: var(--space-2) var(--space-4) var(--space-3); display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.checklist li { display: flex; align-items: center; gap: var(--space-2); }
.checklist .icon { color: var(--accent); }
.empty { padding: var(--space-6) var(--space-4); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.empty p { color: var(--text-2); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); }
.pagination-page { color: var(--muted); font-size: var(--text-sm); }

/* ---------- Notices ---------- */
.notice { display: flex; align-items: flex-start; gap: 10px; margin-bottom: var(--space-4); padding: 10px var(--space-3); border: 1px solid var(--border-strong); border-left-width: 3px; border-radius: var(--radius-lg); background: var(--raised); color: var(--text); }
.notice .icon { margin-top: 2px; }
.notice-info { background: var(--info-subtle); border-color: #28505f; color: #cfe8f1; }
.notice-info .icon { color: var(--info); }
.notice-success { background: var(--accent-subtle); border-color: #2d5a40; color: #d5f0df; }
.notice-success .icon { color: var(--accent); }
.notice-error { background: var(--danger-subtle); border-color: #703d39; color: #f6d3d0; }
.notice-error .icon { color: var(--danger); }
.form .notice, .form-inline .notice { margin-bottom: 0; }

/* ---------- Articles & discussions ---------- */
.article { max-width: 720px; margin: 0 auto; }
.article-head h1 { margin-top: var(--space-3); font-size: 2rem; line-height: 1.2; font-weight: 650; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.article-lead { margin-top: var(--space-3); color: var(--text-2); font-size: 1.125rem; line-height: 1.55; }
.byline { margin-top: var(--space-3); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); color: var(--muted); }
.byline strong { color: var(--text-2); font-weight: 600; }
.prose { font-size: 1rem; line-height: 1.7; color: #d7dfd9; overflow-wrap: anywhere; }
.article .prose { margin-top: var(--space-5); font-size: 1.0625rem; line-height: 1.75; }
.article-foot { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--border); }
.thread { display: flex; flex-direction: column; gap: var(--space-3); max-width: 880px; }
.post { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.post + .post { margin-top: var(--space-3); }
.post-first { border-color: var(--border-strong); }
.post-author { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.post-author > div { display: flex; flex-direction: column; min-width: 0; }
.post-author strong { overflow-wrap: anywhere; }
.post-when { margin-bottom: var(--space-2); }
.thread-label { margin: var(--space-3) 0; color: var(--muted); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.reply-form { max-width: 880px; margin-top: var(--space-4); }
.composer { margin-bottom: var(--space-4); }
.composer > summary { display: flex; align-items: center; gap: var(--space-2); padding: 10px var(--space-4); font-weight: 600; cursor: pointer; list-style: none; }
.composer > summary::-webkit-details-marker { display: none; }
.composer[open] > summary { border-bottom: 1px solid var(--border); }
.composer > summary:hover { color: var(--accent); }

/* ---------- Tables ---------- */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 8px var(--space-4); background: var(--sidebar); border-bottom: 1px solid var(--border); color: var(--muted); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.table td { padding: 10px var(--space-4); border-top: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:first-child td { border-top: 0; }
.table tbody tr:hover td { background: #1a241e; }
.table tr.is-dirty td { background: var(--accent-subtle); }
.table select { min-width: 140px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person > div { display: flex; flex-direction: column; min-width: 0; }
.person strong { overflow-wrap: anywhere; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .icon { vertical-align: -3px; margin-right: 6px; }
.row-state { margin-right: var(--space-2); color: var(--accent); font-size: var(--text-sm); }
.filters { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.field-inline { width: auto; }
.field-inline input[type="search"] { width: 260px; }
.empty-filter { padding: var(--space-5); text-align: center; color: var(--muted); }

/* ---------- Roles ---------- */
.role > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px var(--space-4); cursor: pointer; list-style: none; }
.role > summary::-webkit-details-marker { display: none; }
.role[open] > summary { border-bottom: 1px solid var(--border); }
.role > summary:hover { background: #1a241e; }
.role-name { display: flex; flex-direction: column; }
.role > summary .meta .icon { vertical-align: -3px; margin-right: 6px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 1px 8px; background: var(--raised); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--text-xs); line-height: 20px; }
.tags-pad { padding: 0 var(--space-4) var(--space-4); }
.reference { margin-top: var(--space-4); }
.reference > summary { color: var(--text-2); cursor: pointer; }
.reference p { margin: var(--space-2) 0; max-width: 72ch; }
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-2) var(--space-5); margin-top: var(--space-3); }
.dl div { display: flex; flex-direction: column; padding: var(--space-2) 0; border-top: 1px solid var(--border); }
.dl dt { color: var(--accent); font-size: var(--text-sm); }
.dl dd { color: var(--text-2); }

/* ---------- Web app catalogue ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-4); }
.app-card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.app-card p { color: var(--text-2); }
.app-top { display: flex; align-items: center; gap: var(--space-3); }
.app-top h2 { font-size: var(--text-md); font-weight: 600; }
.app-top h2 a { color: var(--text); }
.app-top h2 a:hover { color: var(--accent); }
.app-icon { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent-subtle); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); color: var(--accent); }
.app-icon .icon { width: 20px; height: 20px; }
.app-foot { margin-top: auto; display: flex; justify-content: flex-end; }

/* ---------- Public pages ---------- */
.public-bar { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; margin: 0 auto; padding: var(--space-4) var(--space-5); }
.public-main { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 var(--space-5); flex: 1 0 auto; }
body.public, body.interior { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.public-bar, .public-footer, body.interior .site-footer { flex: none; width: 100%; }
.public-footer { margin-top: auto; max-width: 1040px; margin-left: auto; margin-right: auto; padding: var(--space-5); color: var(--muted); font-size: var(--text-sm); border-top: 1px solid var(--border); }
.landing { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 72px 0 56px; }
.eyebrow { margin-bottom: var(--space-3); color: var(--accent); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.landing h1 { font-size: clamp(2rem, 4.4vw, 2.75rem); line-height: 1.1; font-weight: 650; letter-spacing: -0.02em; }
.lead { margin-top: var(--space-4); max-width: 54ch; color: var(--text-2); font-size: 1.0625rem; line-height: 1.6; }
.landing-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-3) var(--space-4); margin-top: var(--space-5); }
.steam-link { display: inline-block; line-height: 0; border-radius: var(--radius-md); }
.steam-link:hover { filter: brightness(1.1); }
.landing-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.landing-list li { display: flex; gap: var(--space-3); padding: var(--space-4); border-top: 1px solid var(--border); }
.landing-list li:first-child { border-top: 0; }
.landing-list .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.landing-list div { display: flex; flex-direction: column; }
.landing-list span { color: var(--text-2); }
.message { max-width: 520px; margin: 18vh auto 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.message h1 { font-size: 1.5rem; font-weight: 600; }
.message p { color: var(--text-2); }
.app .message { margin-top: 10vh; }
.message-code { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; background: var(--raised); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text-2); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.message-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }

/* ---------- Layout used by the private backend for error pages (403, 404, 503...) ----------
   The backend renders these with its own markup; keep them on-brand without editing it. */
body.interior .ambient, body.interior .site-header .menu-toggle, body.interior .footer-note, body.interior .eyebrow-line { display: none; }
body.interior .wrap { max-width: 1040px; margin: 0 auto; padding-left: var(--space-5); padding-right: var(--space-5); }
body.interior .site-header { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-4); padding-bottom: var(--space-4); }
body.interior .brand span { display: inline-flex; flex-direction: column; line-height: 1.1; }
body.interior .brand small { color: var(--muted); font-size: var(--text-xs); letter-spacing: 0.06em; font-weight: 500; }
body.interior .brand-number { color: var(--accent); }
body.interior .primary-nav, body.interior .public-nav { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
body.interior .primary-nav a, body.interior .public-nav a, body.interior .text-button { color: var(--text-2); font: inherit; font-weight: 500; background: none; border: 0; padding: 0; cursor: pointer; }
body.interior .primary-nav a[aria-current="page"] { color: var(--accent); }
body.interior .logout-form { margin: 0; }
body.interior .interior-main { flex: 1 0 auto; width: 100%; }
body.interior .site-footer { margin-top: auto; }
body.interior .message-page { max-width: 520px; margin: 12vh auto 0; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
body.interior .message-page .eyebrow { margin: 0; }
body.interior .message-page h1 { font-size: 1.5rem; font-weight: 600; }
body.interior .message-page p { color: var(--text-2); }
body.interior .button { display: inline-flex; align-items: center; gap: 6px; min-height: var(--control-height); padding: 0 14px; background: var(--accent); border-radius: var(--radius-lg); color: var(--accent-ink); font-weight: 600; }
body.interior .button:hover { background: var(--accent-hover); color: var(--accent-ink); text-decoration: none; }
body.interior .site-footer { display: flex; gap: var(--space-4); flex-wrap: wrap; padding-top: var(--space-5); padding-bottom: var(--space-5); border-top: 1px solid var(--border); color: var(--muted); font-size: var(--text-sm); }
body.interior .footer-signal i { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .split, .split-wide { grid-template-columns: minmax(0, 1fr); }
    .form-inline { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .mobile-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 6px var(--space-4); background: var(--sidebar); border-bottom: 1px solid var(--border); }
    .sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: min(280px, 86vw); transform: translateX(-100%); visibility: hidden; transition: transform 0.18s ease, visibility 0.18s; }
    .sidebar.is-open { transform: none; visibility: visible; }
    .scrim { position: fixed; inset: 0; z-index: 40; display: block; background: rgb(0 0 0 / 0.55); }
    .scrim[hidden] { display: none; }
    .content { padding: var(--space-4) var(--space-4) 48px; }
    .landing { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding: 40px 0; }
}
@media (max-width: 720px) {
    body { font-size: var(--text-md); }
    input:not([type="checkbox"]), select, textarea { font-size: 1rem; min-height: 40px; }
    .btn { min-height: 40px; }
    .btn-sm { min-height: 36px; }
    .page-header h1 { font-size: 1.25rem; }
    .article-head h1 { font-size: 1.625rem; }
    .form-inline { grid-template-columns: 1fr; }
    .field-inline, .field-inline input[type="search"], .filters { width: 100%; }
    .row-head { display: none; }
    .topic-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px; }
    .topic-row .col-num { grid-column: 2; grid-row: 1; }
    .topic-row .col-num::after { content: " replies"; color: var(--muted); font-size: var(--text-sm); }
    .topic-row .col-when { grid-column: 1 / -1; text-align: left; }
    .post { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
    .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .table, .table tbody, .table tr, .table td { display: block; }
    .table tr { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); }
    .table tbody tr:first-child { border-top: 0; }
    .table td { padding: 4px 0; border: 0 !important; background: none !important; }
    .table td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
    .table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
    .table td .check, .table td select { margin-left: auto; }
    .cell-actions { text-align: left; padding-top: var(--space-2) !important; }
    .public-bar, .public-main, .public-footer { padding-left: var(--space-4); padding-right: var(--space-4); }
    .app-grid { grid-template-columns: minmax(0, 1fr); }
    .lead { font-size: var(--text-md); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Publish: preview bar and list filter ---------- */
.preview-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); border-color: #5b4b22; }
.tabs { display: flex; gap: var(--space-4); padding: 0 var(--space-4); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 10px 2px 9px; border-bottom: 2px solid transparent; color: var(--text-2); font-size: var(--text-sm); font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a.is-current { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { background: transparent; }

/* Long unbroken text (activity summaries) wraps instead of widening the page. */
.table td, .compact li { overflow-wrap: anywhere; }
