/* Self-hosted latin subsets (commit 4). Vendored from Google Fonts so the site
   has no third-party font dependency: this deletes the CSP bug class that broke
   /blog, /reset-password and /404 rather than patching it by allowlist.
   All three are variable fonts, so one file covers every weight in use. */
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  src: url('../fonts/newsreader-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ==========================================================================
   SeaWeb clean theme — shared by product / pricing / docs / about / legal.
   Aligned with index.html Exa-light chrome (Newsreader + Instrument Sans,
   quiet black buttons, no neubrutal shadow-press). Homepage stays self-
   contained; this file is the one source of truth for every other clean page.
   shell.css still owns nav structure + cookie banner scaffolding.
   ========================================================================== */

:root {
  color-scheme: light;
  --font-body: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Newsreader', 'Times New Roman', Georgia, serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  --sw-glow: #7ED2FC;
  --sw-glow-rgb: 126, 210, 252;

  --bg: #ffffff;
  --bg-soft: #f7f7f5;
  --surface: #ffffff;
  --fg: #0a0a0a;
  --muted: #6b6b6b;
  --faint: #9a9a9a;
  --meta: #767676;
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 14px;
  --r-pill: 999px;
  --border: #ebebea;
  --border-strong: #d9d9d6;
  --accent: #0a0a0a;
  --accent-soft: #f0f0ee;

  --btn-bg: #0a0a0a;
  --btn-fg: #ffffff;
  --grid-dot: transparent;

  --radius: 12px;
  --maxw: 1080px;
}

/* Forced light chrome by default (matches home). Explicit dark still works. */

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0f; --bg-soft: #161616; --surface: #181818; --fg: #f2f2f0;
  --muted: #9a9a96; --faint: #6e6e6a; --border: #2a2a28; --border-strong: #3a3a36;
  --accent: #f2f2f0; --accent-soft: #242422; --btn-bg: #f2f2f0; --btn-fg: #0f0f0f;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff; --bg-soft: #f7f7f5; --surface: #ffffff; --fg: #0a0a0a;
  --muted: #6b6b6b; --faint: #9a9a9a; --border: #ebebea; --border-strong: #d9d9d6;
  --accent: #0a0a0a; --accent-soft: #f0f0ee; --btn-bg: #0a0a0a; --btn-fg: #ffffff;
}

html {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  font-family: var(--font-body); letter-spacing: -0.011em;
  background: var(--bg); color: var(--fg);
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

[layout="stack"] {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
/* Contain replaced media so long SVGs/imgs never blow the page */
img, svg, video, canvas { max-width: 100%; height: auto; }

.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;
}

/* Exa-quiet chrome — kill shell.css neubrutal shadow-press */
.btn {
  border-radius: 10px; font-weight: 500; letter-spacing: -0.01em;
  padding: 0.65rem 1.15rem;
  transition: background 0.15s ease, opacity 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: none; box-shadow: none; opacity: 0.88; }
.btn:active { transform: none; opacity: 0.78; box-shadow: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-ghost {
  border: 1px solid var(--border-strong); color: var(--fg); background: var(--surface);
}
.btn-ghost:hover { border-color: var(--fg); background: var(--surface); opacity: 1; }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible {
  outline: 2px solid var(--fg); outline-offset: 2px;
}
.hamburger {
  border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: none;
  background: transparent; color: var(--fg); min-height: 2.75rem; min-width: 2.75rem;
}
.hamburger:hover, .hamburger:active { transform: none; box-shadow: none; background: var(--accent-soft); }
.site-nav {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.site-nav.nav-open .nav-links {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  box-shadow: none;
}
.brand { font-weight: 600; letter-spacing: -0.03em; }
.nav-links { font-size: 0.875rem; }
.nav-links a, .nav-sign { color: var(--muted); }
.nav-links a::after, .nav-sign::after { display: none; }
.nav-links a:hover, .nav-sign:hover { color: var(--fg); }
.nav-actions .btn-primary { padding: 0.5rem 0.95rem; font-size: 0.8125rem; border-radius: 10px; }

#cookie-banner {
  border-top: 1px solid var(--border); background: var(--surface);
  color: var(--fg); box-shadow: none;
}
#cookie-banner p { color: var(--muted); }
#cookie-banner .btn, #cookie-banner .btn-primary, #cookie-banner .btn-ghost {
  box-shadow: none; border-radius: 10px; font-weight: 500;
}
#cookie-banner .btn-ghost {
  background: transparent; border: 1px solid var(--muted); color: var(--fg);
}
#cookie-banner .btn-ghost:hover {
  border-color: var(--fg); background: var(--accent-soft); color: var(--fg);
}
#cookie-preferences .cookie-panel {
  border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: none;
}

/* Soften shell page-main / cards when clean theme is loaded (legal, contact) */
.page-main {
  /* contain wide <pre><code> blocks (connect/bot/publisher) on mobile */
  overflow-x: clip; min-width: 0; box-sizing: border-box;
}
.page-main h1 { font-family: var(--font-display); font-weight: 500; }
.page-main pre {
  max-width: 100%; overflow-x: auto; box-sizing: border-box;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 0.9rem 1rem; background: var(--bg-soft);
  font-size: 0.8rem; line-height: 1.55;
}
.page-main pre code {
  display: block; max-width: 100%; white-space: pre; word-break: normal;
}
.card, .price-box, .qrow, .chatcard, .resultcard {
  border: 1px solid var(--border); box-shadow: none; border-radius: 12px;
}
.card:hover { transform: none; box-shadow: none; }
.grid-bg { background-image: none; }

/* Soften shell status chips + partner/travel chrome leftovers */
.status {
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 500;
  letter-spacing: -0.01em; text-transform: none;
  border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: none;
  padding: 0.2rem 0.55rem;
}
.status.in-progress { background: var(--accent-soft); }
.status.shipped { background: #eef8f1; }
.status.planned { background: var(--bg-soft); }
.status.future { background: var(--bg-soft); color: var(--muted); }
.closer {
  border: none; box-shadow: none; background: var(--bg-soft);
  border-radius: 0; border-top: 1px solid var(--border);
}
.btn-white {
  border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: none; font-weight: 500;
}
.btn-white:hover, .btn-white:active { transform: none; box-shadow: none; }
.stepn .n, .stepsline .n {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em;
}
.faq dt { font-weight: 600; }
.chatcard .who {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
  letter-spacing: -0.01em; text-transform: none;
}
.stepn { border-left: 2px solid var(--border-strong); }
.bstatus {
  font-size: 0.72rem; font-weight: 500; letter-spacing: -0.01em; text-transform: none;
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.15rem 0.55rem;
}
.bstatus.st-req { background: var(--accent-soft); }
.bstatus.st-conf { background: #eef8f1; }
.ex-chip, .chip-verified {
  border: 1px solid var(--border-strong); border-radius: 999px; box-shadow: none;
  font-family: var(--font-body); font-weight: 500; letter-spacing: -0.01em; text-transform: none;
}
.requestedline, .confirmline {
  border: 1px solid var(--border); border-radius: 10px; box-shadow: none;
}
.price-box .amt { font-weight: 500; }
.proofline { font-weight: 600; }

.sw-wrap {
  max-width: var(--maxw);
  width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  padding-left: max(clamp(1.25rem, 5vw, 2rem), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(1.25rem, 5vw, 2rem), env(safe-area-inset-right, 0px));
  box-sizing: border-box;
  overflow-x: clip;
}

/* ---------- page hero (interior pages) ---------- */
.sw-page { padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 5vw, 3rem); }
.sw-eyebrow {
  /* sentence-case quiet label — no ALL-CAPS mono chip */
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 500;
  letter-spacing: -0.01em; text-transform: none; color: var(--muted); margin-bottom: 1rem;
}
.sw-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem); line-height: 1.08;
  letter-spacing: -0.03em; font-weight: 500; max-width: 22ch; margin: 0;
}
.sw-page .sw-lede {
  margin-top: 1.1rem; max-width: 56ch;
  font-size: clamp(1rem, 1.6vw, 1.125rem); line-height: 1.6; color: var(--muted);
}

/* ---------- alternating feature rows (product) ---------- */
.sw-features { border-top: 1px solid var(--border); }
.sw-feature { display: grid; gap: 1.75rem; align-items: center; padding: clamp(2.5rem, 6vw, 4rem) 0; }
.sw-feature + .sw-feature { border-top: 1px solid var(--border); }
@media (min-width: 900px) {
  .sw-feature { grid-template-columns: 1.05fr 0.95fr; gap: clamp(2.5rem, 6vw, 5rem); }
  .sw-feature--flip .sw-feature-text { order: 2; }
}
.sw-feature h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem); font-weight: 500;
  letter-spacing: -0.025em; line-height: 1.2; margin-bottom: 0.8rem; max-width: 22ch;
}
.sw-feature p { color: var(--muted); line-height: 1.65; max-width: 46ch; }
.sw-feature p + p { margin-top: 0.75rem; }

