  :root {
    /* SpecDeck DS — dark canonical theme */
    --bg: #0a0d10;
    --panel: #11171c;
    --panel-2: #1a2128;
    --panel-3: #232b33;
    --fg: #f0f4f8;
    --fg-2: #b6c0cc;
    --muted: #7e8a96;
    --faint: #565e67;
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.14);
    --border-bright: rgba(255,255,255,0.22);
    --accent: #14b8a6;
    --accent-hover: #0d9488;
    --accent-2: #14b8a6;
    --accent-ink: #02110f;
    --accent-muted: rgba(20,184,166,0.12);
    --accent-glow: rgba(20,184,166,0.30);
    /* Status palette — lifecycle only */
    --status-progress: #3b82f6;
    --status-published: #10b981;
    --status-done: #a78bfa;
    --status-blocked: #ef4444;
    --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  }

  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--fg);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  .container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 28px;
  }

  a:hover { color: var(--fg) !important; }

  .btn-primary {
    display: inline-block;
    padding: 8px 14px;
    background: var(--accent);
    color: var(--accent-ink) !important;
    border: 1px solid var(--accent);
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background 120ms ease, transform 120ms ease;
  }
  .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn-primary:active { transform: scale(0.98); }
  .btn-primary.btn-lg { padding: 11px 18px; font-size: 14px; }

  .btn-ghost {
    display: inline-block;
    padding: 8px 14px;
    background: transparent;
    color: var(--fg) !important;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 120ms ease, border-color 120ms ease;
  }
  .btn-ghost:hover { border-color: var(--border-bright); background: var(--panel-2); }
  .btn-ghost.btn-lg { padding: 11px 18px; font-size: 14px; }

  .btn-outline {
    display: inline-block;
    padding: 8px 14px;
    background: transparent;
    color: var(--fg) !important;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 120ms ease, border-color 120ms ease;
  }
  .btn-outline:hover { border-color: var(--accent); background: var(--accent-muted); }

  .pulse-dot {
    animation: pulse 1.6s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, #35D07F 50%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in oklab, #35D07F 0%, transparent); }
  }
  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes blink { 50% { opacity: 0; } }
  @keyframes livePulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--accent-muted); }
    50% { box-shadow: 0 0 0 6px transparent; }
  }

  /* ============================================================
     RESPONSIVE — tablet (<= 960px)
     ============================================================ */
  @media (max-width: 960px) {
    .container { padding-left: 20px !important; padding-right: 20px !important; }

    /* Spec architecture: stack */
    .arch-grid { grid-template-columns: 1fr !important; }

    /* Goal board: 3 status lanes -> stack */
    .status-lanes { grid-template-columns: 1fr !important; }

    /* How it works: 3 cards stack */
    .how-steps { grid-template-columns: 1fr !important; }
    .how-cards { grid-template-columns: 1fr !important; }

    /* Built for the whole team: 3 cards stack */
    .team-grid { grid-template-columns: 1fr !important; }

    /* Ownership modes: 3 cards stack */
    .modes-grid { grid-template-columns: 1fr !important; }

    /* Pricing: stack */
    .pricing-grid {
      grid-template-columns: 1fr !important;
      gap: 32px !important;
    }

    /* Roadmap: 4 -> 2 */
    .roadmap-grid { grid-template-columns: 1fr 1fr !important; }
    .roadmap-grid > div:nth-child(3) { border-top: 1px solid var(--border); border-left: none !important; }
    .roadmap-grid > div:nth-child(4) { border-top: 1px solid var(--border); }
  }

  /* ============================================================
     RESPONSIVE — mobile (<= 760px)
     ============================================================ */
  @media (max-width: 760px) {
    /* Hide desktop nav, show hamburger */
    .nav-links-desktop,
    .nav-cta-desktop { display: none !important; }
    .nav-burger { display: inline-flex !important; }

    /* Tighter container padding */
    .container { padding-left: 16px !important; padding-right: 16px !important; }

    /* Hero — tighten header-to-badge gap on mobile */
    .hero-default {
      padding-top: 28px !important;
      padding-bottom: 48px !important;
    }

    /* Docs landing hero — same header-to-badge spacing rule */
    .docs-landing-hero {
      padding-top: 22px !important;
    }

    /* Integration logos: stack neatly */
    .integration-logos {
      justify-content: center !important;
      gap: 16px 28px !important;
    }

    /* Section padding */
    #preview, #how, #pricing, #team, #shift, #control { padding-top: 64px !important; }

    /* Buttons full-width-ish */
    .btn-primary.btn-lg,
    .btn-ghost.btn-lg { padding: 12px 18px !important; font-size: 14px !important; }
  }

  /* ============================================================
     RESPONSIVE — small mobile (<= 480px)
     ============================================================ */
  @media (max-width: 480px) {
    .container { padding-left: 16px !important; padding-right: 16px !important; }

    /* Roadmap: 2 -> 1 */
    .roadmap-grid { grid-template-columns: 1fr !important; }
    .roadmap-grid > div { border-left: none !important; }
    .roadmap-grid > div + div { border-top: 1px solid var(--border); }

    /* Footer: keep logo and links on one row */
    .footer-inner { flex-wrap: nowrap !important; gap: 12px !important; }

    /* Card padding shrink */
    .arch-grid > *,
    .status-lanes > * { padding: 14px !important; }
  }

  /* hide the burger by default on desktop */
  .nav-burger { display: none; }

  ::selection { background: color-mix(in oklab, var(--accent) 45%, transparent); color: var(--fg); }

  /* ============================================================
     DOCS — shared chrome for the /docs/ pages
     ============================================================ */
  html { scroll-behavior: smooth; }
  body.docs a { color: var(--accent); text-decoration: none; }
  body.docs a strong { color: inherit; }

  /* Door cards on docs landing */
  .door-card:hover {
    border-color: var(--border-bright) !important;
    transform: translateY(-3px);
    box-shadow: 0 24px 60px -28px color-mix(in oklab, black 60%, transparent);
  }

  /* Custom scrollbar inside sidebar */
  .docs-sidebar::-webkit-scrollbar { width: 6px; }
  .docs-sidebar::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
  .docs-sidebar::-webkit-scrollbar-track { background: transparent; }

  /* Scrollbar inside code blocks */
  pre::-webkit-scrollbar { height: 8px; }
  pre::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
  pre::-webkit-scrollbar-track { background: transparent; }

  /* Docs responsive */
  @media (max-width: 1080px) {
    body.docs .container { padding-left: 20px !important; padding-right: 20px !important; }
    .docs-grid {
      grid-template-columns: 220px 1fr !important;
      gap: 32px !important;
    }
  }

  @media (max-width: 860px) {
    .docs-grid {
      grid-template-columns: 1fr !important;
      gap: 0 !important;
    }
    .docs-sidebar { display: none !important; }
    .doors-grid {
      grid-template-columns: 1fr !important;
    }
    .glance-grid {
      grid-template-columns: 1fr 1fr !important;
    }
  }

  @media (max-width: 480px) {
    .glance-grid { grid-template-columns: 1fr !important; }
  }

  /* ============================================================
     LEGAL — scoped chrome shared by the /privacy/ and /terms/ pages
     ============================================================ */
  body.privacy a, body.terms a { color: inherit; }
  body.privacy section[id], body.terms section[id] { scroll-margin-top: 80px; }

  body.privacy .hero, body.terms .hero {
    position: relative;
    padding: 88px 0 56px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--accent) 3%, transparent) 60%, transparent);
    overflow: hidden;
  }
  body.privacy .hero-grid, body.terms .hero-grid {
    position: absolute; inset: 0;
    background-image:
      linear-gradient(to right, var(--border) 1px, transparent 1px),
      linear-gradient(to bottom, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
    mask-image: radial-gradient(ellipse at 50% 30%, black 0%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
  }
  body.privacy .hero-inner, body.terms .hero-inner { position: relative; }

  body.privacy .eyebrow, body.terms .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--mono); font-size: 11.5px;
    color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase;
  }
  body.privacy .eyebrow::before, body.terms .eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 8px var(--accent);
  }

  body.privacy .h1, body.terms .h1 {
    font-family: var(--display);
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02; letter-spacing: -0.035em;
    font-weight: 600;
    margin: 18px 0 18px;
    text-wrap: balance;
  }
  body.privacy .lead, body.terms .lead {
    font-family: var(--display);
    font-size: clamp(18px, 1.7vw, 22px);
    line-height: 1.5; color: var(--fg-2);
    max-width: 640px; margin: 0;
    text-wrap: pretty;
    font-weight: 400;
  }

  body.privacy .meta-row, body.terms .meta-row {
    margin-top: 36px;
    display: flex; flex-wrap: wrap; gap: 12px;
    font-family: var(--mono); font-size: 11.5px;
    color: var(--muted);
  }
  body.privacy .meta-row .chip, body.terms .meta-row .chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 10px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 999px;
  }
  body.privacy .meta-row .chip b, body.terms .meta-row .chip b { color: var(--fg); font-weight: 500; }

  body.privacy .body, body.terms .body { min-width: 0; }
  body.privacy .body h2, body.terms .body h2 {
    font-family: var(--display);
    font-size: clamp(24px, 2.4vw, 30px);
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-weight: 600;
    margin: 0 0 8px;
    text-wrap: balance;
  }
  body.privacy .body h2 .num, body.terms .body h2 .num {
    font-family: var(--mono); font-size: 12px;
    color: var(--accent); font-weight: 500;
    letter-spacing: 0.12em;
    display: block; margin-bottom: 10px;
  }
  body.privacy .body h3, body.terms .body h3 {
    font-family: var(--sans);
    font-size: 14px; font-weight: 600;
    margin: 22px 0 6px;
    color: var(--fg);
    letter-spacing: -0.005em;
  }
  body.privacy .body p, body.terms .body p {
    color: var(--fg-2);
    font-size: 15px; line-height: 1.65;
    margin: 0 0 14px;
    text-wrap: pretty;
  }
  body.privacy .body ul, body.terms .body ul {
    margin: 0 0 14px; padding: 0; list-style: none;
    display: flex; flex-direction: column; gap: 8px;
  }
  body.privacy .body ul li, body.terms .body ul li {
    position: relative;
    padding-left: 22px;
    color: var(--fg-2);
    font-size: 15px; line-height: 1.6;
  }
  body.privacy .body ul li::before, body.terms .body ul li::before {
    content: ''; position: absolute;
    left: 4px; top: 0.65em;
    width: 8px; height: 1px;
    background: var(--accent);
  }
  body.privacy .body ul li b, body.terms .body ul li b { color: var(--fg); font-weight: 500; }

  body.privacy .section + .section, body.terms .section + .section {
    margin-top: 48px; padding-top: 40px;
    border-top: 1px solid var(--border);
  }

  body.privacy .callout, body.terms .callout {
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    background: color-mix(in oklab, var(--accent) 4%, transparent);
    border-radius: 0 10px 10px 0;
    padding: 18px 20px;
    margin: 18px 0;
  }
  body.privacy .callout p, body.terms .callout p { margin: 0; color: var(--fg-2); font-size: 14.5px; }
  body.privacy .callout .callout-label, body.terms .callout .callout-label {
    font-family: var(--mono); font-size: 11px;
    color: var(--accent); letter-spacing: 0.12em; text-transform: uppercase;
    margin-bottom: 6px;
  }

  body.privacy .data-table, body.terms .data-table {
    margin: 14px 0 18px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--panel);
  }
  body.privacy .data-row, body.terms .data-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    border-bottom: 1px solid var(--border);
  }
  body.privacy .data-row:last-child, body.terms .data-row:last-child { border-bottom: none; }
  body.privacy .data-row .k, body.terms .data-row .k {
    padding: 14px 16px;
    font-family: var(--mono); font-size: 11.5px;
    color: var(--accent);
    letter-spacing: 0.06em;
    background: color-mix(in oklab, var(--panel-2) 60%, transparent);
    border-right: 1px solid var(--border);
    text-transform: uppercase;
  }
  body.privacy .data-row .v, body.terms .data-row .v {
    padding: 14px 18px;
    font-size: 14px; color: var(--fg-2); line-height: 1.55;
  }
  body.privacy .data-row .v code, body.terms .data-row .v code {
    font-family: var(--mono); font-size: 12.5px;
    color: var(--fg);
    background: var(--panel-2);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
  }

  body.privacy .contact-card, body.terms .contact-card {
    margin-top: 56px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px;
    background:
      radial-gradient(ellipse at top right, color-mix(in oklab, var(--accent) 8%, transparent), transparent 60%),
      var(--panel);
    display: flex; flex-wrap: wrap;
    align-items: center; justify-content: space-between;
    gap: 20px;
  }
  body.privacy .contact-card h3, body.terms .contact-card h3 {
    font-family: var(--display);
    font-size: 22px; letter-spacing: -0.02em;
    margin: 0 0 4px; font-weight: 500;
  }
  body.privacy .contact-card p, body.terms .contact-card p {
    margin: 0; color: var(--fg-2); font-size: 14px;
  }
  body.privacy .contact-card .actions, body.terms .contact-card .actions { display: flex; gap: 10px; flex-wrap: wrap; }
  body.privacy .mono, body.terms .mono { font-family: var(--mono); }

  @media (max-width: 760px) {
    body.privacy .hero, body.terms .hero { padding: 56px 0 36px; }
    body.privacy .data-row, body.terms .data-row { grid-template-columns: 1fr; }
    body.privacy .data-row .k, body.terms .data-row .k { border-right: none; border-bottom: 1px solid var(--border); }
  }
