/* EBS Fiscal Portal console. Served by the portal itself (/portal/assets/console.css); the pages
   carry no inline style or script, so the Content-Security-Policy is default-src 'self'.
   Colours are the approved design's; dark mode is not needed (owner decision D6). */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/portal/assets/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/portal/assets/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/portal/assets/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/portal/assets/ibm-plex-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/portal/assets/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url(/portal/assets/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --ground: #F5F3EF; --card: #FFFFFF; --line: #E3DFD7; --line-soft: #EFECE6; --field: #D9D4CA;
  --text: #1B1F24; --muted: #5B616B; --faint: #FAF9F6; --neutral: #F0EEE9;
  --accent: #0B6E7F; --accent-hover: #08515D; --accent-soft: #E3F1F3; --selected: #EEF6F7;
  --side: #15212C; --side-active: #223342; --side-text: #C9D2DC; --side-muted: #9FB0C0; --side-line: #2A3B4B;
  --ok: #1E7A4C; --ok-soft: #E4F2EA; --healthy: #4CC38A;
  --warn: #8A5300; --warn-strong: #E8A33D; --warn-soft: #FBF0DC; --warn-text: #6B4100;
  --bad: #B42318; --bad-soft: #FBE7E5; --bad-line: #E5B3AE;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 14px/1.5 var(--sans); }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
code, .mono { font-family: var(--mono); }
code { font-size: 0.93em; overflow-wrap: anywhere; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--card); color: var(--text);
  padding: 8px 14px; border-radius: 8px; border: 2px solid var(--accent); }
.skip:focus { top: 12px; }