/* mock panels */
.sw-viz {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.15rem 1.25rem;
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted);
  overflow: hidden;
}
.sw-viz-cmd {
  display: inline-flex; align-items: center; gap: 0.1rem;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 0.3rem 0.55rem; color: var(--fg); background: var(--bg);
}
.sw-viz-arg { display: inline-block; width: 3.2rem; height: 0.5rem; border-radius: 3px; background: var(--border-strong); }
.sw-viz-meta { margin: 0.95rem 0 0.7rem; color: var(--meta); letter-spacing: 0.04em; }
.sw-viz-row { padding: 0.6rem 0; border-top: 1px solid var(--border); }
.sw-viz-head { display: flex; align-items: center; gap: 0.5rem; }
.sw-viz-tick {
  flex-shrink: 0; width: 1rem; height: 1rem; border-radius: 4px;
  background: var(--fg); color: var(--bg); font-size: 0.6rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.sw-bar { display: block; height: 0.5rem; border-radius: 3px; background: var(--border); }
.sw-viz-head .sw-bar { flex: 1; }
.sw-viz-chunks { display: flex; gap: 0.35rem; margin: 0.5rem 0 0 1.5rem; }
.sw-viz-chunks .sw-bar { height: 0.45rem; }
.sw-viz-label { margin: 0.55rem 0 0 1.5rem; color: var(--meta); font-size: 0.66rem; }
.sw-viz-url {
  display: block; border: 1px solid var(--border); border-radius: 6px;
  padding: 0.4rem 0.6rem; color: var(--fg); background: var(--bg);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sw-viz-arrow { text-align: center; color: var(--meta); margin: 0.6rem 0; }
.sw-viz-doc { border: 1px solid var(--border); border-radius: 8px; padding: 0.85rem; background: var(--bg); }
.sw-viz-doc .sw-viz-title { color: var(--fg); margin-bottom: 0.6rem; }
.sw-viz-doc .sw-bar + .sw-bar { margin-top: 0.42rem; }
.sw-viz-pill {
  display: inline-block; border: 1px solid var(--border); border-radius: 999px;
  padding: 0.25rem 0.6rem; color: var(--fg); background: var(--bg); margin: 0 0.25rem 0.35rem 0;
}
.sw-viz-pill--on { border-color: transparent; background: var(--accent-soft); color: var(--accent); }

/* ---------- code sample ---------- */
.sw-code {
  margin: 0; padding: 1.15rem 1.25rem; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.7; color: var(--muted);
}
.sw-code b { color: var(--fg); font-weight: 500; }

/* ---------- generic card grid ---------- */
.sw-cards { display: grid; gap: 1rem; margin-top: clamp(1.75rem, 4vw, 2.5rem); }
@media (min-width: 760px) { .sw-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sw-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.4rem 1.5rem;
}
.sw-card h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
.sw-card p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.sw-card a { color: inherit; }

/* ---------- pricing ---------- */
.sw-usecases {
  margin: 1.5rem 0 0;
  max-width: 52ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.sw-plans { display: grid; gap: 1.25rem; margin: clamp(2rem, 5vw, 3rem) 0 0; align-items: start; }
@media (min-width: 700px) { .sw-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  /* Four live plans: Free, Pay as you go, Growth, Internal.
     minmax(0, 1fr) inside the wrap — no full-bleed breakout. The old
     margin-left:50% / translateX(-50%) strip was clipped to the wrap's box
     by .sw-wrap's overflow-x: clip, so the outer cards were unreachable at
     every viewport. Equal tracks always fit; cards are ~255px at the
     1080px wrap cap. */
  .sw-plans { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Equalize card heads so CTA buttons sit on one line. */
  .sw-plan-head { min-height: 205px; }
}
.sw-plan { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.5rem; }
.sw-plan-tier {
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
  letter-spacing: -0.01em; text-transform: none; color: var(--muted); margin-bottom: 0.55rem;
}
.sw-plan-head {
  border: 1px solid var(--border); border-radius: 12px; padding: 1.1rem 1.2rem 1.2rem;
  margin-bottom: 1.1rem; background: var(--bg);
}
.sw-plan-head--tint { background: var(--accent-soft); border-color: transparent; }
.sw-plan h2 { font-family: var(--font-display); font-size: clamp(1.45rem, 2.6vw, 1.85rem); font-weight: 500; letter-spacing: -0.03em; margin: 0 0 0.4rem; }
.sw-plan-sub { color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.sw-plan .btn { display: flex; justify-content: center; width: 100%; margin-bottom: 1.2rem; }
.sw-plan-kicker {
  font-size: 0.8rem; color: var(--meta); margin: 0 0 0.75rem;
  padding-top: 1.1rem; border-top: 1px solid var(--border);
}
.sw-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.sw-check li {
  position: relative; padding-left: 1.5rem;
  font-size: 0.9rem; line-height: 1.5; color: var(--fg);
}
.sw-check li::before {
  content: "\2713"; position: absolute; left: 0; top: 0.05rem;
  color: var(--accent); font-size: 0.85rem;
}
.sw-check li small { display: block; color: var(--meta); font-size: 0.8rem; }
.sw-plan-note {
  margin-top: 1.1rem; padding: 0.85rem 1rem; border: 1px solid var(--border);
  border-radius: 8px; background: var(--bg); font-size: 0.85rem; color: var(--muted); line-height: 1.55;
}
.sw-plan-note b { color: var(--fg); font-weight: 500; }

/* ---------- section band ---------- */
.sw-band { border-top: 1px solid var(--border); padding: clamp(2.5rem, 6vw, 4rem) 0; }
.sw-band h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 500;
  letter-spacing: -0.028em; margin: 0 0 0.75rem; max-width: 26ch;
}
.sw-band > .sw-wrap > p { color: var(--muted); line-height: 1.65; max-width: 62ch; }

/* ---------- FAQ ---------- */
.sw-faq { display: grid; gap: 0; margin-top: 1.5rem; border-top: 1px solid var(--border); }
.sw-faq div { padding: 1.15rem 0; border-bottom: 1px solid var(--border); }
.sw-faq h3 { font-family: var(--font-display); font-size: 0.98rem; font-weight: 500; margin: 0 0 0.4rem; }
.sw-faq p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; max-width: 68ch; }

/* ---------- docs prose ---------- */
.sw-prose { padding-bottom: clamp(3rem, 7vw, 5rem); }
.sw-prose h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem); font-weight: 500;
  letter-spacing: -0.03em; margin: clamp(2.5rem, 7vw, 4rem) 0 0.75rem;
}
.sw-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.55rem); font-weight: 500; letter-spacing: -0.025em;
  margin: 2.75rem 0 0.85rem; padding-top: 2rem; border-top: 1px solid var(--border);
}
.sw-prose h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 500; margin: 1.9rem 0 0.6rem; }
.sw-prose p, .sw-prose li { color: var(--muted); line-height: 1.7; }
.sw-prose p { margin: 0.8rem 0; max-width: 74ch; }
.sw-prose ul { margin: 0.8rem 0; padding-left: 1.3rem; }
.sw-prose li { margin: 0.4rem 0; }
.sw-prose li strong, .sw-prose p strong { color: var(--fg); font-weight: 500; }
.sw-prose a { color: var(--accent); text-decoration: none; }
.sw-prose a:hover { text-decoration: underline; }
.sw-prose em { color: var(--fg); }
.sw-prose code {
  font-family: var(--font-mono); font-size: 0.84em; color: var(--fg);
  background: var(--accent-soft); border-radius: 4px; padding: 0.1em 0.35em;
}
.sw-prose pre {
  margin: 1rem 0; padding: 1.05rem 1.2rem; overflow-x: auto;
  max-width: 100%;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.65; color: var(--fg);
  -webkit-overflow-scrolling: touch;
}
.sw-prose pre code {
  background: transparent; padding: 0; color: inherit; font-size: inherit;
  display: block; max-width: 100%; white-space: pre; word-break: normal;
}
.sw-prose table, table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
  line-height: 1.55;
}
.sw-prose th {
  text-align: left; font-family: var(--font-body); font-size: 0.78rem;
  letter-spacing: -0.01em; text-transform: none; font-weight: 500;
  color: var(--muted); padding: 0.55rem 0.9rem 0.55rem 0;
  border-bottom: 1px solid var(--border-strong);
}
.sw-prose td { padding: 0.65rem 0.9rem 0.65rem 0; border-bottom: 1px solid var(--border); color: var(--muted); vertical-align: top; }
.sw-prose td:first-child, .sw-prose th:first-child { padding-left: 0; }
.sw-prose .sw-table-scroll { overflow-x: auto; }
.sw-prose .note {
  border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 6px; background: var(--surface); padding: 0.8rem 1rem;
  font-size: 0.88rem;
}
/* docs status cards reuse .sw-card via .card-grid markup */
.sw-prose .card-grid { display: grid; gap: 1rem; margin: 1.25rem 0; padding: 0; }
@media (min-width: 760px) { .sw-prose .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sw-prose .card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.2rem 1.3rem; box-shadow: none; transform: none;
}
.sw-prose .card:hover { box-shadow: none; transform: none; }
.sw-prose .card h3 { margin: 0.35rem 0 0.4rem; }
.sw-prose .card p { font-size: 0.9rem; margin: 0; max-width: none; }
.sw-prose .status {
  display: inline-block; font-family: var(--font-body); font-size: 0.72rem;
  letter-spacing: -0.01em; text-transform: none; border-radius: 6px;
  padding: 0.2rem 0.55rem; border: 1px solid var(--border-strong); color: var(--muted);
  font-weight: 500;
}
.sw-prose .status.shipped { color: var(--fg); border-color: transparent; background: var(--accent-soft); }

