/* Qvap server console. Light and dark themes follow the system setting. */

:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --text: #1a1f27;
  --muted: #667085;
  --line: #e3e7ed;
  --accent: #3563e9;
  --accent-soft: #e9effd;
  --accent-text: #ffffff;
  --ok: #18804a;
  --ok-soft: #e4f4ea;
  --warn: #9a6200;
  --warn-soft: #fdf2dc;
  --danger: #cf3a30;
  --danger-soft: #fdebe9;
  --violet: #6d4ad6;
  --violet-soft: #efeafd;
  --gray-soft: #eef0f4;
  --shadow: 0 1px 2px rgb(16 24 40 / .05);
  --shadow-lg: 0 16px 40px rgb(16 24 40 / .16);
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* chart fills, checked with the palette validator for color-vision deficiency and contrast */
  --series-1: #2a78d6;
  --added-fill: #1baf7a;
  --modified-fill: #eda100;
  --removed-fill: #e34948;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d1015;
    --surface: #151a21;
    --surface-2: #1b212a;
    --text: #e6e9ef;
    --muted: #8a94a6;
    --line: #272e39;
    --accent: #6f95f5;
    --accent-soft: #1b2744;
    --accent-text: #0a0e16;
    --ok: #4cc283;
    --ok-soft: #14301f;
    --warn: #e3a843;
    --warn-soft: #36290f;
    --danger: #f27a70;
    --danger-soft: #3a1a18;
    --violet: #a78bfa;
    --violet-soft: #2a2347;
    --gray-soft: #222833;
    --shadow: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-lg: 0 16px 40px rgb(0 0 0 / .55);
    --series-1: #3987e5;
    --added-fill: #199e70;
    --modified-fill: #c98500;
    --removed-fill: #e8526b;
  }
}

