/* =============================================================
   Veltra design system
   Every page uses .theme-dark (black canvas). The light tokens on :root remain only
   for print, so invoices print on white paper. Marketing pages add a hairline frame.
   Token names: --paper = background, --ink = foreground.
   ============================================================= */

:root, .theme-light {
  --paper: #ffffff;
  --paper-2: #f7f7f8;
  --paper-3: #efeff1;
  --surface: #ffffff;
  --ink: #111113;
  --ink-2: #3b3b40;
  --muted: #6b6b73;
  --faint: #a1a1aa;
  --line: #ebebee;
  --line-2: #dcdce0;

  --accent: #ff5a1f;
  --accent-hover: #ff7038;
  --accent-ink: #c2410c;
  --accent-wash: #fff1eb;

  --ok: #12814b;   --ok-wash: #e7f6ee;
  --warn: #9a5800; --warn-wash: #fdf3e0;
  --err: #c62a1f;  --err-wash: #fdecea;
  --info: #2e5bd8; --info-wash: #ebf0fd;

  --btn-2: #ffffff;
  --btn-2-line: var(--line-2);
  --shadow-1: 0 1px 2px rgba(17, 17, 19, .04);
  --shadow-2: 0 1px 2px rgba(17, 17, 19, .04), 0 8px 24px -10px rgba(17, 17, 19, .12);
  --shadow-pop: 0 2px 6px rgba(17, 17, 19, .06), 0 24px 56px -16px rgba(17, 17, 19, .28);
  --chart-area: rgba(17, 17, 19, .05);
  color-scheme: light;
}

.theme-dark {
  --paper: #000000;
  --paper-2: #0a0a0a;
  --paper-3: #141414;
  --surface: #0a0a0a;
  --ink: #ffffff;
  --ink-2: #c8c8c8;
  --muted: #8b8b8b;
  --faint: #5a5a5a;
  --line: #1c1c1c;
  --line-2: #2a2a2a;

  --accent-ink: #ff8a5c;
  --accent-wash: rgba(255, 90, 31, .14);

  --ok: #4ade80;   --ok-wash: rgba(74, 222, 128, .12);
  --warn: #fbbf24; --warn-wash: rgba(251, 191, 36, .12);
  --err: #f87171;  --err-wash: rgba(248, 113, 113, .12);
  --info: #60a5fa; --info-wash: rgba(96, 165, 250, .12);

  --btn-2: #1f1f1f;
  --btn-2-line: transparent;
  --shadow-1: none;
  --shadow-2: 0 0 0 1px var(--line);
  --shadow-pop: 0 0 0 1px var(--line-2), 0 24px 64px -12px rgba(0, 0, 0, .8);
  --chart-area: rgba(255, 255, 255, .06);
  color-scheme: dark;
}