/* ---------- about ---------- */
.sw-founders { display: grid; gap: 1rem; margin-top: 1.5rem; justify-content: start; }
@media (min-width: 720px) { .sw-founders { grid-template-columns: repeat(2, minmax(0, 340px)); } }
.sw-founder {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.4rem 1.5rem; aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
@media (max-width: 600px) {
  .sw-founder { aspect-ratio: auto; min-height: 280px; }
}

/* Legal & draft notice styling */
.draft-notice {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--fg);
  border-radius: 8px;
  background: var(--bg-soft);
  padding: 0.85rem 1rem;
  margin: 1rem 0 1.25rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--fg);
}
.draft-notice strong {
  font-weight: 600;
  color: var(--fg);
}
.sw-founder .sw-headshot {
  width: 160px; height: 160px; border-radius: 50%; object-fit: cover;
  border: 1px solid var(--border); margin-bottom: 1.1rem; display: block;
}
.sw-founder h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 500; margin: 0 0 0.15rem; }
.sw-founder .sw-role {
  font-family: var(--font-body); font-size: 0.8rem; letter-spacing: -0.01em;
  text-transform: none; color: var(--muted); margin-bottom: 0.7rem; font-weight: 500;
}
.sw-founder p { color: var(--muted); font-size: 0.92rem; line-height: 1.65; }

/* ---------- close + footer (same as homepage) ---------- */
.sw-close { padding: clamp(3rem, 8vw, 5rem) 0; border-top: 1px solid var(--border);  background: var(--bg-soft); }
.sw-close h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.35rem); font-weight: 500; letter-spacing: -0.03em; max-width: 22ch;
}
.sw-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.75rem; }

.sw-footer { border-top: 1px solid var(--border); padding: 2.5rem 0 3rem; }
.sw-footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
@media (min-width: 720px) { .sw-footer-grid { grid-template-columns: repeat(4, 1fr); } }
.sw-footer h3 {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--meta); font-weight: 400; margin-bottom: 0.85rem;
}
.sw-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; font-size: 0.875rem; }
.sw-footer a { color: var(--muted); }
.sw-footer a:hover { color: var(--fg); }
.sw-colophon { margin-top: 2.5rem; font-size: 0.8rem; color: var(--meta); }

/* ---------- docs layout (sidebar + content) ---------- */
.sw-docs {
  display: grid; gap: 2rem; padding: clamp(1.5rem, 4vw, 2.5rem) 0 clamp(3rem, 7vw, 5rem);
  /* minmax(0,1fr): stop wide <pre>/tables from blowing the grid past the viewport */
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
@media (min-width: 900px) { .sw-docs { grid-template-columns: 220px minmax(0, 1fr); gap: 3.5rem; } }
.sw-side { font-size: 0.875rem; min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.sw-docs > * { min-width: 0; max-width: 100%; }
.sw-docs .sw-prose { min-width: 0; max-width: 100%; overflow-x: clip; }
.sw-prose-body { min-width: 0; max-width: 100%; }
@media (min-width: 900px) {
  .sw-side { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; }
}
.sw-side h4 {
  font-family: var(--font-body); font-size: 0.75rem; letter-spacing: -0.01em;
  text-transform: none; color: var(--muted); font-weight: 500;
  margin: 1.4rem 0 0.5rem;
}
.sw-side h4:first-child { margin-top: 0; }
.sw-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.1rem; }
.sw-side a {
  display: block; padding: 0.32rem 0.6rem; border-radius: 6px;
  color: var(--muted); text-decoration: none;
}
.sw-side a:hover { color: var(--fg); background: var(--accent-soft); }
.sw-side a.on { color: var(--fg); background: var(--accent-soft); font-weight: 500; }
.sw-side .sw-side-sub { margin: 0 0 0.35rem 0.9rem; border-left: 1px solid var(--border); padding-left: 0.35rem; }
/* Exa-style collapsible groups: native <details>, no JS. The section holding
   the current page ships with `open`; the rest start collapsed. */
.sw-side-acc > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.32rem 0.6rem; border-radius: 6px;
  color: var(--fg); font-weight: 500;
}
.sw-side-acc > summary::-webkit-details-marker { display: none; }
.sw-side-acc > summary:hover { background: var(--accent-soft); }
.sw-side-acc > summary::after {
  content: ""; flex-shrink: 0; width: 0.4em; height: 0.4em; margin-right: 0.25rem;
  border-right: 1.5px solid var(--faint); border-bottom: 1.5px solid var(--faint);
  transform: rotate(-45deg);            /* › closed */
  transition: transform 0.15s ease;
}
.sw-side-acc[open] > summary::after { transform: rotate(45deg); }  /* ⌄ open */

/* nowrap + flex:1 titleblock: the button sits top-right beside the title on
   every page, instead of wrapping below whenever a subtitle runs long. */
.sw-pagehead {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 0.5rem;
}
.sw-pagehead .sw-titleblock { flex: 1; min-width: 0; }
.sw-crumb {
  font-family: var(--font-body); font-size: 0.8rem; letter-spacing: -0.01em;
  color: var(--muted); text-transform: none; margin-bottom: 0.6rem; display: block; font-weight: 500;
}
.sw-docs .sw-prose h1 { margin: 0 0 0.5rem; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.sw-docs .sw-prose h2:first-of-type { border-top: 0; padding-top: 0.5rem; }
.sw-titleblock { min-width: 0; }
.sw-copy {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.4rem;
  font: inherit; font-size: 0.82rem; font-weight: 500; color: var(--fg);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 0.45rem 0.8rem; cursor: pointer; margin-top: 0.35rem;
}
.sw-copy:hover { background: var(--accent-soft); }
.sw-copy[data-done] { color: var(--accent); border-color: transparent; background: var(--accent-soft); }
.sw-next {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.sw-next a { color: var(--accent); text-decoration: none; }
.sw-next a:hover { text-decoration: underline; }

/* ---------- auth (signin) ----------
   shell.css owns the auth/dash layout; this just rounds and re-tones it
   to match the clean pages. Dashboard gets its real redesign later. */
.auth-main { padding-top: clamp(3rem, 9vw, 5rem); }
.auth-card { border-radius: var(--radius); background: var(--surface); }
.auth-title { letter-spacing: -0.03em; }
.auth-sub { line-height: 1.6; }
.auth-card input { border-radius: 6px; }
.auth-card label {
  font-size: 0.8rem; text-transform: none; letter-spacing: -0.01em;
  color: var(--muted); font-weight: 500;
}
.auth-google { border-color: var(--border-strong); }
.auth-toggle a { color: var(--accent); font-weight: 500; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }
.dash-card, .dash-key-reveal { border-radius: var(--radius); background: var(--surface); }
.dash-code pre { border-radius: 6px; }

/* ---------- dashboard app (dashboard.html) ---------- */
.dpg { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.dpg-side {
  border-right: 1px solid var(--border); padding: 1.1rem 0.9rem;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 0.15rem;
}
.dpg-brand { font-weight: 600; color: var(--fg); text-decoration: none; font-size: 1.02rem; padding: 0.3rem 0.55rem 1rem; display: block; }
.dpg-side-label {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--meta); margin: 0.9rem 0.55rem 0.35rem;
}
.dpg-nav {
  display: block; padding: 0.42rem 0.55rem; border-radius: 6px; color: var(--muted);
  text-decoration: none; font-size: 0.9rem;
}
.dpg-nav:hover { color: var(--fg); background: var(--accent-soft); }
.dpg-nav-active { color: var(--fg); background: var(--accent-soft); font-weight: 500; }
.dpg-side-foot { margin-top: auto; padding: 0.55rem; display: grid; gap: 0.6rem; }
.dpg-user { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); word-break: break-all; }
.dpg-main { padding: clamp(1.25rem, 3vw, 2.25rem) clamp(1.25rem, 3.5vw, 3rem); width: 100%; margin: 0 auto; }

/* accent (blue) action buttons — the playground/hero "go" actions, Exa-style */
.dpg-qbar .btn-primary, .pg-run, #mv-create {
  background: var(--accent); border: 0; color: #fff;
}
.dpg-qbar .btn-primary:hover, .pg-run:hover, #mv-create:hover { opacity: 0.88; }

:root[data-theme="dark"] .dpg-qbar .btn-primary, :root[data-theme="dark"] .pg-run, :root[data-theme="dark"] #mv-create { color: #0f1115; }
:root[data-theme="light"] .dpg-qbar .btn-primary, :root[data-theme="light"] .pg-run, :root[data-theme="light"] #mv-create { color: #fff; }

