/* ═══════════════════════════════════════════════════════ */
/* Benchwright — Shared Design System                     */
/* ═══════════════════════════════════════════════════════ */
/*
 * Self-hosted fonts from /fonts/. Served from the same origin as the
 * HTML so the browser fetches them alongside other page assets —
 * no Google Fonts round trip, no CLS from late font swaps.
 * Each HTML page preloads the specific weight its above-the-fold
 * content uses (the topbar "Benchwright" wordmark uses ExtraBold 800).
 */
@font-face {
  font-family: 'Inter';
  font-weight: 400;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/Inter-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 500;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/Inter-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 600;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/Inter-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 700;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/Inter-Bold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 800;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/Inter-ExtraBold.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-weight: 900;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/Inter-Black.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 400;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/JetBrainsMono-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 500;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/JetBrainsMono-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 600;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-weight: 700;
  font-style: normal;
  font-display: optional;
  src: url('/fonts/JetBrainsMono-Bold.woff2') format('woff2');
}

/* Design tokens (--teal, --bg, --text, --radius, etc.) live in
   theme.css — server-injected before this file on every page so
   variables resolve when these rules reference them. Edit theme.css
   alone to retheme the entire site. */

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--teal-77-25); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-2xs); }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ─── Topbar (shared across the app) ─────────────────────────
   Visual style mirrors landing's `nav`: glassy backdrop, 60px
   tall, generous horizontal padding. Stays in flow (not fixed)
   so existing grid layouts on dashboard/account don't have to
   reserve a fixed offset. */
.topbar {
  grid-column: 1 / -1;
  height: 60px;
  background: var(--bg-glass-70);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border-glass-60);
  display: flex; align-items: center;
  padding: 0 48px; gap: 18px;
  z-index: 10;
  flex-shrink: 0;
}
.topbar a { text-decoration: none; }
/* Brand group — holds the clickable logo anchor + the non-clickable
   admin-version badge together. Prevents the topbar's 18px gap from
   pushing the badge halfway across the nav while keeping the anchor
   itself minimal (only the logo+wordmark are clickable). */
.topbar-brand {
  display: flex; align-items: center; gap: 6px;
}
.topbar-logo {
  display: flex; align-items: center;
  text-decoration: none;
}
.topbar-logo img {
  height: 26px; width: auto; display: block;
  filter: drop-shadow(0 0 6px rgba(var(--teal-77-rgb),0.2));
}
/* Admin-only deploy marker next to the logo anchor — NOT inside the
   anchor (so clicking it doesn't navigate home). Muted so it reads
   as a tiny version stamp, not a brand element. Rendered only when
   the session is role=admin. See renderTopbar in Server.kt. */
