/*
 * safepod.ai — public site.
 *
 * Deliberately one hand-written stylesheet with no build step: these pages are
 * a Google OAuth verification artifact and must stay readable when the product,
 * its bundle, or its Gateway is unavailable.
 *
 * The colour values below are COPIES. Their owners are:
 *   --color-sp-*   packages/web/src/design-tokens.generated.css
 *   --sp-site-*    packages/web/public/logo-wordmark.svg
 * scripts/site-brand-parity.test.ts fails if a copy drifts from its owner.
 */

/*
 * Geist (SIL Open Font License 1.1, (c) 2023 Vercel / basement.studio).
 * Self-hosted on purpose: a page whose subject is not leaking your data to
 * third parties should not fetch its typeface from a third party.
 * See assets/fonts/LICENSE-Geist.txt.
 */
@font-face { font-family: Geist; src: url("assets/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Geist; src: url("assets/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Geist; src: url("assets/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Geist; src: url("assets/fonts/Geist-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("assets/fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  /* Copied from the product's generated design tokens. */
  --color-sp-text-primary: #101820;
  --color-sp-text-secondary: #4b5565;
  --color-sp-accent: #1f6feb;
  --color-sp-canvas: #f8fafc;
  --color-sp-surface: #ffffff;
  --color-sp-border: #cdd5df;
  --color-sp-border-subtle: #e3e8ef;

  /* The site accent is deliberately louder than the mark's own blue: the mark
   * has to sit quietly at 40px in a header, a page has to carry across a
   * screen. `--sp-site-ink` and `--sp-site-live` still come from the logo.
   * The status green moved off lime: at 83° it sat 147° from the accent at the
   * same saturation and lightness, which vibrates. Emerald is 72° away and
   * less saturated, so it reads as a signal rather than a competitor. */
  --sp-site-brand: #2142E8;
  --sp-site-brand-deep: #152FB0;
  --sp-site-ink: #17243B;
  --sp-site-live: #34D399;

  --sp-page: 1152px;
  --sp-prose: 720px;
  --sp-radius: 10px;
  --sp-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sp-sans: Geist, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-sp-canvas);
  color: var(--color-sp-text-primary);
  font-family: var(--sp-sans);
  font-size: 16px;
  line-height: 1.5;
  text-wrap: pretty;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sp-site-brand-deep); text-underline-offset: 2px; }
a:hover { color: var(--sp-site-ink); }

.wrap { width: 100%; max-width: var(--sp-page); margin: 0 auto; padding: 0 56px; }

/* ── Header ─────────────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--color-sp-canvas) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--color-sp-border-subtle);
}
.site-header .wrap { display: flex; align-items: center; justify-content: flex-start; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand img { height: 42px; width: auto; display: block; }
.brand span {
  font-size: 26px; font-weight: 600; letter-spacing: -0.025em;
  color: var(--sp-site-ink); line-height: 1;
}
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14.5px; }
.site-nav a { color: var(--color-sp-text-secondary); text-decoration: none; }
.site-nav a:hover { color: var(--color-sp-text-primary); }
/* `.site-nav a` outranks `.btn-primary`, which left the header button's label
 * in secondary grey on blue — 1.08:1. Restate it at matching specificity. */
.site-nav a.btn-primary, .site-nav a.btn-primary:hover { color: #fff; }
.site-nav a.btn-quiet, .site-nav a.btn-quiet:hover { color: var(--color-sp-text-primary); }

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary {
  background: var(--sp-site-brand); border-color: var(--sp-site-brand-deep); color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--sp-site-brand) 38%, transparent);
}
.btn-primary:hover {
  background: var(--sp-site-brand-deep); color: #fff;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--sp-site-brand) 46%, transparent);
}
.btn-quiet { background: var(--color-sp-surface); border-color: var(--color-sp-border); color: var(--color-sp-text-primary); }
.btn-quiet:hover { border-color: var(--color-sp-text-tertiary, #697586); color: var(--color-sp-text-primary); }

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

.hero { padding: 64px 0 52px; }
.hero-grid { display: grid; grid-template-columns: 0.88fr 1.12fr; gap: 40px; align-items: center; }
.hero h1 { max-width: 9.2em; }
.hero .lede { max-width: 30em; }
/* The claim in ink, its qualifier in brand blue — the second line is what the
 * product actually promises, so it carries the colour. */
h1 .accent { color: var(--sp-site-brand); display: block; }
.reassure-note { font-size: 13.5px; font-style: italic; color: var(--color-sp-text-secondary); margin: 18px 0 0; }

h1 {
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 400;
  margin: 0 0 22px;
  max-width: 13em;
  /* Break the headline into even lines rather than stranding a short word. */
  text-wrap: balance;
  color: var(--sp-site-ink);
}

.lede {
  font-size: clamp(17px, 1.7vw, 19px);
  color: var(--color-sp-text-secondary);
  max-width: 36em;
  margin: 0 0 30px;
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.reassure {
  display: flex; align-items: center; gap: 8px;
  margin: 22px 0 0; font-size: 14px; color: var(--color-sp-text-secondary);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sp-site-live);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-site-live) 25%, transparent); flex: none; }