.dpg-gate { max-width: 420px; margin: 14vh auto 0; text-align: center; display: grid; gap: 0.9rem; justify-items: center; }
.dpg-gate[hidden] { display: none; }
.dpg-gate h1 { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -0.02em; }
.dpg-gate p { color: var(--muted); line-height: 1.6; }

.dpg-hero {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 85%);
  padding: clamp(1.5rem, 4vw, 2.75rem); text-align: center;
}
.dpg-hero h1 { font-family: var(--font-display); font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: -0.03em; }
.dpg-hero > p { color: var(--muted); margin-top: 0.5rem; }
.dpg-qbar { display: flex; gap: 0.5rem; max-width: 620px; margin: 1.4rem auto 0; }
.dpg-qbar input {
  flex: 1; min-width: 0; font: inherit; font-size: 0.95rem; padding: 0.7rem 1rem;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--fg);
}
.dpg-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1rem; }
/* Dashboard try-one chips only — marketing strips are plain .sw-usecases text. */
button.sw-uc {
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 0.35rem 0.7rem;
  background: var(--surface); cursor: pointer;
}
button.sw-uc:hover { border-color: var(--accent); color: var(--accent); }
a.sw-card { text-decoration: none; color: inherit; }
.dpg-endpoints { margin-top: 1.5rem; }
.dpg-view .dash-card { margin-top: 1.5rem; }
.dash-key-vertical { margin-bottom: 1rem; }
.dash-key-vertical label { display: block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.35rem; }
.dash-key-vertical select, .dpg-controls select, .dpg-field select {
  font: inherit; font-size: 0.85rem; padding: 0.5rem 0.6rem; border: 1px solid var(--border-strong);
  border-radius: 6px; background: var(--surface); color: var(--fg);
}
.dpg-field select { width: 100%; }
.dash-client-hint a { color: var(--accent); }

/* playground */
.dpg-play { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 1.75rem; align-items: start; }
.dpg-controls h1, .dpg-view > h1 { font-size: 1.65rem; letter-spacing: -0.025em; }
.dpg-sub { color: var(--muted); font-size: 0.92rem; line-height: 1.65; margin: 0.5rem 0 1.6rem; }
.dpg-controls label { margin-top: 1.2rem; }
.dpg-controls label:first-of-type { margin-top: 0; }
.dpg-modes { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.1rem; }
.dpg-mode {
  font: inherit; font-size: 0.82rem; padding: 0.34rem 0.8rem; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--muted);
}
.dpg-mode[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.dpg-controls label {
  display: block; font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.35rem;
}
.pg-q {
  width: 100%; font-family: var(--font-mono); font-size: 0.85rem; line-height: 1.55;
  padding: 0.65rem 0.8rem; border: 1px solid var(--border-strong); border-radius: 8px;
  background: var(--surface); color: var(--fg); resize: vertical;
}
.pg-run { margin-top: 0.9rem; }
.dpg-field { margin-top: 0.9rem; }
.dpg-field input {
  width: 100%; font: inherit; font-size: 0.88rem; padding: 0.55rem 0.7rem;
  border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--fg);
}
.dpg-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 1.25rem; margin-bottom: 1rem; }
.dpg-form .dpg-field { margin-top: 0.6rem; }
.dpg-inline-link { color: var(--accent); }

/* Exa-style query card (monitors): input on top, controls row underneath */
.dpg-qcard { border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); overflow: hidden; }
.dpg-qcard > input {
  width: 100%; border: 0; background: transparent; color: var(--fg);
  font: inherit; font-size: 0.95rem; padding: 0.85rem 1rem 0.5rem;
}
.dpg-qcard > input:focus-visible { outline: none; }
.dpg-qcard:focus-within { border-color: var(--accent); }
.dpg-qcard-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.6rem 0.6rem 0.85rem; }
.dpg-qcard-row select {
  font: inherit; font-size: 0.8rem; padding: 0.3rem 0.5rem; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg); color: var(--muted); width: auto;
}
.dpg-qcard-row select:disabled { opacity: 0.6; cursor: not-allowed; }
.dpg-qcard-chip {
  font-size: 0.8rem; padding: 0.3rem 0.6rem; border: 1px solid var(--border);
  border-radius: 6px; background: var(--bg); color: var(--muted); cursor: default;
}
.dpg-qcard-spacer { flex: 1; }
.dpg-gobtn {
  width: 2.3rem; height: 2.3rem; padding: 0; border-radius: 9px;
  font-size: 1.05rem; line-height: 1; display: grid; place-items: center;
}
.dpg-listhead { display: flex; justify-content: space-between; align-items: center; margin: 1.8rem 0 0.8rem; }
.dpg-listhead h2 { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.01em; }

/* usage view */
.dpg-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.dpg-stats .dash-card { margin-top: 0; }
.dpg-stat-n { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; }
.dpg-stat-l {
  font-family: var(--font-body); font-size: 0.75rem; letter-spacing: -0.01em;
  text-transform: none; color: var(--muted); margin-top: 0.35rem; font-weight: 500;
}
.dpg-chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; }
.dpg-chart .dpg-empty { align-self: center; margin: 0 auto; }
.dpg-bar { flex: 1; min-width: 6px; background: var(--accent); border-radius: 4px 4px 0 0; opacity: 0.9; }
.dpg-bar:hover { opacity: 1; }
.dpg-chart-x {
  display: flex; justify-content: space-between; margin-top: 0.5rem;
  font-family: var(--font-mono); font-size: 0.66rem; color: var(--meta);
}
.dpg-plan-chip {
  font-family: var(--font-body); font-size: 0.72rem; letter-spacing: -0.01em; text-transform: none;
  background: var(--accent-soft); color: var(--fg); padding: 0.25rem 0.6rem; border-radius: 6px; font-weight: 500;
}

/* billing view (Exa layout: balance+invoices left, plan card right) */
.dpg-billhead { display: flex; align-items: center; gap: 0.8rem; }
.dpg-bill { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.5rem; align-items: start; margin-top: 1.5rem; }
.dpg-bill .dash-card { margin-top: 0; }
.dpg-balance-n { font-size: 2rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 0.5rem; }
.dpg-balance-n span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.dpg-paycard {
  display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 0.9rem 1rem;
}
.dpg-cc {
  flex-shrink: 0; width: 92px; border: 1px solid var(--border-strong); border-radius: 6px;
  background: var(--surface); padding: 0.45rem 0.5rem; display: grid; gap: 0.5rem;
}
.dpg-cc span { font-size: 0.55rem; color: var(--meta); text-align: right; }
.dpg-cc code { font-family: var(--font-mono); font-size: 0.5rem; color: var(--muted); letter-spacing: 0.06em; }
.dpg-paycard-text { flex: 1; min-width: 0; }
.dpg-paycard-text h3 { font-size: 0.95rem; letter-spacing: -0.01em; }
.dpg-paycard-text p { font-size: 0.8rem; color: var(--muted); line-height: 1.55; margin-top: 0.3rem; }
.dpg-pricetable { margin-top: 1rem; border-top: 1px solid var(--border); }

