:root {
    color-scheme: light;
    --page:#f5f7fa; --surface:#fff; --text:#142b43; --text-secondary:#50677a;
    --muted:#718096; --line:#e3e9ef; --stroke:#dce4ea; --field:#fff;
    --focus:#1e9d92; --action:#087aaf; --active:#e8f3fa; --danger:#af282f;
    --link:#086c9a; --accent:#ffab24;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --page:#0f1724; --surface:#172334; --field:#121d2c; --stroke:#465b73;
        --text:#e7eef6; --text-secondary:#bbcbdb; --focus:#7bc6f4;
        --action:#176994; --line:#324358; --muted:#a5b6c8;
        --active:#253b51; --danger:#a92d35; --link:#7bc6f4;
    }
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --page:#0f1724; --surface:#172334; --field:#121d2c; --stroke:#465b73;
    --text:#e7eef6; --text-secondary:#bbcbdb; --focus:#7bc6f4;
    --action:#176994; --line:#324358; --muted:#a5b6c8;
    --active:#253b51; --danger:#a92d35; --link:#7bc6f4;
}
*, *::before, *::after { box-sizing:border-box; }
body { margin:0; background:var(--page); color:var(--text); font:16px/1.5 system-ui,sans-serif; }
a { color:var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline:2px solid var(--focus); outline-offset:3px;
}
.top { background:var(--surface); border-bottom:1px solid var(--line); }
.top-inner, main { max-width:1700px; margin:auto; padding-inline:clamp(16px,3vw,44px); }
.top-inner { min-height:68px; display:flex; align-items:center; gap:28px; }
.brand { display:flex; align-items:center; gap:10px; white-space:nowrap; color:var(--text); font-weight:750; text-decoration:none; }
.brand img { border-radius:8px; }
nav { display:flex; align-self:stretch; gap:4px; }
nav a { display:grid; align-items:center; padding:0 16px; border-bottom:3px solid transparent; text-decoration:none; color:var(--text-secondary); font-weight:650; }
nav a:hover, nav a[aria-current="page"] { color:var(--text); background:var(--active); }
nav a[aria-current="page"] { border-color:var(--accent); }
.top-actions { margin-left:auto; display:flex; gap:8px; align-items:center; }
main { padding-block:28px 56px; }
h1, h2, p { margin:0 0 16px; }
h1 { font-size:clamp(26px,4vw,36px); letter-spacing:-.03em; }
h2 { font-size:20px; letter-spacing:-.01em; }
.card { background:var(--surface); padding:clamp(16px,3vw,26px); border:1px solid var(--line); border-radius:12px; margin-bottom:16px; }
.card > :last-child { margin-bottom:0; }
.narrow { max-width:600px; }
.fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:14px; margin-bottom:16px; }
label { display:block; font-size:14px; font-weight:650; margin-bottom:5px; }
input:not([type="checkbox"]), select, textarea { width:100%; min-height:42px; padding:8px 11px; border:1px solid var(--stroke); border-radius:7px; color:var(--text); background:var(--field); font:inherit; }
textarea { min-height:80px; resize:vertical; }
input[type=checkbox] { accent-color:var(--action); }
.check { display:flex; align-items:baseline; gap:8px; }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:7px 14px; border:1px solid transparent; border-radius:7px; background:var(--action); color:white; text-decoration:none; font:inherit; font-weight:650; cursor:pointer; }
.button:hover { filter:brightness(.93); }
.secondary { background:var(--surface); color:var(--text); border-color:var(--stroke); }
.danger { background:var(--danger); }
.inline, .page-heading { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.inline .grow { flex:1 1 270px; }
.page-heading { justify-content:space-between; margin-bottom:16px; }
.page-heading h1 { margin:0; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; text-align:left; }
td, th { vertical-align:top; padding:11px 12px; border-bottom:1px solid var(--line); }
th { color:var(--text-secondary); font-size:14px; white-space:nowrap; }
tr:last-child td { border-bottom:0; }
td a { font-weight:650; }
dl { display:grid; grid-template-columns:minmax(125px,200px) 1fr; gap:8px 18px; margin:0; }
dt, .hint, .empty { color:var(--text-secondary); }
dd { margin:0; overflow-wrap:anywhere; }
.validation-summary-valid { display:none; }
.validation-summary-errors { border-inline-start:3px solid var(--danger); padding-inline:12px; margin-bottom:14px; }
.validation-summary-errors ul { margin:0; padding-inline-start:20px; }
.notice { border-inline-start:3px solid var(--focus); }
@media (max-width:900px) {
    .top-inner { gap:8px 16px; flex-wrap:wrap; padding-block:8px 0; }
    nav { order:3; width:100%; min-height:46px; overflow-x:auto; }
    nav a { padding-inline:12px; }
}

@media (max-width:480px) {
    dl { grid-template-columns:1fr; gap:4px; }
    dd { margin-bottom:8px; }
}
