/* Hallmark · audit polish · shape: app screen · genre: modern-minimal · surface: tokens at :root, light-dark() themes · brand: SolWise (brand kit + chemical.solwise.ai logo) */
/* Hallmark · waive 24b · the house spacing (6, 10, 14, 18px) is applied the same way on every screen · respacing every table, card and toolbar would reflow all seven RBM screens for no reader gain */
/* Hallmark · waive 16 · ok toasts confirm saves, decisions and uploads only · CLAUDE.md makes the ok toast the one confirmation engineers get for each saved RBM change */
/* Shared by every screen: fonts, colour and size tokens, base elements, layout, buttons and form controls, tables,
   tags, empty and loading states, dialogs and toasts. Screens add only what is theirs, in pages/*.css. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400 600; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Poppins is the brand face; it has no equal-width digits, so IBM Plex Sans keeps body text, tables and figures aligned */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- tokens: each colour is light-dark(light, dark); the system setting picks unless data-theme pins one ---------- */
:root {
  color-scheme: light dark;
  /* SolWise brand kit: neutral greys, text #333333, wordmark #1C1C1C, magenta #A80E4C for every "act here", crimson #BF1A28 for link hover.
     The kit's red, orange and gold stay out of the screens: here they mean risk (High, Unacceptable), warnings and errors. */
  --canvas: light-dark(#f5f5f5, #141414); --panel: light-dark(#fff, #1c1c1c); --sunken: light-dark(#f0f0f0, #252525);
  --line: light-dark(#e3e3e3, #2f2f2f); --line-2: light-dark(#cfcfcf, #3d3d3d);
  --ink: light-dark(#333333, #ececec); --ink-2: light-dark(#525252, #bdbdbd); --ink-3: light-dark(#616161, #a3a3a3); --field: light-dark(#8a8a8a, #767676);
  --brand-ink: light-dark(#1c1c1c, #f2f2f2);
  --accent: light-dark(#a80e4c, #f07aa6); --accent-hover: light-dark(#bf1a28, #f8a0c0); --accent-ink: light-dark(#fff, #141414); --accent-soft: light-dark(#f8e7ee, #3a1f2b);
  --accent-strong: light-dark(#8e0b40, #f594b8); --bad-soft: color-mix(in srgb, var(--bad) 10%, transparent);
  /* the kit's gradient: the brand mark only, never data */
  --brand-grad: linear-gradient(135deg, #a80e4c, #bf1a28 55%, #fc8330); --on-brand: #fff;
  --ok: light-dark(#1b7a35, #5cc879); --bad: light-dark(#b3261e, #f2867d); --attention: light-dark(#8a5a00, #f0b847);
  --low: #0aac23; --med: #fbb315; --high: #f18a59; --unacc: #dc3c3d;
  /* matrix cells: the risk colour softened toward the panel, less in dark so it does not turn muddy */
  --cell-low: light-dark(color-mix(in srgb, #0aac23 50%, #fff), color-mix(in srgb, #0aac23 72%, #1a2026));
  --cell-med: light-dark(color-mix(in srgb, #fbb315 50%, #fff), color-mix(in srgb, #fbb315 72%, #1a2026));
  --cell-high: light-dark(color-mix(in srgb, #f18a59 50%, #fff), color-mix(in srgb, #f18a59 72%, #1a2026));
  --cell-unacc: light-dark(color-mix(in srgb, #dc3c3d 50%, #fff), color-mix(in srgb, #dc3c3d 72%, #1a2026));
  --shade: 20 20 20;
  --lift: 0 6px 20px rgb(var(--shade) / .14), 0 1px 3px rgb(var(--shade) / .08);  /* shadows and the dialog backdrop: rgb(var(--shade) / alpha) */
  --fs-2xs: 11px; --fs-xs: 12px; --fs-sm: 13px; --fs-md: 16px;
  --r: 6px; --r-lg: 8px; --r-pill: 999px;
  /* the page column; a full-width strip (the top bar) pads its content to the same edges with --edge */
  --page: 1120px; --gutter: 24px; --bar-h: 52px; --edge: max(var(--gutter), calc((100% - var(--page)) / 2 + var(--gutter)));
  --font-sans: "IBM Plex Sans", system-ui, sans-serif; --font-brand: "Poppins", var(--font-sans); --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
  /* control heights: every button, tab, segment and nav link sizes from these; touch screens get larger targets */
  --ctl: 34px; --ctl-sm: 28px; --target: 24px;
  --t: .15s ease-out;  /* every hover and selection fades at this one speed */
  /* the kit's button arrow, drawn as a mask so it takes the button's text colour */
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8h9.5M8.5 4l4 4-4 4' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (pointer: coarse) { :root { --ctl: 44px; --ctl-sm: 40px; --target: 40px; } }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }  /* a component's own display must never un-hide it */
html, body { overflow-x: clip; }
html { scroll-padding-top: var(--bar-h); }  /* focus and in-page scrolls land below the pinned top bar */
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--canvas); color: var(--ink); font: 15px/1.55 var(--font-sans); font-variant-numeric: tabular-nums; caret-color: transparent; scrollbar-color: var(--line-2) transparent; }
::selection { background: var(--accent-soft); color: var(--ink); }
/* a caret only where typing is possible: with caret browsing on, a clicked title or paragraph otherwise shows one */
input, textarea, [contenteditable="true"] { caret-color: var(--accent); }
a { color: var(--accent); text-underline-offset: 3px; }
/* one interaction system (DESIGN.md "Interaction"): links turn crimson and underline; controls fade at one speed */
a:hover, .btn.link:hover, summary:hover { color: var(--accent-hover); }
.btn.link:hover { text-decoration-color: currentColor; }
summary:hover { text-decoration: underline; }
a, button, summary, select, .qi, .note, tbody tr.link td { transition: color var(--t), background-color var(--t), border-color var(--t); }
h1, h2, h3 { font-family: var(--font-brand); }
h1 { font-size: 24px; line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
h2 { font-size: 16px; margin: 0; font-weight: 600; }
h3 { font-size: 14px; margin: 0 0 8px; }
p { margin: 0; }
p + p, h1 + p { margin-top: 6px; }
.stack > p + p { margin-top: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
#main:focus { outline: none; }  /* takes focus after a page change so keyboards start there; it is not a control */
[aria-busy="true"] { cursor: progress; }  /* a form or control whose save is still running (app.js run()) */
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.sub { color: var(--ink-3); font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 400; }
.help { color: var(--ink-2); font-size: var(--fs-sm); max-width: 70ch; margin: 0; }
.err { color: var(--bad); }
.err:empty { position: absolute; }  /* out of the flow when empty, so it adds no gap, yet stays a live region */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }

/* ---------- layout ---------- */
main { flex: 1; }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
#page { padding-top: 24px; padding-bottom: 24px; }
.stack { display: grid; gap: 18px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
/* two columns: a narrow list or matrix beside the detail */
.split, .md { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); align-items: start; }
.split { gap: 24px; }
.md { gap: 20px; }
.md .section { margin-bottom: 0; }

/* ---------- buttons and form controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--ctl); font: inherit; font-family: var(--font-brand); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 0 16px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:not(:disabled, [aria-disabled="true"]):hover { border-color: var(--accent); color: var(--accent); }
/* a button that opens another page ends in the kit's arrow; downloads (/api/...) and actions do not */
a.btn:not(.link, .icon, [href^="/api/"])::after { content: ""; flex: none; width: 14px; height: 14px; margin-right: -2px; background: currentColor; mask: var(--arrow) center / contain no-repeat; transition: transform .15s ease-out; }
a.btn:not(.link, .icon, [href^="/api/"]):hover::after { transform: translateX(2px); }
.btn[aria-pressed="true"], .btn[aria-current="page"] { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.seg button:active { background: var(--sunken); }
.qi:active { background: var(--sunken); }
tbody tr.link:active td { background: var(--sunken); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:not(:disabled, [aria-disabled="true"]):hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: currentColor; }
.btn.danger:not(:disabled, [aria-disabled="true"]):hover { color: var(--bad); border-color: var(--bad); background: var(--bad-soft); }
.btn.link { min-height: 0; border: 0; border-radius: var(--r); background: none; padding: 0; font-family: inherit; font-size: inherit; color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-align: left; white-space: normal; justify-content: flex-start; }
/* unavailable reads as unavailable: grey, never a faded brand colour */
.btn:disabled, .btn[aria-disabled="true"] { background: var(--sunken); border-color: var(--line-2); color: var(--ink-3); cursor: not-allowed; }
.btn.sm { min-height: var(--ctl-sm); padding: 0 12px; font-size: var(--fs-sm); }
.btn.block { width: 100%; justify-content: center; padding: 9px 16px; }
.btn.icon { min-height: var(--ctl-sm); min-width: var(--ctl-sm); padding: 0; color: var(--ink-2); }
.btn.icon svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
label.f { display: grid; gap: 4px; font-weight: 550; font-size: var(--fs-sm); }
.hint { font-weight: 400; color: var(--ink-3); }
input, select, textarea { font: inherit; font-family: var(--font-sans); font-weight: 400; color: var(--ink); background: var(--panel); border: 1px solid var(--field); border-radius: var(--r); padding: 6px 9px; min-width: 0; }
textarea { min-height: 72px; resize: vertical; }
/* a value you can change in place: reads as text until hovered or focused */
/* every dropdown: one drawn chevron (two hairlines, coloured by --chev so hover can recolour it), the outline-button hover,
   and where the browser allows it (appearance: base-select) an open list in the app's own panel instead of the OS menu */
select { appearance: none; cursor: pointer; padding-right: 30px; --chev: var(--ink-2);
  background-image: linear-gradient(45deg, transparent calc(50% - .75px), var(--chev) calc(50% - .75px) calc(50% + .75px), transparent calc(50% + .75px)),
    linear-gradient(-45deg, transparent calc(50% - .75px), var(--chev) calc(50% - .75px) calc(50% + .75px), transparent calc(50% + .75px));
  background-size: 5px 5px; background-repeat: no-repeat; background-position: right 17px center, right 12px center; }
select:not(:disabled):hover { border-color: var(--accent); --chev: var(--accent); }
@supports (appearance: base-select) {
  select, ::picker(select) { appearance: base-select; }
  select { align-items: center; }  /* base-select lays the value out as a row; keep it centred in the pill */
  select::picker-icon { display: none; }
  ::picker(select) { margin-block: 4px; padding: 4px; max-block-size: min(360px, 60vh); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); color: var(--ink); box-shadow: var(--lift); }
  option { padding: 6px 10px; border-radius: var(--r); cursor: pointer; transition: background-color var(--t); }
  option:hover, option:focus-visible { background: var(--sunken); outline: none; }
  option:checked { background: var(--accent-soft); font-weight: 600; }
  option::checkmark { color: var(--accent); }
  option:disabled { color: var(--ink-3); cursor: default; }
}
/* a value you can change in place: reads as text until hovered or focused */
select.inline { field-sizing: content; min-height: var(--ctl-sm); max-width: 100%; border-color: transparent; background-color: transparent; padding: 2px 26px 2px 6px; margin-left: -7px; }
select.inline:hover, select.inline:focus-visible { background-color: var(--panel); }
/* filter controls share the pill shape and the small height of the filter buttons beside them; form fields keep --r */
select.filter, input[type="search"] { min-height: var(--ctl-sm); padding-block: 0; padding-inline: 12px; border-radius: var(--r-pill); }
select.filter { max-width: 240px; padding-right: 30px; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager .btn svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pager .gap { color: var(--ink-3); padding: 0 4px; }
::placeholder { color: var(--ink-3); opacity: 1; }
[aria-invalid="true"] { border-color: var(--bad); }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--r-pill); overflow: hidden; max-width: 100%; }
.seg button { min-height: calc(var(--ctl-sm) - 2px); font: inherit; font-family: var(--font-brand); border: 0; background: var(--panel); color: var(--ink-2); padding: 0 12px; cursor: pointer; border-right: 1px solid var(--line-2); white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--sunken); color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* ---------- tables and lists ---------- */
.tw { overflow-x: auto; }
.tw > table { min-width: 36rem; }  /* narrow screens scroll the table instead of squeezing each column to one word */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tbody tr.link { cursor: pointer; }
tbody tr.link:hover td { background: var(--sunken); }
.kv td:first-child { width: 180px; color: var(--ink-2); }
.kv .field { width: 100%; max-width: 480px; }
.kv .field + .help, .kv .row + .help { margin-top: 6px; }
.kv .row .field { flex: 1 1 240px; }
.key { font: var(--fs-sm)/1.6 var(--font-mono); }
div.f { display: grid; gap: 4px; font-weight: 550; font-size: var(--fs-sm); }
.f .hint { font-size: var(--fs-sm); }
/* ---------- badges and risk tags ---------- */
/* tags: tinted, square-cornered and unbordered, so they never read as the pill buttons; an icon, a colour and a word per state */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: var(--r); background: var(--sunken); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 550; line-height: 1.4; white-space: nowrap; vertical-align: 1px; }
.badge svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.badge.ok { background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); }
.badge.bad { background: color-mix(in srgb, var(--bad) 12%, transparent); color: var(--bad); }
.badge.attention { background: color-mix(in srgb, var(--attention) 14%, transparent); color: var(--attention); }
.risk { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw { width: 10px; height: 10px; border-radius: 2px; display: inline-block; flex: none; }
.arrow { color: var(--ink-3); padding: 0 3px; }

/* ---------- states ---------- */
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 12px; }
.skel { height: 56px; background: linear-gradient(90deg, var(--sunken), var(--line), var(--sunken)); background-size: 200% 100%; border-radius: var(--r); animation: sk 1.2s linear infinite; }
.skel.title { height: 28px; width: 40%; }
@keyframes sk { to { background-position: -200% 0; } }
.spin { width: 14px; height: 14px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: var(--r-lg); padding: 0; width: calc(100% - 32px); max-width: 640px; background: var(--panel); color: var(--ink); box-shadow: 0 20px 50px rgb(var(--shade) / .25); }
dialog::backdrop { background: rgb(var(--shade) / .45); }
dialog .dh { padding: 16px 20px; border-bottom: 1px solid var(--line); }
dialog .db { padding: 20px; display: grid; gap: 16px; max-height: 70vh; overflow-y: auto; }
dialog .df { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
dialog fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
dialog legend { font-weight: 600; margin-bottom: 4px; }
dialog hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- toasts: kind shown by icon and tint, never colour alone ---------- */
#toast { position: fixed; inset: auto 16px 44px auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible;
  width: calc(100% - 32px); max-width: 380px; display: grid; gap: 8px; }
#toast:not(:popover-open) { display: none; }
.toast { --k: var(--ink-2); display: grid; grid-template-columns: 16px minmax(0, 1fr) var(--target); gap: 10px; align-items: start;
  padding: 10px 6px 10px 12px; border: 1px solid color-mix(in srgb, var(--k) 35%, var(--line)); border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--k) 7%, var(--panel)); color: var(--ink);
  box-shadow: var(--lift); animation: toast-in .2s cubic-bezier(.16, 1, .3, 1); }
.toast.ok { --k: var(--ok); }
.toast.info, .toast.busy { --k: var(--accent); }
.toast.warn { --k: var(--attention); }
.toast.error { --k: var(--bad); }
.toast .ti { margin-top: 2px; fill: none; stroke: var(--k); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.toast .spin { margin-top: 3px; }
.toast p { line-height: 20px; overflow-wrap: anywhere; }
.toast .tx { display: grid; place-items: center; width: var(--target); height: var(--target); margin-top: -2px; border: 0; border-radius: var(--r);
  background: none; color: var(--ink-3); cursor: pointer; }
.toast .tx:hover { background: color-mix(in srgb, var(--k) 12%, transparent); color: var(--ink); }
.toast .tx svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 860px) {
  .split, .md { grid-template-columns: 1fr; }
  :root { --gutter: 16px; }
}
@media (max-width: 600px) {
  .seg { border: 0; gap: 6px; flex-wrap: wrap; overflow: visible; }
  .seg button { border: 1px solid var(--line-2); border-radius: var(--r-pill); }
  .seg button:last-child { border-right: 1px solid var(--line-2); }
  .actions { flex-wrap: wrap; }
  .kv td { display: block; }
  .kv td:first-child { width: auto; padding-bottom: 0; border-bottom: 0; }
  /* a decision or a dialog's answer: the two choices share the row equally */
  dialog .df { display: grid; grid-template-columns: 1fr 1fr; }
  dialog .df > .btn:only-child { grid-column: 2; }
  #toast { inset: auto 16px 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .skel, .spin, .toast { animation: none; }
  a.btn::after { transition: none; }
}