.bw-admin-version {
  font-family: var(--mono, ui-monospace, Menlo, monospace);
  font-size: 10px; letter-spacing: 0.4px; font-weight: 500;
  color: var(--teal);
  opacity: 0.85;
  user-select: text;
  margin-left: 8px;
}
@media (max-width: 900px) { .topbar { padding: 0 24px; } }
@media (max-width: 600px) {
  .topbar { padding: 0 16px; }
  .bw-admin-version { display: none; }
}
.topbar-sep { width: 1px; height: 24px; background: var(--border); }
.topbar-spacer { flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

/* ─── Shared site nav ─────────────────────────────────────────
   Lifted from the landing page so every authenticated page uses
   the same look: minimal text links + one highlighted CTA pill
   (always Account). The current page's link gets `.active` and
   becomes muted/non-clickable.

   Both selectors are paired so landing.html (which uses .n-links
   / .n-cta historically) and the rest of the app (which uses
   .topbar-nav / .topbar-cta) share one source of truth. */
.topbar-nav,
.n-links {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}
.topbar-nav > a,
.n-links a {
  color: var(--text-3);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
.topbar-nav > a:hover,
.n-links a:hover { color: var(--text-2); }
.topbar-nav > a.active,
.n-links a.active { color: var(--teal-bright); pointer-events: none; }

/* Run link only exists in dashboard.html and is hidden until
   the URL has `?run_id=…`. A tiny inline script in dashboard's
   <head> sets `data-has-run` on <html> when present. */
.topbar-nav > a[data-nav="run"] { display: none; }
html[data-has-run] .topbar-nav > a[data-nav="run"] { display: inline; }

/* Topbar admin CTA — same shape + colors as .topbar-danger (the
   Remote link). Two specificity layers needed:
     * `.topbar-nav > a.topbar-cta` (0,2,1) beats the base
       `.topbar-nav > a` gray-color rule.
     * `.topbar-nav > a.topbar-cta.active` (0,3,1) beats the
       `.topbar-nav > a.active` cyan-color rule that fires on the
       /admin page itself (where the link is also `.active`).
   Without the second layer the button reads cyan-blue on /admin and
   red-soft everywhere else, which is what "still looks blue" was. */
.topbar-nav > a.topbar-cta,
.topbar-nav > a.topbar-cta.active,
.topbar-cta,
.n-cta {
  color: var(--red-bright-2);
  background: var(--red-edge-08);
  border: 1px solid var(--red-edge-40);
  border-radius: var(--radius);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.2s;
}
.topbar-nav > a.topbar-cta:hover,
.topbar-cta:hover,
.n-cta:hover { background: rgba(237,87,87,0.14); }
.topbar-nav > a.topbar-cta.active,
.topbar-cta.active { background: rgba(237,87,87,0.18); pointer-events: none; }

/* Danger-colored CTA — same shape as .topbar-cta but red. Used by
   the dev-only /remote link so it's visually distinct from the
   normal admin nav and can't be mistaken for a routine destination.
   Scoped under .topbar-nav > a so the color wins against the base
   nav-link rule (which carries the same class+element specificity
   as a bare .topbar-danger and would otherwise paint the text gray). */
.topbar-nav > a.topbar-danger,
.topbar-danger {
  color: var(--red-bright-2);
  background: var(--red-edge-08);
  border: 1px solid var(--red-edge-40);
  border-radius: var(--radius);
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
/* Pull the Remote button closer to the Admin CTA (the two read as
   a pair — primary admin destination + danger surface). The base
   .topbar-nav `gap: 28px` is the right rhythm for the rest of the
   links, but oversized between two adjacent CTAs. Negative margin
   collapses the visual distance without touching nav spacing. */
.topbar-nav > .topbar-cta + .topbar-danger {
  margin-left: -18px;
}
.topbar-nav > a.topbar-danger:hover,
.topbar-danger:hover { background: var(--red-edge-16); color: var(--red-glass); }
.topbar-nav > a.topbar-danger.active,
.topbar-danger.active { background: var(--red-edge-22); color: var(--red-glass); pointer-events: none; }

/* The boxy .topbar-btn style stays for non-nav uses (Pause/Stop
   buttons in dashboard headers, etc.) — but no longer drives the
   primary navigation. */
.topbar-btn {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text-3);
  padding: 6px 12px; font-size: 12px; cursor: pointer;
  font-family: var(--font); font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s; text-decoration: none;
  white-space: nowrap;
}
.topbar-btn:hover { background: var(--surface-3); color: var(--text-2); }
.topbar-btn svg { flex-shrink: 0; }

/* ─── Shared site footer ──────────────────────────────────────
   Server-side injection pattern, same as .topbar (see
   renderFooter in Server.kt). Two-row layout: top row carries
   brand + live status pill; bottom row is two groups of links
   that wrap naturally on narrow viewports. Every page without
   `<!-- bw:no-footer -->` gets this before </body>, and any
   legacy <footer> in the page body is stripped first. */
.site-footer {
  /* Explicit resets: several pages still carry a top-level
     `footer { display: flex; max-width: 1100px; ... }` rule in
     their inline <style>. Those element-selector rules have
     specificity (0,0,1); ours is (0,1,0) on .site-footer, so we
     win — but only for properties we actually declare. Declare
     every conflicting property explicitly so pages can't leak
     their legacy layout into our injected footer. */
  display: block;
  max-width: none;
  width: auto;
  margin: auto 0 0 0;
  padding: 0;
  text-align: left;

  border-top: 1px solid var(--border);
  background: var(--bg-glass-55);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  color: var(--text-3);
  font-size: 12px;
}
/* No max-width on desktop: the footer stretches the full viewport
   width so it feels like chrome, not a floating card. The padding
   keeps things off the literal edge. On narrow viewports both
   rows stack via the wraps in .site-footer-top / -links. */
.site-footer-inner {
  padding: 28px 64px 30px;
  display: flex; flex-direction: column; gap: 18px;
}
@media (max-width: 900px) { .site-footer-inner { padding: 22px 24px; gap: 14px; } }
@media (max-width: 600px) { .site-footer-inner { padding: 18px 16px; gap: 12px; } }

/* Top row: brand on the left, status pill on the right. Wraps
   to stack on narrow screens. */
.site-footer-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.site-footer-brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-2);
  font-size: 13px;
}
.site-footer-brand-link {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-2); text-decoration: none;
}
.site-footer-brand-link:hover { color: var(--text); }
.site-footer-brand img { width: 18px; height: 18px; display: block; }
.site-footer-wordmark { color: var(--text); font-weight: 700; letter-spacing: -0.1px; }
.site-footer-copy     { color: var(--text-3); }
.site-footer-version {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: var(--text-3); opacity: 0.75;
  margin-left: 2px;
}

