/* Erised landing page (T-252; revamp 2026-11-25). Everything here is
   re-expressed from the style guide (docs/style-guide/
   cdp-style-guide-v2.html): Color tokens, Type scale, 4px spacing,
   Buttons — the pill system, Links, the hero (h1 + mustard highlight,
   overline chip), cards, badges, avatars, the timeline and the code
   block. Motion is CSS only (no JavaScript, D-119) and switches off
   under prefers-reduced-motion, exactly as the guide does. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/IBMPlexSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --background: #f4f2ec;
  --background-soft: #fbfaf6;
  --foreground: #22241f;
  --body: #4a4c44;
  --card: #ffffff;
  --card-foreground: #22241f;
  --primary: #22241f;
  --primary-foreground: #fbfaf6;
  --primary-hover: #3a3d34;
  --secondary: #edeae0;
  --muted: #eceae1;
  --muted-foreground: #6e7066;
  --accent: #fff6de;
  --accent-foreground: #6b4e00;
  --mustard: #f7a501;
  --mustard-pressed: #dd9001;
  --mustard-deep: #cd8407;
  --coral: #d94836;
  --coral-soft: #fdece9;
  --green: #2c8c66;
  --green-soft: #e4f2ec;
  --purple: #7c44a6;
  --purple-soft: #f1eaf7;
  --blue-soft: #e7ecff;
  --link: #1d4aff;
  --link-hover: #f54e00;
  --border: #c6c4b8;
  --border-soft: #dddad0;
  --ring: #22241f;
  --dark: #22241f;
  --radius: 6px;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #1e201b;
    --background-soft: #24261f;
    --foreground: #f4f2ec;
    --body: #c9cbc0;
    --card: #26281f;
    --card-foreground: #f4f2ec;
    --primary: #f4f2ec;
    --primary-foreground: #22241f;
    --primary-hover: #ffffff;
    --secondary: #33352b;
    --muted: #2c2e26;
    --muted-foreground: #a6a89b;
    --accent: #3a3312;
    --accent-foreground: #f7c948;
    --coral-soft: #3d211c;
    --green-soft: #1e3329;
    --purple-soft: #2e2138;
    --blue-soft: #1e2a52;
    --link: #8fa8ff;
    --link-hover: #f54e00;
    --border: #4a4c40;
    --border-soft: #3a3c32;
    --ring: #f4f2ec;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* Links (guide §Links). Buttons are links too, so they are excluded:
   a pill never takes the link colours. */

a:not(.btn) {
  color: var(--link);
  text-underline-offset: 3px;
}

a:not(.btn):hover {
  color: var(--link-hover);
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 3px;
}

/* Buttons — the pill system (guide §Buttons), exact values. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  border: 1.5px solid var(--foreground);
  cursor: pointer;
  text-decoration: none;
  padding: 0 28px;
  height: 46px;
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
  white-space: nowrap;
  box-shadow: 0 3px 0 var(--foreground);
}

.btn:hover { transform: translateY(-1px); }

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 0 0 var(--foreground);
}

.btn-sm {
  height: 38px;
  padding: 0 20px;
  font-size: 14px;
  box-shadow: 0 2px 0 var(--foreground);
}

.btn-lg {
  height: 52px;
  padding: 0 34px;
  font-size: 16px;
  box-shadow: 0 4px 0 var(--foreground);
}

.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-accent { background: var(--mustard); color: var(--dark); }
.btn-accent:hover { background: var(--mustard-pressed); }
.btn-accent:active { background: var(--mustard-deep); }
.btn-secondary { background: var(--card); color: var(--foreground); }
.btn-secondary:hover { background: var(--secondary); }

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--background);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { display: block; height: 32px; width: auto; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav a:not(.btn) {
  color: var(--muted-foreground);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.header-nav a:not(.btn):hover { color: var(--foreground); }

/* Guide pieces: overline chip, pill tag, cards, badges, avatars. */

.overline {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--foreground);
  background: var(--secondary);
  padding: 3px 9px;
  border-radius: 4px;
  margin: 0;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  background: var(--card);
  color: var(--foreground);
  padding: 5px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--foreground);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid var(--foreground);
  white-space: nowrap;
}

.badge-page { background: var(--blue-soft); color: var(--link); }
.badge-track { background: var(--accent); color: var(--accent-foreground); }
.badge-identify { background: var(--purple-soft); color: var(--purple); }
.badge-live { background: var(--coral-soft); color: var(--coral); }
.badge-ok { background: var(--green-soft); color: var(--green); }
.badge-tier1 { background: var(--mustard); color: var(--dark); }
.badge-muted {
  background: var(--muted);
  color: var(--muted-foreground);
  border-color: var(--border);
}