/* ---------- base */

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1 { display: flex; align-items: center; gap: 12px; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 650; }
small { color: var(--muted); font-size: 12.5px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
code { padding: 1px 6px; border-radius: 6px; background: var(--gray-soft); }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- controls */

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 550; color: var(--text); text-decoration: none; white-space: nowrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 14px;
  box-shadow: var(--shadow); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s;
}
button:hover:not(:disabled), .button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); text-decoration: none; }
button:disabled { opacity: .5; cursor: not-allowed; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 85%, #000); border-color: transparent; }
.danger { color: var(--danger); }
.danger:hover:not(:disabled) { border-color: var(--danger); background: var(--danger-soft); }
.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger.solid:hover:not(:disabled) { background: color-mix(in srgb, var(--danger) 85%, #000); }
.ghost { background: none; border-color: transparent; box-shadow: none; color: var(--muted); }
.ghost:hover:not(:disabled) { background: var(--gray-soft); border-color: transparent; color: var(--text); }
.ghost.danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); }
.link { background: none; border: 0; box-shadow: none; padding: 0; color: var(--accent); }
.link:hover:not(:disabled) { text-decoration: underline; }
.small { padding: 4px 10px; font-size: 13px; }
.icon-only { padding: 6px; }
.wide { width: 100%; }

input, select, textarea { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; min-width: 0; }
input:hover, select:hover { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { margin-top: 4px; }
.check span { display: grid; }
.copy { display: flex; gap: 6px; }
.copy input { flex: 1; }
.offscreen { position: fixed; left: -9999px; top: 0; }

/* ---------- top bar */

.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 28px; height: 62px; padding: 0 24px;
  background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-text { display: grid; line-height: 1.2; }
.brand-text strong { font-size: 15px; }
.brand-text small { font-size: 12px; }
.logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #5b85f6, #3456d1); box-shadow: 0 4px 12px rgb(53 99 233 / .3); }
.logo .icon { width: 20px; height: 20px; }
.sections { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.sections a { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 550; white-space: nowrap; }
.sections a:hover { background: var(--gray-soft); color: var(--text); text-decoration: none; }
.sections a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.account { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.person { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; }
.person:hover { text-decoration: none; }
a.person:hover strong { color: var(--accent); }
.person > span { display: grid; line-height: 1.25; min-width: 0; }
.who small { font-size: 12px; }

.avatar {
  display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: hsl(var(--hue, 220) 60% 92%); color: hsl(var(--hue, 220) 45% 32%); font-size: 12.5px; font-weight: 650; letter-spacing: .02em;
}
.avatar.big { width: 46px; height: 46px; font-size: 16px; }
@media (prefers-color-scheme: dark) { .avatar { background: hsl(var(--hue, 220) 30% 24%); color: hsl(var(--hue, 220) 75% 82%); } }

/* ---------- page layout */

main { max-width: 1120px; margin: 0 auto; padding: 28px 24px 72px; display: grid; gap: 20px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.page-title { display: grid; gap: 6px; min-width: 0; }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.lead { color: var(--muted); max-width: 680px; }
.lead .badge { margin-right: 4px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.card { display: grid; gap: 14px; align-content: start; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 .icon { color: var(--muted); }
/* clip, unlike hidden, rounds the corners without becoming a scroll container that would trap sticky day headers */
.card.flush { padding: 0; gap: 0; overflow: clip; }
.card.flush.scroll { overflow-x: auto; }
.flush > .card-head { padding: 16px 20px 12px; }
.pad { padding: 4px 20px 20px; }
.scroll { overflow-x: auto; }
.card.strip { padding: 16px 20px; }

.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.facts dd .changes, .facts dd time { font-size: 15px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.project-card {
  display: grid; gap: 14px; align-content: start; padding: 18px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.project-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.card-top { display: flex; align-items: center; gap: 10px; }
.card-top strong { flex: 1; font-size: 15.5px; overflow-wrap: anywhere; }
.card-foot { padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.tile { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.tile.big { width: 46px; height: 46px; border-radius: 13px; }
.tile.big .icon { width: 24px; height: 24px; }

.search { display: flex; align-items: center; gap: 8px; max-width: 380px; padding: 0 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.search input { flex: 1; padding: 9px 0; border: 0; background: none; outline: none; }

/* ---------- badges, chips, changes */

.badge, .chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--gray-soft); color: var(--muted); vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.role-read { color: var(--text); }
.role-write, .tone-blue { background: var(--accent-soft); color: var(--accent); }
.role-manage, .tone-amber { background: var(--warn-soft); color: var(--warn); }
.role-admin, .tone-violet { background: var(--violet-soft); color: var(--violet); }
.tone-green { background: var(--ok-soft); color: var(--ok); }
.tone-red, .badge.off { background: var(--danger-soft); color: var(--danger); }
.changes { white-space: nowrap; font-variant-numeric: tabular-nums; }
.changes .added { color: var(--ok); }
.changes .modified { color: var(--warn); }
.changes .removed { color: var(--danger); }

/* ---------- lists and tables */

.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows > li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; padding-top: 0; }
.rows > li:last-child { padding-bottom: 0; }
.row-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 10px; background: var(--gray-soft); color: var(--muted); }
.row-title { display: flex; align-items: center; gap: 8px; }
.rows small { display: block; margin-top: 2px; }
.hash { color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
tr.clickable { cursor: pointer; }
th.num, td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scroll td:first-child { white-space: nowrap; }
tfoot td { font-weight: 650; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
td .badge.off { margin-left: 8px; }

/* Rows share the list's columns (subgrid), so labels of different widths keep names aligned. */
.events { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; column-gap: 12px; }
.events.compact { grid-template-columns: auto minmax(0, 1fr) auto; }
.event { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: center; padding: 10px 20px; border-top: 1px solid var(--line); }
.event > .chip { justify-self: start; }
.event > time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.event-text { min-width: 0; overflow-wrap: anywhere; }
.event-text small { display: block; }
.addr { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.compact > .event { padding: 10px 0; }
.compact > .event:first-child { border-top: 0; padding-top: 0; }
.day { grid-column: 1 / -1; position: sticky; top: 62px; z-index: 1; padding: 8px 20px; font-size: 12px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); }
.events > .day:first-child { border-top: 0; }
.more { margin: 14px auto; display: flex; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--gray-soft); }
.segmented a { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-weight: 550; }
.segmented a:hover { color: var(--text); text-decoration: none; }
.segmented a[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.footnote { color: var(--muted); font-size: 13px; max-width: 820px; }

/* ---------- forms in cards */

.grants { display: grid; gap: 14px; }
.grant-rows { display: grid; gap: 8px; }
.grant-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px auto; gap: 8px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.inline-form select:first-child { flex: 1; min-width: 200px; }
.setting { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.card-head + .setting { border-top: 0; padding-top: 0; }
.setting:last-child { padding-bottom: 0; }
.setting > div { flex: 1; }
.setting p { color: var(--muted); font-size: 13px; }
.hint { padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); font-size: 13px; }

/* ---------- empty states, onboarding, help */

.empty { display: grid; justify-items: center; gap: 10px; padding: 48px 24px; text-align: center; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.card .empty { padding: 24px 12px; border: 0; background: none; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.empty-icon .icon { width: 26px; height: 26px; }
.empty p { max-width: 460px; color: var(--muted); }
.empty .page-actions { margin-top: 6px; }

.onboarding { background: linear-gradient(135deg, var(--accent-soft), var(--surface) 65%); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; counter-reset: step; }
.steps li { display: flex; gap: 12px; counter-increment: step; }
.steps p { color: var(--muted); font-size: 13px; margin: 2px 0 6px; }
.step-mark { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 13px; }
.step-mark:empty::before { content: counter(step); }
.steps .done .step-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps .done .step-mark .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.steps .done strong { color: var(--muted); text-decoration: line-through; }

details.help > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.card.help > summary { list-style: none; display: flex; align-items: center; gap: 8px; }
details.card.help > summary::-webkit-details-marker { display: none; }
details.card.help > summary::before { content: "›"; display: inline-block; width: 10px; transition: transform .15s; }
details.card.help[open] > summary::before { transform: rotate(90deg); }
details.help ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
details.help li .icon-only { margin-left: 4px; vertical-align: middle; }
details.help p { margin-top: 8px; color: var(--muted); font-size: 13px; }

/* ---------- loading, dialogs, notifications */

.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 64px 0; color: var(--muted); animation: appear .2s .2s both; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes appear { from { opacity: 0; } }

dialog { width: min(520px, calc(100vw - 32px)); padding: 24px; color: var(--text); background: var(--surface); border: 0; border-radius: 16px; box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgb(12 17 26 / .45); backdrop-filter: blur(2px); }
dialog form { display: grid; gap: 16px; }
dialog h2 { font-size: 18px; }
dialog h2 .icon { color: var(--accent); }
.end { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.end.reverse { flex-direction: row-reverse; justify-content: flex-start; }

#toast { inset: auto auto 24px 50%; margin: 0; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 11px 18px; border: 0; border-radius: 11px; color: #fff; font-weight: 550; background: #1f2633; box-shadow: var(--shadow-lg); }
#toast.error { background: var(--danger); }
@media (prefers-color-scheme: dark) { #toast.ok { background: #e6e9ef; color: #151a21; } #toast.error { color: #1a0d0c; } }

/* ---------- sign in */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 0%, var(--accent-soft), transparent 55%), var(--bg); }
.login-card { width: min(440px, 100%); gap: 18px; padding: 32px; box-shadow: var(--shadow-lg); }
.brand.big .logo { width: 46px; height: 46px; border-radius: 13px; }
.brand.big .logo .icon { width: 26px; height: 26px; }
.brand.big strong { font-size: 21px; }
.form-error { color: var(--danger); font-size: 13px; }
.form-error:empty { display: none; }

/* ---------- demo */

.badge.demo { background: var(--warn-soft); color: var(--warn); cursor: help; }
.demo-accounts { display: grid; gap: 8px; }
.demo-account { justify-content: flex-start; gap: 12px; padding: 10px 12px; text-align: left; white-space: normal; }
.demo-account > span { display: grid; line-height: 1.3; }

/* ---------- charts: thin marks, rounded data ends, hairline grid, 2px gaps between touching marks */

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; }
.chart.wide { grid-column: 1 / -1; }
.chart .plot { position: relative; height: 180px; margin: 18px 0 0 40px; }
.tick { position: absolute; left: 0; right: 0; bottom: calc(var(--at) * 100%); border-top: 1px solid var(--line); }
.tick > span { position: absolute; right: 100%; padding-right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.columns { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.column { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; border-radius: 4px; outline-offset: 0; }
.column .bar { position: relative; width: min(100%, 24px); height: calc(var(--value) * 100%); min-height: 2px; background: var(--series-1); border-radius: 4px 4px 0 0; }
.column.zero .bar { min-height: 0; }
.column:hover .bar, .column:focus-visible .bar { filter: brightness(1.18); }
.peak { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); padding-bottom: 3px; font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; }
.x-axis { display: flex; gap: 2px; margin: 6px 0 0 40px; }
.x-axis span { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; font-size: 11px; color: var(--muted); white-space: nowrap; }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr); align-items: center; gap: 12px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 13px; }
.track { display: flex; align-items: center; gap: 2px; min-width: 0; }
.piece { flex: 0 0 calc(var(--value) * (100% - 84px)); height: 14px; min-width: 2px; background: var(--series-1); }
.piece.end { border-radius: 0 4px 4px 0; }
.piece:hover, .piece:focus-visible { filter: brightness(1.18); }
.bar-value { margin-left: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.piece.added, .swatch.added { background: var(--added-fill); }
.piece.modified, .swatch.modified { background: var(--modified-fill); }
.piece.removed, .swatch.removed { background: var(--removed-fill); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 3px; }
.chart-tip { position: fixed; z-index: 50; transform: translate(-50%, calc(-100% - 8px)); display: grid; padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); pointer-events: none; font-size: 12px; white-space: nowrap; }
.chart-tip strong { font-size: 14px; }
.chart-tip span { color: var(--muted); }

/* ---------- small screens */

@media (max-width: 760px) {
  .topbar { position: static; flex-wrap: wrap; height: auto; gap: 10px; padding: 10px 16px; }
  .sections { order: 3; flex-basis: 100%; }
  .brand-text small, .who { display: none; }
  main { padding: 20px 16px 56px; }
  h1 { font-size: 21px; }
  .page-head { align-items: flex-start; }
  .events, .events.compact { grid-template-columns: auto minmax(0, 1fr); }
  .event .addr { display: none; }
  .events:not(.compact) .event-text { grid-column: 1 / -1; }
  .day { top: 0; }
  .grant-row { grid-template-columns: minmax(0, 1fr) auto; }
  .grant-row select:nth-child(2) { grid-row: 2; }
  .setting { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
