:root {
    --bg: #f4f6fb;
    --bg-alt: #eaeef7;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --border: #dde3ee;
    --text: #172033;
    --text-2: #4b5872;
    --text-3: #5f6b82;
    --accent: #0f9fb5;
    --accent-2: #6a5cf6;
    --accent-text: #ffffff;
    --accent-soft: rgba(15, 159, 181, .12);
    --ok: #13985c;
    --ok-soft: rgba(19, 152, 92, .12);
    --warn: #c27a06;
    --warn-soft: rgba(194, 122, 6, .14);
    --bad: #d23c4f;
    --bad-soft: rgba(210, 60, 79, .12);
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
    --shadow-lg: 0 20px 50px rgba(16, 24, 40, .18);
    --hero: radial-gradient(1200px 500px at 10% -10%, rgba(106, 92, 246, .20), transparent 60%),
            radial-gradient(900px 500px at 100% 0%, rgba(15, 159, 181, .22), transparent 60%), var(--bg);
    --radius: 12px;
    --radius-sm: 8px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --gap: 20px;
    --card-pad: 20px;
    --card-gap: 14px;
    --field-gap: 14px;
    --section-y: clamp(48px, 7vw, 88px);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    --sidebar: 248px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1020;
        --bg-alt: #0f1529;
        --surface: #121a30;
        --surface-2: #172039;
        --border: #24304d;
        --text: #e7ecf7;
        --text-2: #aab5cc;
        --text-3: #8a95ae;
        --accent: #22c3da;
        --accent-2: #8b7fff;
        --accent-text: #04151a;
        --accent-soft: rgba(34, 195, 218, .14);
        --ok: #2fc47e;
        --ok-soft: rgba(47, 196, 126, .14);
        --warn: #f0a530;
        --warn-soft: rgba(240, 165, 48, .14);
        --bad: #ff6378;
        --bad-soft: rgba(255, 99, 120, .14);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
        --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0b1020;
    --bg-alt: #0f1529;
    --surface: #121a30;
    --surface-2: #172039;
    --border: #24304d;
    --text: #e7ecf7;
    --text-2: #aab5cc;
    --text-3: #8a95ae;
    --accent: #22c3da;
    --accent-2: #8b7fff;
    --accent-text: #04151a;
    --accent-soft: rgba(34, 195, 218, .14);
    --ok: #2fc47e;
    --ok-soft: rgba(47, 196, 126, .14);
    --warn: #f0a530;
    --warn-soft: rgba(240, 165, 48, .14);
    --bad: #ff6378;
    --bad-soft: rgba(255, 99, 120, .14);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); }