.avatar {
  --size: 32px;
  flex: none;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  font-size: calc(var(--size) * 0.38);
  line-height: 1;
  background: var(--card);
  color: var(--foreground);
  border: 1.5px solid var(--foreground);
}

.avatar-lg { --size: 56px; }
.avatar-t1 { background: var(--mustard); color: var(--dark); box-shadow: 0 2px 0 var(--foreground); }
.avatar-anon {
  border-style: dashed;
  border-color: var(--muted-foreground);
  background: var(--muted);
  color: var(--muted-foreground);
  font-family: var(--font-mono);
  font-weight: 500;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* Hero (guide §hero: h1 with the mustard highlight) */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 5.2vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 700;
  color: var(--foreground);
  margin: 16px 0 20px;
}

.hero h1 span {
  background: var(--mustard);
  color: var(--dark);
  padding: 0 10px;
  border-radius: 6px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  max-width: 34em;
  margin: 0 0 28px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

/* Background: a slow stream of event names (CSS only). */

.event-stream {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  pointer-events: none;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-foreground);
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 45%, #000 85%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 50%, transparent 45%, #000 85%);
}

.event-stream div {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: stream 90s linear infinite;
}

.event-stream div:nth-child(2n) { animation-duration: 120s; animation-direction: reverse; }
.event-stream div:nth-child(3n) { animation-duration: 150s; }
.event-stream span { padding-right: 48px; }

@keyframes stream {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Mock-ups: product pieces drawn with guide components. Decorative;
   each one carries a text description for screen readers. */

.mock {
  background: var(--card);
  border: 1.5px solid var(--foreground);
  border-radius: 10px;
  box-shadow: 0 6px 0 var(--foreground);
  overflow: hidden;
  color: var(--foreground);
}

.mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--foreground);
  background: var(--background-soft);
  font-size: 13px;
  font-weight: 700;
}

.mock-bar .title { display: inline-flex; align-items: center; gap: 8px; }

.mock-caption {
  margin: 16px 2px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-foreground);
}

/* Live feed: new events drop in at the top, in a seamless loop. */

.feed {
  --row: 52px;
  height: calc(var(--row) * 5);
  overflow: hidden;
}

.feed ul {
  list-style: none;
  margin: 0;
  padding: 0;
  transform: translateY(calc(var(--row) * -4));
  animation: feed 12s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.feed li {
  height: var(--row);
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}

.feed li .badge { justify-self: start; }

.feed .what {
  font-family: var(--font-mono);
  color: var(--body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed .who {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-foreground);
}

@keyframes feed {
  0%, 18% { transform: translateY(calc(var(--row) * -4)); }
  25%, 43% { transform: translateY(calc(var(--row) * -3)); }
  50%, 68% { transform: translateY(calc(var(--row) * -2)); }
  75%, 93% { transform: translateY(calc(var(--row) * -1)); }
  100% { transform: translateY(0); }
}

/* Sections */

.section {
  padding: 96px 0;
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: 64px;
}

.sec-head { max-width: 44em; margin-bottom: 48px; }

.sec-head h2,
.consent-copy h2,
.cta h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 700;
  color: var(--foreground);
  margin: 12px 0 12px;
}

.sec-head p { margin: 0; font-size: 17px; }

/* How it works: text and mock-up side by side, alternating. */

.step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding: 40px 0;
}

.step:nth-of-type(even) .step-copy { order: 2; }

/* Grid children may shrink, so a long code line scrolls inside its
   block instead of widening the page. */
.step > *,
.hero .wrap > *,
.consent > * { min-width: 0; }

.step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
}

.step h3 {
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
  color: var(--foreground);
  margin: 8px 0 12px;
}

.step p { margin: 0; max-width: 32em; }

/* Code block (guide §Push an event). */

.codeblock {
  margin: 0;
  padding: 20px;
  background: var(--dark);
  color: #edebe3;
  border-radius: 10px;
  border: 1.5px solid var(--foreground);
  box-shadow: 0 6px 0 var(--foreground);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
}

/* The guide's .json colours, exactly. */
.codeblock .k { color: #9db8ff; }
.codeblock .s { color: #a8d8b9; }
.codeblock .n { color: #f7c948; }
.codeblock .c { color: #a6a89b; }

/* Stitch: an anonymous visitor becomes a person. */

.stitch { padding: 20px; display: grid; gap: 14px; }

.stitch-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.stitch-row .meta { font-family: var(--font-mono); color: var(--muted-foreground); font-size: 12px; }
.stitch-row strong { color: var(--foreground); }

.stitch-arrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 15px;
  padding-left: 22px;
  border-left: 2px dashed var(--border);
  min-height: 34px;
  font-size: 12px;
}

/* See: a profile with its timeline (guide §timeline). */

.profile { padding: 20px; }

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}

.profile-head strong { display: block; font-size: 17px; color: var(--foreground); }
.profile-head .meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground); }
.profile-head .badges { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

.timeline { position: relative; list-style: none; margin: 0; padding: 0 0 0 28px; }

.timeline::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.tl-item { position: relative; padding: 0 0 16px; font-size: 13px; }
.tl-item:last-child { padding-bottom: 0; }

.tl-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mustard);
  border: 2.5px solid var(--foreground);
}