/* ── Flow diagram ───────────────────────────────────────── */

.flow { padding: 0 0 64px; border-bottom: 1px solid var(--color-sp-border-subtle); }
.diagram-outline {
  border: 1px solid color-mix(in srgb, var(--sp-site-brand) 26%, transparent);
  border-radius: 12px; background: var(--color-sp-surface); padding: 13px;
}
.diagram-outline .flow-label { margin-bottom: 9px; color: var(--sp-site-brand-deep); }
.pod { border-color: color-mix(in srgb, var(--sp-site-brand) 30%, transparent); background: var(--color-sp-surface); }
.tile { border-color: color-mix(in srgb, var(--sp-site-brand) 24%, transparent); }
.flow-box.center {
  border: 1px solid var(--sp-site-brand-deep);
  box-shadow: 0 10px 28px color-mix(in srgb, var(--sp-site-ink) 22%, transparent);
}
.flow-grid { display: grid; grid-template-columns: 1fr auto 1.15fr auto 1fr; gap: 0 14px; align-items: center; }
.flow-col { min-width: 0; }
.flow-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--color-sp-text-secondary); margin: 0 0 10px;
}
.flow-box {
  border: 1px solid var(--color-sp-border-subtle); border-radius: var(--sp-radius);
  background: var(--color-sp-canvas); padding: 14px;
}
.flow-box.center { background: var(--sp-site-ink); border-color: var(--sp-site-ink); }
.flow-box.center .flow-title { color: #fff; }
.flow-title { font-size: 14.5px; font-weight: 650; margin: 0 0 4px; color: var(--sp-site-ink); }
.flow-sub { font-size: 12.5px; color: var(--color-sp-text-secondary); margin: 0; }
.flow-box.center .flow-sub { color: #9fc0f0; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.pill {
  font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.12); color: #dfe6f2;
}
.flow-arrow { color: var(--color-sp-border); font-size: 18px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  font-size: 12px; padding: 3px 9px; border-radius: 6px;
  border: 1px solid var(--color-sp-border-subtle); background: var(--color-sp-surface);
  color: var(--color-sp-text-secondary);
}

/* ── Numbered sections ──────────────────────────────────── */

section.numbered { padding: 72px 0; border-bottom: 1px solid var(--color-sp-border-subtle); }
/* Centred, not top-aligned: the copy and the artifact are never the same
   height, and hanging both from the top leaves the shorter one with all of
   its slack at the bottom. */
.two-col { display: grid; grid-template-columns: 1fr 1.08fr; gap: 52px; align-items: center; }
.two-col.flip > .col-text { order: 2; }
/* Grid children default to `min-width: auto`, so a wide table inside an
 * artifact pushes the whole row past the viewport instead of scrolling. */
.two-col > * { min-width: 0; }

.marker {
  font-family: var(--sp-mono); font-size: 13px; font-weight: 700;
  color: var(--sp-site-brand); letter-spacing: 0.04em; margin: 0 0 12px;
}
h2 {
  font-size: clamp(26px, 3.1vw, 38px); line-height: 1.2; letter-spacing: -0.012em;
  font-weight: 500; margin: 0 0 14px; color: var(--sp-site-ink);
}
.section-lede { color: var(--color-sp-text-secondary); margin: 0 0 22px; }

ul.feature { list-style: none; padding: 0; margin: 0; }
ul.feature li { position: relative; padding-left: 20px; margin-bottom: 13px; color: var(--color-sp-text-secondary); font-size: 15.5px; }
ul.feature li::before {
  content: ""; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 2px; background: var(--sp-site-brand);
}
ul.feature strong { color: var(--color-sp-text-primary); font-weight: 650; }

/* ── Artifacts (product mockups) ────────────────────────── */

.artifact {
  border: 1px solid var(--color-sp-border-subtle); border-radius: 12px;
  background: var(--color-sp-surface);
  /* Scroll rather than clip: a narrow screen must still be able to read the
   * right-hand column of a table. */
  overflow-x: auto; overflow-y: hidden;
  box-shadow: 0 8px 28px rgb(16 24 40 / 7%);
}
.artifact table { min-width: 340px; }
.artifact-bar {
  display: flex; align-items: center; gap: 8px; padding: 9px 13px;
  border-bottom: 1px solid var(--color-sp-border-subtle); background: var(--color-sp-canvas);
  font-size: 12.5px; color: var(--color-sp-text-secondary);
}
.artifact-bar .tab {
  padding: 3px 9px; border-radius: 6px; font-weight: 600;
}
.artifact-bar .tab.on { background: var(--color-sp-surface); border: 1px solid var(--color-sp-border-subtle); color: var(--color-sp-text-primary); }
.artifact table { width: 100%; border-collapse: collapse; font-size: 13px; }
.artifact th {
  text-align: left; padding: 9px 13px; font-size: 11px; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--color-sp-text-secondary); font-weight: 700;
  border-bottom: 1px solid var(--color-sp-border-subtle); background: var(--color-sp-canvas);
}
.artifact td { padding: 10px 13px; border-bottom: 1px solid var(--color-sp-border-subtle); vertical-align: middle; }
.artifact tr:last-child td { border-bottom: 0; }
.artifact .name { font-weight: 600; color: var(--color-sp-text-primary); }
.muted { color: var(--color-sp-text-secondary); }
.mono { font-family: var(--sp-mono); font-size: 12.5px; }