:root {
  /* Fixed dark surfaces (terminals, logs, code) in both themes */
  --night: #0b0b0c;
  --night-2: #141416;
  --night-3: #1c1c1f;
  --night-line: #26262a;
  --night-text: #ededef;
  --night-muted: #9a9aa2;

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 10px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1120px;
  --header-h: 56px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.6 var(--sans);
  font-feature-settings: "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.theme-light { background: var(--paper); color: var(--ink); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-wash); color: var(--ink); }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
code, kbd, pre { font-family: var(--mono); }
ul, ol { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 200; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 20px; height: 20px; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 40px; }
.wrap-narrow { max-width: 820px; }
.section { padding-block: 104px; }
.section-sm { padding-block: 72px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-top { align-items: flex-start; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack-sm { display: grid; gap: 8px; align-content: start; }
.stack-lg { display: grid; gap: 28px; align-content: start; }
.between { justify-content: space-between; }
.wrap-flex { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.center { text-align: center; }
.tnum { font-variant-numeric: tabular-nums; }
.hide { display: none !important; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; } .mt-16 { margin-top: 64px; }

/* Marketing frame: hairline column edges down the page, section rules, + markers */
.theme-dark main:not(.app-content) { position: relative; }
.theme-dark main:not(.app-content).auth::before { display: none; }
.theme-dark main:not(.app-content)::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; z-index: 0; pointer-events: none;
  width: min(var(--wrap), calc(100% - 32px)); transform: translateX(-50%);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.theme-dark main:not(.app-content) > section { position: relative; z-index: 1; border-top: 1px solid var(--line); }
.theme-dark main:not(.app-content) > section:first-child { border-top: 0; }
.theme-dark main:not(.app-content) > section:not(:first-child)::before,
.theme-dark main:not(.app-content) > section:not(:first-child)::after {
  content: "+"; position: absolute; top: -10px; z-index: 2; width: 9px; height: 19px;
  font: 300 15px/19px var(--mono); color: var(--faint); text-align: center; pointer-events: none;
}
.theme-dark main:not(.app-content) > section:not(:first-child)::before { left: calc(50% - min(var(--wrap), calc(100% - 32px)) / 2 - 4.5px); }
.theme-dark main:not(.app-content) > section:not(:first-child)::after { left: calc(50% + min(var(--wrap), calc(100% - 32px)) / 2 - 4.5px); }

/* ---------- Typography ---------- */
.display { font-size: clamp(2.6rem, 5.6vw, 4.25rem); line-height: 1.04; letter-spacing: -.04em; font-weight: 500; }
.h1 { font-size: clamp(2.1rem, 4.2vw, 3.1rem); line-height: 1.06; letter-spacing: -.035em; font-weight: 500; }
.h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 500; }
.h3 { font-size: 1.2rem; letter-spacing: -.02em; line-height: 1.25; font-weight: 500; }
.h4 { font-size: 1rem; letter-spacing: -.012em; line-height: 1.35; font-weight: 500; }
/* Second tone in headlines (kept class name from earlier markup) */
.serif { font: inherit; letter-spacing: inherit; color: var(--muted); }
.lead { font-size: clamp(1rem, 1.3vw, 1.125rem); line-height: 1.6; color: var(--muted); max-width: 58ch; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.small { font-size: .875rem; }
.xs { font-size: .8125rem; }
.mono { font-family: var(--mono); font-size: .8125rem; letter-spacing: -.01em; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--mono); font-size: .75rem; letter-spacing: 0; color: var(--muted);
}
.eyebrow .num { color: var(--muted); }
.eyebrow .num::before { content: "["; }
.eyebrow .num::after { content: "]"; }

/* ---------- Buttons ---------- */
.btn {
  --h: 34px;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  height: var(--h); padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 500; font-size: .875rem; letter-spacing: -.005em; line-height: 1;
  white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), opacity .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 15px; height: 15px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { opacity: .86; }
.btn-secondary { background: var(--btn-2); color: var(--ink); border-color: var(--btn-2-line); box-shadow: var(--shadow-1); }
.btn-secondary:hover { border-color: var(--faint); }
.theme-dark .btn-secondary:hover { background: #2a2a2a; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper-3); color: var(--ink); }
.btn-accent { background: var(--accent); color: #111; }
.btn-accent:hover { background: var(--accent-hover); }
.btn-danger { background: var(--err); color: #fff; }
.theme-dark .btn-danger { color: #111; }
.btn-danger:hover { opacity: .88; }
.btn-danger-quiet { background: var(--surface); color: var(--err); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.btn-danger-quiet:hover { background: var(--err-wash); }
.btn-sm { --h: 30px; padding: 0 11px; font-size: .8125rem; }
.btn-lg { --h: 40px; padding: 0 18px; font-size: .9375rem; }
.btn-icon { width: var(--h); padding: 0; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--paper); border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--ink); border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; transition: text-decoration-color .15s; }
.link:hover { text-decoration-color: currentColor; }
.link-accent { color: var(--accent-ink); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 500; font-size: .9375rem; }
.link-arrow .icon { transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- Badges, dots, tags ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px;
  border-radius: 5px; font-size: .75rem; font-weight: 500; line-height: 1;
  background: var(--paper-3); color: var(--ink-2); white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; }
.badge .icon { width: 11px; height: 11px; }
.invoice-table th { white-space: nowrap; }
.invoice-table td:last-child { width: 1%; padding-left: 0; }
@media (max-width: 1100px) { .invoice-table .col-credits { display: none; } }
.badge-ok { background: var(--ok-wash); color: var(--ok); }
.badge-warn { background: var(--warn-wash); color: var(--warn); }
.badge-err { background: var(--err-wash); color: var(--err); }
.badge-info { background: var(--info-wash); color: var(--info); }
.badge-accent { background: var(--accent-wash); color: var(--accent-ink); }
.badge-outline { background: transparent; border: 1px solid var(--line-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.dot-pulse { position: relative; }
.dot-pulse::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid currentColor; opacity: 0; animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px;
  font-family: var(--mono); font-size: .6875rem; letter-spacing: 0;
  border: 1px solid var(--line-2); border-radius: 4px; color: var(--ink-2); background: var(--surface);
}
.tag-accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-wash); color: var(--accent-ink); }
kbd { font-size: .6875rem; padding: 1px 5px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); color: var(--muted); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; align-content: start; }
.label { font-size: .8125rem; font-weight: 500; color: var(--ink); }
.label .opt { color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; height: 36px; padding: 0 11px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); font-size: .875rem;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--faint); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--err); }
.input[readonly] { background: var(--paper-2); }
.input-mono { font-family: var(--mono); font-size: .8125rem; }
.textarea { height: auto; min-height: 120px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b8b8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.select option { background: var(--surface); color: var(--ink); }
.hint { font-size: .8125rem; color: var(--muted); }
.error-text { font-size: .8125rem; color: var(--err); }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 0; }
.input-group > :first-child { border-radius: var(--r-sm) 0 0 var(--r-sm); }
.input-group > :last-child { border-radius: 0 var(--r-sm) var(--r-sm) 0; }
.input-group > * + * { margin-left: -1px; }
.input-group .btn { height: 36px; box-shadow: none; }
.input-affix {
  display: inline-flex; align-items: center; padding: 0 11px; height: 36px;
  border: 1px solid var(--line-2); background: var(--paper-2); color: var(--muted);
  font-family: var(--mono); font-size: .75rem; white-space: nowrap;
}
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--ink); }
input[type="range"] { width: 100%; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .875rem; }
.check input { margin-top: 3px; width: 15px; height: 15px; flex: none; }

.switch {
  position: relative; width: 32px; height: 18px; flex: none; padding: 0;
  border-radius: 999px; border: 0; background: var(--line-2); transition: background-color .2s var(--ease);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .2s var(--ease);
}
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(14px); background: var(--paper); }
.switch:disabled { opacity: .4; cursor: not-allowed; }