h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
pre {
    margin: 0;
    padding: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
    white-space: pre;
}
img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--gap) 0; }
.muted { color: var(--text-2); }
.small { font-size: .85rem; }
.break { overflow-wrap: break-word; word-break: normal; }
.host { overflow-wrap: normal; word-break: normal; hyphens: none; }
td .host { display: inline-block; min-width: 20ch; max-width: 100%; }
.table td.fit, .table th.fit { width: 1%; white-space: nowrap; }
td.name-cell > .tags { flex-wrap: nowrap; }
.hash { font-family: var(--mono); font-size: .8rem; line-height: 1.45; word-break: break-all; overflow-wrap: anywhere; }
.hash.short { white-space: nowrap; word-break: normal; overflow-wrap: normal; }
td .hash:not(.short), dd .hash:not(.short) { display: inline-block; min-width: 22ch; max-width: 100%; }
.tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) 6px; vertical-align: middle; max-width: 100%; }
td > .tags, dd > .tags, td > div > .tags { display: flex; justify-content: flex-start; }
.hidden { display: none !important; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.stack > * { margin-top: 0; margin-bottom: 0; }
.stack.tight { gap: var(--space-3); }
.form-section { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.form-section > *, .row > .subhead { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row > :is(h2, h3, h4) { margin: 0; }
.grid { display: grid; gap: var(--gap); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
    .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.chain-grid:has(> .card:only-child) { grid-template-columns: minmax(0, calc((100% - 2 * var(--gap)) / 3)); justify-content: center; }
@media (max-width: 960px) {
    .chain-grid:has(> .card:only-child) { grid-template-columns: minmax(0, calc((100% - var(--gap)) / 2)); }
}
@media (max-width: 640px) {
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
    .chain-grid:has(> .card:only-child) { grid-template-columns: minmax(0, 1fr); }
    :root { --gap: 16px; --card-pad: 16px; }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: 600 .9rem var(--font);
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s, border-color .15s, transform .05s;
    white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.loading { opacity: .6; pointer-events: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.sm { min-height: 30px; padding: 4px 10px; font-size: .8rem; }
.btn.lg { min-height: 48px; padding: 12px 24px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: var(--card-pad);
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
}
.card > * { margin-top: 0; margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-3); flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; font-weight: 700; letter-spacing: -.005em; }
.card-head h2 .muted, .card-head h3 .muted { font-weight: 500; }
.card-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.card-desc { margin: 0; color: var(--text-2); font-size: .86rem; line-height: 1.5; }
.card-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); flex-wrap: wrap; margin-left: auto; }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2) 10px; flex-wrap: wrap; }
.subhead { margin: var(--space-1) 0 0; font-size: .95rem; font-weight: 700; display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 0; }
.stat .label { color: var(--text-2); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.stat .value { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.stat .sub { color: var(--text-3); font-size: .82rem; margin-top: 6px; line-height: 1.4; }
.stat .sub + .value { margin-top: 14px; }
.stat .value.list > div + div { margin-top: 6px; }
.grid > .card.stat { padding: 18px var(--card-pad) var(--card-pad); gap: 0; }
.grid > .card.stat > .sub:last-child { margin-top: auto; padding-top: 6px; }
.grid.cols-4:has(> .card.stat) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-4:has(> .card.stat:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 961px) and (max-width: 1180px), (max-width: 860px) {
    .grid.cols-4:has(> .card.stat:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .grid.cols-4:has(> .card.stat:nth-child(3):last-child) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
    .grid.cols-4:has(> .card.stat) { grid-template-columns: minmax(0, 1fr); }
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: .76rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge.ok { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.badge.warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.badge.bad { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.badge.accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.notice {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--accent-soft);
    border: 1px solid transparent;
    color: var(--text);
    font-size: .92rem;
    line-height: 1.55;
}
.notice > * { margin-top: 0; margin-bottom: 0; }
.notice > * + * { margin-top: var(--space-2); }
.notice.ok { background: var(--ok-soft); }
.notice.warn { background: var(--warn-soft); }
.notice.bad { background: var(--bad-soft); }

.form { display: grid; gap: var(--field-gap); min-width: 0; }
.form > * { margin-top: 0; margin-bottom: 0; }
.form > :is(.segmented, .check, .btn), .card > :is(.segmented, .btn), .modal-body > :is(.segmented, .btn) { justify-self: start; align-self: flex-start; }
.form .grid { gap: var(--field-gap); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.field .help { font-size: .78rem; color: var(--text-3); }
.field .error { font-size: .8rem; color: var(--bad); min-height: 0; }
.input, select.input, textarea.input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text);
    font: .95rem var(--font);
    transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 96px; resize: vertical; font-family: var(--mono); font-size: .85rem; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid .input { border-color: var(--bad); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.check input { width: 17px; height: 17px; flex: none; margin: 0; accent-color: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.form-actions { display: flex; gap: var(--space-2) 10px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin: 0; }

.dt { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.dt-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dt-tools .input { width: auto; min-width: 0; }
.dt-tools .dt-search { flex: 1 1 220px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th {
    background: var(--surface-2);
    color: var(--text-2);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    user-select: none;
}
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table th.sorted::after { content: " \25BE"; }
.table th.sorted.asc::after { content: " \25B4"; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:not(:has(> td.empty)):hover > td { background: var(--accent-soft); }
.table tbody tr:hover td.empty { background: transparent; }
.table td.empty { text-align: center; color: var(--text-3); padding: var(--space-6) var(--space-4); }
.table td.empty .spinner { vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dt-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.dt-foot:has(> .dt-info:empty):has(> .pager:empty) { display: none; }
.dt-info { color: var(--text-2); font-size: .85rem; }
.pager { display: flex; gap: 4px; flex-wrap: wrap; }
.pager button {
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: 600 .85rem var(--font);
    cursor: pointer;
}
.pager button:hover:not(:disabled) { border-color: var(--accent); }
.pager button.current { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pager button:disabled { opacity: .45; cursor: default; }
.pager .gap { padding: 0 4px; align-self: center; color: var(--text-3); }

@container content (max-width: 760px) {
    .table-wrap.stackable { border: 0; overflow: visible; }
    .stackable table.table, .stackable .table tbody, .stackable .table tr, .stackable .table td { display: block; width: 100%; }
    .stackable .table thead { display: none; }
    .stackable .table tr {
        margin-bottom: 10px;
        border: 1px solid var(--border);
        border-radius: var(--radius-sm);
        background: var(--surface);
        padding: 6px 0;
    }
    .stackable .table td { border: 0; padding: 6px 14px; text-align: right; min-width: 0; white-space: normal; }
    .stackable .table td::before { content: attr(data-label); float: left; max-width: 42%; margin-right: 12px; color: var(--text-3); font-weight: 600; font-size: .78rem; line-height: 1.9; text-align: left; }
    .stackable .table td::after { content: ""; display: block; clear: both; }
    .stackable .table td:not([data-label]):has(> .btn-group) .btn-group, .stackable .table td.actions .btn-group { justify-content: flex-end; }
    .stackable .table td .host { display: inline; min-width: 0; }
    .stackable .table td.empty { display: block; text-align: center; }
    .stackable .table td.empty::before { content: none; }
    .stackable .table td > .tags, .stackable .table td > div > .tags { justify-content: flex-end; }
    .stackable .table tbody tr:hover td { background: transparent; }
    .dt-foot { justify-content: center; }
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px;
    background: rgba(6, 10, 22, .55);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    animation: fade .15s ease-out;
}
.modal {
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: rise .18s ease-out;
}
.modal.wide { max-width: 920px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-head h3 { margin: 0; }
.modal-body { padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--card-gap); container: content / inline-size; }
.modal-body > * { margin-top: 0; margin-bottom: 0; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    box-shadow: var(--shadow-lg);
    font-size: .9rem;
    animation: rise .2s ease-out;
    max-width: 380px;
}
.toast.ok { border-left-color: var(--ok); }
.toast.bad { border-left-color: var(--bad); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 6px; color: transparent !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes shimmer { to { background-position: -200% 0; } }

.chart { position: relative; width: 100%; height: 240px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; }
.chart .area { fill: url(#chart-fill); }
.chart .empty { fill: var(--text-3); font-size: 13px; }
.chart-tip {
    position: absolute;
    pointer-events: none;
    padding: 6px 10px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: .8rem;
    white-space: nowrap;
    transform: translate(-50%, -120%);
}
.segmented { display: inline-flex; flex-wrap: wrap; max-width: 100%; gap: 1px; padding: 0; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.segmented button { flex: 1 0 auto; border: 0; background: var(--surface); color: var(--text-2); min-height: 32px; padding: 6px 12px; font: 600 .8rem var(--font); cursor: pointer; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.chart-head { align-items: flex-start; }
.chart-controls { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 100%; }
@media (max-width: 640px) {
    .chart-head h2 { width: 100%; }
    .chart-controls { justify-content: flex-start; width: 100%; }
    .chart-controls .segmented { width: 100%; }
}

.site-nav { position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border); }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none !important; }
.brand-mark { width: 34px; height: 34px; flex: none; display: block; }
.brand-mark.night { display: none; }
:root[data-theme="dark"] .brand-mark.day { display: none; }
:root[data-theme="dark"] .brand-mark.night { display: block; filter: drop-shadow(0 0 10px rgba(34, 195, 218, .35)); }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand-mark.day { display: none; }
    :root:not([data-theme="light"]) .brand-mark.night { display: block; filter: drop-shadow(0 0 10px rgba(34, 195, 218, .35)); }
}
.site-links { display: flex; align-items: center; gap: 6px; }
.site-links a:not(.btn) { color: var(--text-2); padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.site-links a:not(.btn):hover { color: var(--text); background: var(--accent-soft); text-decoration: none; }
.site-links a.active:not(.btn) { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; }
@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }
    .site-links { position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: 12px 16px 18px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); display: none; }
    .site-links.open { display: flex; }
    .site-links .btn { width: 100%; }
}
.hero { background: var(--hero); padding: var(--section-y) 0; border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); min-width: 0; }
.hero-copy > * { margin: 0; }
.hero h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); letter-spacing: -.03em; }
.hero .lead { font-size: clamp(1rem, .95rem + .4vw, 1.2rem); color: var(--text-2); max-width: 560px; }
.gradient-text { background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-card { padding: var(--space-5); }
.hero-card .stat .value { font-size: 1.9rem; }
.stat .value.list, .hero-card .stat .value.list { font-size: 1.25rem; line-height: 1.35; }
.btn svg { width: 18px; height: 18px; flex: none; }
.theme-toggle span { display: inline-flex; }
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: inline-flex; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .when-dark { display: inline-flex; }
    :root:not([data-theme="light"]) .theme-toggle .when-light { display: none; }
    :root:not([data-theme="light"]) { scrollbar-color: var(--border) var(--bg); }
    :root:not([data-theme="light"]) ::selection { background: var(--accent-soft); color: var(--text); }
}
:root[data-theme="dark"] { scrollbar-color: var(--border) var(--bg); }
:root[data-theme="dark"] ::selection { background: var(--accent-soft); color: var(--text); }
:root[data-theme="dark"] .hero { background: var(--hero); }
.log-view { max-height: 60vh; overflow: auto; font-size: .78rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.period { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .period { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.period .stat .value { overflow-wrap: normal; }
.period .stat { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.period .stat .label { font-size: .68rem; margin-bottom: 6px; }
.period .stat .value { font-size: 1.02rem; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.section { padding: var(--section-y) 0; scroll-margin-top: 64px; }
.section > .container { display: flex; flex-direction: column; gap: var(--space-6); }
.section > .container > * { margin-top: 0; margin-bottom: 0; }
.section.final { min-height: calc(100vh - 64px); display: flex; align-items: center; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.section-head > * { margin: 0; }
.section-head p { color: var(--text-2); }
.card.feature { gap: 10px; }
.feature .icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.feature h3 { margin: 0; }
.feature p { color: var(--text-2); margin: 0; font-size: .93rem; }
.feature .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.feature .feature-text { line-height: 1.5; }
.steps { counter-reset: step; }
.steps .card { position: relative; padding-top: 44px; gap: 10px; }
.steps .card::before { counter-increment: step; content: counter(step); position: absolute; top: 14px; left: 20px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.cta { text-align: center; }
.site-foot { padding: 28px 0; border-top: 1px solid var(--border); color: var(--text-3); font-size: .85rem; }
.site-foot .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: var(--space-7) var(--space-4); background: var(--hero); }
.auth-card { width: 100%; max-width: 420px; }

.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--border); padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
.sidebar .brand { padding: 4px 8px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { padding: 6px 10px; color: var(--text-3); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .92rem; text-decoration: none !important; }
.nav-link svg { width: 18px; height: 18px; flex: none; }
.nav-link:hover { background: var(--accent-soft); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--border); font-size: .85rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 8px var(--space-5); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.crumbs { display: flex; align-items: center; gap: var(--space-2); min-width: 0; color: var(--text-3); font-size: .88rem; font-weight: 600; }
.crumbs .crumb-current { color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-brand { display: none; font-size: 1rem; gap: 8px; min-width: 0; }
.topbar-brand .brand-mark { width: 28px; height: 28px; }
.topbar-brand span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--gap); min-width: 0; container: content / inline-size; }
.content > * { margin-top: 0; margin-bottom: 0; }
.content > :is(.stack, div:not([class]), form:not([class]), section:not([class]), [data-page-wrap]) { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.content > :is(.stack, div:not([class]), form:not([class]), section:not([class]), [data-page-wrap]) > * { margin-top: 0; margin-bottom: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3) var(--space-5); flex-wrap: wrap; padding-bottom: var(--space-1); }
.page-heading { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 360px; }
.page-head h1 { margin: 0; font-size: clamp(1.45rem, 1.25rem + .7vw, 1.85rem); letter-spacing: -.02em; overflow-wrap: break-word; }
.page-back { align-self: flex-start; font-size: .85rem; font-weight: 600; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--text-2); font-size: .88rem; }
.page-meta .badge svg { width: 13px; height: 13px; }
.page-desc { margin: 0; max-width: 80ch; color: var(--text-2); line-height: 1.55; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
@media (max-width: 640px) { .page-actions { justify-content: flex-start; } }
.menu-toggle { display: none; }
.sidebar-backdrop { display: none; }
@media (max-width: 960px) {
    .app { grid-template-columns: minmax(0, 1fr); }
    .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: min(var(--sidebar), 84vw); transform: translateX(-100%); visibility: hidden; transition: transform .2s ease-out, visibility .2s; box-shadow: var(--shadow-lg); }
    .sidebar.open { transform: none; visibility: visible; }
    .sidebar-backdrop.open { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(6, 10, 22, .45); }
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 8px var(--space-4); }
    .content { padding: var(--space-4); }
}
.token-box { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.token-box code { flex: 1 1 260px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); word-break: break-all; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; font-size: .9rem; }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; word-break: break-word; }
.error-page { text-align: center; padding: var(--section-y) var(--space-4); display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.error-page > * { margin: 0; }
.error-page p { max-width: 520px; }
.row.center { justify-content: center; }
.error-page .code { font-size: 5rem; font-weight: 800; line-height: 1; }
.table.share td { vertical-align: middle; }
.share-label { font-size: .88rem; margin-bottom: 4px; word-break: break-word; }
.share-bar, .upload-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.share-bar span, .upload-bar span { display: block; width: 0; height: 100%; background: var(--accent); border-radius: inherit; }
.upload-bar { height: 8px; }
.upload-bar span { transition: width .2s ease; }
.upload-progress { display: flex; flex-direction: column; gap: 6px; }
.hero-note { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--text-2); font-size: .9rem; font-weight: 500; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { width: 16px; height: 16px; color: var(--ok); stroke-width: 2.4; }
.download { background: radial-gradient(900px 380px at 50% 0%, var(--accent-soft), transparent 70%); border-bottom: 1px solid var(--border); }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 940px; margin: 0 auto; }
.dl-card { display: flex; flex-direction: column; gap: 20px; padding: 26px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.dl-card.recommended { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-lg); }
.dl-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dl-head h3 { margin: 0 0 2px; font-size: 1.3rem; }
.dl-os { width: 54px; height: 54px; flex: none; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 22px rgba(106, 92, 246, .28); }
.dl-os svg { width: 28px; height: 28px; }
.dl-meta { color: var(--text-3); font-size: .85rem; }
.dl-recommended { display: none; margin-left: auto; }
.dl-card.recommended .dl-recommended { display: inline-flex; }
.dl-reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: .93rem; }
.dl-reqs li { display: flex; align-items: flex-start; gap: 10px; }
.dl-reqs svg { width: 20px; height: 20px; flex: none; padding: 3px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); stroke-width: 2.6; }
.dl-card .btn.primary { margin-top: auto; }
.dl-verify summary { cursor: pointer; color: var(--text-3); font-size: .85rem; }
.dl-verify summary:hover { color: var(--text-2); }
.dl-verify .token-box { margin-top: 10px; }
.dl-verify code { font-size: .74rem; }
.dl-steps { width: 100%; max-width: 940px; margin: var(--space-3) auto 0; }
.dl-step { display: flex; gap: 14px; align-items: flex-start; }
.dl-step h3 { margin: 4px 0 4px; font-size: 1rem; }
.dl-step p { margin: 0; color: var(--text-2); font-size: .9rem; }
.dl-num { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; }
@media (max-width: 720px) {
    .download-grid { grid-template-columns: minmax(0, 1fr); }
    .dl-card { padding: 20px; }
    .dl-recommended { margin-left: 0; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: var(--radius-sm); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); font-weight: 600; }
.skip-link:focus { top: 12px; }
main:focus { outline: none; }
.btn:focus-visible, .nav-link:focus-visible, .segmented button:focus-visible, .pager button:focus-visible, .table th.sortable:focus-visible,
summary:focus-visible, a:focus-visible, .chart:focus-visible, .check input:focus-visible, .toast:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.segmented button:focus-visible { outline-offset: -2px; }

.field > :last-child { margin-bottom: 0; }
.card h4, .steps-list h3 { margin: 0 0 4px; font-size: .98rem; }
.modal-body > .subhead { margin-top: var(--space-2); }
.modal-body > p { line-height: 1.55; white-space: pre-line; }
.steps pre { white-space: pre-wrap; word-break: break-word; }
.steps .card p { margin-bottom: 0; }
pre.wrap { white-space: pre-wrap; word-break: break-word; }
.table td .muted.small, .table td > div + div { margin-top: 3px; line-height: 1.4; }
.table td.actions .btn-group { flex-wrap: wrap; justify-content: flex-end; }
.table tr.is-offline td { color: var(--text-2); }
.table tr.is-paused td { background: color-mix(in srgb, var(--warn) 6%, transparent); }
.is-stale .value { color: var(--text-2); }
time { white-space: nowrap; }

label.req::after, .label.req::after { content: " *"; color: var(--bad); font-weight: 700; }
.field .error:empty { display: none; }
.field.invalid .input:focus { box-shadow: 0 0 0 3px var(--bad-soft); }
.form-actions.between { justify-content: space-between; align-items: center; }
fieldset.group, details.group { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); min-width: 0; display: grid; gap: 14px; }
fieldset.group legend { padding: 0 6px; font-size: .85rem; font-weight: 700; color: var(--text-2); }
fieldset.group > p { margin: 0; }
details.group { display: block; }
details.group > summary, details.blocked-options > summary { cursor: pointer; font-size: .85rem; font-weight: 700; color: var(--text-2); }
details.group[open] > summary { margin-bottom: 4px; }
details.group > .grid { margin-top: var(--field-gap); }
details.blocked-options > summary { font-weight: 600; }
details.blocked-options > p { margin: 8px 0 0; line-height: 1.6; }
textarea.input.prose { font-family: var(--font); font-size: .95rem; }
.input.code-input { font-size: 1.15rem; letter-spacing: .12em; text-transform: uppercase; max-width: 220px; }
.btn.danger.solid { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger.solid:hover { filter: brightness(1.08); background: var(--bad); }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--text-2) var(--text-2) var(--text-2) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.primary.loading::after, .btn.danger.solid.loading::after { border-color: #fff #fff #fff transparent; }
.btn.loading svg { visibility: hidden; }
.spinner.sm { width: 12px; height: 12px; border-width: 2px; }
.toast { cursor: pointer; line-height: 1.45; }

.auth-card { gap: var(--space-4); padding: var(--space-6) var(--card-pad); }
.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-head > * { margin: 0; }
.auth-head h1 { font-size: 1.6rem; }
.auth-foot { padding-top: var(--space-3); border-top: 1px solid var(--border); display: grid; gap: 6px; }
.auth-foot p { margin: 0; }

.onboard .steps-list, .flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.steps-list li { display: flex; gap: 14px; align-items: flex-start; }
.steps-list li > div { min-width: 0; flex: 1; }
.steps-list p { margin: 0; }
.steps-list .notice { margin-top: 10px; }
.step-num { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .9rem; }
.onboard .badge { gap: 8px; }
.flow { counter-reset: flow; gap: 10px; }
.flow li { counter-increment: flow; position: relative; padding-left: 34px; color: var(--text-2); font-size: .92rem; line-height: 1.5; }
.flow li::before { content: counter(flow); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: .75rem; }
.facts { margin: 0; padding-left: 18px; display: grid; gap: 8px; color: var(--text-2); font-size: .9rem; line-height: 1.5; }

.control-groups { display: grid; gap: 14px; }
.control-group { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; align-items: center; }
.control-group > .label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
@media (max-width: 640px) { .control-group { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.command-status { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; }
.command-status.ok { border-color: transparent; background: var(--ok-soft); }
.command-status.bad { border-color: transparent; background: var(--bad-soft); }
.config-editor .table-wrap { margin-bottom: 0; }
.config-table td { vertical-align: top; }
.config-table td .help { margin-top: 6px; font-size: .78rem; color: var(--text-2); }
.config-table td:last-child { width: 1%; }
.danger-zone { border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.danger-zone .card-head h2, .danger-zone .card-head h3 { color: var(--bad); }
.danger-row { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-3) var(--space-4); flex-wrap: wrap; }
.danger-row + .danger-row { padding-top: var(--card-gap); border-top: 1px solid var(--border); }
.danger-row > .danger-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.danger-row > .danger-text > * { margin: 0; }
.danger-row > .form { flex: 1 1 100%; }
.table td.model { min-width: 190px; }
.table td.name-cell { white-space: nowrap; }
.token-hidden { color: var(--text-2); font-family: var(--font); font-style: italic; }
.topbar { flex-wrap: nowrap; }
.topbar > .row { flex-wrap: nowrap; min-width: 0; }
.topbar > .row:first-child { flex: 1 1 auto; }
@media (max-width: 640px) {
    .topbar { gap: 6px; }
    .topbar > .row { gap: 4px; }
    .topbar [data-logout] span { display: none; }
    .topbar [data-logout] { padding: 8px 10px; }
    .crumbs { display: none; }
    .topbar-brand { display: inline-flex; }
}
.table td.wide-cell { min-width: 220px; }
.hero-card .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.input.narrow { width: 110px; min-width: 0; }
.inline-field { min-width: 200px; }
select.input.narrow-select { width: auto; min-width: 180px; max-width: 100%; }
.text-ok { color: var(--ok); }
.text-bad { color: var(--bad); }
.pre-line { white-space: pre-line; }
.secret-once { white-space: pre-wrap; word-break: break-all; user-select: all; }
.pool-row {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(180px, 2fr) minmax(120px, 1fr) auto auto;
    gap: 10px;
    align-items: start;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
}
.pool-row .input { background: var(--surface); }
.oc-table td, .oc-table th { padding: 8px 10px; }
.oc-table .field { gap: 2px; }
.oc-table td:first-child { min-width: 220px; }
.drift-list { margin: 0; padding-left: 20px; }
.args-preview { margin: 4px 0; padding: 8px 10px; font-size: .76rem; white-space: pre-wrap; word-break: break-all; max-height: 160px; overflow: auto; }
@media (max-width: 900px) {
    .pool-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .pool-row { grid-template-columns: minmax(0, 1fr); }
    .input.narrow { width: 100%; }
}
.table td.name-cell, .table td.name-cell a { white-space: nowrap; word-break: keep-all; overflow-wrap: normal; hyphens: none; }
.table td.name-cell { min-width: max-content; }
.notice .row.between { align-items: center; }
.table td.crash-cell { min-width: 260px; }
.table.crash-stack td { padding-top: 6px; padding-bottom: 6px; }
.table.crash-stack tr.own-frame td { background: var(--accent-soft); }
.table.crash-stack tr.own-frame td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table tr.is-unpaired td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.crash-log { max-height: 480px; }
@media (max-width: 720px) {
    .table td.crash-cell { min-width: 0; }
    .crash-log { max-height: 60vh; }
}

.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--accent-text); font-size: .72rem; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
textarea.input.prose { font-family: var(--font); font-size: .95rem; line-height: 1.55; min-height: 120px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.section > .container.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.contact-copy { display: flex; flex-direction: column; gap: var(--space-4); }
.contact-copy > * { margin: 0; }
.contact-copy .badge { align-self: flex-start; }
.contact-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); }
.contact-points li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); line-height: 1.5; }
.contact-points svg { width: 22px; height: 22px; flex: none; color: var(--accent); margin-top: 1px; }
.contact-card { padding: var(--space-5) var(--card-pad); position: relative; }
.contact-done { display: flex; flex-direction: column; gap: var(--space-3); align-items: flex-start; }
.contact-done > * { margin: 0; }
.contact-done-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); }
.contact-done-icon svg { width: 24px; height: 24px; }
.contact-done .token-box { width: 100%; }
@media (max-width: 900px) { .section > .container.contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); } }

.container.slim { max-width: 860px; }
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--gap); align-items: start; }
@media (max-width: 1100px) { .ticket-layout { grid-template-columns: minmax(0, 1fr); } }
.thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.msg { max-width: min(760px, 92%); padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; scroll-margin-top: 80px; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.msg.theirs { align-self: flex-start; }
.msg.internal { background: var(--warn-soft); border: 1px dashed var(--warn); }
.msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .88rem; }
.msg-head time { margin-left: auto; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.thread-event { align-self: center; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: .8rem; color: var(--text-3); text-align: center; scroll-margin-top: 80px; }
.thread-event.internal { font-style: italic; }
.flash-target { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 1px var(--accent); }
.table tr.is-unread td { font-weight: 600; }
#staff-reply-form.is-note textarea { border-style: dashed; border-color: var(--warn); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.plain-list li { display: flex; justify-content: space-between; gap: 10px; }
.plain-list a { overflow-wrap: anywhere; }

.test-steps { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.test-step { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: start; }