.status { font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.status.run { background: #ecfdf3; color: #067647; }
.status.idle { background: #f2f5f8; color: #4b5565; }
.status.wait { background: #fffaeb; color: #b54708; }

/* ── Terminal ───────────────────────────────────────────── */

.terminal {
  background: var(--sp-site-ink); border-radius: 12px; padding: 18px 20px; overflow-x: auto;
}
.terminal pre {
  margin: 0; font-family: var(--sp-mono); font-size: 13px; line-height: 1.8;
  color: #dfe6f2; white-space: pre;
}
.terminal .c { color: #7d93b2; }
.terminal .g { color: var(--sp-site-live); }
.terminal .r { color: #ff9b94; }
.terminal-cap { font-size: 13px; color: var(--color-sp-text-secondary); margin: 12px 0 0; }

/* ── Facts row ──────────────────────────────────────────── */


/* ── Tables on prose/content sections ───────────────────── */

.table-scroll { overflow-x: auto; border: 1px solid var(--color-sp-border-subtle); border-radius: var(--sp-radius); background: var(--color-sp-surface); }
.table-scroll table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.table-scroll th, .table-scroll td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--color-sp-border-subtle); vertical-align: top; }
.table-scroll th { font-size: 11.5px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--color-sp-text-secondary); background: var(--color-sp-canvas); font-weight: 700; }
.table-scroll tbody tr:last-child td { border-bottom: 0; }
code {
  font-family: var(--sp-mono); font-size: 0.9em;
  background: color-mix(in srgb, var(--color-sp-text-primary) 5%, var(--color-sp-surface));
  border: 1px solid var(--color-sp-border-subtle); border-radius: 5px; padding: 0.1em 0.35em;
}
td code, th code { white-space: nowrap; }

.callout {
  border: 1px solid var(--color-sp-border);
  border-radius: var(--sp-radius); background: var(--color-sp-canvas); padding: 17px 19px;
}
.callout p { margin: 0 0 10px; color: var(--color-sp-text-secondary); font-size: 15px; }
.callout :last-child { margin-bottom: 0; }

/* ── FAQ ────────────────────────────────────────────────── */

/* Wider and larger than the policy prose: these are the answers a cautious
   reader came for, so they get a frame of their own rather than the 720px
   measure the legal pages use. The answer text still stops at ~68 characters,
   which is the readable measure; only the row is wide. */
.faq { max-width: 880px; }
.faq h2 { margin-bottom: 14px; }
.faq details { border-bottom: 1px solid var(--color-sp-border-subtle); padding: 21px 0; }
.faq summary { cursor: pointer; font-weight: 650; color: var(--sp-site-ink); font-size: 18.5px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--color-sp-text-secondary); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq p { color: var(--color-sp-text-secondary); margin: 13px 0 0; font-size: 16.5px; line-height: 1.6; max-width: 68ch; }

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

.cta-band { background: var(--sp-site-ink); padding: 68px 0; text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #9fc0f0; max-width: 34em; margin: 0 auto 26px; }
.cta-band .actions { justify-content: center; }
.cta-band .btn-quiet { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff; }

/* ── Prose (policy pages) ───────────────────────────────── */

.prose { max-width: var(--sp-prose); padding: 52px 0 76px; }
.prose h1 { font-size: clamp(28px, 4vw, 38px); max-width: none; }
.prose h2 { font-size: 21px; margin: 38px 0 10px; }
.prose h3 { font-size: 16.5px; margin: 26px 0 8px; color: var(--sp-site-ink); }
.prose p, .prose li { color: var(--color-sp-text-secondary); }
.prose ul { padding-left: 21px; }
.prose li { margin-bottom: 8px; }
.prose .table-scroll { margin: 20px 0; }
.updated { font-size: 14px; color: var(--color-sp-text-secondary); margin: 0 0 26px; }

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

.site-footer { border-top: 1px solid var(--color-sp-border-subtle); background: var(--color-sp-canvas); padding: 34px 0 46px; font-size: 14px; color: var(--color-sp-text-secondary); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: flex-start; }
.site-footer a { color: var(--color-sp-text-secondary); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-note { max-width: 34em; margin: 0; }

@media (max-width: 900px) {
  .two-col, .two-col.flip > .col-text { grid-template-columns: 1fr; order: initial; }
  .two-col { gap: 28px; }
  .flow-grid { grid-template-columns: 1fr; gap: 12px; }
  .flow-arrow { display: none; }
}

@media (max-width: 640px) {
  section.numbered { padding: 48px 0; }
  .hero { padding: 56px 0 40px; }
  .site-nav { gap: 14px; font-size: 14px; }
  .site-nav a[href^="#"] { display: none; }
  .site-nav .btn { padding: 8px 13px; }
  h1 { max-width: none; }
}

/* ── Hero points (the triad under the fold line) ────────── */

.hero-points {
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  list-style: none; padding: 0; margin: 26px 0 0;
  font-size: 14.5px; color: var(--color-sp-text-secondary);
}
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--sp-site-brand); flex: none;
}

/* ── Logo wall ──────────────────────────────────────────── */

.centered { text-align: center; }
.section-lede.centered { margin-left: auto; margin-right: auto; }
.logo-wall {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 12px; margin-top: 30px;
}
.logo-card {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  border: 1px solid var(--color-sp-border-subtle); border-radius: var(--sp-radius);
  background: var(--color-sp-surface); padding: 15px 12px;
  font-size: 14px; font-weight: 500; color: var(--color-sp-text-primary);
}
.logo-card img, .logo-card svg { display: block; flex: none; }
/* The catalogue is still growing, so the wall ends on an open slot
   rather than implying seven is the whole of it. */
.logo-card.more { border-style: dashed; color: var(--color-sp-text-secondary); background: transparent; }

/* ── Pod stack (several agents, each sealed) ────────────── */

.pod-stack { display: grid; gap: 7px; }
.pod {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid var(--color-sp-border-subtle); border-radius: 8px;
  background: var(--color-sp-canvas); padding: 10px 12px;
  font-size: 13.5px; font-weight: 500; color: var(--sp-site-ink);
}
.pod-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--sp-site-brand);
}
.flow-foot { font-size: 12.5px; color: var(--color-sp-text-secondary); margin: 10px 0 0; }

/* ── Roadmap (stated, never implied) ────────────────────── */

.logo-wall.compact { margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
/* The runtime shelf has no logos, so the five names are pinned to one row
   rather than left to auto-fit into an uneven 4 + 1. */
#choose .logo-wall.compact { grid-template-columns: repeat(5, 1fr); gap: 6px; }
#choose .logo-wall.compact .logo-card { padding: 10px 6px; font-size: 12.5px; }
@media (max-width: 560px) {
  #choose .logo-wall.compact { grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); }
}
.logo-wall.compact .logo-card { padding: 10px 8px; font-size: 13px; gap: 7px; }

/* ── Hero diagram tiles ─────────────────────────────────── */

.tile-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tile {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 7px;
  border: 1px solid var(--color-sp-border-subtle); background: var(--color-sp-surface);
  color: var(--color-sp-text-primary); white-space: nowrap;
}
.tile img { display: block; flex: none; }
.tile-more { color: var(--color-sp-text-secondary); border-style: dashed; }
.pod.ghost { color: var(--color-sp-text-secondary); border-style: dashed; }
.pod.ghost .pod-dot { background: var(--color-sp-border); }

/* ── Tabbed artifacts, without JavaScript ───────────────── */

.artifact { position: relative; }
.artifact > input { position: absolute; opacity: 0; width: 0; height: 0; }
/* Panels are stacked in one grid cell rather than toggled with display, so the
   artifact is always as tall as its tallest panel. With display:none the box
   resized on every click and shoved the content below it up and down. */
.artifact .panels { display: grid; }
.artifact .panel { grid-area: 1 / 1; visibility: hidden; }
.artifact input.t1:checked ~ .panels .p1,
.artifact input.t2:checked ~ .panels .p2 { visibility: visible; }

.artifact-bar label.tab { cursor: pointer; user-select: none; }
.artifact input.t1:checked ~ .artifact-bar label.l1,
.artifact input.t2:checked ~ .artifact-bar label.l2 {
  background: var(--color-sp-surface);
  border: 1px solid var(--color-sp-border-subtle);
  color: var(--color-sp-text-primary);
}
.artifact input:focus-visible ~ .artifact-bar label.l1,
.artifact input.t2:focus-visible ~ .artifact-bar label.l2 {
  outline: 2px solid var(--sp-site-brand); outline-offset: 1px;
}
.artifact-hint {
  font-size: 12px; color: var(--color-sp-text-secondary);
  margin: 10px 0 0; display: flex; align-items: center; gap: 6px;
}
.artifact-hint::before { content: "↹"; color: var(--sp-site-brand); }

/* Hero diagram: three narrow columns beside the copy. */
.hero-grid .flow-grid { grid-template-columns: 1fr auto 0.8fr auto 1.15fr; gap: 0 10px; }
.hero-grid .flow-box.center { padding: 13px; }
.pills.stack { flex-direction: column; align-items: stretch; gap: 5px; margin-top: 10px; }
.pills.stack .pill { text-align: center; }
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero h1, .hero .lede { max-width: none; }
}

/* ── Hero diagram ───────────────────────────────────────────
 * An agent is a runtime, a model, its files and its memory —
 * all of it inside the pod. SafePod is the boundary it reaches
 * through. Laid out as an explicit two-row grid so the three
 * column labels share one baseline.
 */
.diagram {
  display: grid;
  grid-template-columns: 0.82fr 30px 1.75fr 58px 0.75fr;
  grid-template-rows: auto 1fr;
  column-gap: 10px; row-gap: 10px;
  align-items: stretch;
}
.diagram > * { min-width: 0; }
.diagram > .dg-col { display: flex; flex-direction: column; justify-content: space-between; }
.dg-c1 { grid-column: 1; } .dg-c2 { grid-column: 2; }
.dg-c3 { grid-column: 3; } .dg-c4 { grid-column: 4; }
.dg-c5 { grid-column: 5; }
.diagram > .dg-label { grid-row: 1; margin: 0; }
.diagram > .dg-col, .diagram > .dg-wire { grid-row: 2; }
.dg-label {
  white-space: nowrap;
  font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--sp-site-brand-deep);
}
.dg-foot { font-size: 12px; color: var(--color-sp-text-secondary); margin: 9px 0 0; }