.segmented { display: inline-flex; width: fit-content; padding: 3px; gap: 2px; background: var(--paper-2); border-radius: 8px; border: 1px solid var(--line); }
.segmented button {
  border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 6px;
  font-size: .8125rem; font-weight: 500; color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
  transition: background-color .15s, color .15s;
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2); }
.theme-dark .segmented button[aria-pressed="true"] { background: #1f1f1f; box-shadow: none; }

.choice {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 14px; border: 1px solid var(--line-2); border-radius: var(--r);
  background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.choice:hover { border-color: var(--faint); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.choice:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.choice-icon { width: 34px; height: 34px; border-radius: 7px; background: var(--paper-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--ink); }
.choice:has(input:checked) .choice-icon { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface);
  font-size: .8125rem; color: var(--ink-2); cursor: pointer; transition: background-color .12s, border-color .12s;
}
.chip:hover { border-color: var(--faint); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .count { font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.chip[aria-pressed="true"] .count { color: color-mix(in srgb, var(--paper) 70%, transparent); }

/* ---------- Panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; }
.panel-body { padding: 18px; }
.panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 11px 18px; border-top: 1px solid var(--line); background: var(--paper-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.panel-danger { border-color: color-mix(in srgb, var(--err) 30%, var(--line)); }
.panel-danger .panel-head { border-bottom-color: color-mix(in srgb, var(--err) 18%, var(--line)); }
.divide > * + * { border-top: 1px solid var(--line); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.table th {
  text-align: left; font-weight: 500; font-size: .6875rem; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); padding: 9px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; transition: background-color .1s; }
.table tr.clickable:hover { background: var(--paper-2); }
.table tr.clickable:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Tabs (horizontal by default, vertical with aria-orientation) ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab {
  appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 9px 12px; font-size: .875rem; font-weight: 500; color: var(--muted); white-space: nowrap; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }
.tabs[aria-orientation="vertical"] { flex-direction: column; border-bottom: 0; gap: 1px; overflow: visible; }
.tabs[aria-orientation="vertical"] .tab {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  border: 0; margin: 0; padding: 6px 9px; border-radius: var(--r-sm); font-size: .8125rem; color: var(--ink-2);
}
.tabs[aria-orientation="vertical"] .tab:hover { background: var(--paper-3); }
.tabs[aria-orientation="vertical"] .tab[aria-selected="true"] { background: var(--paper-3); color: var(--ink); }
.tabs[aria-orientation="vertical"] .tab .icon { width: 15px; height: 15px; color: var(--muted); }
.tabs[aria-orientation="vertical"] .tab-label { padding: 14px 9px 5px; font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }

/* ---------- Dialog ---------- */
dialog.modal {
  border: 1px solid var(--line); padding: 0; border-radius: var(--r-lg); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-pop); width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
}
dialog.modal::backdrop { background: rgba(10, 10, 12, .45); backdrop-filter: blur(2px); }
dialog.modal[open] { animation: pop .16s var(--ease); }
.modal-body { padding: 22px; }
.modal-body h2 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.015em; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--paper-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }

/* Command palette */
dialog.cmdk { width: min(560px, calc(100vw - 32px)); margin-top: 12vh; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.cmdk-input input { flex: 1; height: 50px; border: 0; background: transparent; font-size: .9375rem; outline: none; }
.cmdk-list { max-height: 340px; overflow-y: auto; padding: 6px; }
.cmdk-group { padding: 8px 10px 4px; font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.cmdk-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); font-size: .875rem; color: var(--ink-2); cursor: pointer; }
.cmdk-item .icon { color: var(--muted); }
.cmdk-item .meta { margin-left: auto; font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.cmdk-item[aria-selected="true"] { background: var(--paper-3); color: var(--ink); }
.cmdk-empty { padding: 28px; text-align: center; color: var(--muted); font-size: .875rem; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: grid; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: 400px;
  padding: 11px 14px; border-radius: var(--r); background: #111113; color: #fafafa;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .4); font-size: .875rem; animation: pop .2s var(--ease);
}
.theme-dark .toast { background: #1c1c1c; box-shadow: 0 0 0 1px #2a2a2a, 0 12px 32px -8px rgba(0, 0, 0, .8); }
.toast .icon { color: var(--accent); }
.toast.is-leaving { opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }

/* ---------- Site header (marketing) ---------- */
[data-site-header] { min-height: calc(var(--header-h) + 41px); }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 1rem; letter-spacing: -.03em; color: var(--ink); }
.brand .mark { width: 20px; height: 20px; color: var(--ink); fill: currentColor; stroke: none; }
.site-nav { display: flex; gap: 2px; }
.site-nav a { display: inline-flex; align-items: center; gap: 3px; padding: 6px 10px; border-radius: var(--r-sm); font-size: .875rem; color: var(--muted); transition: color .15s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a .icon { width: 13px; height: 13px; opacity: .7; }
.header-actions { grid-column: -2; justify-self: end; display: flex; align-items: center; gap: 6px; }
.header-actions .btn-ghost { color: var(--ink); }
.menu-btn { display: none; }
.announce { border-bottom: 1px solid var(--line); font-size: .8125rem; background: var(--paper); }
.announce .wrap { display: flex; justify-content: center; align-items: center; min-height: 40px; }
.announce a { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); }
.announce a:hover { color: var(--ink); }
.announce .tag { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-wash); color: var(--accent-ink); }
.mobile-nav { display: none; border-top: 1px solid var(--line); padding: 8px 24px 20px; background: var(--paper); }
.mobile-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .9375rem; color: var(--ink-2); }
.mobile-nav .btn { margin-top: 16px; color: var(--paper); }
@media (max-width: 900px) {
  .site-header .bar { grid-template-columns: 1fr auto; }
  .site-nav, .header-actions .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
  .site-header.is-open .mobile-nav { display: block; }
}

/* ---------- Footer (marketing) ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); padding: 64px 0 28px; background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
.footer-col h4 { font-size: .8125rem; font-weight: 500; color: var(--ink); margin-bottom: 14px; letter-spacing: 0; }
.footer-col a { display: block; padding: 4px 0; font-size: .8125rem; color: var(--muted); transition: color .15s; }
.footer-col a:hover { color: var(--ink); }
.footer-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; font-size: .75rem; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--ok); }
.status-pill .dot { color: var(--ok); width: 6px; height: 6px; border-radius: 1px; }
.footer-word { display: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Night / raised sections ---------- */
.night { background: var(--night); color: var(--night-text); }
.night .muted, .night .lead { color: var(--night-muted); }
.night .eyebrow, .night .eyebrow .num { color: var(--night-muted); }
.night hr { border-color: var(--night-line); }
.night .btn-primary { background: #fff; color: #000; }
.night .btn-secondary { background: #1f1f1f; color: #fff; border-color: transparent; box-shadow: none; }
.night .link { color: var(--night-text); text-decoration-color: #4a4a4a; }
.theme-dark .night { background: transparent; }

/* ---------- Windows, terminals, code ---------- */
.window { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.theme-dark .window { border-color: #2a2a2a; box-shadow: 0 0 0 6px rgba(255, 255, 255, .03), 0 40px 120px -30px rgba(255, 255, 255, .12); }
.window-bar { height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.window-bar > i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); }
.window-url { margin: 0 auto; transform: translateX(-24px); font-family: var(--mono); font-size: .6875rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; padding: 2px 12px; }
.terminal { background: var(--night); color: var(--night-text); border: 1px solid var(--night-line); border-radius: var(--r-lg); font-family: var(--mono); font-size: .78rem; line-height: 1.8; overflow: hidden; }
.theme-dark .terminal { border-color: #222; }
.terminal-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--night-line); color: var(--night-muted); font-size: .6875rem; }
.terminal-bar > i { width: 10px; height: 10px; border-radius: 50%; background: #2c2c30; }
.terminal-bar span { margin-left: auto; }
.terminal-body { padding: 16px 18px; min-height: 260px; }
.t-dim { color: #6f6f78; } .t-ok { color: #6ee7a0; } .t-acc { color: #ff9b73; } .t-info { color: #93c5fd; } .t-warn { color: #fcd34d; }
.t-line { white-space: pre-wrap; word-break: break-word; }
.t-cursor { display: inline-block; width: 7px; height: 14px; background: var(--night-text); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.code { background: var(--night); color: var(--night-text); border: 1px solid var(--night-line); border-radius: var(--r); overflow: hidden; }
.theme-dark .code { border-color: #222; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 5px 5px 14px; border-bottom: 1px solid var(--night-line); font-family: var(--mono); font-size: .6875rem; color: var(--night-muted); }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; font-size: .78rem; line-height: 1.8; }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px; border: 0; border-radius: 5px; background: transparent; color: var(--night-muted); font-family: var(--mono); font-size: .6875rem; }
.copy-btn:hover { background: var(--night-3); color: var(--night-text); }
.copy-btn .icon { width: 13px; height: 13px; }
.tk-k { color: #ff9b73; } .tk-s { color: #b9e28c; } .tk-c { color: #6f6f78; font-style: italic; } .tk-n { color: #93c5fd; } .tk-p { color: #e8c27a; }

/* ---------- Marketing: hero ---------- */
.hero { position: relative; padding-top: 80px; overflow: hidden; }
.hero h1 { margin-top: 24px; max-width: 16ch; }
.hero .lead { margin-top: 22px; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 32px; }
.hero-center { text-align: center; padding-top: 96px; }
.hero-center h1, .hero-center .lead { margin-inline: auto; }
.hero-center .hero-actions, .hero-center .hero-meta { justify-content: center; }
.hero-grid {
  position: absolute; inset: 0 0 auto 0; height: 640px; overflow: hidden; pointer-events: none; perspective: 520px;
  mask-image: radial-gradient(ellipse 55% 75% at 50% 38%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 55% 75% at 50% 38%, #000 25%, transparent 78%);
}
.hero-grid::before {
  content: ""; position: absolute; left: -60%; right: -60%; top: 34%; height: 140%;
  background-image: linear-gradient(rgba(255, 255, 255, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .11) 1px, transparent 1px);
  background-size: 64px 64px; transform: rotateX(62deg); transform-origin: 50% 0;
}
.hero-grid::after {
  content: ""; position: absolute; left: -60%; right: -60%; bottom: 66%; height: 140%;
  background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 64px 64px; transform: rotateX(-62deg); transform-origin: 50% 100%;
}
.hero > .wrap { position: relative; }
.hero-mark {
  width: 64px; height: 64px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, #2a2a2a, #0d0d0d 70%);
  box-shadow: 0 0 0 1px #2e2e2e, inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 60px 10px rgba(255, 255, 255, .06);
}
.hero-mark svg { width: 26px; height: 26px; color: #fff; fill: currentColor; }
.hero-badge { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: .8125rem; color: var(--ink-2); transition: border-color .15s; }
.hero-badge:hover { border-color: var(--faint); }
.hero-meta { display: flex; gap: 8px 22px; flex-wrap: wrap; margin-top: 26px; font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .icon { width: 13px; height: 13px; color: var(--ok); }
.hero-shot { margin-top: 72px; padding-bottom: 0; }
.hero-shot .window { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom: 0; }

/* Product mock (light app inside the dark hero) */
.mock { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 460px; font-size: .78rem; text-align: left; }
.mock-side { border-right: 1px solid var(--line); background: var(--paper-2); padding: 12px 10px; display: flex; flex-direction: column; gap: 1px; }
.mock-ws { display: flex; align-items: center; gap: 8px; padding: 6px 8px 12px; font-weight: 600; font-size: .78rem; }
.mock-ws b { width: 20px; height: 20px; border-radius: 5px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: .625rem; }
.mock-nav { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 5px; color: var(--ink-2); }
.mock-nav .icon { width: 14px; height: 14px; color: var(--muted); }
.mock-nav.on { background: var(--paper-3); color: var(--ink); font-weight: 500; }
.mock-label { font-size: .5625rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding: 12px 8px 5px; }
.mock-main { padding: 20px 24px; min-width: 0; }
.mock-head { display: flex; align-items: center; gap: 10px; }
.mock-head h4 { font-size: 1rem; font-weight: 600; letter-spacing: -.02em; }
.mock-sub { margin-top: 6px; display: flex; gap: 14px; color: var(--muted); font-family: var(--mono); font-size: .625rem; }
.mock-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; margin-top: 18px; }
.mock-card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.mock-card-h { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-weight: 500; }
.mock-card-h .mono { font-size: .625rem; color: var(--muted); }
.deploy-row { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.deploy-row:last-child { border-bottom: 0; }
.deploy-row .msg { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deploy-row .meta { font-family: var(--mono); font-size: .625rem; color: var(--muted); }
.deploy-row.is-new { animation: slideIn .5s var(--ease); background: linear-gradient(90deg, var(--accent-wash), transparent 70%); }
@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.state-dot.building { background: var(--accent); animation: breathe 1.2s ease-in-out infinite; }
.state-dot.idle { background: var(--line-2); }
.state-dot.failed { background: var(--err); }
@keyframes breathe { 50% { opacity: .35; } }
.metric { padding: 11px 12px 4px; }
.metric .v { font-size: 1.25rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric .k { color: var(--muted); font-size: .6875rem; }
.spark { width: 100%; height: 60px; }
.spark path.area { fill: url(#sparkFill); }
.spark path.line { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.region-row { display: flex; justify-content: space-between; padding: 6px 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .625rem; color: var(--ink-2); }

/* ---------- Marketing: sections ---------- */
.section-head { display: grid; gap: 14px; max-width: 640px; margin-bottom: 48px; }
.section-head .h2 { margin-top: 0; }
.split { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.steps { display: grid; margin-top: 32px; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 40px 1fr; gap: 8px; padding: 18px 0; border-bottom: 1px solid var(--line); counter-increment: step; }
.steps { counter-reset: step; }
.step::before { content: "0" counter(step); font-family: var(--mono); font-size: .6875rem; color: var(--accent-ink); padding-top: 3px; }
.step h3 { font-size: .9375rem; font-weight: 500; letter-spacing: -.01em; }
.step p { margin-top: 3px; font-size: .875rem; }
.night .steps, .night .step { border-color: var(--night-line); }

/* Hairline cell grids (features, runtimes, bento) */
.cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cell { background: var(--paper); padding: 22px 22px 24px; min-width: 0; }
.cell .icon { width: 16px; height: 16px; }
.cell h3 { margin-top: 14px; font-size: .9375rem; font-weight: 500; letter-spacing: -.01em; }
.cell p { margin-top: 4px; font-size: .875rem; color: var(--muted); }
.cells-tight .cell { display: flex; align-items: center; justify-content: center; padding: 22px 12px; font-family: var(--mono); font-size: .75rem; color: var(--muted); text-align: center; }
.ic-blue { color: #60a5fa; } .ic-green { color: #4ade80; } .ic-violet { color: #a78bfa; } .ic-orange { color: #fb923c; }

.stack-list { display: flex; flex-wrap: wrap; gap: 10px 28px; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.tile { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 26px; overflow: hidden; background: var(--paper); }
.tile h3 { font-size: 1rem; font-weight: 500; letter-spacing: -.015em; }
.tile p { color: var(--muted); font-size: .875rem; margin-top: 5px; max-width: 46ch; }
.tile-visual { margin-top: auto; }
.span-2 { grid-column: span 2; } .span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; }
.mini { border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); font-size: .78rem; overflow: hidden; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: 0; }
.mini-row .mono { font-size: .6875rem; }
.mini-row .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-comment { border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); padding: 13px; font-size: .78rem; }
.pr-comment .who { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.pr-comment .who b { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; }
.pr-comment .who b svg { width: 11px; height: 11px; color: var(--paper); fill: currentColor; stroke: none; }
.pr-comment table { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: .72rem; }
.pr-comment td { padding: 6px 0; border-top: 1px solid var(--line); }
.pr-comment td:last-child { text-align: right; }

.region-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.region { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; background: var(--paper); }
.region .name { font-size: .9375rem; font-weight: 500; letter-spacing: -.01em; }
.region .code { font-family: var(--mono); font-size: .6875rem; color: var(--muted); margin-left: 10px; }
.region .ms { font-family: var(--mono); font-size: .75rem; color: var(--ink); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 8px; }
.region .ms .dot { color: var(--ok); width: 6px; height: 6px; }

.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature { padding: 24px; background: var(--paper); }
.feature-list.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature .icon { color: var(--ink); width: 16px; height: 16px; }
.feature h3 { margin-top: 14px; font-size: .9375rem; font-weight: 500; letter-spacing: -.01em; }
.feature p { margin-top: 4px; color: var(--muted); font-size: .875rem; }

.cta-band { position: relative; overflow: hidden; padding-block: 120px; text-align: center; }
.cta-band .display, .cta-band .h1 { max-width: 18ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }
.cta-band .eyebrow { justify-content: center; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.plan { position: relative; display: flex; flex-direction: column; padding: 28px 22px; background: var(--paper); }
.plan.is-unavailable > :not(.plan-top) { opacity: .62; }
.plan.is-featured { background: var(--paper-2); }
.plan.is-featured::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--accent); }
/* Badge sits above the name; names line up along the bottom whether or not a card has a badge. */
.plan-top { display: flex; flex-direction: column-reverse; justify-content: flex-start; align-items: flex-start; gap: 8px; min-height: 52px; }
.plan-name { font-size: 1rem; font-weight: 500; letter-spacing: -.015em; }
.plan-desc { margin-top: 8px; color: var(--muted); font-size: .875rem; min-height: 42px; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 20px; }
.plan-price .amt { font-size: 2.4rem; font-weight: 500; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan-price .per { color: var(--muted); font-size: .8125rem; }
.plan-note { margin-top: 6px; min-height: 20px; font-size: .78rem; color: var(--muted); }
.plan .btn { margin-top: 20px; }
.plan ul { list-style: none; padding: 0; margin-top: 24px; display: grid; gap: 10px; font-size: .84rem; }
.plan li { display: flex; gap: 9px; align-items: flex-start; color: var(--ink-2); }
.plan li .icon { width: 15px; height: 15px; margin-top: 3px; color: var(--ok); }
.plan li.is-head { font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.compare { width: 100%; border-collapse: collapse; font-size: .84rem; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; padding-left: 0; }
.compare thead th { position: sticky; top: var(--header-h); background: var(--paper); font-weight: 500; z-index: 2; }
.compare .grp td { padding-top: 30px; font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.compare .icon { margin: auto; width: 15px; height: 15px; color: var(--ok); }
.compare .no { color: var(--faint); }
.estimator { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.estimator-in { padding: 26px; display: grid; gap: 20px; }
.estimator-out { padding: 26px; background: var(--paper-2); border-left: 1px solid var(--line); color: var(--ink); border-radius: 0 var(--r-lg) var(--r-lg) 0; display: flex; flex-direction: column; }
.est-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.est-line b { color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.est-total { margin-top: auto; padding-top: 24px; }
.est-total .amt { font-size: 2.75rem; font-weight: 500; letter-spacing: -.045em; font-variant-numeric: tabular-nums; line-height: 1; }
.range-head { display: flex; justify-content: space-between; align-items: baseline; }
.range-head output { font-family: var(--mono); font-size: .75rem; color: var(--ink-2); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; cursor: pointer; list-style: none; font-size: .9375rem; font-weight: 500; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s var(--ease); color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq details p { padding: 0 48px 22px 0; color: var(--muted); max-width: 70ch; font-size: .9rem; }

/* Billing: expandable charge groups */
.charges { display: grid; }
.charge + .charge, .charges > .charge-item { border-top: 1px solid var(--line); }
.charge summary { display: flex; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; list-style: none; font-size: .9rem; font-weight: 500; }
.charge summary::-webkit-details-marker { display: none; }
.charge summary:hover { background: var(--paper-2); }
.charge summary .icon { width: 15px; height: 15px; color: var(--muted); transition: transform .18s var(--ease); flex: none; }
.charge[open] summary .icon { transform: rotate(90deg); }
.charge-count { font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.charge-amt { font-family: var(--mono); font-size: .84rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.charge-items { padding: 2px 20px 12px 47px; display: grid; gap: 2px; }
.charge-item { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 6px 0; font-size: .84rem; }
.charge-items .charge-item + .charge-item { border-top: 1px dashed var(--line); }
.charge-item .charge-amt { color: var(--ink-2); }
.charges > .charge-item.is-pending { padding: 12px 20px 12px 47px; }
@media (max-width: 600px) { .charge summary { padding-inline: 16px; } .charge-items, .charges > .charge-item.is-pending { padding-left: 16px; padding-right: 16px; } }

/* ---------- Docs / prose ---------- */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr) 190px; gap: 48px; padding-block: 40px 96px; }
.docs-nav, .docs-toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.docs-nav h5, .docs-toc h5 { font-family: var(--mono); font-size: .6875rem; font-weight: 400; color: var(--faint); margin: 22px 0 8px 10px; }
.docs-nav h5:first-of-type { margin-top: 14px; }
.docs-nav a { display: block; padding: 5px 10px; border-radius: 6px; font-size: .84rem; color: var(--muted); }
.docs-nav a:hover { color: var(--ink); }
.docs-nav a.is-active { color: var(--ink); background: var(--paper-3); font-weight: 500; }
.docs-toc a { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
.docs-toc a.is-active { color: var(--ink); border-left-color: var(--ink); }
.docs-search { position: relative; }
.docs-search .icon { position: absolute; left: 10px; top: 10px; width: 15px; height: 15px; color: var(--faint); }
.docs-search .input { padding-left: 32px; height: 35px; font-size: .84rem; }
.prose { max-width: 720px; color: var(--ink-2); }
.prose > section + section { margin-top: 64px; padding-top: 52px; border-top: 1px solid var(--line); }
.prose h1 { font-size: 2.25rem; letter-spacing: -.035em; color: var(--ink); }
.prose h2 { font-size: 1.55rem; letter-spacing: -.03em; color: var(--ink); margin-bottom: 14px; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { font-size: 1.05rem; color: var(--ink); margin: 30px 0 10px; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose p, .prose ul, .prose ol { line-height: 1.75; margin-bottom: 16px; font-size: .9375rem; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose a:not(.btn) { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.prose a:not(.btn):hover { text-decoration-color: var(--ink); }
.prose :not(pre) > code { font-size: .82em; padding: 2px 6px; border-radius: 5px; background: var(--paper-3); border: 1px solid var(--line); color: var(--ink); }
.prose .code { margin: 20px 0 24px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: .875rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; color: var(--ink); }
.callout { display: flex; gap: 12px; padding: 13px 15px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--paper-2); font-size: .875rem; margin: 20px 0; }
.callout .icon { margin-top: 3px; color: var(--accent-ink); }
.callout-warn { background: var(--warn-wash); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.callout-warn .icon { color: var(--warn); }
.helpful { display: flex; align-items: center; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }

/* ---------- Status ---------- */
.uptime { display: flex; gap: 2px; height: 28px; }
.uptime i { flex: 1; min-width: 0; border-radius: 2px; background: #3fb072; transition: opacity .1s; }
.uptime i.warn { background: #e2a640; }
.uptime i.err { background: #ef4444; }
.uptime i:hover { opacity: .6; }
@media (max-width: 600px) { .uptime { gap: 1px; } .uptime i { border-radius: 1px; } }
.status-hero { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: var(--r-lg); background: var(--ok-wash); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.status-hero h2 { font-size: 1.1rem; color: var(--ink); letter-spacing: -.015em; }
.incident { padding: 22px 0; border-bottom: 1px solid var(--line); }
.incident h3 { font-size: .9375rem; }
.incident-update { display: grid; grid-template-columns: 150px 1fr; gap: 16px; margin-top: 12px; font-size: .875rem; }
.incident-update b { white-space: nowrap; }
.incident-update b { font-weight: 500; }

/* ---------- Changelog ---------- */
.entry { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; padding: 44px 0; border-bottom: 1px solid var(--line); }
.entry:first-child { padding-top: 0; }
.entry-date { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.entry h2 { font-size: 1.45rem; letter-spacing: -.03em; }
.entry .prose { margin-top: 14px; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.checkout-summary { position: sticky; top: calc(var(--header-h) + 24px); }
.checkout-step { padding: 22px; }
.checkout-step + .checkout-step { border-top: 1px solid var(--line); }
.checkout-step h2 { display: flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; margin-bottom: 16px; }
.checkout-step h2 .num { font-family: var(--mono); font-size: .6875rem; font-weight: 400; color: var(--muted); }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: .875rem; }
.sum-line .tnum { font-variant-numeric: tabular-nums; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; margin-top: 8px; border-top: 1px solid var(--line); }
.sum-total .amt { font-size: 1.6rem; font-weight: 600; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .checkout { grid-template-columns: minmax(0, 1fr); } .checkout-summary { position: static; } }

/* ---------- Auth ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }
.auth-form { display: flex; flex-direction: column; padding: 26px 40px; }
.auth-card { width: 100%; max-width: 360px; margin: auto; padding-block: 48px; }
.auth-card h1 { font-size: 1.75rem; letter-spacing: -.035em; }
.auth-side { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 40px 48px; background: var(--paper-2); border-left: 1px solid var(--line); color: var(--ink); }
.auth-side::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000, transparent 80%); -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000, transparent 80%);
}
.auth-side > * { position: relative; }
.auth-side .muted, .auth-side .step p { color: var(--muted); }
.auth-side .steps, .auth-side .step { border-color: var(--line); }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.pw-meter i { height: 3px; border-radius: 2px; background: var(--line-2); transition: background-color .2s; }
.pw-meter[data-score="1"] i:nth-child(-n+1) { background: var(--err); }
.pw-meter[data-score="2"] i:nth-child(-n+2) { background: #e2a640; }
.pw-meter[data-score="3"] i:nth-child(-n+3) { background: #7bb85a; }
.pw-meter[data-score="4"] i { background: var(--ok); }
.form-alert { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--err-wash); color: var(--err); font-size: .84rem; }
.form-alert .icon { margin-top: 2px; }
.form-alert.is-ok { background: var(--ok-wash); color: var(--ok); }

/* ---------- App shell (light, dense) ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; font-size: 14px; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 10px; border-right: 1px solid var(--line); background: var(--paper-2); overflow-y: auto; }
.ws { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--r-sm); }
.ws:hover { background: var(--paper-3); }
.ws-avatar { width: 22px; height: 22px; flex: none; border-radius: 6px; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 600; font-size: .6875rem; }
.ws-name { font-weight: 600; font-size: .84rem; letter-spacing: -.01em; line-height: 1.2; }
.ws-plan { font-size: .6875rem; color: var(--muted); }
.ws .icon { color: var(--faint); width: 14px; height: 14px; }
.side-group { margin-top: 14px; display: grid; gap: 1px; }
.side-label { padding: 0 9px 5px; font-size: .6875rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.side-link { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: var(--r-sm); font-size: .84rem; color: var(--ink-2); transition: background-color .12s, color .12s; }
.side-link:hover { background: var(--paper-3); color: var(--ink); }
.side-link[aria-current="page"] { background: var(--paper-3); color: var(--ink); font-weight: 500; }
.side-link .icon { width: 15px; height: 15px; color: var(--muted); }
.side-link[aria-current="page"] .icon { color: var(--ink); }
.side-link .ext { margin-left: auto; width: 12px; height: 12px; color: var(--faint); }
.side-link .count { margin-left: auto; font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.side-foot { margin-top: auto; padding-top: 10px; display: grid; gap: 1px; }
.side-foot .side-link { font-size: .78rem; color: var(--muted); padding: 5px 9px; }
.upgrade-card { margin: 8px 0; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: .78rem; }
.upgrade-card b { font-weight: 600; font-size: .8125rem; }
.user-row { display: flex; align-items: center; gap: 9px; padding: 8px 6px 2px; margin-top: 6px; border-top: 1px solid var(--line); }
.avatar { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--paper-3); color: var(--ink); display: grid; place-items: center; font-size: .6875rem; font-weight: 600; }
.user-row .who { min-width: 0; flex: 1; line-height: 1.25; }
.user-row .who div { font-size: .78rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .who span { font-size: .6875rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.app-main { min-width: 0; display: flex; flex-direction: column; background: var(--paper); }
.app-top { position: sticky; top: 0; z-index: 30; height: 52px; display: flex; align-items: center; gap: 12px; padding: 0 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.app-top .menu-btn { display: none; margin-left: -8px; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .84rem; color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { color: var(--line-2); }
.crumbs .cur { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); font-size: .8125rem; min-width: 190px; }
.search-btn:hover { border-color: var(--faint); }
.search-btn kbd { margin-left: auto; }
.app-content { width: 100%; max-width: 1180px; margin: 0; padding: 32px 32px 88px; } /* left-aligned so every page shares the top bar's edge */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 1.375rem; font-weight: 600; letter-spacing: -.025em; }
.page-head p { margin-top: 4px; color: var(--muted); font-size: .84rem; }
.scrim { display: none; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.stat { padding: 15px 18px; border-right: 1px solid var(--line); min-width: 0; }
.stat:last-child { border-right: 0; }
.stat .k { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); }
.stat .v { margin-top: 5px; font-size: 1.4rem; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .v small { font-size: .8125rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat .d { margin-top: 5px; font-size: .72rem; color: var(--muted); }
.meter { height: 5px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width .6s var(--ease); }
.meter.is-warn > span { background: var(--accent); }
.meter.is-over > span { background: var(--err); }
.empty { padding: 64px 24px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.empty-icon { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow-2); }
.empty-icon .icon { width: 20px; height: 20px; }
.empty h2 { font-size: 1.1rem; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }
.empty p { color: var(--muted); max-width: 44ch; font-size: .875rem; }
.svc-name { display: flex; align-items: center; gap: 11px; min-width: 0; }
.svc-icon { width: 28px; height: 28px; flex: none; border-radius: 7px; border: 1px solid var(--line); background: var(--paper-2); display: grid; place-items: center; }
.svc-icon .icon { width: 15px; height: 15px; color: var(--ink-2); }
.svc-name b { font-weight: 500; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-name span { font-family: var(--mono); font-size: .6875rem; color: var(--muted); }
.svc-type { font-size: .6875rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.svc-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: start; }
.svc-nav { position: sticky; top: 76px; }
.feed { display: grid; }
.feed-item { display: grid; grid-template-columns: 18px 1fr auto; gap: 11px; padding: 11px 18px; border-bottom: 1px solid var(--line); font-size: .8125rem; align-items: start; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--muted); }
.feed-item time { font-family: var(--mono); font-size: .6875rem; color: var(--muted); white-space: nowrap; margin-top: 2px; }
.event-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.event-ico .icon { width: 13px; height: 13px; }
.event-ico.ok { background: var(--ok); color: #fff; }
.event-ico.err { background: var(--err); color: #fff; }
.event-ico.run { background: var(--accent-wash); color: var(--accent-ink); }
.event-ico.neutral { background: var(--paper-3); color: var(--muted); }
.commit { font-family: var(--mono); font-size: .75rem; color: var(--accent-ink); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 3px; }
.kv { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0; font-size: .84rem; }
.kv dt { color: var(--muted); padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }
.log { background: var(--night); color: var(--night-text); border-radius: var(--r); border: 1px solid var(--night-line); font-family: var(--mono); font-size: .75rem; line-height: 1.8; height: 440px; overflow-y: auto; padding: 10px 0; }
.log-line { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; padding: 0 16px; }
.log-line:hover { background: var(--night-2); }
.log-line .ts { color: #6f6f78; user-select: none; }
.log-line .tx { white-space: pre-wrap; word-break: break-word; }
.log-line.err .tx { color: #fca5a5; } .log-line.warn .tx { color: #fcd34d; } .log-line.ok .tx { color: #6ee7a0; } .log-line.dim .tx { color: var(--night-muted); } .log-line.info .tx { color: #93c5fd; }
.log-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.chart { width: 100%; height: 130px; }
.chart .grid line { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .area { fill: var(--chart-area); }
.chart .line { fill: none; stroke: var(--ink); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.chart .line.acc { stroke: var(--accent); }
.chart text { font-family: var(--mono); font-size: 10px; fill: var(--faint); }
.wizard-steps { display: flex; gap: 8px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.wizard-step { display: inline-flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); }
.wizard-step b { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); font-size: .625rem; font-weight: 400; background: var(--surface); }
.wizard-step.is-on { color: var(--ink); font-weight: 500; }
.wizard-step.is-on b { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.wizard-step.is-done b { background: var(--paper-3); }
.wizard-sep { width: 22px; height: 1px; background: var(--line-2); }
.repo-list { max-height: 360px; overflow-y: auto; }
.repo { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.repo:last-child { border-bottom: 0; }
.repo .mono { color: var(--muted); font-size: .6875rem; }
.env-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.4fr) auto; gap: 8px; align-items: center; }
.secret { font-family: var(--mono); font-size: .78rem; letter-spacing: .08em; }
.copy-field { display: flex; gap: 8px; }
.copy-field .input { font-family: var(--mono); font-size: .78rem; }
.invoice-doc { max-width: 820px; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 52px; }
.invoice-doc table { width: 100%; border-collapse: collapse; margin-top: 40px; font-size: .875rem; }
.invoice-doc th { text-align: left; font-family: var(--mono); font-size: .6875rem; color: var(--muted); font-weight: 400; padding: 10px 0; border-bottom: 1px solid var(--ink); }
.invoice-doc td { padding: 13px 0; border-bottom: 1px solid var(--line); }
.invoice-doc .num { text-align: right; font-variant-numeric: tabular-nums; }
.invoice-total { margin-left: auto; width: 280px; margin-top: 20px; }
.invoice-total div { display: flex; justify-content: space-between; padding: 6px 0; font-size: .875rem; }
.invoice-total .grand { border-top: 1px solid var(--ink); margin-top: 6px; padding-top: 12px; font-weight: 600; font-size: 1.05rem; }
.sandbox-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 5px; background: var(--warn-wash); color: var(--warn); font-family: var(--mono); font-size: .6875rem; }

/* ---------- Preview (simulated deployed app) ---------- */
.preview-body { min-height: 100vh; display: grid; place-items: center; background: #0a0a0a; color: #f1f1f1; font-family: var(--sans); padding: 24px; }
.preview-card { width: min(560px, 100%); border: 1px solid #262626; border-radius: 14px; padding: 34px; background: #111; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .docs { grid-template-columns: 210px minmax(0, 1fr); }
  .docs-toc { display: none; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans > .plan:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .section { padding-block: 80px; }
  .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .bento > * { grid-column: span 6; }
  .feature-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .estimator { grid-template-columns: minmax(0, 1fr); }
  .estimator-out { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
  .mock { grid-template-columns: minmax(0, 1fr); }
  .mock-side { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 70; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--shadow-pop); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 12, .35); }
  .app-top { padding: 0 16px; }
  .app-top .menu-btn { display: inline-flex; }
  .search-btn { min-width: 0; }
  .search-btn .label, .search-btn kbd, .app-top .hide-sm, .app-top-right .btn .label { display: none; }
  .app-content { padding: 22px 16px 64px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .svc-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .svc-nav { position: static; }
  .svc-nav .tabs[aria-orientation="vertical"] { flex-direction: row; overflow-x: auto; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
  .svc-nav .tab-label { display: none; }
  .svc-nav .tabs[aria-orientation="vertical"] .tab { width: auto; }
  .entry { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .entry-date { position: static; }
}
@media (max-width: 820px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-nav { position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--r); padding: 4px 8px 12px; background: var(--surface); }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .auth-form { padding: 24px; }
  .mock-grid { grid-template-columns: minmax(0, 1fr); }
  .region-list { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { border-bottom: 0; padding-bottom: 0; }
  .invoice-doc { padding: 28px; }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 24px; }
  .section { padding-block: 64px; }
  .hero, .hero-center { padding-top: 56px; }
  .plans, .cells, .feature-list, .feature-list.cols-2 { grid-template-columns: minmax(0, 1fr); }
  .tile { padding: 22px; }
  .env-row { grid-template-columns: minmax(0, 1fr); }
  .incident-update { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .toasts { left: 16px; right: 16px; }
  .faq details p { padding-right: 0; }
}

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .no-print, .sidebar, .app-top, [data-site-header], [data-site-footer], .toasts { display: none !important; }
  body, .app-main { background: #fff; }
  /* Print on white: switch the dark tokens back to light ones. */
  .theme-dark { --paper: #fff; --paper-2: #f7f7f8; --paper-3: #efeff1; --surface: #fff; --ink: #111113; --ink-2: #3b3b40; --muted: #6b6b73; --faint: #a1a1aa; --line: #ebebee; --line-2: #dcdce0; --ok: #12814b; --warn: #9a5800; color-scheme: light; }
  .app { display: block; }
  .app-content { padding: 0; max-width: none; }
  .invoice-doc { border: 0; padding: 0; }
}

/* ---------- Dashboard: workspace header and environment sections ---------- */
.ws-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 28px; margin-bottom: 36px; border-bottom: 1px solid var(--line); }
.ws-head h1 { display: flex; align-items: center; gap: 10px; font-size: 2rem; letter-spacing: -.035em; margin-top: 8px; }
.ws-head p { margin-top: 6px; }
.eyebrow-mono { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ws-gear { color: var(--muted); display: inline-grid; place-items: center; }
.ws-gear:hover { color: var(--ink); }
.env-section + .env-section { margin-top: 56px; }
.env-head { display: grid; gap: 14px; }
.env-head h2 { font-size: 1.25rem; letter-spacing: -.02em; }
.env-tabs { display: inline-flex; width: fit-content; border: 1px solid var(--line-2); border-radius: var(--r-sm); overflow: hidden; }
.env-tabs button { background: none; border: 0; padding: 6px 12px; font-size: .84rem; color: var(--ink-2); }
.env-tabs button + button { border-left: 1px solid var(--line-2); }
.env-tabs button:hover { background: var(--paper-3); }
.env-tabs button[aria-pressed="true"] { background: var(--accent-wash); color: var(--ink); font-weight: 500; box-shadow: inset 0 0 0 1px var(--accent); }
.env-search { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 0 14px; height: 40px; border: 1px solid var(--line-2); border-radius: var(--r-sm); color: var(--muted); }
.env-search:focus-within { border-color: var(--faint); }
.env-search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--ink); font-size: .875rem; }
.env-section .table-wrap { margin-top: 12px; }
.env-table th { font-family: var(--mono); font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; }
.env-table td { padding-block: 12px; }
.count-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--paper-3); color: var(--ink-2); font-size: .6875rem; }
.env-name { display: flex; align-items: center; gap: 10px; }
.env-name .icon { color: var(--muted); }
.env-name a { font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.env-name a:hover { text-decoration-color: var(--ink); }
.runtime-chip { display: inline-block; padding: 3px 8px; border-radius: 4px; background: var(--paper-3); font-size: .75rem; font-weight: 500; white-space: nowrap; }
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-sm); color: var(--muted); }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary:hover, .row-menu[open] summary { background: var(--paper-3); color: var(--ink); }
.row-menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; min-width: 150px; padding: 4px; display: grid; background: var(--paper-2); border-radius: var(--r-sm); box-shadow: var(--shadow-pop); text-align: left; }
.row-menu-pop a { padding: 7px 10px; border-radius: 4px; font-size: .84rem; }
.row-menu-pop a:hover { background: var(--paper-3); }
.env-new { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; padding: 12px 8px; font-size: .875rem; color: var(--ink-2); }
.env-new:hover { color: var(--ink); }

/* Home: pricing teaser */
.pricing-teaser .h3 { display: flex; align-items: center; gap: 8px; }
.teaser-price { display: block; margin-top: 10px; font-size: 1.5rem; font-weight: 500; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.teaser-price small { font-size: .8125rem; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.pricing-teaser .cell p { margin-top: 8px; }