/* Billing credit meter */
.cr-bar {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--fg) 7%, transparent);
  overflow: hidden;
  margin-top: 0.9rem;
}
.cr-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--fg);
  transition: width 0.5s ease;
}
.cr-bar-fill.is-low { background: #b4552d; }
.cr-hero { position: relative; max-width: 44rem; padding-top: 0.4rem; }
.cr-costs { max-width: 34rem; margin-top: 0.5rem; }
.cr-cost {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0;
  font-size: 0.92rem;
}
.cr-cost + .cr-cost { border-top: 1px solid color-mix(in srgb, var(--fg) 6%, transparent); }
.cr-cost i { flex: 1; border-bottom: 1px dotted var(--border); transform: translateY(-0.25em); }
.cr-cost b { font-family: var(--font-mono); font-weight: 600; }
.cr-cost em { font-style: normal; font-size: 0.75rem; color: var(--faint); margin-left: 0.4rem; }
.cr-cost--hot b { color: var(--accent, #6b7f6a); }
.cr-cost--hot span::after { content: " · cache discount"; font-size: 0.75rem; color: var(--faint); }
.dpg-balance-n--big { font-size: 2.6rem; margin: 0.5rem 0 0.2rem; }
.dpg-balance-n--big > span:last-child { font-size: 1rem; color: var(--muted); font-family: var(--font-body); }
.cr-plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}
@media (max-width: 900px) { .cr-plans { grid-template-columns: 1fr; } }
.cr-plan {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: var(--card, transparent);
}
.cr-plan--best { border-color: color-mix(in srgb, var(--fg) 35%, var(--border)); }
.cr-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.cr-plan-head h3 { margin: 0; font-size: 1rem; }
.cr-plan-price { margin: 0; font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -0.02em; }
.cr-plan-price span { font-size: 0.85rem; color: var(--muted); font-family: var(--font-body); }
.cr-plan-left { margin: 0; min-height: 1.1rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--accent, #6b7f6a); }
.cr-plan-left:empty { display: none; }
.cr-plan-d { margin: 0; font-size: 0.8rem; color: var(--faint); flex: 1; }
.cr-plan .btn { margin-top: 0.75rem; align-self: flex-start; }
/* Credit-cost table (pricing.html): dashboard-style rows — scan the cost
   column top to bottom. Own class, not .dash-table: that one's mobile rules
   hide columns 2-3 for the five-column activity table. */
.sw-credits-sub { max-width: 46rem; color: var(--muted); }
.sw-credit-table { width: 100%; max-width: 46rem; border-collapse: collapse; margin-top: 1.5rem; font-size: 0.9rem; }
.sw-credit-table th {
  text-align: left; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); font-weight: 600; padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--border);
}
.sw-credit-table td { padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--border); vertical-align: baseline; }
.sw-credit-cost {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  width: 5rem;
}
.sw-credit-action { font-weight: 600; }
.sw-credit-note { color: var(--faint); font-size: 0.82rem; }
.sw-credit-row--hot td { background: color-mix(in srgb, var(--accent, #6b7f6a) 7%, transparent); }
.sw-credit-row--hot .sw-credit-cost::after {
  content: "half price";
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, #6b7f6a);
  margin-left: 0.5rem;
}
.sw-credits-foot { max-width: 46rem; margin-top: 1.25rem; font-size: 0.85rem; color: var(--muted); }
.dpg-price-row {
  display: grid; grid-template-columns: 90px auto 1fr; gap: 0.75rem; align-items: baseline;
  padding: 0.7rem 0; border-bottom: 1px solid var(--border);
}
.dpg-price-k { font-size: 0.88rem; color: var(--fg); }
.dpg-price-v { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; }
.dpg-price-d { font-size: 0.8rem; color: var(--muted); }
@media (max-width: 1000px) { .dpg-bill { grid-template-columns: 1fr; } }

/* home bottom row: API key + quick start */
.dpg-botrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.dpg-botrow .dash-card { margin-top: 0; }
.dpg-viewall { color: var(--accent); font-size: 0.82rem; text-decoration: none; }
.dpg-viewall:hover { text-decoration: underline; }
.dpg-keymask {
  display: flex; align-items: center; gap: 0.35rem;
  border: 1px solid var(--border); border-radius: 6px; padding: 0.45rem 0.6rem 0.45rem 0.9rem;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted); background: var(--bg);
}
.dpg-keymask code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dpg-iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 0.35rem; border-radius: 6px;
}
.dpg-iconbtn:hover { background: var(--accent-soft); color: var(--accent); }
.dpg-iconbtn:disabled { opacity: 0.4; cursor: not-allowed; }
.dpg-iconbtn:disabled:hover { background: transparent; color: var(--muted); }
.dpg-iconbtn-done { color: var(--accent); background: var(--accent-soft); }
.dpg-cardnote { font-size: 0.8rem; color: var(--muted); line-height: 1.6; margin-top: 0.75rem; }
.dpg-cardnote a { color: var(--accent); }
.dpg-qscopy { width: 100%; }
.dpg-hint { font-size: 0.78rem; color: var(--muted); line-height: 1.6; margin-top: 0.9rem; }
.dpg-hint code { font-family: var(--font-mono); }

.dpg-out {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  overflow: hidden; display: flex; flex-direction: column; min-height: 66vh;
}
/* flex-basis auto, not 0: with basis 0 the pane's height came only from
   .dpg-out's min-height, so a tall response overflowed and got clipped by the
   card's overflow:hidden. grow still fills the 66vh floor when short. */
.pg-resp-pane { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
/* column flex so the empty state can still fill the card: .dpg-blank's
   height:100% no longer resolves now that .dpg-preview has no definite height. */
.pg-resp-pane .dpg-preview { flex: 1 1 auto; display: flex; flex-direction: column; }
.pg-resp-pane .dpg-preview[hidden] { display: none; }   /* class display beats [hidden] */
.pg-resp-pane .dpg-blank { flex: 1 1 auto; height: auto; }
.dpg-blank {
  height: 100%; min-height: 300px; display: grid; place-content: center; justify-items: center;
  gap: 0.75rem; text-align: center; color: var(--meta);
}
.dpg-blank-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 1.15rem;
}
.dpg-out-head {
  display: flex; justify-content: space-between; align-items: center; gap: 0.75rem;
  padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--border);
}
.dpg-tabs, .dpg-pills { display: flex; gap: 0.35rem; }
.dpg-tabs { position: relative; }
.dpg-tab, .dpg-pill {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.3rem 0.7rem; cursor: pointer; position: relative; z-index: 1;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted);
}
.dpg-pill[aria-selected="true"] { background: #111; color: #fff; border-color: #111; }
/* sliding pill behind the active tab; tabs themselves stay transparent */
.dpg-tabpill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0; z-index: 0;
  background: #111; border-radius: 6px; will-change: transform, width;
}
.dpg-tab[aria-selected="true"] { color: #fff; }
.dpg-tabs.no-pill .dpg-tab[aria-selected="true"] { background: #111; }
/* response-panel states */
.dpg-skel { padding: 0.1rem 0; }
.dpg-skel-card { border: 1px solid var(--border); border-radius: 12px; padding: 0.8rem 0.9rem; margin-bottom: 0.65rem; }
.dpg-skel-block { border-radius: 12px; padding: 0.8rem 0.9rem; margin-bottom: 0.65rem; background: var(--accent-soft); }
.dpg-skel-bar { height: 0.62rem; border-radius: 5px; background: #e7e7e4; margin: 0.45rem 0; }
.dpg-skel-bar.w25 { width: 25%; } .dpg-skel-bar.w40 { width: 40%; }
.dpg-skel-bar.w55 { width: 55%; } .dpg-skel-bar.w75 { width: 75%; } .dpg-skel-bar.w90 { width: 90%; }
.dpg-skel-pills { display: flex; gap: 0.4rem; margin-bottom: 0.65rem; }
.dpg-skel-pills .dpg-skel-bar { width: 4.5rem; height: 1.15rem; border-radius: 999px; margin: 0; }
.dpg-refusal { border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem; }
.dpg-refusal-code {
  display: inline-block; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: #111;
  background: var(--accent-soft); border-radius: 6px; padding: 0.2rem 0.55rem; margin-bottom: 0.5rem;
}
.dpg-refusal p { margin: 0.15rem 0 0; font-size: 0.9rem; }
.dpg-refusal .dpg-refusal-hint { color: var(--muted); font-size: 0.8rem; margin-top: 0.4rem; }
.dpg-answer { background: var(--accent-soft); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.75rem; }
.dpg-answer p { margin: 0; font-size: 0.92rem; line-height: 1.6; }
.dpg-cite {
  font-family: var(--font-mono); font-size: 0.7rem; color: #111; text-decoration: none;
  vertical-align: super; padding: 0 0.1rem; cursor: pointer;
}
.dpg-cite:hover { text-decoration: underline; }
.dpg-card-flash { outline: 2px solid #111; outline-offset: 2px; }
.dpg-meta-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.1rem 0 0.75rem; }
.dpg-meta-pill {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0.18rem 0.6rem;
}
.dpg-passage { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 0.9rem; margin-bottom: 0.6rem; }
.dpg-passage-head {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.35rem; display: flex; gap: 0.6rem;
}
.dpg-passage-text { margin: 0; font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.mv-delivery-row { display: flex; gap: 1.1rem; margin-top: 0.35rem; }
.mv-del-soon { color: var(--muted); }
.mv-actions { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.9rem; }
.mv-inline-btn { margin-top: 0.45rem; font-size: 0.8rem; padding: 0.35rem 0.7rem; }
.mv-cond { overflow: hidden; }
#mv-filter { margin: 0.4rem 0 0.7rem; }
.dpg-resp-foot {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); border-top: 1px solid var(--border); margin-top: 0.8rem; padding-top: 0.6rem;
  display: flex; gap: 1.1rem; flex-wrap: wrap;
}
.dpg-adv { margin-top: 0.9rem; border: 1px solid var(--border); border-radius: 8px; }
.dpg-adv summary {
  cursor: pointer; list-style: none; padding: 0.6rem 0.9rem; font-size: 0.9rem; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center;
}
.dpg-adv summary::-webkit-details-marker { display: none; }
.dpg-adv summary::after { content: "\2304"; color: var(--muted); }
.dpg-adv[open] summary::after { content: "\2303"; color: var(--muted); }
.dpg-adv > .dpg-field { margin: 0 0.9rem 0.9rem; }
.dpg-langbar { display: flex; gap: 0.35rem; padding: 0.55rem 0.9rem 0; }
.dash-keygen { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.dash-keygen input { font: inherit; font-size: 0.85rem; padding: 0.45rem 0.6rem; border: 1px solid var(--border); border-radius: 8px; min-width: 14rem; }
.dpg-field label.dpg-check { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; text-transform: none; letter-spacing: normal; }
.dpg-check input[type="checkbox"] { width: auto; min-width: 0; flex: 0 0 auto; }
.dpg-md { margin: 0; padding: 0.25rem 0 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.55; }
.dpg-status { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.dpg-preview { padding: 0.9rem; overflow: auto; }
.dpg-json {
  margin: 0.75rem 0.9rem 0.9rem; padding: 0.9rem; border-radius: 8px;
  background: #14161a; color: #d8dee6; font-family: var(--font-mono); font-size: 0.76rem;
  line-height: 1.6; overflow: auto; max-height: 62vh; white-space: pre;
}
.dpg-json .j-key { color: #7ea6ff; }
.dpg-json .j-str { color: #8ddb8c; }
.dpg-json .j-num { color: #ffb46b; }
.dpg-json .j-bool { color: #d2a8ff; }
.dpg-json .j-null { color: #8b949e; }
.dpg-code-note { padding: 0.9rem 0.9rem 0; font-size: 0.8rem; color: var(--muted); }

.dpg-card { border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 0.85rem; margin-bottom: 0.65rem; }
.dpg-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.dpg-card-head h4 { font-size: 0.92rem; letter-spacing: -0.01em; }
.dpg-chip {
  font-family: var(--font-body); font-size: 0.7rem; padding: 2px 8px; border-radius: 6px;
  border: 1px solid var(--border-strong); color: var(--muted); white-space: nowrap; font-weight: 500;
}
.dpg-chip-good { background: var(--accent-soft); color: var(--fg); border-color: transparent; }
.dpg-link { display: block; color: var(--accent); font-size: 0.76rem; word-break: break-all; margin-top: 0.25rem; text-decoration: none; }
.dpg-link:hover { text-decoration: underline; }
.dpg-card-meta { color: var(--muted); font-size: 0.8rem; margin-top: 0.35rem; }
.dpg-card-text { font-size: 0.84rem; line-height: 1.55; margin-top: 0.4rem; color: var(--fg); }
.dpg-note {
  background: var(--accent-soft); color: var(--fg); font-size: 0.8rem; line-height: 1.5;
  padding: 0.5rem 0.7rem; border-radius: 6px; margin-bottom: 0.5rem;
}
.dpg-note-err { background: rgba(214, 69, 69, 0.12); color: #d64545; }
.dpg-rows { margin-bottom: 0.5rem; }
.dpg-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0.6rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); }
.dpg-row-k { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.dpg-row-v { font-size: 0.84rem; line-height: 1.5; word-break: break-word; }
.dpg-sec {
  font-family: var(--font-body); font-size: 0.75rem; letter-spacing: -0.01em; text-transform: none;
  color: var(--muted); margin: 1rem 0 0.5rem; font-weight: 500;
}
.dpg-empty { color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .dpg { grid-template-columns: 1fr; }
  .dpg-side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .dpg-side-foot { margin-top: 0.5rem; }
  .dpg-play { grid-template-columns: 1fr; }
}

/* ---------- blog ---------- */
/* Hub layout: an optional filter row, one featured post, then a card grid.
   Every branch is driven by the generated markup, never by an enumerated
   data-count ladder -- an earlier revision listed data-count="9".."20" and
   silently fell back to a plain list at post #21. */
.sw-blog {
  margin-top: 2rem;
}

/* --- filter row --- */
.sw-blog-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}
.sw-blog-filter {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 0.42rem 0.95rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sw-blog-filter:hover {
  color: var(--fg);
  border-color: var(--fg);
}
.sw-blog-filter.is-on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* --- preview art ---
   Posts ship without artwork, so the generator stamps data-art="0".."5" and
   the swatch is painted here: no image files, no external requests, and no
   empty slot where a picture would be. A post carrying sw:image renders a real
   <img> in the same box instead. */
.sw-blog-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}
.sw-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* The wave is SeaWeb's mark, drawn once and tinted per variant by the ground
   colour underneath it. */
.sw-blog-thumb[data-art]::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M0 20q7.5-12 15 0t15 0t15 0t15 0t15 0t15 0t15 0t15 0' fill='none' stroke='%23000' stroke-opacity='0.13' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-size: 260px auto;
  background-position: center;
  background-repeat: repeat;
}
.sw-blog-thumb[data-art="0"] { background: #eef1f4; }
.sw-blog-thumb[data-art="1"] { background: #f2efe9; }
.sw-blog-thumb[data-art="2"] { background: #eaf0ee; }
.sw-blog-thumb[data-art="3"] { background: #f1eef3; }
.sw-blog-thumb[data-art="4"] { background: #f3eeec; }
.sw-blog-thumb[data-art="5"] { background: #edf0f1; }

/* --- shared card innards --- */
.sw-tag {
  /* eyebrow idiom — body font, sentence case, 0.875rem; NOT mono uppercase */
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 0.15rem 0.55rem;
  line-height: 1.2;
}
.sw-blog-feature .sw-tag,
.sw-blog-card .sw-tag {
  display: inline-block;
  margin-bottom: 0.75rem;
  /* The card is a column flexbox, whose default align-items: stretch pulled the
     pill to the full card width -- a chip the width of a paragraph. */
  align-self: flex-start;
}
.sw-blog-feature h2,
.sw-blog-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}
.sw-blog-feature h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); line-height: 1.2; }
.sw-blog-card h3 { font-size: 1.15rem; line-height: 1.3; }
.sw-blog-feature h2 a,
.sw-blog-card h3 a {
  color: var(--fg);
  text-decoration: none;
}
.sw-blog-feature h2 a:hover,
.sw-blog-card h3 a:hover {
  text-decoration: underline;
}
/* The title link is stretched over the whole card, so clicking the art or the
   excerpt navigates too. One link per card -- a second <a> around the image
   would read as a duplicate destination to a screen reader. */
.sw-blog-card h3 a::after,
.sw-blog-feature h2 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.sw-blog-feature p,
.sw-blog-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}
/* Selector carries the parent so it outranks `.sw-blog-feature p` on
   specificity. !important would have worked and would have been the start of an
   !important arms race in a stylesheet that has none. */
.sw-blog-feature p.sw-blog-meta,
.sw-blog-card p.sw-blog-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
  color: var(--meta);
  font-size: 0.8125rem;
}
.sw-blog-meta time::before {
  content: "·";
  margin-right: 0.5rem;
  color: var(--border-strong);
}

/* --- featured --- */
.sw-blog-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}
@media (min-width: 860px) {
  .sw-blog-feature {
    /* minmax(0, …), never 1fr on its own: `1fr` is minmax(auto, 1fr) and a long
       excerpt blows the track out past its container. That shipped once. */
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 2.5rem;
  }
}
.sw-blog-feature p { font-size: 1rem; }

/* --- grid --- */
.sw-blog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem 2rem;
}
@media (min-width: 700px) {
  .sw-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .sw-blog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.sw-blog-card {
  position: relative;
  display: flex;
  flex-direction: column;
}
.sw-blog-card .sw-blog-thumb {
  margin-bottom: 1.1rem;
}

/* --- empty / filtered-empty states --- */
.sw-blog-empty,
.sw-blog-noresult {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.sw-blog-noresult {
  margin-top: 2rem;
}
.sw-blog-empty a,
.sw-blog-noresult a {
  color: var(--fg);
}

/* post page */
.sw-wrap.sw-post {
  max-width: 42rem;
}
.sw-post h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0;
}
.sw-post .sw-lede {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
  margin-top: 1.1rem;
}
.sw-post-body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--fg);
  max-width: 66ch;
  margin-top: 1.5rem;
}
.sw-post-body p + p {
  margin-top: 1.15rem;
}
.sw-post-body h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.6rem;
  border-top: 0;
  padding-top: 0;
}
.sw-post-body a {
  color: var(--accent);
  text-decoration: none;
}
.sw-post-body a:hover {
  text-decoration: underline;
}
/* Code cards: soft gray rounded panel, hand-tinted tokens (no highlighter dep). */
.sw-post-body pre {
  background: #f6f7f8;
  border: 0;
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  font-size: 0.83rem;
  line-height: 1.75;
}
.sw-post-body pre code { background: none; padding: 0; font-size: inherit; }
.sw-post-body .tok-k { color: #a626a4; font-weight: 600; }
.sw-post-body .tok-s { color: #50a14f; }
.sw-post-signoff { margin-top: 2.5rem; }
.sw-post-signoff p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1.45;
  letter-spacing: -0.02em;
  margin: 0;
}
.sw-byline,
.sw-post-meta {
  font-size: 0.8125rem;
  color: var(--meta);
}
.sw-post-nav {
  display: flex;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
.sw-post-nav a {
  color: var(--accent);
  text-decoration: none;
}
.sw-post-nav a:hover {
  text-decoration: underline;
}

/* elsewhere strip — one combined strip below posts */
.sw-elsewhere {
  border-top: 1px solid var(--border);
  padding: clamp(2rem, 5vw, 3rem) 0;
  margin-top: 2.5rem;
}
.sw-elsewhere-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 800px) {
  .sw-elsewhere-grid {
    grid-template-columns: 1fr 1.4fr;
    gap: 3rem;
  }
}
.sw-elsewhere h3 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
  text-transform: none;
}
.sw-elsewhere-projects ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.sw-elsewhere-projects a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  line-height: 1.5;
}
.sw-elsewhere-projects a:hover {
  color: var(--fg);
  text-decoration: underline;
}
.sw-x-feed {
  display: grid;
  gap: 1rem;
}
.sw-x-quote {
  display: block;
  border-left: 2px solid var(--border-strong);
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  padding: 0 0 0 1rem;
  text-decoration: none;
  color: inherit;
}
.sw-x-quote blockquote {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--fg);
  margin: 0;
  font-weight: 400;
}
.sw-x-quote .sw-x-meta,
.sw-x-quote figcaption {
  font-size: 0.8125rem;
  color: var(--meta);
  margin-top: 0.4rem;
  display: block;
}
.sw-x-quote a {
  color: inherit;
  text-decoration: none;
}
.sw-x-quote a:hover {
  text-decoration: underline;
}

/* ---------- entrance ---------- */
@media (prefers-reduced-motion: no-preference) {
  .sw-fade { opacity: 0; transform: translateY(10px); animation: sw-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .sw-fade:nth-child(1) { animation-delay: 0.02s; }
  .sw-fade:nth-child(2) { animation-delay: 0.08s; }
  .sw-fade:nth-child(3) { animation-delay: 0.14s; }
  .sw-fade:nth-child(4) { animation-delay: 0.2s; }
}
@keyframes sw-in { to { opacity: 1; transform: none; } }

/* ---------- sitewide mobile / touch (clean pages) ---------- */
@media (max-width: 900px) {
  /* Kill shell's 2-col card-grid on mid phones — clean pages own the stack */
  .card-grid,
  .sw-prose .card-grid {
    grid-template-columns: 1fr !important;
  }
  .sw-prose,
  .sw-prose p,
  .sw-prose li,
  .sw-prose h1,
  .sw-prose h2,
  .sw-prose h3 {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
  .sw-prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .sw-code {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .page-main {
    width: 100%;
    max-width: min(720px, 100%);
    min-width: 0;
    overflow-x: clip;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
  }
  .page-main pre,
  .page-main code {
    max-width: 100%;
  }
  .site-nav {
    padding-left: max(clamp(0.85rem, 4vw, 2.5rem), env(safe-area-inset-left, 0px));
    padding-right: max(clamp(0.85rem, 4vw, 2.5rem), env(safe-area-inset-right, 0px));
    padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
    max-width: 100%;
    min-width: 0;
  }
  .sw-side a,
  .sw-side-acc > summary {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
  }
  .sw-copy { min-height: 2.75rem; }
}
@media (max-width: 680px) {
  .site-nav.nav-open .nav-links a,
  .site-nav.nav-open .nav-sign {
    min-height: 2.75rem; display: inline-flex; align-items: center;
    padding: 0.35rem 0;
    width: 100%;
  }
  .nav-actions .btn, .hamburger, .qbtn, .cx-btn, .cx-mbtn, .cx-cbtn, .cx-vbtn, .sw-uc, .dpg-mode, .dpg-tab { min-height: 2.75rem; min-width: 2.75rem; }
  .auth-card input,
  .auth-card input[type="email"],
  .auth-card input[type="password"],
  .auth-card input[type="text"],
  .dpg-qbar input,
  input.sw-input,
  .waitlist input,
  .cx-input,
  input.cx-input,
  .pform input,
  .pform textarea,
  #project-name-input,
  .field input,
  .field textarea,
  .field select,
  .dash-keygen input,
  #code-editor {
    font-size: 1rem !important; /* ≥16px — no iOS focus zoom */
  }
  /* API-key generator: the 14rem min-width overflowed a 320px card; let the
     row wrap and the input take the full line. */
  .dash-keygen { flex-wrap: wrap; }
  .dash-keygen input { min-width: 0; width: 100%; flex: 1 1 100%; }
  .auth-google,
  .auth-submit,
  .auth-card .btn {
    min-height: 2.75rem;
  }
  .dash-code pre {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  .dash-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #cookie-banner {
    padding: 0.7rem max(0.85rem, env(safe-area-inset-left, 0px))
             max(0.7rem, env(safe-area-inset-bottom, 0px))
             max(0.85rem, env(safe-area-inset-right, 0px));
  }
  #cookie-banner p { min-width: 0; flex: 1 1 100%; }
  #cookie-banner .cookie-actions { width: 100%; }
  #cookie-banner .btn {
    flex: 1;
    min-height: 2.75rem;
    justify-content: center;
  }
  .sw-pagehead { gap: 0.65rem; }
  .sw-copy { width: 100%; justify-content: center; }
}
@media (max-width: 520px) {
  .sw-plan .btn { min-height: 2.75rem; }
  .sw-actions .btn { min-height: 2.75rem; }
  .sw-prose .sw-table-scroll { -webkit-overflow-scrolling: touch; }
  .sw-prose pre { font-size: 0.72rem; padding: 0.85rem 0.9rem; }
  .page-main pre { font-size: 0.72rem; }
  .sw-footer-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
}
@media (max-width: 360px) {
  .sw-footer-grid { grid-template-columns: 1fr; }
  .nav-actions .btn-primary {
    padding: 0.45rem 0.7rem;
    font-size: 0.75rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .sw-side-acc > summary::after { transition: none; }
  .sw-fade { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ---------- dashboard: camera visibility monitor ---------- */
.cam-map { height: 260px; border-radius: 12px; border: 1px solid var(--border); margin: 0.75rem 0 1.25rem; overflow: hidden; }
.cam-map[hidden] { display: none; }
.cam-card { cursor: pointer; margin-top: 0.75rem; }
.cam-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cam-card-alert { border-color: #c2410c; }
.cam-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.cam-card-head h4 { margin: 0; font-size: 0.95rem; }
.cam-pct { font-variant-numeric: tabular-nums; font-weight: 600; }
.cam-pct-alert { color: #c2410c; }
.cam-pct-na { color: var(--muted); font-weight: 400; }
.cam-cond { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.85rem; }
.cam-detail h3 { margin-top: 0; }
.cam-frame { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block; margin: 0.5rem 0; }
.cam-badge { font-weight: 600; margin: 0.5rem 0 0.25rem; }
.cam-badge-alert { color: #c2410c; }
.cam-note { color: var(--muted); font-size: 0.85rem; margin: 0.2rem 0; }
.cam-node { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; background: var(--accent, #2563eb); cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.35); }
.cam-node-alert { background: #c2410c; animation: cam-pulse 1.6s ease-in-out infinite; }
@keyframes cam-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .cam-node-alert { animation: none; } }
.cam-note-demo { color: #c2410c; }
.cam-verdict { border-radius: 12px; padding: 0.85rem 1rem; margin: 0.75rem 0 1rem; border: 1px solid var(--border); background: var(--accent-soft); }
.cam-verdict strong { display: block; }
.cam-verdict-sub { color: var(--muted); font-size: 0.88rem; }
.cam-verdict-good { border-color: #15803d; }
.cam-verdict-good strong { color: #15803d; }
.cam-verdict-poor { border-color: #c2410c; }
.cam-verdict-poor strong { color: #c2410c; }
.cam-verdict-mixed { border-color: #a16207; }
.cam-verdict-mixed strong { color: #a16207; }
.cam-strip { display: flex; gap: 1px; margin-top: 0.5rem; align-items: stretch; }
.cam-strip-big { margin: 0.4rem 0 0.6rem; }
.cam-strip-block { flex: 1 1 4px; height: 10px; border-radius: 2px; min-width: 3px; }
.cam-strip-big .cam-strip-block { height: 22px; }
.cam-strip-good { background: #16a34a; }
.cam-strip-mixed { background: #d97706; }
.cam-strip-poor { background: #dc2626; }
.cam-strip-gap { background: var(--border); }
.cam-window { color: var(--fg); font-size: 0.85rem; margin: 0.4rem 0 0; font-weight: 500; }
.cam-h4 { margin: 0.9rem 0 0.1rem; font-size: 0.95rem; }

/* ---------- dashboard: spots (pilot condition board) ---------- */
.sp-card { cursor: pointer; margin-top: 0.75rem; border-left: 4px solid var(--border); }
.sp-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-card-good { border-left-color: #15803d; }
.sp-card-caution { border-left-color: #d97706; }
.sp-card-bad { border-left-color: #dc2626; }
.sp-badge { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.15rem 0.55rem; border-radius: 999px; }
.sp-badge-good { background: #dcfce7; color: #15803d; }
.sp-badge-caution { background: #fef3c7; color: #a16207; }
.sp-badge-bad { background: #fee2e2; color: #b91c1c; }
.sp-badge-unknown { background: var(--accent-soft); color: var(--muted); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0 0.2rem; }
.sp-chip { border: 1px solid var(--border); border-radius: 8px; padding: 0.3rem 0.55rem; font-size: 0.8rem; }
.sp-chip b { font-weight: 600; }
.sp-chip i { font-style: normal; color: var(--muted); }
.sp-chip-good { border-color: #86efac; }
.sp-chip-caution { border-color: #fcd34d; background: #fffbeb; }
.sp-chip-bad { border-color: #fca5a5; background: #fef2f2; }
.sp-chip-unknown { border-style: dashed; color: var(--muted); }
.sp-chips-mini .sp-dot { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 6px; border: 1px solid var(--border); padding: 0.15rem 0.45rem; font-size: 0.75rem; }
.sp-dot.sp-chip-good { background: #f0fdf4; }
.sp-dot.sp-chip-caution { background: #fffbeb; }
.sp-dot.sp-chip-bad { background: #fef2f2; }
.sp-verdict { font-weight: 600; margin: 0.4rem 0; }
.sp-verdict-good { color: #15803d; }
.sp-verdict-caution { color: #a16207; }
.sp-verdict-bad { color: #b91c1c; }
.sp-verdict-unknown { color: var(--muted); }

/* ---------- spots v2: picker / week / day ---------- */
.sp-pick { width: 100%; padding: 0.65rem 0.75rem; border-radius: 10px; border: 1px solid var(--border); background: var(--bg, #fff); font: inherit; margin: 0.35rem 0 1.1rem; }
.sp-week { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 0.25rem; }
.sp-daychip { flex: 0 0 auto; min-width: 4.2rem; border: 1px solid var(--border); border-radius: 12px; background: none; padding: 0.5rem 0.4rem; text-align: center; cursor: pointer; font: inherit; transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease; border-bottom-width: 3px; }
.sp-daychip:hover { transform: translateY(-2px); }
.sp-daychip b { display: block; font-size: 0.85rem; }
.sp-daychip-t { font-size: 0.8rem; color: var(--muted); }
.sp-daychip-good { border-bottom-color: #16a34a; }
.sp-daychip-caution { border-bottom-color: #d97706; }
.sp-daychip-bad { border-bottom-color: #dc2626; }
.sp-daychip-active { background: var(--accent-soft); border-color: var(--fg); }
.sp-daychip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sp-day { margin-top: 0.9rem; border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 1rem; animation: sp-in 0.25s ease; }
.sp-day h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.sp-day-main { margin: 0.2rem 0; }
.sp-day-flags { font-weight: 600; margin: 0.35rem 0 0.2rem; }
.sp-fade { animation: sp-in 0.25s ease; }
@keyframes sp-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sp-fade, .sp-day { animation: none; } .sp-daychip { transition: none; } }

/* ---------- spots v3: hero temp + interval tiles ---------- */
.sp-hero { display: flex; align-items: center; gap: 1.25rem; margin: 0.5rem 0 0.35rem; }
.sp-hero-temp b { font-size: 3.1rem; font-weight: 650; letter-spacing: -0.03em; line-height: 1; display: block; }
.sp-hero-temp span { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.sp-vars { margin: 0; display: grid; gap: 0.25rem; }
.sp-var { display: flex; gap: 0.6rem; align-items: baseline; }
.sp-var dt { color: var(--muted); font-size: 0.82rem; min-width: 5.2rem; }
.sp-var dd { margin: 0; font-size: 0.92rem; font-weight: 500; }
.sp-ivl-wrap { margin-top: 0.9rem; }
.sp-ivl-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.sp-ivl { border: 1px solid var(--border); border-radius: 12px; padding: 0.55rem 0.4rem; text-align: center; border-bottom-width: 3px; }
.sp-ivl-label { display: block; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; }
.sp-ivl-pct { font-size: 1.25rem; font-weight: 650; }
.sp-ivl-good { border-bottom-color: #16a34a; }
.sp-ivl-mixed { border-bottom-color: #d97706; }
.sp-ivl-poor { border-bottom-color: #dc2626; }
.sp-ivl-na { opacity: 0.55; border-bottom-style: dashed; }

/* ---------- spots v4: single-panel layout ---------- */
.sp-place { margin: 0 0 0.1rem; }
.sp-picked-day { color: var(--fg); font-weight: 600; margin: 0 0 0.6rem; }
.sp-section { margin: 1.2rem 0 0.45rem; font-size: 0.95rem; }
#sp-panel .sp-chips { margin-top: 0.2rem; }
#sp-panel .cam-frame { margin-top: 0.35rem; }

/* ---------- spots v5: the Framer "Spots v2" board ----------
   Two columns at 1fr / 1.6fr, one accent, and status colour reserved for
   states that are actually a warning. Spacing is 8 / 16 / 24 / 40 only.
   Semantic good/caution/bad is NOT the accent — it encodes real forecast
   state (heat advisory, freeze, road closure) and stays. What goes is the
   decoration: a green underline under all seven chips said nothing. */
#view-spots .dpg-play { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 2.5rem; align-items: start; }
#view-spots .dpg-controls { display: flex; flex-direction: column; gap: 1.5rem; }
#view-spots .dpg-sub { margin: 0; }
#view-spots .sp-pick { margin: 0.5rem 0 0; padding: 0.5rem 1rem; border-radius: 8px; }
#view-spots label[for="sp-pick"] { margin: 0; }

.sp-field { display: flex; flex-direction: column; gap: 0; }
.sp-weekblock { display: flex; flex-direction: column; gap: 1rem; }

/* day strip — selected is a solid fill, not an outline */
.sp-week { gap: 0.5rem; }
.sp-daychip {
  min-width: 0; flex: 1 1 0; border-bottom-width: 1px; border-radius: 8px;
  padding: 1rem 0.25rem; background: var(--surface);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.sp-daychip:hover { transform: none; background: var(--bg-soft); border-color: var(--muted); }
.sp-daychip b { font-size: 0.82rem; font-weight: 600; }
.sp-daychip-t { font-size: 0.7rem; letter-spacing: 0.02em; }
/* a good day needs no mark; only a flagged one does */
.sp-daychip-good { border-bottom-color: var(--border); }
.sp-daychip-caution { border-bottom-color: #d97706; border-bottom-width: 3px; }
.sp-daychip-bad { border-bottom-color: #dc2626; border-bottom-width: 3px; }
.sp-daychip-active,
.sp-daychip-active:hover { background: var(--fg); border-color: var(--fg); color: var(--btn-fg); }
.sp-daychip-active .sp-daychip-t { color: rgba(255, 255, 255, 0.65); }
:root[data-theme="dark"] .sp-daychip-active .sp-daychip-t { color: rgba(0, 0, 0, 0.6); }

/* hourly temperature for the selected day */
.sp-trend { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.sp-trend-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.sp-trend-head h2 { margin: 0; font-size: 1.05rem; }
.sp-trend-cap { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sp-plot { display: flex; flex-direction: column; gap: 0.5rem; }
.sp-bars { display: flex; align-items: flex-end; gap: 0.5rem; height: 11rem; }
.sp-bar-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.5rem; height: 100%; }
.sp-bar-val { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp-bar { width: 100%; flex: 0 0 auto; border-radius: 4px; background: var(--bg-soft); border: 1px solid var(--border); }
.sp-bar-peak { background: #15803d; border-color: #15803d; }
.sp-bar-peak + .sp-bar-val, .sp-bar-col:has(.sp-bar-peak) .sp-bar-val { color: #15803d; }
.sp-axis { display: flex; gap: 0.5rem; border-top: 1px solid var(--border); padding-top: 0.5rem; }
.sp-axis span { flex: 1 1 0; min-width: 0; text-align: center; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.sp-trend-empty { color: var(--muted); font-size: 0.85rem; margin: 0; }

/* hero temperature, baseline-aligned with the facts beside it */
.sp-hero { align-items: baseline; gap: 2.5rem; margin: 0; }
.sp-hero-temp { flex: 0 0 auto; }
.sp-hero-temp b { font-size: 3.6rem; font-variant-numeric: tabular-nums; }
.sp-vars { gap: 0.5rem; }
.sp-var dt { min-width: 6rem; }

/* interval tiles: a percentage plus the word for it */
.sp-ivl-row { gap: 0.5rem; }
.sp-ivl { border-bottom-width: 1px; border-radius: 8px; padding: 1rem 0.5rem; text-align: left; background: var(--surface); }
.sp-ivl-pct { display: block; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sp-ivl-word { display: block; font-size: 0.82rem; font-weight: 500; margin-top: 0.25rem; color: var(--muted); }
.sp-ivl-good { border-color: #15803d; }
.sp-ivl-good .sp-ivl-word { color: #15803d; }
.sp-ivl-mixed { border-color: var(--border); }
.sp-ivl-poor { border-color: var(--border); background: var(--bg-soft); }
.sp-ivl-poor .sp-ivl-word { color: var(--fg); }

@media (max-width: 1080px) {
  #view-spots .dpg-play { grid-template-columns: 1fr; gap: 2.5rem; }

}
@media (max-width: 640px) {
  #view-spots .dpg-play { gap: 1.5rem; }
  .sp-week { flex-wrap: wrap; }
  .sp-daychip { flex: 1 0 4rem; }
  .sp-ivl-row { grid-template-columns: repeat(2, 1fr); }
  .sp-hero { flex-direction: column; gap: 1rem; }
  .sp-bars { height: 9rem; }
}
@media (prefers-reduced-motion: reduce) { .sp-daychip { transition: none; } }