.podcard {
  border: 1px solid color-mix(in srgb, var(--sp-site-brand) 34%, transparent);
  border-radius: 11px; background: var(--color-sp-surface);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--sp-site-brand) 12%, transparent);
  overflow: hidden;
}
.podcard-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--sp-site-ink); white-space: nowrap;
  border-bottom: 1px solid var(--color-sp-border-subtle);
  background: color-mix(in srgb, var(--sp-site-brand) 5%, var(--color-sp-surface));
}
.podparts { list-style: none; margin: 0; padding: 7px 11px; display: grid; gap: 3px; }
.podparts li {
  display: grid; grid-template-columns: 14px 50px 1fr; align-items: center; gap: 6px; min-width: 0;
  padding: 0; font-size: 10.5px; color: var(--color-sp-text-secondary);
  line-height: 1.3;
}
.podparts b {
  font-weight: 500; color: var(--sp-site-ink);
  font-family: var(--sp-mono); font-size: 10.5px; overflow-wrap: anywhere;
}
.podrow { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.podrow > * { min-width: 0; }
.pi { color: var(--sp-site-brand); display: block; }
.pi svg { width: 15px; height: 15px; display: block; }

.podghost {
  margin-top: 7px; border: 1px dashed var(--color-sp-border); border-radius: 9px;
  padding: 8px 12px; font-size: 12.5px; color: var(--color-sp-text-secondary);
  background: color-mix(in srgb, var(--color-sp-surface) 55%, transparent);
}

.platform {
  border: 1.5px solid color-mix(in srgb, var(--sp-site-brand) 40%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--sp-site-brand) 4%, var(--color-sp-surface));
  padding: 12px;
}
/* Depth here comes from tint contrast, not from a shadow: a white card on a
   cool-tinted frame. The diagram already has exactly one shadowed element —
   .podcard, the running pod — and a second one competes with it. The tasks are
   outlined like the connector .tile on the other side, so both flanks of the
   diagram speak the same flat, outlined language. */