.tl-item.anon::before { background: var(--muted); border-style: dashed; border-color: var(--muted-foreground); }
.tl-item strong { color: var(--foreground); font-family: var(--font-mono); font-weight: 500; }
.tl-item .meta { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); }

/* Answer: a funnel whose bars grow into view. */

.funnel { padding: 20px; display: grid; gap: 14px; }
.funnel-row { display: grid; gap: 6px; font-size: 13px; }
.funnel-label { display: flex; justify-content: space-between; color: var(--foreground); font-weight: 600; }
.funnel-label span:last-child { font-family: var(--font-mono); font-weight: 500; color: var(--muted-foreground); }

.funnel-track {
  height: 14px;
  background: var(--muted);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.funnel-fill {
  height: 100%;
  background: var(--mustard);
  border-right: 1.5px solid var(--foreground);
  border-radius: 999px;
  transform-origin: left;
}

.funnel-fill.w-100 { width: 100%; }
.funnel-fill.w-38 { width: 38%; }
.funnel-fill.w-14 { width: 14%; }

.hero-visual { margin: 0; }
.push-right { margin-left: auto; }

/* Consent */

.consent {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: center;
}

.consent-copy p { margin: 0 0 14px; max-width: 34em; }
.consent-copy .note { font-weight: 700; color: var(--accent-foreground); }

.consent-stage {
  position: relative;
  min-height: 300px;
  padding: 24px;
  border-radius: 10px;
  background: var(--accent);
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: flex-end;
}

.consent-banner { padding: 18px; width: 100%; }
.consent-banner strong { display: block; color: var(--foreground); margin-bottom: 6px; font-size: 15px; }
.consent-banner p { margin: 0 0 14px; font-size: 13px; color: var(--body); }
.consent-banner .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-banner .btn { pointer-events: none; }

/* Not list */

.not-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.not-grid li { padding: 22px 24px; }
.not-grid strong { display: block; color: var(--foreground); font-size: 17px; margin-bottom: 6px; }
.not-grid p { margin: 0; font-size: 14px; }

/* Closing call to action */

.cta {
  text-align: center;
  padding: 64px 24px;
  border-radius: 12px;
  background: var(--card);
  border: 1.5px solid var(--foreground);
  box-shadow: 0 6px 0 var(--foreground);
}

.cta p { margin: 0 auto 28px; max-width: 34em; font-size: 17px; }
.cta .hero-actions { justify-content: center; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 32px 0 40px;
  font-size: 14px;
  color: var(--muted-foreground);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-footer p { margin: 0; }

/* 404 */

.not-found { padding: 96px 0; }

.not-found .code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0 0 12px;
}

.not-found h1 {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--foreground);
  margin: 0 0 16px;
}

/* Scroll reveals: CSS scroll-driven animations where supported.
   Elsewhere everything is simply visible. */

@supports (animation-timeline: view()) {
  .reveal {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }

  .grow .funnel-fill {
    animation: grow linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 45%;
  }

  .tl-reveal .tl-item {
    animation: reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }

  @keyframes reveal {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: none; }
  }

  @keyframes grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
  }
}

/* Small screens (390 px) */

