/* hpanel — dark UI. Framework-free; no inline styles anywhere (strict CSP).
   Fonts: Geist / Geist Mono (OFL-1.1), self-hosted, see fonts/README.md.
   Font url()s under /static/ are rewritten to content-hashed URLs at startup. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/geist-latin-ext-wght-normal.woff2?v=824f485b5d26e2f2") 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/geist-latin-wght-normal.woff2?v=19f9c92546aa300c") 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: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/geist-mono-latin-ext-wght-normal.woff2?v=1a189eb997c3e2ec") 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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/static/fonts/geist-mono-latin-wght-normal.woff2?v=684ad5b531f81d43") 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;
}

/* ------------------------------------------------------------ tokens */
:root {
  color-scheme: dark;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* surfaces */
  --bg: #0B0E0D;
  --sidebar: #0F1312;
  --line: #1E2624;          /* sidebar / header borders */
  --card: #121716;
  --card-line: #1F2725;
  --head-line: #1C2422;     /* table header rules, card dividers */
  --row-line: #1A2120;
  --row-hover: #141A19;
  --raised: #141A19;
  --raised-line: #232C2A;
  --nav-hover: #151B1A;
  --nav-active: #1A2120;
  --field: #0E1211;
  --field-line: #222B29;
  --field-line-hover: #2E3936;
  --btn: #161D1B;
  --btn-line: #2A3431;
  --track: #1F2725;         /* empty bar segments */
  --tile: #19201F;
  --tile-line: #242D2B;

  /* text */
  --text: #E6ECE9;
  --text-strong: #F2F6F4;
  --text-2: #C9D3CF;
  --nav-text: #A3AFAB;
  --muted: #8E9B97;
  --label: #7C8985;
  --faint: #5C6865;
  --sep: #4A5552;
  --placeholder: #6F7C78;

  /* accent (lime) */
  --accent: #C8F169;
  --accent-hover: #E2FF9E;
  --accent-ink: #10140B;
  --accent-soft: #C8F1691F;
  --accent-line: #C8F16955;
  --accent-glow: #C8F16926;

  /* warning (amber) */
  --warn: #F2B84B;
  --warn-strong: #F7D58F;
  --warn-text: #C9C2B0;
  --warn-sub: #A89F8A;
  --warn-ink: #1D1504;
  --warn-bg: rgba(242, 184, 75, 0.06);
  --warn-soft: rgba(242, 184, 75, 0.12);
  --warn-tile: rgba(242, 184, 75, 0.14);
  --warn-line: rgba(242, 184, 75, 0.28);
  --warn-line-2: rgba(242, 184, 75, 0.4);

  /* danger (coral / red) */
  --danger: #FF8E7C;
  --danger-solid: #C93B27;
  --danger-strong: #F4E4E1;
  --danger-text: #B9A9A5;
  --danger-label: #D9CBC8;
  --danger-bg: #140F0E;
  --danger-btn: #160F0E;
  --danger-off: #1C1312;
  --danger-off-text: #7E6763;
  --danger-line: #3A2622;
  --danger-field: #3A2A26;
  --danger-soft: rgba(255, 122, 102, 0.12);

  /* info (blue-grey) */
  --info: #8FC3F2;
  --info-soft: rgba(143, 195, 242, 0.10);
  --info-line: rgba(143, 195, 242, 0.28);

  --r-card: 14px;
  --r-ctl: 9px;
  --r-btn: 10px;
  --r-sm: 8px;
  --gutter: clamp(16px, 3vw, 40px);
  --sidebar-w: 248px;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--text); }