.taskframe {
  border: 1px solid var(--color-sp-border-subtle); border-radius: 12px;
  background: color-mix(in srgb, var(--sp-site-brand) 4%, var(--color-sp-surface));
  padding: 11px;
}
.task {
  border: 1px solid color-mix(in srgb, var(--sp-site-brand) 18%, transparent);
  border-radius: 8px;
  background: var(--color-sp-surface); padding: 8px 11px;
  font-size: 12px; line-height: 1.35; color: var(--color-sp-text-primary);
}
/* The queued task has not been picked up yet, so it stays on the frame. */
.task.ghost {
  border-style: dashed; color: var(--color-sp-text-secondary);
  background: transparent;
}
.podtag {
  margin-left: auto; font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--sp-site-brand-deep);
  border: 1px solid color-mix(in srgb, var(--sp-site-brand) 30%, transparent);
  border-radius: 99px; padding: 1px 7px; background: var(--color-sp-surface);
}
.podmini {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  border: 1px solid color-mix(in srgb, var(--sp-site-brand) 30%, transparent);
  border-radius: 8px; background: var(--color-sp-surface); padding: 7px 9px;
  font-size: 11px; font-weight: 500; color: var(--sp-site-ink);
}
.platform-foot {
  margin: 10px 0 0; padding-top: 9px; font-size: 11.5px; text-align: center;
  color: var(--color-sp-text-secondary);
  border-top: 1px dashed color-mix(in srgb, var(--sp-site-brand) 28%, transparent);
}
.corelist { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.corelist span {
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--sp-site-brand-deep);
  background: color-mix(in srgb, var(--sp-site-brand) 11%, transparent);
  border-radius: 6px; padding: 4px 9px;
}
.tile-col { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.tile-col .tile { justify-content: flex-start; font-size: 11.5px; padding: 5px 9px; gap: 6px; }
.tile-col .tile img { width: 13px; height: 13px; }

/* The wire, and the request travelling along it. */
.dg-fan { align-self: stretch; display: block; width: 100%; height: 100%; overflow: visible; }
.dg-fan path {
  fill: none; stroke: color-mix(in srgb, var(--sp-site-brand) 42%, transparent);
  stroke-width: 1.25; vector-effect: non-scaling-stroke;
  stroke-dasharray: 5 7; animation: dg-draw 2.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .dg-fan path { animation: none; } }
@keyframes dg-draw { to { stroke-dashoffset: -24; } }
.dg-wire { align-self: center; position: relative; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--sp-site-brand) 15%, transparent),
    color-mix(in srgb, var(--sp-site-brand) 45%, transparent)); }