@media (max-width: 860px) {
  .hero .wrap,
  .step,
  .consent { grid-template-columns: 1fr; gap: 32px; }
  .step:nth-of-type(even) .step-copy { order: 0; }
  .hero { padding: 56px 0 64px; }
  .section { padding: 64px 0; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-nav { gap: 14px; }
  .header-nav .hide-sm { display: none; }
  .btn { padding: 0 22px; }
  .not-grid { grid-template-columns: 1fr; }
  .feed li { grid-template-columns: 84px minmax(0, 1fr); }
  .feed .who { display: none; }
  .profile-head .badges { display: none; }
  .cta { padding: 48px 20px; }
}

/* The guide's rule: no motion for people who ask for none. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }

  .feed ul { transform: translateY(calc(var(--row) * -4)); }
}

/* Pricing page (T-304) */

.pricing { padding: 56px 0 80px; }
.pricing h1 { color: var(--foreground); line-height: 1.15; margin: 24px 0 12px; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 32px 0 24px;
}
@media (max-width: 1024px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
}

.plan-card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-card h2 { margin: 0; color: var(--foreground); }
.plan-price { margin: 0; font-size: 32px; font-weight: 600; color: var(--foreground); }
.plan-per { font-size: 15px; font-weight: 400; color: var(--muted-foreground); }
.plan-yearly { margin: 0; color: var(--muted-foreground); font-size: 14px; }
.plan-limits { margin: 8px 0 16px; padding-left: 18px; }
.plan-limits li { margin: 4px 0; }
.plan-card .btn { margin-top: auto; justify-content: center; }

.above-scale { margin: 8px 0 0; }

.pricing-notes { max-width: 780px; margin-top: 48px; }
.pricing-notes h2 { color: var(--foreground); margin: 0 0 8px; }
.pricing-notes h3 { color: var(--foreground); margin: 28px 0 6px; }
.pricing-notes p { margin: 0 0 12px; }

/* Legal pages + footer navigation (T-305) */

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.footer-nav a { color: var(--muted-foreground); }
.footer-nav a:hover { color: var(--foreground); }

.legal { padding: 56px 0 80px; }
.legal .wrap { max-width: 780px; }
.legal h1 { color: var(--foreground); line-height: 1.15; margin: 24px 0 12px; }
.legal h2 { color: var(--foreground); margin: 36px 0 8px; }
.legal p { margin: 0 0 12px; }
.legal a { color: var(--link); }
.legal code { font-family: var(--font-mono); font-size: 0.92em; }
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 20px;
  font-size: 15px;
}
.legal th, .legal td {
  border: 1px solid var(--border-soft);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.legal th { color: var(--foreground); background: var(--background-soft); }

.draft-notice {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-foreground);
  padding: 12px 16px;
  margin: 0;
}

/* Docs (T-319, D-133): a side nav and a reading column. Code blocks
   use the .codeblock look (guide §Push an event). */

.docs { padding: 48px 0 80px; }
.docs .wrap {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.docs-nav { position: sticky; top: 24px; font-size: 15px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.docs-nav a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  text-decoration: none;
}
.docs-nav a:hover { color: var(--foreground); background: var(--muted); }
.docs-nav a[aria-current="page"] { color: var(--foreground); background: var(--secondary); font-weight: 600; }
.docs-llms { margin: 16px 0 0; padding: 0 10px; font-family: var(--font-mono); font-size: 12px; }
.docs-llms a { display: inline; padding: 0; color: var(--muted-foreground); }

.docs-body { max-width: 760px; min-width: 0; }
.docs-md { margin: 0 0 8px; font-family: var(--font-mono); font-size: 12px; }
.docs-md a { color: var(--muted-foreground); }
.docs-body h1 { color: var(--foreground); line-height: 1.15; margin: 0 0 16px; }
.docs-body h2 { color: var(--foreground); margin: 40px 0 10px; line-height: 1.25; }
.docs-body h3 { color: var(--foreground); margin: 28px 0 8px; }
.docs-body p, .docs-body ul, .docs-body ol { margin: 0 0 14px; }
.docs-body li { margin: 4px 0; }
.docs-body a { color: var(--link); }
.docs-body strong { color: var(--foreground); }
.docs-body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--muted);
  border-radius: 4px;
  padding: 1px 5px;
}
.docs-body pre {
  margin: 0 0 18px;
  padding: 18px 20px;
  background: var(--dark);
  color: #edebe3;
  border-radius: 10px;
  border: 1.5px solid var(--foreground);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  overflow-x: auto;
}
.docs-body pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.docs-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 15px;
  display: block;
  overflow-x: auto;
}
.docs-body th, .docs-body td {
  border: 1px solid var(--border-soft);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
.docs-body th { color: var(--foreground); background: var(--background-soft); }

@media (max-width: 860px) {
  .docs .wrap { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .docs-nav { position: static; }
  .docs-nav ul { flex-direction: row; flex-wrap: wrap; gap: 4px; }
}

/* Homepage: several tools, one integration; AI-first (T-341). */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.product-grid li { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 6px; }
.product-grid strong { color: var(--foreground); font-size: 18px; }
.product-grid p { margin: 0; font-size: 14px; }
.product-kind {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.ai {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}
.ai > * { min-width: 0; }
.ai-copy h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-weight: 700;
  color: var(--foreground);
  margin: 8px 0 12px;
}
.ai-copy p { margin: 0 0 14px; }
.ai-copy a { color: var(--link); }
.ai-points { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ai-points li { padding-left: 16px; border-left: 2px solid var(--mustard); }
.ai-points strong { color: var(--foreground); }

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .ai { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr; }
}
/* An odd last "not" card spans both columns (T-341). */
.not-grid li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .not-grid li:last-child:nth-child(odd) { grid-column: auto; }
}