h1 { font-size: 30px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
h2 { font-size: 16px; line-height: 1.4; font-weight: 600; }
h3 { font-size: 14px; line-height: 1.4; font-weight: 600; }
p { margin: 0; }
strong { font-weight: 600; }
code, pre, kbd, samp, .mono { font-family: var(--mono); }
code {
  font-size: 0.9em;
  background: var(--tile);
  border: 1px solid var(--tile-line);
  color: var(--text-2);
  padding: 0 0.35em;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }
::placeholder { color: var(--placeholder); opacity: 1; }
::selection { background: var(--accent-line); color: var(--text-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.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: -100px; z-index: 50;
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  padding: 10px 14px; border-radius: var(--r-ctl);
}
.skip-link:focus { top: 12px; color: var(--accent-ink); text-decoration: none; }

.ic {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
  vertical-align: -3px;
}
.ic-lg .ic, .ic.lg { width: 18px; height: 18px; }
.ic-xl .ic { width: 22px; height: 22px; }

.muted { color: var(--muted); }
.faint { color: var(--label); }
.text-2 { color: var(--text-2); }
.accent { color: var(--accent); }
.warn-text { color: var(--warn); }
.error-text, .danger-text { color: var(--danger); }
.ok-text { color: var(--accent); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.small-text { font-size: 12px; }
.hint { display: block; color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.45; margin: 0; }
.hint code { font-size: 11px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
ol.steps { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 6px; color: var(--text-2); }
.secret { font-size: 14px; letter-spacing: 0.05em; }

/* ------------------------------------------------------------ app shell */
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}
.sidebar {
  position: sticky; top: 0;
  height: 100vh;
  overflow-y: auto;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex; flex-direction: column; gap: 22px;
}
.sb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sb-body { display: flex; flex-direction: column; gap: 22px; flex: 1; min-height: 0; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 2px 8px; min-height: 40px;
  color: var(--text);
  font-family: var(--mono); font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
  border-radius: var(--r-sm);
}
.brand:hover { color: var(--text-strong); text-decoration: none; }
.brand .ic { width: 24px; height: 24px; color: var(--accent); }

.hostcard {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 12px;
  background: var(--raised); border: 1px solid var(--raised-line); border-radius: var(--r-btn);
  color: var(--text);
}
a.hostcard:hover { text-decoration: none; color: var(--text); border-color: var(--btn-line); background: var(--nav-hover); }
.hostcard-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.hostcard-name { font-family: var(--mono); font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hostcard-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pulse {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.pulse.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.pulse.off { background: var(--faint); box-shadow: none; }

.nav { display: flex; flex-direction: column; gap: 18px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  padding: 0 10px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--label);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-label .mono { text-transform: none; letter-spacing: 0; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--nav-text); background: transparent;
}
.nav-link:hover { background: var(--nav-hover); color: var(--text); text-decoration: none; }
.nav-link[aria-current] { background: var(--nav-active); color: var(--text-strong); font-weight: 500; }
.nav-link[aria-current] .ic { color: var(--accent); }

.userfoot {
  margin-top: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 8px 0;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #1F2826; color: var(--text);
  font-weight: 600; font-size: 13px;
}
.userfoot-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.userfoot-name { font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.userfoot-name:hover { color: var(--text-strong); }
.userfoot-role { font-size: 12px; color: var(--muted); }
.userfoot form { margin: 0; }

/* mobile menu (details/summary, no JS) */
.menu { display: none; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.pagehead {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px;
  min-height: 65px;
  padding: 12px var(--gutter);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs a { color: var(--muted); display: inline-flex; align-items: center; min-height: 40px; }
.crumbs a:hover { color: var(--text); }
.crumbs .sep { color: var(--sep); }
.crumbs [aria-current] { color: var(--text); }
.pagehead-tools { display: flex; align-items: center; gap: 8px; }

main {
  flex: 1;
  width: 100%; max-width: 1280px;
  margin: 0 auto;
  padding: 32px var(--gutter) 56px;
  display: flex; flex-direction: column; gap: 24px;
}
main > * { margin-top: 0; margin-bottom: 0; }
main:focus { outline: none; }

/* auth / pending screens (no sidebar) */
.auth {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 16px;
  gap: 24px;
}
.auth main { padding: 0; max-width: 460px; flex: none; }
.auth-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; max-width: 460px; }
.auth-head form { margin: 0; }

/* legacy top bar (used by the MCP consent / apps pages) */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  min-height: 65px; padding: 12px var(--gutter);
  background: var(--sidebar); border-bottom: 1px solid var(--line);
}
.topbar .brand { padding-left: 0; }
.topbar .brand::before {
  content: ""; width: 10px; height: 10px; border-radius: 3px;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.mainnav, .subnav { display: flex; flex-wrap: wrap; gap: 4px; }
.mainnav a, .subnav a { padding: 9px 10px; border-radius: var(--r-sm); color: var(--nav-text); }
.mainnav a:hover, .subnav a:hover { background: var(--nav-hover); color: var(--text); text-decoration: none; }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.userbox a { color: var(--text-2); }

/* ------------------------------------------------------------ page head */
.page-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px;
}
.page-head-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.page-head-title { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head h1.mono { font-family: var(--mono); }
.page-sub { font-size: 13px; color: var(--muted); }
.page-sub .mono, .meta .mono { color: var(--text-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); min-height: 40px; margin: -8px 0 -4px; align-self: flex-start; }
.back-link:hover { color: var(--text); }

/* ------------------------------------------------------------ cards */
.card {
  background: var(--card);
  border: 1px solid var(--card-line);
  border-radius: var(--r-card);
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card.narrow { width: 100%; max-width: 460px; margin: 0 auto; padding: 28px; gap: 18px; }
.card-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 8px 12px;
}
.card-head.center { align-items: center; }
.card.flush > .card-head { padding: 18px 20px 14px; }
.card-head-text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.card-head-aside { font-size: 13px; color: var(--muted); }
.card-head-aside.mono { font-size: 12px; }
.card-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.card-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding: 12px 20px; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--row-line);
}
.card.flush > .card-body { padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.card-icon-title { display: flex; align-items: center; gap: 8px; }
.card-icon-title .ic { color: var(--muted); }
.divider { border: 0; border-top: 1px solid var(--head-line); margin: 0; }

.grid2, .grid3, .grid4, .stats {
  display: grid; gap: 16px; align-items: start;
}
.grid2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid4 { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.stats { grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); align-items: stretch; }
.grid4.stretch, .grid3.stretch, .grid2.stretch { align-items: stretch; }
.cols { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.cols > .col-main { flex: 2 1 600px; min-width: 0; }
.cols > .col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.form-grid { display: grid; gap: 14px 16px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); align-items: start; }

.quota { display: flex; flex-direction: column; gap: 6px; min-width: 90px; max-width: 160px; }
.cap { display: inline-block; }
.cap::first-letter { text-transform: uppercase; }
.dash { display: flex; flex-direction: column; gap: 24px; }
.page-head-text.hero { gap: 10px; }
.order-first { order: -1; }

/* ------------------------------------------------------------ stats */
.stat { padding: 20px; gap: 14px; }
.stat.compact { padding: 18px 20px; gap: 8px; }
.stat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.stat-head .mono { font-size: 12px; }
.stat-head .mono.text-2 { font-size: 13px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value-row { display: flex; align-items: baseline; gap: 6px 8px; flex-wrap: wrap; }
.stat-value {
  font-family: var(--mono); font-size: 34px; line-height: 1; font-weight: 500; letter-spacing: -0.04em;
  color: var(--text);
}
.stat-value.warn { color: var(--warn); }
.stat-value.danger { color: var(--danger); }
.stat-value.ok { color: var(--accent); }
.stat-unit { font-family: var(--mono); font-size: 14px; color: var(--muted); }
.stat-note { font-size: 13px; color: var(--muted); }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat-sub .mono { color: var(--text-2); }
.stat-word { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 500; padding: 7px 0; }
.stat-extra { display: flex; flex-direction: column; gap: 6px; padding-top: 12px; border-top: 1px solid var(--head-line); }
.stat-extra + .stat-extra { border-top: 0; padding-top: 4px; }
.stat-extra-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.stat-extra-row .mono { color: var(--text-2); }
.stat-extra-row .mono.muted { color: var(--muted); }

/* segmented ("dashed") usage bars: styled <meter min=0 max=100 low=75 high=90 optimum=0>
   (no inline widths under the CSP; the value attribute drives the fill) */
meter.bar {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  display: block; width: 100%; height: 8px; margin: 0;
  border: 0; border-radius: 0; box-shadow: none;
  background: repeating-linear-gradient(90deg, var(--track) 0 5px, transparent 5px 7px);
  color: transparent; overflow: hidden;
}
meter.bar.lg { height: 10px; }
meter.bar.sm { height: 6px; }
meter.bar::-webkit-meter-inner-element { display: block; height: 100%; }
meter.bar::-webkit-meter-bar {
  height: 100%; border: 0; border-radius: 0; box-sizing: border-box;
  background: repeating-linear-gradient(90deg, var(--track) 0 5px, transparent 5px 7px);
}
meter.bar::-webkit-meter-optimum-value { border-radius: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 7px); }
meter.bar::-webkit-meter-suboptimum-value { border-radius: 0; background: repeating-linear-gradient(90deg, var(--warn) 0 5px, transparent 5px 7px); }
meter.bar::-webkit-meter-even-less-good-value { border-radius: 0; background: repeating-linear-gradient(90deg, var(--danger) 0 5px, transparent 5px 7px); }
meter.bar::-moz-meter-bar { border-radius: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 5px, transparent 5px 7px); }
meter.bar:-moz-meter-sub-optimum::-moz-meter-bar { background: repeating-linear-gradient(90deg, var(--warn) 0 5px, transparent 5px 7px); }
meter.bar:-moz-meter-sub-sub-optimum::-moz-meter-bar { background: repeating-linear-gradient(90deg, var(--danger) 0 5px, transparent 5px 7px); }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row {
  display: grid; grid-template-columns: 34px 1fr 40px; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.bar-row > :last-child { text-align: right; color: var(--text-2); }

/* checklist (protection) */
.checks { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checks li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.checks .ic { color: var(--accent); }
.checks li.off .ic { color: var(--danger); }
.checks li.off .check-name { color: var(--text-2); }
.check-name { flex: 1; min-width: 0; }
.check-detail { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.checks li.off .check-detail { color: var(--danger); }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.card > .table-wrap { margin: 0 -20px; }
.card.flush > .table-wrap { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  padding: 10px 12px;
  border-top: 1px solid var(--head-line); border-bottom: 1px solid var(--head-line);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--label); text-align: left; white-space: nowrap;
}
td { padding: 12px; border-bottom: 1px solid var(--row-line); vertical-align: middle; color: var(--text-2); }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tbody tr:hover { background: var(--row-hover); }
tbody tr:last-child td { border-bottom: 0; }
.card.flush tbody tr:last-child td, .card > .table-wrap tbody tr:last-child td { border-bottom: 1px solid var(--row-line); }
.card.flush > .table-wrap:last-child tbody tr:last-child td { border-bottom: 0; }
table.dense td { padding-top: 8px; padding-bottom: 8px; font-size: 13px; }
table.minw-620 { min-width: 620px; }
table.minw-720 { min-width: 720px; }
table.minw-820 { min-width: 820px; }
td.num, th.num { text-align: right; }
td.num { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
td.mono { font-family: var(--mono); font-size: 13px; }
td.actions, th.actions { text-align: right; white-space: nowrap; }
td.actions form { display: inline-block; margin: 0; }
.td-check { width: 1%; padding-right: 0; }
tr.excluded td { color: var(--muted); }
tr.excluded .cell-title { color: var(--muted); }
.cell-title { font-family: var(--mono); font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
a.cell-title:hover { color: var(--accent-hover); }
.cell-text { color: var(--text); }
.cell-sub { font-size: 12px; color: var(--muted); }
.cell-sub.mono { font-size: 11px; color: var(--label); }
.cell-stack { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.cell-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tile {
  width: 32px; height: 32px; border-radius: var(--r-sm); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--tile); border: 1px solid var(--tile-line);
  font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--text-2);
}
.arrow-val { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 13px; color: var(--text); white-space: nowrap; }
.arrow-val .ic { width: 13px; height: 13px; color: var(--faint); }
.ver { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.ver.old { color: var(--muted); }
.row-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.row-actions form { margin: 0; }
.locked-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.locked-note .ic { width: 13px; height: 13px; }

/* key/value lists */
dl.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 13px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; color: var(--text); }
dl.kv.end dd { text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 6px; flex-wrap: wrap; }
dl.kv dd.mono, dl.kv .mono { font-family: var(--mono); }
dl.secrets { grid-template-columns: minmax(0, max-content) 1fr; align-items: center; }
dl.secrets dd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
dl.secrets dd code { font-size: 14px; padding: 6px 10px; color: var(--text-strong); }

/* ------------------------------------------------------------ badges, dots, tags */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.4; white-space: nowrap;
  background: var(--nav-active); color: var(--nav-text);
  vertical-align: middle;
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.error { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.muted { background: var(--nav-active); color: var(--nav-text); }
.badge.muted::before { background: var(--faint); }

.tag {
  display: inline-flex; align-items: center;
  padding: 1px 7px; border-radius: 4px;
  font-size: 11px; font-weight: 600; line-height: 1.5; white-space: nowrap;
  border: 1px solid #2E3936; color: var(--nav-text);
  font-family: var(--font);
  vertical-align: middle;
}
.tag.danger { border-color: transparent; background: var(--danger-soft); color: var(--danger); }
.tag.warn { border-color: transparent; background: var(--warn-soft); color: var(--warn); }
.tag.ok { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.pill {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--nav-active); color: var(--nav-text);
}
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.info { background: var(--info-soft); color: var(--info); }

.state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.state.warn { color: var(--warn); }
.state.error { color: var(--danger); }
.dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow);
}
.dot.ring { background: transparent; box-shadow: none; border: 2px solid var(--accent); }
.dot.off { background: var(--faint); box-shadow: none; }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.dot.error { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.dot.info { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }

.tls { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.tls .ic { width: 14px; height: 14px; }
.tls.off { color: var(--muted); }
.tls.warn { color: var(--warn); }

/* ------------------------------------------------------------ buttons */
button, .button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 14px;
  border-radius: var(--r-ctl);
  border: 1px solid var(--btn-line);
  background: var(--btn); color: var(--text);
  font: inherit; font-size: 13px; font-weight: 500; line-height: 1.2;
  text-align: center; text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
button:hover, .button:hover, .btn:hover { filter: brightness(1.18); color: var(--text); text-decoration: none; }
button .ic, .button .ic { width: 15px; height: 15px; }
.lg-btn, button.lg, .button.lg { min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); font-size: 14px; }
button.primary, .button.primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600;
}
button.primary:hover, .button.primary:hover { color: var(--accent-ink); }
button.primary .ic, .button.primary .ic { stroke-width: 2.2; }
button.secondary, .button.secondary { background: var(--raised); }
button.ghost, .button.ghost { background: transparent; border-color: var(--raised-line); color: var(--nav-text); }
button.ghost:hover, .button.ghost:hover { color: var(--text); background: var(--nav-hover); filter: none; }
button.danger, .button.danger { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; font-weight: 600; }
button.danger:hover, .button.danger:hover { color: #fff; }
button.danger-ghost, .button.danger-ghost { background: var(--danger-btn); border-color: var(--danger-line); color: var(--danger); }
button.danger-ghost:hover, .button.danger-ghost:hover { color: var(--danger); }
button.warn, .button.warn { background: var(--warn); border-color: var(--warn); color: var(--warn-ink); font-weight: 600; }
button.warn:hover, .button.warn:hover { color: var(--warn-ink); }
button.warn-ghost, .button.warn-ghost { background: var(--warn-soft); border-color: var(--warn-line-2); color: var(--warn-strong); }
button.small, .button.small { padding: 0 12px; }
button.icon-btn, .button.icon-btn { width: 40px; padding: 0; }
button.icon-btn.sm { width: 40px; min-height: 40px; margin: -8px -6px; border-color: transparent; background: transparent; color: var(--muted); }
button.icon-btn.sm:hover { color: var(--text); background: var(--nav-hover); filter: none; }
button.icon-btn.is-copied { color: var(--accent); }
button.link {
  min-height: 0; padding: 0; border: 0; background: none; color: var(--accent);
  font-weight: 500; text-decoration: none;
}
button.link:hover { color: var(--accent-hover); text-decoration: underline; filter: none; }
button:disabled, button:disabled:hover {
  cursor: not-allowed; filter: none;
  background: var(--raised); border-color: var(--raised-line); color: var(--faint);
}
button.danger:disabled, button.danger:disabled:hover {
  background: var(--danger-off); border-color: var(--danger-line); color: var(--danger-off-text);
}
button.primary:disabled, button.primary:disabled:hover { background: var(--accent-soft); border-color: transparent; color: #7E8F5C; }
.htmx-request button[hx-post], button.htmx-request { cursor: progress; }
form.inline { display: inline-flex; margin: 0; }
.btn-row, .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.end { align-items: flex-end; }
.btn-row form, .row form { margin: 0; }

/* ------------------------------------------------------------ forms */
form { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack > button, .stack > .btn-row { align-self: flex-start; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-2); }
label > .muted { font-weight: 400; }
label.check {
  flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 10px;
  min-height: 40px; font-size: 14px; font-weight: 400; color: var(--text); cursor: pointer;
}
label.check > .hint { flex-basis: 100%; padding-left: 30px; }
label.check > .hint.inline { flex-basis: auto; padding-left: 0; }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-line);
  border-radius: var(--r-ctl);
  padding: 0 12px;
  min-height: 44px;
  width: 100%; max-width: 100%;
  transition: border-color 0.15s ease;
}
input:hover, select:hover, textarea:hover { border-color: var(--field-line-hover); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input:disabled, select:disabled, textarea:disabled { opacity: 0.6; cursor: not-allowed; }
input[type=number] { font-family: var(--mono); }
textarea { padding: 10px 12px; min-height: 88px; font-family: var(--mono); font-size: 13px; line-height: 1.55; resize: vertical; }
select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select option { background: var(--card); color: var(--text); }
input[type=checkbox], input[type=radio] {
  width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0; flex: none;
  accent-color: var(--accent); cursor: pointer;
  border: 0; background: none; box-shadow: none;
}
input[type=checkbox]:focus, input[type=radio]:focus { box-shadow: none; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.mono, .mono-input { font-family: var(--mono); }
.cb { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; margin: -10px 0 -10px -10px; cursor: pointer; }
fieldset {
  margin: 0; min-width: 0;
  border: 1px solid var(--card-line); border-radius: 12px;
  padding: 14px 16px 16px;
  display: flex; flex-direction: column; gap: 12px;
  background: rgba(255, 255, 255, 0.01);
}
legend { padding: 0 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--label); }
.prefixed { display: flex; align-items: stretch; }
.prefixed .prefix {
  display: flex; align-items: center; padding: 0 10px;
  background: var(--tile); border: 1px solid var(--field-line); border-right: 0;
  border-radius: var(--r-ctl) 0 0 var(--r-ctl);
  font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap;
}
.prefixed input { border-radius: 0 var(--r-ctl) var(--r-ctl) 0; font-family: var(--mono); min-width: 0; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 4px; }
.static-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.static-field .mono { font-size: 14px; color: var(--text); }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.inline-form > label { flex: 1 1 200px; min-width: 0; }
.inline-form > label.narrow { flex: 0 1 120px; }
.toolbar.inline-form { justify-content: flex-start; align-items: flex-end; padding: 16px 20px; }
.toolbar.inline-form > label { flex: 0 1 220px; }
.toolbar.inline-form > label.narrow { flex: 0 1 120px; }

/* ------------------------------------------------------------ alerts & callouts */
.alert {
  position: relative;
  display: block;
  padding: 12px 16px 12px 36px; border-radius: 12px;
  border: 1px solid var(--card-line); background: var(--card);
  color: var(--text); font-size: 13px; margin: 0;
  overflow-wrap: anywhere;
}
.alert::before {
  content: ""; position: absolute; left: 16px; top: 19px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
}
.alert.ok, .alert.success { border-color: var(--accent-line); background: var(--accent-soft); }
.alert.ok::before, .alert.success::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.alert.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-strong); }
.alert.warn::before { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.alert.error { border-color: var(--danger-line); background: var(--danger-bg); color: var(--danger-strong); }
.alert.error::before { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.alert.info { border-color: var(--info-line); background: var(--info-soft); }
.alert.info::before { background: var(--info); }
.alert.small { padding: 8px 12px 8px 32px; font-size: 12px; }
.alert.small::before { left: 14px; top: 14px; width: 7px; height: 7px; }
.alert code { background: rgba(0, 0, 0, 0.25); border-color: transparent; }

.callout {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px;
  padding: 18px 20px; border-radius: var(--r-card);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
}
.callout-icon {
  width: 36px; height: 36px; border-radius: var(--r-btn); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--warn-tile); color: var(--warn);
}
.callout-icon .ic { width: 18px; height: 18px; }
.callout-body { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.callout-title { font-weight: 600; color: var(--warn-strong); }
.callout-text { color: var(--warn-text); }
.callout-text .mono { color: #EDE6D3; }
.callout-sub { font-family: var(--mono); font-size: 12px; color: var(--warn-sub); overflow-wrap: anywhere; }
.callout-actions { display: flex; flex-wrap: wrap; gap: 8px; align-self: center; }
.callout-actions form { margin: 0; }

/* ------------------------------------------------------------ danger zone */
.danger-zone {
  background: var(--danger-bg); border-color: var(--danger-line);
  gap: 12px;
}
.danger-zone .card-icon-title { color: var(--danger); }
.danger-zone .card-icon-title .ic { color: var(--danger); }
.danger-zone h2 { color: var(--danger-strong); }
.danger-zone p { font-size: 13px; color: var(--danger-text); }
.danger-zone p strong, .danger-zone p .mono { color: var(--danger-strong); }
.danger-zone label { color: var(--danger-label); }
.danger-zone code, .confirm-word { font-family: var(--mono); color: var(--danger); background: transparent; border: 0; padding: 0; font-size: 1em; }
.danger-zone input {
  background: var(--bg); border-color: var(--danger-field); color: var(--danger-strong);
  font-family: var(--mono);
}
.danger-zone input:focus { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.confirm-row { display: flex; flex-wrap: wrap; gap: 8px; }
.confirm-row input { flex: 1 1 140px; min-width: 0; width: auto; }
.confirm-row button { min-height: 44px; padding: 0 18px; }
.confirm-field { display: flex; flex-direction: column; gap: 8px; }

/* inline (per-row) typed confirmation */
details.inline-details { display: inline-block; text-align: left; }
details.inline-details > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 12px; border-radius: var(--r-ctl);
  border: 1px solid var(--danger-line); background: var(--danger-btn); color: var(--danger);
  font-size: 13px; font-weight: 500;
}
details.inline-details > summary::-webkit-details-marker { display: none; }
details.inline-details > summary .ic { width: 14px; height: 14px; }
details.inline-details[open] { display: block; margin-top: 8px; }
.inline-confirm {
  margin-top: 8px; padding: 12px; border-radius: 10px;
  background: var(--danger-bg); border: 1px solid var(--danger-line);
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px;
}
.inline-confirm label { color: var(--danger-label); flex: 1 1 180px; }
.inline-confirm input { background: var(--bg); border-color: var(--danger-field); font-family: var(--mono); }

/* ------------------------------------------------------------ empty state */
.empty-state {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 44px 20px; text-align: center;
}
.empty-state .ic { width: 22px; height: 22px; color: var(--accent); margin-bottom: 2px; }
.empty-state.muted-icon .ic { color: var(--muted); }
.empty-state-title { font-weight: 500; color: var(--text); }
h1.empty-state-title { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.empty-state-text { font-size: 13px; color: var(--muted); max-width: 46ch; }
.empty-state .button, .empty-state button { margin-top: 10px; }

/* ------------------------------------------------------------ filters (chips) */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--btn-line); background: transparent; color: var(--text-2);
  font-size: 13px; font-weight: 500;
}
.chip:hover { color: var(--text); background: var(--nav-hover); text-decoration: none; }
.chip[aria-current] { border-color: #C8F16966; background: var(--accent-soft); color: var(--accent); }
.chip-count { font-family: var(--mono); font-size: 12px; opacity: 0.75; }
.filter-box {
  flex: 0 1 320px; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 4px 0 12px;
  background: var(--field); border: 1px solid var(--field-line); border-radius: var(--r-ctl);
}
.filter-box:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.filter-box .ic { width: 15px; height: 15px; color: var(--label); }
.filter-box input { flex: 1; min-width: 0; width: auto; border: 0; background: transparent; min-height: 38px; padding: 0; font-size: 13px; box-shadow: none; }
.filter-box input:focus { box-shadow: none; }
.filter-box input:focus-visible { outline: none; }
.filter-box button { min-height: 32px; padding: 0 10px; font-size: 12px; }

/* ------------------------------------------------------------ logs */
pre.log {
  margin: 0;
  background: #0A0D0C; border: 1px solid var(--card-line); border-radius: 12px;
  padding: 14px 16px;
  max-height: 32rem; overflow: auto;
  white-space: pre-wrap; word-break: break-all;
  font-size: 12.5px; line-height: 1.6; color: var(--text-2);
}
pre.log.tall { max-height: 75vh; }
.card pre.log { margin: 0; }

/* ------------------------------------------------------------ misc */
.loading { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.status-line {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 500;
}
.spinner {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 2px solid var(--accent-line); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner, .spin { animation-duration: 3s; }
  button, .button { transition: none; }
}
.pager { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 20px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--row-line); }
.pager-links { display: flex; gap: 8px; }
.qr { display: flex; justify-content: center; }
.qr img { display: block; background: #fff; padding: 10px; border-radius: 12px; image-rendering: pixelated; max-width: 100%; height: auto; }
.usage-list { display: flex; flex-direction: column; gap: 14px; }
.usage-item { display: flex; flex-direction: column; gap: 8px; }
.usage-item-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.usage-item-head .mono { color: var(--text-2); font-size: 12px; }
.link-row { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; min-height: 40px; margin: -8px 0; align-self: flex-start; }
.link-row .ic { width: 14px; height: 14px; }
.chips-list { display: flex; flex-wrap: wrap; gap: 6px; }
.code-chip { font-family: var(--mono); font-size: 12px; padding: 3px 8px; border-radius: 6px; background: var(--tile); border: 1px solid var(--tile-line); color: var(--text-2); }
.job-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 900px) {
  .app { display: block; }
  .sidebar {
    position: sticky; top: 0; z-index: 20;
    height: auto; max-height: 100vh; overflow-y: auto;
    padding: 10px 16px;
    border-right: 0; border-bottom: 1px solid var(--line);
    gap: 0;
  }
  .sb-body { display: none; }
  .menu { display: block; }
  .menu > summary {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 0 12px; border-radius: var(--r-ctl);
    border: 1px solid var(--raised-line); background: var(--raised); color: var(--text);
    font-size: 13px; font-weight: 500; cursor: pointer;
  }
  .menu[open] > summary { background: var(--nav-active); }
  .sb-head { padding-right: 96px; }
  .menu-panel {
    display: flex; flex-direction: column; gap: 18px;
    padding: 14px 0 6px;
  }
  .menu-panel .userfoot { margin-top: 0; }
  .pagehead { min-height: 0; padding-top: 10px; padding-bottom: 10px; }
  main { padding-top: 22px; padding-bottom: 40px; gap: 20px; }
  h1 { font-size: 26px; }
}
@media (max-width: 900px) {
  .menu > summary { position: absolute; top: 10px; right: 16px; }
}
@media (max-width: 640px) {
  dl.kv:not(.end) { grid-template-columns: 1fr; gap: 2px 0; }
  dl.kv:not(.end) dt { margin-top: 8px; }
  dl.kv:not(.end) dt:first-child { margin-top: 0; }
  .card { padding: 16px; }
  .card > .table-wrap { margin: 0 -16px; }
  .card.narrow { padding: 20px; }
  .stat-value { font-size: 30px; }
  .filter-box { flex-basis: 100%; }
  .confirm-row button { flex: 1 1 auto; }
  .page-actions { width: 100%; }
}