.spark {
  position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--sp-site-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-site-brand) 22%, transparent);
  animation: dg-flow 2.6s cubic-bezier(.4,0,.6,1) infinite;
}
.spark.s2 { animation-delay: 0.65s; }
@keyframes dg-flow {
  0%   { left: 0; opacity: 0; }
  12%  { opacity: 1; }
  82%  { opacity: 1; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .spark { animation: none; opacity: 0.85; } }

@media (max-width: 980px) {
  .podparts { grid-template-columns: 1fr; }
  .podrow { grid-template-columns: 1fr; }
  .diagram { grid-template-columns: 1fr; grid-template-rows: none; }
  .diagram > .dg-label, .diagram > .dg-col, .diagram > .dg-wire { grid-column: 1; grid-row: auto; }
  .dg-wire { height: 26px; width: 2px; margin: 0 auto;
    background: linear-gradient(180deg, color-mix(in srgb, var(--sp-site-brand) 15%, transparent),
      color-mix(in srgb, var(--sp-site-brand) 45%, transparent)); }
  .spark { animation: none; display: none; }
}

/* ── Isolation diagram ──────────────────────────────────── */
/* Replaces a terminal transcript: the point is "nothing touches it, it touches
   nothing, and the key is not inside", which is a picture, not a shell log. */

.iso { display: grid; justify-items: center; gap: 0; }
.iso-cap {
  margin: 0; font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--color-sp-text-secondary);
}
.iso-cap-in { margin-bottom: 9px; }
.iso-cap-out { margin-top: 12px; }
.iso-deny { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-bottom: 4px; }
.iso-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--color-sp-text-secondary);
  border: 1px dashed var(--color-sp-border); border-radius: 999px;
  padding: 4px 11px; background: var(--color-sp-surface);
}
.iso-x { color: #d4453c; font-weight: 700; font-size: 13px; line-height: 1; }

/* The enclosure. Closed on the top, both sides, and most of the bottom — the
   gap in the bottom edge is the one door, and the funnel leaves through it.
   A single line above the pods labelled the idea; a box draws it. */
.iso-pods {
  position: relative;
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch;
  width: 100%; gap: 0;
  border: 2px dashed color-mix(in srgb, var(--sp-site-brand) 38%, transparent);
  border-bottom: none; border-radius: 14px 14px 0 0;
  padding: 16px 13px 54px; margin-top: 10px;
}
/* The two stubs of the bottom edge, leaving a gap in the middle for the exit. */
.iso-pods::before, .iso-pods::after {
  content: ""; position: absolute; bottom: -2px; height: 2px;
  background-image: repeating-linear-gradient(to right,
    color-mix(in srgb, var(--sp-site-brand) 38%, transparent) 0 6px, transparent 6px 12px);
}
.iso-pods::before { left: 0; width: 44%; }
.iso-pods::after { right: 0; width: 44%; }
.iso-pod {
  min-width: 0; text-align: center;
  border: 1.5px solid color-mix(in srgb, var(--sp-site-brand) 42%, transparent);
  border-radius: 10px; background: var(--color-sp-surface); padding: 11px 9px;
}
.iso-name {
  margin: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--sp-site-ink);
}
.iso-files {
  margin: 7px 0 0; padding-top: 7px; font-size: 11.5px; color: var(--color-sp-text-secondary);
  border-top: 1px dashed var(--color-sp-border-subtle);
}
/* A wall between neighbours, with the X that says they cannot cross it. */
.iso-wall {
  position: relative; width: 34px;
  display: flex; align-items: center; justify-content: center;
}
.iso-wall::before {
  content: ""; position: absolute; top: -16px; bottom: 40px; left: 50%; width: 0;
  border-left: 2px dashed color-mix(in srgb, var(--sp-site-brand) 38%, transparent);
}
.iso-wall .iso-x {
  position: relative; background: var(--color-sp-canvas);
  line-height: 1; padding: 2px 3px; font-size: 14px;
}

