/* ── Archivo (self-hosted) ─────────────────────────────────────────────────
   The UI typeface. Served from the binary's embedded /static/fonts, so there
   is no third-party request and the strict CSP (default-src 'self') is happy.
   Three weights, matching the design's 400 / 600 / 800. */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/archivo-400.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/archivo-600.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/static/fonts/archivo-800.woff2") format("woff2");
}

/* Instrument Sans powers the wordmark only (weight 600), per the brand guide. */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/instrument-sans-600.woff2") format("woff2");
}

/* ── Design tokens (redesign, light-only) ──────────────────────────────────
   Palette derived from the Symflip logo gradient (#5b8cff → #8b5cff) plus
   semantic status roles. Flat modernist system: zero radius, 2px section rules,
   one typeface. The public landing page keeps the pre-redesign dark palette —
   see `body.lp` below — so it renders unchanged and out of scope. */
:root {
  /* Ground & ink */
  --bg: #eae9e9;                                        /* page ground */
  --panel: #f3f2f2;                                     /* every card/table/header surface */
  --field: #eae9e9;                                     /* inputs, code blocks, tinted wells */
  --text: #201e1d;
  --line: color-mix(in srgb, #201e1d 40%, transparent);   /* 1px cell + 2px section rules */
  --muted: color-mix(in srgb, #201e1d 55%, transparent);  /* secondary meta, table headers */
  --muted-2: color-mix(in srgb, #201e1d 60%, transparent);/* stat labels, hints */
  /* Legacy alias, kept so not-yet-migrated components keep working. */
  --panel-2: #eae9e9;

  /* Neutral ramp — structure and disabled states */
  --n100:#f8f4f4; --n200:#eae7e7; --n300:#d7d3d3; --n400:#bab6b6; --n500:#9b9797;
  --n600:#7d7979; --n700:#605d5d; --n800:#444141; --n900:#2d2b2b;

  /* Brand blue — the interactive role only */
  --blue-100:#eef2ff; --blue-200:#dbe4ff; --blue-300:#bccbff; --blue-400:#8ea9fb;
  --blue-500:#5b8cff; --blue:#3f6fe8; --blue-600:#3059d6; --blue-700:#2b53c4;
  --blue-800:#1e3b8f; --blue-900:#1a2c60;
  --accent:#3f6fe8; --accent-hover:#3059d6; --accent-press:#2b53c4;

  /* Red — attention and failure */
  --red-100:#fff2ef; --red-200:#ffe0d9; --red-300:#ffc4b8; --red-400:#ff9783;
  --red-500:#ff563c; --red:#d3260c; --red-700:#ae1800; --red-800:#7c1405; --red-900:#4d170e;
  --bad:#d3260c;

  /* Green — success and health */
  --green-100:#e8f4ec; --green-300:#a3d3b0; --green:#1e7e34; --green-700:#17632a;
  --ok:#1e7e34;

  /* Amber — caution (not broken) */
  --amber-100:#fdf3e4; --amber-300:#e8c48f; --amber:#b45309; --amber-700:#8f4207;
  --warn:#b45309;

  /* Running/deploying uses the interactive blue. */
  --busy:#3f6fe8;

  --shadow-menu: 0 12px 32px color-mix(in srgb, #2d2b2b 22%, transparent);
}

/* The public landing page is out of scope: it keeps its own dark-by-default
   palette (with a light override), so the pre-redesign tokens are re-declared
   on its body class and every .lp-* rule renders exactly as before. */
body.lp {
  --bg:#0f1115; --panel:#171a21; --panel-2:#1e222b; --field:#1e222b; --text:#e6e8ee;
  --muted:#8b93a7; --muted-2:#a7afc0; --line:#262b36; --accent:#5b8cff;
  --ok:#3fb950; --green:#3fb950; --bad:#f85149; --warn:#d29922; --busy:#58a6ff;
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: light) {
  body.lp {
    --bg:#f6f7f9; --panel:#ffffff; --panel-2:#f0f2f5; --field:#f0f2f5; --text:#1a1d24;
    --muted:#626b7d; --muted-2:#4a5365; --line:#dfe3ea;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.6 "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection { background: color-mix(in srgb, var(--blue) 22%, transparent); }

/* Never the browser default focus ring. */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* The dot inside any running/deploying indicator pulses. */
@keyframes sfpulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@media (prefers-reduced-motion: reduce) {
  .sf-pulse, .pulse { animation: none !important; }
}

main { flex: 1 0 auto; }

code, pre, .key {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 66px;
  background: var(--panel);
  border-bottom: 2px solid var(--line);
}

.topbar-inner {
  max-width: 1440px;
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

/* The gradient S-mark: rotationally symmetric (sym + flip), one weight. It is
   the glyph itself, not a tile — no rounded container, no shadow, no glow. */
.brand-mark { display: inline-flex; }
.brand-mark svg { display: block; }

/* Wordmark: lowercase, in Instrument Sans per the brand guide — never Archivo,
   so it never reads as interface text. Falls back to the system sans until
   Instrument Sans is self-hosted. */
.brand-name {
  color: var(--text);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.035em;
  line-height: 1;
}

.topbar-div { width: 1px; height: 26px; background: var(--line); flex: none; }

.topnav { display: flex; align-items: center; gap: 22px; }
.topnav-link { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.topnav-link:hover { color: var(--text); }
.topnav-link.active { color: var(--text); font-weight: 800; }

/* Search — decorative on the shell until a search backend exists; Enter falls
   back to the projects list rather than doing nothing. */
.topsearch {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 1 230px;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  background: var(--field);
  border: 1px solid var(--line);
}
.topsearch .ic { color: var(--muted); flex: none; }
/* The attribute selector raises specificity above the global input[type=search]
   rule further down the sheet, so the field sits flush inside the 36px bar
   instead of keeping its own border, padding and top margin. */
.topsearch input[type="search"] {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  -webkit-appearance: none;
  appearance: none;
}
.topsearch input[type="search"]:focus { outline: none; border: 0; }
.topsearch input[type="search"]::-webkit-search-decoration,
.topsearch input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.topsearch .kbd {
  flex: none;
  font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--muted);
  padding: 3px 5px;
  border: 1px solid var(--line);
}
/* Visible reset when a query is active, so filtering is never a trap. */
.topsearch-clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border-radius: 0;
}
.topsearch-clear:hover { color: var(--text); }

.btn-new { flex: none; white-space: nowrap; }

/* User menu — replaces clicking the email address. */
.usermenu { position: relative; flex: none; }
.usermenu-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.usermenu-btn:hover { background: color-mix(in srgb, #201e1d 5%, transparent); }
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: none;
  background: var(--text);
  color: var(--panel);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
}
.usermenu-email { font-size: 13px; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-btn .ic { color: var(--muted); flex: none; }

.usermenu-pop {
  position: absolute;
  top: 46px;
  right: 0;
  width: 250px;
  background: var(--panel);
  border: 2px solid var(--text);
  box-shadow: var(--shadow-menu);
  z-index: 50;
}
.usermenu-pop[hidden] { display: none; }
.usermenu-head { padding: 13px 14px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.usermenu-name { font-size: 13px; font-weight: 800; }
.usermenu-mail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-pop a,
.usermenu-signout {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
}
.usermenu-pop a:hover,
.usermenu-signout:hover { background: color-mix(in srgb, var(--blue) 10%, transparent); }
.usermenu-pop a .ic,
.usermenu-signout .ic { color: var(--muted); flex: none; }
.usermenu-div { height: 1px; background: var(--line); }
.usermenu-signout { color: var(--red-700); }
.usermenu-signout .ic { color: var(--red-700); }

@media (max-width: 1320px) { .topsearch .kbd { display: none; } }
/* Below this width the search collapses. The right-alignment lived on the
   search's margin-left:auto, so move it onto the New-project button (always
   present) when the search is gone — otherwise the actions bunch up after the
   nav instead of sitting on the right. */
@media (max-width: 1240px) {
  .topsearch { display: none; }
  .btn-new { margin-left: auto; }
}

/* ── Redesign: account page (Profile / Password / Two-factor) ──────────── */
.acct-wrap { max-width: 1000px; }
.acct-head { margin-bottom: 24px; }
.acct-head .subline { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.fields-640 { max-width: 640px; }

.enroll {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  background: var(--field);
  border: 1px solid var(--line);
  padding: 22px;
}
@media (max-width: 640px) { .enroll { grid-template-columns: 1fr; } }
.enroll-qr { width: 200px; height: 200px; background: #fff; display: grid; place-items: center; }
.enroll-qr img { display: block; max-width: 100%; height: auto; }
.enroll-steps { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.enroll-head { font-size: 15px; font-weight: 800; margin-bottom: 8px; }
.enroll-secret { letter-spacing: 0.08em; }
.enroll-confirm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
input.code-input { width: 160px; margin: 0; letter-spacing: 0.2em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ── Redesign: new-project wizard ──────────────────────────────────────── */
.wiz-wrap { max-width: 1100px; }
.wiz-head { margin-bottom: 24px; }
.wiz-head .subline { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.wiz-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .wiz-grid { grid-template-columns: 1fr; } }

.wiz-rail { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); position: sticky; top: 90px; }
@media (max-width: 900px) { .wiz-rail { position: static; } }
.wiz-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0 12px 18px; margin-left: -2px; border-left: 3px solid transparent; }
.wiz-item.future { opacity: 0.55; }
.wiz-item.current { border-left-color: var(--accent); }
.wiz-marker { flex: none; width: 22px; height: 22px; display: grid; place-items: center; font-size: 11px; font-weight: 800; border: 1px solid var(--n400); color: var(--muted); }
.wiz-item.current .wiz-marker { background: var(--accent); border-color: var(--accent); color: #fff; }
.wiz-item.done .wiz-marker { background: var(--green); border-color: var(--green); color: #fff; }
.wiz-item-title { font-size: 13.5px; font-weight: 800; }
.wiz-item-desc { margin-top: 2px; font-size: 12px; color: var(--muted); }

.wiz-panel { background: var(--panel); border: 1px solid var(--line); }
.wiz-panel-head { padding: 16px 24px; border-bottom: 2px solid var(--line); }
.wiz-q { font-size: 20px; font-weight: 800; margin: 0; }
.wiz-sub { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.wiz-body { padding: 24px; }
.wiz-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-top: 2px solid var(--line); }
.wiz-foot-right { display: flex; align-items: center; gap: 14px; }
.wiz-stepcount { font-size: 12.5px; color: var(--muted); }
.wiz-note { margin: 16px 0 0; font-size: 13px; color: var(--muted); max-width: 70ch; }

/* Inline field validation, shown when the server rejects a value the browser
   could not catch (e.g. an unsafe deploy path). */
.field-error { display: block; margin-top: 4px; font-size: 13px; color: var(--red-700); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
input[aria-invalid="true"]:focus { outline-color: var(--red); border-color: var(--red); }

main { max-width: 1440px; margin: 0 auto; padding: 24px 32px; width: 100%; }

/* The deployment page is log-heavy, so give it more room than form pages.
   Scoped with :has to the page that actually contains the log pane. */
main:has(#log) { max-width: 1600px; }

h1 { font-size: 38px; font-weight: 800; line-height: 1.12; margin: 0 0 4px; letter-spacing: -0.015em; }
h2 { font-size: 14px; font-weight: 800; line-height: 1; margin: 0 0 12px; text-transform: uppercase;
     letter-spacing: 0.06em; color: var(--text); }

.row { display: flex; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.actions { display: flex; gap: 8px; }
.inline { display: inline; }
.right { text-align: right; }
.muted { color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

.card.narrow { max-width: 380px; margin: 48px auto; }
.card.empty { text-align: center; padding: 48px 20px; }

/* ── Auth (sign in / register) ─────────────────────────────────────────── */

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 220px);
  padding: 24px 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px 32px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

@media (prefers-color-scheme: light) {
  .auth-card { box-shadow: 0 12px 40px rgba(20, 30, 60, 0.10); }
}

.auth-head { text-align: center; margin-bottom: 28px; }

.auth-mark {
  display: inline-flex;
  margin-bottom: 16px;
}
.auth-mark svg { display: block; border-radius: 10px; }

.auth-head h1 { font-size: 24px; margin: 0 0 6px; }
.auth-head p { margin: 0; font-size: 14px; }

/* Roomier fields than the dense in-app forms; this is the first impression. */
.auth-card label { margin-bottom: 18px; color: var(--text); font-size: 14px; }
.auth-card input { margin-top: 6px; padding: 11px 12px; font-size: 15px; }

.auth-alt { text-align: center; margin: 20px 0 0; font-size: 14px; }

/* The shared layout renders any error alert at the top of <main>, before the
   card. On auth pages, pull it into the card's column so it reads as part of
   the form rather than a full-width banner. */
main:has(.auth) .alert {
  max-width: 420px;
  margin: 24px auto -8px;
}

/* Full-width call-to-action button. */
button.block, .button.block { display: block; width: 100%; padding: 11px 14px; font-size: 15px; }

/* ── Forms ─────────────────────────────────────────────────────────────── */

label { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=url], input[type=search], input[type=tel], input:not([type]) {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font-size: 14px;
}

input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

/* Native <select> is styled to match the text inputs: same field surface,
   border, radius and focus ring, with the browser chrome removed and a custom
   caret so it reads as part of the same form rather than an OS control. */
select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 32px 9px 11px;
  background-color: var(--panel-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%238a8a8a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
/* The option list is drawn by the OS; at least keep its colours on our surface. */
select option { background: var(--panel-2); color: var(--text); }

/* Multi-line command fields. Monospace, because these are shell scripts: one
   step per line reads far better than a wall of && chaining, and the pipeline
   runs them under `set -e`, so each line stops the deploy if it fails. */
textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 11px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  resize: vertical;
  min-height: 44px;
  tab-size: 2;
}
textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }

/* ── Buttons ────────────────────────────────────────────────────────────────
   Exactly three intents, so a screen never looks like a paint chart:
     • .primary  — the one main action in a context (filled accent)
     • (default) — everything else (neutral outline)
     • .bad      — destructive only (red): delete, disable, remove
   Hover keeps each intent's own colour instead of turning everything blue. */

button, .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

/* Secondary buttons keep a neutral tint on hover instead of turning blue. */
button:hover, .button:hover { background: color-mix(in srgb, #201e1d 7%, transparent); }
button:active, .button:active { background: color-mix(in srgb, #201e1d 14%, transparent); }
button:disabled, .button:disabled { opacity: 0.45; cursor: not-allowed; }
button:disabled:hover { background: var(--panel); }

button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
button.primary:active, .button.primary:active { background: var(--accent-press); border-color: var(--accent-press); }

button.bad, .button.bad { border-color: color-mix(in srgb, var(--bad) 55%, var(--line)); color: var(--bad); background: transparent; }
button.bad:hover, .button.bad:hover {
  border-color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: var(--bad);
}

button.link {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0;
  font-weight: 400;
  text-decoration: underline;
}
button.link:hover { background: none; color: var(--text); }
button.link.bad { color: var(--bad); }
button.link.bad:hover { color: var(--bad); }

.row form.inline, .row input { margin: 0; }
.row input { flex: 1; }

/* ── Lists & tables ────────────────────────────────────────────────────── */

.list { list-style: none; padding: 0; margin: 0; }

.list li a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  color: var(--text);
  text-decoration: none;
}

.list li a:hover { border-color: var(--accent); }

/* Inside a project card the header row is compact, not a page header. */
.list li a .row.between { margin-bottom: 2px; align-items: center; }
.list li a .row { gap: 8px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
     text-transform: uppercase; letter-spacing: 0.05em; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: none; }

/* ── Badges & alerts ───────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 0;
  font-size: 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.ok   { color: var(--ok);   border-color: var(--ok); }
.badge.bad  { color: var(--bad);  border-color: var(--bad); }
.badge.warn { color: var(--warn); border-color: var(--warn); }
.badge.busy { color: var(--busy); border-color: var(--busy); }

.alert {
  padding: 12px 16px;
  border-radius: 0;
  border: 1px solid var(--line);
  margin-bottom: 16px;
  font-size: 14px;
}

.alert.bad  { border-color: var(--bad);  background: color-mix(in srgb, var(--bad) 8%, transparent); }
.alert.warn { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.alert.good { border-color: var(--ok);   background: color-mix(in srgb, var(--ok) 8%, transparent); }
.billing-banner a { margin-left: 6px; font-weight: 600; white-space: nowrap; }

/* ── Dashboard: fleet stats ────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.card .stats { margin-bottom: 0; }

.stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card .stat { background: var(--panel-2); }

.stat-num { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; }
.stat-label {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted);
}

.stat.bad { border-color: var(--bad); }
.stat.bad .stat-num { color: var(--bad); }

/* ── Redesign: status chips & squares ──────────────────────────────────────
   Filled chips carry the status roles; an outlined chip is the "unfinished"
   neutral. Small 7×7 squares stand in for status dots (radius 0). */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip.lg { padding: 4px 10px; font-size: 11px; }
.chip.live, .chip.ok, .chip.accepted { background: var(--green); color: #fff; }
.chip.attn, .chip.bad { background: var(--red); color: #fff; }
.chip.deploying, .chip.busy { background: var(--accent); color: #fff; }
.chip.warn { background: var(--amber); color: #fff; }
.chip.muted, .chip.idle { background: var(--n500); color: #fff; }
.chip.outline { background: transparent; color: var(--muted); border-color: var(--line); }
.chip-pulse { width: 6px; height: 6px; background: #fff; animation: sfpulse 1.4s ease-in-out infinite; }

.sq { width: 7px; height: 7px; flex: none; display: inline-block; background: var(--n500); }
.sq.ok { background: var(--green); }
.sq.warn { background: var(--amber); }
.sq.bad { background: var(--red); }
.sq.busy { background: var(--accent); }
.sq.muted { background: var(--n500); }

/* ── Dashboard: page head ──────────────────────────────────────────────── */
.dash-head { padding-bottom: 18px; border-bottom: 2px solid var(--line); }
.dash-head .subline { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* ── Dashboard: vitals row ─────────────────────────────────────────────────
   Hangs off the head rule (border-top: 0), 1px cell dividers, 4 cells. */
.vitals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 0;
  margin-bottom: 24px;
}
.vital { padding: 20px 22px; border-left: 1px solid var(--line); }
.vital:first-child { border-left: 0; }
.vital.attn { border-left: 4px solid var(--red); }
.vital.attn .vital-num { color: var(--red-700); }
.vital-num { display: block; font-size: 34px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; }
.vital-label { display: block; margin-top: 8px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 1180px) {
  .vitals { grid-template-columns: repeat(2, 1fr); }
  .vital:nth-child(3) { border-left: 0; }
  .vital:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ── Dashboard: attention banner ───────────────────────────────────────── */

.attn-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--red-100);
  border: 1px solid var(--red-300);
  border-left: 4px solid var(--red);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.attn-banner + .attn-banner { margin-top: -12px; }
.attn-copy { flex: 1; min-width: 0; }
.attn-head { font-size: 15px; font-weight: 800; color: var(--red-800); }
.attn-detail { margin-top: 3px; font-size: 13px; color: var(--red-900); }
.attn-detail code { color: inherit; }
.attn-actions { display: flex; gap: 8px; flex: none; }

/* ── Dashboard: two-column layout ──────────────────────────────────────── */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 1180px) { .dash-grid { grid-template-columns: 1fr; } }

.panel { background: var(--panel); border: 1px solid var(--line); }
.tbl-scroll { overflow-x: auto; }

/* Project table */
.ptable { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 720px; }
.ptable thead th {
  text-align: left;
  padding: 12px 20px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.ptable th.right, .ptable td.right { text-align: right; }
.ptable tbody td { padding: 15px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
.ptable tbody tr:last-child td { border-bottom: 0; }
.rowlink { cursor: pointer; }
.rowlink:hover { background: color-mix(in srgb, #201e1d 5%, transparent); }
.proj-name { font-size: 15px; font-weight: 800; color: var(--text); text-decoration: none; }
.proj-name:hover { text-decoration: underline; }
.proj-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.cell-live code { font-size: 12px; }
.cell-live .age { margin-top: 2px; font-size: 12px; color: var(--muted); }
.cell-server { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.cell-server.on { color: var(--text); }

/* Activity rail */
.actrail { background: var(--panel); border: 1px solid var(--line); }
.actrail-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 2px solid var(--line); }
.actrail-head h2 { margin: 0; }
.actrail-head a { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.actrow { display: flex; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.actrow:last-child { border-bottom: 0; }
.actrow .sq { margin-top: 6px; }
.actrow-body { min-width: 0; }
.actrow-name { font-size: 13px; font-weight: 800; color: var(--text); text-decoration: none; }
.actrow-name:hover { text-decoration: underline; }
.actrow-meta { margin-top: 2px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.actrow-meta code { font-size: 12px; }

/* Empty state */
.empty-state { background: var(--panel); border: 1px solid var(--line); text-align: center; padding: 56px 24px; }
.empty-state .es-head { font-size: 21px; font-weight: 800; }
.empty-state p { margin: 6px 0 20px; color: var(--muted); }

/* ── Redesign: project page (header + tabs + panels) ───────────────────── */
.crumb-current { color: var(--text); font-weight: 600; }

.proj-head { margin-bottom: 24px; }
.proj-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-top: 4px; }
.proj-head-main { min-width: 0; }
.proj-actions { display: flex; gap: 8px; flex: none; }

.meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.meta-chip .ic { color: var(--muted); flex: none; }

/* Tabs: a bare button row with a 3px blue bar under the active tab, sitting on
   the 2px section rule. */
.tabs {
  display: flex;
  gap: 26px;
  margin-top: 20px;
  border-bottom: 2px solid var(--line);
  overflow-x: auto;
  /* Still scrollable on a narrow viewport, but the scrollbar itself is never
     drawn over the tab titles. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  padding: 14px 2px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: var(--accent);
}

/* Panel card: a flat surface with a header rule, replacing the <details> stack. */
.pcard { background: var(--panel); border: 1px solid var(--line); margin-bottom: 24px; }
.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 2px solid var(--line); }
.pcard-head h2 { margin: 0; }
.pcard-body { padding: 22px; }
.pcard-note { margin: 0; padding: 12px 22px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.text-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }

/* Config tabs are single-column and reading-width. */
.cfg-narrow { max-width: 900px; }
.cfg-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cfg-save { margin-top: -4px; }
.full-btn { display: flex; justify-content: center; margin-top: 14px; }

/* Overview */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
@media (max-width: 1180px) { .ov-grid { grid-template-columns: 1fr; } }
.ov-main { min-width: 0; }
.ov-side { min-width: 0; }
.live-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.live-sha { font-size: 20px; }
.ov-metrics { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 18px; border-top: 2px solid var(--line); }
.ov-metric { padding: 18px 0; }
.ov-num { display: block; font-size: 26px; font-weight: 800; line-height: 1; }
.ov-lbl { display: block; margin-top: 7px; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.target-status { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.auto-list { display: flex; flex-direction: column; }
.auto-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text); text-decoration: none; }
.auto-row:last-child { border-bottom: 0; }
.auto-row:hover { background: color-mix(in srgb, #201e1d 5%, transparent); }

/* Secrets */
.secret-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); margin-top: 8px; }
.secret-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.secret-add { display: flex; gap: 10px; padding: 20px 22px; border-top: 2px solid var(--line); }
.secret-add input { margin: 0; }
.secret-add input:first-child { max-width: 260px; }

/* Collapsible "paste a .env" block. Without these rules the summary, textarea
   and button sit flush against the card with no padding or spacing. */
.secret-bulk { border-top: 1px solid var(--line); padding: 16px 22px 20px; }
.secret-bulk > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  list-style: none;
  user-select: none;
}
.secret-bulk > summary::-webkit-details-marker { display: none; }
.secret-bulk > summary::before { content: "▸"; font-size: 11px; transition: transform 0.12s ease; }
.secret-bulk[open] > summary::before { transform: rotate(90deg); }
.secret-bulk > summary:hover { color: var(--accent-hover); }
.secret-bulk form { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.secret-bulk .hint { margin: 0; }
.secret-bulk textarea { margin-top: 0; }
.secret-bulk button { align-self: flex-start; }

/* Amber "shown once" notice */
.notice-amber { background: var(--amber-100); border: 1px solid var(--amber-300); border-left: 4px solid var(--amber); padding: 16px 18px; margin-bottom: 16px; }
.notice-amber strong { color: var(--amber-700); font-size: 13.5px; }

/* Dark script block, per the server tab spec */
.script-block .key { background: #201e1d; color: var(--n100); padding: 16px 18px; padding-right: 90px; }
.script-block .copy-btn { top: 10px; right: 10px; }

/* Destructive panel */
.danger-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--red-100); border: 1px solid var(--red-300); border-left: 4px solid var(--red); padding: 18px 22px; }
.danger-panel .dz-copy strong { color: var(--red-800); }
.danger-panel .hint { color: var(--red-900); margin-top: 2px; }
.danger-fill { background: var(--red); border-color: var(--red); color: var(--panel); }
.danger-fill:hover { background: var(--red-700); border-color: var(--red-700); }

.inline-details { margin-left: auto; }

/* "How to set this up" steps on the Push-to-deploy tab. */
.wh-help { margin-top: 12px; }
.wh-steps { margin: 12px 0 0; padding-left: 20px; font-size: 13.5px; line-height: 1.6; }
.wh-steps > li { margin-bottom: 8px; }
.wh-steps ul { margin: 6px 0 0; padding-left: 18px; }
.wh-steps ul li { margin-bottom: 4px; color: var(--muted); }

/* ── Project vitals sparkline ──────────────────────────────────────────── */

.sparkline { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 3px; margin-top: 14px; }

.spark {
  width: 12px;
  height: 22px;
  border-radius: 3px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.spark.ok    { background: var(--ok);   border-color: var(--ok); }
.spark.bad   { background: var(--bad);  border-color: var(--bad); }
.spark.warn  { background: var(--warn); border-color: var(--warn); }
.spark.busy  { background: var(--busy); border-color: var(--busy); }

/* ── Onboarding checklist ──────────────────────────────────────────────── */

.checklist { list-style: none; counter-reset: none; padding: 0; margin: 0; }

.checklist li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: none; }

.checklist .step-num {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--panel-2);
}

.checklist .step-body { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.checklist .step-body strong { font-weight: 600; }
.checklist .step-body .hint { margin-top: 0; }
.checklist .step-body > form, .checklist .step-body > a.button { margin-top: 8px; }

/* Done: filled check. Current: accented. Todo: dimmed. */
.checklist li.done .step-num {
  border-color: var(--ok);
  background: var(--ok);
  color: #fff;
  font-size: 0;
}
.checklist li.done .step-num::after { content: "✓"; font-size: 15px; }
.checklist li.current .step-num { border-color: var(--accent); color: var(--accent); }
.checklist li.todo { opacity: 0.55; }

/* ── Footer ────────────────────────────────────────────────────────────── */

.footer {
  flex-shrink: 0;
  border-top: 2px solid var(--line);
  background: var(--panel);
  margin-top: 32px;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.035em;
  color: var(--text);
}

.footer-links { margin-left: auto; display: flex; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

/* ── Breadcrumbs ───────────────────────────────────────────────────────── */

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 12px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumb-sep { color: var(--line); }

.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; }

/* ── Redesign: deployment page ─────────────────────────────────────────── */
.dep-head { padding-bottom: 18px; border-bottom: 2px solid var(--line); margin-bottom: 20px; }
.dep-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dep-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dep-title h1 { font-size: 34px; margin: 0; }
.dep-tools { display: flex; gap: 8px; flex: none; }
.dep-sub { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }

/* Meta strip: same construction as the dashboard vitals. */
.dep-meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}
.dm-cell { padding: 14px 18px; border-left: 1px solid var(--line); min-width: 0; }
.dm-cell:first-child { border-left: 0; }
.dm-label { display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.dm-val { display: block; margin-top: 6px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1180px) {
  .dep-meta { grid-template-columns: repeat(2, 1fr); }
  .dm-cell:nth-child(odd) { border-left: 0; }
  .dm-cell:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ── Live pulse indicator ──────────────────────────────────────────────── */

.pulse {
  display: inline-block;
  width: 9px; height: 9px;
  margin-left: 6px;
  border-radius: 50%;
  background: var(--busy);
  vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 color-mix(in srgb, var(--busy) 60%, transparent); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 6px color-mix(in srgb, var(--busy) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

/* Two-column: sticky pipeline rail beside a full-height log. */
.dep-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 1180px) { .dep-grid { grid-template-columns: 1fr; } }

.prail { background: var(--panel); border: 1px solid var(--line); position: sticky; top: 90px; }
@media (max-width: 1180px) { .prail { position: static; } }

.prow-list { list-style: none; margin: 0; padding: 0; }
/* Per-server subheader in a finished fleet deploy's pipeline. */
.prow-group {
  list-style: none;
  padding: 8px 20px;
  background: var(--field);
  border-bottom: 1px solid var(--line);
}
.prow-group-host {
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--muted); font-family: var(--mono, monospace);
}
.prow {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.prow:last-child { border-bottom: 0; }
.prow-marker {
  flex: none;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  border: 1px solid var(--n400);
  color: var(--muted);
}
.prow-name { flex: 1; min-width: 0; }
.step-name { font-size: 13.5px; }
.prow-note { display: block; margin-top: 2px; font-size: 11.5px; color: var(--red-700); }
.prow-dur { flex: none; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }

/* done */
.prow.done .prow-marker { background: var(--green); border-color: var(--green); color: #fff; }
.prow.done .step-name { font-weight: 600; }
/* running */
.prow.running { background: color-mix(in srgb, var(--accent) 8%, transparent); border-left-color: var(--accent); }
.prow.running .prow-marker { background: var(--accent); border-color: var(--accent); color: #fff; animation: sfpulse 1.4s ease-in-out infinite; }
.prow.running .step-name { font-weight: 800; }
.prow.running .prow-dur { color: var(--accent); }
/* pending */
.prow.todo { opacity: 0.5; }
/* failed */
.prow.bad .prow-marker { background: var(--red); border-color: var(--red); color: #fff; }
.prow.bad .step-name { font-weight: 800; color: var(--red-800); }
/* the atomic swap — the one teaching moment */
.prow.activate { border-top: 2px solid var(--red); }
.prow.activate .prow-marker { border-color: var(--red); color: var(--red-700); }
.prow.activate.done .prow-marker { background: var(--green); border-color: var(--green); color: #fff; }

.prail-foot { padding: 12px 20px; border-top: 2px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* Output panel */
.log-panel { background: var(--panel); border: 1px solid var(--line); min-width: 0; }
.log-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 2px solid var(--line); }
.log-head h2 { margin: 0; }
.log-tools { display: flex; align-items: center; gap: 16px; }
.log-toggle { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.log-count { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: var(--muted); }

.log {
  background: #201e1d;
  color: #d6d2d0;
  padding: 18px 20px;
  height: calc(100vh - 400px);
  min-height: 520px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.75;
}
.log.nowrap { white-space: pre; word-break: normal; }
/* Blinking cursor while the deploy is still streaming. */
.log.live::after { content: "▍"; animation: sfpulse 1.1s steps(1) infinite; }

.key {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

details { margin-top: 16px; }
summary { cursor: pointer; color: var(--muted); font-size: 14px; }
details[open] summary { margin-bottom: 14px; }

a { color: var(--accent); }

/* ── Configuration panels ──────────────────────────────────────────────────
   The project page's configure-once surfaces. Each is a self-contained panel
   with an icon, a plain-language title, a one-line description and a status
   pill, so an operator can see at a glance what's set up and what still needs
   attention — instead of a stack of look-alike disclosure triangles. */

.config-list { display: flex; flex-direction: column; gap: 12px; }

.config {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  overflow: hidden;
}

.config > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  list-style: none;
  margin: 0;
}
.config > summary::-webkit-details-marker { display: none; }
.config > summary::marker { content: ""; }
.config > summary:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.config[open] > summary { border-bottom: 1px solid var(--line); }

.config-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}

.config-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.config-head strong { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--text); }
.config-head span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.config-meta { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.config-chevron { color: var(--muted); transition: transform 0.2s ease; }
.config[open] .config-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .config-chevron { transition: none; } }

.config-body { padding: 18px 16px 20px; }
.config-body > :first-child { margin-top: 0; }
.config-body > :last-child { margin-bottom: 0; }

/* A lighter, nested disclosure inside a panel (e.g. "Replace server"). */
.config-body .subtle { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); }
.config-body .subtle > summary { color: var(--muted); font-size: 13px; padding-top: 12px; }

/* Copy-to-clipboard affordance layered over a <pre class="key">. */
.key-field { position: relative; }
.key-field .key { margin: 0; padding-right: 74px; }
.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  padding: 4px 12px;
  font-size: 12px;
  background: var(--panel);
}

/* ── Grouped form layout ───────────────────────────────────────────────────
   Two-column responsive grid so settings read as a form to fill, not a tall
   ladder of identical fields. */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 18px;
}
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.form-grid .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
}
.form-grid .field.full { grid-column: 1 / -1; }
.form-grid .field input,
.form-grid .field textarea,
.form-grid .field select { margin: 0; }

.field-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.field-group { margin-bottom: 24px; }
.field-group:last-of-type { margin-bottom: 0; }
.group-title {
  display: block;
  margin: 0 0 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--text);
  text-transform: none;
}

.form-grid .field.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.form-grid .field.checkbox input { width: auto; }

.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Delete lives behind a visual firebreak, not beside a Save button. */
.danger-zone {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.danger-zone .dz-copy { display: flex; flex-direction: column; gap: 3px; }
.danger-zone strong { color: var(--text); font-weight: 600; }
.danger-zone .hint { margin: 0; }
.danger-zone form { margin: 0; }

/* ── Project page: header ──────────────────────────────────────────────── */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}
.page-head h1 { margin: 0 0 8px; }
.page-head .actions { flex: none; }

.project-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.project-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.project-meta .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.project-meta .ic { color: color-mix(in srgb, var(--muted) 85%, transparent); }

/* ── Project page: overview card (live status + vitals in one) ──────────── */

.overview-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.overview-status .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.overview-status .where { display: flex; align-items: center; gap: 10px; }

.overview .stats { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); margin-bottom: 0; }
.overview .sparkline { margin-top: 14px; }

/* ── Project page: deployment history (bounded so config stays reachable) ─ */

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-head h2 { margin: 0; }
.section-head .hint { margin: 0; }

.table-scroll { max-height: 360px; overflow: auto; margin-top: 12px; border-radius: 8px; }
.table-scroll table { margin: 0; }
.table-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
  box-shadow: inset 0 -1px 0 var(--line);
}
.table-scroll thead th { border-bottom: none; }

/* Single-field forms (notifications, etc.): a labelled input over a helper
   line over its actions — spaced deliberately, not crammed. */
.stack-field { display: flex; flex-direction: column; gap: 6px; max-width: 520px; margin: 0; }

/* ── Landing page ──────────────────────────────────────────────────────────
   The public marketing page renders full-bleed sections rather than the app's
   constrained <main>, so it defines its own document shell (see landing.html).
   It reuses the same tokens as the app so light/dark stay in lock-step. */

/* Stroke-based (Lucide/Feather-style) icons drawn with currentColor. */
.ic {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: middle;
}

/* Marketing (.lp) pages inherit the flex-column body from the app shell so the
   footer stays pinned to the bottom of the viewport even when a page is short
   on content. margin-top:auto absorbs the leftover space below the content —
   this also covers .lp pages that render full-bleed sections instead of a
   growing <main> (the landing and how-it-works pages). */
body.lp .footer { margin-top: auto; }

/* The landing header is self-contained: logo on the left, nav on the right.
   It no longer borrows the app's .topbar layout, which the redesign repurposed
   into a fixed-height app bar. */
.lp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(20px, 5vw, 56px);
}
.lp-topbar .brand-name { font-size: 26px; }
.lp-nav { display: flex; align-items: center; gap: 20px; }
.lp-nav > a:not(.button) { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.lp-nav > a:not(.button):hover { color: var(--text); }

@media (max-width: 720px) {
  .lp-nav > a:not(.button):not([href^="http"]) { display: none; }
  .lp-nav > a[href^="http"] { display: none; }
}

/* ── Hero ──────────────────────────────────────────────────────────────── */

.lp-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 8vw, 104px) clamp(20px, 5vw, 56px) 56px;
  background:
    radial-gradient(1100px 520px at 78% -8%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%),
    radial-gradient(760px 420px at 6% 4%, color-mix(in srgb, var(--busy) 12%, transparent), transparent 55%);
}

.lp-hero-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; }
}

.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: color-mix(in srgb, var(--text) 82%, var(--accent));
  font-size: 13px;
  font-weight: 550;
}
.lp-eyebrow-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}

.lp-title {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 720;
  margin: 20px 0 0;
}

.lp-lede {
  margin: 20px 0 0;
  max-width: 30em;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.6;
  color: var(--muted);
}
.lp-lede strong { color: var(--text); font-weight: 620; }

.lp-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lp-cta-row.center { justify-content: center; }

.lp-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 560;
}
.lp-cta.primary {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 38%, transparent);
}
.lp-cta.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 48%, transparent);
}
.lp-cta { transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease; }

.lp-microcopy { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

/* Product glimpse window. */
.lp-hero-visual { min-width: 0; }

.lp-window {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}
@media (prefers-color-scheme: light) {
  .lp-window { box-shadow: 0 30px 70px rgba(20, 30, 60, 0.16); }
}

.lp-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}
.lp-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--line); }
.lp-dot:nth-child(1) { background: #f85149; opacity: 0.7; }
.lp-dot:nth-child(2) { background: #d29922; opacity: 0.7; }
.lp-dot:nth-child(3) { background: #3fb950; opacity: 0.7; }
.lp-window-title { margin-left: 6px; font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.lp-live { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--busy); }
.lp-live .pulse { margin: 0; }

.lp-window-body { padding: 16px 18px 18px; }

.lp-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13.5px;
  color: var(--text);
}
.lp-step code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
.lp-step .lp-t { margin-left: auto; font-size: 12px; color: var(--muted); font-family: ui-monospace, monospace; }
.lp-check {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ok); color: #fff;
  display: grid; place-items: center; font-size: 11px;
}
.lp-spin {
  flex: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--busy) 30%, transparent);
  border-top-color: var(--busy);
  animation: lp-spin 0.8s linear infinite;
}
@keyframes lp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .lp-spin { animation: none; } }
.lp-step.run { color: var(--busy); }

.lp-log {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #0b0d11;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
}
.lp-log-line { color: #c9d1d9; }
.lp-log-line.ok { color: #56d364; }
.lp-log-line.dim { color: #768390; }

/* Trust strip under the hero. */
.lp-trust {
  list-style: none;
  margin: clamp(40px, 6vw, 64px) auto 0;
  padding: 0;
  max-width: 1160px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.lp-trust li {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 70%, transparent);
  padding: 20px 12px;
}
.lp-trust strong { display: block; font-size: 28px; font-weight: 680; letter-spacing: -0.02em; color: var(--text); }
.lp-trust span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .lp-trust { grid-template-columns: repeat(2, 1fr); } }

/* ── Content sections ──────────────────────────────────────────────────── */

.lp-section { padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 56px); max-width: 1160px; margin: 0 auto; }

.lp-section-head { text-align: center; max-width: 40em; margin: 0 auto clamp(36px, 5vw, 56px); }
.lp-h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 680;
  margin: 0;
  text-transform: none;
  color: var(--text);
}
.lp-sub { margin: 14px 0 0; font-size: 17px; color: var(--muted); line-height: 1.6; }

.lp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .lp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .lp-grid { grid-template-columns: 1fr; } }

.lp-feature {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 24px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.lp-feature:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}
@media (prefers-color-scheme: light) {
  .lp-feature:hover { box-shadow: 0 14px 34px rgba(20, 30, 60, 0.10); }
}
.lp-ic-badge {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 11px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.lp-feature h3 { margin: 16px 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.lp-feature code {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 5px;
  color: var(--text);
}

/* How it works. */
.lp-how { border-top: 1px solid var(--line); }
.lp-steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: none;
}
@media (max-width: 760px) { .lp-steps { grid-template-columns: 1fr; } }
.lp-steps li { display: flex; gap: 16px; }
.lp-step-n {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 17px; font-weight: 680;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.lp-steps h3 { margin: 6px 0 6px; font-size: 17px; }
.lp-steps p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* Scale & teams. A full-bleed tinted band with horizontal capability rows
   (icon on the left) — deliberately different from the vertical feature cards
   above so the two sections don't read as one long, repeating grid. */
.lp-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(900px 400px at 50% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%),
    var(--panel-2);
}
.lp-band-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 56px);
}
.lp-band .lp-section-head { text-align: center; }
.lp-band .lp-eyebrow { margin-bottom: 18px; }
.lp-caps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 36px;
}
@media (max-width: 720px) { .lp-caps { grid-template-columns: 1fr; } }
.lp-cap { display: flex; gap: 16px; align-items: flex-start; }
.lp-cap .lp-ic-badge { flex: none; }
.lp-cap h3 { margin: 4px 0 6px; font-size: 17px; letter-spacing: -0.01em; }
.lp-cap p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.lp-band .lp-cta-row { margin-top: clamp(32px, 5vw, 48px); }

/* ── Final CTA ─────────────────────────────────────────────────────────── */

.lp-final {
  padding: clamp(56px, 8vw, 100px) clamp(20px, 5vw, 56px);
}
.lp-final-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 20px;
  padding: clamp(36px, 6vw, 64px) clamp(24px, 5vw, 56px);
  background:
    radial-gradient(600px 300px at 50% -20%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 70%),
    var(--panel);
}
.lp-final h2 {
  font-size: clamp(26px, 3.6vw, 40px);
  letter-spacing: -0.025em;
  font-weight: 700;
  margin: 0;
  text-transform: none;
  color: var(--text);
}
.lp-final p { margin: 16px auto 0; max-width: 36em; font-size: 17px; color: var(--muted); line-height: 1.6; }
.lp-final .lp-cta-row { margin-top: 28px; }

/* ── Legal pages (Terms, Privacy) ──────────────────────────────────────── */

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 72px;
  line-height: 1.7;
  color: var(--text);
}
.legal-eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
.legal h1 {
  font-size: clamp(30px, 4.4vw, 44px);
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}
.legal-updated { color: var(--muted); font-size: 14px; margin: 8px 0 32px; }
.legal h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
  color: var(--text);
}
.legal p { margin: 0 0 16px; color: var(--text); }
.legal ul { margin: 0 0 16px; padding-left: 22px; }
.legal li { margin: 0 0 8px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--accent-hover); }
.legal-foot {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

/* ── Plan settings tab ─────────────────────────────────────────────────────
   The plan picker on /settings/plan. Cards reuse the panel/line tokens; the
   account's current tier is called out with the accent. */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin: 18px 0 8px;
}
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.plan-card.current {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  background: var(--panel);
}
.plan-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.plan-name { font-weight: 700; font-size: 15px; }
.plan-price { font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.plan-per { font-weight: 600; font-size: 12px; color: var(--muted); margin-left: 1px; }
.plan-billed { font-size: 11px; color: var(--muted); margin-top: -6px; }

/* Monthly/annual toggle on the Plan settings tab — mirrors the public pricing
   page's segmented control so the two purchase surfaces read the same. */
.bill-toggle {
  display: inline-flex; gap: 4px; margin: 4px 0 18px; padding: 4px;
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
}
.bill-opt {
  border: 0; background: transparent; color: var(--muted); font: inherit;
  font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 8px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; width: auto;
}
.bill-opt[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.bill-save {
  font-size: 10px; font-weight: 700; color: #fff; padding: 2px 7px; border-radius: 999px;
  background: linear-gradient(120deg, #4C7DFF, #8250F0);
}
.plan-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted-2);
}
.plan-feats li { padding-left: 16px; position: relative; }
.plan-feats li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}
/* Pin the action to the bottom of the card so every card's button lines up,
   regardless of how many features it lists. The switch button lives inside a
   <form>, which is the card's flex child — so the auto margin belongs on the
   form, not the button (the "Current plan" chip is a direct child and pins
   itself). */
.plan-card form { margin-top: auto; }
.plan-card .primary.full { width: 100%; }
.plan-current { margin-top: auto; align-self: flex-start; }

/* ── Public pricing page (/pricing) ────────────────────────────────────────
   A marketing subpage of the landing site. Reuses the landing topbar, button
   and footer styles; everything below is pricing-specific. Prices and features
   are rendered from the plan registry, so this only styles them. */
.pr-wrap { max-width: 1160px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }

.pr-head { text-align: center; padding: clamp(40px, 6vw, 72px) 0 8px; }
.pr-title {
  font-size: clamp(30px, 4.6vw, 46px); line-height: 1.06; letter-spacing: -0.03em;
  font-weight: 800; margin: 14px auto 0; max-width: 18ch; text-wrap: balance;
}
.pr-lede {
  max-width: 56ch; margin: 16px auto 0; color: var(--muted);
  font-size: clamp(16px, 1.8vw, 18px); line-height: 1.6;
}

.pr-toggle {
  display: inline-flex; gap: 4px; margin: 26px auto 0; padding: 4px;
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
}
.pr-seg {
  border: 0; background: transparent; color: var(--muted); font: inherit;
  font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 8px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; width: auto;
}
.pr-seg[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.pr-save {
  font-size: 11px; font-weight: 700; color: #fff; padding: 2px 7px; border-radius: 999px;
  background: linear-gradient(120deg, #4C7DFF, #8250F0);
}

.pr-tiers {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin: 30px 0 0; align-items: start;
}
.pr-card {
  display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); border-radius: 14px; padding: 22px 20px; position: relative;
}
.pr-card.featured {
  border-color: transparent;
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box,
    linear-gradient(120deg, #4C7DFF, #8250F0) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 18px 50px color-mix(in srgb, #8250F0 22%, transparent);
}
.pr-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(120deg, #4C7DFF, #8250F0); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.pr-name { font-size: 15px; font-weight: 700; }
.pr-tagline { color: var(--muted); font-size: 12.5px; margin-top: 3px; min-height: 2.6em; }
.pr-price { display: flex; align-items: baseline; gap: 3px; margin: 14px 0 2px; }
.pr-cur { font-size: 20px; font-weight: 700; color: var(--text); }
.pr-amt { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.pr-per { color: var(--muted); font-size: 14px; font-weight: 600; }
.pr-billed { font-size: 12px; color: var(--muted); min-height: 1.4em; }
.pr-cta { margin: 16px 0 18px; }
.pr-feats {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; color: var(--muted-2);
}
.pr-feats li { padding-left: 18px; position: relative; }
.pr-feats li::before { content: "\2713"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.pr-compare { margin: 64px 0 0; text-align: center; }
.pr-compare-title { font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.02em; font-weight: 800; margin: 0; }
.pr-compare-sub { color: var(--muted); margin: 8px 0 22px; font-size: 15px; }
.pr-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; }
.pr-table { border-collapse: collapse; width: 100%; min-width: 720px; }
.pr-table thead th {
  background: var(--field); text-align: center; font-size: 13px; font-weight: 700;
  padding: 14px; border-bottom: 1px solid var(--line); color: var(--text);
}
.pr-table thead th.pr-metric { text-align: left; }
.pr-table tbody th {
  text-align: left; font-weight: 600; font-size: 13.5px; color: var(--muted-2);
  padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.pr-table tbody td {
  text-align: center; padding: 12px 14px; border-bottom: 1px solid var(--line);
  font-size: 13.5px; color: var(--text); font-variant-numeric: tabular-nums;
}
.pr-table tr.pr-group th {
  background: var(--field); color: var(--muted); font-size: 11.5px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700; padding: 9px 14px;
}
.pr-yes { color: var(--green); font-weight: 700; }
.pr-no { color: var(--muted); }

.pr-ent {
  margin: 30px 0 0; border: 1px solid var(--line); border-radius: 14px; padding: 28px;
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: center;
  background:
    radial-gradient(600px 240px at 100% 0%, color-mix(in srgb, #8b5cff 16%, transparent), transparent 60%),
    var(--panel);
}
.pr-ent h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; font-weight: 800; }
.pr-ent p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.pr-ent-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.pr-notes { margin: 30px 0 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pr-note { font-size: 13px; color: var(--muted); line-height: 1.55; }
.pr-note strong { display: block; color: var(--text); font-weight: 650; margin-bottom: 3px; font-size: 14px; }

@media (max-width: 900px) {
  .pr-tiers { grid-template-columns: repeat(2, 1fr); }
  .pr-ent { grid-template-columns: 1fr; }
  .pr-ent-actions { justify-content: flex-start; }
  .pr-notes { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .pr-tiers { grid-template-columns: 1fr; } }

.plan-portal { margin-top: 16px; }

/* Admin discount-code create form: labelled fields on one wrapping row. */
.discount-create { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; padding: 18px 22px; }
.discount-create label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.discount-create input, .discount-create select { margin: 0; }
.discount-create input[name="code"] { text-transform: uppercase; }

/* Discount-code redeem box above the plan grid. */
.discount-redeem { margin: 4px 0 20px; }
.discount-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.discount-row { display: flex; gap: 8px; max-width: 360px; }
.discount-row input { flex: 1; margin: 0; }

/* Upsell panel shown in a project tab when the account's plan does not include
   a paid feature (push-to-deploy, notifications). */
.upsell {
  margin-top: 14px; padding: 14px 16px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 13.5px; color: var(--text-2, var(--text));
}
.upsell strong { display: block; margin-bottom: 2px; color: var(--text); }
.upsell a { color: var(--accent); font-weight: 600; }

/* Team members tab + account switcher */
.members-table { width: 100%; border-collapse: collapse; margin: 14px 0 4px; }
.members-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.members-table tr:last-child td { border-bottom: 0; }
.members-table td.right { text-align: right; }
.members-email { font-weight: 600; }
.members-sub { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 22px 0 0; }
.usermenu-label { padding: 8px 12px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.usermenu-account { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; }
.usermenu-account.active { font-weight: 700; }
.usermenu-check { margin-left: auto; color: var(--green); }

/* Audit log tab */
.audit-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.audit-table td { padding: 9px 8px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: top; }
.audit-table tr:last-child td { border-bottom: 0; }
.audit-when { white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.audit-who { font-weight: 600; white-space: nowrap; }
.audit-what { color: var(--text-2, var(--text)); width: 100%; }

/* ── Admin panel ───────────────────────────────────────────────────────── */

.subnav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.subnav-link {
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.subnav-link:hover { color: var(--text); }
.subnav-link.active { color: var(--text); border-bottom-color: var(--accent); }

/* Panel header row: title on the left, an optional link on the right. */
.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 0; }
.panel-link { font-size: 12.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
.panel-link:hover { text-decoration: underline; }

/* Key/value grid used by the dashboard summary panels. */
.kv { display: grid; grid-template-columns: repeat(2, 1fr); }
.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.kv > div:nth-child(odd) { border-left: 0; }
.kv-k { color: var(--muted); font-size: 13px; }
.kv-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.kv-v.bad { color: var(--bad); }

/* Admin search + pager controls. */
.admin-search { display: flex; gap: 8px; margin-bottom: 16px; }
.admin-search input[type="search"] {
  flex: 1;
  max-width: 360px;
  padding: 8px 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}
.pager { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.pager-page { color: var(--muted); font-size: 13px; }
.button.disabled { opacity: 0.45; pointer-events: none; }

@media (max-width: 720px) {
  .kv { grid-template-columns: 1fr; }
  .kv > div { border-left: 0; }
}

/* Admin operator-action rows. */
.admin-actions { margin-bottom: 24px; }
.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.action-row:last-child { border-bottom: 0; }
.action-row.danger { background: color-mix(in srgb, var(--bad) 5%, transparent); }
.action-title { font-weight: 700; font-size: 14px; }
.action-detail { color: var(--muted); font-size: 13px; margin-top: 2px; max-width: 60ch; }
.action-form { display: flex; gap: 8px; align-items: center; }
.action-form select {
  padding: 8px 10px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
}
.button.danger { border-color: var(--bad); color: var(--bad); }
.button.danger:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }

/* Flat auto-submitting switch for super-admin toggles. Rectangular to match the
   flat system; the checkbox is visually hidden but stays keyboard-focusable. */
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; }
.switch-track {
  width: 38px; height: 20px; flex: none; background: var(--n500);
  border: 1px solid var(--line); position: relative; transition: background .12s;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
  background: var(--panel); transition: left .12s;
}
.switch input:checked + .switch-track { background: var(--ok); }
.switch input:checked + .switch-track::after { left: 20px; }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-label { font-size: 13px; font-weight: 600; color: var(--muted); min-width: 20px; }

/* Affirmative tick in tables (e.g. auto-downgrade enabled). */
.tick { color: var(--ok); font-weight: 700; }
code.secret {
  display: inline-block;
  padding: 4px 10px;
  margin: 4px 0;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 15px;
  user-select: all;
}

/* ── Admin dashboard: cards, charts, spacing ───────────────────────────── */

/* Every admin page renders the section subnav immediately above its page head.
   The head's 2px divider rule was meant for a flush panel to hang off; on the
   admin pages it just floats and touches whatever follows (cards, the search
   box, a table), which reads as a stray line. Drop it across the whole admin
   section in one place — the subnav is admin-only, so no other page is affected. */
.subnav + .dash-head { border-bottom: 0; padding-bottom: 14px; }

/* One vertical rhythm for the whole dashboard, so sections never touch. */
.admin-stack { display: flex; flex-direction: column; gap: 24px; }

/* Headline figures as independent bordered cards, so wrapping to a second
   row still reads as a row of containers (unlike a single split panel). */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-card.attn { border-color: var(--accent); }
.stat-num { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat-card.attn .stat-num { color: var(--accent); }
.stat-label { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Two equal columns on wide screens, stacking below. Used for the charts
   row and the plans/queue row alike. */
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }

/* The dashboard summary tables (e.g. Plans & MRR) live in these half-width
   panels, which are narrower than the 720px min-width the wide data tables
   need. That floor made the table overflow its panel and spill past the border,
   reading as a phantom extra column. These small tables have few, short columns,
   so let them size to the panel instead. */
.chart-grid .ptable { min-width: 0; }

.chart-card { display: flex; flex-direction: column; }
.chart-body { padding: 12px 14px 6px; }

/* Server-rendered SVG chart. Scales to the card width, keeps its aspect ratio. */
.chart { width: 100%; height: auto; display: block; }
.chart text { font-size: 10px; font-weight: 600; fill: var(--muted); }
.chart .axis-label.end { text-anchor: end; }
.chart .axis-label.mid { text-anchor: middle; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .seg-ok { fill: var(--accent); }
.chart .seg-failed { fill: var(--bad); }
.chart .area { fill: color-mix(in srgb, var(--accent) 14%, transparent); stroke: none; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); }
.chart .point-label { fill: var(--text); font-size: 11px; font-weight: 800; text-anchor: end; }
/* Full-height hover columns carry the native <title> tooltip per day. */
.chart .hover { fill: transparent; }
.chart .hover:hover { fill: color-mix(in srgb, var(--text) 6%, transparent); }

/* Chart legend in the panel header. */
.legend { display: flex; gap: 14px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.swatch.ok { background: var(--accent); }
.swatch.failed { background: var(--bad); }

/* Impersonation banner: a persistent, high-visibility bar shown while an
   operator is viewing the app as another user, with a one-click way back. */
.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 10px 16px;
  border: 1px solid var(--amber);
  border-left: 4px solid var(--amber);
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber) 10%, transparent);
  font-size: 13.5px;
}
.impersonation-banner strong { font-weight: 800; }
.impersonation-banner button {
  padding: 7px 14px;
  border: 1px solid var(--amber);
  border-radius: 6px;
  background: var(--amber);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.impersonation-banner button:hover { background: var(--amber-700); }

/* ── Blog (/blog) ───────────────────────────────────────────────────────────
   A marketing subpage of the landing site. Renders on the landing chrome
   (lp-header/lp-footer, body.lp) and its tokens, so it inherits the same
   dark/light palette. Two views: the overview list and a single post. */

.blog-wrap { max-width: 760px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

.blog-head { text-align: center; padding: clamp(40px, 6vw, 72px) 0 8px; }
.blog-title {
  font-size: clamp(30px, 4.4vw, 46px);
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 14px 0 0;
  color: var(--text);
}
.blog-lede {
  margin: 14px auto 0;
  max-width: 46em;
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
}

/* Overview list — one scannable row per post. */
.blog-list { list-style: none; margin: clamp(28px, 5vw, 48px) 0 72px; padding: 0; }
.blog-item { border-top: 1px solid var(--line); }
.blog-item:last-child { border-bottom: 1px solid var(--line); }
.blog-item-link {
  display: block;
  padding: 26px 4px;
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.15s ease;
}
.blog-item-link:hover { padding-left: 12px; }
.blog-item-date {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.blog-item-title {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}
.blog-item-link:hover .blog-item-title { color: var(--accent); }
.blog-item-desc { margin: 8px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); }
.blog-item-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--accent);
}
.blog-empty { text-align: center; color: var(--muted); padding: 48px 0 96px; }

/* Single post. */
.blog-article { padding: clamp(32px, 5vw, 56px) 0 8px; }
.blog-article-head { border-bottom: 1px solid var(--line); padding-bottom: 28px; margin-bottom: 8px; }
.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
}
.blog-back:hover { color: var(--accent); }
.blog-article-date { display: block; margin-top: 18px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.blog-article-title {
  margin: 10px 0 0;
  font-size: clamp(28px, 4.6vw, 44px);
  letter-spacing: -0.025em;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
}
.blog-article-lede { margin: 16px 0 0; font-size: 18px; line-height: 1.55; color: var(--muted); }

/* Prose — the rendered Markdown body. A comfortable measure and generous
   line-height so posts read easily. */
.lp-prose { font-size: 17px; line-height: 1.75; color: var(--text); padding: 8px 0 8px; }
.lp-prose > *:first-child { margin-top: 0; }
.lp-prose p { margin: 0 0 20px; }
.lp-prose h2 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin: 44px 0 14px;
  color: var(--text);
}
.lp-prose h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 32px 0 10px;
  color: var(--text);
}
.lp-prose ul, .lp-prose ol { margin: 0 0 20px; padding-left: 24px; }
.lp-prose li { margin: 0 0 8px; }
.lp-prose li::marker { color: var(--muted); }
.lp-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.lp-prose a:hover { color: var(--accent-hover); }
.lp-prose strong { font-weight: 700; color: var(--text); }
.lp-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.lp-prose blockquote {
  margin: 0 0 20px;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.lp-prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* Inline code and code blocks. The highlighter emits inline styles on tokens
   inside <pre>, so these rules only set the surrounding surface. */
.lp-prose :not(pre) > code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.lp-prose pre {
  margin: 0 0 24px;
  padding: 18px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.lp-prose pre code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* Post-footer call to action. */
.blog-cta {
  margin: 8px 0 96px;
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  background: var(--panel);
}
.blog-cta h2 { margin: 0; font-size: 23px; font-weight: 800; letter-spacing: -0.015em; color: var(--text); }
.blog-cta p { margin: 10px 0 20px; color: var(--muted); font-size: 16px; }

/* ── How it works page (/how-it-works) ──────────────────────────────────────
   A deep-dive marketing subpage. Reuses the landing sections and the hero's
   product-glimpse window (.lp-window et al.); adds alternating copy/visual
   rows and a couple of app-screen mockups that stand in as screenshots of the
   tool, rendered in the same aesthetic so nothing looks pasted in. */

.hiw-lead { text-align: center; max-width: 900px; margin: 0 auto; padding: clamp(40px, 7vw, 88px) clamp(20px, 5vw, 56px) 0; }
.hiw-lead .lp-title { margin-top: 18px; }
.hiw-lead .lp-lede { margin-left: auto; margin-right: auto; max-width: 44em; }

/* Full-width showcase "screenshot" under the header. */
.hiw-showcase { max-width: 900px; margin: clamp(36px, 5vw, 56px) auto 0; padding: 0 clamp(20px, 5vw, 56px); }
.hiw-caption { margin: 14px 0 0; text-align: center; font-size: 13.5px; color: var(--muted); }

/* Alternating copy / visual rows. */
.hiw-rows {
  max-width: 1080px;
  margin: clamp(56px, 8vw, 96px) auto;
  padding: 0 clamp(20px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 7vw, 88px);
}
.hiw-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hiw-row.rev .hiw-copy { order: 2; }
@media (max-width: 820px) {
  .hiw-row, .hiw-row.rev { grid-template-columns: 1fr; }
  .hiw-row .hiw-copy, .hiw-row.rev .hiw-copy { order: 1; }
}
.hiw-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent); }
.hiw-kicker .n {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  font-size: 13px;
}
.hiw-copy h2 { margin: 14px 0 0; font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.02em; font-weight: 680; color: var(--text); }
.hiw-copy p { margin: 12px 0 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.hiw-copy p strong { color: var(--text); font-weight: 620; }
.hiw-copy code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 0.9em; }

/* Directory-tree mockup (the on-server release layout). */
.hiw-tree { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.95; color: var(--text); margin: 0; }
.hiw-tree .dim { color: var(--muted); }
.hiw-tree .cur { color: var(--ok); font-weight: 600; }
.hiw-tree .swap { color: var(--busy); }

/* App-screen mockup: fake topbar + tabs inside a .lp-window. */
.hiw-appbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel-2); font-size: 13px; }
.hiw-appbar .brand-name { font-weight: 700; letter-spacing: -0.02em; }
.hiw-tabs { display: flex; gap: 4px; margin-left: 10px; }
.hiw-tab { font-size: 12px; padding: 3px 9px; border-radius: 6px; color: var(--muted); }
.hiw-tab.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-weight: 600; }
.hiw-list { padding: 8px; display: flex; flex-direction: column; }
.hiw-item { display: flex; align-items: center; gap: 10px; padding: 12px; font-size: 13.5px; }
.hiw-item + .hiw-item { border-top: 1px solid var(--line); }
.hiw-item .name { font-weight: 600; color: var(--text); }
.hiw-item .sha { font-family: ui-monospace, monospace; font-size: 12px; color: var(--muted); }
.hiw-chip { margin-left: auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.hiw-chip.ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.hiw-chip.live { background: color-mix(in srgb, var(--busy) 18%, transparent); color: var(--busy); }
.hiw-chip.muted { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