/* ------------------------------------------------------------------ shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex-shrink: 0; background: var(--side); color: var(--side-text); display: flex;
  flex-direction: column; gap: 4px; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar :focus-visible { outline-color: #8FD3DE; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 20px; }
.brand img { width: 36px; height: 36px; object-fit: contain; background: #FFFFFF; border-radius: 8px; padding: 3px; }
.brand-name { display: flex; flex-direction: column; }
.brand-name b { font-size: 15px; font-weight: 600; color: #FFFFFF; }
.brand-name span { font-size: 12px; color: var(--side-muted); }
.menu-toggle { display: none; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; color: var(--side-text);
  text-decoration: none; font-size: 14px; }
.nav a:hover { background: var(--side-active); color: #FFFFFF; }
.nav a[aria-current="page"] { background: var(--side-active); color: #FFFFFF; font-weight: 500; }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav .grow { flex-grow: 1; }
.count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--warn-strong);
  color: var(--side); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.count.urgent { background: #F59C92; white-space: nowrap; gap: 3px; }
.count .mark { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 7px;
  background: var(--side); color: #F59C92; font-size: 10px; line-height: 1; }
.menu-toggle .count { margin-left: 8px; }
.spacer { flex-grow: 1; }
.side-foot { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px; border-top: 1px solid var(--side-line);
  font-size: 12px; color: var(--side-muted); }
.side-foot .who { color: #FFFFFF; overflow-wrap: anywhere; }
.health { display: flex; align-items: center; gap: 8px; }
.health .dot { background: var(--healthy); }
.health.down .dot { background: #F59C92; }
.signout button { background: none; border: 0; padding: 0; color: var(--side-text); font: inherit; font-size: 13px;
  text-decoration: underline; cursor: pointer; }
.side-foot a { color: var(--side-text); }

.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { min-height: 64px; flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 10px 32px;
  background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar .hint { font-size: 14px; color: var(--muted); flex: 1 1 280px; min-width: 0; }
.topbar .clock { font-size: 13px; color: var(--muted); white-space: nowrap; }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--field);
  border-radius: 8px; width: 340px; max-width: 100%; color: var(--muted); background: var(--card); }
.search:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.search svg { width: 16px; height: 16px; flex-shrink: 0; }
.search input { border: 0; outline: none; font: inherit; font-size: 14px; flex-grow: 1; min-width: 0; background: transparent;
  height: 38px; padding: 0; color: var(--text); }
.content { flex-grow: 1; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.company-switch { display: flex; align-items: center; gap: 8px; }
.company-switch select { width: auto; max-width: 240px; font-weight: 600; }
.scope-note { color: var(--muted); }

/* ------------------------------------------------------------------ headings, notices */
.page-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; min-width: 0; }
.page-head h1 { font-size: 26px; font-weight: 600; overflow-wrap: anywhere; }
.page-head .sub { font-size: 14px; color: var(--muted); }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; }
h2 { font-size: 16px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head a { font-size: 13px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px;
  border: 1px solid; }
.notice .notice-kind { font-weight: 700; white-space: nowrap; }
.notice.ok { background: var(--ok-soft); border-color: #B7DCC6; color: #16563A; }
.notice.bad { background: var(--bad-soft); border-color: var(--bad-line); color: #7A1810; }
.notice.warn { background: var(--warn-soft); border-color: #EFD3A1; color: var(--warn-text); }
.notice.info { background: var(--accent-soft); border-color: #B9DDE3; color: #0A4F5B; }
.notice p { margin: 0; }
.notice .body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.notice pre { margin: 4px 0; }

/* ------------------------------------------------------------------ cards, grids */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; gap: 0; }
.card.flush > .section-head, .card.flush > .pad { padding: 16px 20px; }
.card.dashed { background: var(--faint); border-style: dashed; border-color: var(--field); color: var(--muted);
  flex-direction: row; align-items: center; }
.card.attention { border-color: var(--bad-line); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; display: flex;
  flex-direction: column; gap: 6px; min-width: 0; }
.tile .label { font-size: 13px; color: var(--muted); }
.tile .value { font-size: 30px; font-weight: 600; line-height: 1.2; }
.tile .value small { font-size: 18px; color: var(--muted); font-weight: 500; }
.tile .note { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.tile .note.ok { color: var(--ok); } .tile .note.warn { color: var(--warn); } .tile .value.bad { color: var(--bad); }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cols.even { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 16px; align-items: start; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.step .n { font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.02em; }
.step b { font-size: 14px; font-weight: 600; }
.step span { font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ text */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.ok { color: var(--ok); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.strong { font-weight: 600; }
.right { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; }
.wrap { overflow-wrap: break-word; }
.eyebrow { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.big-mono { font-family: var(--mono); font-size: 26px; font-weight: 500; }

/* ------------------------------------------------------------------ badges, pills, tags */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 3px 8px; font-weight: 600;
  font-size: 12px; line-height: 1.4; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.muted { background: var(--neutral); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 4px; flex-shrink: 0; display: inline-block; }
.pill.ok .dot { background: var(--ok); } .pill.warn .dot { background: var(--warn-strong); }
.pill.bad .dot { background: var(--bad); } .pill.muted .dot { background: #9AA1AA; } .pill.info .dot { background: var(--accent); }
.tag { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap; letter-spacing: 0.02em; }
.tag.bad { color: #FFFFFF; background: var(--bad); }
.tag.warn { color: var(--side); background: var(--warn-strong); }
.tag.info { color: #FFFFFF; background: var(--accent); }
.badge { font-family: var(--sans); font-size: 11px; font-weight: 600; border: 1px solid var(--accent); color: var(--accent);
  border-radius: 4px; padding: 0 4px; }
.badge.plain { border-color: var(--field); color: var(--muted); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--field); background: var(--card);
  color: var(--text); font-size: 13px; display: inline-flex; align-items: center; text-decoration: none; }
.chip[aria-current="true"] { border-color: var(--side); background: var(--side); color: #FFFFFF; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.tabs a { height: 40px; padding: 0 16px; font-size: 14px; color: var(--muted); text-decoration: none; display: flex;
  align-items: center; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); font-weight: 600; }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; padding: 10px 12px; background: var(--faint);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-top: 1px solid var(--line-soft); vertical-align: top; }
tr:first-child td { border-top: 0; }
.card:not(.flush) th { background: transparent; padding: 8px 6px; }
.card:not(.flush) td { padding: 9px 6px; }
tr:has(a[aria-current="true"]) td { background: var(--selected); }
td .sub { font-size: 12px; color: var(--muted); }
td code { font-size: 12.5px; white-space: nowrap; overflow-wrap: normal; }
td code.break { white-space: normal; overflow-wrap: anywhere; }
table.kv th { width: 200px; background: transparent; white-space: normal; vertical-align: top; padding: 6px 12px 6px 0;
  border: 0; }
table.kv td { border: 0; padding: 6px 0; }
dl.facts { margin: 0; display: grid; grid-template-columns: 140px minmax(0, 1fr); row-gap: 10px; column-gap: 12px; font-size: 13px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ forms and buttons */
label { font-size: 13px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field .help { font-size: 12px; color: var(--muted); font-weight: 400; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--text); background: var(--card);
  border: 1px solid var(--field); border-radius: 8px; padding: 0 12px; height: 40px; width: 100%; min-width: 0; }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input.mono, textarea.mono { font-family: var(--mono); }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; padding: 0; margin: 0; flex-shrink: 0; accent-color: var(--accent); }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 13px; }
.check input { margin-top: 1px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
legend { font-size: 13px; font-weight: 600; padding: 0 0 6px; }
.locked { height: 40px; border: 1px solid var(--line-soft); border-radius: 8px; padding: 0 12px; display: flex; align-items: center;
  gap: 8px; background: var(--faint); font-size: 14px; }
.locked svg { width: 14px; height: 14px; flex-shrink: 0; }
form.stack { display: flex; flex-direction: column; gap: 14px; }
form.inline { display: flex; gap: 8px; align-items: center; margin: 8px 0 0; flex-wrap: wrap; }
.row form.inline { margin: 0; }
.case-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 12px; border: 1px solid; flex-wrap: wrap; }
.case-row.warn { background: var(--warn-soft); border-color: #EFD3A1; }
.case-row.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.case-row.info { background: var(--accent-soft); border-color: #B9DDE3; }
.case-row .what { flex: 1 1 320px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.case-row .what b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.case-row .what span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.btn, button { font: inherit; font-size: 14px; font-weight: 600; height: 40px; padding: 0 16px; border-radius: 8px;
  border: 1px solid var(--field); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:hover, button:hover { border-color: var(--muted); color: var(--text); }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn.primary:hover, button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #FFFFFF; }
.btn.dark, button.dark { background: var(--side); border-color: var(--side); color: #FFFFFF; }
button.danger, .btn.danger { border-color: var(--bad-line); color: var(--bad); }
button.danger:hover { background: var(--bad-soft); color: var(--bad); }
button.small, .btn.small { height: 34px; padding: 0 12px; font-size: 13px; }
button[disabled] { background: var(--faint); color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.btn svg, button svg { width: 16px; height: 16px; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; }
details[open] { padding-bottom: 14px; }
details > summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: var(--accent); }
details > summary:focus-visible { outline-offset: 0; }
pre { background: var(--faint); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto;
  font: 13px/1.45 var(--mono); margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ overview and lists */
.item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; }
.item.bad { background: var(--bad-soft); }
.item.warn { background: var(--warn-soft); }
.item.info { background: var(--accent-soft); }
.item .what { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.item .what b { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.item .what span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.till-line { display: flex; align-items: center; gap: 12px; }
.till-line .what { flex-grow: 1; display: flex; flex-direction: column; min-width: 0; }
.till-line .what b { font-size: 14px; font-weight: 600; }
.till-line .what span { font-size: 12px; color: var(--muted); font-family: var(--mono); overflow-wrap: anywhere; }
.till-line .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dot.big { width: 10px; height: 10px; border-radius: 5px; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn-strong); } .dot.bad { background: var(--bad); }
.dot.none { border: 2px solid #9AA1AA; background: transparent; }
.case { display: flex; flex-direction: column; gap: 16px; }
.case-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.case-head h2 { font-size: 17px; flex: 1 1 260px; overflow-wrap: anywhere; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters .field { flex: 1 1 150px; }
.filters .field label { font-size: 12px; color: var(--muted); font-weight: 500; }
.filters input, .filters select { height: 36px; font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: flex; gap: 12px; }
.timeline .rail { display: flex; flex-direction: column; align-items: center; }
.timeline .rail .dot { width: 12px; height: 12px; border-radius: 6px; background: var(--accent); }
.timeline .rail .line { width: 2px; flex-grow: 1; background: var(--field); min-height: 22px; }
.timeline .entry { display: flex; flex-direction: column; padding-bottom: 12px; min-width: 0; }
.timeline .entry b { font-size: 13px; font-weight: 600; }
.timeline .entry span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.release-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.release-tiles > div { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* ------------------------------------------------------------------ the token dialog and sign-in */
.dialog { max-width: 720px; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 32px 36px; display: flex; flex-direction: column; gap: 22px; margin: 0 auto; }
.dialog-head { display: flex; align-items: center; gap: 14px; }
.dialog-head .mark { width: 44px; height: 44px; border-radius: 22px; background: var(--ok-soft); color: var(--ok);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dialog-head .mark svg { width: 22px; height: 22px; }
.dialog-head h1 { font-size: 22px; font-weight: 600; overflow-wrap: anywhere; }
.token-row { display: flex; gap: 8px; align-items: stretch; }
.token-row textarea { flex-grow: 1; font-family: var(--mono); font-size: 14px; background: var(--faint); word-break: break-all;
  min-height: 72px; }
.dialog ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.signin-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--side); padding: 24px 16px; }
.signin { width: 440px; max-width: 100%; background: var(--card); border-radius: 16px; padding: 40px; display: flex;
  flex-direction: column; gap: 20px; }
.signin .brand-row { display: flex; align-items: center; gap: 12px; }
.signin .brand-row img { width: 48px; height: 48px; object-fit: contain; }
.signin .brand-row b { font-size: 20px; font-weight: 600; display: block; }
.signin input { height: 44px; }
.signin button.primary { height: 46px; font-size: 15px; width: 100%; }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1180px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .cols.even, .split { grid-template-columns: minmax(0, 1fr); }
  /* One column: the chosen till or document comes first, the hint to choose one is not needed. */
  .split > aside[id] { order: -1; }
  .split > aside.placeholder { display: none; }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; padding: 10px 16px; gap: 8px; overflow: visible; }
  .sidebar .top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .brand { padding: 0; }
  .menu-toggle { display: inline-flex; background: transparent; color: #FFFFFF; border-color: var(--side-line); height: 38px; }
  .menu-toggle[hidden] { display: none; }
  .js .sidebar:not(.open) .nav, .js .sidebar:not(.open) .side-foot { display: none; }
  .nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav a { padding: 9px 10px; }
  .spacer { display: none; }
  .side-foot { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 4px 4px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .content { padding: 20px 16px 32px; }
  .steps, .grid3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  /* A table whose columns do not fit a phone becomes one card per row, each value under its
     column's name (data-label), so the state is seen without scrolling sideways. */
  .table-wrap.cards { overflow-x: visible; }
  .table-wrap.cards table, .table-wrap.cards tbody, .table-wrap.cards tr, .table-wrap.cards td { display: block; width: 100%; }
  .table-wrap.cards thead, .table-wrap.cards tr:has(> th) { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; }
  .table-wrap.cards tr { padding: 10px 14px; border-top: 1px solid var(--line-soft); }
  .table-wrap.cards tbody tr:first-child, .table-wrap.cards tr:has(> th) + tr { border-top: 0; }
  .table-wrap.cards td, .card:not(.flush) .table-wrap.cards td { border: 0; padding: 3px 0; }
  .table-wrap.cards td[data-label], .card:not(.flush) .table-wrap.cards td[data-label] { position: relative; padding-left: 108px;
    min-height: 24px; }
  .table-wrap.cards td[data-label]::before { content: attr(data-label); position: absolute; left: 0; top: 3px; width: 100px;
    font-size: 12px; color: var(--muted); }
  .table-wrap.cards td.right { text-align: left; }
  .table-wrap.cards td.nowrap, .table-wrap.cards .pill { white-space: normal; }
  .table-wrap.cards tr:has(a[aria-current="true"]) td { background: transparent; }
  .table-wrap.cards tr:has(a[aria-current="true"]) { background: var(--selected); }
  .company-switch { flex: 1 1 100%; }
  .company-switch select { max-width: none; flex-grow: 1; }
  .tiles { gap: 10px; }
  .tile { padding: 14px; }
  .tile .value { font-size: 26px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .search { width: 100%; }
  .page-head h1 { font-size: 22px; }
  .dialog { padding: 22px 18px; }
  .signin { padding: 28px 22px; }
  .token-row { flex-direction: column; }
  dl.facts { grid-template-columns: minmax(0, 1fr); row-gap: 2px; }
  dl.facts dd { margin-bottom: 8px; }
  table.kv th { width: auto; }
  .item { flex-wrap: wrap; }
}