.iso-funnel { width: calc(100% - 26px); height: 50px; margin-top: -52px; }
.iso-funnel path { fill: none; stroke: color-mix(in srgb, var(--sp-site-brand) 46%, transparent); stroke-width: 1.4; }

.iso-key {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 8px;
  border: 1.5px solid color-mix(in srgb, var(--sp-site-brand) 40%, transparent);
  border-radius: 10px; padding: 10px 14px;
  background: color-mix(in srgb, var(--sp-site-brand) 6%, var(--color-sp-surface));
  font-size: 13px; font-weight: 500; color: var(--sp-site-ink);
}
.iso-keyicon { width: 22px; height: 22px; flex: none; color: var(--sp-site-brand); }
.iso-drop { width: 20px; height: 24px; margin: 2px 0; }
.iso-drop path { fill: none; stroke: color-mix(in srgb, var(--sp-site-brand) 46%, transparent); stroke-width: 1.6; stroke-linecap: round; }
.iso-out { margin: 0 0 9px; font-size: 12.5px; color: var(--color-sp-text-secondary); }
/* The end of the path is the services themselves, not a sentence about them. */
.iso-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }

/* ── "Why SafePod" thesis band ──────────────────────────── */
/* Sits between the hero and 01. One long sentence whose four clauses are the
   four numbered sections, so the reader knows what is coming. */

/* Measured off litellm.ai: left-aligned, 48px/500, the headline filling the
   content frame, the accent phrase sitting mid-sentence, and the whole band on
   a dotted field ruled at the frame edges so it reads as its own beat. */