/* Status pill: rounded, subtle background. Color of the dot is
   driven by `data-state` set by the inline script. */
.site-footer-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--surface-1); border: 1px solid var(--border);
  color: var(--text-2); text-decoration: none;
  font-size: 12px;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.site-footer-status:hover {
  border-color: var(--teal-border);
  color: var(--text);
  background: var(--surface-2);
}
.site-footer-dot {
  width: 8px; height: 8px; border-radius: var(--radius-circle);
  background: var(--text-3);
  transition: background 0.2s, box-shadow 0.2s;
}
.site-footer-dot[data-state="ok"]       { background: var(--green); box-shadow: 0 0 5px var(--green); }
.site-footer-dot[data-state="degraded"] { background: var(--orange-bright);      box-shadow: 0 0 5px var(--orange-bright); }
.site-footer-dot[data-state="down"]     { background: var(--red);   box-shadow: 0 0 5px var(--red); }

.site-footer-top-right {
  display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.site-footer-social {
  display: inline-flex; align-items: center; gap: 4px;
}
.site-footer-social-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  color: var(--text-3); text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.site-footer-social-link:hover {
  color: var(--text);
  background: var(--surface-1);
}

/* Theme toggle button — sun/moon glyph that flips the bw_theme
   cookie on click. Lives in the top-right footer cluster next to
   the social links + status pill. Same dimensions as the social
   links so the row reads as one strip of small icons. */
.site-footer-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid transparent;
  color: var(--text-3); cursor: pointer;
  padding: 0;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.site-footer-theme-toggle:hover {
  color: var(--text);
  background: var(--surface-1);
  border-color: var(--border);
}
.site-footer-theme-toggle svg { display: block; }

/* Bottom row: link groups separated by an invisible spacer so
   site/primary links stay left-aligned and the legal links
   right-align. Both groups are flex-wrap so a narrow viewport
   drops them onto extra rows rather than squeezing. */
.site-footer-links {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.site-footer-group {
  display: inline-flex; align-items: center; flex-wrap: wrap;
  gap: 18px;
}
.site-footer-group a {
  color: var(--text-3); text-decoration: none;
  transition: color 0.15s;
}
.site-footer-group a:hover { color: var(--text-2); }
.site-footer-group a.active { color: var(--teal-bright); pointer-events: none; }
.site-footer-group-legal a { font-size: 11px; color: var(--text-3); }
.site-footer-group-legal a:hover { color: var(--text-2); }

@media (max-width: 720px) {
  .topbar-nav, .n-links { gap: 18px; }
  .topbar-cta, .n-cta { padding: 6px 14px; }
}
@media (max-width: 600px) {
  .topbar-nav, .n-links { gap: 14px; }
  .topbar-cta, .n-cta { padding: 6px 12px; font-size: 12px; }
  .topbar-btn span { display: none; }
}
.topbar-avatar {
  width: 30px; height: 30px; min-width: 30px; border-radius: var(--radius-circle);
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: white; flex-shrink: 0;
}
.topbar-cost { font-size: 11px; color: var(--text-3); font-family: var(--mono); }
.topbar-page { font-size: 13px; color: var(--text-3); font-weight: 500; }
.topbar-run {
  font-size: 12px; color: var(--text-2);
  display: flex; align-items: center; gap: 7px;
}
.topbar-run .dot {
  width: 7px; height: 7px; border-radius: var(--radius-circle); background: var(--green);
  box-shadow: 0 0 8px var(--green-45);
  animation: pulse 2s ease-in-out infinite;
}
.topbar-run strong { color: var(--text); font-weight: 600; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* ─── Cards ─── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
}
.card-header, .card-h {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title, .card-t {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.3px; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.card-body, .card-b { padding: 16px; }

/* ─── Badges ─── */
.card-badge, .badge {
  font-size: 10px; padding: 2px 8px; border-radius: var(--radius);
  font-weight: 600; font-family: var(--mono);
}
.badge-green, .card-badge.green { background: var(--green-dim); color: var(--green); }
.badge-yellow, .card-badge.yellow { background: var(--yellow-dim); color: var(--yellow); }
.badge-teal, .card-badge.teal { background: var(--teal-dim); color: var(--teal-bright); }
.badge-red, .card-badge.red { background: var(--red-dim); color: var(--red); }
.badge-blue, .card-badge.blue { background: var(--blue-12); color: var(--blue); }

/* ─── Buttons ─── */
.btn-sm {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 12px; font-weight: 600; font-family: var(--font);
  cursor: pointer; transition: all 0.15s; border: none;
  text-decoration: none;
}
.btn-sm.primary { background: var(--teal); color: white; }
.btn-sm.primary:hover { background: var(--teal-bright); }
.btn-sm.ghost {
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-sm.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm.danger { background: var(--red-dim); color: var(--red); }
.btn-sm.danger:hover { background: var(--red-18); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: var(--radius-lg);
  font-size: 15px; font-weight: 600; font-family: var(--font);
  cursor: pointer; text-decoration: none; transition: all 0.2s;
  border: none;
}
.btn-t {
  background: var(--teal); color: #fff;
  box-shadow: 0 4px 20px var(--teal-77-25), inset 0 1px 0 var(--white-10);
}
.btn-t:hover { background: var(--teal-bright); transform: translateY(-1px); box-shadow: 0 8px 30px rgba(var(--teal-77-rgb),0.3); }
.btn-g {
  background: var(--white-04); color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-g:hover { background: var(--white-07); color: var(--text); }

/* ─── Grids ─── */
.row { display: grid; gap: 20px; }
.row-2 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: 1fr 1fr 1fr; }
.row-2-1 { grid-template-columns: 2fr 1fr; }
.row-1-2 { grid-template-columns: 1fr 2fr; }

/* ─── Section typography (landing) ─── */
.label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--teal); margin-bottom: 12px;
}
.heading {
  font-size: 36px; font-weight: 800; letter-spacing: -1px;
  line-height: 1.15; margin-bottom: 12px;
}
.subtext {
  font-size: 16px; color: var(--text-2); line-height: 1.65;
  max-width: 480px;
}

/* ─── "Coming soon" tag ─── */
.soon-tag {
  display: inline-block; font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  padding: 2px 8px; border-radius: var(--radius-xs);
  background: var(--teal-dim); color: var(--teal-bright);
  vertical-align: middle; margin-left: 6px;
}

/* ─── Stat boxes ─── */
.stat-box {
  text-align: center; padding: 12px 8px; background: var(--surface-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.stat-value {
  font-size: 22px; font-weight: 700; font-family: var(--mono);
  line-height: 1.2;
}
.stat-value.green { color: var(--green); }
.stat-value.red { color: var(--red); }
.stat-value.yellow { color: var(--yellow); }
.stat-value.teal { color: var(--teal-bright); }
.stat-value.text { color: var(--text); }
.stat-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-3); margin-top: 4px; font-weight: 600;
}

/* ─── Tables ─── */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th {
  text-align: left; padding: 10px 14px; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--text-3); border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table .mono { font-family: var(--mono); font-size: 11px; }
.data-table .hl { color: var(--text); font-weight: 600; }

/* ─── Toggle switch ─── */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.toggle-row:last-child { border-bottom: none; }
.toggle-info { display: flex; flex-direction: column; gap: 2px; }
.toggle-name { font-size: 13px; font-weight: 600; }
.toggle-desc { font-size: 11px; color: var(--text-3); }
.toggle {
  width: 38px; height: 22px; border-radius: var(--radius);
  background: var(--border); cursor: pointer;
  position: relative; flex-shrink: 0;
  transition: background 0.2s;
}
.toggle.on { background: var(--teal); }
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: var(--radius-circle);
  background: white; transition: transform 0.2s;
}
.toggle.on::after { transform: translateX(16px); }

/* ─── Form fields ─── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-3);
}
.field-input {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px;
  color: var(--text); font-family: var(--font); font-size: 13px;
  outline: none; transition: border-color 0.15s;
}
.field-input:focus { border-color: var(--teal-border); }
.field-input.mono { font-family: var(--mono); font-size: 12px; color: var(--teal-bright); }
.field-hint { font-size: 11px; color: var(--text-3); }

/* ─── Snapshot items ─── */
.snapshot-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 11px;
}
.snapshot-icon {
  width: 24px; height: 24px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0;
}
.snapshot-icon.env { background: var(--teal-dim); color: var(--teal); }
.snapshot-icon.task { background: var(--green-dim); color: var(--green); }
.snapshot-info { flex: 1; }
.snapshot-name { font-weight: 600; color: var(--text); }
.snapshot-meta { font-size: 10px; color: var(--text-3); font-family: var(--mono); }
.snapshot-tag {
  font-size: 9px; padding: 2px 6px; border-radius: var(--radius-2xs);
  font-weight: 600; font-family: var(--mono);
  background: var(--surface-3); color: var(--text-3);
}

/* ─── Progress bars ─── */
.progress-bar-track {
  height: 6px; background: var(--surface-3); border-radius: var(--radius-2xs);
  overflow: hidden; display: flex;
}
.progress-bar-fill { height: 100%; border-radius: var(--radius-2xs); }
.progress-bar-fill.green { background: var(--green); }
.progress-bar-fill.red { background: var(--red); }
.progress-bar-fill.yellow { background: var(--yellow); }
.progress-label {
  display: flex; justify-content: space-between; font-size: 11px; color: var(--text-2);
}
.progress-label span:last-child { font-family: var(--mono); color: var(--text-3); }

/* ─── Shared hero (logo + spinning rings) ─────────────────────
   A centered logo inside two slowly rotating concentric rings,
   used by the login and 404 pages. The outer ring is positioned
   at `inset: -30px`, so the hero's `margin-bottom` MUST exceed
   30px or whatever sits below will clip into the ring. Keep the
   default here — callers should not override it down. */
.bw-hero {
  position: relative;
  width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 48px;
}
.bw-hero-logo {
  width: 96px; height: 96px;
  filter: drop-shadow(0 0 60px var(--teal-77-25))
          drop-shadow(0 0 120px var(--teal-77-08));
  animation: bw-hero-float 6s ease-in-out infinite;
}
@keyframes bw-hero-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.bw-hero-ring { position: absolute; inset: 0; pointer-events: none; }
.bw-hero-ring::before {
  content: '';
  position: absolute; inset: -10px;
  border-radius: var(--radius-circle);
  border: 1px solid rgba(var(--teal-77-rgb),0.10);
  animation: bw-hero-spin 20s linear infinite;
}
.bw-hero-ring::after {
  content: '';
  position: absolute; inset: -30px;
  border-radius: var(--radius-circle);
  border: 1px solid var(--teal-77-06);
  animation: bw-hero-spin 30s linear infinite reverse;
}
@keyframes bw-hero-spin { to { transform: rotate(360deg); } }

/* Same radial glow + dot grid atmosphere used behind the login
   and 404 pages. Apply to a full-viewport wrapper that sets
   `position: relative`; the pseudo-elements are non-interactive. */
.bw-atmosphere::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -55%);
  width: 1000px; height: 800px;
  background: radial-gradient(ellipse, var(--teal-77-06) 0%, transparent 60%);
  pointer-events: none;
}
.bw-atmosphere::after {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(var(--teal-77-04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, black, transparent 70%);
  pointer-events: none;
}

@media (max-width: 480px) {
  .bw-hero { width: 130px; height: 130px; margin-bottom: 42px; }
  .bw-hero-logo { width: 80px; height: 80px; }
}

/* ─── Shared base ─── */
/* `overflow-x: clip` keeps horizontal overflow clipped (same as
   `hidden` did) WITHOUT creating a scroll container, which
   `overflow-x: hidden` does and which breaks `position: sticky`
   for every descendant (Safari + older Firefox). The docs-entry
   TOC is the first to care, but any future sticky sidebar would
   hit the same gotcha. */
html, body { overflow-x: clip; max-width: 100vw; }

/* ─── Responsive (shared) ─── */
@media (max-width: 768px) {
  .row-2, .row-3, .row-2-1, .row-1-2 { grid-template-columns: 1fr; }
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-btn span { display: none; }
  .topbar-cost { display: none; }
}
