/* Kasm Hub theme (docs/ui-design.md section 3): every colour, size and radius is a token; components use tokens
   only. [data-theme="dark"] redefines the same tokens. The component kit is kit.css. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("vendor/inter/inter-latin-wght.woff2") format("woff2"); }
:root {
  /* brand (Kasm docs) */
  --kasm-blue: #0085c3; --kasm-blue-600: #0b6fa3; --kasm-blue-700: #175f85;
  --kasm-navy: #001c32; --kasm-ink: #233044; --kasm-slate: #5a6b80;
  /* surfaces */
  --bg: #f4f6f9; --surface: #ffffff; --surface-2: #f7f9fc; --line: #dde3eb; --line-strong: #c3ccd8;
  /* text */
  --fg: #233044; --fg-muted: #5a6b80; --fg-faint: #7a8799; --fg-on-accent: #ffffff;
  /* interaction */
  --accent: var(--kasm-blue-600); --accent-hover: var(--kasm-blue-700); --accent-wash: #e6f3fa; --focus: #1a99d4;
  /* levels and states (text >= 4.5:1 on their wash) */
  --ok: #1d7a46; --ok-wash: #e7f5ec; --warn: #8a4b00; --warn-wash: #fff4e0; --bad: #b42318; --bad-wash: #fdecea;
  --info: #3b4f8a; --info-wash: #eef1fa; --off: #7a8799; --off-wash: #f1f3f6; --busy: var(--kasm-blue-600);
  /* header */
  --header-bg: var(--kasm-navy); --header-fg: #e6edf3;
  /* type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --fs-xs: .75rem; --fs-sm: .8125rem; --fs-base: .9375rem; --fs-md: 1.125rem; --fs-lg: 1.375rem; --fs-xl: 1.75rem;
  /* spacing (4px grid), controls */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
  --control-h: 36px; --control-h-sm: 28px;
  /* radii and shadows (by hierarchy) */
  --r-sm: 4px; --r-md: 8px; --r-lg: 12px; --r-pill: 999px;
  --sh-float: 0 6px 24px rgb(0 28 50 / .14); --sh-sticky: 0 -1px 0 var(--line), 0 -6px 16px rgb(0 28 50 / .06);
  /* motion */
  --t-fade: 120ms; --t-select: 80ms;
  /* older names the pages still use */
  --muted: var(--fg-muted); --card: var(--surface);
}
[data-theme="dark"] {
  --bg: #0f1722; --surface: #162130; --surface-2: #1b2838; --line: #2a3a4f; --line-strong: #3b4e66;
  --fg: #e6edf3; --fg-muted: #a6b3c3; --fg-faint: #8494a8; --accent: #3db0e8; --accent-hover: #6cc5f0;
  --accent-wash: #12324a; --ok-wash: #11301f; --warn-wash: #3a2a0c; --bad-wash: #3d1714; --info-wash: #1c2540;
  --off-wash: #1f2a38; --header-bg: #0a121c;
}
@media (prefers-reduced-motion: reduce) { :root { --t-fade: 0ms; --t-select: 0ms; } }
* { box-sizing: border-box; }
body { margin: 0; font: 400 var(--fs-base)/1.5 var(--font); color: var(--fg); background: var(--bg); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
header.top { display: flex; gap: var(--sp-5); align-items: center; min-height: 52px; padding: 0 var(--sp-6); background: var(--header-bg); color: var(--header-fg); }
header.top a { color: var(--header-fg); text-decoration: none; }
header.top .brand { font-weight: 600; }
/* The top bar (docs/navigation.md): one row, icons and labels, disclosure menus (nav.js). Labels never truncate. */
header.top .topnav { display: flex; flex: 1; align-self: stretch; align-items: stretch; gap: var(--sp-4); min-width: 0; }
.nav-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.nav-bar { display: flex; align-items: stretch; gap: var(--sp-1); list-style: none; margin: 0; padding: 0; }
.nav-bar.nav-end { margin-left: auto; }
.nav-bar > li { position: relative; display: flex; align-items: center; border-bottom: 2px solid transparent; padding-top: 2px; }
.nav-bar > li.is-current { border-bottom-color: var(--kasm-blue); }
.nav-ic { width: 16px; height: 16px; flex: none; }
header.top .nav-link, header.top .nav-btn, header.top .nav-newbtn, .nav-hubname { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px;
  border-radius: 6px; background: none; border: 0; color: var(--header-fg); font: inherit; cursor: pointer; white-space: nowrap; text-decoration: none; }
.nav-hubname { cursor: default; opacity: .85; }
header.top .nav-link:hover, header.top .nav-btn:hover, header.top .nav-newbtn:hover { background: rgb(255 255 255 / .1); }
header.top .nav-btn[aria-expanded=true] { background: rgb(255 255 255 / .14); }
header.top .nav-link:focus-visible, header.top .nav-btn:focus-visible, header.top .nav-newbtn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.nav-bar > li.is-current > .nav-link, .nav-bar > li.is-current > .nav-btn { font-weight: 500; }
.nav-hub { margin-right: var(--sp-2); }
.nav-hub .nav-btn { border: 1px solid rgb(255 255 255 / .25); }
header.top .nav-new .nav-newbtn { background: var(--accent); color: var(--fg-on-accent); border-radius: 6px 0 0 6px; font-weight: 500; }
header.top .nav-new .nav-newbtn:hover { background: var(--accent-hover); }
header.top .nav-new .nav-newmore { background: var(--accent); color: var(--fg-on-accent); border-radius: 0 6px 6px 0; padding: 6px 4px; border-left: 1px solid rgb(255 255 255 / .3); }
header.top .nav-new .nav-newmore:hover, header.top .nav-new .nav-newmore[aria-expanded=true] { background: var(--accent-hover); }
.nav-new { margin-right: var(--sp-2); }
.nav-menu { position: absolute; top: 100%; left: 0; z-index: 50; min-width: 220px; margin: 2px 0 0; padding: 4px; list-style: none;
  background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgb(0 0 0 / .18); }
.nav-menu[hidden] { display: none; }
.nav-menu-end, .nav-new .nav-menu { left: auto; right: 0; }
header.top .nav-menu a, .nav-menu .nav-menuitem { display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding: 6px 10px; border-radius: 6px;
  color: var(--fg); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; white-space: nowrap; text-decoration: none; }
header.top .nav-menu a:hover, .nav-menu .nav-menuitem:hover, header.top .nav-menu a:focus-visible, .nav-menu .nav-menuitem:focus-visible { background: var(--accent-wash); outline: none; }
header.top .nav-menu a[aria-current] { color: var(--accent); font-weight: 500; }
.nav-menu form { margin: 0; }
.nav-menu .nav-note { display: block; padding: 6px 10px; color: var(--fg-muted); font-size: var(--fs-sm, .85rem); }
.nav-you .role { opacity: .8; }
.nav-badge { display: inline-block; min-width: 1.1rem; padding: 0 .3rem; border-radius: 9px; background: #b42318; color: #fff; font-size: .72rem; font-weight: 600;
  line-height: 1.1rem; text-align: center; }
/* Admin > Setup: readiness tiles, each with its state and a Fix link */
.setup-sum { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin: 0 0 var(--sp-3); }
.setup-meter { width: 160px; height: 8px; border: 0; border-radius: 4px; background: var(--line); overflow: hidden; appearance: none; }
.setup-meter::-webkit-progress-bar { background: var(--line); }
.setup-meter::-webkit-progress-value { background: var(--ok); }
.setup-meter::-moz-progress-bar { background: var(--ok); }
.setup-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-4); padding: 0; list-style: none; }
.setup-tile { display: flex; flex-direction: column; gap: .35rem; padding: var(--sp-3); border: 1px solid var(--line); border-left: 4px solid var(--line-strong);
  border-radius: var(--r-lg); background: var(--surface); }
.setup-tile.st-ok { border-left-color: var(--ok); } .setup-tile.st-todo { border-left-color: var(--bad); } .setup-tile.st-optional { border-left-color: var(--warn); }
.setup-tile .st-head { display: flex; align-items: center; gap: .45rem; font-weight: 600; }
.setup-tile .st-head .nav-ic { width: 18px; height: 18px; }
.setup-tile .st-head .badge { margin-left: auto; }
.setup-tile p { margin: 0; font-size: var(--fs-sm, .85rem); color: var(--fg-muted); flex: 1; }
.setup-tile .button { align-self: flex-start; }
.conn-who { border: 1px solid var(--line); border-radius: var(--r-md); padding: .4rem .8rem; margin: .6rem 0; }
.conn-who legend { font-weight: 600; padding: 0 .3rem; }
.req-access { display: inline-flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.role { font-size: var(--fs-xs); padding: 0 .5em; border: 1px solid rgb(255 255 255 / .3); border-radius: var(--r-pill); }
main { padding: var(--sp-4) var(--sp-6); max-width: 1200px; }
/* a page with a diagram (the new page, a platform's) uses more of a wide window: the drawing is as wide as the page */
main:has(.kd-panel) { max-width: 1640px; }
footer { padding: var(--sp-4) var(--sp-6); color: var(--fg-muted); font-size: var(--fs-xs); }
h1 { font-size: var(--fs-lg); font-weight: 600; line-height: 1.25; margin: .4rem 0 1rem; }
h2 { font-size: var(--fs-md); font-weight: 600; line-height: 1.25; margin: 0 0 .6rem; }
h2 small, h1 small { color: var(--fg-muted); font-weight: 400; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4) var(--sp-5); margin: 0 0 var(--sp-4); }
.card.narrow { max-width: 420px; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); }
table.list th, table.list td { text-align: left; padding: .5rem .6rem; height: 40px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-weight: 500; color: var(--fg-muted); }
table.list tbody tr:hover { background: var(--surface-2); }
/* badges: wash background, coloured text (design 4.11) */
.badge { display: inline-flex; align-items: center; gap: .3em; padding: 0 .6em; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 500;
  line-height: 1.6; white-space: nowrap; color: var(--fg-muted); background: var(--off-wash); vertical-align: middle; }
.badge.ok { color: var(--ok); background: var(--ok-wash); } .badge.bad { color: var(--bad); background: var(--bad-wash); }
.badge.warn { color: var(--warn); background: var(--warn-wash); } .badge.busy { color: var(--accent); background: var(--accent-wash); }
.badge.off { color: var(--fg-muted); background: var(--off-wash); }
.error { color: var(--bad); } .warn { color: var(--warn); } .empty { color: var(--fg-muted); }
.message { color: var(--fg-muted); }
.hint { margin: .2rem 0 0 1.6rem; color: var(--fg-muted); font-size: .9em; }
.filters, form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin: 0 0 1rem; }
form.inline { display: inline; margin: 0; }
label { display: flex; flex-direction: column; gap: .2rem; font-size: var(--fs-sm); font-weight: 500; }
/* Checkbox and radio rows, site-wide (design 4.7): the input left of its text, vertically centred, never above it.
   :where keeps this at a label's specificity, so components (segments, tiles) still lay out their own labels. */
label:where(:has(> input[type=checkbox]), :has(> input[type=radio])) { flex-direction: row; align-items: center; gap: var(--sp-2);
  min-height: var(--control-h); font-weight: 400; font-size: inherit; }
input[type=checkbox], input[type=radio] { flex: none; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--accent); vertical-align: middle; }
.checklist label { flex-direction: row; gap: .4rem; }
/* the checkbox is the marker: no bullet as well, and the hint lines up with the text after the box */
ul.checklist { list-style: none; padding-left: 0; }
ul.checklist li + li { margin-top: .5rem; }
ul.checklist label { display: flex; align-items: baseline; }
ul.checklist .hint { margin-left: 1.45rem; }
input, select { font: inherit; font-weight: 400; padding: .3rem .5rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); }
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), select { min-height: var(--control-h); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--accent); }
button { font: inherit; font-weight: 500; min-height: var(--control-h); padding: .3rem .9rem; border: 1px solid var(--accent); background: var(--accent); color: var(--fg-on-accent);
  border-radius: var(--r-md); cursor: pointer; }
button:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button:disabled, button[aria-disabled=true] { opacity: .45; cursor: not-allowed; }
button.link, button.copy { background: none; color: var(--accent); border: none; padding: 0 .2rem; min-height: 0; }
button.link:hover:not(:disabled), button.copy:hover:not(:disabled) { background: none; text-decoration: underline; }
header.top button.link { color: var(--header-fg); }
.tabs { display: flex; gap: .8rem; margin: 0 0 1rem; }
.tabs a[aria-current] { font-weight: 700; }
/* Admin tab bars (Connections, Autoscale): one wrapping row of pills, a count or a badge after the label. */
.tabs.pill-tabs { flex-wrap: wrap; gap: .3rem; border-bottom: 1px solid var(--line); padding-bottom: .4rem; }
.tabs.pill-tabs a { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem; border-radius: var(--r-md); text-decoration: none; white-space: nowrap; }
.tabs.pill-tabs a:hover { background: var(--bg-soft, rgba(127,127,127,.12)); }
.tabs.pill-tabs a[aria-current] { background: var(--accent); color: var(--fg-on-accent); }
.tab-count { font-size: .75rem; min-width: 1.2rem; padding: 0 .3rem; border-radius: 8px; text-align: center; background: rgba(127,127,127,.18); }
.tabs.pill-tabs a[aria-current] .tab-count { background: rgba(255,255,255,.25); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem 1rem; margin: 0 0 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; }
.crumbs { color: var(--muted); margin: 0; }
ol.stepper { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 0 0 .6rem; }
ol.stepper .step span { display: inline-block; padding: .2rem .7rem; border-radius: 12px; border: 1px solid var(--line); }
ol.stepper .step.done span { background: #e7f5ec; border-color: var(--ok); color: var(--ok); }
ol.stepper .step.current span { background: #e8f0fd; border-color: var(--busy); color: var(--busy); font-weight: 600; }
ol.stepper .step.failed span { background: #fdecea; border-color: var(--bad); color: var(--bad); font-weight: 600; }
ol.stepper .step.skipped span { color: var(--muted); text-decoration: line-through; }
ol.stepper.sub { margin-left: 1.5rem; font-size: .9em; }
.pool { display: inline-block; padding: 0 .4em; border-radius: 3px; border: 1px solid var(--line); }
.pool.ok { border-color: var(--ok); } .pool.busy { border-color: var(--busy); } .pool.bad { border-color: var(--bad); }
.reveal-fallback code { padding: .2rem .4rem; background: #fff7e6; border: 1px solid var(--warn); }
.reveal-status { margin-left: .6rem; color: var(--muted); }
a.button { display: inline-flex; align-items: center; min-height: var(--control-h); font-weight: 500; padding: 0 .9rem; margin-left: .6rem; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent); color: var(--fg-on-accent); text-decoration: none; vertical-align: middle; }
a.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
a.button.sm { min-height: var(--control-h-sm); padding: 0 var(--sp-2); font-size: var(--fs-sm); }
button.secondary, a.button.secondary { background: var(--surface); color: var(--fg); border-color: var(--line-strong); }
button.secondary:hover:not(:disabled), a.button.secondary:hover { background: var(--surface-2); border-color: var(--fg-faint); }
button.danger, button.danger:hover:not(:disabled) { background: var(--bad); border-color: var(--bad); }
.danger summary { color: var(--bad); cursor: pointer; }
.notice { padding: .4rem .6rem; background: var(--warn-wash); border: 1px solid var(--warn); border-radius: var(--r-sm); }
p.ok { color: var(--ok); }
textarea { font: 12px/1.4 var(--mono); padding: .3rem .4rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--fg); }
ul.templates { padding-left: 1.2rem; }
ul.items { margin: .3rem 0 0; padding-left: 1.2rem; color: var(--muted); font-size: .9em; }
.error-list li { color: var(--bad); }
h3 { width: 100%; margin: .4rem 0 0; font-size: 1rem; }
/* progress (D21): the stage flow (with JS) and the outline ("Full tree", and the view without JS) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.phead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.phead h2 { margin-bottom: .4rem; }
.view-toggle { display: none; font-size: .9em; text-decoration: underline; min-height: 24px; padding: .2rem .4rem; }
.pview-flow { display: none; }
.js .view-toggle { display: inline-block; }
.js .pview-flow { display: block; }
.js .pview-tree { display: none; }
.js [data-view="tree"] .pview-flow { display: none; }
.js [data-view="tree"] .pview-tree { display: block; }
svg.pbar { display: block; width: 100%; height: 6px; margin: 0 0 .8rem; border-radius: 3px; }
.pbar .track { fill: #eef0f4; } .pbar .fill.busy { fill: var(--busy); } .pbar .fill.bad { fill: var(--bad); }
.pbar .fill.held { fill: var(--warn); } .pbar .mark { fill: var(--fg); opacity: .55; }

/* glyphs: the state without colour alone (the words are in .sr text and the legend) */
.g { display: inline-block; width: 1.1em; text-align: center; font-weight: 700; margin-right: .3em; flex: none; }
.g.done::before { content: "\2713"; color: var(--ok); }
.g.active::before { content: "\25B6"; color: var(--busy); font-size: .8em; }
.g.failed::before { content: "\2715"; color: var(--bad); }
.g.held::before { content: "\23F8"; color: var(--warn); }
.g.pending::before { content: "\25CB"; color: var(--muted); }
.g.skipped::before { content: "\2013"; color: var(--muted); }

/* the flow: the geometry repeats pkg/hub/flow.go (columns 160px or 56px, gaps 34px, heading 30px, rows 34px + 10px) */
/* room for the focus ring and the blocker's halo of the edge chips (overflow-x clips them otherwise) */
.flowwrap { padding: 6px; margin: -6px -6px -.2rem; }
@media (min-width: 721px) { .flowwrap { overflow-x: auto; } }
.flow { display: grid; justify-content: start; }
.flow > * { grid-area: 1 / 1; }
.flow svg.edges { overflow: visible; pointer-events: none; }
.fcols { display: flex; gap: 34px; align-items: start; }
.fcol { width: 160px; flex: none; }
.fcol.skipped { width: 56px; }
.flow.tight .fcol:not(.skipped) { width: 140px; }
.flow.tight button.chip { font-size: 13px; padding-right: .45rem; }
.flow.tight .dots { gap: 2px; margin-left: .25rem; }
.fcol h3 { margin: 0 0 10px; height: 20px; width: auto; font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; white-space: nowrap; }
.fcol.active h3 { color: #1f55b5; } .fcol.failed h3 { color: var(--bad); } .fcol.held h3 { color: #8a5300; }
.fcol ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fcol .off { margin: 0; height: 34px; line-height: 32px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 17px; font-size: .85em; }
button.chip { display: flex; align-items: center; width: 100%; height: 34px; padding: 0 .6rem 0 .45rem; border-radius: 17px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); white-space: nowrap; overflow: hidden; text-align: left; font-weight: 400; cursor: pointer;
  transition: opacity .12s; }
.chip .name { overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.chip .name small { color: var(--muted); font-size: .8em; font-weight: 400; }
.chip.done { background: #e7f5ec; border-color: #9fd2b3; color: var(--ok); }
.chip.active { background: #e8f0fd; border-color: var(--busy); color: #1f55b5; font-weight: 600; }
.chip.failed { background: #fdecea; border-color: var(--bad); color: var(--bad); font-weight: 600; }
.chip.held { background: #fff7e6; border-color: var(--warn); color: #8a5300; font-weight: 600; }
.chip.pending { color: var(--muted); border-style: dashed; border-color: #808a9b; }
.chip.blocker.active { box-shadow: 0 0 0 3px #c9dafa; }
.chip.blocker.failed { box-shadow: 0 0 0 3px #f6c9c4; }
.chip.blocker.held { box-shadow: 0 0 0 3px #f7deb0; }
.chip:focus-visible, .chip.selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.dots { display: inline-flex; align-items: center; gap: 3px; margin-left: .4rem; flex: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--muted); }
.dot.done { background: var(--ok); border-color: var(--ok); } .dot.active { background: var(--busy); border-color: var(--busy); }
.dot.failed { background: var(--bad); border-color: var(--bad); } .dot.held { background: var(--warn); border-color: var(--warn); }
.dots b { font-size: .75em; color: var(--muted); font-weight: 600; }
.e { fill: none; stroke-linecap: round; stroke-linejoin: round; transition: opacity .12s; }
/* the faint lines and the pending (dashed) ones keep a 3:1 contrast on white; they stay quiet by their width */
.e.faint { stroke: #8a93a3; stroke-width: 1; }
.e.faint.stage { stroke-dasharray: 1 3; stroke-width: 1.4; }
.e.next { stroke: #6f7989; stroke-width: 1.2; stroke-dasharray: 3 3; }
.e.crit { stroke-width: 2.6; }
.e.crit.ok { stroke: var(--ok); } .e.crit.busy { stroke: var(--busy); } .e.crit.bad { stroke: var(--bad); } .e.crit.held { stroke: var(--warn); }
.e.crit.muted { stroke: #6f7989; }
.ah.faint { fill: #8a93a3; } .ah.next { fill: #6f7989; } .ah.crit.ok { fill: var(--ok); } .ah.crit.busy { fill: var(--busy); }
.ah.crit.bad { fill: var(--bad); } .ah.crit.held { fill: var(--warn); } .ah.crit.muted { fill: #6f7989; }
/* hover or a selected chip: what it waits on and what waits on it stay, the rest fades */
/* faded chips stay legible (about 3:1 for their text) */
.flow.focusing .chip.dim { opacity: .45; }
.flow.focusing .e.dim { opacity: .15; }
.flow.focusing .e.lit.faint, .flow.focusing .e.lit.next { stroke: #3d4554; }
.nowbox { margin: .9rem 0 0; padding: .55rem .8rem; border-left: 4px solid var(--busy); background: #f3f7fe; border-radius: 0 6px 6px 0; }
.nowbox.bad { border-color: var(--bad); background: #fdf3f2; } .nowbox.held { border-color: var(--warn); background: #fffaf0; }
.nowbox.ok { border-color: var(--ok); background: #f1f9f4; } .nowbox.idle { border-color: var(--line); background: #f8f9fb; }
.nowbox p { margin: 0; } .nowbox .now { font-weight: 600; }
.nowbox .now a, .nowbox .why a { color: inherit; }
.nowbox .why { color: var(--muted); margin: .15rem 0 0 1.4em; }
.nowbox ul.why { padding-left: 1rem; }
.nowbox details.raw, .fdetail details.raw { margin: .3rem 0 0 1.4em; font-size: .85em; }
.nowbox details.raw summary, .fp-body details.raw summary { color: var(--muted); }
.nowbox pre, .fp-body pre { margin: .3rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.4 ui-monospace, monospace; color: var(--fg); }
.pview-flow .foot { display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: space-between; margin: .7rem 0 0; color: var(--muted); font-size: .8rem; }
.legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .8rem; color: var(--muted); }
.legend > span { display: inline-flex; align-items: center; } .legend svg { margin-right: .3rem; }
@media (prefers-reduced-motion: no-preference) {
  .chip.active.blocker { animation: chip-pulse 2s ease-in-out infinite; }
  @keyframes chip-pulse { 50% { background: #d4e3fb; } }
}
/* phone: the stages stack as rows, no lines (the caption says what matters) */
@media (max-width: 720px) {
  .flow { display: block; }
  .flow svg.edges { display: none; }
  .fcols { display: block; }
  .fcol, .fcol.skipped { width: auto; display: grid; grid-template-columns: 6.5rem 1fr; gap: .4rem; padding: .35rem 0; border-top: 1px solid #eef0f4; }
  .fcol h3 { height: 34px; margin: 0; }
  .fcol ul { flex-direction: row; flex-wrap: wrap; gap: .35rem; }
  button.chip { width: auto; max-width: 100%; }
  .fcol .off { border: 0; text-align: left; }
  .pview-flow .lg-line { display: none; }
  .view-toggle { min-height: 44px; }
}

/* the detail panel: a side panel over the page's right edge, a sheet on a phone */
.fpanel { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); z-index: 20; background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(17, 24, 39, .12); display: flex; flex-direction: column; }
.fpanel[hidden] { display: none; }
.fp-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.fp-head h2 { margin: 0; font-size: 1rem; display: flex; align-items: center; }
.fp-head h2:focus { outline: none; }
.fp-close { font-size: 1.4rem; line-height: 1; text-decoration: none; min-width: 32px; min-height: 32px; }
.fp-body { padding: .7rem 1rem 1.2rem; overflow-y: auto; font-size: .9rem; }
.fp-body h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: .9rem 0 .3rem; }
.fp-body dl.fp-facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; margin: 0; }
.fp-body dl.fp-facts dt { color: var(--muted); } .fp-body dl.fp-facts dd { margin: 0; overflow-wrap: anywhere; }
.fp-body .fp-why { margin: .6rem 0 0; }
.fp-body details.raw { margin-left: 0; }
.fp-body ul { list-style: none; margin: 0; padding: 0; }
.fp-body ul li { display: flex; align-items: baseline; padding: .15rem 0; border-top: 1px solid #eef0f4; }
.fp-body ul li small { margin-left: auto; padding-left: .6rem; color: var(--muted); }
.fp-body .fp-more { margin: 1rem 0 0; }
/* the page keeps room for the open panel: a right margin beside it, the sheet's height under a phone's page */
@media (min-width: 721px) { html.fp-open main { margin-right: 380px; } }
@media (max-width: 720px) {
  .fpanel { top: auto; height: 70vh; height: 70dvh; width: 100vw; border-left: 0; border-top: 1px solid var(--line); border-radius: 10px 10px 0 0; }
  .fp-close { min-width: 44px; min-height: 44px; }
  html.fp-open body { padding-bottom: 70vh; padding-bottom: 70dvh; }
}

/* the outline: glyph, name and duration per row; a rail in the focus's colour down to it; done and large pending
   branches folded into their row */
.pblock { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .55rem .8rem; border-radius: 6px; border-left: 4px solid; }
.pblock.busy { background: #eef4fe; border-color: var(--busy); }
.pblock.bad { background: #fdf0ee; border-color: var(--bad); }
.pblock.held { background: #fff7e6; border-color: var(--warn); }
.pblock .lbl { font-weight: 600; }
.pblock.bad .lbl { color: var(--bad); } .pblock.busy .lbl { color: #1f55b5; } .pblock.held .lbl { color: #8a5300; }
.pblock a { font-weight: 600; color: inherit; }
.pblock .where { color: var(--muted); }
.pblock code { font-size: .8em; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 0 .3em; }
.pblock .what { flex: 1; min-width: 0; }
.pblock .dur { color: var(--muted); font-variant-numeric: tabular-nums; }
.ptree { max-width: 640px; }
.ptree h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 .3rem; font-weight: 600; }
.ptree h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.rail-busy { --rail: var(--busy); --tint: #eef4fe; } .rail-bad { --rail: var(--bad); --tint: #fdf0ee; } .rail-held { --rail: var(--warn); --tint: #fff7e6; }
ul.tree { list-style: none; margin: 0; padding: 0; }
ul.tree ul.tree { margin-left: 7px; }
ul.tree ul.tree > li { position: relative; padding-left: 18px; background: linear-gradient(var(--line), var(--line)) no-repeat 0 0 / 1px 100%; }
ul.tree ul.tree > li:last-child { background-size: 1px 15px; }
ul.tree ul.tree > li::after { content: ""; position: absolute; left: 0; top: 15px; width: 12px; height: 1px; background: var(--line); }
ul.tree ul.tree > li.path::before, ul.tree ul.tree > li:has(~ li.path)::before {
  content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 3px; background: var(--rail); border-radius: 2px; }
ul.tree ul.tree > li.path::before { bottom: auto; height: 16px; }
ul.tree ul.tree > li.path::after { background: var(--rail); height: 3px; top: 14px; }
ul.tree summary { list-style: none; display: flex; align-items: center; gap: .5rem; padding: 4px 8px; margin-left: -8px; border-radius: 5px; cursor: pointer; min-height: 30px; }
ul.tree summary::-webkit-details-marker { display: none; }
ul.tree summary:hover { background: #f2f4f7; }
ul.tree summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
ul.tree summary .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
ul.tree summary .dur { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .92em; }
ul.tree summary .fold { color: var(--muted); font-size: .8em; }
ul.tree summary::after { content: "\203A"; color: #808a9b; width: .6em; opacity: 0; }
ul.tree summary:hover::after, ul.tree summary:focus-visible::after, ul.tree details[open] > summary::after { opacity: 1; }
ul.tree details[open] > summary::after { transform: rotate(90deg); }
@media (hover: none) { ul.tree summary::after { opacity: 1; } }
/* the outline's glyph: the pip shrunk to a 16px dot */
.ptree .g { display: inline-grid; place-items: center; width: 16px; height: 16px; margin: 0; border-radius: 50%; border: 1.5px solid #808a9b;
  font-size: 10px; font-weight: 800; line-height: 1; background: var(--surface); }
.ptree .g::before { color: inherit; }
.ptree .g.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.ptree .g.active { background: #e8f0fd; border-color: var(--busy); color: var(--busy); } .ptree .g.active::before { font-size: 7px; margin-left: 1px; }
.ptree .g.failed { background: var(--bad); border-color: var(--bad); color: #fff; }
.ptree .g.held { background: #fff7e6; border-color: var(--warn); color: var(--warn); } .ptree .g.held::before { font-size: 8px; }
.ptree .g.pending::before { content: ""; }
li.tn.pending > details > summary { color: var(--muted); }
li.tn.path > details > summary .name { font-weight: 600; }
li.tn.blocker > details > summary { background: var(--tint); }
li.tn.blocker.failed > details > summary .name { color: var(--bad); }
li.tn:target > details > summary { outline: 2px solid var(--accent); outline-offset: -2px; }
dl.info { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .8rem; margin: .15rem 0 .5rem 24px; padding: .45rem .7rem;
  font-size: .86em; background: #fafbfc; border: 1px solid var(--line); border-radius: 5px; }
dl.info:empty { display: none; }
dl.info dt { color: var(--muted); } dl.info dd { margin: 0; overflow-wrap: anywhere; }
dl.info .tblocked { color: var(--bad); font-weight: 600; } dl.info .theld { color: #8a5300; font-weight: 600; }
.ptree .legend { margin: .6rem 0 0; }
.ptree .legend .g { width: 13px; height: 13px; font-size: 8px; margin-right: .3rem; }
@media (max-width: 640px) {
  .ptree { max-width: none; }
  .pblock { flex-wrap: wrap; }
  ul.tree ul.tree > li { padding-left: 14px; }
  dl.info { grid-template-columns: 1fr; margin-left: 0; }
}

/* Form fields with looked-up choices (design 9.8). */
.field { display: flex; flex-direction: column; gap: .15rem; }
.field small.warn, .field small.message, .field small.chosen { font-size: .8em; max-width: 32rem; }
.field small.chosen { color: var(--muted); }
.field select { max-width: 32rem; }
.js .nojs-only { display: none; }
.field small.desc { color: var(--muted); font-size: .8em; }
.field abbr.req { text-decoration: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.htmx-request.field { opacity: .6; }
/* Kasm configuration tab (design D24) */
.cfg-items code.obj { white-space: pre-wrap; word-break: break-word; font-size: .85em; }
.cfg-items tr.infra td { color: var(--muted); }
.cfg-items ul.drift { margin: .2rem 0 0; padding-left: 1.2rem; }
/* Configuration modes (D24): Seed drift is information (Kasm keeps its value), not a warning */
.badge.info { color: var(--info); background: var(--info-wash); }
.cfg-items form.cfg-mode { margin-top: .2rem; }
.cfg-items .cfg-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; }
.cfg-form fieldset { border: 1px solid var(--line); border-radius: 4px; margin: 0 0 .8rem; width: 100%; }
.cfg-form input { min-width: 0; }
label.wide { width: 100%; }
label.wide textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
li.error { color: var(--bad); } li.warning { color: var(--warn); }
ul.changes { list-style: none; padding-left: 0; }

/* ---- the New page (design 9.8, mockup A): picker cards, a sectioned form, a sticky summary ---- */
.newp { --faint: #667085; --accent-bg: #e8f0fd; --ok-bg: #e7f5ec; --warn-bg: #fff4e0; --field: #cfd5df; }
.newp-head { display: flex; align-items: baseline; gap: .6rem 1rem; flex-wrap: wrap; margin: .4rem 0 .9rem; }
.newp-head h1 { margin: 0; }
.newp h1 small { font-size: .7em; }
.newp .card { border-radius: 8px; }
.newp .switch { display: inline-flex; margin-left: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 2px; }
.newp .switch a { padding: .25rem .8rem; border-radius: 6px; text-decoration: none; color: var(--muted); font-size: .9rem; }
.newp .switch a[aria-current] { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.newp .switch a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* filter chips (links) and radio chips */
.newp .chips-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 1rem; }
.newp .chips-row .sep { width: 1px; height: 20px; background: var(--line); margin: 0 .3rem; }
.newp .chip-link, .newp .chip-toggle > span { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .7rem; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--muted); font-size: .85rem; text-decoration: none; cursor: pointer; white-space: nowrap; }
.newp .chip-link[aria-current] { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.newp .chip-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.newp .n { font-weight: 400; color: var(--faint); font-size: .8em; }
.newp .chip-toggle { position: relative; display: inline-flex; flex-direction: row; font-size: 1em; }
.newp .chip-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.newp .chip-toggle input:checked + span { background: var(--accent-bg); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.newp .chip-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.newp .chips { display: flex; flex-wrap: wrap; gap: .35rem; }

/* the lanes and the card grid */
.newp .lane { display: flex; align-items: center; gap: .1rem; margin: 1.2rem 0 .6rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
.newp .chips-row + .lane { margin-top: 0; }
.newp .lane .note, .newp .adv .note { text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--faint); margin-left: .4rem; }
.newp .lane[hidden], .newp [hidden] { display: none; }
.newp .grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.newp .tpl { position: relative; display: flex; flex-direction: column; gap: .45rem; height: 100%; padding: .8rem .9rem .75rem; background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.newp .tpl:hover { border-color: #b9c6dc; box-shadow: 0 2px 8px rgba(17, 24, 39, .06); }
.newp .tpl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.newp .tpl.preview { background: #fbfbfc; border-style: dashed; }
.newp .tpl.preview .title { color: #3b4352; }
.newp .tpl.rec { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.newp .tpl .row { display: flex; align-items: center; gap: .35rem; }
.newp .tpl .title { font-weight: 600; font-size: .98rem; line-height: 1.25; }
.newp .tpl .tag { color: var(--muted); font-size: .85rem; line-height: 1.3; }
.newp .tpl .foot { margin-top: auto; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; padding-top: .15rem; }
.newp .tpl .id { margin-left: auto; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--faint); }
.newp .star { position: absolute; top: -.55rem; right: .7rem; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 600; padding: 0 .45rem;
  border-radius: 8px; line-height: 1.15rem; }

/* badges and pills */
.newp .cloud { font-size: .68rem; font-weight: 700; letter-spacing: .04em; padding: .05rem .4rem; border-radius: 4px; color: #fff; background: #5b6577; }
.newp .cloud.oci { background: #c74634; } .newp .cloud.aws { background: #232f3e; }
.newp .shape { white-space: nowrap; flex: none; font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: .05rem .4rem; border-radius: 4px;
  background: #eef0f4; color: #3b4352; }
.newp .status { margin-left: auto; display: inline-flex; align-items: center; font-size: .74rem; font-weight: 600; padding: .05rem .5rem .05rem .3rem; border-radius: 10px; }
.newp .status .g { margin-right: .1em; }
.newp .status.live { background: var(--ok-bg); color: var(--ok); }
.newp .status.preview { background: #eef0f4; color: var(--muted); }
.newp .pill { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; padding: .05rem .5rem; border-radius: 10px; border: 1px solid var(--line);
  color: #3b4352; background: var(--surface); white-space: nowrap; }
.newp .pill.cost { font-weight: 600; border-color: #c9d8f5; background: var(--accent-bg); color: #1f4fa8; }
.newp .pill svg { width: 12px; height: 12px; }
.newp .pill.manual { border-color: #f3c27a; background: var(--warn-bg); color: #8a4b00; font-weight: 600; }
.newp .sum .manual { margin: 0 0 .9rem; padding: .55rem .7rem; border: 1px solid #f3c27a; border-radius: 6px; background: var(--warn-bg); font-size: .82rem; }
.newp .sum .manual h3.sum-h { color: #8a4b00; }
.newp .sum .manual ul { margin: .2rem 0 0; padding-left: 1.1rem; color: #4a3200; }
.newp .sum .manual li + li { margin-top: .25rem; }
.newp .shape-icon { display: inline-flex; gap: 2px; align-items: center; padding: .1rem .3rem; border-radius: 4px; background: #f3f5f8; }
.newp .shape-icon i { display: block; width: 10px; height: 10px; border-radius: 2px; background: #c9d1de; border: 1px solid #8a96aa; }
.newp .shape-icon i.cp { background: #5b6577; border-color: #3b4352; }
.newp .shape-icon i.db { border-radius: 50% / 28%; width: 9px; height: 11px; background: #d6e2fa; border-color: #1f4fa8; }
.newp .shape-icon i.vm { background: var(--surface); border-style: dashed; }
.newp .shape-icon i.h, .newp .shape-icon i.hcp { width: 7px; height: 10px; border-radius: 1px; }
.newp .shape-icon i.hcp { background: #5b6577; border-color: #3b4352; }

/* the chosen template's bar */
.newp .picked { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .9rem; }
.newp .picked .title { font-weight: 600; font-size: 1.02rem; }
.newp .picked .status { margin-left: 0; }
.newp .picked .change { margin-left: auto; font-size: .9rem; }

/* the form and the summary */
.newp .layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.newp form.guided { display: block; padding: 0; margin: 0; }
.newp .sect { border: 0; margin: 0; padding: 1rem 1.1rem 1.1rem; border-top: 1px solid var(--line); min-width: 0; }
.newp .sect:first-of-type { border-top: 0; }
.newp .sect-note { margin: 0; padding: .7rem 1.1rem 0; }
.newp .sect > legend { float: left; width: 100%; padding: 0; margin: 0 0 .75rem; display: flex; align-items: center; gap: .45rem; font-size: .78rem;
  font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.newp .sect > legend + * { clear: left; }
.newp .num { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1.5px dashed #808a9b; color: #808a9b;
  font-size: .72rem; letter-spacing: 0; }
.newp .num::before { content: "\25CB"; }
.newp .num.done { border: 1.5px solid var(--ok); background: var(--ok); color: #fff; }
.newp .num.done::before { content: "\2713"; }
.newp .num.current { border: 1.5px solid var(--accent); background: var(--accent-bg); color: var(--accent); }
.newp .num.current::before { content: "\25B6"; font-size: .62rem; }
.newp .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .8rem 1rem; }
.newp .fields > .ch-pick-wrap { grid-column: 1 / -1; margin: 0; max-width: none; }
.newp .ch-pick { grid-template-columns: repeat(auto-fill, minmax(min(19rem, 100%), 1fr)); }
.newp .field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.newp .field.wide { grid-column: 1 / -1; }
.newp .lbl { display: flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; color: #3b4352; }
.newp .lbl label { display: inline; font-size: 1em; }
.newp .req { color: var(--bad); font-weight: 700; text-decoration: none; }
.newp .field input:not([type=radio]):not([type=file]), .newp .field select { font: inherit; height: 2.2rem; padding: .3rem .55rem; border: 1px solid var(--field);
  border-radius: 6px; background: var(--surface); color: var(--fg); width: 100%; }
.newp .field textarea { width: 100%; border-color: var(--field); border-radius: 6px; }
.newp .field input:focus-visible, .newp .field select:focus-visible, .newp .field textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.newp .field [aria-invalid=true] { border-color: var(--warn); }
.newp .field small { font-size: .78rem; }
.newp .field small.chosen { color: var(--faint); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* free text with looked-up choices: the pick (a select with Other…) with JavaScript, the text box with a datalist without */
.field select.pick { display: none; }
.js .field select.pick { display: block; }
.field input[hidden] { display: none !important; }
.newp .field input[readonly] { background: #f4f6f9; color: var(--muted); }
.newp .field button.zone-reset { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: .78rem; color: var(--accent); text-decoration: underline; cursor: pointer; }
.newp .field button.zone-reset[hidden] { display: none; }

/* help: a (?) button whose tooltip shows on hover and keyboard focus (app.js: Escape hides it) */
.newp .help { position: relative; display: inline-flex; }
.newp .help button { all: unset; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #b8c0cc;
  color: var(--muted); font-size: .68rem; font-weight: 700; cursor: help; }
.newp .help button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Below the button; its transparent top border bridges the gap, so the pointer can move onto it (WCAG 1.4.13);
   app.js flips it to end at the button when it would leave the form's card. */
.newp .help [role=tooltip] { display: none; position: absolute; z-index: 5; left: -8px; top: 100%; width: min(260px, 80vw); box-sizing: border-box;
  border-top: 6px solid transparent; background-clip: padding-box; padding: .45rem .6rem; border-radius: 0 0 6px 6px; background-color: #1d2330;
  color: #f3f4f6; font-size: .78rem; font-weight: 400; line-height: 1.35; text-transform: none; letter-spacing: 0; }
.newp .help.flip [role=tooltip] { left: auto; right: -8px; }
.newp .help:hover [role=tooltip], .newp .help button:focus + [role=tooltip], .newp .help.open [role=tooltip] { display: block; }
.newp .help.hush button + [role=tooltip], .newp .help.hush:hover [role=tooltip] { display: none; }

/* a row of buttons (radios): sizes, availability domains, versions */
.newp .seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--field); border-radius: 8px; overflow: hidden; background: var(--surface); }
.newp .seg label { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05rem; padding: .4rem .3rem;
  border-left: 1px solid #e6e9ef; cursor: pointer; text-align: center; min-width: 0; font-size: 1em; }
.newp .seg label:first-child { border-left: 0; }
.newp .seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.newp .seg b { font-size: .88rem; font-weight: 600; }
.newp .seg small { font-size: .72rem; color: var(--muted); white-space: nowrap; }
/* a parameter's choices (the DNS choice): the title and its tags on a line, the help wrapped under it */
.newp .seg.choices label { align-items: flex-start; justify-content: flex-start; text-align: left; padding: .5rem .7rem; flex-flow: row wrap; align-content: flex-start; column-gap: .4rem; }
.newp .seg.choices small:not(.tag) { white-space: normal; flex-basis: 100%; line-height: 1.3; }
.newp .seg.choices small.tag, .newp .seg.choices small.why { align-self: baseline; }
.newp .seg small.price { color: #1f4fa8; }
.newp .seg small.tag { color: var(--faint); font-weight: 400; }
.newp .seg small.why { color: #4a5568; font-style: italic; }
.newp .seg label:has(input:checked) { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent); }
.newp .seg label:has(input:checked) b { color: var(--accent); }
.newp .seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -4px; }
.newp .seg label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.newp .seg.compact label { flex-direction: row; gap: .3rem; padding: .45rem .5rem; }
.newp .stepper { display: flex; align-items: center; border: 1px solid var(--field); border-radius: 6px; width: max-content; overflow: hidden; }
.newp .stepper button { all: unset; width: 2rem; height: 2.2rem; display: grid; place-items: center; color: var(--accent); font-weight: 700; cursor: pointer; background: #f3f5f8; }
.newp .stepper .js-only { display: none; }
.js .newp .stepper .js-only { display: grid; }
.newp .field .stepper input:not([type=radio]) { width: 4rem; height: 2.2rem; border: 0; border-radius: 0; text-align: center; }
.js .newp .field .stepper input:not([type=radio]) { border-left: 1px solid var(--field); border-right: 1px solid var(--field); }

.newp details.adv { border-top: 1px solid var(--line); }
.newp details.adv > summary { list-style: none; cursor: pointer; padding: .85rem 1.1rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: .45rem; }
.newp details.adv > summary::-webkit-details-marker { display: none; }
.newp details.adv > summary::before { content: "\25B8"; color: var(--accent); width: 1.35rem; text-align: center; font-size: 1rem; }
.newp details.adv[open] > summary::before { content: "\25BE"; }
.newp details.adv > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.newp .adv-body { padding: 0 1.1rem 1.1rem; margin: 0; }
.newp details.docs p.adv-body { color: var(--muted); }

.newp .sum-col { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.newp .kd-jump { margin: .7rem 0 0; font-size: .82rem; text-align: center; }
.newp .kd-jump .note { display: block; color: var(--faint); font-size: .72rem; }
/* the diagram under the form and the summary, the width of the page */
.newp > .kd-panel { margin-top: 1rem; scroll-margin-top: 1rem; }
.newp aside.sum { padding: 1rem 1rem 1.1rem; margin: 0; }
.newp .sum h2, .newp .sum h3.sum-h { margin: 0 0 .1rem; width: auto; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.newp .big { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.newp .big small { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.newp .sub { color: var(--muted); font-size: .85rem; margin: .1rem 0 .8rem; }
.newp .sub b { color: var(--fg); }
.newp ul.lines { list-style: none; margin: 0 0 .9rem; padding: .55rem 0 0; border-top: 1px solid var(--line); font-size: .84rem; }
.newp ul.lines li { display: flex; justify-content: space-between; gap: .5rem; padding: .12rem 0; }
.newp ul.lines li span:last-child { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.newp ul.makes { list-style: none; margin: .2rem 0 1rem; padding: .6rem 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr;
  gap: .4rem .5rem; font-size: .82rem; }
.newp ul.makes li { display: flex; align-items: center; gap: .4rem; }
.newp ul.makes li.off { color: var(--faint); }
.newp ul.makes svg { width: 16px; height: 16px; flex: none; color: #4a5568; }
.newp ul.makes li.off svg { color: #c0c6d0; }
.newp p.small { font-size: .8rem; }
.newp .actions { display: flex; gap: .5rem; }
.newp .btn { font: inherit; font-weight: 600; flex: 1; height: 2.4rem; border-radius: 7px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.newp .btn.secondary { background: var(--surface); color: var(--accent); }
.newp .btn:disabled { opacity: .5; cursor: not-allowed; }
.newp .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.newp .sum .nojs-only { margin-top: .5rem; width: 100%; }
.newp .fine { margin: .6rem 0 0; font-size: .75rem; color: var(--faint); text-align: center; }

/* the file card */
.newp .file-card { padding: 1rem 1.1rem 1.1rem; }
.newp .file-card .actions { margin-top: 1rem; max-width: 320px; }
.newp .file-card h2 { font-size: 1.05rem; }

@media (max-width: 820px) {
  .newp .layout { grid-template-columns: 1fr; }
  .newp .sum-col { position: static; }
}
@media (max-width: 560px) {
  header.top { gap: .8rem; padding: .55rem .8rem; font-size: .9rem; flex-wrap: wrap; }
  header.top .topnav { flex-wrap: wrap; gap: .3rem; }
  .nav-bar { flex-wrap: wrap; }
  .nav-bar.nav-end { margin-left: 0; }
  main { padding: .8rem .7rem 1.5rem; }
  .newp .grid { grid-template-columns: 1fr; gap: .6rem; }
  .newp .chips-row { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px .3rem; }
  .newp .sect { padding: .9rem .8rem 1rem; }
  .newp .fields { grid-template-columns: 1fr; }
  .newp .seg.sizes { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .newp .seg.sizes label:nth-child(3) { border-left: 0; }
  .newp .seg.sizes label:nth-child(n+3) { border-top: 1px solid #e6e9ef; }
  .newp .picked .change { margin-left: 0; flex-basis: 100%; }
}

/* Platform diagrams (pkg/diagram, the "diagram" partial): the architecture and the deployment plan as inline SVG,
   a Plan/Architecture switch (app.js; without JavaScript both show), the cost by component and a text version. On a
   phone the drawings give way to their text (the outline, the stage list). */
.kd-panel h2 small { font-weight: 400; }
.kd-tabs { display: none; gap: .4rem; align-items: center; flex-wrap: wrap; margin: 0 0 .6rem; }
.js .kd-tabs { display: flex; }
.kd-tabs button { padding: .2rem .7rem; }
.kd-tabs button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.kd-sum { margin-left: auto; color: var(--muted); font-size: .9em; }
.kd-sum b { color: var(--fg); }
.js .kd-wrap[data-dview="arch"] .kd-planfig, .js .kd-wrap[data-dview="plan"] .kd-archfig { display: none; }
.kd-wrap figure { margin: 0 0 .6rem; }
.kd-wrap figcaption { color: var(--muted); font-size: .85em; display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .3rem; }
/* the drawing at its asked-for size (1.3 times its layout), shrunk to the panel; centred, with room kept so that a
   redraw of another height moves little */
.kd-scroll { overflow-x: auto; display: flex; justify-content: center; align-items: flex-start; min-height: 260px; }
.kd-scroll:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kd-expand { display: none; }
.js .kd-expand { display: inline-block; }
.kd-sum + .kd-expand { margin-left: .2rem; }
.kd-stale[hidden] { display: none; }
.kd-key { display: inline-flex; align-items: center; gap: .35rem; }
.kd-key svg { flex: none; }
.kd-affected { margin: 0 0 .5rem; padding: .25rem .6rem; border-left: 3px solid #d97706; background: #fff7e6; font-size: .9em; }
.kd-problems { color: var(--muted); font-size: .85em; margin: .2rem 0 .5rem; }
.kd-wrap details { margin: .3rem 0; }
.kd-wrap summary { cursor: pointer; color: var(--accent); }
.kd-costs table { width: auto; min-width: 60%; font-size: .9em; }
.kd-costs td.num, .kd-costs th.num { text-align: right; white-space: nowrap; }
.kd-costs tr.kd-changed td { background: #fff7e6; }
.kd-text ul, .kd-phone ul { margin: .2rem 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
.kd-text li.kd-changed, .kd-phone li.kd-changed { background: #fff7e6; }
.kd-text .kd-st, .kd-phone .kd-st { color: var(--muted); font-size: .85em; }
.kd-phone { display: none; }
.kd-stages { list-style: none; padding: 0; }
.kd-stages > li { margin: 0 0 .4rem; }
@media (max-width: 700px) {
  .kd-scroll, .kd-wrap figcaption, .kd-text, .js .kd-expand { display: none; }
  .kd-phone { display: block; }
  .kd-sum { margin-left: 0; width: 100%; }
}
svg.kd { max-width: 100%; height: auto; display: block; font: 12px system-ui, -apple-system, "Segoe UI", sans-serif;
  --k-entry: #2f6fdf; --k-control: #1d7a46; --k-sessions: #c2410c; --k-data: #6b7280; }
svg.kd text { paint-order: stroke; stroke-linejoin: round; }
svg.kd.kd-mini { display: inline; max-width: none; }
/* the expanded diagram (app.js): a modal dialog the size of the window, the drawing zoomed and moved in its view */
dialog.kd-dialog { width: calc(100vw - 2rem); height: calc(100vh - 2rem); max-width: none; max-height: none; margin: auto; padding: 0;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--fg); display: none; flex-direction: column; overflow: hidden; }
dialog.kd-dialog[open] { display: flex; }
dialog.kd-dialog::backdrop { background: rgba(17, 24, 39, .55); }
.kdx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); }
.kdx-bar h2 { margin: 0; font-size: 1.05rem; flex: 1 1 auto; min-width: 12rem; }
.kdx-bar .kd-tabs { margin: 0; }
.kdx-zoom { display: inline-flex; align-items: center; gap: .3rem; }
.kdx-zoom button { min-width: 2.2rem; padding: .2rem .6rem; font-weight: 600; }
.kdx-level { min-width: 3.4rem; text-align: center; font-variant-numeric: tabular-nums; color: var(--muted); }
.kdx-view { flex: 1 1 auto; min-height: 0; overflow: auto; display: grid; background: var(--bg); cursor: grab; touch-action: pan-x pan-y; }
.kdx-view.kdx-drag { cursor: grabbing; user-select: none; }
.kdx-view:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.kdx-view > svg.kd { margin: auto; padding: 16px; max-width: none; box-sizing: content-box; }
.kdx-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1.5rem; padding: .45rem .9rem; border-top: 1px solid var(--line); }
.kdx-foot figcaption { color: var(--muted); font-size: .85em; display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.kdx-hint { margin: 0 0 0 auto; color: var(--muted); font-size: .8em; }
svg.kd .kd-frame { fill: none; stroke: var(--line); stroke-width: 1.2; }
svg.kd .kd-frame.kd-region { fill: #f8fafc; stroke: #b8c1cf; }
svg.kd .kd-frame.kd-vcn { fill: #f0f5fe; stroke: #9db7e6; stroke-dasharray: 6 4; }
svg.kd .kd-frame.kd-zones { fill: #fdfaf3; stroke: #e2d2b0; }
/* the frame labels sit over the users' lines into the region: a halo under the glyphs keeps them legible */
svg.kd .kd-flabel { fill: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; stroke: #f8fafc; stroke-width: 4px; stroke-linejoin: round; paint-order: stroke fill; }
svg.kd .kd-fsub { fill: var(--muted); font-size: 11px; stroke: #f8fafc; stroke-width: 4px; stroke-linejoin: round; paint-order: stroke fill; }
svg.kd .kd-node .kd-box { fill: #fff; stroke: #b3bccb; stroke-width: 1.2; }
svg.kd .kd-r-cluster > .kd-box { stroke: #7d879a; stroke-width: 1.4; }
svg.kd .kd-r-control-plane > .kd-box { fill: #f3f7fe; stroke: var(--accent); stroke-width: 1.8; }
svg.kd .kd-r-agent > .kd-box { fill: #f1faf7; stroke: #23877a; stroke-width: 1.5; }
svg.kd .kd-r-operator > .kd-box { fill: #fafbfc; stroke: #8a94a6; stroke-dasharray: 4 3; }
svg.kd .kd-r-node > .kd-box { fill: #fbfaf5; stroke: #9a8a4f; }
svg.kd .kd-r-proxy > .kd-box, svg.kd .kd-r-cpx > .kd-box { fill: #f7f4fe; stroke: #6d4fc2; stroke-width: 1.5; }
svg.kd .kd-r-lb > .kd-box { fill: #eef4fd; stroke: var(--accent); }
/* an Ingress: nothing answers until an ingress controller the platform does not compose gives it an address */
svg.kd .kd-r-ingress > .kd-box { fill: #fffaf0; stroke: #b7791f; stroke-dasharray: 5 3; }
svg.kd .kd-r-db > .kd-box { fill: #fffaf0; stroke: #b7791f; stroke-width: 1.5; }
svg.kd .kd-r-telemetry > .kd-box { fill: #fbfaf5; stroke: #9a8a4f; stroke-width: 1.4; }
svg.kd .kd-r-dns > .kd-box { fill: #fff; stroke: #7d879a; }
svg.kd .kd-r-users > .kd-box { fill: #fff; stroke: #7d879a; stroke-dasharray: 4 3; }
svg.kd .kd-r-pool > .kd-box { fill: #f8fbff; stroke: #5b7fb5; stroke-width: 1.4; stroke-dasharray: 6 4; }
svg.kd .kd-r-zone > .kd-box { fill: #fff; stroke: #d6bf8c; }
svg.kd .kd-name { fill: var(--fg); font-weight: 700; font-size: 12.5px; stroke: none; }
svg.kd .kd-tag { fill: var(--accent); font-size: 10.5px; text-anchor: end; stroke: none; }
svg.kd .kd-sub, svg.kd .kd-psub { fill: var(--muted); font-size: 11px; stroke: none; }
svg.kd .kd-foot, svg.kd .kd-line { fill: var(--fg); font-size: 11px; stroke: none; }
svg.kd .kd-pname { fill: var(--fg); font-size: 11px; font-weight: 600; stroke: none; }
svg.kd .kd-cost { fill: #1d6b40; font-size: 10.5px; font-weight: 600; text-anchor: end; stroke: none; }
svg.kd .kd-prow { fill: #f3f5f8; }
svg.kd .kd-dot { fill: #b3bccb; }
svg.kd .kd-badge rect { fill: none; stroke: var(--muted); }
svg.kd .kd-badge text { fill: var(--muted); font-size: 9.5px; font-weight: 700; text-anchor: middle; stroke: none; }
svg.kd .kd-edge { fill: none; stroke-width: 1.8; }
svg.kd .kd-k-entry > .kd-edge { stroke: var(--k-entry); stroke-width: 2; }
svg.kd .kd-k-control > .kd-edge { stroke: var(--k-control); stroke-dasharray: 6 3; }
svg.kd .kd-k-sessions > .kd-edge { stroke: var(--k-sessions); stroke-dasharray: 11 4; stroke-width: 2; }
svg.kd .kd-k-data > .kd-edge { stroke: var(--k-data); stroke-width: 2.4; }
svg.kd .kd-arrow.kd-k-entry { fill: var(--k-entry); } svg.kd .kd-arrow.kd-k-control { fill: var(--k-control); }
svg.kd .kd-arrow.kd-k-sessions { fill: var(--k-sessions); } svg.kd .kd-arrow.kd-k-data { fill: var(--k-data); }
svg.kd .kd-hit { fill: none; stroke: transparent; stroke-width: 12; }
svg.kd .kd-edge-g:hover > .kd-edge { stroke-width: 3; }
/* live state (the progress tree's): the box's edge and dot, the same colours as the stage flow's chips */
svg.kd .kd-st-done > .kd-box, svg.kd .kd-st-done > rect { stroke: var(--ok); }
svg.kd .kd-st-done > .kd-dot { fill: var(--ok); }
svg.kd .kd-st-active > .kd-box, svg.kd .kd-st-active > rect { stroke: var(--busy); stroke-width: 2.2; }
svg.kd .kd-st-active > .kd-dot { fill: var(--busy); }
svg.kd .kd-st-failed > .kd-box, svg.kd .kd-st-failed > rect { stroke: var(--bad); stroke-width: 2.2; fill: #fdecea; }
svg.kd .kd-st-failed > .kd-dot { fill: var(--bad); }
svg.kd .kd-st-held > .kd-box, svg.kd .kd-st-held > rect { stroke: var(--warn); stroke-width: 2.2; fill: #fff7e6; }
svg.kd .kd-st-held > .kd-dot { fill: var(--warn); }
svg.kd .kd-st-pending > .kd-box, svg.kd .kd-st-pending > rect { stroke-dasharray: 5 3; }
svg.kd .kd-st-pending > .kd-dot { fill: #fff; stroke: #808a9b; stroke-width: 1.2; }
svg.kd .kd-frame.kd-st-done { stroke: var(--ok); } svg.kd .kd-frame.kd-st-active { stroke: var(--busy); stroke-width: 2; }
svg.kd .kd-frame.kd-st-failed { stroke: var(--bad); stroke-width: 2; }
/* the changed field: what it affects */
svg.kd .kd-changed > .kd-box, svg.kd .kd-changed > rect, svg.kd .kd-frame.kd-changed { stroke: #d97706; stroke-width: 2.6; stroke-dasharray: none; }
svg.kd .kd-changed > .kd-prow { fill: #fff1d6; }
@media (prefers-reduced-motion: no-preference) {
  svg.kd .kd-changed > .kd-box, svg.kd .kd-changed > rect, svg.kd .kd-frame.kd-changed { animation: kd-flash 1.6s ease-out 1; }
  @keyframes kd-flash { from { stroke-width: 5; } to { stroke-width: 2.6; } }
}
/* the plan */
svg.kd .kd-shead { fill: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; stroke: none; }
svg.kd .kd-st-done > .kd-shead { fill: var(--ok); } svg.kd .kd-st-active > .kd-shead { fill: #1f55b5; }
svg.kd .kd-st-failed > .kd-shead { fill: var(--bad); }
svg.kd .kd-chip rect { fill: #fff; stroke: #aeb6c4; stroke-width: 1.2; }
svg.kd .kd-chip.kd-off rect { fill: none; stroke: var(--line); stroke-dasharray: 4 3; }
svg.kd .kd-chip.kd-off .kd-clabel { fill: var(--muted); font-weight: 400; }
svg.kd .kd-chip.kd-st-done rect { fill: #e7f5ec; stroke: #9fd2b3; }
svg.kd .kd-chip.kd-st-active rect { fill: #e8f0fd; }
svg.kd .kd-chip.kd-st-failed rect { fill: #fdecea; }
svg.kd .kd-chip.kd-st-held rect { fill: #fff7e6; }
svg.kd .kd-clabel { fill: var(--fg); font-size: 12px; font-weight: 600; stroke: none; }
svg.kd .kd-cdetail { fill: var(--muted); font-size: 10.5px; stroke: none; }
svg.kd .kd-sfoot { fill: var(--muted); font-size: 11px; stroke: none; }
svg.kd .kd-scost, svg.kd .kd-total { fill: #1d6b40; font-weight: 600; }
svg.kd .kd-pedge { fill: none; stroke: #aeb6c4; stroke-width: 1.4; }
svg.kd .kd-parrow { fill: #aeb6c4; }

/* The teardown view (design 9.6): the stage flow's chips in teardown order, no lines (the Usages' order is the
   columns' order; a wait is named under its chip). */
.g.kept::before { content: "\25C6"; color: #6b4fa0; }
.hint-top { color: var(--muted); margin: 0 0 .6rem; }
.tdflow { padding: 6px; margin: -6px -6px .2rem; }
@media (min-width: 721px) { .tdflow { overflow-x: auto; } }
.tdflow .fcols { gap: 22px; }
.tdflow .fcol { width: 152px; }
.tdflow .fcol.current h3 { color: #1f55b5; }
.tdflow .fcol.kept h3 { color: #6b4fa0; } .tdflow .fcol.done h3 { color: var(--ok); }
.tdflow .fcol ul { gap: 6px; }
.tdflow div.chip { display: flex; align-items: center; height: 34px; padding: 0 .6rem 0 .45rem; border-radius: 17px; border: 1px solid var(--line);
  background: var(--surface); color: var(--fg); white-space: nowrap; overflow: hidden; }
.tdflow .chip.kept { background: #f3effa; border-color: #b9a6dc; color: #4f3a7a; }
.dot.kept { background: #6b4fa0; border-color: #6b4fa0; }
.tdnote { margin: 2px 0 0 .7rem; font-size: .78em; color: var(--muted); white-space: normal; }
.tdnote.sub { margin-left: 1.1rem; }
.tdnote .g { width: .9em; margin-right: .15em; }
ul.tdstuck { padding-left: 1.1rem; } ul.tdstuck li { margin: 0 0 .5rem; }
dl.tdresult { margin-top: .8rem; }
.tdpips { display: inline-flex; gap: 1px; vertical-align: middle; margin-left: .4rem; }
.tdpips .g { width: 1em; margin: 0; font-size: .85em; } /* a shape per state (check, play, cross, ring, diamond), not a colour alone */
.archived-row td { color: var(--muted); }
@media (max-width: 720px) {
  .tdflow .fcol { width: auto; }
  .tdflow div.chip { max-width: 100%; }
}

/* Conditional fields (showWhen): hidden with JavaScript while they do not apply; without it they show with their note. */
html.js .field[data-na] { display: none; }
html.js .field small.when { display: none; }
.field small.when { color: var(--muted); font-size: .8em; font-style: italic; }
.field small.zone-hint[hidden] { display: none; }
/* Lease controls (platform page, admins) and the list's Pin / Unpin. */
.callout { padding: .5rem .7rem; background: #fff7e6; border: 1px solid var(--warn); border-left-width: 4px; border-radius: 4px; font-weight: 600; }
.lease-controls { margin-top: .8rem; border-top: 1px solid #e3e6ea; padding-top: .6rem; }
.lease-controls summary { cursor: pointer; font-weight: 600; }
.lease-controls form { margin: .6rem 0; }
.lease-edit { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; }
.lease-edit fieldset { border: 1px solid #e3e6ea; border-radius: 4px; padding: .3rem .6rem; display: flex; gap: .6rem; flex-wrap: wrap; }
.row-action { display: inline; margin-left: .3rem; }
.row-action button.small { font-size: .75rem; padding: .05rem .4rem; }
/* Compact controls: the platforms list's row actions and the lease card's actions. */
button.xs, a.button.xs, input.xs { min-height: var(--control-h-sm); font-size: var(--fs-sm); padding: 0 var(--sp-2); margin: 0; }
button.xs, a.button.xs { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
td.row-acts-cell { white-space: nowrap; width: 1%; }
.row-acts { display: inline-flex; align-items: center; gap: var(--sp-1); }
.row-acts .row-action { margin: 0; display: inline-flex; }
/* Pin / Unpin keep one width in every state ("Reclaim?" while it asks to confirm): the row never reflows. */
button.la-btn { width: 5.6rem; }
button[data-confirm-armed], button[data-confirm-armed]:hover:not(:disabled) { background: var(--bad); border-color: var(--bad); color: var(--fg-on-accent); }
.lease-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin-top: var(--sp-2); }
.lease-actions form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); margin: 0; }
.lease-actions .la-label { font-weight: 600; margin-right: var(--sp-1); }
.lease-actions .la-until { display: inline-flex; gap: var(--sp-1); margin-left: var(--sp-2); }
.lease-actions .la-reason { width: 12rem; margin-left: var(--sp-2); }
.lease-outcome { margin: var(--sp-2) 0 0; }
.la-hint { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); }

/* The autoscale wizard (design R4.2): the New page's fields in one column, hints and defaults under the input. */
.as-wizard .fields { grid-template-columns: minmax(0, 36rem); }
.as-wizard .field.check { flex-direction: column; }
.as-wizard .check-label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; }
.as-wizard .checks { display: flex; flex-direction: column; gap: .2rem; }
.as-wizard small.under { color: var(--muted); font-size: .78rem; }
.as-wizard small.dflt { color: var(--faint); }
.as-wizard .wiz-lookup { display: contents; }
.as-wizard legend .num { display: inline-block; min-width: 1.4rem; text-align: center; font-weight: 700; }
.as-cost { margin: .4rem 0 .8rem; }
.as-picker .pick-card { display: flex; flex-direction: column; gap: .2rem; }

/* The Configuration tab's editors: checkboxes inline with their label, kinds in columns, one clean form per object. */
.check-label { display: inline-flex; flex-direction: row; align-items: center; gap: .4rem; font-weight: 400; }
.checks.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: .25rem 1rem; margin-top: .4rem; }
.cfg-kinds { border: 1px solid var(--line); border-radius: 4px; padding: .5rem .8rem; margin: 0 0 .6rem; }
.cfg-kinds .cfg-all { font-weight: 600; }
.cfg-buttons { display: flex; gap: .5rem; flex-wrap: wrap; }
.cfg-editor .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .7rem 1rem; margin: .5rem 0 .7rem; align-items: start; }
.cfg-editor .field input:not([type=checkbox]), .cfg-editor .field select, .cfg-editor .field textarea { font: inherit; padding: .3rem .5rem; border: 1px solid var(--field, #b9c0c8); border-radius: 6px; min-width: 0; }
.cfg-editor .field small.tag { color: var(--muted); font-weight: 400; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.cfg-editor fieldset.cfg-secret { border: 1px dashed var(--line); border-radius: 4px; padding: .3rem .5rem; }
.cfg-editor h3 small, .cfg-editor h2 small { font-weight: 400; color: var(--muted); }
.cfg-objs td.cfg-row-actions { white-space: nowrap; vertical-align: top; }
.cfg-objs details.cfg-edit { display: inline-block; }
.cfg-objs details.cfg-edit[open] { display: block; min-width: 28rem; white-space: normal; }
.cfg-objs details.cfg-edit summary, .cfg-add summary { cursor: pointer; color: var(--accent); }
.cfg-add { margin: .4rem 0 1rem; }
.cfg-add[open] { border: 1px solid var(--line); border-radius: 4px; padding: .4rem .8rem; }
.cfg-add summary { font-weight: 600; }
.cfg-search { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.cfg-search .field { flex: 1 1 20rem; }
.cfg-settings { list-style: none; padding: 0; margin: .4rem 0; }
.cfg-settings > li { border-top: 1px solid var(--line); padding: .5rem 0; }
.cfg-settings p.message { margin: .2rem 0; }
.cfg-setting-form { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; margin-top: .3rem; }
.cfg-lock { font-style: italic; }
.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; }

/* Host shell (H-1) */
.hostshell-term { height: 70vh; min-height: 20rem; background: #000; padding: 0.25rem; }
form[data-host-shell] button.small { font-size: .75rem; padding: .05rem .4rem; }
/* the new-platform wizard (wizard design R3.3) */
.error-list button.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.wiz-nav { display: flex; flex-wrap: wrap; gap: .5em; align-items: center; margin-top: 1em; }

/* Admin > Policy (docs/policy-editor-design.md). */
main:has(> .pol), main:has(.pol) { max-width: 1640px; }
/* header: title, hub name, status chips */
.pol .pol-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); margin: 0 0 var(--sp-4); }
.pol .pol-title h1 { margin: 0; }
.pol .pol-chips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); list-style: none; margin: 0 0 0 auto; padding: 0; font-size: var(--fs-sm); }
.pol .pol-chips li { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-1) 2px var(--sp-3); min-height: var(--control-h-sm); border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); }
.pol .pol-chips li:has(> .pol-chip-btn:only-child) { padding: 2px var(--sp-1); }
.pol .pol-chip-k { color: var(--fg-muted); }
.pol .pol-chip-v { padding-right: var(--sp-2); }
.pol .pol-chip-r { color: var(--fg-muted); padding-right: var(--sp-2); font-style: italic; }
.pol button.pol-chip-btn { min-height: 24px; min-width: 24px; height: auto; cursor: pointer; border: 0; font: inherit; font-size: var(--fs-xs); line-height: 1.6; }
/* two panes: sticky section nav, then the cards */
.pol .pol-layout { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
.pol .pol-nav { position: sticky; top: var(--sp-4); max-height: calc(100vh - 2 * var(--sp-4)); overflow: auto; }
.pol .pol-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pol .pol-nav a { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); padding: 6px var(--sp-3); border-radius: var(--r-md); color: var(--fg-muted); text-decoration: none; font-size: var(--fs-sm); line-height: 1.3; border-left: 3px solid transparent; }
.pol .pol-nav a:hover { background: var(--surface); color: var(--fg); }
.pol .pol-nav a[aria-current] { background: var(--surface); color: var(--fg); font-weight: 600; border-left-color: var(--accent); box-shadow: 0 0 0 1px var(--line); }
.pol .pol-nav .tab-count { flex: none; font-weight: 500; }
.pol .pol-nav-lock { flex: none; font-size: 10px; filter: grayscale(1); opacity: .7; }
.pol .pol-main { min-width: 0; }
.pol .pol-main > .card { scroll-margin-top: var(--sp-4); }
/* section card head */
.pol .pol-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.pol .pol-head h2 { margin: 0; font-size: var(--fs-md); }
.pol .pol-head .pol-edit { margin-left: auto; }
.pol .pol-sub { color: var(--fg-muted); font-size: var(--fs-sm); font-weight: 400; }
.pol .pol-intro { margin: calc(-1 * var(--sp-2)) 0 var(--sp-4); color: var(--fg-muted); font-size: var(--fs-sm); max-width: 90ch; }
/* read view: a dense grid of field tiles */
.pol dl.pol-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0 var(--sp-5); margin: 0; }
.pol .pol-f { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: var(--sp-2) 0; border-top: 1px solid var(--line); }
.pol .pol-f dt { display: flex; align-items: center; gap: var(--sp-2); color: var(--fg-muted); font-size: var(--fs-sm); }
.pol .pol-f dt .pol-src { margin-left: auto; flex: none; }
.pol .pol-f dd { margin: 0; min-width: 0; }
.pol .pol-v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--sp-2); font-weight: 600; overflow-wrap: anywhere; }
.pol .pol-f.unset .pol-v { font-weight: 400; color: var(--fg-faint); }
.pol .pol-default { font-style: italic; }
.pol .pol-def-hint { font-weight: 400; color: var(--fg-faint); font-size: var(--fs-xs); }
.pol .pol-f.multi .pol-v { display: block; }
.pol .pol-yaml summary { cursor: pointer; font-weight: 500; color: var(--accent); font-size: var(--fs-sm); }
.pol .pol-yaml pre { margin: var(--sp-1) 0 0; padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border-radius: var(--r-sm); font-weight: 400; max-height: 16rem; overflow: auto; }
.pol .pol-path, .pol .pol-diff code.fs-sm { font-family: var(--mono); font-size: var(--fs-xs); color: var(--fg-faint); overflow-wrap: anywhere; }
.pol .pol-label { color: var(--fg); }
.pol button.pol-lock { width: 24px; height: 24px; min-width: 24px; min-height: 24px; font-size: 10px; filter: grayscale(1); }
.pol .pol-more { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); }
.pol .pol-more summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.pol .pol-more p { margin: var(--sp-2) 0 0; color: var(--fg-muted); max-width: 100ch; }
/* stat tiles (AI Assist spend, identity status) */
.pol .pol-sub-block { margin: var(--sp-4) 0 0; padding: var(--sp-3) 0 0; border-top: 1px solid var(--line); }
.pol .pol-sub-block h3 { display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-2); font-size: var(--fs-base); }
.pol .pol-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.pol .pol-stats > div { display: flex; flex-direction: column; gap: 2px; padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); min-width: 0; }
.pol .pol-stats > div.wide { grid-column: span 2; }
.pol .pol-stats dt, .pol .pol-stat-k { color: var(--fg-muted); font-size: var(--fs-xs); }
.pol .pol-stats dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; font-size: var(--fs-sm); }
.pol .pol-stat-v { font-size: var(--fs-md); font-weight: 600; }
.pol .pol-idstatus { margin: 0 0 var(--sp-3); }
/* edit view: label and help left, the control right */
.pol .pol-form, .pol .pol-revert > form { display: block; margin: 0; }
.pol .pol-fields { display: grid; }
.pol .pol-field { display: grid; grid-template-columns: minmax(12rem, 22rem) minmax(0, 1fr); gap: var(--sp-1) var(--sp-5); padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.pol .pol-fl { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pol .pol-fl label { font-weight: 500; font-size: var(--fs-sm); }
.pol .pol-help { color: var(--fg-muted); font-size: var(--fs-xs); line-height: 1.4; }
.pol .pol-fc { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; max-width: 40rem; }
.pol .pol-fc > textarea, .pol .pol-fc > input, .pol .pol-fc > select { width: 100%; box-sizing: border-box; }
.pol .pol-field textarea { font-family: var(--mono); font-size: var(--fs-sm); }
.pol .pol-field.has-error input, .pol .pol-field.has-error textarea, .pol .pol-field.has-error select { border-color: var(--bad); }
.pol .pol-ro { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-2); padding: var(--sp-2) var(--sp-3); background: var(--surface-2); border-radius: var(--r-md); }
.pol .pol-ro-v { font-weight: 600; overflow-wrap: anywhere; white-space: pre-wrap; }
.pol .pol-ro small { flex-basis: 100%; }
.pol .pol-map-table input, .pol .pol-map-table select { width: 100%; min-width: 6rem; }
.pol .pol-map-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-2) 0; }
.pol .pol-guided { margin: 0 0 var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-2) var(--sp-4); background: var(--surface-2); }
.pol .pol-guided ol { margin: var(--sp-1) 0; padding-left: var(--sp-5); display: grid; gap: var(--sp-1); }
/* the Check bar, styled like the wizards' footer (not sticky: it would cover the check result's Save) */
.pol .pol-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-4) calc(-1 * var(--sp-5)) calc(-1 * var(--sp-4));
  padding: var(--sp-3) var(--sp-5); background: var(--surface); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.pol .pol-actions .gap { flex: 1; }
.pol .pol-actions a.button { margin: 0; }
/* the check result */
.pol .pol-check { margin: var(--sp-4) 0 0; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); display: grid; gap: var(--sp-2); }
.pol .pol-check h3 { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-1) 0 0; font-size: var(--fs-base); }
.pol .pol-check > .alert { margin: 0; }
.pol .pol-discovery ul { margin: 0; padding-left: 1.2rem; overflow-wrap: anywhere; }
.pol .pol-notes { margin: 0; padding-left: 1.2rem; }
.pol .pol-notes li.pol-note-warn { color: var(--warn); } .pol .pol-notes li.pol-note-block { color: var(--bad); }
.pol .pol-reason { display: grid; grid-template-columns: minmax(12rem, 22rem) minmax(0, 32rem); align-items: center; gap: var(--sp-1) var(--sp-5); font-size: var(--fs-sm); font-weight: 500; }
.pol .pol-reason input { width: 100%; box-sizing: border-box; }
.pol .pol-save { display: flex; gap: var(--sp-2); }
/* tables: revert, check diff, history */
.pol .pol-table td { height: auto; }
.pol .pol-table td.pol-tick { width: 2rem; }
.pol pre.pol-val { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: var(--fs-sm); }
.pol .pol-old { color: var(--bad); } .pol .pol-new { color: var(--ok); }
.pol tr.pol-changed { background: var(--warn-wash); }
.pol .pol-history td { font-size: var(--fs-sm); vertical-align: middle; }
.pol .pol-history time, .pol .pol-history td.nowrap { white-space: nowrap; }
.pol .pol-hsec { color: var(--fg-muted); margin-right: var(--sp-2); }
.pol .pol-changes { display: inline-flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; vertical-align: middle; }
.pol .pol-changes code { font-family: var(--mono); font-size: var(--fs-xs); padding: 0 var(--sp-1); border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.pol .pol-history td.actions .button { margin: 0; }
@media (max-width: 900px) {
  .pol .pol-layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); }
  .pol .pol-nav { position: static; max-height: none; overflow: visible; }
  .pol .pol-nav ul { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
  .pol .pol-nav a { border-left: 0; padding: 4px var(--sp-2); border: 1px solid var(--line); background: var(--surface); }
  .pol .pol-nav a[aria-current] { box-shadow: none; border-color: var(--accent); }
  .pol .pol-chips { margin-left: 0; }
  .pol .pol-field, .pol .pol-reason { grid-template-columns: minmax(0, 1fr); }
  .pol .pol-table { display: block; overflow-x: auto; position: relative; }
  .pol .pol-history td:not(:nth-child(5)) { white-space: nowrap; }
  .pol .pol-history td:nth-child(5) { min-width: 10rem; }
  .pol .pol-stats > div.wide { grid-column: 1 / -1; }
}

/* clipboard.js: the off-screen textarea for the execCommand fallback, and the selectable field of last resort. */
.copy-offscreen { position: fixed; top: 0; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.copy-manual input { width: 22rem; max-width: 60vw; font-family: monospace; }
.copy-manual small { color: var(--muted); }
/* You > Preferences */
.prefs { max-width: 720px; }
.prefs-home { border: 0; padding: 0; margin: 0 0 var(--sp-3); }
.prefs-home legend { font-weight: 600; margin-bottom: var(--sp-2); }
.prefs-tiles { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.prefs-tile { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; white-space: nowrap; }
.prefs-tile:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
/* Wizard step 1: Quick start tiles (the old /new); the package ending's panel as the step's action */
.wizk-quick { margin: 0 0 var(--sp-3); }
.quick-group { margin: 0 0 var(--sp-2); }
.quick-head { display: flex; align-items: center; gap: 6px; margin: var(--sp-2) 0 6px; font-size: .85rem; font-weight: 600; color: var(--fg-muted); text-transform: uppercase; letter-spacing: .03em; }
.quick-head .nav-ic { width: 16px; height: 16px; }
.quick-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.quick-tile { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-sizing: border-box; min-width: 0; }
.quick-tile:hover, .quick-tile:focus-within { border-color: var(--accent); background: var(--accent-wash); }
.quick-main { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; align-content: start; padding: 8px 10px 0; color: var(--fg); text-decoration: none; flex: 1; overflow-wrap: anywhere; }
.quick-main:last-child { padding-bottom: 8px; }
.quick-main .quick-title { font-weight: 500; }
.quick-main small { grid-column: 2; color: var(--fg-muted); }
.quick-clouds { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 8px 34px; }
.quick-cloud { font-size: .75rem; line-height: 1.4; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--fg-muted); text-decoration: none; background: var(--surface); }
.quick-cloud.is-primary { border-color: var(--accent); color: var(--accent); }
.quick-cloud:hover, .quick-cloud:focus-visible { border-color: var(--accent); color: var(--fg); }
.quick-cloud { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.quick-cloud.is-pkg { border-style: dashed; }
.quick-cloud .qc-ic { width: 10px; height: 10px; flex: none; }
.quick-cloud.static { cursor: default; }
.quick-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 6px; color: var(--fg-muted); font-size: .75rem; }
.quick-legend .quick-cloud + .quick-cloud, .quick-legend .quick-cloud:not(:first-child) { margin-left: 8px; }
.wizk-quick-or { margin: var(--sp-3) 0 0; color: var(--fg-muted); font-size: .9rem; }
.wizk-export.primary { border: 1px solid var(--accent); border-radius: 8px; padding: var(--sp-3); margin-bottom: var(--sp-3); }
/* Hand-off buttons (docs/navigation.md): Deploy / Package on an architecture, Deploy here on a target */
.title-row:has(.title-acts) { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2); }
.title-row .title-acts { margin-left: auto; display: inline-flex; gap: var(--sp-2); align-items: center; }
.tg-card-acts { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin: var(--sp-2) 0 0; }

/* Platform page (navigation changes 11-12): the one tab bar, the ready card and Share. */
.tabs.ptabs { margin-bottom: .8rem; }
.tabs.ptabs .tab-off { opacity: .45; cursor: not-allowed; padding: .35rem .7rem; align-self: center; }
.ready-card .title-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ready-card .title-row h2 { margin: 0; }
.ready-acts { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .4rem 0 0; }
.ready-acts .reveal { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
#share-dialog textarea { width: 100%; font-family: var(--mono, monospace); font-size: .85rem; }
#share-dialog h4 { margin: .8rem 0 .2rem; }
[data-package-prod] .title-row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
[data-package-prod] .title-row h2 { margin: 0; }

/* Wizard: Purpose & limits (navigation change 12). */
.wizk-limits { display: grid; gap: .8rem; }
.lease-slider input[type=range] { width: 100%; accent-color: var(--accent); }
.lease-stops { display: flex; justify-content: space-between; gap: .3rem; list-style: none; margin: 0; padding: 0; font-size: .8rem; color: var(--muted, #666); flex-wrap: wrap; }
.lease-stops li.on { color: var(--fg, inherit); font-weight: 700; }

/* Wizard Package step and Design > Packages (navigation change 13). */
.pkg-preview { display: grid; grid-template-columns: minmax(12rem, 1fr) 2fr; gap: .8rem; margin-top: .6rem; }
@media (max-width: 760px) { .pkg-preview { grid-template-columns: 1fr; } }
.pkg-tree ul { list-style: none; margin: .3rem 0 0; padding: 0; font-family: var(--mono, monospace); font-size: .8rem; max-height: 22rem; overflow: auto; }
.pkg-tree li { padding: .05rem 0; overflow-wrap: anywhere; }
.pkg-tree li.dir { font-weight: 700; }
.pkg-tree li.d1 { padding-left: 1rem; } .pkg-tree li.d2 { padding-left: 2rem; } .pkg-tree li.d3 { padding-left: 3rem; } .pkg-tree li.d4 { padding-left: 4rem; }
.pkg-readme pre { max-height: 22rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; margin: .3rem 0 0; }
.pkg-group h2 { margin-top: 0; }
.pkg-chain { font-size: 1rem; margin: .8rem 0 .3rem; }
.pkg-diff ul { margin: .2rem 0 0; padding-left: 1rem; font-size: .8rem; }
.pkg-diff code { overflow-wrap: anywhere; }

/* Solution as the engagement (navigation change 14): a draft's, platform's or package's chip back to its solution. */
.sol-label { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px 1px 6px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--accent-wash); color: var(--fg); font-size: .82rem; font-weight: 500; line-height: 1.5;
  text-decoration: none; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
.sol-label:hover { border-color: var(--accent); }
.sol-label .nav-ic { width: 14px; height: 14px; color: var(--accent); }
.tabs.ptabs .sol-label { margin-left: auto; align-self: center; }
a.sol-links-cell { text-decoration: none; color: inherit; }

/* Proxmox connection: the VM id range on one row. */
.pve-range { display: flex; align-items: center; gap: .4rem; }
.pve-range input { width: 8.5rem; min-width: 0; }

/* Platform page: the RA overview drawing fits its card (the SVG has a large natural size); click opens it full size. */
.ra-drawing { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; margin: 0 auto; object-fit: contain; }

/* Admin > Install sources (IS7b): one dense row per Kasm version, the artifact grid, the Egress tab's form. Labels wrap,
   never ellipsis. */
.src-head { gap: var(--sp-2); flex-wrap: wrap; align-items: center; position: relative; }
.src-lede { margin: 0 0 var(--sp-2); max-width: 110ch; }
.src-offline { position: static; }
.src-offline > summary { list-style: none; cursor: pointer; }
.src-offline > summary::-webkit-details-marker { display: none; }
.src-offline-body { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-width: 100%; box-sizing: border-box; padding: var(--sp-2) var(--sp-3);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.src-cmds td, .src-cmds th { height: auto; padding: .2rem .4rem; }
.src-cmds code { font-size: var(--fs-xs); overflow-wrap: anywhere; }
table.src-list th, table.src-list td { padding: .3rem .45rem; height: auto; vertical-align: middle; }
table.src-list tr.src-msg td { padding-top: 0; border-bottom: 1px solid var(--line); }
table.src-list tr.src-main td, table.src-list tr.src-main th { border-bottom: 0; }
table.src-list .src-seg { display: inline-flex; flex-direction: row; flex-wrap: nowrap; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: var(--surface-2); }
table.src-list .src-seg > label { flex-direction: row; min-height: 0; position: relative; padding: 2px var(--sp-2); border-radius: calc(var(--r-md) - 2px); font-weight: 400;
  color: var(--fg-muted); cursor: pointer; white-space: nowrap; }
.src-seg > label:has(input:checked) { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 1px var(--line-strong); }
.src-seg > label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 1px; }
.src-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.src-pick[hidden], .src-opts[hidden] { display: none; }
.src-pick { display: flex; align-items: center; gap: .1rem .3rem; flex-wrap: wrap; }
.src-pick select { min-height: var(--control-h-sm); font-size: var(--fs-sm); }
.src-pick select { max-width: 22rem; }
.src-acts { white-space: nowrap; text-align: right; }
.src-more > td { background: var(--surface-2); }
.src-filters select, .src-filters input, .egress-form select, .egress-form input[type=search] { min-height: var(--control-h-sm); font-size: var(--fs-sm); }
.src-opts, .src-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: flex-end; margin: 0 0 var(--sp-2); }
.src-opts label { font-size: var(--fs-xs); }
.src-floating { margin: 0 0 var(--sp-2); }
.src-chips { display: flex; flex-wrap: wrap; gap: .3rem .8rem; list-style: none; margin: .2rem 0 0; padding: 0; font-size: var(--fs-xs); }
table.src-grid { font-size: var(--fs-xs); }
table.src-grid th, table.src-grid td { padding: .15rem .35rem; height: auto; vertical-align: top; }
.src-ref { font-size: var(--fs-xs); overflow-wrap: anywhere; word-break: break-all; }
.src-dg { font-family: var(--mono); font-size: var(--fs-xs); }
.src-kind { display: inline-block; min-width: 3.4em; padding: 0 .3em; border-radius: var(--r-sm); text-align: center; font: 600 10px/1.6 var(--mono);
  color: var(--fg); background: var(--off-wash); }
.src-kind.k-image { color: var(--info); background: var(--info-wash); }
.src-kind.k-chart { color: var(--accent); background: var(--accent-wash); }
.src-kind.k-file, .src-kind.k-blob { color: var(--ok); background: var(--ok-wash); }
.src-kind.k-terraformProvider { color: var(--warn); background: var(--warn-wash); }
.egress-form { display: flex; flex-direction: column; align-items: stretch; gap: var(--sp-2); margin: 0 0 var(--sp-3); }
.egress-line { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: flex-end; justify-content: flex-start; }
[data-egress-expand], [data-is-expand] { white-space: nowrap; }
table.egress-list td { padding-top: .3rem; padding-bottom: .3rem; height: auto; }
.egress-line[hidden] { display: none; }
td.egress-reach { min-width: 7rem; }
.egress-reach-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem; line-height: 1.3; }
.egress-modes { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.egress-mode { flex: 1 1 16rem; padding: .3rem .5rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.egress-mode:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.egress-chk { display: flex; align-items: center; gap: .3rem; font-weight: 400; }
.src-cat { display: inline-block; padding: 0 .35em; border-radius: var(--r-sm); font-size: var(--fs-xs); font-weight: 400; color: var(--muted); border: 1px solid var(--line); text-decoration: none; white-space: nowrap; }
.src-cat.hub { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.src-cat.bad { color: var(--bad); border-color: var(--bad); }
.src-pins { margin: 0 0 var(--sp-2); }
.src-pins-head { display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
table.src-pin-grid { font-size: var(--fs-xs); margin-top: .2rem; }
table.src-pin-grid th, table.src-pin-grid td { padding: .15rem .35rem; height: auto; vertical-align: middle; }
table.src-pin-grid select, table.src-pin-grid input { min-height: var(--control-h-sm); font-size: var(--fs-xs); }
table.src-pin-grid select[hidden], table.src-pin-grid input[hidden] { display: none; }
.src-seg > label.off { opacity: .45; }
.src-hist > summary { cursor: pointer; margin-top: .3rem; }
.cat-head { gap: var(--sp-2); flex-wrap: wrap; align-items: center; }
.cat-head form.inline, .cat-save { display: inline; }
.cat-start { margin: 0 0 var(--sp-3); }
.cat-seg, .cat-tabs { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r-md); }
.cat-seg > button, .cat-tabs > button { min-height: var(--control-h-sm); padding: 0 var(--sp-2); font-size: var(--fs-sm); background: none; border: 0; color: var(--muted); }
.cat-seg > button[aria-selected=true], .cat-tabs > button[aria-selected=true] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 1px var(--line-strong); }
.cat-pane { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: flex-end; margin-top: var(--sp-2); }
.cat-pane[hidden] { display: none; }
.cat-paste { flex: 1 1 30rem; font: var(--fs-xs)/1.3 var(--mono); }
.cat-gen { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: flex-end; }
.cat-gen label { font-size: var(--fs-xs); }
.cat-gen input, .cat-gen select { min-height: var(--control-h-sm); font-size: var(--fs-sm); }
.cat-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .3rem .7rem; align-items: center; padding: .3rem 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.cat-bar .cat-save { margin-left: auto; }
.cat-problems { margin: .3rem 0; padding-left: 1.2rem; font-size: var(--fs-xs); color: var(--bad); columns: 2 32rem; }
.cat-grid input, .cat-grid select { min-height: 1.6rem; font-size: var(--fs-xs); padding: 0 .25rem; }
.cat-grid input.src-ref { width: 100%; min-width: 18rem; }
.cat-json { width: 100%; min-height: 60vh; font: var(--fs-xs)/1.35 var(--mono); resize: vertical; }
/* Admin > Pricing (pricing.html) */
.rc-h { font-size: 1rem; margin: 0 0 var(--sp-2); }
.rc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: var(--sp-2) var(--sp-3); margin: var(--sp-2) 0; }
.rc-f { display: flex; flex-direction: column; gap: .15rem; font-size: var(--fs-sm); font-weight: 600; }
.rc-f input { font-weight: 400; }
.rc-wide { grid-column: 1 / -1; }
.rc-acts { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.rc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.rc-table th, .rc-table td { text-align: left; padding: .2rem .5rem; border-bottom: 1px solid var(--line); }

/* Installer media channels (_media_channel.html): the Pins page's channel strip, the stale re-pin diff, the pick. */
.mc-channels { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: baseline; margin: .3rem 0 .4rem; }
.mc-ch code { font-size: .8rem; }
.mc-repin { margin: .4rem 0; }
.mc-repin p { margin: .2rem 0; }
.mc-diff { width: auto; margin: .2rem 0; }
.mc-diff th, .mc-diff td { padding: .15rem .5rem; }
.mc-diff code { font-size: .78rem; word-break: break-all; }
.mc-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .3rem; }
.mc-pick { border: 0; padding: 0; margin: .3rem 0; display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; }
.mc-pick legend { float: left; padding: 0; margin-right: .5rem; font-weight: 600; }
.mc-media { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: baseline; }
