/* Kilby dashboard. Minimal and flat: white surfaces, hairlines, black actions,
   and the Neuramorphic lime as the one accent. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/static/inter-latin.woff2") format("woff2");
}

:root {
  --brand: #b1e225;
  --brand-hover: #a4d41c;
  --brand-edge: #9dcb1b;
  --brand-soft: #f4fadc;
  --brand-ring: rgba(177, 226, 37, 0.5);
  --green-ink: #3f5c00;      /* brand green dark enough to read on white */

  --ink: #0a0a0a;
  --ink-2: #2e2e2b;
  --muted: #6f6e68;
  --faint: #a3a199;
  --line: #e9e7e1;
  --line-strong: #d9d6cf;
  --bg: #ffffff;
  --surface: #ffffff;
  --tint: #faf9f7;
  --hover: #f4f3ef;

  --ok-bg: #edf8cf;   --ok-ink: #3f5c00;
  --busy-bg: #fff3d1; --busy-ink: #835600;
  --bad-bg: #fde9e5;  --bad-ink: #a1271a;
  --idle-bg: #f0efea; --idle-ink: #55544f;

  --radius: 8px;
  --radius-sm: 6px;
  --top: 52px;    /* height of the top bar */
  --rail: 56px;   /* width of the icon rail */
  --gutter: clamp(28px, 3.2vw, 48px);   /* side padding of the page and of the sticky bars */
  --page-max: 2400px;                   /* the page is centered past this width */
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.022em; font-weight: 600; margin: 0; }
h2 { font-size: 16px; letter-spacing: -0.01em; font-weight: 600; margin: 0; }
h3 { font-size: 15px; letter-spacing: -0.005em; font-weight: 600; margin: 0; }
p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.muted { color: var(--muted); }
.mono, code { font-family: var(--mono); font-size: 12.5px; }
code { background: var(--hover); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
kbd { font: 500 11px var(--mono); color: var(--muted); background: var(--hover); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.strong { font-weight: 600; }
.right { text-align: right; }
.small { font-size: 13px; }
.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 13px;
  font: inherit; font-size: 13.5px; font-weight: 550; white-space: nowrap; cursor: pointer; text-decoration: none;
  color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: background-color .12s, border-color .12s;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn.primary, .btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover, .btn.dark:hover { background: #2a2a27; border-color: #2a2a27; }
.btn.subtle { background: transparent; border-color: transparent; color: var(--muted); }
.btn.subtle:hover { background: var(--hover); color: var(--ink); }
.btn.danger { color: var(--bad-ink); border-color: #efc4bc; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 40px; padding: 0 16px; font-size: 14.5px; }
.btn.block { width: 100%; }
.btn .i { width: 15px; height: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.danger:disabled:hover { background: var(--surface); }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.icon-btn .i { width: 15px; height: 15px; }
.icon-btn.done { color: var(--green-ink); }

/* ---------------------------------------------------------------- Form controls */
label { display: grid; gap: 6px; font-size: 13px; font-weight: 550; color: var(--ink-2); }
label small, .help { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.help code { font-size: 12px; }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface); width: 100%;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 11px; height: 36px;
  transition: border-color .12s, box-shadow .12s;
}
select { appearance: none; padding-right: 32px; background-repeat: no-repeat; background-position: right 11px center; background-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f6e68' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
textarea { height: auto; padding: 9px 11px; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { border-color: #c2bfb6; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #86b81a; box-shadow: 0 0 0 3px var(--brand-ring); }

/* A choice between a few options, shown side by side (service type, version, disk size). */
.seg { display: inline-flex; flex-wrap: wrap; width: fit-content; max-width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg label { position: relative; display: block; cursor: pointer; border-left: 1px solid var(--line-strong); margin-left: -1px; }
.seg input { position: absolute; opacity: 0; width: 0; height: 0; }
.seg span { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.seg span .i { width: 15px; height: 15px; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; }
.chip .i { width: 14px; height: 14px; color: var(--muted); }
.chip:hover { border-color: #86b81a; background: var(--brand-soft); color: var(--ink); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; }
.examples { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -10px 0 28px; font-size: 13.5px; color: var(--muted); }

/* ---------------------------------------------------------------- Surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.card-head p { margin-top: 2px; }
.card-body { padding: 18px; }
.card-body.muted { font-size: 14px; }
.card > .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.section { margin-top: 36px; }
.section > h2 { margin-bottom: 12px; }
.fields { display: grid; gap: 14px; }

.flash { display: flex; align-items: flex-start; gap: 9px; border-radius: var(--radius-sm); padding: 9px 13px; margin-bottom: 20px; font-size: 13.5px; border: 1px solid; }
.flash .i { width: 16px; height: 16px; margin-top: 2px; }
.flash.ok { background: var(--ok-bg); border-color: #d5eb9a; color: var(--ok-ink); }
.flash.bad { background: var(--bad-bg); border-color: #f4c9c1; color: var(--bad-ink); }

.banner { display: flex; align-items: center; gap: 14px; padding: 13px 16px; margin-bottom: 28px; border-radius: var(--radius); border: 1px solid #f0dca0; background: #fffaea; }
.banner .ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: #ffecb3; color: var(--busy-ink); }
.banner .txt { display: grid; gap: 1px; flex: 1; min-width: 0; }
.banner .txt span { color: var(--ink-2); font-size: 13.5px; }
.banner form { margin: 0; }

.note { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 22px; padding: 9px 13px; border-radius: var(--radius-sm); border: 1px solid var(--line); font-size: 13.5px; }
.note .i { width: 16px; height: 16px; color: var(--muted); margin-top: 2px; }
.note.warn { background: #fffaea; border-color: #f0dca0; color: var(--ink-2); }
.note.warn .i { color: var(--busy-ink); }
.note.warn b { color: var(--ink); font-weight: 600; }
.note code { background: rgba(10, 10, 10, .06); }
.hint { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Status. The mark in front says the same thing as the colour: a tick, a cross, a spinner, a dash. */
.badge {
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E");
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px 0 6px; border-radius: 4px;
  font-size: 12px; font-weight: 550; white-space: nowrap; vertical-align: middle;
  background: var(--idle-bg); color: var(--idle-ink);
}
.badge::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat; }
.badge.ok { background: var(--ok-bg); color: var(--ok-ink);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.badge.bad { background: var(--bad-bg); color: var(--bad-ink);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }
.badge.busy { background: var(--busy-bg); color: var(--busy-ink); }
.badge.busy::before { -webkit-mask: none; mask: none; background: none; width: 10px; height: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.badge.plain { padding: 0 8px; }
.badge.plain::before { display: none; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; background: var(--hover); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .badge.busy::before { animation: none; } }

/* ---------------------------------------------------------------- Shell: top bar, icon rail, page */
body.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); grid-template-rows: var(--top) minmax(0, 1fr); min-height: 100vh; }

.top { grid-column: 1 / -1; position: sticky; top: 0; z-index: 30; display: flex; align-items: stretch; height: var(--top); background: var(--bg); border-bottom: 1px solid var(--line); }
.top-brand { flex: none; display: grid; place-items: center; width: var(--rail); border-right: 1px solid var(--line); }
.top-brand img { display: block; border-radius: 7px; }
.top-crumb { display: flex; align-items: center; gap: 8px; padding: 0 18px; color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.top-crumb .i { width: 15px; height: 15px; }
.top-fill { flex: 1; }
.top-btn { display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 0 16px; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2); cursor: pointer; text-decoration: none; white-space: nowrap; }
.top-btn:hover, .pop[open] > .top-btn { background: var(--tint); color: var(--ink); }
.top-btn .i { width: 16px; height: 16px; }
.top-btn.icon { width: var(--top); padding: 0; justify-content: center; }
.new-menu, .user-menu, a.top-btn.icon { border-left: 1px solid var(--line); }

/* Menus that open below a button: workspace switcher, "New", account. */
.pop { position: relative; }
.pop > summary { list-style: none; cursor: pointer; user-select: none; }
.pop > summary::-webkit-details-marker { display: none; }
.menu {
  position: absolute; z-index: 40; top: calc(100% + 6px); left: 8px; min-width: 236px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 18px 44px -16px rgba(10, 10, 10, .28), 0 2px 6px rgba(10, 10, 10, .05);
}
.menu.right { left: auto; right: 8px; }
.menu form { margin: 0; }
.menu-label { font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 6px 8px 4px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 9px; border: 0; border-radius: var(--radius-sm); background: none; font: inherit; font-size: 13.5px; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; }
.menu-item:hover { background: var(--hover); text-decoration: none; }
.menu-item.on { font-weight: 600; }
.menu-item .i { width: 15px; height: 15px; color: var(--muted); }
.menu-item .i:last-child { color: var(--green-ink); }
.menu-who { display: grid; gap: 1px; padding: 8px 9px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); line-height: 1.3; }
.menu-who b { font-weight: 600; }
.menu-who small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.menu-new { display: flex; gap: 6px; padding: 8px 3px 2px; margin-top: 6px !important; border-top: 1px solid var(--line); }
.menu-new input { height: 28px; font-size: 13px; padding: 0 8px; }
.grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ws-switch { border-right: 1px solid var(--line); }
.ws-switch > summary { display: flex; align-items: center; gap: 9px; height: 100%; min-width: 196px; max-width: 280px; padding: 0 12px 0 16px; font-weight: 550; }
.ws-switch > summary:hover, .ws-switch[open] > summary { background: var(--tint); }
.ws-switch > summary .i { width: 14px; height: 14px; margin-left: auto; color: var(--faint); }
.ws-avatar { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 5px; background: var(--brand); color: var(--ink); font-weight: 700; font-size: 11.5px; }
.ws-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--brand); font-weight: 650; font-size: 13px; }
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }

.rail { position: sticky; top: var(--top); z-index: 20; height: calc(100vh - var(--top)); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 0; background: var(--bg); border-right: 1px solid var(--line); }
.rail a { position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; }
.rail a:hover { background: var(--hover); color: var(--ink); }
.rail a.on { background: var(--brand-soft); color: var(--green-ink); }
.rail hr { width: 20px; margin: 8px 0; }
.rail .rail-end { margin-top: auto; }
.rail .tip { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 4px 9px; border-radius: 5px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .1s; }
.rail a:hover .tip, .rail a:focus-visible .tip { opacity: 1; }

/* Width model. The page fills everything between the icon rail and the right edge: one
   gutter on each side (--gutter), no column cap below --page-max (only so an ultra-wide monitor
   stays readable; past it the page is centered). Pages then use the width deliberately:
   lists, tables, logs, meters and card grids span it (auto-fit grids add columns as it grows);
   forms keep a "what it is | the control" row whose control stops at a comfortable width, and
   the page puts related cards side by side (.split) or a summary panel next to the form
   (.with-side) once there is room. Running text stays about 70-80 characters wide. */
.main { min-width: 0; }
.page { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 36px var(--gutter) 96px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head .sub { color: var(--muted); margin-top: 6px; font-size: 14.5px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs .i { width: 13px; height: 13px; color: var(--faint); }
.crumbs span { color: var(--ink); font-weight: 500; }

/* Search (Cmd+K) */
.jump { width: min(600px, calc(100vw - 32px)); margin-top: 14vh; padding: 0; border: 0; background: none; color: inherit; }
.jump::backdrop { background: rgba(10, 10, 10, .28); }
.jump-box { background: var(--bg); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: 0 28px 70px -24px rgba(10, 10, 10, .4); overflow: hidden; }
.jump-field { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.jump-field .i { color: var(--faint); }
.jump-field input, .jump-field input:focus { height: 50px; padding: 0; border: 0; box-shadow: none; font-size: 15px; }
.jump-list { max-height: 344px; overflow-y: auto; padding: 6px; }
.jump-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: var(--radius-sm); text-decoration: none; }
.jump-item small { color: var(--muted); font-size: 12.5px; }
.jump-item.on { background: var(--hover); }
.jump-none { padding: 18px 10px; color: var(--muted); }
.jump-foot { display: flex; align-items: center; gap: 5px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.jump-foot kbd:not(:first-child) { margin-left: 8px; }
.jump-foot kbd + kbd { margin-left: 0; }

/* ---------------------------------------------------------------- Usage */
.usage, .stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 36px; }
.stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 28px; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.usage > div, .stats > .stat { display: grid; gap: 8px; padding: 14px 18px 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; }
.usage > div:first-child, .stats > .stat:first-child { border-left: 0; }
.usage-label, .stat-label, th { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.usage-value, .stat-value { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.usage-value small, .stat-value small { font-size: 13px; font-weight: 450; color: var(--muted); letter-spacing: 0; }
.stat-top { display: grid; gap: 8px; }
progress { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 3px; border: 0; border-radius: 2px; background: var(--idle-bg); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--idle-bg); }
progress::-webkit-progress-value { background: var(--brand-edge); }
progress::-moz-progress-bar { background: var(--brand-edge); }
.limits { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.limits b { color: var(--ink); font-weight: 650; }

/* ---------------------------------------------------------------- Lists */
.list-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 8px; }
.filters { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.filters button { height: 34px; padding: 0 12px; border: 0; border-left: 1px solid var(--line-strong); background: var(--bg); font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.filters button:first-child { border-left: 0; }
.filters button:hover { color: var(--ink); }
.filters button.on { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }
.search { position: relative; display: block; flex: 1; min-width: 220px; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); pointer-events: none; }
.search input { height: 34px; padding-left: 34px; }

.table { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; white-space: nowrap; padding: 10px 14px; border-bottom: 1px solid var(--line-strong); }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th:first-child, td:first-child { padding-left: 4px; }
th:last-child, td:last-child { padding-right: 4px; }
tbody tr:hover td { background: var(--tint); }
td form { margin: 0; }
td.nw { white-space: nowrap; }
td .muted { font-size: 13px; }
/* A table is a list, not a box: the card around it disappears and its title sits above. */
.card.table { border: 0; border-radius: 0; }
.card.table > .card-head { padding: 0 0 6px; border-bottom: 0; }

a.name { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; white-space: nowrap; }
a.name .i { width: 16px; height: 16px; color: var(--muted); }
a.name span { text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a.name:hover span { text-decoration-color: var(--ink); }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-main > span { display: grid; min-width: 0; line-height: 1.35; }
.cell-main a { font-weight: 500; }
.cell-main small { font-family: var(--mono); font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 340px; }
.cell-main .tile { width: 18px; height: 18px; border: 0; background: none; color: var(--muted); }
.cell-main .tile .i { width: 16px; height: 16px; }
.ext { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-family: var(--mono); font-size: 12.5px; color: var(--ink-2); }
.ext:hover { color: var(--ink); text-decoration: underline; }
.ext .i { width: 12px; height: 12px; color: var(--faint); }
.more { font-size: 13px; color: var(--muted); text-decoration: none; }
.more:hover { color: var(--ink); text-decoration: underline; }

.tile { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--brand-soft); color: var(--green-ink); border: 1px solid #e3f1b4; }
.tile.lg { width: 40px; height: 40px; border-radius: var(--radius); }
.tile.lg .i { width: 20px; height: 20px; }

.empty { display: grid; gap: 8px; justify-items: start; padding: 40px; border: 1px solid var(--line); border-radius: var(--radius); }
.empty svg.art { width: 52px; height: 52px; }
.empty h2, .empty h3 { font-size: 16px; margin-top: 8px; }
.empty p { max-width: 62ch; color: var(--muted); }
.empty .btn { margin-top: 10px; }
.starts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 760px; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.starts a { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; margin: -1px 0 0 -1px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); text-decoration: none; }
.starts a:hover { background: var(--tint); }
.starts .i { margin-top: 2px; color: var(--green-ink); }
.starts span { display: grid; gap: 1px; }
.starts b { font-weight: 600; }
.starts small { color: var(--muted); font-size: 13px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed li > span:last-child { min-width: 0; }
.feed small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.feed b { font-weight: 600; }
.feed.compact li { padding: 10px 18px; font-size: 13.5px; }
.feed .dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-edge); margin-top: 7px; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people .who { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.people .who b { font-weight: 600; }
.people .who small { color: var(--muted); font-size: 12.5px; }
.people form { margin: 0; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; padding: 18px; }
.inline-form.flush { border-top: 1px solid var(--line); }
.inline-form .grow { overflow: visible; white-space: normal; }

/* ---------------------------------------------------------------- Forms as rows: what it is on the left, the control on the right */
.card.rows { border: 0; border-radius: 0; }
.rows > .row { display: grid; grid-template-columns: minmax(200px, 32%) minmax(0, 1fr); gap: 40px; padding: 20px 0; border-top: 1px solid var(--line); }
.rows > .row:first-of-type { border-top: 0; padding-top: 4px; }
.row .lead { display: grid; gap: 4px; align-content: start; }
.row .lead b { font-weight: 600; }
.row .lead span { font-size: 13.5px; color: var(--muted); }
.row .ctl { display: grid; gap: 10px; min-width: 0; align-content: start; }
.row .ctl.narrow { max-width: 240px; }
/* The action comes first, on the left, where the eye already is. */
.rows > .foot { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 10px; padding: 24px 0 0; margin-top: 4px; border-top: 1px solid var(--line); }
.rows > .foot .muted { margin-left: 6px; }

/* ---------------------------------------------------------------- Service, cron job and database pages */
.svc-head { display: flex; align-items: center; gap: 14px; }
.svc-head h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.svc-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.svc-url { display: flex; align-items: center; gap: 2px; margin: -14px 0 14px 54px; }
.svc-url .ext { font-size: 13px; color: var(--ink); }
.tabs { display: flex; gap: 2px; margin: 0 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.tabs a .i { width: 15px; height: 15px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand-edge); }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.stack { display: grid; gap: 28px; min-width: 0; }
.facts { margin: 0; display: grid; }
.facts > div { display: grid; gap: 3px; padding: 11px 18px; border-top: 1px solid var(--line); min-width: 0; }
.facts > div:first-child { border-top: 0; }
.facts dt { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; }
.facts dd .val { overflow-wrap: anywhere; min-width: 0; }
.facts dd .muted { font-size: 12.5px; }
.facts dd code { background: none; padding: 0; }

.term { background: #0d0f0c; border-radius: var(--radius); overflow: hidden; }
.term-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid #23261f; color: #d7dccb; font-size: 13px; font-weight: 550; }
.term-head .live { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12px; color: #9aa38a; }
.term-head .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
.term-head .live.off::before { background: #6b6a64; animation: none; }
.term-link { color: #9aa38a; font-size: 12px; font-weight: 500; text-decoration: none; }
.term-link:hover { color: var(--brand); }
.term-tools { display: inline-flex; align-items: center; gap: 10px; }
.term-btn { height: 26px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid #3a3f33; background: #1a1d17; color: #e5ead7; font: inherit; font-size: 12px; cursor: pointer; }
.term-btn:hover { border-color: var(--brand); color: var(--brand); }
.logs { margin: 0; padding: 14px 16px; height: 300px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; color: #cfd6bf; white-space: pre-wrap; overflow-wrap: anywhere; }
.logs:focus-visible { outline-offset: -2px; outline-color: var(--brand); }
.logs.short { height: 190px; }
.logs.tall { height: calc(100vh - 330px); min-height: 380px; }
.xterm-box { height: calc(100vh - 340px); min-height: 380px; padding: 12px 6px 8px 14px; background: #0d0f0c; }
.xterm-box .xterm { height: 100%; }
#run-panel .logs { height: 260px; }
#run-name { font-size: 12.5px; color: #9aa38a; font-weight: 500; }
tr[data-run].sel td { background: var(--brand-soft); }
tr[data-run].sel td:first-child { box-shadow: inset 3px 0 0 var(--brand-edge); padding-left: 12px; }

.danger-card { border-color: #f1cfc8; }
.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.danger-row:first-child { border-top: 0; }
.danger-row div { display: grid; gap: 2px; }
.danger-row > div:first-child { flex: 1; min-width: 240px; }
.danger-row span { font-size: 13.5px; color: var(--muted); }
.danger-row form { margin: 0; }
.danger-row .confirm { display: flex; gap: 8px; align-items: center; }
.danger-row .confirm input { width: 200px; height: 34px; font-size: 13px; }

/* Environment editor */
.env { display: grid; gap: 10px; }
.env-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.env-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 8px; padding: 2px 2px 0; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.env-rows { display: grid; gap: 8px; }
.env-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 8px; align-items: center; }
.env-row input { font-size: 13px; }
.secret { position: relative; }
.secret input { padding-right: 38px; }
.secret .icon-btn { position: absolute; right: 4px; top: 4px; }
.icon-btn[data-env-remove]:hover { background: var(--bad-bg); color: var(--bad-ink); }
.env-import { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--tint); }
.env-import textarea { min-height: 96px; }

/* Database connection */
.conn { display: grid; }
.conn-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) 28px; align-items: center; gap: 10px; min-height: 46px; padding: 6px 14px 6px 18px; border-top: 1px solid var(--line); }
.conn-row:first-child { border-top: 0; }
.conn-label { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.conn-row code { background: none; padding: 0; }
.conn-row .secret input { height: 32px; font-size: 12.5px; background: var(--tint); text-overflow: ellipsis; }
.conn-row .secret .icon-btn { top: 2px; }

/* API keys and reference */
.reveal { margin-bottom: 20px; padding: 16px 18px; border-radius: var(--radius); border: 1px solid #d5eb9a; background: var(--brand-soft); display: grid; gap: 8px; }
.reveal-head { display: flex; align-items: center; gap: 8px; color: var(--green-ink); }
.reveal-head b { color: var(--ink); }
.reveal p { font-size: 13.5px; color: var(--ink-2); }
.reveal-key { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--surface); border: 1px solid #d5eb9a; border-radius: var(--radius-sm); }
.reveal-key code { flex: 1; background: none; padding: 0; font-size: 13.5px; }
pre.code { margin: 10px 0 0; padding: 14px 16px; border-radius: var(--radius); background: #0d0f0c; color: #dfe6cf; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; overflow-x: auto; white-space: pre; }
.doc { display: grid; gap: 28px; }
.prose { display: grid; gap: 10px; font-size: 14.5px; }
.prose p { color: var(--ink-2); }
.prose pre.code { margin: 0; }
.verb { display: inline-block; min-width: 56px; text-align: center; font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--idle-bg); color: var(--idle-ink); }
.verb.get { background: var(--ok-bg); color: var(--ok-ink); }
.verb.post { background: #e6efff; color: #1d4aa8; }
.verb.patch { background: var(--busy-bg); color: var(--busy-ink); }
.verb.del { background: var(--bad-bg); color: var(--bad-ink); }

/* ---------------------------------------------------------------- Signed-out pages */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { border-radius: 8px; display: block; }
.brand-text { display: grid; line-height: 1.1; }
.brand-text b { font-size: 17px; font-weight: 700; letter-spacing: -0.03em; }
.brand-text small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.guest-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.guest-pane { display: flex; flex-direction: column; padding: 28px 40px; }
.guest-main { flex: 1; display: grid; align-content: center; width: 100%; max-width: 380px; margin: 0 auto; padding: 32px 0; }
.guest-foot { font-size: 12.5px; color: var(--faint); }
.guest-foot a { color: var(--muted); }
.legal-note { font-size: 12.5px; color: var(--faint); line-height: 1.5; margin: 0; }
.legal-note a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.app-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter) 32px; font-size: 12.5px; color: var(--faint); }
.app-foot a { color: var(--muted); }
.app-foot a:hover { color: var(--ink); }
.auth { display: grid; gap: 22px; }
.auth-head { display: grid; gap: 8px; }
.auth-head h1 { font-size: 28px; letter-spacing: -0.03em; }
.auth-head p { color: var(--muted); font-size: 15px; }
.auth form { display: grid; gap: 16px; }
.auth input { height: 40px; }
.auth .alt { color: var(--muted); }
.auth .alt a { color: var(--ink); font-weight: 550; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.label-row a { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.guest-art { position: relative; overflow: hidden; background: var(--ink); color: #fff; display: grid; align-content: center; gap: 22px; padding: 56px; }
.guest-art::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: linear-gradient(#1c1c1a 1px, transparent 1px), linear-gradient(90deg, #1c1c1a 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(ellipse at 30% 40%, #000 10%, transparent 72%); }
.guest-art > * { position: relative; }
.guest-art .bars { width: 120px; height: 120px; margin-left: -16px; }
.art-title { font-size: 34px; line-height: 1.12; letter-spacing: -0.035em; font-weight: 600; max-width: 14ch; }
.art-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: #c9c7bf; font-size: 15px; }
.art-list li { display: flex; gap: 12px; align-items: baseline; }
.art-list li::before { content: ""; flex: none; width: 5px; height: 13px; border-radius: 2px; background: var(--brand); transform: translateY(2px); }
.message { display: grid; gap: 14px; justify-items: start; }
.message p { color: var(--muted); font-size: 15px; max-width: 52ch; }
body.app .message { margin-top: 10vh; }

/* ---------------------------------------------------------------- Small screens */
@media (max-width: 860px) {
  body.app { display: block; }
  .top-crumb, .top-btn[data-jump-open] span, .top-btn[data-jump-open] kbd, .new-menu .top-btn span { display: none; }
  .top-btn { padding: 0 13px; }
  .ws-switch > summary { min-width: 0; max-width: 170px; padding: 0 10px 0 12px; }
  .rail { position: static; height: auto; flex-direction: row; justify-content: flex-start; gap: 4px; padding: 6px 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .rail hr { display: none; }
  .rail a { display: inline-flex; flex: none; gap: 7px; width: auto; padding: 0 10px; }
  .rail .rail-end { margin: 0; }
  .rail .tip { position: static; transform: none; padding: 0; background: none; color: inherit; font-size: 13px; opacity: 1; }
  .page { padding: 24px 18px 72px; }
  .usage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage > div:nth-child(odd) { border-left: 0; }
  .usage > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .svc-url { margin-left: 0; }
  .guest-grid { grid-template-columns: minmax(0, 1fr); }
  .guest-art { display: none; }
  .guest-pane { padding: 22px 20px; }
}
@media (max-width: 700px) {
  .stats, .stats.two, .starts { grid-template-columns: minmax(0, 1fr); }
  .stats > .stat { border-left: 0; border-top: 1px solid var(--line); }
  .stats > .stat:first-child { border-top: 0; }
  .rows > .row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .row .ctl.narrow { max-width: none; }
  .env-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .env-row .secret { grid-column: 1; }
  .env-cols { display: none; }
  .inline-form { flex-direction: column; align-items: stretch; }
  .conn-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .conn-label { grid-column: 1 / -1; }
}

/* === security === */
/* Two-factor setup: numbered steps, the QR code and the key next to it. */
.setup { display: grid; }
.setup-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding: 22px 22px 24px; border-top: 1px solid var(--line); margin: 0; }
.setup-step:first-child { border-top: 0; }
.step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--green-ink); border: 1px solid #e3f1b4; font-weight: 650; font-size: 13px; }
.setup-body { display: grid; gap: 8px; min-width: 0; }
.setup-body > p { max-width: 64ch; }
.qr-row { display: flex; align-items: flex-start; gap: 28px; flex-wrap: wrap; margin-top: 8px; }
.qr-box { flex: none; width: 196px; height: 196px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.qr { display: block; width: 100%; height: 100%; }
.qr-key { display: grid; gap: 8px; justify-items: start; align-content: start; padding-top: 4px; min-width: 0; }
.totp-key { display: inline-block; font-size: 14px; letter-spacing: .06em; padding: 6px 9px; line-height: 1.6; word-spacing: .3em; }
.inline-code { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.inline-code input { width: 160px; }
input.otp { font-size: 17px; letter-spacing: .3em; }
input.otp::placeholder { letter-spacing: .3em; }

/* Recovery codes, shown once */
.codes { list-style: none; margin: 4px 0 2px; padding: 12px 14px; display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 36px; background: var(--surface); border: 1px solid #d5eb9a; border-radius: var(--radius-sm); counter-reset: code; }
.codes li { counter-increment: code; display: flex; align-items: baseline; gap: 10px; }
.codes li::before { content: counter(code); width: 16px; text-align: right; font: 500 11px var(--mono); color: var(--faint); }
.codes code { background: none; padding: 0; font-size: 14.5px; letter-spacing: .04em; }

/* Another way to answer: a recovery code at sign-in, a code instead of the password. */
.alt-method { font-size: 13.5px; }
.alt-method > summary { cursor: pointer; color: var(--muted); }
.alt-method > summary:hover { color: var(--ink); }
.alt-method[open] > summary { margin-bottom: 14px; }
.alt-method form { display: grid; gap: 16px; }
.narrow-page { max-width: 400px; margin: 7vh auto 0; }
.narrow-page .tile { margin-bottom: 6px; }

/* Forms with two fields on one row (password and code) */
.row .ctl.two, .danger-row .ctl.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1; min-width: 240px; }
.danger-row .ctl.two label { font-size: 12.5px; }
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ok-ink { color: var(--green-ink) !important; font-family: var(--sans) !important; font-weight: 550; }

/* Audit trail */
.ev-note { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.feed .ev-note { font-size: 13px; }
.pager { display: flex; gap: 8px; margin-top: 16px; }
.audit-filters { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.audit-filters input, .audit-filters select { height: 34px; font-size: 13.5px; }
.audit td { vertical-align: top; }
.cell-who { display: grid; line-height: 1.35; }
.cell-who b { font-weight: 600; }
.cell-who small { color: var(--muted); font-size: 12.5px; }

/* Members and roles */
.role-form { display: flex; gap: 6px; align-items: center; }
.role-form select { width: 128px; height: 30px; font-size: 13px; padding-left: 9px; }
.js .js-hide { display: none; }
.tag.muted-tag { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.roles tr.mine td { background: var(--brand-soft); }
.roles td { vertical-align: top; }
.card-body.flush-top { border-top: 1px solid var(--line); padding-top: 14px; padding-bottom: 16px; }
.danger-row .confirm.wrap { flex-wrap: wrap; flex: 1; justify-content: flex-end; }
.danger-row .confirm.wrap select { width: auto; min-width: 200px; height: 34px; font-size: 13px; }
.row-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }
.role-note { background: var(--tint); }
/* The email field has help text under it: line the role and the button up with the inputs. */
.member-add { align-items: flex-start; }
.member-add > .btn { margin-top: 26px; }

/* API keys: the access choice next to the name */
.field { display: grid; gap: 6px; }
.field-label { font-size: 13px; font-weight: 550; color: var(--ink-2); }
.inline-form .seg span { height: 34px; }
.hint.flush { margin: 8px 0 0; }
.reveal-head .tag { margin-left: 4px; }

/* Environment variables a viewer can see: names only */
.env-names { list-style: none; margin: 0; padding: 0; }
.env-names li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 13.5px; }
.env-names li:first-child { border-top: 0; }

@media (max-width: 860px) {
  .audit-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .setup-step { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 16px; }
  .qr-row { gap: 16px; }
  .codes { grid-template-columns: max-content; }
  .row .ctl.two, .danger-row .ctl.two { grid-template-columns: minmax(0, 1fr); }
  .audit-filters { grid-template-columns: minmax(0, 1fr); }
  .people li { flex-wrap: wrap; }
  .people .who { flex-basis: calc(100% - 60px); }
  .danger-row .confirm.wrap { justify-content: flex-start; }
  .danger-row .confirm.wrap select, .danger-row .confirm.wrap input { width: 100%; }
  .narrow-page { margin-top: 3vh; }
  .member-add > .btn { margin-top: 0; }
}

/* === runtime: registry credentials, health checks, instances, disks === */
/* "Advanced" on the new-service form: a row that opens more rows. */
.rows > details.adv { border-top: 1px solid var(--line); }
.rows > details.adv > summary { display: grid; grid-template-columns: minmax(200px, 32%) minmax(0, 1fr); gap: 40px; align-items: center; padding: 20px 0; list-style: none; cursor: pointer; }
.rows > details.adv > summary::-webkit-details-marker { display: none; }
.rows > details.adv > summary .lead { display: grid; gap: 4px; }
.rows > details.adv > summary .lead b { font-weight: 600; }
.rows > details.adv > summary .lead span { font-size: 13.5px; color: var(--muted); }
.adv-more { justify-self: start; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); color: var(--muted); }
.adv-more .i { width: 15px; height: 15px; transition: transform .15s; }
details.adv[open] .adv-more .i { transform: rotate(90deg); }
.rows > details.adv > summary:hover .adv-more { background: var(--hover); color: var(--ink); }
.rows > details.adv > .row { display: grid; grid-template-columns: minmax(200px, 32%) minmax(0, 1fr); gap: 40px; padding: 20px 0; border-top: 1px solid var(--line); }

.scale-fields, .disk-fields { display: flex; gap: 12px; flex-wrap: wrap; }
.scale-fields label, .disk-fields label { width: 132px; }
.disk-fields label:first-child { width: 260px; max-width: 100%; }
.unit { position: relative; display: block; }
.unit input { padding-right: 38px; }
.unit > span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; }
label.check { display: inline-flex; align-items: center; gap: 9px; width: fit-content; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
label.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
.note.small-note { margin: 0; font-size: 13px; }
/* A disk fixes the instance count: the controls stay visible but read as locked. */
[data-scaling] input:disabled { background: var(--tint); color: var(--muted); cursor: not-allowed; }
[data-scaling] .seg input:disabled + span { opacity: .55; cursor: not-allowed; }

/* Overview: instances as dots, one per instance. */
.facts dd.inst { flex-wrap: wrap; }
.facts dd.inst b { font-weight: 650; }
.inst-dots { display: inline-flex; gap: 4px; margin-left: 4px; }
.inst-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--brand-edge); }
.inst-dots i.on { background: var(--brand-edge); }
.inst-dots i.off { border-color: var(--line-strong); }
.facts > div > dd + dd { margin-top: 2px; }

/* Registry credentials */
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; }
.reg-edit > summary.btn { list-style: none; }
.reg-edit > summary::-webkit-details-marker { display: none; }
.reg-form { display: grid; gap: 10px; width: 300px; padding: 12px; text-align: left; white-space: normal; }
.reg-form .btn { justify-self: start; }
.reg-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.reg-help { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.reg-help b { font-weight: 600; }

@media (max-width: 700px) {
  .rows > details.adv > summary, .rows > details.adv > .row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .scale-fields label { width: calc(50% - 6px); }
  .disk-fields label, .disk-fields label:first-child { width: 100%; }
  .reg-fields { grid-template-columns: minmax(0, 1fr); }
  .reg-form { width: min(300px, calc(100vw - 48px)); }
}

/* === metering === */
/* Chart colors, one per resource type, in this order: services, cron jobs, databases,
   disks. Validated as a set on white (lightness band, chroma, colorblind separation of
   neighbours, contrast >= 3:1). A type keeps its color whether or not the others show. */
:root {
  --viz-1: #5b8c00;  /* services; also "used" on the metrics charts */
  --viz-2: #2a78d6;  /* cron jobs */
  --viz-3: #eb6834;  /* databases */
  --viz-4: #6250d6;  /* disks */
  --viz-limit: #8f8d85;
}

/* Totals above the usage pages: like the overview's usage strip, with a note under each value. */
.tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 28px; }
.tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tiles > div { display: grid; gap: 6px; align-content: start; padding: 14px 18px 16px; border-left: 1px solid var(--line); min-width: 0; }
.tiles > div:first-child { border-left: 0; }
.tiles small { font-size: 12.5px; color: var(--muted); }
.tiles .usage-value { font-size: 22px; }
.tiles .tile-admin { background: var(--tint); }

.month-pick { display: flex; gap: 8px; margin: 0; }
.month-pick select { width: auto; min-width: 170px; height: 34px; font-size: 13.5px; }

.fine { margin-top: 14px; max-width: 96ch; font-size: 12.5px; color: var(--muted); }
.sub-h { margin: -4px 0 12px; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
th.num { text-align: right; }
tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; }
span.name.plain { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; white-space: nowrap; }
span.name.plain .i { width: 16px; height: 16px; color: var(--muted); }
td .tag { margin-left: 6px; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 8px; vertical-align: 0; background: var(--viz-1); }
.swatch.s2 { background: var(--viz-2); } .swatch.s3 { background: var(--viz-3); } .swatch.s4 { background: var(--viz-4); }
a.sort { color: inherit; text-decoration: none; }
a.sort:hover { color: var(--ink); }
a.sort.on { color: var(--ink); }
a.sort.on::after { content: " ↓"; }
.meter-cell { min-width: 190px; }
a.nw { white-space: nowrap; }
.meter-text { display: block; margin-bottom: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Range links above the metrics charts reuse the look of the overview's filters. */
.viz-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.filters a { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-left: 1px solid var(--line-strong); background: var(--bg); font-size: 13.5px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.filters a:first-child { border-left: 0; }
.filters a:hover { color: var(--ink); }
.filters a.on { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }

.viz-card .card-head { flex-wrap: wrap; align-items: flex-start; }
.viz-card .card-body { padding: 14px 18px 12px; }
.viz-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.viz-duo-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.viz-duo-head .legend { margin: 0; }
.viz-stats { display: flex; gap: 22px; margin: 0; }
.viz-stats div { display: grid; gap: 1px; }
.viz-stats dt { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.viz-stats dd { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* The daily chart switches measure without JavaScript: radios before the panels. */
.viz-switch { position: relative; }
.vh { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.viz-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.viz-tabs { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.viz-tabs label { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-left: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; }
.viz-tabs label:first-child { border-left: 0; }
.viz-tabs label:hover { color: var(--ink); }
.viz-panel { display: none; }
#um-cpu:checked ~ .viz-panel[data-panel="cpu"], #um-mem:checked ~ .viz-panel[data-panel="mem"], #um-disk:checked ~ .viz-panel[data-panel="disk"] { display: block; }
#um-cpu:checked ~ .viz-head label[for="um-cpu"], #um-mem:checked ~ .viz-head label[for="um-mem"], #um-disk:checked ~ .viz-head label[for="um-disk"] { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }
#um-cpu:focus-visible ~ .viz-head label[for="um-cpu"], #um-mem:focus-visible ~ .viz-head label[for="um-mem"], #um-disk:focus-visible ~ .viz-head label[for="um-disk"] { outline: 2px solid var(--ink); outline-offset: -2px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--viz-1); }
.key.s2 { background: var(--viz-2); } .key.s3 { background: var(--viz-3); } .key.s4 { background: var(--viz-4); }
.key.line { width: 14px; height: 2px; border-radius: 1px; }
.key.lim { background: none; border-top: 2px dashed var(--viz-limit); height: 0; }

/* The charts. Thin marks, hairline grid, and the data as the only loud thing. */
.viz-box { position: relative; }
.viz-mid, .viz-narrow { display: none; }
svg.viz { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); touch-action: pan-y; }
svg.viz:focus { outline: none; }
svg.viz:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
svg.viz .grid { stroke: #efeee9; stroke-width: 1; shape-rendering: crispEdges; }
svg.viz .base { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
svg.viz .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
svg.viz .bar { fill: var(--viz-1); }
svg.viz .bar.s2 { fill: var(--viz-2); } svg.viz .bar.s3 { fill: var(--viz-3); } svg.viz .bar.s4 { fill: var(--viz-4); }
svg.viz .hover-band { fill: var(--hover); }
svg.viz .line { fill: none; stroke: var(--viz-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.viz .area { fill: var(--viz-1); opacity: .1; }
svg.viz .limit { fill: none; stroke: var(--viz-limit); stroke-width: 1.5; stroke-dasharray: 5 4; }
svg.viz .xhair { stroke: var(--line-strong); stroke-width: 1; }
svg.viz .focus-dot { fill: var(--viz-1); stroke: #fff; stroke-width: 2; }

.viz-tip { position: absolute; top: 0; z-index: 5; min-width: 150px; max-width: 260px; padding: 9px 11px; pointer-events: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: 0 12px 30px -14px rgba(10, 10, 10, .3); font-size: 12.5px; }
.viz-tip b.t { display: block; margin-bottom: 5px; font-weight: 600; color: var(--ink); }
.viz-tip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.viz-tip li { display: flex; align-items: center; gap: 7px; color: var(--muted); white-space: nowrap; }
.viz-tip li b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.viz-tip .key { width: 12px; height: 2px; border-radius: 1px; }
.viz-tip .key.none { background: none; }

.viz-table { margin-top: 14px; }
.viz-table summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.viz-table summary:hover { color: var(--ink); }
.viz-table[open] summary { margin-bottom: 8px; }

@media (max-width: 860px) {
  .viz-wide { display: none; }
  .viz-mid { display: block; }
  .tiles, .tiles.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles > div:nth-child(odd) { border-left: 0; }
  .tiles > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tiles > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .hide-sm { display: none; }
}
@media (max-width: 540px) {
  .viz-mid { display: none; }
  .viz-narrow { display: block; }
  .tiles .usage-value { font-size: 19px; }
  .viz-stats { gap: 16px; }
  .month-pick select { min-width: 0; }
}

/* === releases === */
/* Deploy history (Events tab). A successful deploy that something newer replaced
   keeps its tick, in neutral colours: only what runs now is green. */
.badge.done { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
table.deploys td { vertical-align: top; }
table.deploys td:first-child { padding-top: 12px; }
.deploy-cell { min-width: 300px; }
.deploy-image { display: block; overflow-wrap: anywhere; color: var(--ink); }
.deploy-cell small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.deploy-why { margin-top: 8px; font-size: 13px; color: var(--bad-ink); }
.deploy-why .tag { margin-right: 7px; vertical-align: 1px; background: var(--bad-bg); color: var(--bad-ink); }
details.tail { margin-top: 6px; }
details.tail summary { width: fit-content; cursor: pointer; font-size: 12.5px; color: var(--muted); }
details.tail summary:hover { color: var(--ink); }
.logs.mini { height: auto; max-height: 240px; margin-top: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: #0d0f0c; font-size: 12px; }

/* The base styles only keep table cells on one line; these heads hold short labels too. */
span.nw, a.nw { white-space: nowrap; }
.card-head > .nw { flex: none; }

/* Why the latest deploy failed (overview) */
.card.fail { overflow: hidden; border-color: #f1cfc8; }
.card.fail > .card-head { background: var(--bad-bg); border-bottom-color: #f4c9c1; }
.fail-title { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; color: var(--bad-ink); }
.fail-title h2 { color: var(--ink); }
.fail-title .tag { background: var(--surface); color: var(--bad-ink); }
.fail-body { display: grid; gap: 8px; }
.fail-why { font-size: 15px; font-weight: 500; line-height: 1.45; }
.fail-safe { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--ok-ink); }
.fail-safe .i { width: 16px; height: 16px; margin-top: 2px; }
.term.flush { border-radius: 0; }
.fail-logs { height: auto; max-height: 260px; }
.card.fail > .foot { justify-content: flex-start; }

/* Deploy hook (Settings) */
.section-sub { max-width: 76ch; margin: -4px 0 14px; color: var(--muted); font-size: 13.5px; }
.card.hook { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 18px; }
.card.hook form { margin: 0; }
.hook-main { display: grid; gap: 3px; min-width: 0; }
.hook-main small { color: var(--muted); font-size: 12.5px; }
.hook-url { padding: 0; background: none; font-size: 13px; overflow-wrap: anywhere; }
.hook-docs { margin-top: 16px; }
.section-sm { margin-top: 16px; }

/* Lists of checkboxes (notification settings, webhook events) */
.checks { display: grid; gap: 2px; }
.checks.two { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; font-weight: 400; cursor: pointer; }
.check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; border: 0; appearance: auto; -webkit-appearance: checkbox; accent-color: var(--ink); }
.check input:disabled + span { opacity: .65; }
.check span { display: grid; gap: 1px; min-width: 0; }
.check b { font-weight: 550; color: var(--ink); }
.check b.mono { font-weight: 500; }
.check small { color: var(--muted); font-size: 12.5px; }

/* Webhook endpoint page */
.sub.wrap { overflow-wrap: anywhere; }
.delivery-cell { min-width: 220px; }
.code-pill { margin-right: 6px; }

@media (max-width: 700px) {
  .checks.two { grid-template-columns: minmax(0, 1fr); }
  .card.hook { align-items: stretch; }
  .deploy-cell { min-width: 240px; }
}

/* === domains === */
.dom-add { margin-bottom: 32px; }
.dom-add .inline-form { padding-top: 14px; }
.dom-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.dom-list { display: grid; gap: 12px; }
.dom { display: grid; gap: 12px; padding: 14px 18px; min-width: 0; }
.dom-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.dom-name { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 200px; overflow-wrap: anywhere; }
.dom-name .ext { font-size: 13.5px; color: var(--ink); font-weight: 500; }
.dom-host { font-family: var(--mono); font-size: 13.5px; font-weight: 600; }
.dom-actions { gap: 6px; }
.dom-msg { display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--tint); font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.dom-msg .i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }
.dom-msg.bad { background: var(--bad-bg); border-color: #f4c9c1; color: var(--bad-ink); }
.dom-msg.bad .i { color: var(--bad-ink); }
.dom-msg.busy { background: #fffaea; border-color: #f0dca0; }
.dom-msg.busy .i { color: var(--busy-ink); }
.dom-records { display: grid; gap: 8px; min-width: 0; }
.dom-records table { table-layout: fixed; font-size: 13px; }
.dom-records th:nth-child(1) { width: 84px; }
.dom-records th:nth-child(2) { width: 38%; }
.dom-records td { padding: 9px 10px; vertical-align: top; }
.dom-records th { padding: 8px 10px; }
.dom-records tbody tr:hover td { background: none; }
.dom-cell { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; min-width: 0; }
.dom-cell > span { display: grid; gap: 2px; min-width: 0; }
.dom-cell code { background: none; padding: 0; overflow-wrap: anywhere; }
.dom-cell small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.dom-cell .icon-btn { margin-top: -5px; flex: none; }
.dom-meta { font-size: 12.5px; color: var(--muted); }
.dom-empty { padding: 28px; }
/* The steps at the customer's DNS provider (internal/domains/provider.go). */
.dom-guide { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tint); padding: 0 12px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.dom-guide > summary { cursor: pointer; padding: 10px 0; font-weight: 600; color: var(--ink); }
.dom-guide[open] { padding-bottom: 12px; }
.dom-guide > p { margin: 0 0 8px; overflow-wrap: anywhere; }
.dom-guide code { overflow-wrap: anywhere; }
.dom-guide-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; }
.dom-guide-steps > li { overflow-wrap: anywhere; }
.dom-guide-rec { display: grid; gap: 4px; margin: 6px 0 0; }
.dom-guide-rec > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; }
.dom-guide-rec dt { color: var(--muted); font-size: 12px; }
.dom-guide-rec dd { margin: 0; display: grid; gap: 2px; justify-items: start; min-width: 0; }
.dom-guide-notes { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.dom-guide-docs { margin: 10px 0 0; }
.dom-guide-docs a { display: inline-flex; align-items: center; gap: 4px; }
.dom-guide-docs .i { width: 13px; height: 13px; }
@media (max-width: 700px) {
  .dom { padding: 14px; }
  .dom-name { min-width: 0; flex-basis: 100%; }
  .dom-actions { width: 100%; }
  .dom-records thead { display: none; }
  .dom-records table, .dom-records tbody { display: block; }
  .dom-records tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .dom-records td { display: block; padding: 0; border: 0; }
  .dom-guide-rec > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* === backups === */
.note.bk-on { background: var(--brand-soft); border-color: #e3f1b4; color: var(--ink-2); }
.note.bk-on .i { color: var(--green-ink); }
.note.bk-on b { color: var(--ink); font-weight: 600; }
.note.bk-bad { background: var(--bad-bg); border-color: #f4c9c1; color: var(--ink-2); }
.note.bk-bad .i { color: var(--bad-ink); }
.note.bk-bad b { color: var(--bad-ink); font-weight: 600; }
.note.bk-bad .muted { display: block; margin-top: 3px; font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; }
.bk-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.bk-head p { margin-top: 3px; max-width: 76ch; }
.stats.bk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 24px; }
.bk-stats > .stat { align-content: start; }
.bk-sub { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.bk-window { font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.4; }
.bk-window .muted { font-weight: 450; }
#backups .card.table { margin-bottom: 24px; }
#backups .card.table h3 { font-size: 15px; }
.bk-cover { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); }
.bk-cover > div { padding: 14px 18px 16px; }
.bk-cover > div + div { border-left: 1px solid var(--line); }
.bk-cover h3 { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 8px; }
.bk-cover h3 .i { width: 16px; height: 16px; color: var(--muted); }
.bk-cover > div:first-child h3 .i { color: var(--green-ink); }
.bk-cover ul { margin: 0; padding: 0 0 0 18px; display: grid; gap: 5px; font-size: 13.5px; color: var(--ink-2); }
.bk-time { display: flex; align-items: center; gap: 10px; max-width: 300px; }
.bk-utc { font: 500 11px var(--mono); letter-spacing: .07em; color: var(--muted); }
@media (max-width: 860px) {
  .stats.bk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bk-stats > .stat:nth-child(odd) { border-left: 0; }
  .bk-stats > .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .stats.bk-stats, .bk-cover { grid-template-columns: minmax(0, 1fr); }
  .bk-cover > div + div { border-left: 0; border-top: 1px solid var(--line); }
  #backups .bk-dur, #backups .bk-who { display: none; }
}

/* === margin === */
/* Platform admins' usage pages: value at list prices and margin next to the estimated cost. */
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.stack { margin-bottom: 12px; }
.tiles .usage-value .badge { margin-left: 4px; vertical-align: 3px; }
a.sort.asc.on::after { content: " ↑"; }
td .badge { height: 20px; }
@media (max-width: 860px) {
  .tiles.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ws-usage td.res { min-width: 150px; }
@media (max-width: 700px) {
  /* The money columns stay on a phone: the badge goes above the margin, the owner's address is cut short. */
  .ws-usage td .badge.flag { display: flex; width: max-content; margin: 0 0 4px auto; }
  .ws-usage .cell-main small { max-width: 120px; }
  .ws-usage .ws-avatar { display: none; }
}

/* === github === */
/* The GitHub App's admin page, linking accounts to a workspace, and the development tools of the fake mode. */
.gh-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; }
.gh-steps code { font-size: 12.5px; }
.gh-actions { margin: 18px 0 4px; }
.gh-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-btns form { margin: 0; }
.gh-consent .row .lead b { font-size: 15px; }
.gh-push { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.gh-push select { width: auto; min-width: 110px; height: 30px; font-size: 13px; }
.facts dd a { overflow-wrap: anywhere; }
.facts dd .btn { margin-left: auto; }
.card-body.actions { border-top: 1px solid var(--line); }
.btn .i + .i { margin-left: 2px; }
@media (max-width: 700px) {
  .gh-push { flex-wrap: wrap; justify-content: flex-end; }
  .gh-push select { min-width: 0; }
  .facts dd { flex-wrap: wrap; }
  .gh-wide { display: none; }
  .gh-row-actions { flex-direction: column; align-items: stretch; }
}

/* === builds === */
/* The deploy page and the list of deploys are styled in the deploy block below. */
.foot-link { margin: 0; padding: 12px 0 0; font-size: 13.5px; }

/* === deploy === */
/* Kilby Deploy: the Git tab of the new-service page, the plan screen, the deploy page with its
   timeline and log, and the source settings of a service built from Git. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.linkish { padding: 0; text-align: left; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--ink); text-decoration-color: var(--ink); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* Source tabs of the new-service page */
.src-tabs { display: flex; gap: 2px; margin: 0 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.src-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.src-tabs a:hover { color: var(--ink); }
.src-tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand-edge); }
.src-tabs a .i { width: 16px; height: 16px; }

/* Repository list */
.gf-pick { padding: 0; overflow: hidden; }
.gf-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--tint); }
.gf-account { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gf-account label { white-space: nowrap; }
.gf-account select { width: auto; min-width: 180px; height: 32px; }
.gf-who { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.gf-who small { color: var(--muted); font-size: 12.5px; }
.gf-search { padding: 12px 16px 0; }
.gf-search .search { min-width: 0; }
.gf-search input { height: 40px; padding-left: 38px; font-size: 14.5px; }
.gf-search .search .i { left: 13px; }
.gf-list { list-style: none; margin: 8px 0 0; padding: 0 8px 8px; max-height: 440px; overflow-y: auto; }
.gf-item { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.gf-item:hover, .gf-item.on { background: var(--hover); }
.gf-item.on { box-shadow: inset 3px 0 0 var(--brand-edge); }
.gf-item-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gf-item-when { white-space: nowrap; }
.gf-item .i { width: 15px; height: 15px; color: var(--faint); flex: none; }
.gf-item-typed { border: 1px dashed var(--line-strong); margin-top: 6px; }
.gf-empty { padding: 18px 10px; color: var(--muted); font-size: 13.5px; list-style: none; }
.gf-status { padding: 6px 16px 14px; margin: 0; }
.gf-fallback { padding: 14px 16px 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.row-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gf-more { margin: 14px 2px 0; }

/* The plan screen */
.gf-source { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 16px; }
.gf-source-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.gf-source-main small { display: block; font-size: 12.5px; overflow-wrap: anywhere; }
.gf-branch { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.gf-branch select { width: auto; min-width: 150px; height: 32px; }
.gf-loading { display: flex; align-items: center; gap: 10px; padding: 36px 4px; color: var(--muted); }
.gf-found { padding: 16px 18px; margin-bottom: 16px; }
.gf-found:focus { outline: none; }
.gf-found-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.gf-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag.strong { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }
.gf-notes, .gf-warns { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 7px; font-size: 14px; }
.gf-notes li, .gf-warns li { display: flex; gap: 9px; align-items: flex-start; }
.gf-notes li .i { color: var(--green-ink); margin-top: 2px; width: 16px; height: 16px; }
.gf-warns li .i { color: var(--busy-ink); margin-top: 2px; width: 16px; height: 16px; }
.gf-warns:empty { display: none; }
.gf-change { margin-top: 2px; }
.gf-change .linkish { margin-left: 25px; }
.gf-cands { margin: 0 0 20px; display: grid; gap: 6px; }
.gf-cands p { margin-bottom: 4px; }
.gf-cand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gf-cand { display: grid; gap: 10px; align-content: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gf-cand-head { display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.gf-cand-head .i { color: var(--muted); width: 16px; height: 16px; }
.gf-cand .btn { justify-self: start; }
.gf-error { display: grid; gap: 16px; margin-top: 4px; }
.gf-error .note { margin: 0; }
#gf-cands-title, .gf-cands h2 { font-size: 15px; }
.gf-manual { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; }
.gf-manual summary { cursor: pointer; }
.gf-manual-body { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; margin-top: 14px; }
.gf-manual-body .btn { grid-column: 1 / -1; justify-self: start; }
.gf-inline { display: flex; gap: 8px; }
.gf-inline input { flex: 1; min-width: 0; }
.gf-rows { margin-bottom: 8px; }
.gf-rows .ctl > label { font-weight: 500; }
.gf-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gf-plan { position: relative; display: block; cursor: pointer; font-weight: 400; }
.gf-plan input { position: absolute; opacity: 0; width: 0; height: 0; }
.gf-plan > span { display: grid; gap: 1px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.gf-plan b { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.gf-plan small { color: var(--muted); font-size: 12.5px; }
.gf-plan em { font-style: normal; font-weight: 600; font-size: 13.5px; margin-top: 6px; color: var(--ink); }
.gf-plan:hover > span { border-color: #c2bfb6; }
.gf-plan input:checked + span { border-color: #86b81a; background: var(--brand-soft); box-shadow: 0 0 0 1px #86b81a inset; }
.gf-plan input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.gf-plan.suggested > span::after { content: "Suggested"; justify-self: start; margin-top: 6px; font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--green-ink); }
.gf-env-cols, .gf-env-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 74px 28px; }
.gf-env-row input[readonly] { background: var(--tint); }
.gf-build { padding: 0; font-size: 13px; white-space: nowrap; }
.gf-empty-env { margin: 0; }

/* The fixed bar: what it costs, and the button */
body.has-deploy-bar .page { padding-bottom: 120px; }
.deploy-bar { position: fixed; z-index: 25; left: var(--rail); right: 0; bottom: 0; background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line-strong); box-shadow: 0 -8px 24px -18px rgba(10, 10, 10, .35); backdrop-filter: blur(6px); }
.deploy-bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: var(--page-max); margin: 0 auto; padding: 12px var(--gutter); }
.deploy-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.deploy-price b { font-weight: 600; }
.deploy-cost b { font-size: 16px; }
.deploy-cost small { font-size: 12.5px; }
.deploy-msg { flex: 1 1 260px; color: var(--bad-ink); font-size: 13.5px; }
.deploy-bar .actions { margin-left: auto; }

@media (max-width: 560px) {
  .deploy-price .muted { display: none; }
  .deploy-cost small { display: block; }
  .deploy-bar .actions { width: 100%; }
  .deploy-bar .actions .btn.lg { flex: 1; }
  .gf-change .linkish { margin-left: 25px; }
}
@media (max-width: 860px) {
  .deploy-bar { left: 0; }
  .deploy-bar-in { padding: 10px 18px; }
  .gf-plans { grid-template-columns: minmax(0, 1fr); }
  .gf-manual-body, .row-pair { grid-template-columns: minmax(0, 1fr); }
  .gf-env-cols { display: none; }
  .gf-env-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .gf-env-row .secret { grid-column: 1 / -1; }
  .gf-env-row .gf-build { grid-column: 1; }
  .gf-env-row .icon-btn { grid-column: 2; grid-row: 1; }
}

/* The deploy page */
.dp-head { margin-bottom: 20px; }
.dp-title { min-width: 0; flex: 1 1 420px; }
.dp-title h1 { font-size: 24px; overflow-wrap: anywhere; }
.dp-title .sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dp-sub-text { color: var(--muted); font-size: 14px; }
.dp-facts { margin-bottom: 16px; overflow: hidden; }
.dp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dp-grid > div { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.dp-grid > div:nth-child(-n+3) { border-top: 0; }
.dp-grid > div:nth-child(3n+1) { border-left: 0; }
.dp-grid dd .i { width: 14px; height: 14px; color: var(--muted); flex: none; }
.dp-grid dd a { text-decoration-color: var(--line-strong); }

.dp-live { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 16px; background: var(--brand-soft); border-color: #d5eb9a; }
.dp-live-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--ink); }
.dp-live-mark .i { width: 16px; height: 16px; stroke-width: 2.4; }
.dp-live b { font-weight: 600; }
.dp-live p { margin-top: 2px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.dp-fail { margin-bottom: 16px; padding: 18px; border-color: #f1cfc8; background: #fffafa; display: grid; gap: 10px; }
.diag-head { display: flex; align-items: center; gap: 10px; color: var(--bad-ink); }
.diag-head h2 { color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.diag-head .i { flex: none; }
.dp-err { padding: 9px 12px; border-radius: var(--radius-sm); background: var(--bad-bg); color: var(--bad-ink); font-size: 12.5px; overflow-wrap: anywhere; }
.diag-why { color: var(--ink-2); max-width: 78ch; }
.diag-fixes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.diag-fixes li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); flex-wrap: wrap; }
.diag-fix-text { display: grid; gap: 1px; min-width: 0; flex: 1 1 280px; }
.diag-fix-text b { font-weight: 600; }
.diag-fixes form { margin: 0; }
.dp-old { margin: 0; }

/* The timeline: seven stages in a row, in a column on a phone */
.dp-timeline { padding: 18px 12px 14px; margin-bottom: 16px; }
.tl { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tl-step { position: relative; display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0; }
.tl-step + .tl-step::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line-strong); }
.tl-step.ok::before { background: var(--brand-edge); }
.tl-step.busy::before { background: linear-gradient(90deg, var(--brand-edge), var(--line-strong)); }
.tl-btn { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; width: 100%; padding: 2px 4px 6px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: var(--radius-sm); }
.tl-btn:hover { background: var(--tint); }
.tl-btn[aria-pressed="true"] { background: var(--brand-soft); }
.tl-dot { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); color: var(--faint); margin-bottom: 4px; }
.tl-dot::before { content: ""; width: 12px; height: 12px; background: currentColor; -webkit-mask: var(--mark, none) center / contain no-repeat; mask: var(--mark, none) center / contain no-repeat; }
.tl-step.ok .tl-dot { background: var(--brand); border-color: var(--brand-edge); color: var(--ink);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.500 4.500L19 7.500'/%3E%3C/svg%3E"); }
.tl-step.bad .tl-dot { background: var(--bad-ink); border-color: var(--bad-ink); color: #fff;
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }
.tl-step.busy .tl-dot { border-color: var(--busy-bg); border-top-color: var(--busy-ink); background: var(--surface); animation: spin .9s linear infinite; }
.tl-step.busy .tl-dot::before { display: none; }
.tl-step[data-status="skipped"] .tl-dot, .tl-step[data-status="canceled"] .tl-dot { color: var(--faint);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.400' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
.tl-name { font-weight: 600; font-size: 13.5px; text-align: center; }
.tl-state { font-size: 12.5px; color: var(--muted); }
.tl-step.bad .tl-state { color: var(--bad-ink); font-weight: 550; }
.tl-step.busy .tl-state { color: var(--busy-ink); font-weight: 550; }
.tl-step.ok .tl-state { color: var(--ok-ink); }
.tl-took { font-size: 12px; color: var(--muted); min-height: 16px; }
.tl-note { font-size: 12px; text-align: center; line-height: 1.35; padding: 0 6px; }
@media (prefers-reduced-motion: reduce) { .tl-step.busy .tl-dot { animation-duration: 3s; } }

/* The log viewer */
.lv { background: #0d0f0c; border-radius: var(--radius); overflow: hidden; color: #cfd6bf; }
.lv-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid #23261f; }
.lv-title { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 550; color: #d7dccb; flex-wrap: wrap; }
.lv-title .live { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12px; color: #9aa38a; }
.lv-title .live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: pulse 1.6s ease-in-out infinite; }
.lv-title .live.off::before { background: #6b6a64; animation: none; }
.lv-stage { font-weight: 500; color: var(--brand); display: inline-flex; gap: 8px; align-items: center; }
.lv-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lv-search { position: relative; display: flex; align-items: center; gap: 2px; font-weight: 400; }
.lv-search > .i { position: absolute; left: 9px; width: 14px; height: 14px; color: #7d8670; pointer-events: none; }
.lv-search input { width: 210px; height: 28px; padding: 0 78px 0 29px; font-size: 12.5px; background: #151812; color: #e5ead7; border-color: #3a3f33; }
.lv-search input::placeholder { color: #7d8670; }
.lv-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(177, 226, 37, .25); }
.lv-count { position: absolute; right: 62px; font-size: 11.5px; color: #9aa38a; pointer-events: none; white-space: nowrap; }
.lv-icon { display: inline-grid; place-items: center; width: 26px; height: 28px; border: 0; background: none; color: #9aa38a; cursor: pointer; border-radius: var(--radius-sm); }
.lv-icon:hover { color: var(--brand); background: #1a1d17; }
.lv-icon .i { width: 14px; height: 14px; }
.lv-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid #3a3f33; background: #1a1d17; color: #e5ead7; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.lv-btn:hover { border-color: var(--brand); color: var(--brand); }
.lv-btn .i { width: 13px; height: 13px; }
.lv-btn[aria-pressed="true"] { border-color: #5d6b2c; background: #20260f; }
.lv-btn:focus-visible, .lv-icon:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.lv-body { position: relative; height: min(68vh, 620px); min-height: 320px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 20px; }
.lv-body:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.lv-spacer { width: 1px; }
.lv-rows { position: absolute; top: 0; left: 0; min-width: 100%; }
.lv-row { height: 20px; padding: 0 16px; white-space: pre; display: flex; gap: 12px; }
.lv-row:hover { background: #151812; }
.lv-time { color: #6f7a62; flex: none; }
.lv-stg { color: #5f6954; flex: none; width: 62px; overflow: hidden; text-overflow: ellipsis; }
.lv-txt { flex: none; }
.lv-row.l-error { color: #ff9c8f; }
.lv-row.l-warn { color: #f0d27a; }
.lv-txt mark { background: rgba(177, 226, 37, .28); color: inherit; border-radius: 2px; }
.lv-txt mark.cur { background: var(--brand); color: #0d0f0c; }
.lv-static { margin: 0; padding: 14px 16px; height: min(68vh, 620px); min-height: 320px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.lv-static .l-error { color: #ff9c8f; }
.lv-static .l-warn { color: #f0d27a; }
.lv-note { margin: 0; padding: 8px 16px; border-top: 1px solid #23261f; font-size: 12.5px; color: #9aa38a; }

/* The list of deploys */
.dl-main { display: grid; gap: 2px; min-width: 0; }
.dl-msg { font-weight: 550; overflow-wrap: anywhere; }
span.dl-msg { text-decoration: none; }
.dl-main small { font-size: 12.5px; }
.dl-release td { background: var(--tint); }
.dl-release .dl-msg { font-weight: 500; color: var(--ink-2); }
.dl-empty { margin-top: 12px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.section-head .section-sub { margin-top: 4px; }
.bv-list li { padding: 11px 18px; }
.bv-add { align-items: flex-end; }

@media (max-width: 860px) {
  .dp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-grid > div:nth-child(3) { border-top: 1px solid var(--line); }
  .dp-grid > div:nth-child(3n+1) { border-left: 1px solid var(--line); }
  .dp-grid > div:nth-child(2n+1) { border-left: 0; }
  .lv-search input { width: 150px; }
}
@media (max-width: 700px) {
  .tl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tl-step { justify-items: stretch; padding-left: 0; }
  .tl-step + .tl-step::before { top: -14px; right: auto; left: 17px; width: 2px; height: 28px; }
  .tl-btn { grid-template-columns: 30px minmax(0, 1fr) auto auto; grid-template-rows: auto; justify-items: start; align-items: center; gap: 0 10px; padding: 6px 6px; text-align: left; }
  .tl-dot { margin-bottom: 0; grid-column: 1; grid-row: 1; }
  .tl-name { grid-column: 2; grid-row: 1; text-align: left; }
  .tl-state { grid-column: 3; grid-row: 1; }
  .tl-took { grid-column: 4; grid-row: 1; min-width: 40px; text-align: right; }
  .tl-note { text-align: left; padding: 0 0 4px 46px; }
  .dp-title h1 { font-size: 20px; }
  .lv-body { height: 60vh; }
  .lv-search { flex: 1 1 100%; }
  .lv-search input { width: 100%; }
  .dl-trigger, .dl-took { display: none; }
  .gf-source-main { flex-basis: 100%; }
}
/* === dash === */
/* The overview, the shell around every page (skip link, rail, menus, search, shortcuts),
   and the list, chart and feed patterns that Databases, Cron jobs and Activity share. */
:root {
  --viz-bad: #d03b3b;
  --dot-ok: #4d8a00; --dot-bad: #d03b3b; --dot-busy: #c27a00; --dot-idle: #8f8d85;
  --shadow-float: 0 18px 44px -16px rgba(10, 10, 10, .28), 0 2px 6px rgba(10, 10, 10, .05);
  --shadow-card: 0 1px 2px rgba(10, 10, 10, .04);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --r-lg: 12px;
}
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 9px 14px; border-radius: var(--radius-sm); background: var(--ink); color: #fff; font-weight: 550; text-decoration: none; transform: translateY(-160%); transition: transform .12s var(--ease); }
.skip:focus { transform: none; outline: 2px solid var(--brand); outline-offset: 2px; }
.main:focus { outline: none; }
.mono-small { font: 12.5px var(--mono); }
.linklike { padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { text-decoration-color: var(--ink); }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 7px; margin-left: 6px; border-radius: 10px; background: var(--hover); color: var(--muted); font: 600 12px/1 var(--sans); font-variant-numeric: tabular-nums; vertical-align: 2px; }

/* ---------------------------------------------------------------- Status dot */
.sdot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot-idle); }
.sdot.ok { background: var(--dot-ok); }
.sdot.bad { background: var(--dot-bad); }
.sdot.busy { background: var(--dot-busy); }
.sdot.warn { background: var(--dot-busy); }
.sdot.busy::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--dot-busy); opacity: 0; animation: ping 1.7s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.55); opacity: .75; } 100% { transform: scale(1.5); opacity: 0; } }
.stat { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 550; white-space: nowrap; }
.stat.bad { color: var(--bad-ink); }
.stat.busy { color: var(--busy-ink); }
.stat.idle { color: var(--muted); }

/* ---------------------------------------------------------------- Shell */
.top-btn.icon { position: relative; }
.bell-n { position: absolute; top: 9px; right: 8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--dot-bad); color: #fff; font: 650 10.5px/17px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--bg); font-variant-numeric: tabular-nums; }
.menu-search { position: relative; display: block; margin: 2px 2px 6px; }
.menu-search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--faint); pointer-events: none; }
.menu-search input { height: 32px; padding-left: 31px; font-size: 13px; }
.ws-list { max-height: 268px; overflow-y: auto; margin: 0 -2px; padding: 0 2px; }
.menu-role { flex: none; color: var(--muted); font-size: 12px; }
.menu-none { padding: 10px 9px; color: var(--muted); font-size: 13px; }
.menu hr { margin: 6px 0; }
.menu-item kbd { margin-left: auto; }
.menu-who small + small { margin-top: 1px; }
.menu.right { min-width: 252px; text-align: left; }
.alerts-menu { width: 348px; max-width: calc(100vw - 16px); }
.alerts-list { display: grid; max-height: 340px; overflow-y: auto; margin-bottom: 4px; }
.alert-item { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 4px 11px; padding: 9px 9px; border-radius: var(--radius-sm); text-decoration: none; }
.alert-item:hover { background: var(--hover); }
.alert-item .sdot { margin-top: 6px; }
.alert-item b { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.alert-item small { grid-column: 2; color: var(--muted); font-size: 12.5px; }
.alert-item.new { background: var(--tint); }

.rail a.on::before { content: ""; position: absolute; left: -10px; top: 9px; width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--brand-edge); }
.rail .tip { z-index: 50; display: inline-flex; align-items: center; gap: 8px; box-shadow: var(--shadow-float); }
.rail .tip kbd { background: #34342f; border-color: #46463f; color: #d9d7cf; font-size: 10.5px; padding: 0 5px; }
.rail a:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }

.flash { animation: rise .18s var(--ease); }
.flash span { flex: 1; min-width: 0; }
.flash-x { flex: none; display: grid; place-items: center; width: 22px; height: 22px; margin: -2px -6px -2px 0; border: 0; border-radius: 5px; background: none; color: inherit; opacity: .6; cursor: pointer; }
.flash-x:hover { opacity: 1; background: rgba(10, 10, 10, .06); }
.flash-x .i { width: 14px; height: 14px; margin: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(-5px); } }

/* Search and commands (Cmd+K) */
.jump-list { padding: 6px 6px 8px; }
.jump-group { padding: 10px 10px 4px; font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.menu-label { color: var(--muted); }
.jump-group:first-child { padding-top: 4px; }
.jump-item { justify-content: flex-start; gap: 11px; padding: 8px 10px; }
.jump-item .jump-ico { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--hover); color: var(--muted); }
.jump-item .jump-ico .i { width: 14px; height: 14px; }
.jump-item.on .jump-ico { background: var(--surface); color: var(--ink); }
.jump-item .jump-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jump-item .sdot { margin-right: 2px; }
.jump-item small { flex: none; }
.jump-item kbd { flex: none; }
.jump-foot { flex-wrap: wrap; }
.jump-help { margin-left: auto; }
.keys { width: min(660px, calc(100vw - 32px)); margin-top: 11vh; padding: 0; border: 0; background: none; color: inherit; }
.keys::backdrop { background: rgba(10, 10, 10, .28); }
.keys-box { background: var(--bg); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 28px 70px -24px rgba(10, 10, 10, .4); padding: 6px 22px 22px; }
.keys-box > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; }
.keys-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 36px; }
.keys h3 { margin: 16px 0 6px; font: 500 11px var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.keys dl { margin: 0; }
.keys dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.keys dl > div:first-child { border-top: 0; }
.keys dt { display: flex; gap: 4px; white-space: nowrap; order: 2; }
.keys dd { margin: 0; color: var(--ink-2); }
.keys kbd { font-size: 11.5px; min-width: 22px; text-align: center; }

/* ---------------------------------------------------------------- Overview: header and health */
.ov-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.ov-title { min-width: 0; display: grid; gap: 4px; }
.ov-title h1 { font-size: 28px; letter-spacing: -0.028em; overflow-wrap: anywhere; max-width: 32ch; }
.eyebrow { font: 500 11.5px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.health { display: inline-flex; align-items: center; gap: 9px; margin-top: 4px; font-size: 14.5px; font-weight: 550; color: var(--ink-2); }
.health.ok { color: var(--ok-ink); }
.health.bad { color: var(--bad-ink); }
.health.busy { color: var(--busy-ink); }
.health.idle { color: var(--muted); }
.ov-head .actions .btn { height: 36px; }
.ov-head summary.btn { list-style: none; }
.ov-head summary.btn::-webkit-details-marker { display: none; }
.ov-head summary.btn .i:last-child { width: 13px; height: 13px; opacity: .6; margin-left: 2px; }
.ov-head .pop .menu { top: calc(100% + 6px); right: 0; }

/* Needs attention */
.attn { margin-bottom: 24px; border: 1px solid var(--line-strong); border-left: 3px solid var(--dot-busy); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.attn.bad { border-left-color: var(--dot-bad); }
.attn > header { display: flex; align-items: center; gap: 4px; padding: 12px 18px 4px; }
.attn > header h2 { font-size: 14px; }
.attn-list { list-style: none; margin: 0; padding: 0; }
.attn-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 11px 18px; border-top: 1px solid var(--line); }
.attn-list > .attn-item:first-child { border-top: 0; }
.attn-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--busy-bg); color: var(--busy-ink); }
.attn-item.bad .attn-ico { background: var(--bad-bg); color: var(--bad-ink); }
.attn-item.info .attn-ico { background: var(--idle-bg); color: var(--idle-ink); }
.attn-ico .i { width: 16px; height: 16px; }
.attn-main { display: grid; gap: 1px; min-width: 0; }
.attn-title { font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.attn-title:hover { text-decoration: underline; }
.attn-detail { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.attn-act { margin: 0; }
.attn-more { border-top: 1px solid var(--line); }
.attn-more > summary { padding: 9px 18px; cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
.attn-more > summary::-webkit-details-marker { display: none; }
.attn-more > summary:hover { color: var(--ink); background: var(--tint); }
.attn-more[open] > summary { border-bottom: 1px solid var(--line); }

/* Getting started: one row of steps */
.ob { margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); overflow: hidden; }
.ob > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.ob > header h2 { font-size: 14px; }
.ob > header form { margin: 0; }
.ob-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.ob-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "check text act"; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.ob-item:first-child { border-top: 0; }
@media (min-width: 1100px) {
  .ob-list { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
  .ob-item { grid-template-columns: 22px minmax(0, 1fr); grid-template-areas: "check text" ". act"; align-content: start; align-items: start; gap: 8px 12px; padding: 14px 18px 16px; border-top: 0; border-left: 1px solid var(--line); }
  .ob-item:first-child { border-left: 0; }
}
.ob-check { grid-area: check; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.ob-item.done .ob-check { background: var(--dot-ok); border-color: var(--dot-ok); color: #fff; }
.ob-check .i { width: 13px; height: 13px; stroke-width: 2.4; }
.ob-text { grid-area: text; display: grid; gap: 2px; min-width: 0; }
.ob-text b { font-weight: 600; line-height: 1.3; }
.ob-text span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.ob-item.done .ob-text b { color: var(--muted); font-weight: 550; }
.ob-item > .btn, .ob-item > .ob-state { grid-area: act; justify-self: start; }
.ob-state { font-size: 13px; color: var(--ok-ink); font-weight: 550; }
.ob-state.muted { color: var(--muted); font-weight: 450; }

.welcome { display: grid; gap: 8px; justify-items: start; padding: 40px; margin-bottom: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.welcome-art { width: 64px; height: 64px; margin-bottom: 6px; }
.welcome h2 { font-size: 22px; letter-spacing: -0.02em; }
.welcome > p { max-width: 62ch; color: var(--muted); font-size: 15px; }
.welcome .starts { margin-top: 14px; max-width: 800px; background: var(--surface); }

/* ---------------------------------------------------------------- Tiles */
.ov-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 36px; }
.ov-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 28px; }
.otile { position: relative; display: grid; align-content: start; gap: 4px; padding: 15px 18px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); min-width: 0; }
.otile > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.otile-label { display: inline-flex; align-items: center; gap: 7px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
a.otile-label:hover { color: var(--ink); }
.otile-label .i { width: 15px; height: 15px; }
.otile-value { display: flex; align-items: baseline; gap: 7px; margin-top: 2px; white-space: nowrap; }
.otile-value b { font-size: 30px; line-height: 1.15; font-weight: 650; letter-spacing: -0.03em; }
.otile-value span { color: var(--muted); font-size: 13.5px; }
.otile-viz { display: grid; align-items: end; height: 48px; margin: 6px 0 2px; }
.otile-note { align-self: center; color: var(--muted); font-size: 13px; line-height: 1.4; }
.otile-foot { color: var(--muted); font-size: 12.5px; line-height: 1.45; min-height: 18px; }
.otile-bar { margin-top: 8px; height: 4px; }
.otile.warn { border-color: #efd58a; }
.otile.bad { border-color: #f0b9b0; }
.otile.warn progress::-webkit-progress-value, .otile-bar.warn::-webkit-progress-value { background: var(--dot-busy); }
.otile.bad progress::-webkit-progress-value, .otile-bar.bad::-webkit-progress-value { background: var(--dot-bad); }
.otile.warn progress::-moz-progress-bar, .otile-bar.warn::-moz-progress-bar { background: var(--dot-busy); }
.otile.bad progress::-moz-progress-bar, .otile-bar.bad::-moz-progress-bar { background: var(--dot-bad); }
.trend { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px 0 5px; border-radius: 10px; background: var(--hover); color: var(--ink-2); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: default; }
.trend .i { width: 12px; height: 12px; stroke-width: 2.2; }
.cells { display: flex; gap: 5px; align-self: end; height: 16px; }
.cells i { flex: 1; min-width: 0; max-width: 56px; border-radius: 4px; background: var(--idle-bg); }
.cells i.on { background: var(--brand-edge); }
.otile.warn .cells i.on { background: var(--dot-busy); }
.otile.bad .cells i.on { background: var(--dot-bad); }
.meter { display: block; height: 8px; align-self: end; margin-bottom: 4px; border-radius: 4px; background: var(--idle-bg); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--brand-edge); }
.meter.warn i { background: var(--dot-busy); } .meter.bad i { background: var(--dot-bad); }

/* ---------------------------------------------------------------- Sparklines and small bars */
.spark-box { position: relative; }
svg.viz.spark { display: block; width: 100%; height: 48px; overflow: visible; }
svg.viz.spark .line { fill: none; stroke: var(--viz-1); stroke-width: 1.75; }
svg.viz.spark .area { fill: var(--viz-1); opacity: .13; }
svg.viz.spark .line.bad { stroke: var(--viz-bad); } svg.viz.spark .area.bad { fill: var(--viz-bad); }
svg.viz.spark .end { fill: none; stroke: var(--viz-1); stroke-width: 7; stroke-linecap: round; }
svg.viz.spark .end.bad { stroke: var(--viz-bad); }
svg.viz.spark .end-ring { fill: none; stroke: var(--surface); stroke-width: 11; stroke-linecap: round; }
svg.viz.spark .base { stroke: var(--line); }
svg.viz.spark .xhair { stroke: var(--faint); stroke-width: 1; stroke-dasharray: 2 3; }
.spark-box .viz-tip { min-width: 0; }
svg.viz.minibars { display: block; width: 100%; max-width: 168px; height: 28px; overflow: visible; }
svg.viz .bar.zero { fill: var(--line-strong); }
svg.viz .bar.bad { fill: var(--viz-bad); }
.key.bad { background: var(--viz-bad); }
.viz-tip .key.bad { background: var(--viz-bad); }

/* ---------------------------------------------------------------- Lists of services, cron jobs and databases */
.svc { --cols: minmax(190px, 1.3fr) minmax(120px, .7fr) minmax(170px, 1fr) 112px minmax(230px, 1.7fr); }
.cron-section { --cols: minmax(190px, 1.3fr) minmax(130px, .8fr) minmax(190px, 1.2fr) minmax(170px, 1fr) minmax(150px, .9fr); }
.svc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.svc-bar h2 { display: flex; align-items: center; }
.svc-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; justify-content: flex-end; min-width: 0; }
.svc-tools .search { flex: 1 1 180px; min-width: 160px; max-width: 320px; }
.svc-tools .sel { display: block; }
.svc-tools .sel select { width: auto; height: 34px; font-size: 13.5px; padding-left: 10px; }
.search .slash { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search input:focus ~ .slash, .search input:not(:placeholder-shown) ~ .slash { display: none; }
.view-toggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button { display: grid; place-items: center; width: 36px; height: 32px; border: 0; border-left: 1px solid var(--line-strong); background: var(--bg); color: var(--muted); cursor: pointer; }
.view-toggle button:first-child { border-left: 0; }
.view-toggle button:hover { color: var(--ink); }
.view-toggle button[aria-pressed="true"] { background: var(--brand-soft); color: var(--green-ink); }
.view-toggle .i { width: 16px; height: 16px; }

.svc-head-row, .svc-item { display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: 20px; }
.svc-head-row { padding: 9px 14px; border-bottom: 1px solid var(--line-strong); font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-item { position: relative; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 68px; transition: background-color .12s; }
.svc-item:hover { background: var(--tint); }
.svc-item:focus-within { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand-edge); }
.svc-item[hidden] { display: none; }
.svc-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.svc-name-text { display: grid; min-width: 0; line-height: 1.35; }
.svc-link { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-link::after { content: ""; position: absolute; inset: 0; }
.svc-link:focus-visible { outline: none; }
.svc-name-text small, .svc-status small, .svc-last small, .svc-addr small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-status, .svc-last, .svc-addr { display: grid; gap: 1px; min-width: 0; line-height: 1.35; }
.svc-status .svc-msg { color: var(--bad-ink); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc-last-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; color: var(--ink); position: relative; z-index: 1; width: fit-content; max-width: 100%; }
a.svc-last-title:hover { text-decoration: underline; }
.svc-spark { position: relative; z-index: 1; min-width: 0; }
.svc-spark svg.viz.spark { height: 30px; }
.svc-spark-none { color: var(--muted); font-size: 12.5px; }
.svc-addr .ext { position: relative; z-index: 1; width: fit-content; max-width: 100%; min-width: 0; }
.svc-addr .addr-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-addr .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.cron-when { font-size: 13.5px; }
.svc-none { padding: 28px 14px; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.kind-tile { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--brand-soft); color: var(--green-ink); border: 1px solid #e3f1b4; }
.kind-tile .i { width: 17px; height: 17px; }
.kind-tile.private { background: var(--idle-bg); color: var(--idle-ink); border-color: #e2e0d9; }
.kind-tile.cron { background: #eaf1fc; color: #1f4f99; border-color: #d3e1f6; }
.kind-tile.database { background: #fdeee6; color: #a1431b; border-color: #f6d9c9; }

/* Grid layout */
.svc[data-view="grid"] .svc-head-row { display: none; }
.svc[data-view="grid"] .svc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.svc[data-view="grid"] .svc-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "last last" "addr addr" "spark spark"; row-gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-card); min-height: 0; }
.svc[data-view="grid"] .svc-item:hover { border-color: var(--line-strong); background: var(--surface); box-shadow: 0 6px 20px -12px rgba(10, 10, 10, .22); }
.svc[data-view="grid"] .svc-item:focus-within { background: var(--brand-soft); border-color: var(--brand-edge); box-shadow: none; }
.svc[data-view="grid"] .svc-name { grid-area: name; }
.svc[data-view="grid"] .svc-status { grid-area: status; justify-items: end; text-align: right; }
.svc[data-view="grid"] .svc-status .svc-msg { display: none; }
.svc[data-view="grid"] .svc-last { grid-area: last; padding-top: 12px; border-top: 1px solid var(--line); }
.svc[data-view="grid"] .svc-spark { grid-area: spark; }
.svc[data-view="grid"] .svc-addr { grid-area: addr; min-width: 0; }
.svc[data-view="grid"] .svc-spark svg.viz.spark { height: 30px; }

/* ---------------------------------------------------------------- Deploy activity, cost, feed */
.ov-pair { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; margin: 36px 0 16px; align-items: stretch; }
.ov-pair > .card, .feedcard { box-shadow: var(--shadow-card); border-radius: var(--r-lg); }
.dep { position: relative; display: flex; flex-direction: column; }
.dep .card-head { align-items: flex-start; }
.dep .card-body { padding: 14px 18px 14px; flex: 1; }
.dep .legend { margin-bottom: 6px; }
.dep-empty { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
#dx-deploys:checked ~ .card-body .viz-panel[data-panel="deploys"], #dx-builds:checked ~ .card-body .viz-panel[data-panel="builds"] { display: block; }
#dx-deploys:checked ~ .card-head label[for="dx-deploys"], #dx-builds:checked ~ .card-head label[for="dx-builds"] { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }
#dx-deploys:focus-visible ~ .card-head label[for="dx-deploys"], #dx-builds:focus-visible ~ .card-head label[for="dx-builds"] { outline: 2px solid var(--ink); outline-offset: -2px; }
.cost .card-body { display: grid; gap: 10px; align-content: start; }
.cost-total { display: grid; gap: 1px; }
.cost-total b { font-size: 34px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; font-variant-numeric: normal; }
.cost-total span { color: var(--muted); font-size: 13.5px; }
.cost-proj { font-size: 13.5px; color: var(--ink-2); }
.cost .fine { margin: 0; max-width: none; }
.cost .btn { justify-self: start; }
.cost-legend { margin: 0; }
.cost-legend b { font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 2px; }
.tag.free { background: var(--brand-soft); color: var(--green-ink); }
.parts { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--idle-bg); }
.part { display: block; height: 100%; flex: none; background: var(--viz-1); }
.part.s2 { background: var(--viz-2); } .part.s3 { background: var(--viz-3); } .part.s4 { background: var(--viz-4); }

.feedcard { margin-top: 16px; border: 1px solid var(--line); background: var(--surface); }
.feedcard .card-head { padding-bottom: 12px; }
.day { padding: 9px 18px; background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.feedcard .day:first-of-type { border-top: 0; }
.feed2 { list-style: none; margin: 0; padding: 0; }
.fe { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.feed2 > .fe:first-child { border-top: 0; }
.fe-main { min-width: 0; }
.fe-main p { overflow-wrap: anywhere; }
.fe-main b { font-weight: 600; }
.fe .ev-note { margin-top: 1px; }
.fe-time { color: var(--muted); font: 12.5px var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sec-tag { gap: 5px; height: 20px; background: var(--busy-bg); color: var(--busy-ink); font-size: 11.5px; }
.sec-tag .i { width: 12px; height: 12px; }
.av { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 650; font-size: 12.5px; background: #ecebe6; color: #55544f; }
.av0 { background: #e4ecff; color: #1d3f9a; } .av1 { background: #ffe6dd; color: #8a2a0c; } .av2 { background: #dff3e4; color: #14602e; }
.av3 { background: #f0e6ff; color: #5b21a6; } .av4 { background: #fff1c9; color: #7a4b00; } .av5 { background: #d9f1f1; color: #0b5857; }
.av6 { background: #ffe0ee; color: #8b1450; } .av7 { background: #e7e8d9; color: #3d4a12; } .av-sys { background: #ecebe6; color: #55544f; }

/* ---------------------------------------------------------------- Activity: filters and the time axis */
.filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)) auto; gap: 12px; align-items: end; margin-bottom: 24px; }
.filter-bar select { height: 36px; font-size: 13.5px; }
.filter-actions { display: flex; gap: 8px; align-items: center; }
.timeline-wrap { display: grid; gap: 28px; }
.tl-day { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-card); }
.day-h { display: flex; align-items: baseline; gap: 10px; padding: 11px 18px; background: var(--tint); border-bottom: 1px solid var(--line); font-size: 14px; }
.day-h small { color: var(--muted); font-size: 12.5px; font-weight: 450; }
.timeline .fe { grid-template-columns: 52px 30px minmax(0, 1fr) auto; column-gap: 14px; border-top: 0; padding-top: 12px; padding-bottom: 12px; position: relative; }
.timeline .fe-time { grid-column: 1; grid-row: 1; text-align: right; }
.timeline .fe .av { grid-column: 2; grid-row: 1; position: relative; z-index: 1; }
.timeline .fe .fe-main { grid-column: 3; grid-row: 1; }
.timeline .fe .sec-tag { grid-column: 4; grid-row: 1; }
.timeline .fe::before { content: ""; position: absolute; left: calc(18px + 52px + 14px + 15px); top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.timeline .fe:first-child::before { top: 50%; }
.timeline .fe:last-child::before { bottom: 50%; }
.timeline .fe:only-child::before { display: none; }

/* ---------------------------------------------------------------- Usage: by service */
#bs-cpu:checked ~ .viz-panel[data-panel="bs-cpu"], #bs-mem:checked ~ .viz-panel[data-panel="bs-mem"], #bs-val:checked ~ .viz-panel[data-panel="bs-val"] { display: block; }
#bs-cpu:checked ~ .viz-head label[for="bs-cpu"], #bs-mem:checked ~ .viz-head label[for="bs-mem"], #bs-val:checked ~ .viz-head label[for="bs-val"] { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }
#bs-cpu:focus-visible ~ .viz-head label[for="bs-cpu"], #bs-mem:focus-visible ~ .viz-head label[for="bs-mem"], #bs-val:focus-visible ~ .viz-head label[for="bs-val"] { outline: 2px solid var(--ink); outline-offset: -2px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: grid; grid-template-columns: minmax(150px, 260px) minmax(0, 1fr) 112px 44px; align-items: center; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.rank li:first-child { border-top: 0; }
.rank-name { min-width: 0; overflow: hidden; }
.rank-name .name, .rank-name .name.plain { max-width: 100%; }
.rank-name .name span { overflow: hidden; text-overflow: ellipsis; }
.rank-bar { display: block; height: 10px; border-radius: 5px; background: var(--idle-bg); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 5px; background: var(--viz-1); }
.rank-bar i.s2 { background: var(--viz-2); } .rank-bar i.s3 { background: var(--viz-3); } .rank-bar i.s4 { background: var(--viz-4); }
.rank-bar i.s0 { background: var(--faint); }
.rank-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; white-space: nowrap; }
.rank-share { text-align: right; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) {
  .rank li { grid-template-columns: minmax(0, 1fr) auto auto; row-gap: 6px; }
  .rank-bar { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------------------------------------------------------------- Percent widths (no inline styles under the CSP) */
.pw0{width:0%}.pw1{width:1%}.pw2{width:2%}.pw3{width:3%}.pw4{width:4%}.pw5{width:5%}.pw6{width:6%}.pw7{width:7%}.pw8{width:8%}.pw9{width:9%}
.pw10{width:10%}.pw11{width:11%}.pw12{width:12%}.pw13{width:13%}.pw14{width:14%}.pw15{width:15%}.pw16{width:16%}.pw17{width:17%}.pw18{width:18%}.pw19{width:19%}
.pw20{width:20%}.pw21{width:21%}.pw22{width:22%}.pw23{width:23%}.pw24{width:24%}.pw25{width:25%}.pw26{width:26%}.pw27{width:27%}.pw28{width:28%}.pw29{width:29%}
.pw30{width:30%}.pw31{width:31%}.pw32{width:32%}.pw33{width:33%}.pw34{width:34%}.pw35{width:35%}.pw36{width:36%}.pw37{width:37%}.pw38{width:38%}.pw39{width:39%}
.pw40{width:40%}.pw41{width:41%}.pw42{width:42%}.pw43{width:43%}.pw44{width:44%}.pw45{width:45%}.pw46{width:46%}.pw47{width:47%}.pw48{width:48%}.pw49{width:49%}
.pw50{width:50%}.pw51{width:51%}.pw52{width:52%}.pw53{width:53%}.pw54{width:54%}.pw55{width:55%}.pw56{width:56%}.pw57{width:57%}.pw58{width:58%}.pw59{width:59%}
.pw60{width:60%}.pw61{width:61%}.pw62{width:62%}.pw63{width:63%}.pw64{width:64%}.pw65{width:65%}.pw66{width:66%}.pw67{width:67%}.pw68{width:68%}.pw69{width:69%}
.pw70{width:70%}.pw71{width:71%}.pw72{width:72%}.pw73{width:73%}.pw74{width:74%}.pw75{width:75%}.pw76{width:76%}.pw77{width:77%}.pw78{width:78%}.pw79{width:79%}
.pw80{width:80%}.pw81{width:81%}.pw82{width:82%}.pw83{width:83%}.pw84{width:84%}.pw85{width:85%}.pw86{width:86%}.pw87{width:87%}.pw88{width:88%}.pw89{width:89%}
.pw90{width:90%}.pw91{width:91%}.pw92{width:92%}.pw93{width:93%}.pw94{width:94%}.pw95{width:95%}.pw96{width:96%}.pw97{width:97%}.pw98{width:98%}.pw99{width:99%}
.pw100{width:100%}

/* ---------------------------------------------------------------- Motion and pointers */
@media (prefers-reduced-motion: reduce) {
  .sdot.busy::after, .flash { animation: none; }
  .skip, .svc-item, .btn { transition: none; }
}
@media (max-width: 1100px) {
  .ov-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .svc { --cols: minmax(190px, 1.4fr) minmax(120px, .8fr) minmax(170px, 1.3fr) 96px minmax(130px, 1fr); }
  .ov-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .svc-head-row { display: none; }
  .svc[data-view="list"] .svc-item { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name status" "last last" "addr addr"; row-gap: 10px; padding: 14px 12px; }
  .svc[data-view="list"] .svc-name { grid-area: name; }
  .svc[data-view="list"] .svc-status { grid-area: status; justify-items: end; text-align: right; }
  .svc[data-view="list"] .svc-status .svc-msg { display: none; }
  .svc.cron-section[data-view="list"] .svc-status .svc-msg { display: -webkit-box; }
  .svc[data-view="list"] .svc-last { grid-area: last; }
  .svc[data-view="list"] .svc-spark { display: none; }
  .svc[data-view="list"] .svc-addr { grid-area: addr; }
  .svc-tools { justify-content: flex-start; flex-basis: 100%; }
  .svc-tools .search { flex-basis: 100%; max-width: none; order: -1; }
  .keys-cols { grid-template-columns: minmax(0, 1fr); }
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
  /* A label of the rail is a flex item there, and a flex item's z-index counts even when it is static: 50 would paint
     it over the New menu (the top bar is 30). */
  .rail .tip { box-shadow: none; z-index: auto; }
  .rail .tip kbd { display: none; }
  .rail a.on::before { display: none; }
  .rail a.on { box-shadow: inset 0 -2px 0 var(--brand-edge); }
}
@media (max-width: 700px) {
  .top-btn.icon { width: 46px; }
  .ws-switch > summary { max-width: 138px; }
  .ov-head { align-items: flex-start; }
  .ov-title h1 { font-size: 24px; }
  .ov-tiles { gap: 12px; margin-bottom: 28px; }
  .otile { padding: 13px 14px 14px; }
  .otile-value b { font-size: 26px; }
  .ov-tiles.two { grid-template-columns: minmax(0, 1fr); }
  .attn-item { grid-template-columns: 30px minmax(0, 1fr); }
  .attn-item .attn-act { grid-column: 2; justify-self: start; }
  .ob-list { grid-template-columns: minmax(0, 1fr); }
  .ob-item.done { display: none; }
  .ob-list { border-top: 0; }
  .welcome { padding: 24px 18px; }
  .fe { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .fe .sec-tag { display: none; }
  .timeline .fe { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .timeline .fe-time { grid-column: 3; grid-row: 1; text-align: right; }
  .timeline .fe .av { grid-column: 1; }
  .timeline .fe .fe-main { grid-column: 2; }
  .timeline .fe::before { left: calc(18px + 15px); }
  .filter-bar { grid-template-columns: minmax(0, 1fr); }
  .svc-bar { align-items: flex-start; }
  .view-toggle { margin-left: auto; }
}
@media (max-width: 540px) {
  .ov-tiles { grid-template-columns: minmax(0, 1fr); }
  .svc-tools .sel { flex: 1 1 120px; }
  .svc-tools .sel select { width: 100%; }
  .svc-tools .filters { flex: 1 1 100%; }
  .svc-tools .filters button { flex: 1; }
  .svc[data-view="grid"] .svc-list { grid-template-columns: minmax(0, 1fr); }
}
@media (pointer: coarse), (max-width: 700px) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 40px; }
  .icon-btn { width: 44px; height: 44px; }
  .menu-item { height: 44px; }
  .filters button, .svc-tools .sel select, .search input, .month-pick select { height: 44px; }
  .view-toggle button { width: 44px; height: 42px; }
  .rail a { min-height: 44px; }
  .top-btn { min-height: 44px; }
  .jump-item { padding: 12px 10px; }
  .attn-item .btn, .ob-item .btn { min-height: 44px; }
}

/* === svc === */
/* The page of a service, a cron job or a database: header, tabs, overview cards, charts, logs,
   metrics, environment, domains, events, settings. Classes are prefixed sh- (header) and sv-
   (everything else) so they never meet the shell's own. */
:root {
  --sv-ok: #4d8a00; --sv-bad: #d03b3b; --sv-busy: #d9961a; --sv-idle: #a3a199;
  --sv-r: 12px;
  --sv-shadow: 0 1px 2px rgba(10, 10, 10, .04);
  --sv-float: 0 18px 44px -16px rgba(10, 10, 10, .28), 0 2px 6px rgba(10, 10, 10, .05);
  --sv-ease: cubic-bezier(.2, .7, .2, 1);
}
@keyframes sv-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes sv-ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes sv-rise { from { opacity: 0; transform: translateY(4px); } }

/* ---------------------------------------------------------------- Header */
.sh { margin-bottom: 18px; }
.sh-top { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; flex-wrap: wrap; }
.sh-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sh-icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; background: var(--brand-soft); color: var(--green-ink); border: 1px solid #e3f1b4; }
.sh-icon .i { width: 22px; height: 22px; }
.sh-name { min-width: 0; }
.sh-title { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.sh-title h1 { font-size: 25px; letter-spacing: -0.026em; overflow-wrap: anywhere; max-width: 36ch; }
.sh-kind { margin-top: 1px; font-size: 13px; color: var(--muted); }
.sh-badges { display: inline-flex; gap: 6px; }
.sh-badges:empty { display: none; }
.sh-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sh-actions form { margin: 0; }
.sh-actions .btn { height: 36px; }
.btn.icon-only { width: 36px; padding: 0; }
.btn.icon-only .i { width: 17px; height: 17px; }
.sh-more > summary { list-style: none; }
.sh-more .menu { right: 0; left: auto; min-width: 270px; }
.sh-more[open] > summary { background: var(--hover); }
.menu-item.danger { color: var(--bad-ink); }
.menu-item.danger .i { color: var(--bad-ink); }
.menu-item.danger:hover { background: var(--bad-bg); }

/* The live status: a pill with a dot that pulses while something moves. app.js keeps its text and class current. */
.sh .badge { height: 26px; padding: 0 11px 0 9px; border-radius: 13px; font-size: 13px; gap: 7px; }
.sh .badge::before { -webkit-mask: none; mask: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; border: 0; }
.sh .badge.busy::before { border: 0; animation: sv-pulse 1.3s ease-in-out infinite; }
.sh .badge.ok { background: #e7f5c6; }

.sh-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 0 60px; }
.sh-chip, .sh-addr { display: inline-flex; align-items: center; gap: 7px; min-height: 28px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; color: var(--ink-2); max-width: 100%; }
.sh-chip .i { width: 14px; height: 14px; color: var(--muted); }
.sh-chip a, .sh-addr a { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-chip a:hover { text-decoration: underline; }
.sh-also { color: var(--muted); min-width: 0; }
.sh-also a { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.sh-at { color: var(--faint); }
.sh-addr { padding-right: 3px; font-weight: 500; }
.sh-addr .ext { font-size: 13px; color: var(--ink); max-width: 46ch; display: inline-block; }
.sh-addr code { background: none; padding: 0; font-size: 12.5px; }
.sh-addr .icon-btn { width: 24px; height: 24px; }
.sh-dot { position: relative; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--sv-idle); }
.sh-dot.ok { background: var(--sv-ok); }
.sh-dot.bad { background: var(--sv-bad); }
.sh-dot.busy { background: var(--sv-busy); }
.sh-dot.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--sv-busy); opacity: 0; animation: sv-ping 1.7s ease-out infinite; }
.sh-note { margin: 14px 0 0 60px; }

/* The tab bar sticks under the top bar. app.js adds .stuck once the page scrolls under it. */
.sh-sentinel { height: 1px; margin: 12px 0 -1px; }
.sh-tabs { position: sticky; top: var(--top); z-index: 15; display: flex; gap: 2px; margin: 0 0 24px; padding: 0; background: rgba(255, 255, 255, .98); -webkit-backdrop-filter: saturate(1.4) blur(8px); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; transition: box-shadow .15s; }
.sh-tabs::-webkit-scrollbar { display: none; }
.sh-tabs.stuck { box-shadow: 0 8px 14px -12px rgba(10, 10, 10, .28); }
.sh-tabs a { position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; height: 45px; padding: 0 12px; color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; scroll-snap-align: center; transition: color .12s; }
.sh-tabs a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: transparent; transition: background-color .15s; }
.sh-tabs a .i { width: 15px; height: 15px; }
.sh-tabs a:hover { color: var(--ink); }
.sh-tabs a:hover::after { background: var(--line-strong); }
.sh-tabs a.on { color: var(--ink); font-weight: 600; }
.sh-tabs a.on::after { background: var(--brand-edge); }
.sh-tabs a:focus-visible { outline-offset: -4px; }
.sh-count { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--hover); color: var(--ink-2); font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sh-tabs a.on .sh-count { background: var(--brand-soft); color: var(--green-ink); }
.sh-mark { width: 7px; height: 7px; border-radius: 50%; background: var(--sv-idle); }
.sh-mark.bad { background: var(--sv-bad); }
.sh-mark.busy { background: var(--sv-busy); animation: sv-pulse 1.3s ease-in-out infinite; }

/* ---------------------------------------------------------------- Cards */
.sv-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--sv-r); box-shadow: var(--sv-shadow); overflow: hidden; min-width: 0; }
.sv-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px 10px; }
.sv-card-head h2 { font-size: 15px; }
.sv-card-sub { margin-top: 1px; font-size: 12.5px; color: var(--muted); }
.sv-card > .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.sv-card-foot { padding: 10px 18px 13px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.sv-card-note { margin: 0 18px 8px; }
.sv-cols { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 20vw, 440px); gap: 20px; align-items: start; }
.sv-main, .sv-side { display: grid; gap: 20px; min-width: 0; align-content: start; }

/* A segmented control of links (ranges): works without scripts. */
.sv-seg { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: 9px; background: var(--tint); }
.sv-seg a { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 12.5px; font-weight: 550; color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; transition: background-color .12s, color .12s; }
.sv-seg a:hover { color: var(--ink); }
.sv-seg a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(10, 10, 10, .12), 0 0 0 1px var(--line); }

/* ---------------------------------------------------------------- Health strip */
.sv-strip { display: grid; grid-template-columns: minmax(0, 1.55fr) repeat(3, minmax(0, 1fr)); margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--sv-r); box-shadow: var(--sv-shadow); }
.sv-cell { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 14px 18px 15px; border-left: 1px solid var(--line); }
.sv-cell:first-child { border-left: 0; }
.sv-label { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sv-val { display: flex; align-items: center; gap: 9px; min-width: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; overflow-wrap: anywhere; }
.sv-val.mono { font-size: 13.5px; font-weight: 600; letter-spacing: 0; }
.sv-val b { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sv-of { color: var(--muted); font-weight: 500; font-size: 15px; }
.sv-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.sv-lamp { position: relative; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sv-idle); }
.sv-lamp.ok { background: var(--sv-ok); box-shadow: 0 0 0 4px rgba(77, 138, 0, .14); }
.sv-lamp.bad { background: var(--sv-bad); box-shadow: 0 0 0 4px rgba(208, 59, 59, .14); }
.sv-lamp.busy { background: var(--sv-busy); box-shadow: 0 0 0 4px rgba(217, 150, 26, .16); }
.sv-lamp.pulse::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--sv-busy); opacity: 0; animation: sv-ping 1.7s ease-out infinite; }
.sv-dots { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 4px; }
.sv-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.sv-dots i.on { background: var(--sv-ok); border-color: var(--sv-ok); }
.sv-state { display: inline-flex; align-items: center; gap: 7px; }
.sv-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sv-idle); }
.sv-state.ok { color: var(--ok-ink); } .sv-state.ok::before { background: var(--sv-ok); }
.sv-state.bad { color: var(--bad-ink); } .sv-state.bad::before { background: var(--sv-bad); }
.sv-state.busy { color: var(--busy-ink); } .sv-state.busy::before { background: var(--sv-busy); animation: sv-pulse 1.3s ease-in-out infinite; }
.sv-state.idle { color: var(--muted); }

/* ---------------------------------------------------------------- A failure to fix */
.sv-fail { margin-bottom: 20px; background: var(--surface); border: 1px solid #f1cfc8; border-left: 3px solid var(--sv-bad); border-radius: var(--sv-r); box-shadow: var(--sv-shadow); overflow: hidden; animation: sv-rise .2s var(--sv-ease); }
.sv-fail-head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; background: #fdf3f1; border-bottom: 1px solid #f6dcd6; }
.sv-fail-ico { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--bad-bg); color: var(--bad-ink); }
.sv-fail-ico .i { width: 16px; height: 16px; }
.sv-fail-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; }
.sv-fail-title h2 { font-size: 15px; }
.sv-fail-body { display: grid; gap: 8px; padding: 14px 18px 16px; }
.sv-fail-why { font-size: 14.5px; line-height: 1.55; max-width: 78ch; }
.sv-fail-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.sv-safe { display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 0; font-size: 13.5px; color: var(--ok-ink); }
.sv-safe .i { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.sv-nosafe { font-size: 13.5px; color: var(--muted); }
.sv-suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.sv-fixes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; }
.sv-fixes li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); }
.sv-fixes li > div { display: grid; gap: 1px; min-width: 0; }
.sv-fixes form { margin: 0; flex: none; }
.sv-excerpt-box { background: #0d0f0c; color: #cfd6bf; }
.sv-excerpt-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 16px; border-bottom: 1px solid #23261f; font-size: 12.5px; color: #d7dccb; font-weight: 550; }
.sv-excerpt-head a { color: #9aa38a; font-weight: 500; text-decoration: none; }
.sv-excerpt-head a:hover { color: var(--brand); }
.sv-excerpt { margin: 0; padding: 10px 0; max-height: 240px; overflow: auto; font: 12px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.sv-excerpt .ln { display: block; padding: 0 16px; }
.sv-excerpt .ln.error { color: #ff9c8f; background: rgba(255, 120, 100, .08); }
.sv-excerpt .ln.warn { color: #f0d27a; }
.sv-excerpt:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sv-fail-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 12px 18px; border-top: 1px solid var(--line); }
.sv-fail-foot .actions { gap: 8px; }
.sv-ai-slot:empty { display: none; }

/* ---------------------------------------------------------------- Resources */
.sv-res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sv-metric { display: grid; gap: 8px; align-content: start; min-width: 0; padding: 6px 18px 16px; }
.sv-metric + .sv-metric { border-left: 1px solid var(--line); }
.sv-metric-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sv-metric-name { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sv-metric-name .key.line { width: 12px; }
.sv-metric-now { font-size: 22px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.sv-metric-note { flex-basis: 100%; margin-top: -2px; font-size: 12px; color: var(--muted); }
.sv-pct { margin-left: auto; font-size: 12.5px; font-weight: 550; color: var(--muted); font-variant-numeric: tabular-nums; }
.sv-pct.warn { color: var(--busy-ink); } .sv-pct.hot { color: var(--bad-ink); }
progress.sv-meter { height: 4px; border-radius: 2px; }
progress.sv-meter::-webkit-progress-value { background: var(--viz-1, #5b8c00); border-radius: 2px; }
progress.sv-meter::-moz-progress-bar { background: var(--viz-1, #5b8c00); }
progress.sv-meter.warn::-webkit-progress-value { background: var(--sv-busy); } progress.sv-meter.warn::-moz-progress-bar { background: var(--sv-busy); }
progress.sv-meter.hot::-webkit-progress-value { background: var(--sv-bad); } progress.sv-meter.hot::-moz-progress-bar { background: var(--sv-bad); }
.sv-stats { display: flex; gap: 6px 22px; flex-wrap: wrap; margin: 0; }
.sv-stats > div { display: grid; gap: 1px; }
.sv-stats dt { font: 500 10.5px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sv-stats dd { margin: 0; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sv-empty { display: flex; align-items: center; gap: 16px; padding: 14px 18px 24px; }
.sv-empty h3 { font-size: 14.5px; }
.sv-empty p { margin-top: 2px; max-width: 58ch; color: var(--muted); font-size: 13.5px; }

/* The three widths of a chart: the one that fits the room its box has. */
.sv-viz { container-type: inline-size; position: relative; }
.sv-viz .sv-w, .sv-viz .sv-m { display: none; }
@container (min-width: 480px) { .sv-viz .sv-n { display: none; } .sv-viz .sv-m { display: block; } }
@container (min-width: 760px) { .sv-viz .sv-m { display: none; } .sv-viz .sv-w { display: block; } }
.sv-viz svg.viz { overflow: visible; }
.sv-viz svg.viz .line { stroke-width: 2; vector-effect: non-scaling-stroke; }
.sv-viz svg.viz .limit { stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.sv-viz svg.viz .area { opacity: .13; }
.sv-viz svg.viz .area.s2 { fill: var(--viz-2, #2a78d6); }
.sv-viz svg.viz .line.s2 { stroke: var(--viz-2, #2a78d6); }
.sv-viz svg.viz .focus-dot.s2 { fill: var(--viz-2, #2a78d6); }
.sv-viz svg.viz .lim-label { fill: var(--muted); font-size: 10px; }
.sv-viz svg.viz .xhair { stroke: var(--faint); stroke-dasharray: 2 3; }
.key.s2.line { background: var(--viz-2, #2a78d6); }

/* ---------------------------------------------------------------- Deploys as a rail */
.sv-build { padding: 2px 18px 14px; border-bottom: 1px solid var(--line); }
.sv-build-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sv-build-title { display: flex; align-items: baseline; gap: 10px; min-width: 0; text-decoration: none; font-weight: 600; }
.sv-build-title span:last-child:not(:first-child) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--ink-2); }
.sv-build-title:hover span:last-child { text-decoration: underline; }
.sv-tl { padding: 4px 0 0; }
.sv-tl .tl-btn { cursor: default; }
.sv-tl .tl-btn:hover { background: none; }
.sv-rail { list-style: none; margin: 0; padding: 6px 18px 10px; }
.sv-rail-item { position: relative; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: start; gap: 0 14px; padding: 10px 0 12px; }
.sv-rail-item::before { content: ""; position: absolute; left: 6px; top: 27px; bottom: -11px; width: 2px; background: var(--line); }
.sv-rail-item:last-child::before { display: none; }
.sv-rail-dot { position: relative; z-index: 1; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--sv-idle); background: var(--surface); }
.sv-rail-dot.ok { border-color: var(--sv-ok); background: var(--sv-ok); }
.sv-rail-dot.bad { border-color: var(--sv-bad); background: var(--sv-bad); }
.sv-rail-dot.busy { border-color: var(--sv-busy); animation: sv-pulse 1.3s ease-in-out infinite; }
.sv-rail-item.live .sv-rail-dot { box-shadow: 0 0 0 4px rgba(77, 138, 0, .16); }
.sv-rail-body { display: grid; gap: 2px; min-width: 0; }
.sv-rail-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 14px; }
.sv-rail-title a { text-decoration: none; }
.sv-rail-title a:hover { text-decoration: underline; }
.sv-rail-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.sv-rail-meta .mono { font-size: 12px; }
.sv-rail-why { font-size: 13px; color: var(--bad-ink); overflow-wrap: anywhere; max-width: 70ch; }
.sv-rail-item form { margin: 0; }
.sv-rail-none { padding: 14px 0; color: var(--muted); }
.badge.done { background: var(--idle-bg); color: var(--idle-ink); }

/* ---------------------------------------------------------------- Details, events, quick actions */
.sv-facts { padding: 2px 0 6px; }
.sv-facts > div { padding: 9px 18px; border-top: 0; }
.sv-facts dt { font-size: 10.5px; }
.sv-facts dd { font-size: 13.5px; }
.sv-feed { list-style: none; margin: 0; padding: 0 18px 8px; }
.sv-feed li { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; font-size: 13.5px; }
.sv-feed li > span:last-child { min-width: 0; }
.sv-feed small { display: block; color: var(--muted); font-size: 12.5px; }
.sv-feed-dot { flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--brand-edge); }
.sv-feed-none { color: var(--muted); }
.sv-quick { list-style: none; margin: 0; padding: 0 8px 8px; }
.sv-quick a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; text-decoration: none; font-size: 13.5px; font-weight: 500; transition: background-color .12s; }
.sv-quick a:hover { background: var(--hover); }
.sv-quick .i { width: 16px; height: 16px; color: var(--muted); }

/* ---------------------------------------------------------------- Live log peek */
.sv-peek { border-radius: var(--sv-r); }
.sv-peek-body { height: 236px; overflow: auto; padding: 8px 0; font: 12px/1.65 var(--mono); color: #cfd6bf; }
.sv-peek-body:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.sv-peek-none { padding: 6px 16px; color: #7d8670; }
.pl { display: flex; gap: 12px; padding: 0 16px; white-space: pre; }
.pl:hover { background: #151812; }
.pl-t { flex: none; color: #5f6954; }
.pl-m { white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0; }
.pl.error .pl-m { color: #ff9c8f; } .pl.warn .pl-m { color: #f0d27a; } .pl.debug .pl-m { color: #7d8670; }

/* ---------------------------------------------------------------- Smaller screens */
@media (max-width: 1180px) {
  .sv-cols { grid-template-columns: minmax(0, 1fr); }
  .sv-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-side > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .sv-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-cell { border-left: 0; border-top: 1px solid var(--line); }
  .sv-cell:first-child { border-top: 0; grid-column: 1 / -1; }
  .sv-cell:nth-child(3) { border-left: 1px solid var(--line); }
  .sv-cell:nth-child(n+4) { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .sh-tabs { margin: 0 -18px 20px; padding: 0 12px; }
}
@media (max-width: 700px) {
  .sh-meta, .sh-note { margin-left: 0; }
  .sh-title h1 { font-size: 22px; }
  .sh-actions { width: 100%; }
  .sh-actions .btn { height: 40px; }
  .btn.icon-only { width: 40px; }
  .sh-more { margin-left: auto; }
  .sv-res-grid { grid-template-columns: minmax(0, 1fr); }
  .sv-metric + .sv-metric { border-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .sv-side { grid-template-columns: minmax(0, 1fr); }
  .sv-rail-item { grid-template-columns: 14px minmax(0, 1fr); }
  .sv-rail-item form { grid-column: 2; margin-top: 6px; }
  .sv-fail-foot { align-items: stretch; }
  .sv-fixes li { flex-direction: column; align-items: stretch; }
  .sh-tabs a { height: 48px; padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .sh .badge.busy::before, .sh-dot.pulse::after, .sv-lamp.pulse::after, .sv-rail-dot.busy, .sh-mark.busy, .sv-state.busy::before, .sv-fail { animation: none; }
}

/* ---------------------------------------------------------------- Logs tab */
.lg { position: relative; background: #0d0f0c; border-radius: var(--sv-r); color: #cfd6bf; }
.lg-bar { position: sticky; top: calc(var(--top) + 45px); z-index: 10; display: grid; gap: 8px; padding: 10px 12px; background: #0d0f0c; border-bottom: 1px solid #23261f; border-radius: var(--sv-r) var(--sv-r) 0 0; }
.lg-row1, .lg-row2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lg-row2 { justify-content: space-between; }
.lg-toggles, .lg-end { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lg-search { position: relative; flex: 1 1 260px; min-width: 220px; display: flex; align-items: center; }
.lg-search > .i { position: absolute; left: 10px; width: 14px; height: 14px; color: #7d8670; pointer-events: none; }
.lg-search input { height: 30px; padding: 0 84px 0 31px; font-size: 13px; background: #151812; color: #e5ead7; border-color: #3a3f33; }
.lg-search input::placeholder { color: #7d8670; }
.lg-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(177, 226, 37, .25); }
.lg-count { position: absolute; right: 62px; font-size: 11.5px; color: #9aa38a; pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lg-icon { position: absolute; display: inline-grid; place-items: center; width: 26px; height: 26px; border: 0; background: none; color: #9aa38a; cursor: pointer; border-radius: 6px; }
.lg-icon:hover { color: var(--brand); background: #1a1d17; }
.lg-icon[data-lg-prev] { right: 30px; } .lg-icon[data-lg-next] { right: 4px; }
.lg-icon .i { width: 14px; height: 14px; }
.lg-levels { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.lg-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 14px; border: 1px solid #2d3127; background: transparent; color: #5f6954; font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; transition: background-color .12s, color .12s, border-color .12s; }
.lg-chip span { font-variant-numeric: tabular-nums; opacity: .8; font-weight: 500; }
.lg-chip:hover { color: #cfd6bf; }
.lg-chip[aria-pressed="true"] { background: #1a1d17; border-color: #3a3f33; color: #e5ead7; }
.lg-chip.error[aria-pressed="true"] { background: rgba(255, 120, 100, .12); border-color: rgba(255, 120, 100, .4); color: #ff9c8f; }
.lg-chip.warn[aria-pressed="true"] { background: rgba(240, 210, 122, .1); border-color: rgba(240, 210, 122, .35); color: #f0d27a; }
.lg-chip.debug[aria-pressed="true"] { color: #9aa38a; }
.lg-select select { width: auto; height: 28px; padding: 0 28px 0 10px; font-size: 12.5px; background-color: #151812; color: #e5ead7; border-color: #3a3f33; }
.lg-select select:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(177, 226, 37, .25); }
.lg-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #3a3f33; background: #1a1d17; color: #e5ead7; font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .12s, color .12s; }
.lg-btn:hover { border-color: var(--brand); color: var(--brand); }
.lg-btn .i { width: 13px; height: 13px; }
.lg-btn[aria-pressed="true"] { border-color: #5d6b2c; background: #20260f; }
.lg-btn[aria-pressed="false"] { color: #9aa38a; background: transparent; }
.lg-btn:focus-visible, .lg-chip:focus-visible, .lg-icon:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.lg-stat { display: inline-flex; align-items: center; gap: 7px; margin-right: 6px; font-size: 12px; color: #7d8670; font-variant-numeric: tabular-nums; }
.lg-stat.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: sv-pulse 1.6s ease-in-out infinite; }
.lg-body { position: relative; height: calc(100vh - 330px); min-height: 380px; overflow: auto; font: 12.5px/21px var(--mono); border-radius: 0 0 var(--sv-r) var(--sv-r); }
.lg-body:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.lg-spacer { width: 1px; }
.lg-rows { position: absolute; top: 0; left: 0; min-width: 100%; }
.lg-row { display: flex; gap: 12px; min-height: 21px; padding: 0 16px; white-space: pre; }
.lg-row:hover { background: #151812; }
.lg-row.error { background: rgba(255, 120, 100, .06); box-shadow: inset 2px 0 0 #ff7a6a; }
.lg-n { flex: none; width: 5ch; color: #4d5645; text-align: right; user-select: none; }
.lg-t { flex: none; color: #6f7a62; }
.lg-i { flex: none; width: 5ch; color: #8a9a6a; overflow: hidden; }
.lg-m { flex: none; }
.lg-row.error .lg-m { color: #ff9c8f; } .lg-row.warn .lg-m { color: #f0d27a; } .lg-row.debug .lg-m { color: #7d8670; }
.lg.wrap .lg-rows { position: static; }
.lg.wrap .lg-row { white-space: pre-wrap; }
.lg.wrap .lg-m { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lg-m mark { background: rgba(177, 226, 37, .3); color: inherit; border-radius: 2px; }
.lg-m mark.cur { background: var(--brand); color: #0d0f0c; }
.a-r { color: #ff7b6b; } .a-g { color: #a6e22e; } .a-y { color: #f0d27a; } .a-b { color: #7db3ff; } .a-m { color: #d99cff; } .a-c { color: #6fe0d0; } .a-w { color: #e5ead7; } .a-k { color: #7d8670; }
.a-r2 { color: #ff9c8f; } .a-g2 { color: #c4f25a; } .a-y2 { color: #ffe08a; } .a-b2 { color: #a3ccff; } .a-m2 { color: #e8b8ff; } .a-c2 { color: #8ff0e2; } .a-w2 { color: #fff; } .a-k2 { color: #9aa38a; }
.a-bold { font-weight: 700; } .a-dim { opacity: .6; }
.lg-empty { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 24px; text-align: center; color: #9aa38a; }
.lg-empty h3 { color: #e5ead7; font-size: 15px; }
.lg-empty p { max-width: 48ch; font-size: 13.5px; }
.lg-empty .tile { background: #1a1d17; border-color: #2d3127; color: var(--brand); }
.lg-nojs { padding: 16px; }
.lg-jump { position: absolute; right: 18px; bottom: 18px; z-index: 5; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 14px; border: 0; border-radius: 16px; background: var(--brand); color: #0d0f0c; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .6); animation: sv-rise .15s var(--sv-ease); }
.lg-jump .i { width: 14px; height: 14px; }
@media (max-width: 700px) {
  .lg-bar { position: static; padding: 8px; gap: 6px; }
  .lg-search { flex-basis: 100%; }
  .lg-chip { height: 26px; padding: 0 9px; font-size: 12px; }
  .lg-select { flex: 1 1 96px; }
  .lg-select select { width: 100%; }
  .lg-btn span { display: none; }
  .lg-btn[data-lg-follow] span, .lg-btn[data-lg-copy] span { display: inline; }
  .lg-row2 { gap: 6px; }
  .lg-stat { flex-basis: 100%; margin: 0; order: 2; }
  .lg-end { width: 100%; justify-content: space-between; }
  .lg-body { height: calc(100vh - 300px); min-height: 320px; }
  .lg-row { gap: 8px; padding: 0 10px; }
}

/* ---------------------------------------------------------------- Metrics tab */
.sv-bar { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.sv-charts { display: grid; gap: 20px; }
.sv-chart .sv-card-head { align-items: flex-start; flex-wrap: wrap; padding-bottom: 6px; }
.sv-chart .sv-card-head h2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sv-metric-note.inline { flex: none; margin: 0; font-size: 12.5px; font-weight: 450; color: var(--muted); letter-spacing: 0; }
.sv-stats.big { gap: 6px 26px; }
.sv-stats.big dd { font-size: 15px; }
.sv-chart-body { padding: 4px 18px 14px; }
.sv-chart-body .legend { margin: 0 0 6px; }
.sv-chart-body .viz-table { margin-top: 10px; }
.sv-tablewrap { max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.sv-tablewrap table { font-size: 13px; }
.sv-tablewrap th { position: sticky; top: 0; background: var(--tint); z-index: 1; }
.sv-tablewrap th, .sv-tablewrap td { padding: 7px 14px; }
.sv-tablewrap th:first-child, .sv-tablewrap td:first-child { padding-left: 14px; }
.sv-tablewrap td.num { font-variant-numeric: tabular-nums; }
.key.lim { border-top-style: dashed; }
@media (max-width: 700px) {
  .sv-chart .sv-card-head { padding-bottom: 2px; }
  .sv-stats.big { gap: 6px 18px; }
}

/* ---------------------------------------------------------------- Environment tab */
.envx { position: relative; }
.envx-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 18px 12px; }
.envx-search { position: relative; display: block; flex: 1 1 220px; max-width: 320px; }
.envx-search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--faint); pointer-events: none; }
.envx-search input { height: 28px; padding-left: 30px; font-size: 13px; }
.envx-tally { margin-left: auto; white-space: nowrap; }
.envx-paste { display: grid; gap: 10px; margin: 0 18px 14px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--tint); }
.envx-paste textarea { min-height: 120px; background: var(--surface); }
.envx-preview { display: grid; gap: 8px; }
.envx-pv-sum { font-size: 13.5px; font-weight: 600; }
.envx-pv-empty { font-size: 13.5px; color: var(--muted); }
.envx-pv-list { list-style: none; margin: 0; padding: 0; display: grid; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.envx-pv-list li { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.envx-pv-list li:first-child { border-top: 0; }
.envx-pv-list li > code { background: none; padding: 0; font-weight: 600; }
.envx-pv-list li > span:last-child { margin-left: auto; }
.envx-pv-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 4px; font-size: 11.5px; font-weight: 600; background: var(--idle-bg); color: var(--idle-ink); }
.envx-pv-tag.new { background: var(--ok-bg); color: var(--ok-ink); }
.envx-pv-tag.changed { background: var(--busy-bg); color: var(--busy-ink); }
.envx-pv-tag.bad { background: var(--bad-bg); color: var(--bad-ink); }
.envx-head, .envx-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 28px; gap: 8px; align-items: center; }
.envx-head { padding: 0 18px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.envx-rows { display: grid; gap: 8px; padding: 8px 18px 18px; }
.envx-row { position: relative; }
.envx-row input { font-size: 13px; }
.envx-row.bad input[name="env_key"] { border-color: var(--sv-bad); box-shadow: 0 0 0 3px rgba(208, 59, 59, .12); }
.envx-key { position: relative; }
.envx-key input { padding-right: 78px; }
.envx-badge { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--busy-bg); color: var(--busy-ink); font-size: 11px; font-weight: 600; pointer-events: auto; }
.envx-badge .i { width: 11px; height: 11px; }
.envx-warn { grid-column: 1 / -1; margin: -2px 0 2px; font-size: 12.5px; color: var(--bad-ink); }
.envx-none { padding: 6px 18px 18px; color: var(--muted); }
.envx-foot { margin: 0; }
.envx-names { list-style: none; margin: 0; padding: 0 0 6px; }
.envx-names li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; border-top: 1px solid var(--line); }
.envx-names li:first-child { border-top: 0; }
.envx-names code { background: none; padding: 0; font-weight: 600; }
.envx-build { margin-top: 20px; }
/* The bar that appears with the first edit and stays in view. */
.envx-bar { position: sticky; bottom: 14px; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 0 14px 14px; padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: 0 18px 44px -16px rgba(10, 10, 10, .5); animation: sv-rise .18s var(--sv-ease); }
.envx-bar-text { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.envx-bar-text small { color: #b9b8b0; font-size: 12.5px; }
.envx-bar-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.envx-bar-actions { display: inline-flex; gap: 8px; }
.envx-bar .btn { border-color: #3a3a37; background: transparent; color: #fff; }
.envx-bar .btn:hover { background: #2a2a27; }
.envx-bar .btn.primary { background: var(--brand); border-color: var(--brand); color: #0a0a0a; }
.envx-bar .btn.primary:hover { background: var(--brand-hover); }
.envx-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 70px -24px rgba(10, 10, 10, .5); }
.envx-dialog::backdrop { background: rgba(10, 10, 10, .32); }
.envx-dialog-box { display: grid; gap: 12px; padding: 20px 22px 22px; }
.envx-dialog-list { display: grid; gap: 8px; }
.envx-dl { display: grid; gap: 4px; font-size: 13.5px; }
.envx-dl > span { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.envx-dl code { font-size: 12px; }
.envx-dialog-note { padding: 10px 12px; border-radius: 8px; background: var(--tint); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 700px) {
  .envx-head { display: none; }
  .envx-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .envx-row .secret { grid-column: 1; }
  .envx-row .envx-remove, .envx-row [data-envx-remove] { grid-row: 1; grid-column: 2; }
  .envx-tally { margin-left: 0; flex-basis: 100%; }
  .envx .sv-card-head { flex-wrap: wrap; }
  .envx-row { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .envx-rows { gap: 12px; }
  .envx-bar { margin: 0 8px 8px; }
}

/* ---------------------------------------------------------------- Domains tab */
.sv-card.dom { gap: 0; padding: 0; display: block; }
.sv-card.dom > * { margin-left: 18px; margin-right: 18px; }
.sv-card.dom > .dom-head { margin-top: 14px; }
.sv-card.dom > .dom-meta { margin-top: 12px; margin-bottom: 14px; }
.sv-card.dom .dom-msg { margin-top: 12px; }
.sv-card.dom .dom-records { margin-top: 14px; }
.sv-card.dom.bad { border-color: #f1cfc8; }
.dom-add { margin-bottom: 24px; }
.dom-steps { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; padding: 0; margin-top: 12px; margin-bottom: 0; }
.dom-steps li { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 11px 0 9px; border-radius: 13px; background: var(--tint); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); font-weight: 500; }
.dom-steps li i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); }
.dom-steps li.done { color: var(--ok-ink); background: var(--ok-bg); border-color: #d5eb9a; }
.dom-steps li.done i { border-color: var(--sv-ok); background: var(--sv-ok); }
.dom-steps li.now { color: var(--busy-ink); background: var(--busy-bg); border-color: #f0dca0; }
.dom-steps li.now i { border-color: var(--sv-busy); background: var(--sv-busy); animation: sv-pulse 1.3s ease-in-out infinite; }
.dom-records-lead { color: var(--ink-2); }
.tag.primary-tag { gap: 4px; background: var(--ok-bg); color: var(--ok-ink); }
.tag.primary-tag .i { width: 12px; height: 12px; }
.dom-primary-note { margin: 0; }
.dom-msg.ok { background: var(--ok-bg); border-color: #d5eb9a; color: var(--ok-ink); }
.dom-msg.ok .i { color: var(--ok-ink); }
.sv-card.dom > .dom-redirect { margin-top: 14px; }
.dom-redirect { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.dom-redirect label { color: var(--muted); font-weight: 500; }
.dom-redirect select { width: auto; min-width: 220px; max-width: 100%; height: 32px; font-size: 13px; }
.dns { display: grid; gap: 10px; }
.dns-rec { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); min-width: 0; }
.dns-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dns-top .tag { background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11.5px; }
.dns-what { font-size: 12.5px; color: var(--muted); }
.dns-state { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; height: 22px; padding: 0 8px; border-radius: 11px; font-size: 12px; font-weight: 600; }
.dns-state .i { width: 13px; height: 13px; }
.dns-state.ok { background: var(--ok-bg); color: var(--ok-ink); }
.dns-state.wait { background: var(--idle-bg); color: var(--idle-ink); }
.dns-state.bad { background: var(--bad-bg); color: var(--bad-ink); }
.dns-fields { margin: 0; display: grid; gap: 6px; }
.dns-fields > div { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: start; gap: 8px; }
.dns-fields dt { padding-top: 3px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.dns-fields dd { display: flex; align-items: flex-start; gap: 8px; margin: 0; min-width: 0; }
.dns-fields code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; overflow-wrap: anywhere; font-size: 12.5px; }
.dns-fields small { align-self: center; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.dns-fields .icon-btn { flex: none; margin-top: -2px; }
.dom-empty { display: grid; justify-items: start; }

/* ---------------------------------------------------------------- Events tab */
.ev-filters { display: flex; gap: 6px; flex-wrap: wrap; padding: 4px 18px 6px; }
.sv-chipbtn { height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 550; cursor: pointer; transition: background-color .12s, color .12s, border-color .12s; }
.sv-chipbtn:hover { color: var(--ink); border-color: var(--line-strong); }
.sv-chipbtn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ev-day { padding: 8px 18px 4px; }
.ev-dayh { display: flex; align-items: baseline; gap: 10px; padding: 12px 0 4px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ev-dayh b { color: var(--ink); font-weight: 650; }
.ev-list { list-style: none; margin: 0; padding: 0; }
.ev-item { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 0 14px; align-items: start; padding: 10px 0 12px; }
.ev-item::before { content: ""; position: absolute; left: 12px; top: 34px; bottom: -8px; width: 2px; background: var(--line); }
.ev-item:last-child::before { display: none; }
.ev-dot { position: relative; z-index: 1; justify-self: center; width: 14px; height: 14px; margin-top: 5px; border-radius: 50%; border: 2px solid var(--sv-idle); background: var(--surface); }
.ev-item.ok .ev-dot { border-color: var(--sv-ok); background: var(--sv-ok); }
.ev-item.bad .ev-dot { border-color: var(--sv-bad); background: var(--sv-bad); }
.ev-item.busy .ev-dot { border-color: var(--sv-busy); animation: sv-pulse 1.3s ease-in-out infinite; }
.ev-item.live .ev-dot { box-shadow: 0 0 0 4px rgba(77, 138, 0, .16); }
.ev-item.event .avatar { width: 24px; height: 24px; font-size: 11px; margin-top: 1px; position: relative; z-index: 1; }
.ev-main { display: grid; gap: 2px; min-width: 0; }
.ev-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.ev-item.deploy .ev-title { font-weight: 600; }
.ev-title a { text-decoration: none; }
.ev-title a:hover { text-decoration: underline; }
.ev-title b { font-weight: 600; }
.ev-title code { font-size: 12px; }
.ev-meta { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.ev-meta .mono { font-size: 12px; }
.ev-why { margin-top: 4px; max-width: 74ch; }
.ev-item form { margin: 0; }
.ev-item details.tail { margin-top: 4px; }
.ev-none { display: grid; justify-items: start; gap: 6px; padding: 24px 18px 28px; }
.ev-none p { max-width: 56ch; color: var(--muted); }
.ev-nomatch { padding: 18px; color: var(--muted); }
.ev-day:last-of-type { padding-bottom: 12px; }

/* ---------------------------------------------------------------- Settings tab: sections with a side navigation */
.st { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 36px; align-items: start; }
.st-nav { position: sticky; top: calc(var(--top) + 69px); display: grid; gap: 2px; }
.st-nav a { display: block; padding: 7px 12px; border-left: 2px solid var(--line); color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; transition: color .12s, border-color .12s, background-color .12s; }
.st-nav a:hover { color: var(--ink); }
.st-nav a.on { color: var(--ink); border-left-color: var(--brand-edge); font-weight: 600; background: linear-gradient(90deg, var(--brand-soft), transparent); }
.st-nav a:last-child:not(:only-child) { margin-top: 10px; }
.st-body { min-width: 0; }
.st-body > .section:first-child { margin-top: 0; }
.st-body .section { scroll-margin-top: calc(var(--top) + 69px); }
.st-body .section > h2 { font-size: 17px; }
.st-body .section-sub { margin: -6px 0 14px; max-width: 70ch; color: var(--muted); font-size: 13.5px; }
.st-body .st-head { margin-top: 40px; margin-bottom: 0; }
.st-body .st-head .section-sub { margin-bottom: 4px; }
.st-body form.card.rows { padding: 4px 22px 18px; margin-top: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--sv-r); box-shadow: var(--sv-shadow); }
.st-body .card.rows > .row:first-of-type { padding-top: 18px; }
.st-body .danger-card { border-radius: var(--sv-r); overflow: hidden; }

/* ---------------------------------------------------------------- Shell tab */
.sv-shell-note { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 14px; padding: 11px 14px; border-radius: 10px; border: 1px solid #f0dca0; background: #fffaea; font-size: 13.5px; color: var(--ink-2); }
.sv-shell-note .i { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--busy-ink); }
.sv-shell-note b { color: var(--ink); font-weight: 600; }
.term.shx { border-radius: var(--sv-r); box-shadow: 0 12px 32px -18px rgba(10, 10, 10, .45); }
.shx .term-head { padding: 9px 14px; }
.shx-title { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; }
.shx-title .muted { color: #7d8670; font-family: var(--mono); font-size: 12px; font-weight: 450; }
.shx-dots { display: inline-flex; gap: 6px; }
.shx-dots i { width: 10px; height: 10px; border-radius: 50%; background: #2d3127; }
.shx .term-head .live::before { background: #d9961a; }
.shx .term-head .live[data-state="connected"]::before { background: var(--brand); }
.shx .term-head .live[data-state="off"]::before { background: #ff7a6a; animation: none; }
.shx .xterm-box { height: calc(100vh - 360px); min-height: 360px; }
@media (max-width: 1000px) {
  .st { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .st-nav { position: sticky; top: calc(var(--top) + 45px); z-index: 9; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; background: rgba(255, 255, 255, .95); scrollbar-width: none; }
  .st-nav::-webkit-scrollbar { display: none; }
  .st-nav a { flex: none; border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; font-size: 13px; background: var(--surface); }
  .st-nav a.on { border-color: var(--brand-edge); background: var(--brand-soft); }
  .st-nav a:last-child:not(:only-child) { margin-top: 0; }
  .st-body .section { scroll-margin-top: calc(var(--top) + 110px); }
}
@media (max-width: 700px) {
  .ev-item { grid-template-columns: 22px minmax(0, 1fr); }
  .ev-item form { grid-column: 2; margin-top: 6px; }
  .ev-item::before { left: 10px; }
  .dns-fields > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dns-fields dt { padding-top: 0; }
  .st-body form.card.rows { padding: 2px 14px 14px; }
}

/* ---------------------------------------------------------------- Cron job: runs */
.rb-box { padding: 4px 18px 14px; }
.rb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; font-size: 12.5px; color: var(--muted); }
.rb-key { display: inline-flex; align-items: center; gap: 6px; }
.rb-key i { width: 10px; height: 10px; border-radius: 3px; background: var(--viz-2, #2a78d6); margin-left: 8px; }
.rb-key i.bad { background: var(--sv-bad); }
.rb-svg { display: block; width: 100%; height: auto; }
.rb-base { stroke: var(--line-strong); stroke-width: 1; shape-rendering: crispEdges; }
.rb { fill: var(--viz-2, #2a78d6); }
.rb.bad { fill: var(--sv-bad); } .rb.busy { fill: var(--sv-busy); }
.rb:hover { opacity: .75; }
.sv-runs { border-top: 1px solid var(--line); overflow-x: auto; }
.sv-runs table { font-size: 13.5px; }
.sv-runs th { padding: 10px 14px; background: var(--tint); }
.sv-runs th:first-child, .sv-runs td:first-child { padding-left: 18px; }
.sv-runs th:last-child, .sv-runs td:last-child { padding-right: 18px; }
.sv-runs tbody tr:last-child td { border-bottom: 0; }
.sv-runs tr[data-run].sel td { background: var(--brand-soft); }

/* ---------------------------------------------------------------- Database: backups as a timeline */
.bt-box { margin: 0 0 16px; padding: 14px 18px 8px; border: 1px solid var(--line); border-radius: var(--sv-r); background: var(--surface); box-shadow: var(--sv-shadow); }
.bt-head { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin-bottom: 4px; }
.bt-head .btn { margin-left: auto; }
.bt-svg { display: block; width: 100%; height: auto; max-height: 90px; }
.bt-track { fill: var(--brand-soft); stroke: #d5eb9a; stroke-width: 1; }
.bt-tick { stroke: var(--line-strong); stroke-width: 1; }
.bt-label { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bt-dot { stroke: var(--surface); stroke-width: 2; fill: var(--sv-ok); }
.bt-dot.bad { fill: var(--sv-bad); } .bt-dot.busy { fill: var(--sv-busy); }
.rs-window { margin-bottom: 16px; }
.rs-steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rs-steps li { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); font-size: 13.5px; color: var(--ink-2); }
.rs-steps b { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; }
.rs-steps strong { display: block; color: var(--ink); }
.rs-form { padding: 4px 22px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--sv-r); box-shadow: var(--sv-shadow); }
#backups, #metrics, #size, #danger, #connection { scroll-margin-top: calc(var(--top) + 69px); }
.viz-card.sv-card { box-shadow: var(--sv-shadow); border-radius: var(--sv-r); overflow: hidden; }
@media (max-width: 860px) { .rs-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .sv-runs th:nth-child(2), .sv-runs td:nth-child(2) { display: none; }
  .sv-runs td, .sv-runs th { padding-left: 10px; padding-right: 10px; }
}


/* === ai === */
/* Kilby AI: the panel of a failed build or deploy, the consent screen and the usage tables. */
.card.ai { margin: 0 0 16px; }
.card.ai > .card-head { padding: 12px 18px; }
.ai-title { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.ai-title .i { color: var(--green-ink); }
.ai-title h2 { font-size: 15px; }
.ai-body { display: grid; gap: 16px; }
.ai-answer { font-size: 17px; line-height: 1.35; letter-spacing: -.012em; }
.ai-cause { color: var(--ink-2); max-width: 76ch; }
.ai-block { display: grid; gap: 8px; }
.ai-block h4 { margin: 0; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ai-block ol { margin: 0; padding: 0 0 0 20px; display: grid; gap: 5px; max-width: 76ch; }
.ai-block .fixes { margin: 0; }
.ai-block .hint.flush, .hint.flush { margin: 2px 0 0; }
.conf { display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 12.5px; font-weight: 550; background: var(--idle-bg); color: var(--idle-ink); white-space: nowrap; }
.conf::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.conf.high { background: var(--ok-bg); color: var(--ok-ink); }
.conf.medium { background: var(--busy-bg); color: var(--busy-ink); }
.conf-n { font-variant-numeric: tabular-nums; opacity: .8; }
.card.ai > .foot.ai-foot { align-items: flex-start; flex-wrap: wrap; gap: 12px 24px; }
.ai-foot p { max-width: 70ch; }
.ai-foot code { white-space: nowrap; }
.ai-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ai-actions form { margin: 0; }
.card.ai.is-active { border-color: #f0dca0; }
.card.ai.is-failed { border-style: dashed; }
.ai-skel { display: grid; gap: 9px; max-width: 70ch; }
.ai-skel span { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--idle-bg) 25%, var(--hover) 50%, var(--idle-bg) 75%); background-size: 300% 100%; animation: ai-shimmer 1.6s linear infinite; }
.ai-skel span:nth-child(1) { width: 62%; } .ai-skel span:nth-child(2) { width: 88%; } .ai-skel span:nth-child(3) { width: 46%; }
@keyframes ai-shimmer { to { background-position: -300% 0; } }
@media (prefers-reduced-motion: reduce) { .ai-skel span { animation: none; } }
.ai-body.ai-offer { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; }
.ai-offer h2 { font-size: 15px; }
.ai-offer p { margin-top: 2px; max-width: 70ch; }
.ai-offer form { margin: 0; }
/* Inside the table of deploys the panel is a plain block under the failure, not a card. */
.deploy-cell .card.ai { margin: 12px 0 0; max-width: 640px; }
.deploy-cell .ai-body.ai-offer { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 8px; }
.deploy-cell .ai-offer .tile { display: none; }
.deploy-cell .ai-answer { font-size: 15px; }
.deploy-cell .card.ai small { display: inline; margin: 0; }

/* The settings page. */
.ai-terms .row .lead span { max-width: 34ch; }
.ai-terms ul { margin: 0; padding: 0 0 0 18px; display: grid; gap: 5px; }
.ai-terms p + p, .ai-terms ul + p { margin-top: 6px; }
.ai-terms .ctl > p, .ai-terms li { max-width: 74ch; }
.ai-consent { display: grid; gap: 14px; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--tint); margin-top: 20px; }
.ai-consent label { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.ai-consent input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: #0a0a0a; }
.ai-consent .actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ai-consent .actions form { margin: 0; }
.ai-state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ai-state form { margin: 0 0 0 auto; }
.ai-meter { display: grid; gap: 8px; max-width: 420px; }
.ai-meter progress { height: 6px; }
.ai-meter .meter-text { margin: 0; }
details.ai-recap { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
details.ai-recap > summary { padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
details.ai-recap > summary::-webkit-details-marker { display: none; }
details.ai-recap > summary::after { content: "Show"; margin-left: auto; font-weight: 500; font-size: 13px; color: var(--muted); }
details.ai-recap[open] > summary::after { content: "Hide"; }
details.ai-recap .card.rows { padding: 0 18px 8px; }
.ai-use td { vertical-align: top; }
.ai-use .small { color: var(--muted); }
@media (max-width: 760px) {
  .ai-body.ai-offer { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .ai-body.ai-offer .tile { display: none; }
  .ai-state form { margin-left: 0; }
  .ai-hide-sm { display: none; }
  .ai-consent .actions .btn { width: 100%; }
}
.ai-tiles { margin-bottom: 16px; }
.ai-tiles .usage-value .of { font-size: 14px; font-weight: 500; }
.ai-tiles progress { margin: 2px 0 0; }
.ai-terms a .i { width: 12px; height: 12px; margin-left: 3px; vertical-align: -1px; color: var(--muted); }
.ai-fixes li > span { display: block; margin-top: 1px; }
@media (max-width: 760px) {
  .ai-actions .btn, .ai-body .btn, .ai-offer .btn { min-height: 44px; }
  .card.ai > .foot.ai-foot { flex-direction: column; align-items: stretch; }
}
@media (max-width: 760px) {
  .ai-use .cell-main small { white-space: normal; }
}

/* === billing === */
/* Billing pages: the plan and its meters, the estimate, plans, an invoice you can print. Colors come from
   the usage pages (--viz-*) and the status colors above. Meters: the fill says how full (green, then amber,
   then red), the track is a lighter step of the same hue. */
.note.bill-info { background: var(--tint); }
.note.bill-warn { background: #fffaea; border-color: #f0dca0; }
.note.bill-warn .i { color: var(--busy-ink); }
.note.bill-bad { background: var(--bad-bg); border-color: #f4c9c1; color: var(--bad-ink); }
.note.bill-bad .i { color: var(--bad-ink); }
.note.bill-bad a { color: var(--bad-ink); font-weight: 600; text-decoration-color: currentColor; }
.note a { font-weight: 500; }
small.block, .block { display: block; }
.sub-h { margin: -4px 0 12px; font-size: 13.5px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.plan-card { padding: 0; margin-bottom: 22px; }
.plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 20px 14px; flex-wrap: wrap; }
.plan-head h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 22px; letter-spacing: -0.02em; margin: 2px 0 4px; }
.plan-fee { display: grid; gap: 2px; text-align: right; }
.plan-fee b { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.plan-fee small { color: var(--muted); font-size: 12.5px; }
.meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 36px; padding: 6px 20px 16px; }
.meters-card .meters { padding-top: 14px; }
.meter-row { display: grid; grid-template-columns: 124px minmax(60px, 1fr) minmax(0, auto); align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); min-width: 0; }
.meters .meter-row:nth-child(-n+2) { border-top: 0; }
.meter-row.compact { grid-template-columns: minmax(80px, 1fr) minmax(0, auto); border-top: 0; padding: 4px 0 0; }
.meter-label { font-size: 13.5px; color: var(--ink-2); }
.meter-val { font-size: 13.5px; font-variant-numeric: tabular-nums; text-align: right; }
.meter-val b, .meter-val .muted { white-space: nowrap; }
.meter-val b { font-weight: 600; }
.meter-note { display: block; font-size: 12px; color: var(--muted); }
.legend-unit { margin-left: auto; font-size: 12.5px; }
.meter-note.warn { color: var(--busy-ink); } .meter-note.bad { color: var(--bad-ink); font-weight: 500; }
svg.meter { display: block; width: 100%; height: 6px; }
svg.meter .track { fill: #e6efcc; }
svg.meter .fill { fill: var(--viz-1); }
svg.meter.warn .track { fill: #f6e8c4; } svg.meter.warn .fill { fill: #c98500; }
svg.meter.bad .track { fill: #f7d9d3; } svg.meter.bad .fill { fill: #d4402f; }

table.ranked { width: 100%; }
table.ranked .rank-cell { white-space: nowrap; min-width: 160px; }
svg.rank { display: inline-block; width: 120px; height: 8px; margin-right: 10px; vertical-align: middle; }
svg.rank .rank-bar { fill: var(--viz-1); }
tr.sub td { padding-top: 2px; padding-bottom: 6px; font-size: 12.5px; border-top: 0; }
tr.sub td:first-child { padding-left: 42px; }
.only-sm { display: none; }
table.ranked tbody tr:not(.sub) td { border-bottom-color: transparent; }
table.ranked tbody tr.sub:last-child td, table.ranked tbody tr:has(+ tr:not(.sub)) td { border-bottom-color: var(--line); }

.pay-card { padding: 0; }
.pay-line { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.pay-line > div:not(.row-actions) { flex: 1 1 260px; min-width: 0; }
.pay-line .row-actions { margin-left: auto; flex-wrap: wrap; }
.card-art { display: grid; place-items: center; width: 44px; height: 30px; border-radius: 5px; background: var(--ink); color: #fff; flex: none; }
.card-art .i { width: 16px; height: 16px; }
.card-art.off { background: var(--hover); color: var(--muted); border: 1px dashed var(--line-strong); }
.pay-owed { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid #f4c9c1; background: var(--bad-bg); color: var(--bad-ink); flex-wrap: wrap; font-size: 13.5px; }
.pay-owed > span:not(.badge) { flex: 1 1 240px; }
.cancel-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; flex-wrap: wrap; }
.cancel-card p { max-width: 62ch; }

/* Plans: one column per plan, one row per limit. On a phone the table scrolls inside its own box. */
.plan-table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.plan-table table { min-width: 720px; border-collapse: separate; border-spacing: 0; }
.plan-table th[scope="row"] { position: sticky; left: 0; background: var(--surface); font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); text-align: left; width: 170px; z-index: 1; }
.plan-table th, .plan-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.plan-table td.current, .plan-table th.current { background: var(--brand-soft); }
.plan-table thead th { padding-top: 18px; padding-bottom: 14px; }
.plan-th { text-transform: none; letter-spacing: 0; font-family: var(--sans); font-weight: 400; }
.plan-th span { display: block; }
.plan-name { font-size: 15px; font-weight: 600; color: var(--ink); }
.plan-price { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; }
.plan-per { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.plan-sum td { font-size: 13px; color: var(--muted); min-width: 150px; }
.plan-table tfoot td, .plan-table tfoot th { border-bottom: 0; }
.plan-act form { margin: 0; }
.plan-act .btn { width: 100%; justify-content: center; text-align: center; height: auto; min-height: 34px; padding: 6px 10px; white-space: normal; }

/* Plans on a phone: one card per plan instead of a table that scrolls sideways. */
.plan-cards { display: none; }
.plan-card { padding: 18px; display: grid; gap: 12px; }
.plan-card.current { border-color: var(--brand); background: var(--brand-soft); }
.plan-card header { display: grid; gap: 1px; }
.plan-card-sum { margin: 0; font-size: 13.5px; color: var(--muted); }
.plan-card dl.facts-lines { background: var(--surface); }
.plan-card dl.facts-lines dd { text-align: right; white-space: normal; font-weight: 500; }
.plan-card .plan-act { display: grid; }

/* Confirming a change of plan. */
.confirm { max-width: 760px; }
.confirm-body { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; padding: 22px; }
.confirm-price { display: grid; gap: 4px; align-content: start; }
.confirm-price b { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.confirm-price small { color: var(--muted); font-size: 12.5px; }
.confirm-text { display: grid; gap: 10px; min-width: 0; }
.confirm-text h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin-top: 8px; }
.confirm-text h2:first-child { margin-top: 0; }
ul.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.checks li { display: flex; gap: 10px; align-items: flex-start; }
ul.checks .i { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--green-ink); }
dl.facts-lines { margin: 0; display: grid; border: 1px solid var(--line); border-radius: var(--radius-sm); }
dl.facts-lines > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 14px; border-top: 1px solid var(--line); }
dl.facts-lines > div:first-child { border-top: 0; }
dl.facts-lines dt { color: var(--ink-2); }
dl.facts-lines > div.total { background: var(--hover); }
dl.facts-lines > div.total dt { color: var(--ink); font-weight: 500; }
dl.facts-lines dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.confirm .foot { gap: 12px; }
.confirm .foot form { margin: 0; }

/* An invoice: clean, and printable. */
.invoice-doc { max-width: 860px; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 38px 30px; background: var(--surface); }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--ink); }
.doc-brand { display: flex; align-items: center; gap: 12px; }
.doc-brand span { display: grid; line-height: 1.3; }
.doc-brand small { color: var(--muted); font-size: 12.5px; }
.doc-title { text-align: right; display: grid; gap: 2px; }
.doc-title h2 { font-size: 24px; letter-spacing: -0.02em; }
.doc-meta { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 22px; margin: 22px 0 26px; }
.doc-meta dt { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.doc-meta dd { margin: 0; display: grid; gap: 1px; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.doc-meta dd span { color: var(--muted); }
.doc-total { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.doc-table table { width: 100%; }
.doc-table td small { font-size: 12.5px; }
.doc-table tfoot td { border-top: 1px solid var(--line); padding-top: 10px; padding-bottom: 10px; font-weight: 400; }
.doc-table tfoot tr.subtotal td { border-top: 2px solid var(--line-strong); }
.doc-table tfoot tr.grand td { border-top: 2px solid var(--ink); font-weight: 700; font-size: 16px; }
.doc-foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); max-width: 90ch; }
.doc-foot p { margin: 0; }

/* Admin */
.live-panel { padding: 0; margin-bottom: 24px; border-color: #f0dca0; background: #fffdf5; }
.live-panel .card-head { border-bottom-color: #f0dca0; }
.live-panel > .card-body { padding-bottom: 8px; max-width: 80ch; }
ul.blockers { list-style: none; margin: 0; padding: 4px 18px 14px; display: grid; gap: 10px; }
ul.blockers li { display: flex; gap: 12px; align-items: flex-start; }
ul.blockers .b-mark { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--busy-bg); color: var(--busy-ink); margin-top: 1px; }
ul.blockers li.done .b-mark { background: var(--ok-bg); color: var(--ok-ink); }
ul.blockers .i { width: 13px; height: 13px; }
ul.blockers small { max-width: 80ch; font-size: 13px; }
.dry-form { align-items: flex-end; margin-bottom: 18px; padding: 14px 18px; }
.dry-form select { min-width: 190px; }
.ovr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.ovr-grid label { display: grid; gap: 5px; font-size: 13px; font-weight: 500; }

/* The simulated Stripe. */
.dev-note { margin-bottom: 20px; }
.dev-card { max-width: 640px; }
.dev-card.card.rows { padding: 4px 18px; }

@media (max-width: 1000px) {
  .tiles.four, .tiles.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles.four > div:nth-child(odd), .tiles.five > div:nth-child(odd) { border-left: 0; }
  .tiles.four > div:nth-child(n+3), .tiles.five > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tiles.five > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .meters { grid-template-columns: 1fr; padding-top: 0; }
  .meters .meter-row:nth-child(2) { border-top: 1px solid var(--line); }
  .doc-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .hide-sm { display: none !important; }
  .only-sm { display: inline; }
  .plan-table { display: none; }
  .plan-cards { display: grid; gap: 14px; }
  .confirm-body { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .invoice-doc { padding: 22px 18px; }
  .doc-head { flex-direction: column; }
  .doc-title { text-align: left; }
  .plan-fee { text-align: left; }
  .meter-row { grid-template-columns: 92px minmax(40px, 1fr); row-gap: 3px; }
  .meter-row .meter-val { grid-column: 1 / -1; text-align: left; white-space: normal; }
  .meter-row.compact { grid-template-columns: 1fr; }
  .ovr-grid { grid-template-columns: 1fr; }
  .two { grid-template-columns: 1fr; }
  .pay-line .row-actions { margin-left: 0; width: 100%; }
  .pay-line .row-actions .btn { width: 100%; justify-content: center; }
  .dry-form { flex-direction: column; align-items: stretch; }
  .dry-form select { min-width: 0; width: 100%; }
}
@media (max-width: 540px) {
  .tiles.four, .tiles.five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
  .rail, .top, .no-print, .jump, .note, .crumbs { display: none !important; }
  body.app { padding: 0; background: #fff; }
  .main { margin: 0; padding: 0; }
  .page { max-width: none; padding: 0; }
  .invoice-doc { border: 0; padding: 0; max-width: none; }
  .hide-sm { display: table-cell !important; }
}

/* === bp === */
/* Kilby Blueprints: the list, the plan screen, a blueprint's page and the reference. */
.block { display: block; }
.bp-pending { display: block; margin-top: 2px; }

/* The head of a blueprint page: the sentence under the title stays readable, and the buttons sit next to it. */
.bp-head > div:first-child { flex: 1 1 420px; min-width: 0; }
.bp-head .sub { max-width: 64ch; }

/* Cards whose title, sentence and button do not fit on one line on a phone. */
.bp-ai .card-head, .bp-suggest .card-head, .bp-adopt .card-head { flex-wrap: wrap; align-items: flex-start; }
.bp-ai .card-head > div:first-child { flex: 1 1 260px; min-width: 0; }

/* The cards of a blueprint page are separated like the rest of the dashboard's cards. */
.bp-head ~ section.card { margin-bottom: 24px; }

/* Where to start, on the empty list. */
.bp-starts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 900px; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bp-starts a { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; margin: -1px 0 0 -1px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background-color .12s; }
.bp-starts a:hover { background: var(--tint); }
.bp-starts span:last-child { display: grid; gap: 3px; min-width: 0; }
.bp-starts small { color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Tabs of the new-blueprint page. */
.bp-tabs { display: flex; gap: 4px; margin: -6px 0 18px; border-bottom: 1px solid var(--line); }
.bp-tabs a { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; margin-bottom: -1px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.bp-tabs a:hover { color: var(--ink); }
.bp-tabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand-edge); }
.bp-tabs .i { width: 15px; height: 15px; }

/* The repository picker: a list under the input that narrows as you type. */
.bp-repos { display: grid; max-height: 260px; overflow: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); box-shadow: 0 8px 24px rgba(10, 10, 10, .08); }
.bp-repos button { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; color: var(--ink); }
.bp-repos button:first-child { border-top: 0; }
.bp-repos button:hover, .bp-repos button:focus-visible { background: var(--brand-soft); outline: none; }
.bp-repos small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.bp-repos .none { padding: 12px; color: var(--muted); font-size: 13.5px; }
.bp-working { display: inline-flex; align-items: center; gap: 8px; }
.bp-working .i { width: 15px; height: 15px; }
.bp-suggest { margin-bottom: 18px; }

/* The plan: counts and cost, then the resources. */
.bp-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.6fr); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.bp-summary > div { display: grid; gap: 2px; align-content: center; padding: 14px 18px; border-left: 1px solid var(--line); }
.bp-summary > div:first-child { border-left: 0; }
.bp-count b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bp-count span, .bp-cost span { font-size: 13px; color: var(--muted); }
.bp-count.create b { color: var(--green-ink); }
.bp-count.update b { color: var(--busy-ink); }
.bp-count.delete b, .bp-count.blocked b { color: var(--bad-ink); }
.bp-count.zero b { color: var(--faint); }
.bp-cost b { font-size: 24px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.bp-cost b small { font-size: 14px; font-weight: 450; color: var(--muted); letter-spacing: 0; }
.bp-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 4px; font-size: 12px; font-weight: 600; letter-spacing: .01em; background: var(--idle-bg); color: var(--idle-ink, #55544f); }
.bp-chip.create { background: var(--ok-bg); color: var(--ok-ink); }
.bp-chip.update { background: var(--busy-bg); color: var(--busy-ink); }
.bp-chip.delete, .bp-chip.blocked { background: var(--bad-bg); color: var(--bad-ink); }
.bp-needs { margin-left: 6px; }
.bp-resources { margin-bottom: 24px; }
.bp-resources td { vertical-align: top; }
.bp-resources .cell-main { align-items: flex-start; }
.bp-what { min-width: 260px; }
.bp-what p { font-size: 13.5px; color: var(--ink-2); }
.bp-what p + p, .bp-what p + details, .bp-what ul + details { margin-top: 6px; }
.bp-reason, .bp-what .bp-reason { color: var(--bad-ink); font-size: 13.5px; }
.bp-dep, .bp-what .bp-dep { font-size: 12.5px; color: var(--muted); }
.bp-why { margin: 4px 0 0; padding-left: 18px; font-size: 13px; color: var(--busy-ink); }
.bp-row.delete td:first-child b, .bp-row.blocked td:first-child b { color: var(--bad-ink); }
.bp-row.unchanged td { color: var(--muted); }
.bp-more summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.bp-more summary:hover { color: var(--ink); }
.bp-diffs { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.bp-diff { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; font-size: 13px; padding: 3px 8px; border-radius: 4px; background: var(--tint); }
.bp-diff-label { color: var(--muted); min-width: 120px; }
.bp-diff-from { font-family: var(--mono); font-size: 12.5px; color: var(--bad-ink); text-decoration: line-through; text-decoration-color: rgba(161, 39, 26, .4); overflow-wrap: anywhere; }
.bp-diff-to { font-family: var(--mono); font-size: 12.5px; color: var(--ok-ink); overflow-wrap: anywhere; }
.bp-diff-note { font-size: 12px; color: var(--muted); }
.bp-arrow { color: var(--faint); }
.bp-diff.risky { background: var(--bad-bg); }

/* Limits after the plan. */
.bp-usage { margin-bottom: 20px; }
.bp-usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.bp-use { display: grid; gap: 6px; padding: 14px 18px; border-left: 1px solid var(--line); }
.bp-use:first-child { border-left: 0; }
.bp-use b { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bp-use b small { font-size: 12.5px; font-weight: 450; color: var(--muted); }
.bp-use.over b { color: var(--bad-ink); }
.bp-use.over progress::-webkit-progress-value { background: #d9604f; }
.bp-use.over progress::-moz-progress-bar { background: #d9604f; }

/* Findings: an error or a warning with its line and what to do. */
.bp-findings { display: grid; gap: 10px; }
.bp-finding-card { display: grid; gap: 4px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); border-left-width: 3px; background: var(--surface); }
.bp-finding-card.bad { border-left-color: #d9604f; background: #fffafa; }
.bp-finding-card.busy { border-left-color: #e0b341; }
.bp-finding-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bp-finding-msg { font-size: 14px; font-weight: 500; }
.bp-fix { display: flex; align-items: center; gap: 6px; color: var(--green-ink); }
.bp-fix .i { width: 14px; height: 14px; }
.bp-explain { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--brand-soft); font-size: 13.5px; display: grid; gap: 6px; }
.bp-explain ol { margin: 0; padding-left: 20px; }
.bp-errors { border-color: #f1cfc8; margin-bottom: 20px; }
.bp-finding { display: flex; gap: 8px; align-items: baseline; margin-top: 6px; font-size: 13.5px; }
.bp-notes { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--muted); }
.bp-notes li { display: flex; gap: 8px; align-items: flex-start; }
.bp-notes .i { width: 15px; height: 15px; margin-top: 3px; color: var(--faint); }
.bp-adopt, .bp-inputs, .bp-ai, .bp-waiting { margin-bottom: 20px; }
.bp-adopt .card-body { display: grid; gap: 8px; }
.bp-waiting { border-color: #f0dca0; }
.bp-waiting > .card.table, .bp-waiting > .bp-resources { margin: 0 18px 4px; }
.bp-approve { flex-wrap: wrap; align-items: flex-start; }
.bp-approve form { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0; }
.bp-understand { display: flex; }

/* Variables the person enters. */
.bp-input-rows { display: grid; gap: 14px; max-width: 640px; }
.bp-input-rows label > span:first-child { display: flex; gap: 8px; align-items: baseline; }
.secret { position: relative; display: block; }
.secret input { padding-right: 38px; }
.secret .icon-btn { position: absolute; right: 4px; top: 4px; }

/* Kilby AI's review. */
.bp-review { display: grid; gap: 10px; }
.bp-review-sum { font-size: 14.5px; }
.bp-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bp-issues li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.bp-issues li > span:last-child { display: grid; gap: 2px; }
.bp-issues small { color: var(--muted); font-size: 13px; }
.bp-improve { margin: 0; padding-left: 20px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 3px; }

/* The bar at the bottom of the plan: what applying means, and the button. */
.bp-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px -4px 0; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(255, 255, 255, .96); box-shadow: 0 -6px 24px rgba(10, 10, 10, .06); backdrop-filter: blur(6px); }
.bp-bar-text { display: grid; gap: 1px; min-width: 0; }
.bp-bar-text span { font-size: 13px; color: var(--muted); }

/* A blueprint's page. */
.bp-progress { margin-bottom: 20px; }
.bp-history { overflow: hidden; }
.bp-syncs { list-style: none; margin: 0; padding: 0; }
.bp-sync { border-top: 1px solid var(--line); }
.bp-sync:first-child { border-top: 0; }
.bp-sync summary { display: flex; align-items: center; gap: 12px; padding: 12px 18px; cursor: pointer; list-style: none; }
.bp-sync summary::-webkit-details-marker { display: none; }
.bp-sync summary:hover { background: var(--tint); }
.bp-sync-main { display: grid; min-width: 0; }
.bp-sync-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-sync-body { padding: 4px 18px 16px 18px; display: grid; gap: 8px; }
.bp-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13.5px; }
.bp-results li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.bp-results small { flex-basis: 100%; padding-left: 4px; color: var(--muted); font-size: 12.5px; }
.bp-results li.failed small, .bp-results li.skipped small { color: var(--bad-ink); }
.bp-dev { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.bp-dev form { margin: 0; }
.bp-danger { display: grid; gap: 4px; }
.bp-danger form { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 0; }
.bp-danger form > div { display: grid; gap: 6px; max-width: 520px; }
.bp-danger hr { margin: 18px 0; }
.bp-deletelist { margin: 2px 0 6px; padding-left: 18px; font-size: 13.5px; }

/* The notice on a managed service or database. */
.bp-managed { background: var(--brand-soft); border-color: #dcec9f; }
.bp-managed .i { color: var(--green-ink); }
.bp-managed .badge { margin: 0 4px; }

/* The reference. */
.bp-docs { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: start; }
.bp-toc { position: sticky; top: calc(var(--top) + 20px); display: grid; gap: 2px; font-size: 13.5px; }
.bp-toc a { padding: 5px 10px; border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; }
.bp-toc a:hover { background: var(--hover); color: var(--ink); }
.bp-type { padding: 16px 18px 6px; border-top: 1px solid var(--line); }
.bp-type h3 { margin-bottom: 2px; }
.bp-type .card.table { margin-top: 8px; }
.bp-type td { vertical-align: top; }
.prose h3 { font-size: 15px; margin-top: 10px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }
.docs-public .docs-top { display: flex; align-items: center; gap: 12px; height: var(--top); padding: 0 24px; border-bottom: 1px solid var(--line); }
.docs-public .docs-top .top-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.docs-public .docs-top .top-fill { flex: 1; }
.docs-public .docs-main { max-width: 1120px; margin: 0 auto; padding: 36px 24px 80px; }

@media (max-width: 900px) {
  .bp-docs { grid-template-columns: minmax(0, 1fr); }
  .bp-toc { position: static; display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .bp-starts { grid-template-columns: minmax(0, 1fr); }
  .bp-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-summary > div { border-left: 0; border-top: 1px solid var(--line); }
  .bp-summary > div:nth-child(-n+2) { border-top: 0; }
  .bp-summary > div:nth-child(even) { border-left: 1px solid var(--line); }
  .bp-summary > .bp-cost { grid-column: 1 / -1; border-left: 0; }
}
@media (max-width: 700px) {
  /* The rows of a plan stack on a phone: each resource is a block, so nothing is cut off at the side. */
  .bp-resources table, .bp-resources tbody, .bp-resources tr, .bp-resources td { display: block; }
  .bp-resources thead { display: none; }
  .bp-resources tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .bp-resources td, .bp-resources td:first-child, .bp-resources td:last-child { border: 0; padding: 4px 0; }
  .bp-resources tbody tr:hover td { background: none; }
  .bp-sync-main small { white-space: normal; }
  .bp-resources td.bp-wide { display: block; text-align: left; color: var(--muted); }
  .bp-resources td.bp-wide::after { content: " a month"; }
  .bp-nocost, .bp-resources td.bp-wide:has(.bp-nocost) { display: none; }
  .bp-wide { display: none; }
  .bp-what { min-width: 0; }
  .bp-bar { flex-direction: column; align-items: stretch; margin: 20px 0 0; }
  .bp-bar .btn { width: 100%; height: 44px; }
  .bp-tabs a { height: 44px; }
  .bp-use { border-left: 0; border-top: 1px solid var(--line); }
  .bp-use:first-child { border-top: 0; }
  .bp-sync summary { padding: 12px 14px; flex-wrap: wrap; }
  .bp-sync-body { padding: 4px 14px 14px; }
  .bp-waiting > .card.table, .bp-waiting > .bp-resources { margin: 0 8px 4px; }
  .bp-diff-label { min-width: 0; flex-basis: 100%; }
  .bp-approve form { align-items: stretch; flex-direction: column; }
  .docs-public .docs-main { padding: 24px 16px 60px; }
}
@media (prefers-reduced-motion: reduce) {
  .bp-starts a, .bp-repos button { transition: none; }
}

/* === fullwidth === */
/* Layout for wide screens. The width model is described at .page: the page fills the screen,
   and these helpers decide what to do with the room. */

/* --- Helpers ---------------------------------------------------------------------- */

/* Related cards side by side from 1400px, one column below. A .col stacks several cards in
   one column, so the two columns keep their own order and do not jump when one grows. */
.duo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 36px; align-items: start; }
.duo > *, .duo > .col > * { margin-top: 0; }
.duo > .col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-content: start; min-width: 0; }
.duo > .col:only-child { grid-column: 1 / -1; }
@media (min-width: 1400px) {
  .duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A main column and a side panel (summary, help, limits) from 1300px; the panel sits under
   the form below that, or above it with .first. */
.with-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 36px; align-items: start; }
.with-side > aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; min-width: 0; }
.with-side > aside.first { order: -1; }
.with-side > aside > .note, .with-side > aside .ai-consent, .with-side > aside > .dom-add, .with-side > aside > .examples { margin: 0; }
@media (min-width: 1300px) {
  .with-side { grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 480px); }
  .with-side > aside.first { order: 0; }
  .with-side > aside.stick { position: sticky; top: calc(var(--top) + 24px); }
  .with-side > aside > .examples { display: grid; justify-items: start; gap: 10px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
}

/* A readable measure for the line under a page title. */
.page-head .sub { max-width: 110ch; }

/* --- Forms ------------------------------------------------------------------------ */

/* A row is a label and a control. The label column stops growing at 400px and the control at
   880px (.wide lifts that for a text area full of code), so a wide card is not mostly label or
   mostly input. When the card itself is narrow (half a screen, a side column) the label sits
   above the control. */
.row .ctl { max-width: 880px; }
.row .ctl.wide { max-width: none; }
.card.rows { container: rows / inline-size; }
.rows > .row, .rows > details.adv > summary, .rows > details.adv > .row { grid-template-columns: minmax(200px, min(32%, 400px)) minmax(0, 1fr); }
@media (max-width: 700px) {
  .rows > .row, .rows > details.adv > summary, .rows > details.adv > .row { grid-template-columns: minmax(0, 1fr); }
}
@container rows (max-width: 640px) {
  .rows > .row, .rows > details.adv > summary, .rows > details.adv > .row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .row .ctl.narrow { max-width: none; }
}
/* Checkbox lists add columns as the card grows. */
.checks.two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

/* --- Page by page ----------------------------------------------------------------- */

/* Service settings (side navigation + sections): the sections sit side by side only when
   each column can hold a form (about 640px). */
.st-body.duo { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1650px) { .st-body.duo { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.st-body .st-run > .st-head { margin-top: 0; }

/* Environment: how variables work, next to the editor. */
.envx-about .card-head h2 { font-size: 15px; }
.envx-facts { margin: 0; padding: 14px 18px 16px 36px; display: grid; gap: 8px; font-size: 13.5px; color: var(--ink-2); }

/* New blueprint: what a blueprint is, next to the form. */
.bp-about .card-head h2 { font-size: 15px; }
.bp-about .prose { font-size: 13.5px; }

/* New service from Git: the rows of the plan on the left, what Kilby found on the right.
   The repository list gets columns as the screen grows. */
.gf-planview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px 36px; align-items: start; }
.gf-planview > * { margin: 0; }
@media (min-width: 1300px) {
  .gf-planview { grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 480px); }
  .gf-planview > .gf-rows { grid-column: 1; grid-row: 1 / span 2; }
  .gf-planview > .gf-found { grid-column: 2; grid-row: 1; }
  .gf-planview > .gf-cands { grid-column: 2; grid-row: 2; }
}
.gf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); column-gap: 8px; align-content: start; }
.gf-list > .gf-empty, .gf-list > .gf-item-typed { grid-column: 1 / -1; }

/* Billing: the meters of a plan run in one column in a narrow card, two by default, three in
   a wide one. */
.plan-card, .meters-card { container: meters / inline-size; }
@container meters (max-width: 820px) {
  .meters { grid-template-columns: minmax(0, 1fr); }
  .meters .meter-row:nth-child(2) { border-top: 1px solid var(--line); }
}
@container meters (min-width: 1300px) {
  .meters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .meters .meter-row:nth-child(-n+3) { border-top: 0; }
}

/* Plan confirmation: the card fills the page; what changes sits in two columns next to the price. */
.confirm { max-width: none; }
.confirm-text .col { gap: 10px; }
.confirm-text.duo { gap: 10px 48px; }

/* Facts in a wide card run in columns instead of one long list. */
.facts.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.facts.wide > div { border-top: 0; border-bottom: 1px solid var(--line); }

/* A stat tile is one column that wraps its text (the status-line .stat further up must not make
   it nowrap); it never grows past its cell. */
.stats > .stat, .usage > div { grid-template-columns: minmax(0, 1fr); white-space: normal; }

/* --- Charts ----------------------------------------------------------------------- */

/* A chart picks its drawing (wide, mid, narrow) from the room it has, not from the screen:
   a chart in half a screen gets the mid drawing instead of a shrunk wide one. Charts that
   belong together sit side by side on a wide screen. */
.viz-box { container: viz / inline-size; }
@container viz (max-width: 820px) {
  .viz-wide { display: none; }
  .viz-mid { display: block; }
}
@container viz (max-width: 500px) {
  .viz-mid { display: none; }
  .viz-narrow { display: block; }
}
@media (min-width: 1400px) {
  .sv-charts, .stack:has(> .viz-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-charts > :nth-child(3) { grid-column: 1 / -1; }
}

/* === envgroups === */
/* Environment groups: the list, the page of one group, and the Linked groups and Effective
   variables cards of a service's Environment tab. The variable editor itself is the .envx one. */
.eg-linked { margin-bottom: 20px; }
.eg-effective { margin-top: 20px; }
.eg-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.eg-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.eg-num { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--hover); color: var(--ink-2); font: 600 12px/1 var(--mono); }
.eg-list li:first-child .eg-num { background: var(--brand-soft); color: var(--green-ink); }
.eg-name { display: grid; min-width: 0; line-height: 1.35; }
.eg-name a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-name small, .eg-used-main small { font-size: 12.5px; color: var(--muted); }
.eg-actions { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.eg-actions .icon-btn:disabled { opacity: .35; cursor: default; }
.eg-none { margin: 0; padding: 4px 18px 16px; color: var(--muted); font-size: 13.5px; max-width: 70ch; }
.eg-add { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--tint); }
.eg-list + .eg-add, .eg-none + .eg-add { margin-top: 0; }
.eg-add-field { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.eg-add-field select { min-width: 220px; height: 34px; }
.eg-add .muted { align-self: center; margin-left: auto; }
.eg-effective table { table-layout: auto; }
.eg-effective td, .eg-effective th { vertical-align: middle; }
.eg-effective th:first-child, .eg-effective td:first-child { padding-left: 18px; }
.eg-effective th:last-child, .eg-effective td:last-child { padding-right: 18px; }
.eg-effective tbody tr:last-child td { border-bottom: 0; }
.eg-effective thead th { padding-top: 8px; }
.eg-effective code { background: none; padding: 0; font-weight: 600; }
.eg-val { width: 42%; min-width: 220px; }
.eg-val .secret input { height: 30px; font-size: 13px; background: var(--tint); }
.eg-tag { gap: 5px; text-decoration: none; color: var(--ink-2); }
.eg-tag .i { width: 13px; height: 13px; }
.eg-tag:hover { background: var(--brand-soft); color: var(--green-ink); }
.eg-hides { margin-left: 6px; }
.eg-used { list-style: none; margin: 0; padding: 0; }
.eg-used li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-top: 1px solid var(--line); }
.eg-used li:first-child { border-top: 0; }
.eg-used-main { display: grid; min-width: 0; line-height: 1.35; }
.eg-used-main a { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.danger-row .eg-del-actions { display: flex; gap: 8px; align-items: center; }
.eg-rename > summary { list-style: none; }
.eg-rename .menu { min-width: 280px; }
@media (max-width: 720px) {
  .crumbs { flex-wrap: wrap; }
  .crumbs > a, .crumbs > span { white-space: nowrap; }
  .eg-col-updated { display: none; }
  .eg-linked .sv-card-head, .eg-effective .sv-card-head { flex-wrap: wrap; }
  .eg-add .muted { margin-left: 0; flex-basis: 100%; }
  .eg-add-field, .eg-add-field select { width: 100%; }
  /* The effective variables stack: name, value, where it comes from. */
  .eg-effective thead { display: none; }
  .eg-effective table, .eg-effective tbody, .eg-effective tr, .eg-effective td { display: block; width: auto; }
  .eg-effective tr { display: grid; gap: 6px; padding: 12px 18px; border-top: 1px solid var(--line); }
  .eg-effective tbody tr:first-child { border-top: 0; }
  .eg-effective td, .eg-effective td:first-child, .eg-effective td:last-child { padding: 0; border: 0; }
  .eg-effective tbody tr:hover td { background: none; }
  .eg-val { width: auto; min-width: 0; }
}
@media (max-width: 380px) {
  .eg-list li { grid-template-columns: 26px minmax(0, 1fr); }
  .eg-actions { grid-column: 2; justify-self: start; }
}
/* === end envgroups === */

/* === status === The public status page (/status), its bar in the dashboard and its admin screen. */
:root {
  --sp-ok: #7cb518;
  --sp-degraded: #f0b13c;
  --sp-outage: #e4584a;
  --sp-maint: #6a9fe0;
  --sp-unknown: #e3e1da;
  --sp-info-bg: #eef4fc; --sp-info-line: #cfdff5; --sp-info-ink: #1f4f99;
}

/* The slim bar above the dashboard while an incident or maintenance is going on. */
.sp-banner { display: flex; align-items: center; gap: 10px; padding: 8px var(--gutter); font-size: 13px; color: var(--ink-2);
  background: #fffaea; border-bottom: 1px solid #f0dca0; }
.sp-banner .i { width: 15px; height: 15px; color: var(--busy-ink); }
.sp-banner.maintenance { background: var(--sp-info-bg); border-color: var(--sp-info-line); }
.sp-banner.maintenance .i { color: var(--sp-info-ink); }
.sp-banner span { min-width: 0; overflow-wrap: anywhere; }
.sp-banner a { margin-left: auto; flex: none; font-weight: 550; white-space: nowrap; }

/* A state as a small pill; the mark in front repeats what the colour says. */
.sp-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 12px; font-size: 12.5px; font-weight: 550; white-space: nowrap;
  background: var(--idle-bg); color: var(--idle-ink); }
.sp-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.sp-pill.operational { background: var(--ok-bg); color: var(--ok-ink); }
.sp-pill.degraded { background: var(--busy-bg); color: var(--busy-ink); }
.sp-pill.outage { background: var(--bad-bg); color: var(--bad-ink); }
.sp-pill.maintenance { background: var(--sp-info-bg); color: var(--sp-info-ink); }
.sp-pill.unknown { background: var(--idle-bg); color: var(--muted); }
.sp-pill.unknown::before { background: none; border: 2px solid currentColor; }

/* The page itself. */
.sp-body { background: var(--tint); min-height: 100vh; }
.sp-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 24px; }
.sp-top { background: var(--bg); border-bottom: 1px solid var(--line); }
.sp-top .sp-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.sp-brand { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink); text-decoration: none; }
.sp-brand img { display: block; border-radius: 7px; }
.sp-brand b { font-weight: 650; }
.sp-nav { display: flex; align-items: center; gap: 18px; font-size: 13.5px; }
.sp-nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.sp-nav a:not(.btn):hover { color: var(--ink); }
.sp-main { padding: 36px 0 56px; outline: none; }

.sp-hero { display: flex; align-items: center; gap: 18px; padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.sp-hero h1 { font-size: 24px; }
.sp-hero .sp-sub { margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.sp-mark { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--sp-unknown); color: var(--ink-2); }
.sp-mark .i { width: 24px; height: 24px; stroke-width: 2; }
.sp-hero.operational { border-color: #d5eb9a; background: var(--brand-soft); }
.sp-hero.operational .sp-mark { background: var(--sp-ok); color: #fff; }
.sp-hero.degraded { border-color: #f0dca0; background: #fffaea; }
.sp-hero.degraded .sp-mark { background: var(--sp-degraded); color: #4a3000; }
.sp-hero.outage { border-color: #f4c9c1; background: #fdf1ee; }
.sp-hero.outage .sp-mark { background: var(--sp-outage); color: #fff; }
.sp-hero.maintenance { border-color: var(--sp-info-line); background: var(--sp-info-bg); }
.sp-hero.maintenance .sp-mark { background: var(--sp-maint); color: #fff; }

.sp-section { margin-top: 36px; }
.sp-section > h2 { margin-bottom: 12px; }
.sp-h2-next { margin: 26px 0 12px; font-size: 16px; font-weight: 600; }
.sp-comps { overflow: hidden; }
.sp-comp { padding: 18px 22px 16px; border-top: 1px solid var(--line); }
.sp-comp:first-child { border-top: 0; }
.sp-comp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.sp-comp-head h3 { font-size: 15px; }
.sp-about { margin-top: 2px; font-size: 13px; color: var(--muted); }
.sp-hand { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 4px; background: var(--hover); color: var(--ink-2); font-size: 11.5px; font-weight: 500; }

/* Ninety days, one cell a day. */
.sp-bar { display: flex; gap: 2px; height: 32px; margin: 14px 0 8px; padding: 0; list-style: none; }
.sp-d { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--sp-ok); }
.sp-d.degraded { background: var(--sp-degraded); }
.sp-d.outage { background: var(--sp-outage); }
.sp-d.maintenance { background: var(--sp-maint); }
.sp-d.unknown { background: var(--sp-unknown); }
.sp-bar .sp-d:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.sp-bar-foot { display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--muted); }
.sp-rule { flex: 1; height: 1px; background: var(--line); }
.sp-up b { color: var(--ink); font-weight: 600; }
.sp-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.sp-legend span { display: inline-flex; align-items: center; gap: 7px; }
.sp-legend .sp-d { flex: none; display: inline-block; width: 10px; height: 10px; }
.sp-tip { position: fixed; z-index: 60; max-width: 280px; padding: 6px 10px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12.5px; line-height: 1.4; pointer-events: none; }

/* Incidents and maintenance. */
.sp-inc { margin-bottom: 12px; padding: 16px 20px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); background: var(--bg); }
.sp-inc.open.degraded { border-left-color: var(--sp-degraded); }
.sp-inc.open.outage { border-left-color: var(--sp-outage); }
.sp-inc.open.none { border-left-color: var(--faint); }
.sp-inc.maint { border-left-color: var(--sp-maint); }
.sp-inc.maint.completed { border-left-color: var(--line-strong); }
.sp-inc:not(.open):not(.maint) { border-left-color: var(--line-strong); }
.sp-inc > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sp-inc h3 { font-size: 15.5px; overflow-wrap: anywhere; }
.sp-meta { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.sp-m-text { margin-top: 10px; overflow-wrap: anywhere; color: var(--ink-2); }
.sp-what { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12.5px; font-weight: 550; color: var(--ink-2); white-space: nowrap; }
.sp-what::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sp-degraded); }
.sp-what.resolved::before, .sp-what.completed::before { background: var(--sp-ok); }
.sp-what.monitoring::before, .sp-what.scheduled::before { background: var(--sp-maint); }
.sp-what.completed::before { background: var(--faint); }
.sp-updates { margin: 14px 0 0; padding: 0 0 0 16px; list-style: none; border-left: 2px solid var(--line); }
.sp-updates li { margin-bottom: 14px; }
.sp-updates li:last-child { margin-bottom: 0; }
.sp-u-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13.5px; }
.sp-u-head time { color: var(--muted); font-size: 12.5px; }
.sp-updates p { margin-top: 2px; font-size: 14px; color: var(--ink-2); overflow-wrap: anywhere; }
.sp-day { margin: 22px 0 10px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sp-day:first-of-type { margin-top: 0; }
.sp-none { color: var(--muted); }
.sp-foot { margin-top: 44px; font-size: 12.5px; color: var(--muted); }
.sp-foot p { max-width: 80ch; }
.sp-foot p + p, .sp-foot details { margin-top: 12px; }
.sp-api summary { cursor: pointer; color: var(--ink-2); font-weight: 550; }
.sp-api p { margin-top: 8px; }

/* The admin screen. */
.sp-form-h { margin: 0 0 14px; }
.sp-dates label, .sp-dates input { min-width: 0; max-width: 100%; }
.sp-overall { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; }
.sp-sm { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.sp-sm code { font-size: 11.5px; }
.sp-override { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.sp-override select { width: auto; min-width: 150px; height: 30px; }
.sp-override input { flex: 1; min-width: 150px; height: 30px; }
.sp-admin-comps { margin: 0; padding: 0; list-style: none; }
.sp-admin-comps li { display: grid; grid-template-columns: minmax(200px, 1fr) 270px minmax(0, 1.6fr); gap: 12px 28px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.sp-admin-comps li:first-child { border-top: 0; }
.sp-ac-state { display: flex; gap: 22px; }
.sp-ac-state > span { display: grid; gap: 3px; justify-items: start; }
.sp-ac-state small { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sp-ac-pin { display: grid; gap: 4px; min-width: 0; }
@media (max-width: 1100px) {
  .sp-admin-comps li { grid-template-columns: minmax(0, 1fr) auto; }
  .sp-ac-pin { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .sp-admin-comps li { grid-template-columns: minmax(0, 1fr); }
  .sp-override select, .sp-override input { flex: 1 1 100%; min-width: 0; }
}
.sp-admin-updates { margin: 0; padding: 0; list-style: none; }
.sp-admin-updates li { padding: 14px 18px; border-top: 1px solid var(--line); }
.sp-admin-updates li:first-child { border-top: 0; }
.sp-admin-updates p { margin-top: 6px; overflow-wrap: anywhere; }
.sp-edit { margin-top: 8px; }
.sp-edit summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.sp-edit form { display: grid; gap: 8px; margin-top: 10px; }

@media (max-width: 860px) {
  .sp-hide-sm { display: none; }
}
@media (max-width: 700px) {
  .sp-wrap { padding: 0 16px; }
  .sp-main { padding-top: 22px; }
  .sp-hero { padding: 18px; gap: 14px; }
  .sp-hero h1 { font-size: 19px; }
  .sp-mark { width: 38px; height: 38px; }
  .sp-mark .i { width: 20px; height: 20px; }
  .sp-comp { padding: 16px 16px 14px; }
  .sp-comp-head { flex-direction: column; gap: 8px; }
  .sp-bar { gap: 1px; height: 28px; }
  .sp-bar-foot { gap: 8px; font-size: 12px; }
  .sp-inc { padding: 14px 16px; }
  .sp-inc > header { flex-wrap: wrap; gap: 4px 12px; }
  .sp-banner { flex-wrap: wrap; padding: 8px 16px; }
  .sp-banner a { margin-left: 25px; }
}
@media print {
  .sp-top, .sp-banner, .sp-tip { display: none; }
  .sp-body { background: #fff; }
}

/* === key value === */
.kind-tile.key_value { background: #eceefb; color: #3a3fa6; border-color: #d6daf3; }


/* === templates === The gallery of one-click deploys, a template's page, and the "Deploy to Kilby" button. */
.tile.tpl-tile { width: 40px; height: 40px; border-radius: var(--radius); }
.tile.tpl-tile .i { width: 20px; height: 20px; }
.tpl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 22px; }
.tpl-bar .filters { flex-wrap: wrap; max-width: 100%; }
.tpl-bar .search { flex: 0 1 340px; min-width: 200px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.tpl-card { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; align-content: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.tpl-card:hover { border-color: #86b81a; box-shadow: 0 10px 28px -20px rgba(10, 10, 10, .45); }
.tpl-card:focus-within { border-color: var(--ink); }
.tpl-card > header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tpl-title { display: grid; gap: 5px; min-width: 0; }
.tpl-title h2 { font-size: 15.5px; line-height: 1.3; }
.tpl-link { text-decoration: none; }
.tpl-link:hover { text-decoration: none; }
.tpl-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.tpl-link:focus-visible { outline: none; }
.tpl-card:has(.tpl-link:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.tpl-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; }
.tag.gpu { background: var(--ink); color: var(--brand); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; }
.tpl-sum { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.tpl-card > footer { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.tpl-card > footer b { font-weight: 600; white-space: nowrap; }
.tpl-card.off { background: var(--tint); }
.tpl-card.off .tile { opacity: .6; filter: grayscale(1); }
.tpl-card.off .tpl-sum { color: var(--muted); }
.tpl-off { display: flex; align-items: flex-start; gap: 6px; margin: -2px 0 0; font-size: 12.5px; color: var(--busy-ink); }
.tpl-off .i { width: 14px; height: 14px; margin-top: 2px; }
.tpl-none { margin-top: 4px; }

.tpl-head { display: flex; align-items: flex-start; gap: 16px; margin: 0 0 28px; }
.tpl-head h1 { margin: 0 0 8px; }
.tpl-head .tpl-tags .ext { margin-left: 4px; }
.tpl-desc { max-width: 78ch; margin-top: 12px; color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.tpl-unavailable { margin: 0 0 24px; }
.tpl-form { display: grid; gap: 30px; min-width: 0; }
.tpl-section { display: grid; gap: 14px; min-width: 0; }
.tpl-section > p { margin: -6px 0 0; }
.tpl-res { overflow: hidden; }
.tpl-res .card-head { padding: 14px 18px; }
.tpl-price { font-weight: 600; white-space: nowrap; }
.tpl-name { display: grid; gap: 6px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.tpl-name input { max-width: 420px; font-family: var(--mono); font-size: 13.5px; }
.tpl-name input[readonly], .tpl-section input[readonly] { background: var(--tint); color: var(--muted); }
.tpl-res .facts.wide > div:last-child { border-bottom: 0; }
.tpl-res .facts.wide > .full { grid-column: 1 / -1; }
.tpl-cmd { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.55; }
.tpl-env { border-top: 1px solid var(--line); }
.tpl-env > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; cursor: pointer; list-style: none; font-size: 13.5px; font-weight: 550; }
.tpl-env > summary::-webkit-details-marker { display: none; }
.tpl-env > summary .i { width: 15px; height: 15px; color: var(--muted); transition: transform .12s; }
.tpl-env[open] > summary .i { transform: rotate(90deg); }
.tpl-env > summary:hover { background: var(--tint); }
.tpl-env .table { padding: 0 14px 10px; }
.tpl-env th, .tpl-env td { font-size: 13px; }
.tpl-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.tpl-foot .muted { flex: 1 1 220px; }

.tpl-side { overflow: hidden; }
.tpl-side .card-head h2 { font-size: 14.5px; }
.tpl-lines { list-style: none; margin: 0; padding: 6px 18px 4px; display: grid; }
.tpl-lines li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.tpl-lines li:last-child { border-bottom: 0; }
.tpl-side > .card-body { padding-top: 10px; }
.tpl-fit { font-size: 13px; }
.tpl-fit th { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; }
.tpl-fit th:first-child, .tpl-fit td:first-child { padding-left: 18px; }
.tpl-fit th:last-child, .tpl-fit td:last-child { padding-right: 18px; }
.tpl-fit td { padding: 9px 8px; }
.tpl-fit tr.over td b { color: var(--bad-ink); }
.tpl-list { margin: 0; padding: 14px 18px 16px 36px; display: grid; gap: 9px; font-size: 13.5px; line-height: 1.55; }
.tpl-list li::marker { color: var(--faint); }
.tpl-badge { display: grid; gap: 10px; }
.tpl-badge-preview { margin: 2px 0 4px; }
.tpl-badge-preview img { display: block; height: 32px; width: auto; }
.tpl-snip-head { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.tpl-snip-head b { font-weight: 600; }
.tpl-snip-head .btn { margin-left: auto; }
.tpl-badge .btn .lbl-done { display: none; }
.tpl-badge .btn.done .lbl { display: none; }
.tpl-badge .btn.done .lbl-done { display: inline; }
pre.code.tpl-code { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; padding: 12px 14px; }
.welcome-tpl { margin-top: 18px; }

@media (max-width: 760px) {
  .tpl-head { flex-direction: column; gap: 12px; }
  .tpl-why { display: none; }
  .tpl-res .card-head { flex-wrap: wrap; }
  .tpl-bar .search { flex: 1 1 100%; }
  .tpl-bar .filters button { padding: 0 10px; }
  .tpl-foot .btn { flex: 1 1 140px; }
}
@media (prefers-reduced-motion: reduce) {
  .tpl-card, .tpl-env > summary .i { transition: none; }
}

/* === docs === */
/* The documentation portal (/docs). A page of its own: top bar with search, the list of pages on the
   left, the text in the middle, "On this page" on the right. Light, like the dashboard. */
body.docs-site { background: var(--bg); }
.dx-skip { position: absolute; left: -9999px; top: 8px; z-index: 60; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: var(--radius-sm); }
.dx-skip:focus { left: 8px; }

.dx-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; height: var(--top); padding: 0 var(--gutter); background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.dx-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.dx-brand b { font-size: 15px; letter-spacing: -0.01em; }
.dx-brand span { font-size: 13px; color: var(--muted); border-left: 1px solid var(--line-strong); padding-left: 9px; }
.dx-menu { display: none; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); cursor: pointer; }
.dx-search { position: relative; flex: 1 1 auto; max-width: 440px; margin: 0 auto 0 18px; }
.dx-search > .i { position: absolute; left: 11px; top: 9px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.dx-search input { height: 34px; padding: 0 34px 0 34px; background: var(--tint); }
.dx-search input:focus { background: var(--surface); }
.dx-key { position: absolute; right: 9px; top: 7px; }
.dx-links { display: flex; align-items: center; gap: 14px; flex: none; }
.dx-link { font-size: 13.5px; color: var(--ink-2); text-decoration: none; }
.dx-link:hover { color: var(--ink); text-decoration: underline; }
.dx-results { position: absolute; left: 0; right: 0; top: 40px; z-index: 50; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(10, 10, 10, 0.12); padding: 6px; max-height: min(70vh, 460px); overflow: auto; }
.dx-hit { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; }
.dx-hit small { color: var(--muted); font-size: 12px; }
.dx-hit-title { font-size: 14px; font-weight: 550; }
.dx-hit.on, .dx-hit:hover { background: var(--brand-soft); }
.dx-none { padding: 10px; color: var(--muted); font-size: 13.5px; }

.dx-shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); max-width: 1640px; margin: 0 auto; }
.dx-nav { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); overflow-y: auto; padding: 26px 18px 40px var(--gutter); border-right: 1px solid var(--line); font-size: 13.5px; }
.dx-group + .dx-group { margin-top: 22px; }
.dx-group-title { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 6px 10px; }
.dx-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.dx-group a { display: block; padding: 5px 10px; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; }
.dx-group a:hover { background: var(--hover); color: var(--ink); }
.dx-group a.on { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }

.dx-main { min-width: 0; padding: 28px var(--gutter) 64px; outline: none; }
.dx-grid { display: grid; grid-template-columns: minmax(0, 760px) 220px; gap: 56px; justify-content: center; align-items: start; }
.dx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.dx-eyebrow { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-ink); }
.dx-tools { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.dx-tools .btn.done { background: var(--brand-soft); border-color: var(--brand-edge); }

.dx-prose { font-size: 15px; line-height: 1.7; color: var(--ink-2); overflow-wrap: break-word; }
.dx-prose > * + * { margin-top: 14px; }
.dx-prose h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink); margin-bottom: 4px; }
.dx-prose h1 + p { font-size: 17px; color: var(--ink-2); line-height: 1.6; }
.dx-prose h2 { font-size: 21px; letter-spacing: -0.015em; color: var(--ink); margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--top) + 16px); }
.dx-prose h3 { font-size: 16.5px; color: var(--ink); margin-top: 30px; scroll-margin-top: calc(var(--top) + 16px); }
.dx-prose h4 { font-size: 15px; color: var(--ink); margin-top: 24px; scroll-margin-top: calc(var(--top) + 16px); }
.dx-prose h1 + p, .dx-prose h2 + p, .dx-prose h3 + p { margin-top: 12px; }
.dx-prose .anchor { margin-left: 8px; font-weight: 400; color: var(--faint); text-decoration: none; opacity: 0; transition: opacity .12s; }
.dx-prose :is(h2, h3, h4):hover .anchor, .dx-prose .anchor:focus { opacity: 1; }
.dx-prose a { color: var(--ink); text-decoration-color: var(--faint); }
.dx-prose a:hover { text-decoration-color: var(--ink); }
.dx-prose a.doc-ext::after { content: "\2197"; display: inline-block; margin-left: 2px; font-size: 0.85em; color: var(--muted); }
.dx-prose strong { color: var(--ink); font-weight: 600; }
.dx-prose code { font-size: 13px; border: 1px solid var(--line); background: var(--tint); overflow-wrap: break-word; }
.dx-prose ul, .dx-prose ol { padding-left: 22px; display: grid; gap: 6px; }
.dx-prose li > ul, .dx-prose li > ol { margin-top: 6px; }
.dx-prose li > p + p, .dx-prose li > p + .doc-code, .dx-prose li > .doc-code + p { margin-top: 10px; }
.dx-prose li::marker { color: var(--muted); }
.dx-prose hr { margin: 32px 0; }
.dx-prose blockquote { margin-left: 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--line-strong); color: var(--muted); }

.doc-code { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--tint); }
.doc-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13px/1.6 var(--mono); color: var(--ink); tab-size: 2; }
.doc-code code { background: none; border: 0; padding: 0; font: inherit; overflow-wrap: normal; }
.doc-lang { position: absolute; top: 7px; right: 12px; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); pointer-events: none; transition: opacity .12s; }
.doc-copy { position: absolute; top: 5px; right: 6px; height: 26px; padding: 0 9px; font: 550 12px var(--sans); color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); cursor: pointer; opacity: 0; transition: opacity .12s; }
.doc-code:hover .doc-copy, .doc-copy:focus-visible { opacity: 1; }
.doc-code:hover .doc-lang { opacity: 0; }
.doc-copy.done { color: var(--green-ink); background: var(--brand-soft); border-color: var(--brand-edge); opacity: 1; }

.doc-table { overflow-x: auto; border: 1px solid var(--line-strong); border-radius: var(--radius); }
.doc-table table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.doc-table th { text-align: left; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: var(--tint); padding: 9px 14px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
.doc-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table .al-right { text-align: right; }
.doc-table .al-center { text-align: center; }
.doc-table td:first-child { color: var(--ink); }

.doc-callout { border: 1px solid #dcec9f; border-left-width: 4px; border-radius: var(--radius); background: var(--brand-soft); padding: 12px 16px; font-size: 14.5px; line-height: 1.6; }
.doc-callout > * + * { margin-top: 8px; }
.doc-callout-title { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-ink); }
.doc-callout.is-warning { background: var(--busy-bg); border-color: #efd69a; }
.doc-callout.is-warning .doc-callout-title { color: var(--busy-ink); }

.dx-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 56px; }
.dx-pager a { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); text-decoration: none; }
.dx-pager a:hover { background: var(--hover); border-color: var(--ink); }
.dx-pager small { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.dx-pager span { font-weight: 600; font-size: 15px; }
.dx-next { text-align: right; grid-column: 2; }

.dx-toc { position: sticky; top: calc(var(--top) + 28px); max-height: calc(100vh - var(--top) - 56px); overflow-y: auto; font-size: 13px; }
.dx-toc-title { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.dx-toc ul, .dx-toc-m ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.dx-toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; line-height: 1.4; }
.dx-toc .l3 a { padding-left: 26px; }
.dx-toc a:hover { color: var(--ink); }
.dx-toc a.on { color: var(--ink); border-left-color: var(--ink); font-weight: 550; }
.dx-toc-m { display: none; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0 14px; margin-bottom: 20px; font-size: 14px; }
.dx-toc-m summary { cursor: pointer; padding: 10px 0; font-weight: 600; }
.dx-toc-m ul { padding-bottom: 10px; }
.dx-toc-m .l3 { padding-left: 14px; }
.dx-toc-m a { display: block; padding: 4px 0; color: var(--ink-2); text-decoration: none; }

.dx-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; max-width: 1640px; margin: 0 auto; padding: 22px var(--gutter) 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.dx-foot-links { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; }
.dx-foot a { color: var(--ink-2); }

@media (max-width: 1180px) {
  .dx-grid { grid-template-columns: minmax(0, 760px); }
  .dx-toc { display: none; }
  .dx-toc-m { display: block; }
}
@media (max-width: 900px) {
  .dx-top { gap: 10px; padding: 0 14px; }
  .dx-menu { display: inline-grid; }
  .dx-brand span { display: none; }
  .dx-search { margin-left: 0; }
  .dx-key, .dx-links .dx-link { display: none; }
  .dx-shell { display: block; }
  .dx-nav { display: none; position: fixed; z-index: 45; top: var(--top); left: 0; right: 0; height: calc(100vh - var(--top)); height: calc(100dvh - var(--top)); background: var(--surface); border-right: 0; padding: 18px 18px 40px; }
  .dx-nav-open .dx-nav { display: block; }
  .dx-nav-open { overflow: hidden; }
  .dx-main { padding: 20px 16px 48px; }
  .dx-prose h1 { font-size: 27px; }
  .dx-prose h2 { margin-top: 36px; padding-top: 22px; }
  .dx-pager { grid-template-columns: minmax(0, 1fr); }
  .dx-next { grid-column: 1; text-align: left; }
  .dx-foot { padding: 20px 16px 30px; }
  .dx-bar .dx-tools { width: 100%; }
}
@media (max-width: 480px) {
  .dx-links .btn { display: none; }
  .dx-tools .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .dx-prose .anchor, .doc-copy, .doc-lang { transition: none; }
}

/* === egress === */
/* Outbound IP addresses: the list in workspace settings. Each address is one chip with its own
   copy button; they wrap, so a long list or a narrow screen never scrolls sideways. */
.ip-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ip-list li { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; padding: 2px 3px 2px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.ip-list code { padding: 0; background: none; font-size: 13.5px; font-weight: 550; }
.ip-none { display: flex; align-items: center; gap: 8px; }
.ip-notes { display: grid; gap: 6px; max-width: 64ch; }
.ip-notes p { margin: 0; font-size: 13px; color: var(--muted); }

/* === consistency === */
/* Build minutes in the cost bar of the overview and in the lists of the usage page: a neutral color,
   so the four resource colors keep their meaning. */
.part.s0 { background: var(--faint); }
.key.s0 { background: var(--faint); }
.swatch.s0 { background: var(--faint); }

/* === requests === */
/* The Requests section of the Metrics tab and the request line of the Overview. */
.rq { margin-bottom: 36px; }
.rq-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.rq-head h2, .rq-sub { font-size: 18px; }
.rq-sub { margin: 0 0 14px; }
.rq-head p { margin-top: 2px; }
.rq .tiles { margin-bottom: 20px; }
.rq .note { margin: 0 0 14px; }
.rq-charts { display: grid; gap: 20px; }
@media (min-width: 1400px) {
  .rq-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Red for server errors and a third line for the 99th percentile, in the same drawing as the others. */
.sv-viz svg.viz .area.bad { fill: var(--viz-bad, #d03b3b); }
.sv-viz svg.viz .line.bad { stroke: var(--viz-bad, #d03b3b); }
.sv-viz svg.viz .focus-dot.bad { fill: var(--viz-bad, #d03b3b); }
.sv-viz svg.viz .line.s3 { stroke: var(--viz-3, #eb6834); }
.sv-viz svg.viz .focus-dot.s3 { fill: var(--viz-3, #eb6834); }
.key.s3.line { background: var(--viz-3, #eb6834); }
.key.bad.line { background: var(--viz-bad, #d03b3b); }
.sv-req-line { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0 18px 12px; font-size: 13.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sv-req-line a { color: var(--ink); font-weight: 550; }
@media (max-width: 700px) {
  .rq-head { margin-bottom: 12px; }
}

/* === uxfixes === */
/* Notices: what only needs knowing (a limit that is full, a suspended service) sits apart from what needs attention. */
.attn.info { border-left-color: var(--dot-idle); }
.attn.notices > header h2 { color: var(--muted); }
.attn-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
@media (max-width: 700px) {
  .attn-item .attn-acts { grid-column: 2; justify-content: flex-start; }
}
/* The deploy hook examples: placeholders to replace are easy to see, and what each example is for is said above it. */
.hook-docs .prose .hook-note { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md, 10px); background: var(--tint); color: var(--ink); font-size: 13.5px; }
.hook-docs .prose .hook-note b { font-weight: 600; }
.hook-docs .prose h3 { margin: 18px 0 6px; font-size: 13.5px; }
.hook-docs .prose h3:first-child { margin-top: 0; }

/* === disks === */
/* Snapshots of a service's disk, the disks restored from them, and the pages that restore one and
   start a service on it. */
.dk .stats.dk-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 20px; }
.dk .dk-stats > .stat { align-content: start; }
.dk-snaps td .muted { font-size: 12.5px; }
.dk-snaps td a:not(.btn) { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.dk-act { text-align: right; white-space: nowrap; }
.dk-act > * { vertical-align: middle; }
.dk-act > form { display: inline-block; }
.dk-act > * + * { margin-left: 6px; }
.dk-restored { margin-top: 26px; }
.dk-note { margin: 10px 0 0; }
.dk-empty { margin-top: 4px; }
.dk-fixed { font: 550 14px var(--mono); }
.dk-form .foot { flex-wrap: wrap; }
.dk-facts { margin: 0; padding-left: 18px; display: grid; gap: 7px; max-width: 72ch; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 1100px) { .dk .stats.dk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dk .dk-stats > :last-child { grid-column: 1 / -1; } }
@media (max-width: 700px) { .dk-sm { display: block; margin-top: 6px; } .dk-act { white-space: normal; } .dk-act > *, .dk-act > form { display: block; } .dk-act > .btn { display: flex; } .dk-act > * + * { margin: 6px 0 0; } .dk-act .btn { width: 100%; } .dk-act form .btn { display: flex; } }
@media (max-width: 560px) { .dk .stats.dk-stats { grid-template-columns: minmax(0, 1fr); } }

/* === logs === the Logs tab with stored logs: the notice above it, the custom range, the "load older" strip, Kilby's own lines */
.lg-note { margin: 0 0 14px; }
.lg-custom { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.lg-custom label { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: #cfd6bf; }
.lg-custom .muted { color: #7d8670; }
.lg-custom input { height: 28px; padding: 0 8px; font-size: 12.5px; background: #151812; color: #e5ead7; border: 1px solid #3a3f33; border-radius: 6px; color-scheme: dark; }
.lg-custom input:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(177, 226, 37, .25); outline: 0; }
.lg-custom-err { color: #ff9c8f; font-size: 12.5px; }
.lg-more { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; padding: 7px 12px; background: #12150f; border-bottom: 1px solid #23261f; color: #9aa38a; font-size: 12.5px; }
.lg-more span { min-width: 0; }
.lg-row.sys { background: rgba(120, 150, 255, .07); box-shadow: inset 2px 0 0 #7d94ff; }
.lg-row.sys .lg-m { color: #aebcff; font-style: italic; }
@media (max-width: 700px) {
  .lg-custom input { flex: 1 1 150px; min-width: 0; }
  .lg-btn[data-lg-refresh] span, .lg-btn[data-lg-older] span { display: inline; }
}

/* === truth2 === amber "warn": a service that answers with a failed deploy behind it, a cron job whose last run failed */
.badge.warn { background: var(--busy-bg); color: var(--busy-ink);
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 5v9'/%3E%3Cpath d='M12 19v.01'/%3E%3C/svg%3E"); }
.sh .badge.warn { background: #fff0c4; }
.badge-marker { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border: 1px solid #efd48f; border-radius: 12px; background: var(--surface); color: var(--busy-ink); font-size: 12px; font-weight: 550; white-space: nowrap; }
.badge-marker[hidden] { display: none; }
.stat.warn { color: var(--busy-ink); }
.sh-dot.warn { background: var(--sv-busy); }
.sv-lamp.warn { background: var(--sv-busy); box-shadow: 0 0 0 4px rgba(217, 150, 26, .16); }
.sv-state.warn { color: var(--busy-ink); } .sv-state.warn::before { background: var(--sv-busy); }
.health.warn { color: var(--busy-ink); }
.svc-status .svc-msg.warn { color: var(--busy-ink); }

/* === projects === projects and environments: the list, one project with its environments as tabs, the filter and the group headers of the Overview, the move form */
.pj-envs { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-env { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.pj-env b { min-width: 18px; padding: 1px 6px; border-radius: 9px; background: var(--hover); color: var(--muted); font: 600 11.5px/1.3 var(--sans); text-align: center; font-variant-numeric: tabular-nums; }
.pj-env:hover { border-color: #86b81a; background: var(--brand-soft); color: var(--ink); }
.cell-main .tag { margin-left: 4px; }
.pj-tag { margin-left: 10px; vertical-align: middle; }
.pj-note { margin-bottom: 18px; }
.pj-tabs { margin-bottom: 20px; }
.pj-tabs a .count { margin-left: 2px; }
.pj-tabs .pj-add { margin-left: auto; color: var(--muted); }
.pj-ask { margin: 0 0 20px; border-color: #efd48f; background: #fffdf5; }
.pj-ask h2 { font-size: 15.5px; margin-bottom: 6px; }
.pj-ask p { margin: 0 0 12px; max-width: 78ch; color: var(--ink-2); font-size: 14px; }
.pj-ask-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 12px; }
.pj-ask-form .grow { display: grid; gap: 6px; flex: 1 1 260px; font-size: 13px; font-weight: 500; }
.pj-forms { margin-top: 28px; }
.env-move { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.env-move select { flex: 1 1 220px; min-width: 0; max-width: 420px; }
.sh-env { text-decoration: none; }
.sh-env:hover { border-color: #86b81a; background: var(--brand-soft); color: var(--ink); }
.scope { display: contents; }
.svc-tools .scope-sel select { max-width: 240px; text-overflow: ellipsis; }
.scope-note { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid #e3f1b4; border-radius: var(--radius-sm); background: var(--brand-soft); font-size: 13px; color: var(--ink-2); }
.scope-note .i { width: 15px; height: 15px; color: var(--green-ink); flex: none; }
.scope-note span { flex: 1 1 280px; min-width: 0; }
.scope-note a { font-weight: 500; white-space: nowrap; }
.scope-empty { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }
.svc-group { margin: 0 0 14px; }
.svc-group[hidden] { display: none; }
.svc-group-head { display: flex; align-items: center; gap: 4px; margin: 0; padding: 10px 14px 8px; border-bottom: 1px solid var(--line); font: 500 11.5px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.svc-group-head a { color: var(--ink-2); text-decoration: none; }
.svc-group-head a:hover { color: var(--ink); text-decoration: underline; }
.svc-group-head .i { width: 12px; height: 12px; color: var(--faint); }
.svc-group-head .count { margin-left: 8px; }
.svc[data-view="grid"] .svc-group-head { border-bottom: 0; padding-left: 2px; }
.svc[data-view="grid"] .svc-group { margin-bottom: 22px; }
@media (max-width: 700px) {
  .pj-ask-form .btn { flex: 1 1 140px; }
  .pj-tabs .pj-add { margin-left: 0; }
  .env-move select { max-width: none; }
  .svc-tools .scope-sel { flex: 1 1 100%; }
  .svc-tools .scope-sel select { max-width: none; width: 100%; }
}
.pj-manage { padding: 0; }
.pj-line { display: grid; grid-template-columns: minmax(200px, 32%) minmax(0, 1fr); gap: 10px 40px; align-items: center; padding: 16px 18px; border-top: 1px solid var(--line); }
.pj-line:first-child { border-top: 0; }
.pj-line .lead { display: grid; gap: 3px; }
.pj-line .lead b { font-weight: 600; }
.pj-line .lead span { font-size: 13.5px; color: var(--muted); }
.pj-ctl { display: flex; gap: 10px; align-items: center; min-width: 0; }
.pj-ctl input { flex: 1 1 auto; min-width: 0; max-width: 460px; }
@media (max-width: 700px) {
  .pj-line { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pj-ctl input { max-width: none; }
}

/* === liveprice === the bar at the bottom of a form that creates or resizes something: the buttons, what it costs per month,
   its specs, the honest note and, on click or hover, how the price adds up. Sticky inside the page; the card variant (.inline)
   is the footer of a small form. Figures are tabular and their boxes keep one width, so nothing moves when a number changes. */
.page:has(.price-bar:not(.inline)) { padding-bottom: 0; }
/* A short form still has its bar at the bottom of the screen: the page is as tall as the screen and the bar is pushed down. */
.main:has(.price-bar:not(.inline)) { display: flex; flex-direction: column; }
.main:has(.price-bar:not(.inline)) > .page { flex: 1 0 auto; display: flex; flex-direction: column; }
.page > .price-bar { margin-top: auto; }
.price-gap { flex: none; height: 32px; }
.price-bar { position: sticky; bottom: 0; z-index: 20; margin: 0 calc(var(--gutter) * -1); background: var(--surface); border-top: 1px solid var(--line-strong); box-shadow: 0 -8px 24px -18px rgba(10, 10, 10, .35); }
.price-in { display: grid; gap: 8px; max-width: var(--page-max); margin: 0 auto; padding: 12px var(--gutter); }
.price-main { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; }
.price-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.price-bar:not(.inline) .btn { height: 40px; padding: 0 16px; font-size: 14.5px; } /* not .lg: that class is the log viewer's */
.price-sum { position: relative; display: grid; gap: 1px; min-width: 0; font-variant-numeric: tabular-nums; }
.price-figures { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 22px; }
.price-bar:not([data-ready]) .price-figures { visibility: hidden; }
.price-total { display: inline-flex; align-items: baseline; gap: 6px; min-width: 21ch; min-height: 32px; margin-left: -6px; padding: 0 6px; font: inherit; color: var(--ink); text-align: left; background: none; border: 0; border-radius: var(--radius-sm); cursor: pointer; }
.price-total:hover { background: var(--hover); }
.price-total[aria-expanded="true"] { background: var(--hover); }
.price-amount { font-size: 16px; font-weight: 600; }
.price-per, .price-newlabel { font-size: 13px; color: var(--muted); }
.price-delta { min-width: 17ch; font-size: 16px; font-weight: 600; }
.price-delta[data-sign="-"] { color: var(--ok-ink); }
.price-bar[data-mode="change"] .price-total { min-width: 31ch; }
.price-specs { display: inline-flex; flex-wrap: wrap; gap: 0 18px; font-size: 13px; color: var(--muted); }
.price-spec b { color: var(--ink); font-weight: 600; }
.price-note { font-size: 12.5px; color: var(--muted); }
.price-reason { font-size: 13px; color: var(--muted); }
.price-limit { display: flex; align-items: flex-start; gap: 9px; margin: 0; padding: 9px 13px; border: 1px solid #f4c9c1; border-radius: var(--radius-sm); background: var(--bad-bg); color: var(--bad-ink); font-size: 13.5px; }
.price-limit .i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.price-detail { position: absolute; left: 0; bottom: calc(100% + 16px); z-index: 30; width: min(420px, calc(100vw - 2 * var(--gutter))); padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 18px 40px -18px rgba(10, 10, 10, .4); font-size: 13px; }
.price-lines { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.price-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 4px 14px; }
.price-lines li.total { margin-top: 3px; padding-top: 9px; border-top: 1px solid var(--line); }
.price-l { min-width: 0; overflow-wrap: anywhere; }
.price-c { color: var(--muted); text-align: right; }
.price-a { min-width: 9ch; text-align: right; font-weight: 600; }
.price-detail-note, .price-detail-foot { margin-top: 10px; color: var(--muted); font-size: 12.5px; }
/* In the footer of a card (the size of a database, of a Key Value instance). */
.price-bar.inline { position: static; margin: 0; border-top: 1px solid var(--line); background: transparent; box-shadow: none; }
.price-bar.inline .price-in { max-width: none; padding: 12px 18px; }
.price-bar.inline .price-main { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
.price-bar.inline .price-actions { justify-content: flex-end; }
.price-bar.inline .price-total, .price-bar.inline[data-mode="change"] .price-total, .price-bar.inline .price-delta { min-width: 0; }
.price-bar.inline .price-figures { gap: 2px 14px; }
.price-bar.inline .price-detail { right: 0; width: auto; }
/* In the settings of a service: a footer that stays at the bottom of the screen while the form is on it, as wide as the card. */
.price-bar.inline.stick { position: sticky; bottom: 0; z-index: 20; margin: 12px -22px -18px; border-radius: 0 0 var(--sv-r) var(--sv-r); background: var(--surface); box-shadow: 0 -10px 24px -20px rgba(10, 10, 10, .45); }
.price-bar.inline.stick .price-in { padding: 12px 22px; }
.price-bar.inline.stick .price-main { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px 20px; }
.price-bar.inline.stick .price-actions { order: 0; }
.price-bar.inline.stick .price-specs { display: none; }
.price-bar.inline.stick .price-detail { right: auto; width: min(420px, calc(100vw - 32px)); }
.rows > .foot:has(+ .price-bar.stick) { padding-bottom: 14px; }
/* The Git tab's bar: the same bar, shown once a repository is read. */
.deploy-bar.price-bar { position: sticky; left: auto; right: auto; bottom: 0; margin: 32px calc(var(--gutter) * -1) 0; backdrop-filter: none; }
.deploy-bar.price-bar .deploy-msg { margin: 0; }
body.has-deploy-bar .page { padding-bottom: 0; }
@media (max-width: 860px) {
  /* The page has 18px of padding here, not --gutter. */
  .price-bar:not(.inline), .deploy-bar.price-bar { margin-left: -18px; margin-right: -18px; }
  .price-bar:not(.inline) .price-in { padding-left: 18px; padding-right: 18px; }
  .price-bar .btn, .price-total { min-height: 44px; }
  .price-detail { width: min(420px, calc(100vw - 32px)); }
}
/* At phone width the bar is the total and the button. The specs are in the plan above, and the breakdown is one tap away. */
@media (max-width: 560px) {
  .price-in { padding: 10px 16px; gap: 6px; }
  .price-main { flex-wrap: nowrap; justify-content: space-between; gap: 12px; }
  .price-sum { order: -1; flex: 1 1 0; min-width: 10.5rem; }
  .price-actions { flex: 0 1 auto; min-width: 0; }
  .price-actions .btn.primary { white-space: normal; line-height: 1.2; height: auto; min-height: 44px; padding-top: 6px; padding-bottom: 6px; }
  .price-total, .price-bar[data-mode="change"] .price-total { min-width: 0; white-space: nowrap; }
  .price-delta { min-width: 0; font-size: 15px; }
  .price-specs { display: none; }
  .price-actions .btn:not(.primary) { display: none; }
  .price-bar.inline .price-main { flex-direction: column-reverse; align-items: stretch; }
  .price-bar.inline .price-sum { order: 0; }
  .price-bar.inline.stick { margin: 12px -14px -14px; }
  .price-bar.inline.stick .price-in { padding: 10px 14px; }
  .price-bar.inline.stick .price-main { flex-direction: row; flex-wrap: nowrap; align-items: center; justify-content: space-between; }
  .price-bar.inline.stick .price-sum { order: -1; }
  .price-bar.inline.stick .price-figures { flex-direction: column; align-items: flex-start; gap: 0; }
  .price-bar.inline.stick .price-actions { align-self: flex-start; }
}
/* === staticsites === free static hosting: the card of the plan screen, the Run section of a static site */
@media (min-width: 861px) { .gf-plans:has(.gf-static:not([hidden])) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gf-plan.gf-static em { color: var(--ok-ink); font-weight: 600; }
.gf-static-help { grid-column: 1 / -1; margin: 2px 0 0; }
.static-badge { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 6px; }
.static-move { margin-top: 16px; }
.static-move form { margin-top: 10px; }

/* === imgcheck === the line under an image field: what the registry said while the person typed */
.imgcheck { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; min-height: 20px; font-size: 13px; line-height: 1.5; color: var(--muted); transition: opacity .15s var(--ease, ease); }
.imgcheck[hidden] { display: none; }
.imgcheck .i { flex: none; width: 15px; height: 15px; margin-top: 3px; }
.imgcheck .spinner { flex: none; width: 13px; height: 13px; margin-top: 4px; }
.imgcheck span:last-child { min-width: 0; overflow-wrap: anywhere; }
.imgcheck.ok { color: var(--ok-ink); }
.imgcheck.bad { color: var(--bad-ink); }
.imgcheck.warn { color: var(--busy-ink); }
.imgcheck.is-stale { opacity: .5; }
input[aria-invalid="true"], input[aria-invalid="true"]:hover { border-color: #d9584a; }
input[aria-invalid="true"]:focus { border-color: #d9584a; box-shadow: 0 0 0 3px rgba(217, 88, 74, .25); }
form[data-image-blocked] button[type="submit"][disabled] { cursor: not-allowed; }
/* === eventsmetrics === */
/* Events next to the metrics: markers in a lane above each chart, and the list beside the charts. The
   list sits to the right from 1100px and under the charts below that. A kind is told by its shape
   as well as by its color: disc deploys, triangle failures, diamond scaling, square suspend and
   resume, ring settings, hexagon maintenance. */
.evm-layout { display: block; }
.evm-main { min-width: 0; }
.evm-side { margin-top: 28px; min-width: 0; }
@media (min-width: 1100px) {
  .evm-layout.has-evm { display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 24vw, 400px); gap: 24px 28px; align-items: start; }
  .evm-layout.has-evm > .evm-main { container: evmmain / inline-size; }
  .evm-layout.has-evm > .evm-side { margin-top: 0; position: sticky; top: calc(var(--top) + 66px); }
  .evm-side .evm-list { max-height: max(180px, calc(100vh - var(--top) - 392px)); overflow-y: auto; overscroll-behavior: contain; }
  /* The charts share a narrower column now: two across only when the column is wide enough. */
  .evm-layout.has-evm .sv-charts, .evm-layout.has-evm .rq-charts, .evm-layout.has-evm .stack:has(> .viz-card) { grid-template-columns: minmax(0, 1fr); }
  .evm-layout.has-evm .sv-charts > :nth-child(3) { grid-column: auto; }
}
@container evmmain (min-width: 1040px) {
  .evm-layout.has-evm .sv-charts, .evm-layout.has-evm .rq-charts, .evm-layout.has-evm .stack:has(> .viz-card) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .evm-layout.has-evm .sv-charts > :nth-child(3) { grid-column: 1 / -1; }
}

/* Kind colors. Shapes carry the meaning too. */
.evm-g, .evm-m, .evm-row { --evm: var(--ink); }
.k-deploy { --evm: var(--ink); }
.k-failure { --evm: var(--viz-bad, #d03b3b); }
.k-scale { --evm: var(--viz-2, #2a78d6); }
.k-state { --evm: #b97a00; }
.k-config { --evm: var(--muted); }
.k-maintenance { --evm: var(--viz-4, #6250d6); }
.k-mixed { --evm: var(--ink); }

/* The markers in the chart. */
svg.viz .evm-guide { stroke: var(--evm); stroke-width: 1; stroke-dasharray: 2 3; opacity: .32; pointer-events: none; vector-effect: non-scaling-stroke; }
svg.viz .evm-glyph { fill: var(--evm); stroke: var(--surface); stroke-width: 1.5; paint-order: stroke; transform-box: fill-box; transform-origin: center; transition: transform .12s; }
svg.viz .k-config .evm-glyph { fill: var(--surface); stroke: var(--evm); stroke-width: 2; paint-order: normal; }
svg.viz .evm-hitbox { fill: transparent; }
svg.viz .evm-m.evm-off { display: none; }
svg.viz .evm-hit { cursor: pointer; outline: none; }
svg.viz .evm-pill { fill: var(--ink); stroke: var(--surface); stroke-width: 1.5; }
svg.viz .evm-m.alert .evm-pill { fill: var(--viz-bad, #d03b3b); }
svg.viz .evm-count { fill: #fff; font: 600 9.5px var(--sans); font-variant-numeric: tabular-nums; pointer-events: none; }
svg.viz .evm-m.hot .evm-glyph, svg.viz .evm-m:hover .evm-glyph { transform: scale(1.4); }
svg.viz .evm-m.hot .evm-pill, svg.viz .evm-m:hover .evm-pill { stroke: var(--brand-edge); stroke-width: 2.5; }
svg.viz .evm-m.hot .evm-guide, svg.viz .evm-m:hover .evm-guide { opacity: .75; stroke-dasharray: none; }
.evm-tip { min-width: 190px; max-width: 300px; white-space: normal; }
.evm-tip ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.evm-tip li { display: block; white-space: normal; color: var(--muted); }
.evm-tip li b { color: var(--ink); font-weight: 600; }
.evm-tip .evm-tip-more { margin-top: 5px; color: var(--muted); font-size: 12px; }

/* The list. */
.evm.sv-card { box-shadow: var(--sv-shadow); }
.evm .sv-card-head { padding-bottom: 6px; }
.evm-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 18px 12px; }
.evm-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 550; text-decoration: none; white-space: nowrap; transition: background-color .12s, color .12s, border-color .12s; }
.evm-chip[hidden] { display: none; }
.evm-chip:hover { color: var(--ink); border-color: var(--line-strong); }
.evm-chip.on, .evm-chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.evm-chip .n { font-variant-numeric: tabular-nums; opacity: .7; }
.evm-chip .evm-g { width: 11px; height: 11px; }
.evm-chip .evm-g .evm-glyph { fill: var(--evm); }
.evm-chip.on .evm-g .evm-glyph, .evm-chip[aria-current="true"] .evm-g .evm-glyph { fill: #fff; stroke: #fff; }
.evm-chip.on .evm-g.k-config .evm-glyph, .evm-chip[aria-current="true"] .evm-g.k-config .evm-glyph { fill: none; }
.evm-g.k-config .evm-glyph { fill: none; stroke: var(--evm); stroke-width: 2; }
.evm-g { flex: none; width: 14px; height: 14px; display: block; }
.evm-g .evm-glyph { fill: var(--evm); }
.evm-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.evm-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 0 10px; padding: 11px 18px 11px 15px; border-bottom: 1px solid var(--line); border-left: 3px solid transparent; outline: none; scroll-margin: 8px; }
.evm-row:last-child { border-bottom: 0; }
.evm-row[hidden] { display: none; }
.evm-row .evm-gw { padding-top: 3px; }
.evm-row.hot, .evm-row:target { background: var(--brand-soft); border-left-color: var(--brand-edge); }
.evm-row:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.evm-title { font-size: 13.5px; font-weight: 600; letter-spacing: -0.005em; overflow-wrap: anywhere; }
.evm-title a { text-decoration: none; }
.evm-title a:hover { text-decoration: underline; text-decoration-color: var(--ink); }
.evm-meta { margin-top: 1px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.evm-detail { margin-top: 3px; font-size: 12.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.evm-none { padding: 22px 18px 24px; border-top: 1px solid var(--line); text-align: left; }
.evm-none[hidden] { display: none; }
.evm-none h3 { font-size: 14px; }
.evm-none p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.evm-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 9px 18px; border-top: 1px solid var(--line); background: var(--tint); font-size: 12.5px; color: var(--ink-2); }
.evm-note[hidden] { display: none; }
.evm-note .i { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--busy-ink); }
.evm .sv-card-foot { display: grid; gap: 6px; }
.evm .sv-card-foot .more { font-weight: 550; color: var(--ink); }
@media (max-width: 700px) {
  .evm-chips { padding: 2px 14px 10px; }
  .evm-row { padding-left: 12px; padding-right: 14px; }
  .evm .sv-card-head { padding-left: 14px; padding-right: 14px; }
  .evm .sv-card-foot, .evm-none, .evm-note { padding-left: 14px; padding-right: 14px; }
  .evm-list { max-height: 460px; overflow-y: auto; }
}
.evm-jump { margin-left: auto; font-size: 12.5px; font-weight: 550; color: var(--ink); }
@media (min-width: 1100px) { .evm-jump { display: none; } }
.ev-item.deploy:target { background: var(--brand-soft); box-shadow: -3px 0 0 var(--brand-edge); scroll-margin-top: calc(var(--top) + 70px); }
/* === rollbackdiff === the preview of a rollback: settings and variables that change, what else happens */
.rb { margin-top: 4px; }
.rb-main { display: grid; gap: 20px; min-width: 0; }
.rb-form { display: grid; gap: 20px; margin: 0; }
.rb-card .rb-blocked { margin: 0 18px 12px; }
.rb-target { display: grid; gap: 4px; margin: 0 18px 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tint); min-width: 0; }
.rb-label { font: 500 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rb-image { font: 600 13.5px/1.4 var(--mono); background: none; padding: 0; overflow-wrap: anywhere; word-break: break-all; }
.rb-table { border-top: 1px solid var(--line); }
.rb-table table { table-layout: auto; width: 100%; }
.rb-table th, .rb-table td { vertical-align: top; padding: 9px 14px; }
.rb-table th:first-child, .rb-table td:first-child { padding-left: 18px; }
.rb-table th:last-child, .rb-table td:last-child { padding-right: 18px; }
.rb-table thead th { padding-top: 8px; padding-bottom: 8px; font: 500 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rb-table tbody th { font: 600 13.5px/1.5 var(--sans); letter-spacing: 0; text-transform: none; color: var(--ink); white-space: nowrap; border-bottom: 1px solid var(--line); }
.rb-table tbody tr:last-child > * { border-bottom: 0; }
.rb-row .rb-v { overflow-wrap: anywhere; word-break: break-word; font-size: 13.5px; }
.rb-row.changed .rb-v, .rb-row .rb-val { font-family: var(--mono); font-size: 12.5px; }
.rb-old { background: var(--bad-bg); color: var(--bad-ink); }
.rb-new { background: var(--ok-bg); color: var(--ok-ink); }
.rb-sign { display: inline-block; width: 14px; margin-right: 4px; font: 700 13px/1 var(--mono); text-align: center; }
.rb-row.same td, .rb-row.kept td { color: var(--ink-2); }
.rb-row.same .rb-v, .rb-row.kept .rb-v { color: var(--muted); }
.rb-same .rb-why { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; max-width: 80ch; }
.rb-row.kept .rb-why { color: var(--ink-2); }
.rb-kind { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.rb-kind.added { background: var(--ok-bg); color: var(--ok-ink); }
.rb-kind.removed { background: var(--bad-bg); color: var(--bad-ink); }
.rb-kind.changed { background: var(--busy-bg); color: var(--busy-ink); }
.rb-kind .rb-sign { width: auto; margin: 0; }
.rb-row.added .rb-old, .rb-row.removed .rb-new { background: var(--tint); color: var(--muted); }
.rb-row.changed > .rb-old + .rb-new, .rb-row .rb-old + .rb-new { border-left: 1px solid var(--line); }
.rb-mask { font: 600 13px/1 var(--mono); letter-spacing: .1em; }
.rb-val { background: none; padding: 0; font-weight: 500; overflow-wrap: anywhere; word-break: break-all; }
.rb-same-count { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.rb-env-note { margin: 0; padding: 4px 18px 16px; max-width: 80ch; color: var(--ink-2); font-size: 13.5px; }
.rb-check { display: flex; align-items: flex-start; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); background: var(--tint); cursor: pointer; }
.rb-check input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--ink); flex: none; }
.rb-check span { display: grid; gap: 2px; font-size: 13.5px; }
.rb-check small { color: var(--muted); font-size: 12.5px; }
.rb-table.off tbody tr { opacity: .55; }
.rb-table.off tbody tr .rb-mask, .rb-table.off tbody tr .rb-val { text-decoration: line-through; text-decoration-color: var(--faint); }
.rb-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--line); }
.rb-foot .muted { margin-left: 4px; }
.rb-facts { margin: 0; padding: 4px 18px 16px 34px; display: grid; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.rb-facts li { padding-left: 2px; }
.rb-facts li[hidden] { display: none; }
@media (max-width: 700px) {
  .rb-table table, .rb-table thead, .rb-table tbody, .rb-table tr, .rb-table th, .rb-table td { display: block; }
  .rb-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rb-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .rb-table tr:last-child { border-bottom: 0; }
  .rb-table th, .rb-table td { padding: 3px 18px; border: 0; }
  .rb-table tbody th { white-space: normal; padding-top: 6px; }
  .rb-old, .rb-new { margin: 2px 18px; padding: 6px 10px; border-radius: 6px; }
  .rb-old::before, .rb-new::before { content: attr(data-label); display: block; margin-bottom: 2px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
  .rb-same, .rb-row.same td, .rb-row.kept td { padding: 3px 18px; }
  .rb-row .rb-old + .rb-new { border-left: 0; }
  .rb-foot .btn { flex: 1 1 auto; justify-content: center; }
}

/* === deployinfo === Deploy titles, the page of one deploy and the list of variables Kilby sets */
.deploy-title { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.deploy-title:hover { text-decoration: underline; text-decoration-color: var(--line-strong); }
.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-row { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 2px 18px; align-items: baseline; padding: 12px 18px; border-top: 1px solid var(--line); }
.kv-row:first-child { border-top: 0; }
.kv-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.kv-name code { background: none; padding: 0; font-weight: 600; overflow-wrap: anywhere; }
.kv-val code { background: none; padding: 0; font-size: 14px; }
.kv-why { grid-column: 2; margin: 0; }
.kv-row.off .kv-name code { color: var(--muted); font-weight: 500; }
.kv-none, .kv-foot { margin: 0; padding: 14px 18px; }
.kv-foot { border-top: 1px solid var(--line); }
#concurrency .check small { display: block; margin-top: 2px; }
@media (max-width: 640px) {
  .kv-row { grid-template-columns: minmax(0, 1fr); }
  .kv-why { grid-column: 1; }
}

/* === predeploy === The pre-deploy command: its field, chips and time limit, the stage on the deploy lists, and the skip box next to Redeploy. */
.pd-field { position: relative; display: block; }
.pd-field .pd-prompt { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; pointer-events: none; }
.pd-field input { padding-left: 26px; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-chips .chip { height: auto; min-height: 28px; padding: 4px 10px; gap: 8px; text-align: left; }
.pd-chips .chip b { font-weight: 600; color: var(--ink); }
.pd-chips .chip code { padding: 0; background: none; font-size: 12px; color: var(--ink-2); overflow-wrap: anywhere; }
.pd-chips .chip.done { border-color: #86b81a; background: var(--brand-soft); }
.pd-limit { display: flex; align-items: center; gap: 10px; width: fit-content; font-size: 13px; color: var(--ink-2); }
.pd-limit .unit { width: 150px; }
.pd-limit input { height: 32px; }
.pd-stage { margin-top: 8px; padding: 8px 0 0; border-top: 1px dashed var(--line); }
.pd-line { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 13px; }
.pd-line b { font-weight: 600; color: var(--ink); }
.pd-cmd { max-width: 100%; padding: 1px 6px; border-radius: 4px; background: var(--hover); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-note { margin: 4px 0 0; }
.pd-stage.bad .pd-line b { color: var(--bad-ink); }
.dp-pre { padding: 4px 18px 14px; }
.dp-pre .pd-stage { margin-top: 10px; border-top: 0; padding-top: 0; }
.sh-redeploy { display: inline-flex; align-items: center; gap: 12px; }
.sh-skip { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.sh-skip input { width: 14px; height: 14px; }
.menu-check { padding: 6px 10px 0; font-size: 12.5px; font-weight: 400; color: var(--muted); }
@media (max-width: 720px) {
  /* On a phone the form steps aside so Open, Redeploy and the menu share one row and the skip box sits under them. */
  .sh-redeploy { display: contents; }
  .sh-redeploy .sh-skip { order: 5; flex: 1 0 100%; }
  .pd-chips .chip { width: 100%; }
  .pd-cmd { white-space: normal; overflow-wrap: anywhere; }
}

/* === secretfiles === The Generate button, the Secret files card and the secret files of the new-service form. */
/* Generate: only with scripts. Rows that carry it get one more column. */
.gen { display: none; position: relative; }
.js .gen { display: inline-block; }
.gen-btn { white-space: nowrap; }
.gen-btn .i { width: 14px; height: 14px; }
.gen-menu { position: absolute; z-index: 30; top: calc(100% + 4px); right: 0; display: grid; gap: 2px; min-width: 276px; padding: 4px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: 0 18px 44px -18px rgba(10, 10, 10, .45); }
.gen-menu[hidden] { display: none; }
.gen-menu button { display: grid; gap: 1px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.gen-menu button:hover, .gen-menu button:focus-visible { background: var(--hover); outline: none; }
.gen-menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.gen-menu b { font-size: 13px; font-weight: 600; }
.sv-card.envx { overflow: visible; }
.sv-card.envx > .envx-foot { border-radius: 0 0 var(--sv-r) var(--sv-r); }
.gen-menu small { font: 12px/1.4 var(--mono); color: var(--muted); }
.gen-note { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--busy-bg); color: var(--busy-ink); font-size: 12.5px; }
.gen-note b { font-weight: 600; }
.gen-note .btn { height: 24px; padding: 0 8px; }
.gen-field { display: flex; align-items: center; gap: 8px; }
.gen-field input { flex: 1; min-width: 0; }
.js .env-cols, .js .env-row, .js .envx-head, .js .envx-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 108px 28px; }
.js .gf-env-cols, .js .gf-env-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 108px 74px 28px; }
.js .gen { justify-self: stretch; }
.js .env-row .gen-btn, .js .envx-row .gen-btn, .js .gf-env-row .gen-btn { width: 100%; justify-content: center; }
@media (max-width: 860px) {
  .js .gf-env-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .js .gf-env-row .gen { grid-column: 1; justify-self: start; }
}
@media (max-width: 700px) {
  .js .env-row, .js .envx-row { grid-template-columns: minmax(0, 1fr) 28px; }
  .js .env-row .gen, .js .envx-row .gen { grid-column: 1; justify-self: start; }
  .js .env-row .gen-btn, .js .envx-row .gen-btn, .js .gf-env-row .gen-btn { width: auto; }
  .gen-menu { right: auto; left: 0; min-width: min(276px, calc(100vw - 48px)); }
}

/* The card in the Environment tab. */
.sf { margin-top: 20px; }
.sf-use { display: flex; align-items: center; gap: 12px; padding: 0 18px 12px; }
.sf-use progress { flex: 0 0 min(220px, 40%); height: 6px; border-radius: 3px; }
.sf-use progress::-webkit-progress-value { background: var(--brand-edge); border-radius: 3px; }
.sf-use progress::-moz-progress-bar { background: var(--brand-edge); }
.sf-use progress.warn::-webkit-progress-value { background: var(--dot-busy); }
.sf-use progress.warn::-moz-progress-bar { background: var(--dot-busy); }
.sf-use progress.bad::-webkit-progress-value { background: var(--dot-bad); }
.sf-use progress.bad::-moz-progress-bar { background: var(--dot-bad); }
.sf-full { display: flex; align-items: flex-start; gap: 8px; margin: 0 18px 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--busy-bg); color: var(--busy-ink); font-size: 13px; }
.sf-full .i { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.sf-list { list-style: none; margin: 0; padding: 0; }
.sf-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 20px; padding: 12px 18px; border-top: 1px solid var(--line); }
.sf-file { display: grid; gap: 3px; min-width: 0; }
.sf-name code { background: none; padding: 0; font-size: 13.5px; }
.sf-path { display: flex; align-items: center; gap: 2px; min-width: 0; color: var(--muted); }
.sf-path code { background: none; padding: 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.sf-path .icon-btn { width: 24px; height: 24px; }
.sf-path .icon-btn.done { color: var(--ok-ink); }
.sf-meta { white-space: nowrap; }
.sf-actions { display: flex; gap: 6px; margin: 0; }
.sf-none { margin: 0; padding: 4px 18px 16px; color: var(--muted); }
.sf-form { display: grid; gap: 16px; padding: 18px; border-top: 1px solid var(--line); background: var(--tint); }
.sf-form[hidden] { display: none; }
.sf-form h3 { font-size: 14px; }
.sf-form h3 code { font-size: 13px; }
.sf-field { display: grid; gap: 6px; min-width: 0; }
.sf-field > label, .sf-field-head > label:first-child { font-weight: 600; font-size: 13px; }
.sf-field-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sf-field input[readonly] { background: var(--hover); }
.sf-form textarea, .sf-new-row textarea { width: 100%; min-height: 120px; resize: vertical; font-size: 12.5px; line-height: 1.55; white-space: pre; overflow: auto; tab-size: 2; }
.sf-form textarea { min-height: 220px; }
.sf-count { min-height: 1.4em; font-variant-numeric: tabular-nums; }
.sf-count.bad, .sf-gone { color: var(--bad-ink); }
.sf-gone { margin: 0; font-size: 13px; }
.sf-warn { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.sf-warn .i { flex: none; width: 15px; height: 15px; margin-top: 2px; color: var(--muted); }
.sf-foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; }
.sf-foot .actions { display: inline-flex; gap: 8px; }
.sf-upload { display: none; position: relative; cursor: pointer; }
.js .sf-upload { display: inline-flex; }
.sf-upload:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }
.sf-suggest { display: none; margin-left: 4px; }
.js .sf-suggest { display: inline; }
.sf-suggest .chip { margin-left: 4px; }
.sf-facts { margin: 0; padding: 12px 18px 16px 34px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: grid; gap: 4px; }
.sf-facts b { color: var(--ink); font-weight: 600; }
.sf-facts code { font-size: 12px; }
.sf-list:empty + .sf-facts { border-top: 0; }
/* The new-service form. */
.sf-new-rows { display: grid; gap: 12px; }
.sf-new-rows:empty { display: none; }
.sf-new-row { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.sf-new-head { display: flex; align-items: center; gap: 8px; }
.sf-new-head input { flex: 1; min-width: 0; }
.sf-upload-slot { display: inline-flex; align-items: center; gap: 4px; }
.sf-new-add { display: none; margin-top: 4px; width: fit-content; justify-self: start; align-self: start; }
.js .sf-new-add { display: inline-flex; }
.sf-new-rows + .sf-new-add, .sf-new-rows + noscript + .sf-new-add { margin-top: 12px; }
@media (max-width: 700px) {
  .sf-list li { grid-template-columns: minmax(0, 1fr); }
  .sf-meta { white-space: normal; }
  .sf-actions { margin-top: 6px; }
  .sf-use { flex-wrap: wrap; }
  .sf-new-head { flex-wrap: wrap; }
}

/* === waitpage === Maintenance mode in the settings of a web service, its mark in the lists, and the bar that announces upcoming maintenance. */
.pg-form .badge { width: max-content; }
.pg-form > .foot { flex-wrap: wrap-reverse; }
.pg-form > .foot .muted { flex: 1 1 14rem; margin-left: 0; }
.pg-msg textarea { width: 100%; min-height: 84px; font-family: var(--sans); font-size: 14px; line-height: 1.5; }
.pg-preview { max-width: 30rem; padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.pg-tag { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 10px; padding: 2px 9px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font: 600 10.5px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pg-tag::before { content: ""; width: 7px; height: 7px; border-radius: 7px; background: #d99a00; }
.pg-title { margin: 0 0 4px; font-size: 17px; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; color: var(--ink); }
.pg-text { margin: 0; color: var(--muted); }
.pg-note { margin: 12px 0 0; padding: 10px 12px; border-left: 3px solid #d99a00; background: rgba(120, 120, 110, .08); color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.pg-note[hidden] { display: none; }
.svc-status .svc-msg.maint { color: var(--busy-ink); }

.sp-banner b { font-weight: 650; color: var(--ink); }
.sp-banner.upcoming span a { margin-left: 0; white-space: normal; }
.sp-banner.upcoming form { margin: 0 0 0 auto; flex: none; display: flex; }
.sp-x { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--sp-info-ink); cursor: pointer; }
.sp-x:hover { background: rgba(31, 79, 153, .1); }
.sp-x:focus-visible { outline: 2px solid var(--sp-info-ink); outline-offset: 1px; }
.sp-x .i { width: 14px; height: 14px; color: currentColor; }
@media (max-width: 720px) {
  .sp-banner.upcoming span { flex: 1 1 0; min-width: 0; }
  .sp-banner.upcoming form { margin-left: 0; align-self: flex-start; }
}

/* === logstreams === Workspace settings > Log streams: the list, one destination, the provider chooser */
.ls-note { margin: 0 0 18px; }
.ls-why { display: block; margin-top: 4px; max-width: 52ch; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.ls-drop { color: var(--busy-ink); }
.ls-lost { color: var(--busy-ink); }
.ls-reasons { margin: 4px 0 6px 18px; padding: 0; font-size: 13px; color: var(--ink-2); }
.ls-chooser { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ls-chooser li { display: flex; }
.ls-provider { display: flex; flex: 1; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: inherit; text-decoration: none; }
.ls-provider:hover { border-color: var(--line-strong); }
.ls-provider:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.ls-provider > span:last-child { display: grid; gap: 3px; min-width: 0; }
.ls-provider b { font-weight: 600; }
.ls-provider small { font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.ls-form .ctl input:not([type=checkbox]), .ls-form .ctl select { width: 100%; max-width: 520px; }
.ls-form .help code { font-size: 12.5px; }
.ls-brief { display: none; }
@media (max-width: 700px) {
  .ls-chooser { grid-template-columns: 1fr; }
  .ls-brief { display: block; }
  .ls-why { max-width: none; min-width: 150px; }
}

/* === slack === Slack channels on the Notifications page: the event checklist in groups, the connect steps, the state line of a
   destination and the drawing of a sample message. */
.check-groups { display: grid; gap: 16px; }
.check-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.check-group legend { padding: 0; margin: 0 0 2px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.check-group > .muted { margin: 2px 0 4px; }
.check-group .checks { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: 18px; align-items: start; }
.check-group .check span { align-content: start; }
ol.steps { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 5px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
ol.steps code { overflow-wrap: anywhere; }
.state-detail { display: block; margin-top: 5px; max-width: 340px; font-size: 12.5px; line-height: 1.4; color: var(--muted); white-space: normal; }
.slack-hint { margin: 0 0 8px; font-size: 13px; color: var(--ink-2); }
.slack-msg { display: grid; gap: 6px; max-width: 520px; padding: 12px 14px 12px 16px; border: 1px solid var(--line-strong); border-left: 4px solid var(--brand-edge); border-radius: var(--radius-sm); background: var(--surface); }
.slack-msg p { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.slack-msg .slack-title { font-size: 15px; color: var(--ink); }
.slack-msg .slack-meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.slack-msg .slack-btn { justify-self: start; margin-top: 2px; padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 550; color: var(--ink); background: var(--tint); }
.card-body > .slack-msg { margin-bottom: 12px; }
@media (max-width: 640px) {
  .slack-sm-off { display: none; }
  .state-detail { max-width: none; }
  .slack-msg { max-width: none; }
}
/* === pgautogrow === */
/* A switch: a checkbox that looks like one. The label is the click target. It works without JavaScript. */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; width: fit-content; cursor: pointer; font-weight: 500; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { position: relative; flex: none; width: 36px; height: 20px; border-radius: 10px; background: var(--line-strong); transition: background .15s; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(10, 10, 10, .25); transition: transform .15s; }
.switch input:checked + .switch-track { background: var(--ink); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--ink); outline-offset: 2px; }
.switch .when-on { display: none; }
.switch input:checked ~ .switch-text .when-on { display: inline; }
.switch input:checked ~ .switch-text .when-off { display: none; }
.switch.is-off { cursor: not-allowed; color: var(--muted); }
.switch.is-off .switch-track { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-track::after { transition: none; } }

/* The largest size: only while the switch is on (no script: the switch and the field are siblings' children). */
.pg-grow-max { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 6px 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tint); }
.pg-grow-max > label { font-size: 13.5px; font-weight: 500; }
.pg-grow-max .help { grid-column: 1 / -1; }
.num-unit { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.num-unit input { width: 96px; height: 34px; text-align: right; font-variant-numeric: tabular-nums; }
.pg-grow:has(input[name="autogrow"]:not(:checked)) .pg-grow-max { display: none; }
.pg-grow { display: grid; gap: 10px; }

/* Which Postgres versions there are, and how long PostgreSQL supports the one that is chosen. */
.seg small.rec { height: auto; padding: 1px 6px; border-radius: 4px; background: var(--brand-soft); color: var(--green-ink); font-size: 11.5px; font-weight: 600; letter-spacing: .01em; }
.pg-support { margin: 0; font-size: 13px; color: var(--muted); min-height: 20px; }
.pg-support [data-pg-support-calm] { color: var(--ink-2); }

/* The settings card of a database: how full the disk is, and what the rule is doing about it. */
.pg-usage { display: grid; gap: 6px; }
.pg-usage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-variant-numeric: tabular-nums; }
.pg-state { margin: 0; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--tint); font-size: 13px; color: var(--ink-2); }
.pg-state.warn { background: #fffaea; border-color: #f0dca0; }
.pg-state.bad { background: var(--bad-bg); border-color: #f3c3bb; color: var(--bad-ink); }
.pg-card .pg-grow-max { grid-template-columns: auto 1fr; }
@media (max-width: 600px) { .pg-grow-max { grid-template-columns: 1fr; } .num-unit input { width: 100%; max-width: 140px; } }
/* === pgha === high availability for managed Postgres: the switch, its row in the creation form and the card of the database page */
.sw-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.sw { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 460px; min-height: 40px; padding: 0 14px 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; }
.sw-track { position: relative; flex: none; width: 34px; height: 20px; border-radius: 10px; background: #cfcbc2; transition: background .12s; }
.sw-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .12s, background .12s; }
.sw-input:checked + .sw .sw-track { background: var(--ink); }
.sw-input:checked + .sw .sw-track::after { transform: translateX(14px); background: var(--brand); }
.sw-input:focus-visible + .sw { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw-input:disabled + .sw { background: var(--tint); color: var(--muted); cursor: not-allowed; }
.sw-input:disabled + .sw .sw-track { opacity: .6; }
.sw-state .sw-on { display: none; }
.sw-input:checked + .sw .sw-state .sw-on { display: inline; }
.sw-input:checked + .sw .sw-state .sw-off { display: none; }
.ha-ctl { display: grid; gap: 0; min-width: 0; }
.ha-add { margin: 8px 0 0; }
.ha-add b { color: var(--ink); font-weight: 600; }
.ha-sub { display: none; margin-top: 14px; min-width: 0; }
.sw-input:checked ~ .ha-sub { display: grid; gap: 16px; }
.ha-repl { margin: 0; padding: 0; border: 0; display: grid; gap: 2px; min-width: 0; }
.ha-repl legend { padding: 0 0 4px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.ha-repl .check small { max-width: 62ch; }
.ha-cover ul { font-size: 13px; }
.ha-cover li code { background: rgba(10, 10, 10, .06); }
.ha-card .ha-note { margin: 0 18px 4px; }
.ha-card .ha-note:first-of-type { margin-top: 14px; }
.ha-facts dd { flex-wrap: wrap; row-gap: 4px; }
.ha-facts dd .badge { height: 20px; }
.ha-foot { margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); }
.ha-off p { margin: 0 0 6px; }
.ha-off p:last-child { margin-bottom: 0; }
.ha-card form > .foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.ha-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ha-card form .card-body.flush-top .ha-cover { margin-top: 14px; }
.ha-card form .card-body.flush-top { display: grid; gap: 4px; }
@media (max-width: 700px) {
  .sw { max-width: none; }
  .ha-actions { width: 100%; justify-content: stretch; }
  .ha-actions .btn { flex: 1 1 auto; }
}

/* === publicgit === */
/* The Public Git repository tab of the new-service page, and how new commits reach a service built from a public repository. */
.pg-pick { padding: 22px 24px 20px; display: grid; gap: 20px; max-width: 760px; }
.pg-intro { display: grid; gap: 3px; }
.pg-intro b { font-size: 15px; font-weight: 600; }
.pg-intro span { color: var(--muted); font-size: 13.5px; max-width: 64ch; }
.pg-field { display: grid; gap: 6px; }
.pg-field > label { font-weight: 550; }
.pg-input { position: relative; }
.pg-input input { height: 42px; padding-right: 42px; font-size: 14.5px; }
.pg-mark { position: absolute; right: 13px; top: 50%; width: 18px; height: 18px; margin-top: -9px; display: grid; place-items: center; pointer-events: none; }
.pg-mark .i { width: 18px; height: 18px; }
.pg-input.is-ok input { border-color: #86b81a; }
.pg-input.is-ok .pg-mark { color: var(--ok-ink); }
.pg-input.is-bad input { border-color: #d9857a; }
.pg-input.is-bad .pg-mark { color: var(--bad-ink); }
.pg-input.is-warn input { border-color: #e2c570; }
.pg-input.is-warn .pg-mark { color: var(--busy-ink); }
.pg-status { min-height: 21px; margin: 0; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.pg-status.ok { color: var(--ok-ink); }
.pg-status.bad { color: var(--bad-ink); }
.pg-status.warn { color: var(--busy-ink); }
.pg-status .linkish { display: inline; font-size: inherit; color: inherit; }
.pg-actions { display: flex; justify-content: flex-end; }
.pg .gf-fallback { padding: 0; border-top: 0; }
.pg .gf-source-main .tile .i { width: 18px; height: 18px; }
.gf-branch input { width: auto; min-width: 190px; height: 32px; }
.note.ok { background: var(--ok-bg); border-color: #d5eb9a; color: var(--ok-ink); }
.note.ok .i { color: var(--ok-ink); }
.pg-uptodate { margin: 0 0 16px; }
.pg-uptodate form { display: inline; margin: 0 0 0 6px; }
.pg-uptodate .linkish { display: inline; font-size: inherit; color: inherit; }
#public-source .pg-facts { margin: 0; color: var(--ink-2); font-size: 13.5px; overflow-wrap: anywhere; }
#public-source .pg-inline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0; }
#public-source .hook { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#public-source .hook form { margin: 0; }
#public-source .hook .actions { display: flex; gap: 8px; flex-wrap: wrap; }
#public-source pre.code { margin: 0; }
#public-source .note { margin: 0; }
#public-source .row.is-target { background: var(--hover); }
@media (max-width: 700px) {
  .pg-pick { padding: 18px 16px 16px; }
  .pg-actions .btn { width: 100%; }
  .gf-branch input { width: 100%; min-width: 0; }
  .gf-branch { width: 100%; }
}

/* === svcnew === */
.menu-hint { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.src-tabs a .tag.soon { height: 18px; padding: 0 6px; background: var(--hover); color: var(--muted); font: 500 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.src-tabs a:hover .tag.soon { color: var(--ink-2); }
.addr-preview { margin: 0; overflow-wrap: anywhere; }
.addr-preview code { color: var(--ink-2); }
.addr-preview:empty { display: none; }
.row .ctl > input.narrow-input { max-width: 240px; }
.port-note, .health-help { margin: 0; }
.port-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.port-picks[hidden], .port-note[hidden] { display: none; }
.row .ctl > .chip[data-health-use] { justify-self: start; }
.pg-status a, .gf-error .note a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) {
  .menu-hint { display: none; }
}

/* === ghflow === */
/* The GitHub tab of New service and the GitHub settings: connect, choose an account, list repositories. Without the
   script (html has no .js class) the list is plain links and the typed fields step aside. */
.js .gf-nojs { display: none; }
html:not(.js) .gf-pick--list .gf-search,
html:not(.js) .gf-pick--list .gf-fallback { display: none; }
.gf-pick-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gf-accounts { display: flex; flex-wrap: wrap; gap: 6px; }
.gf-accounts a { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 500; text-decoration: none; color: var(--ink-2); background: var(--surface); }
.gf-accounts a.on { border-color: #86b81a; background: var(--brand-soft); color: var(--ink); }
html:not(.js) .gf-account select { display: none; }
.gf-scope { margin: 0; padding: 10px 16px 0; }
.gf-problem { display: flex; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin: 12px 16px 0; padding: 10px 12px; border: 1px solid #f0dca0; border-radius: var(--radius-sm); background: #fffaea; font-size: 13.5px; }
.gf-problem[hidden], .gf-noshare[hidden], .gf-scope[hidden] { display: none; }
.gf-problem > .i { width: 16px; height: 16px; margin-top: 2px; color: var(--busy-ink); flex: none; }
.gf-problem > span:not(.actions) { flex: 1; min-width: 200px; }
.gf-problem .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gf-noshare { display: flex; align-items: flex-start; gap: 14px; padding: 22px 18px 24px; }
.gf-noshare h3 { font-size: 15px; margin: 0 0 4px; }
.gf-noshare p { max-width: 56ch; margin: 0 0 12px; }
.gf-noshare .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gf-ssr { padding: 12px 8px 4px; }
.gf-ssr-search { display: flex; gap: 8px; padding: 0 8px 4px; }
.gf-ssr-search input { flex: 1; min-width: 0; height: 40px; }
.gf-ssr .gf-list { max-height: none; }
.gf-ssr a.gf-item { text-decoration: none; color: inherit; }
.gf-step { margin: 0; }
.gf-connect { display: grid; gap: 14px; }
.gf-connect .note { margin: 0; }
.gf-pending { align-items: flex-start; background: var(--tint); }
.gf-pending > .i { margin-top: 3px; }
.gf-pending b { color: var(--ink); font-weight: 600; }
.gf-pending p { margin: 4px 0 10px; max-width: 64ch; color: var(--ink-2); }
.gf-pending form { margin: 0; }
.gf-steps { margin: 4px 0 6px; max-width: 62ch; }
.gf-connect-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 0; }
.gf-connect-actions .btn { margin-top: 0; }
.gf-alt { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.gh-inline { display: inline; margin: 0; padding: 0; }
.gh-inline .linkish { font: inherit; }
.gh-why td { padding-top: 0; border-top: 0; }
.gh-why p { margin: 0; max-width: 70ch; }
.gh-choose-foot { margin: 18px 0 0; }
.gf-more { margin-bottom: 28px; }
.gf-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.gf-btns .btn { margin-top: 0; }
.pane .empty { margin-bottom: 28px; }
@media (max-width: 700px) {
  .gf-pick-head .actions { width: 100%; }
  .gf-pick-head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .gf-noshare { flex-direction: column; }
  .gf-ssr-search { flex-wrap: wrap; }
  /* A repository is two lines on a phone: its name, then Private/Public and when it was updated. */
  .gf-item { flex-wrap: wrap; row-gap: 4px; position: relative; padding-right: 30px; }
  .gf-item-main { flex: 1 1 100%; white-space: normal; overflow-wrap: anywhere; }
  .gf-item .i { position: absolute; right: 8px; top: 14px; }
}

/* === ux2 === */
/* The question dialog (app.js, "confirm:begin"): what a data-confirm form asks before it is sent. */
html.kdlg-open { overflow: hidden; padding-right: var(--kdlg-sbw, 0px); }
.kdlg { width: min(440px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink); overflow: hidden; overscroll-behavior: contain; box-shadow: 0 28px 70px -24px rgba(10, 10, 10, .5), 0 0 0 1px rgba(10, 10, 10, .06); }
.kdlg::backdrop { background: rgba(10, 10, 10, .34); }
.kdlg-box { display: grid; gap: 8px; padding: 20px 22px 18px; }
.kdlg-title { font-size: 16px; line-height: 1.35; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kdlg-body { font-size: 13.5px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.kdlg-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.kdlg-actions .btn { white-space: normal; height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; text-align: center; }
.kdlg-ok.is-danger { background: #c93a28; border-color: #c93a28; color: #fff; }
.kdlg-ok.is-danger:hover { background: #a9301f; border-color: #a9301f; }
.kdlg-ok.is-danger:focus-visible { outline-color: #c93a28; }
@media (prefers-reduced-motion: no-preference) {
  .kdlg[open] { animation: kdlg-in .14s ease-out; }
  .kdlg[open]::backdrop { animation: kdlg-fade .14s ease-out; }
}
@keyframes kdlg-in { from { opacity: 0; transform: translateY(6px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes kdlg-fade { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 480px) {
  .kdlg-box { padding: 18px 16px 16px; }
  .kdlg-actions { flex-direction: column-reverse; }
  .kdlg-actions .btn { width: 100%; }
}

/* The tag after an actor in Activity and the events lists: how the action was made. */
.via { display: inline-block; margin: 0 2px; padding: 0 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--tint); color: var(--muted); font-size: 11.5px; font-weight: 400; line-height: 18px; vertical-align: 1px; max-width: 100%; overflow-wrap: anywhere; }
.via code { padding: 0; background: none; font-size: 11.5px; color: var(--ink-2); }
.rb-check small.rb-line { color: var(--ink-2); font-weight: 550; }

/* === crashvis === */
/* A running service whose container died and was started again: a muted line beside the status, never a badge. */
.sv-restarts { margin: -8px 2px 20px; color: var(--muted); font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sv-restarts a { color: var(--ink-2); text-underline-offset: 2px; }
.sv-restarts .more { margin-left: 4px; }
.svc-status .svc-restarts { color: var(--muted); white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.svc[data-view="grid"] .svc-status .svc-restarts { display: none; }
@media (max-width: 860px) {
  .svc[data-view="list"] .svc-status .svc-restarts { display: none; }
}
/* === aitemplates === */
.tpl-body { display: grid; gap: 8px; align-content: start; }
/* The note on a template's card. Not .tpl-fit: that is the table on a template's page. */
.tpl-note { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 12.5px; color: var(--busy-ink); }
.tpl-note .i { flex: none; width: 14px; height: 14px; margin-top: 2px; }
/* === dash2 === */
/* The overview's deploy activity and the month's cost, each a full-width row: a strip of numbers that say what
   happened, then the chart (or, with few deploys, the deploys themselves) and the words that explain it. */
.dep2, .cost2 { margin-top: 36px; box-shadow: var(--shadow-card); border-radius: var(--r-lg); }
.cost2 { margin-top: 16px; }
.dep2 .card-head, .cost2 .card-head { align-items: flex-start; }

/* The strip: one row of numbers on a wide screen, two or three columns on a narrow one. Values in the sans at
   their natural widths; labels like the table headers. */
.dep2-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; border-bottom: 1px solid var(--line); }
.dep2-strip > div { display: grid; gap: 3px; align-content: start; min-width: 0; padding: 14px 18px 15px; border-left: 1px solid var(--line); }
.dep2-strip > div:first-child { border-left: 0; }
.dep2-strip dt { display: flex; align-items: center; gap: 7px; font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.dep2-strip dt .key { width: 9px; height: 9px; flex: none; }
/* Deploys that went live, in the de-emphasis gray: the failures in red are the point (and stay apart from it for
   colorblind readers: ΔE 9.8 deutan, 19.5 normal vision, 3.3:1 on white). */
svg.viz .bar.quiet { fill: var(--viz-limit); }
.key.quiet, .viz-tip .key.quiet { background: var(--viz-limit); }
.dep2-strip dd { margin: 0; min-width: 0; }
.dep2-val { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dep2-note { font-size: 12.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; }
.dep2-note a { color: var(--ink-2); }

.dep2-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 18px 14px; }
.dep2-headline { font-size: 14px; font-weight: 550; color: var(--ink); }
.dep2-fine { margin: 0; padding: 0 18px 14px; max-width: none; }

/* The chart's own head: what it shows, its legend, and the measure. */
.dep2-chart { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.dep2-chart-head { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.dep2-what { flex: 1 1 320px; font-size: 13.5px; color: var(--ink-2); }
.dep2-what-builds { display: none; }
.dep2-chart-head .legend { margin: 0; }
#dx-deploys:checked ~ .viz-panel[data-panel="deploys"], #dx-builds:checked ~ .viz-panel[data-panel="builds"] { display: block; }
#dx-builds:checked ~ .dep2-chart-head .dep2-what-deploys { display: none; }
#dx-builds:checked ~ .dep2-chart-head .dep2-what-builds { display: block; }
#dx-deploys:checked ~ .dep2-chart-head label[for="dx-deploys"], #dx-builds:checked ~ .dep2-chart-head label[for="dx-builds"] { background: var(--brand-soft); color: var(--green-ink); font-weight: 600; }
#dx-deploys:focus-visible ~ .dep2-chart-head label[for="dx-deploys"], #dx-builds:focus-visible ~ .dep2-chart-head label[for="dx-builds"] { outline: 2px solid var(--ink); outline-offset: -2px; }
.dep2-chart .viz-table { margin-top: 2px; }
.dep2-day-fails { min-width: 160px; }
.dep2-day-fails a { white-space: nowrap; }

/* The deploys themselves: few of them, or the newest failures. */
.dep2-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); }
.dep2-line { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.dep2-line:first-child { border-top: 0; }
.dep2-line .badge { justify-self: start; }
.dep2-line-main { display: grid; gap: 1px; min-width: 0; }
.dep2-line-main p { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dep2-line-main b { font-weight: 600; }
.dep2-title { color: var(--ink-2); }
.dep2-line-main small { font-size: 12.5px; }
.dep2-fails { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.dep2-fails h3 { font-size: 13.5px; }
.dep2-more summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.dep2-more summary:hover { color: var(--ink); }
.dep2-more[open] summary { margin-bottom: 12px; }

/* Nothing deployed: say so, and where to start. */
.dep2-empty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dep2-empty > div { flex: 1 1 280px; display: grid; gap: 2px; }
.dep2-empty-ico { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--tint); border: 1px solid var(--line); color: var(--muted); }
.dep2-empty-ico .i { width: 16px; height: 16px; }

/* The month's cost: the figure, the split by kind with each amount and share in words, and the projection, side
   by side; then what the figure is and is not. */
.cost2-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 16px 18px; }
.cost2-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.cost2-cell { min-width: 0; padding: 2px 24px; border-left: 1px solid var(--line); }
.cost2-cell:first-child { padding-left: 0; border-left: 0; }
.cost2-cell:last-child { padding-right: 0; }
.cost2-split { grid-column: span 2; display: grid; gap: 10px; align-content: start; }
.cost2-lab { font: 500 11px/1.4 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.cost2 .cost-total b { font-size: 30px; }
.cost2 .cost-proj { color: var(--muted); font-size: 13.5px; }
.cost2 .cost-proj b { display: block; margin-bottom: 1px; color: var(--ink); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.cost2 .cost-legend { gap: 6px 22px; }
.cost2 .cost-legend li { gap: 6px; }
.cost2-name { color: var(--ink-2); }
.cost2-share { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.cost2-what { font-size: 13.5px; color: var(--ink-2); }
.cost2-foot .fine { margin: 0; max-width: 110ch; }
.cost2-foot .btn { flex: none; }

@media (max-width: 1000px) {
  .dep2-strip { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dep2-strip > div:nth-child(3n+1) { border-left: 0; }
  .dep2-strip > div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .cost2-grid { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); }
  .cost2-cell { padding: 14px 0; border-left: 0; border-top: 1px solid var(--line); }
  .cost2-cell:first-child { padding-top: 0; border-top: 0; }
  .cost2-split { grid-column: auto; }
  .cost2-foot { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .dep2-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dep2-strip > div { padding: 12px 14px 13px; }
  .dep2-strip > div:nth-child(3n+1) { border-left: 1px solid var(--line); }
  .dep2-strip > div:nth-child(odd) { border-left: 0; }
  .dep2-strip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .dep2-strip > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .dep2-val { font-size: 20px; }
  .dep2-line { grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .dep2-line-main p { white-space: normal; }
  .dep2-body { padding: 14px; }
  .dep2-fine { padding: 0 14px 14px; }
}
/* === resume === */
/* The pre-deploy stage on the page of one deploy sits between cards, spaced like them. */
.dp-stage { margin-bottom: 16px; }

/* === dbimport === the Import card of a database (db_import.part.html) */
.imp-body { display: grid; gap: 14px; }
.imp-form .secret { display: block; margin-top: 6px; }
.imp-form .secret input { width: 100%; }
.imp-form .secret .icon-btn { top: 50%; transform: translateY(-50%); }
.imp-form .help { display: block; margin-top: 6px; font-weight: 400; }
.imp-form label.check { align-items: flex-start; width: auto; font-weight: 400; }
.imp-form label.check input { margin-top: 2px; flex: none; }
.imp-form .check span { display: block; } /* one sentence: the database's name stays in the line */
.imp-actions { display: flex; justify-content: flex-end; }
.imp-saved { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.imp-saved code { font-size: 12.5px; word-break: break-all; }
.imp-saved p { margin: 4px 0 0; }
.imp-saved-actions { display: flex; gap: 8px; flex-wrap: wrap; flex: none; }
.imp-notes { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.imp-table { border-top: 1px solid var(--line); overflow-x: auto; }
.imp-table table { width: 100%; }
.imp-table code { word-break: break-all; }
.imp-why { color: var(--bad-ink); }
.imp-out { margin-top: 6px; }
.imp-out summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.imp-out pre { margin: 6px 0 0; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; padding: 8px 10px; background: var(--tint); border-radius: var(--radius-sm); }
@media (max-width: 860px) {
  .imp-saved { flex-direction: column; }
  .imp-dur { display: none; }
}
.imp-table th:first-child, .imp-table td:first-child { padding-left: 18px; }
.imp-table th:last-child, .imp-table td:last-child { padding-right: 18px; }

/* === kilbydns === DNS AI pages (dns_zones.html, dns_zone.html) */
.dns-move .dns-steps { margin: 0; padding: 14px 20px 18px 40px; display: grid; gap: 12px; }
.dns-steps li.done > b::after { content: " \2713"; color: var(--ok-ink); }
.dns-why, .dns-ns { margin: 6px 0 0; padding-left: 18px; }
.dns-ns li { display: flex; align-items: center; gap: 6px; }
.dns-reg { margin-top: 6px; }
.dns-reg ol { margin: 6px 0 0; padding-left: 20px; }
.dns-sources { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 20px 0; }
.dns-file { display: grid; gap: 8px; padding: 14px 20px; }
.dns-file textarea { width: 100%; }
.dns-file .btn, .dns-file input[type=file] { justify-self: start; }
.dns-warn { margin: 0; padding: 0 20px 10px 40px; }
#capture .note { margin: 0 20px 14px; }
#capture .foot { padding: 14px 20px; }
.dns-vals code { display: inline-block; margin: 0 6px 4px 0; word-break: break-all; }
td.nw > .dns-edit, td.nw > form.inline { display: inline-block; vertical-align: middle; }
.dom-kilbydns { margin-top: 10px; }
@media (max-width: 640px) {
  #capture td small { display: none; } /* the source and reason: the name, type and values matter on a phone */
  #capture .table, #records .table { overflow-x: auto; }
}

/* === hobbylimits === The month's Kilby AI allowance on the AI settings page. */
.ai-allowance .card-body { display: flex; flex-direction: column; gap: 10px; }
.ai-allowance .card-body p { margin: 0; }
.ai-allowance progress { display: block; width: 100%; height: 8px; }

/* === aigateway === the AI Gateway page: the key shown once, the month's tiles, the quickstart, a key's limits. */
.gw-dialog {
  position: fixed; inset: 0; margin: auto; z-index: 60; width: min(560px, calc(100% - 32px)); height: fit-content;
  padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .18);
}
.gw-dialog h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 17px; }
.gw-dialog form { margin-top: 14px; display: flex; justify-content: flex-end; }
.gw-key { display: flex; align-items: center; gap: 8px; margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--tint); }
.gw-key code { flex: 1; min-width: 0; word-break: break-all; font-size: 13px; }
.gw-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 16px; }
.gw-tiles > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gw-code { margin: 0; padding: 14px 16px; overflow-x: auto; white-space: pre; font-size: 13px; line-height: 1.5; }
.gw-limits { display: inline-block; position: relative; }
.gw-limits > summary { list-style: none; cursor: pointer; }
.gw-limits > summary::-webkit-details-marker { display: none; }
.gw-limits-form { display: grid; gap: 10px; margin-top: 8px; padding: 12px; min-width: 260px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.gw-limits-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.gw-limits-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.gw-limits-form .check, #new-key .check { display: inline-flex; flex-direction: row; align-items: center; gap: 6px; margin-right: 12px; }
@media (max-width: 860px) { .gw-tiles { grid-template-columns: 1fr; } }

/* === qafix-forms === Findings of the live test of 2026-11-18. */
/* A choice the plan does not include (Autoscale): dimmed, with its reason in the note next to it. */
.seg label.off { opacity: .55; cursor: not-allowed; }
.seg label.off input { cursor: not-allowed; }
[data-git-scaling] .scale-fields[hidden], [data-git-scaling] [data-gscale][hidden] { display: none; }

/* === uxnav === The side menu opened into labels and groups (layout.html "rail", app.js "uxnav"). Collapsed it is the
   icon rail with its tooltips; "wide" shows the labels, as an overlay while the pointer rests on it or the keyboard is in
   it ("peek": the page does not move), or in its own wider column once pinned (body.rail-pinned). Phones keep their
   own strip of labels: everything here that changes the look is for wide screens only. */
:root { --rail-wide: 228px; }
.rail-group { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; }
.rail-group + .rail-group::before { content: ""; display: block; width: 20px; height: 1px; margin: 6px auto 8px; background: var(--line); }
.rail-h { display: none; }
.rail-pin { position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin-bottom: 6px; padding: 0; border: 0; border-radius: var(--radius-sm); background: none; color: var(--muted); cursor: pointer; }
.rail-pin:hover { background: var(--hover); color: var(--ink); }
.rail-pin:hover .tip, .rail-pin:focus-visible .tip { opacity: 1; }
.rail-pin:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }
@media (min-width: 861px) {
  body.app.rail-pinned { --rail: var(--rail-wide); }
  body.app.rail-pinned .top-brand { place-items: center start; padding-left: 15px; }
  .rail.peek { width: var(--rail-wide); box-shadow: var(--shadow-float); }
  .rail.wide { align-items: stretch; padding: 10px 10px 12px; overflow-y: auto; overscroll-behavior: contain; }
  .rail.wide .rail-group { align-items: stretch; }
  .rail.wide .rail-group + .rail-group::before { width: auto; margin: 8px 2px 6px; }
  .rail.wide .rail-h { display: block; padding: 4px 10px 5px; color: var(--muted); font: 600 10.5px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; }
  .rail.wide a, .rail.wide .rail-pin { display: flex; align-items: center; justify-content: flex-start; gap: 11px; width: auto; height: 34px; padding: 0 10px; text-align: left; }
  .rail.wide .rail-pin { margin-bottom: 4px; }
  .rail.wide a .i, .rail.wide .rail-pin .i { flex: none; }
  .rail.wide .tip { position: static; transform: none; z-index: auto; flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 0; background: none; box-shadow: none; color: inherit; font-size: 13.5px; font-weight: 500; opacity: 1; pointer-events: none; }
  .rail.wide .tip kbd { background: transparent; border-color: var(--line); color: var(--muted); font-size: 10.5px; }
  .rail.wide a.on .tip kbd { border-color: transparent; }
  .rail.wide .rail-end { margin-top: auto; }
}
@media (min-width: 861px) and (prefers-reduced-motion: no-preference) {
  .rail { transition: width .14s ease, box-shadow .14s ease; }
}
/* A short screen with every entry turned on (Key Value, DNS AI, the AI Gateway): the icons sit a little closer, so the
   last one is not cut off. The collapsed rail cannot scroll without clipping its tooltips; the open menu scrolls. */
@media (min-width: 861px) and (max-height: 880px) {
  .rail { padding-top: 8px; padding-bottom: 8px; }
  .rail a, .rail-pin { height: 32px; }
  .rail-pin { margin-bottom: 2px; }
  .rail-group + .rail-group::before { margin: 4px auto 5px; }
  .rail.wide a, .rail.wide .rail-pin { height: 32px; }
}
@media (max-width: 860px) {
  body.app.rail-pinned { --rail: 56px; } /* the top bar's logo cell keeps its width: the strip below is not a column */
  .rail-group { display: contents; }
  .rail-group + .rail-group::before, .rail-h, .rail-pin { display: none; }
}
/* === uxnav === A page split into tabs (Notifications): one part at a time (layout of the parts stays the page's own). */
.subnav { margin-bottom: 24px; }
.subnav-panel[hidden] { display: none; }
.subnav-panel > .card + .card, .subnav-panel > .card + p { margin-top: 24px; }

/* === previews === The table of pull request previews (previews.part.html). On a phone each preview is a block:
   the pull request, then its state and its buttons; the commit and the time are left out. */
.pv-line { display: block; margin-top: 2px; }
.pv-table td .inline { display: inline-block; margin: 2px 4px 2px 0; }
@media (max-width: 700px) {
  .pv-table thead, .pv-col-commit, .pv-col-updated { display: none; }
  .pv-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .pv-table td { display: block; border: 0; padding: 2px 0; white-space: normal; }
  .pv-table td .mono, .pv-table td a.ext { overflow-wrap: anywhere; }
  .pv-table td.pv-col-commit, .pv-table td.pv-col-updated { display: none; }
}

/* === neuravision === The Neuravision pages (neuravision.html, neuravision_catalog.html): the plans side by side (one
   column on a phone), the numbers of a training, and tables that become blocks on a phone. */
.nv-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nv-plan { padding: 18px; display: grid; gap: 12px; align-content: start; }
.nv-plan.current { border-color: var(--brand); background: var(--brand-soft); }
.nv-plan header { display: grid; gap: 1px; }
.nv-plan .nv-price { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.nv-plan dl.facts-lines { background: var(--surface); }
.nv-plan dl.facts-lines dd { text-align: right; white-space: normal; font-weight: 500; }
.nv-plan .btn { width: 100%; justify-content: center; }
.nv-confirm { padding: 20px 22px; display: grid; gap: 12px; border-color: var(--brand); }
.nv-confirm h2 { margin: 0; font-size: 17px; }
.nv-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 16px; }
.nv-metrics > div { display: grid; gap: 4px; align-content: start; min-width: 0; }
.nv-metrics .usage-value { font-size: 24px; }
.nv-metrics small { color: var(--muted); font-size: 12.5px; }
.nv-training { padding: 16px 18px; display: grid; gap: 10px; }
.nv-training-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.nv-training-head b { font-size: 15px; }
.nv-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.nv-result { padding: 14px 18px; display: grid; gap: 8px; }
.nv-result ul { margin: 0; padding-left: 18px; font-size: 13px; }
.nv-sample { margin: 0; padding: 12px 14px; overflow-x: auto; white-space: pre; font-size: 12.5px; line-height: 1.5; }
.nv-danger { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nv-danger input { width: 220px; }
/* The console: the month's numbers first, the last 30 days, then the catalogs as cards. */
.nv-sec-head { display: flex; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.nv-sec-head h2, .nv-sec-head h3 { margin: 0; }
.nv-sec-head .muted { font-size: 13px; }
.nv-tiles { margin-bottom: 0; }
.nv-tiles .usage-value small { font-size: 15px; }
.nv-chart { padding: 14px 18px 10px; }
.nv-two { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.nv-cap { caption-side: top; text-align: left; padding: 12px 14px 4px; font-weight: 600; font-size: 14px; }
/* The metrics' tables stay tables on a phone (they scroll sideways): a number without its column means nothing. */
.nv-mtable { width: 100%; }
.nv-mtable th.num, .nv-mtable td.num { white-space: nowrap; }
.nv-days > summary, .nv-products > summary { cursor: pointer; margin-bottom: 10px; }
.nv-empty-metrics { padding: 16px 18px; }
.nv-empty-metrics p { margin: 0; }
.nv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.nv-card { display: grid; gap: 12px; align-content: start; padding: 16px 18px; color: inherit; text-decoration: none; }
.nv-card:hover { border-color: var(--line-strong); }
.nv-card header { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nv-card header b { font-size: 15px; }
.nv-card header code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nv-card header .i { margin-left: auto; color: var(--muted); flex: none; }
.nv-card-version { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.nv-card-version .muted { font-size: 12.5px; }
.nv-card-facts { display: grid; gap: 6px; margin: 0; font-size: 13.5px; }
.nv-card-facts > div { display: flex; justify-content: space-between; gap: 12px; }
.nv-card-facts dt { color: var(--muted); }
.nv-card-facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.nv-version { padding: 16px 18px; display: grid; gap: 10px; }
.nv-list-note { margin: 0 0 12px; max-width: 96ch; }
.nv-products > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.nv-products > summary > .muted { font-size: 13px; }
.nv-products > summary::-webkit-details-marker { display: none; }
.nv-products > summary::before { content: "▸"; color: var(--muted); font-size: 13px; }
.nv-products[open] > summary::before { content: "▾"; }
.nv-products > summary h2 { display: inline; margin: 0; }
.nv-products > summary h2 .muted { font-size: 14px; font-weight: 450; }
@media (max-width: 860px) {
  .nv-plans, .nv-forms, .nv-two { grid-template-columns: minmax(0, 1fr); }
  .nv-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .nv-table thead { display: none; }
  .nv-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nv-table td { display: block; border: 0; padding: 2px 12px; white-space: normal; }
  .nv-table td.num { text-align: left; }
  .nv-table td .mono { overflow-wrap: anywhere; }
  .nv-danger input { width: 100%; }
}