.why {
  border-top: 1px solid var(--color-sp-border-subtle);
  border-bottom: 1px solid var(--color-sp-border-subtle);
  background-image: radial-gradient(circle,
    color-mix(in srgb, var(--sp-site-ink) 13%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
}
/* The rules live on .wrap, not .why, so they run the full height of the dotted
   field the way litellm's do, rather than stopping at the text. */
.why .wrap {
  padding: 70px 56px 74px;
  border-left: 1px solid var(--color-sp-border-subtle);
  border-right: 1px solid var(--color-sp-border-subtle);
}
.why-h {
  font-size: clamp(29px, 3.9vw, 48px);
  line-height: 1.2; letter-spacing: -0.018em; font-weight: 500;
  max-width: none; margin: 0; color: var(--sp-site-ink);
}
.why-h .accent { color: var(--sp-site-brand); display: inline; }

/* ── Waitlist ───────────────────────────────────────────── */

.wl-row { display: grid; gap: 6px; width: 100%; }
.wl-label { font-size: 13.5px; font-weight: 500; color: var(--sp-site-ink); }
.wl-label span {
  font-weight: 400; color: var(--color-sp-text-secondary);
  font-size: 12.5px; margin-left: 4px;
}
.wl-input {
  width: 100%; font: inherit; font-size: 15px; color: var(--color-sp-text-primary);
  background: var(--color-sp-surface); padding: 11px 13px;
  border: 1px solid var(--color-sp-border); border-radius: 8px;
}
.wl-input::placeholder { color: var(--color-sp-text-secondary); opacity: 0.75; }
.wl-input:focus-visible {
  outline: none; border-color: var(--sp-site-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-site-brand) 20%, transparent);
}
.wl-input[aria-invalid="true"] { border-color: #d4453c; }
.wl-submit { cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 500; }
.wl-submit[disabled] { opacity: 0.6; cursor: progress; }

/* Off-screen rather than display:none — a bot that skips hidden fields is
   exactly the bot this is trying to catch. */
.wl-trap {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  overflow: hidden;
}

.wl-form { display: grid; gap: 10px; justify-items: start; }
.wl-input[name="note"] { max-width: 440px; }

/* Hero variant: one field and the button on a single line, so the ask costs a
   reader nothing but typing. */
.wl-inline { margin: 30px 0 0; gap: 8px; }
.wl-inline-row { display: flex; gap: 10px; width: 100%; max-width: 440px; }
.wl-inline .wl-input { flex: 1 1 auto; min-width: 0; }
.wl-inline .wl-submit { flex: none; }

.wl-status { margin: 0; font-size: 14px; min-height: 1.4em; }
.wl-status[data-state="ok"] { color: #0b7a53; }
.wl-status[data-state="error"] { color: #b42318; }
.wl-fine { margin: 0; font-size: 13px; color: var(--color-sp-text-secondary); max-width: 46em; }

@media (max-width: 560px) {
  .wl-inline-row { flex-direction: column; }
  .wl-inline .wl-submit { width: 100%; }
}

/* The closing form lives on the dark band, centred and filling the frame, so
   the page ends on one ask rather than a narrow column beside empty space. */
.wl-centred { margin: 26px auto 0; justify-items: center; text-align: center; }
/* Stacked, not inline: the button sits under both fields so the optional
   question is read before the reader commits, rather than after. */
.wl-centred .wl-input { width: 100%; max-width: 440px; }
.wl-centred .wl-submit { margin-top: 2px; }
.cta-band .wl-fine { color: #9fc0f0; max-width: 42em; margin: 0 auto; }
.cta-band .wl-fine a { color: #fff; }
.cta-band .wl-status { margin: 0; }
.cta-band .wl-status[data-state="ok"] { color: #6ee7b7; }
.cta-band .wl-status[data-state="error"] { color: #fda29b; }
.cta-band .wl-input { border-color: rgba(255,255,255,0.25); }

/* Turnstile, in invisible mode, injects a zero-height element here. That is
   still a grid row, and a grid row still gets the 10px gap — so the button
   and everything under it jumped 10px the moment the widget loaded, a visible
   lurch a second after the page settled.
   Taking the container out of flow removes the row, the gap and the lurch.
   NOTE: this assumes the widget is in Invisible mode. Switching it back to
   Managed or Non-Interactive in the Cloudflare dashboard means reverting
   this, or the visible widget will be positioned off-screen. */
.wl-captcha {
  position: absolute;
  width: 0; height: 0; overflow: hidden;
}

/* ── Mobile ─────────────────────────────────────────────── */
/*
 * Measured on a real page at 320–768px, not guessed. Three findings, each
 * with a reason to care beyond a lint rule:
 *
 *  1. The tabbed artifacts and the FAQ rows are the only things on the page a
 *     visitor is invited to TAP, and they were 25–28px tall. Apple's floor is
 *     44px, and below it people miss and give up rather than try again.
 *  2. The pod card's attribute list rendered at 10.5px, which is unreadable on
 *     a phone — and it is the part of the hero diagram that carries the
 *     argument.
 *  3. The artifacts scroll horizontally inside their own box (scrollWidth 340
 *     vs 276), which is correct, but nothing told the reader that. A scroll
 *     hint costs nothing and prevents "the table is cut off".
 */
@media (max-width: 768px) {
  /* Tap targets. Padding rather than height, so the label grows with its
     text instead of being centred in a box that no longer fits it. */
  .artifact-bar { padding: 7px 11px; }
  .artifact-bar .tab { padding: 12px 14px; }
  .faq summary { padding: 12px 0; }
  .footer-links { gap: 8px 22px; }
  .footer-links a { display: inline-block; padding: 11px 0; }

  /* Readable at arm's length. The diagrams shrink on a phone, and these are
     the labels that carry their meaning — a caption nobody can read is just
     texture. */
  .podparts li { font-size: 12px; }
  .dg-label, .iso-cap { font-size: 12px; }
  .iso-files, .platform-foot, .iso-chip, .iso-out { font-size: 12.5px; }
  /* The hero diagram's own `.tile-col .tile` rule (0,2,0) sits later in the
     file, so matching its specificity is not enough — it has to be named. */
  .tile, .tile-row .tile, .iso-tiles .tile, .tile-col .tile { font-size: 12.5px; }
  .wl-fine, .artifact-hint { font-size: 13px; }

  /* Say that the box scrolls, rather than leaving it to be discovered. */
  .artifact { -webkit-overflow-scrolling: touch; }
  .artifact-hint::after {
    content: " Tables scroll sideways.";
    color: var(--color-sp-text-secondary);
  }
}

/* The hero diagram, on a phone.
 *
 * It is a five-column grid — tasks, a wire, the pod, a fan of eight curves,
 * the data sources — and that is a shape for a wide screen. Measured at 390px
 * it collapsed to columns of 24px / 0 / 125px / 99px: the task column was
 * narrower than a word, and the whole thing was 1466px tall.
 *
 * Stacked, it reads top to bottom instead of left to right. The connectors go
 * with the side-by-side layout: a curve from one stacked box to the next says
 * nothing a vertical order does not already say.
 */
@media (max-width: 768px) {
  .diagram { display: flex; flex-direction: column; gap: 8px; }
  .dg-wire, .dg-fan { display: none; }

  .dg-label.dg-c1 { order: 1; }
  .dg-col.dg-c1   { order: 2; }
  .dg-label.dg-c3 { order: 3; margin-top: 10px; }
  .platform       { order: 4; }
  .dg-label.dg-c5 { order: 5; margin-top: 10px; }
  .dg-col.dg-c5   { order: 6; }

  /* These stretched to fill a grid row that no longer exists. */
  .dg-col, .tile-col { height: auto; display: block; }
  .taskframe { display: grid; gap: 8px; }
  .tile-col { display: flex; flex-wrap: wrap; gap: 6px; }
  .tile-col .tile { flex: 1 1 auto; }
  .podrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
}
