/* =========================================================================
   LokalBot landing page — private work memory on the web
   Aesthetic: calm translucent surfaces over a local-first field, dark or light
   to match the visitor's system appearance (light tokens at the end).
   Identity stays within LokalBot slate, mint/teal, and recording amber.
   Radius system: pill for interactive, 18px containers, 12px code/inputs.
   Type: native SF system stack (Apple-native on macOS).
   ========================================================================= */

:root {
  color-scheme: light dark;
  --bg: #080d14;
  --bg-2: #0b1119;
  --surface: #121a25;
  --surface-2: #16212e;
  --line: rgba(150, 180, 200, 0.13);
  --line-strong: rgba(150, 180, 200, 0.24);

  --text: #ecf3f7;
  --text-dim: #a2b4c2;
  /* the faint tier carries captions, metadata and requirements lines, so it
     has to stay readable rather than merely decorative: this clears 7:1 on the
     page field and 6.1:1 on the lightest glass panel. */
  --text-faint: #8ba2b0;

  --teal: #23c4ae;
  --teal-bright: #6ef2dc;
  --teal-soft: rgba(35, 196, 174, 0.14);
  --teal-ink: #04141a;
  --amber: #fbbf24;
  /* accents used as text or outlines; the light theme swaps in darker inks */
  --accent-text: var(--teal-bright);
  --amber-text: var(--amber);

  /* ── glass system ─────────────────────────────────────────────────── */
  --glass-tint: rgba(18, 28, 40, 0.52);        /* default panel fill        */
  --glass-tint-strong: rgba(20, 31, 44, 0.64); /* hero / download / cotype  */
  --glass-tint-chip: rgba(22, 33, 46, 0.45);   /* small controls            */
  --glass-blur: 10px;
  --glass-blur-chip: 6px;
  --glass-sat: 165%;
  --glass-border: rgba(255, 255, 255, 0.1);
  /* top gloss baked into the fill so it paints above the blurred backdrop */
  --glass-gloss: linear-gradient(
    180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.012) 42%, rgba(255, 255, 255, 0) 70%);
  /* specular rim: bright top-left light catch → teal chromatic fringe */
  --glass-rim: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.62) 0%,
    rgba(255, 255, 255, 0.1) 24%,
    rgba(255, 255, 255, 0) 50%,
    rgba(110, 242, 220, 0.16) 82%,
    rgba(35, 196, 174, 0.24) 100%);
  --glass-shadow: 0 26px 60px -18px rgba(0, 0, 0, 0.62), 0 10px 26px -12px rgba(0, 0, 0, 0.5);
  --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.22);
  /* fills the fallbacks below also set, kept as tokens so the light theme
     never overrides a fallback's solid surface */
  --nav-gloss: rgba(255, 255, 255, 0.08);
  --nav-tint: rgba(10, 16, 24, 0.55);
  --nav-solid: rgba(11, 17, 25, 0.96);
  --kbd-bg: rgba(8, 13, 20, 0.5);

  --radius: 18px;
  --radius-lg: 26px;
  --radius-sm: 12px;
  --pill: 999px;

  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas,
    "Liberation Mono", monospace;
}

/* =========================================================================
   privacy + support pages
   ========================================================================= */
.legal-page {
  width: min(900px, calc(100% - 40px));
  margin: 0 auto;
  padding: 150px 0 80px;
}
.legal-page__head {
  max-width: 760px;
  margin-bottom: 36px;
}
.legal-page__head h1 {
  margin: 10px 0 16px;
  font-size: clamp(2.6rem, 8vw, 5rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}
.legal-page__head > p:last-child {
  color: var(--text-dim);
  font-size: 1.15rem;
  line-height: 1.7;
}
.legal-card {
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--glass-tint);
  box-shadow: var(--glass-shadow);
}
.legal-card h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card h3 {
  margin: 1.5rem 0 0.35rem;
  font-size: 1.08rem;
}
.legal-card code {
  font-family: var(--mono);
  font-size: 0.88em;
  color: var(--text);
  overflow-wrap: anywhere;
}
.legal-card p,
.legal-card li {
  color: var(--text-dim);
  line-height: 1.75;
}
.legal-card ul { padding-left: 1.3rem; }
.legal-card li { list-style: disc; }
.legal-card li + li { margin-top: 0.5rem; }
.legal-card a:not(.btn) { color: var(--accent-text); }
.footer--legal { margin-top: 40px; }

@media (max-width: 640px) {
  .legal-page { width: min(100% - 24px, 900px); padding-top: 110px; }
  .legal-card { border-radius: 20px; }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 660; letter-spacing: -0.02em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--teal); color: var(--teal-ink); }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--teal);
  color: var(--teal-ink);
  padding: 10px 16px;
  border-radius: var(--pill);
  font-weight: 600;
  z-index: 100;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* =========================================================================
   GLASS — shared surface + masked specular rim
   ========================================================================= */
.nav,
.tile,
.download__panel,
.faq__list,
.guide-article,
.guide-card {
  position: relative;
  background: var(--glass-gloss), var(--glass-tint);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inset), var(--glass-shadow);
}

/* the rim: a 1px gradient ring masked to the border only, so the panel
   interior shows the live (blurred) content straight through */
.nav::after,
.tile::after,
.download__panel::after,
.faq__list::after,
.guide-article::after,
.guide-card::after,
.btn--ghost::after,
.icon-link::after,
.home-badge::after,
kbd::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--glass-rim);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

/* small glass controls: lighter blur, lighter fill */
.btn--ghost,
.icon-link,
.home-badge,
kbd {
  position: relative;
}

/* =========================================================================
   ambient background — glowing field + liquid refraction + grain
   ========================================================================= */
.bg-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(70vw 70vw at -16vw -24vw, rgba(35, 196, 174, 0.2), transparent 62%),
    radial-gradient(64vw 64vw at 112% 112%, rgba(20, 94, 91, 0.3), transparent 62%),
    radial-gradient(44vw 44vw at 60% 38%, rgba(35, 196, 174, 0.08), transparent 64%),
    var(--bg);
}
.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: none;
  opacity: 0.55;
}
.bg-glow--a {
  width: 62vw; height: 62vw;
  top: -24vw; left: -16vw;
  background: radial-gradient(circle, rgba(35, 196, 174, 0.34), transparent 62%);
}
.bg-glow--b {
  width: 58vw; height: 58vw;
  bottom: -28vw; right: -16vw;
  background: radial-gradient(circle, rgba(20, 94, 91, 0.48), transparent 62%);
}
.bg-glow--c {
  width: 38vw; height: 38vw;
  top: 36%; left: 52%;
  background: radial-gradient(circle, rgba(35, 196, 174, 0.14), transparent 64%);
}
/* the circuit board from the autocomplete video, behind every page: a white
   tile from Website/generator/render_circuit_board.py used as a mask, so each theme
   picks its colour. Faint in the middle of the window, where the words are. */
.bg-field::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(110% 85% at 50% 45%, rgba(35, 196, 174, 0.018) 25%, rgba(35, 196, 174, 0.075) 80%);
  -webkit-mask: url("assets/circuit-board.svg") 0 0 / 1200px 1200px repeat;
  mask: url("assets/circuit-board.svg") 0 0 / 1200px 1200px repeat;
}
/* on a phone the words run close to the edges, so the board stays fainter */
@media (max-width: 640px) {
  .bg-field::before { opacity: 0.7; }
}
@media (prefers-contrast: more) {
  .bg-field::before { display: none; }
}

/* =========================================================================
   buttons & chips
   ========================================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 580;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.18s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}
.btn i { font-size: 1.15em; }
.btn--primary {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, var(--teal-bright), var(--teal));
  color: var(--teal-ink);
  box-shadow: 0 8px 24px rgba(35, 196, 174, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(4, 20, 26, 0.25);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(35, 196, 174, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(4, 20, 26, 0.25);
}
.btn--ghost {
  background: var(--glass-gloss), var(--glass-tint-chip);
  color: var(--text);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inset), 0 8px 22px -12px rgba(0, 0, 0, 0.5);
}
.btn--ghost:hover {
  color: var(--accent-text);
  background:
    linear-gradient(180deg, rgba(110, 242, 220, 0.12), rgba(255, 255, 255, 0) 60%),
    var(--glass-tint-strong);
  transform: translateY(-2px);
  box-shadow: var(--glass-inset), 0 14px 30px -14px rgba(35, 196, 174, 0.4);
}
.btn:active { transform: translateY(0) scale(0.985); }
.btn--sm { padding: 9px 16px; font-size: 0.9rem; }
.btn--lg { padding: 16px 30px; font-size: 1.06rem; }

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-gloss), var(--glass-tint-chip);
  box-shadow: var(--glass-inset);
  color: var(--text-dim);
  font-size: 1.3rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.icon-link:hover { color: var(--accent-text); border-color: rgba(110, 242, 220, 0.4); background: var(--teal-soft); }

.eyebrow {
  display: inline-block;
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* =========================================================================
   nav — floating glass pill
   ========================================================================= */
.nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 64px;
  padding: 0 14px 0 22px;
  max-width: var(--maxw);
  margin: 12px auto 0;
  width: calc(100% - 32px);
  border-radius: var(--pill);
  /* override: lighter, brighter glass for the floating bar */
  background:
    linear-gradient(180deg, var(--nav-gloss), rgba(255, 255, 255, 0) 60%),
    var(--nav-tint);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 640; letter-spacing: -0.01em; }
.brand__mark { border-radius: 8px; display: block; }
.brand__name { font-size: 1.06rem; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { color: var(--text-dim); font-size: 0.95rem; white-space: nowrap; transition: color 0.2s var(--ease); }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 12px; margin-left: 8px; }
/* phones: app.js adds a menu button that opens the nav links in a panel */
.nav__actions .nav__menu-button { display: none; padding: 0; font: inherit; cursor: pointer; }
.nav__menu-button svg { width: 1em; height: 1em; }
.nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: 220px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--glass-shadow);
}
.nav__menu[hidden] { display: none; }
.nav__menu a { padding: 12px 14px; border-radius: var(--radius-sm); color: var(--text-dim); }
.nav__menu a:hover,
.nav__menu a:focus-visible { color: var(--text); background: var(--teal-soft); }

/* =========================================================================
   layout helpers
   ========================================================================= */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 88px 24px;
}
.section__head { max-width: 760px; margin-bottom: 46px; }
.section__title { font-size: clamp(1.9rem, 3.8vw, 3rem); letter-spacing: -0.04em; }
.section__lead { color: var(--text-dim); font-size: 1.08rem; max-width: 56ch; margin-top: 18px; }

/* =========================================================================
   hero
   ========================================================================= */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 56px;
  padding: 72px 24px 96px;
  min-height: calc(100svh - 66px);
}
.hero__title {
  font-size: clamp(2.8rem, 6.6vw, 5.3rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
  max-width: 22ch;
}
.hero__sub {
  margin-top: 22px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--text-dim);
  max-width: 48ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero__meta { margin-top: 20px; color: var(--text-faint); font-size: 0.9rem; }

/* A loop behaves like a GIF: where Low Power Mode refuses to play it, it stays a still with no play button. */
.home-loop::-webkit-media-controls-start-playback-button { display: none; -webkit-appearance: none; }
.home-loop {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: #0b0b0d;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

/* =========================================================================
   features bento — glass tiles
   ========================================================================= */
.tile {
  padding: 28px;
  border-radius: var(--radius);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}
.tile > * { position: relative; z-index: 2; }
.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--glass-inset), 0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(110, 242, 220, 0.18), 0 18px 50px -24px rgba(35, 196, 174, 0.45);
}
.tile__icon { font-size: 2rem; color: var(--accent-text); display: block; margin-bottom: 16px; }
.tile h3 { font-size: 1.22rem; margin-bottom: 10px; }
.tile p { color: var(--text-dim); font-size: 0.98rem; }
.tile code { font-family: var(--mono); font-size: 0.86em; color: var(--accent-text); }

/* code blocks — dark glass slabs */
.code {
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
  color: var(--text-dim);
  background: rgba(4, 8, 13, 0.5);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 18px 20px;
  margin: 0;
  overflow-x: auto;
  white-space: pre;
}
.c-prompt { color: var(--teal); user-select: none; margin-right: 4px; }
.c-str { color: #f6c177; }
.c-flag { color: var(--teal-bright); }
.c-op { color: var(--text-faint); }

.checklist { margin-top: 26px; display: grid; gap: 12px; }
.checklist li { display: flex; align-items: center; gap: 12px; color: var(--text); }
.checklist i {
  color: var(--teal-ink); background: var(--teal-bright);
  border-radius: 50%; width: 22px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}

kbd {
  position: relative;
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--kbd-bg);
  border: 1px solid var(--glass-border);
  border-bottom-width: 2px;
  color: var(--text);
}

/* =========================================================================
   download — hero glass panel
   ========================================================================= */
.download { display: flex; justify-content: center; }
.download__panel {
  max-width: 720px;
  width: 100%;
  text-align: center;
  padding: 56px 40px;
  border-radius: var(--radius-lg);
  background: var(--glass-gloss), var(--glass-tint-strong);
}
.download__panel > * { position: relative; z-index: 2; }
.download__panel .eyebrow { margin-top: 6px; }
.download__icon { width: 80px; height: 80px; border-radius: 20px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); }
.download__panel .btn--lg { margin-top: 30px; }
.download__sub { margin-top: 16px; color: var(--text-faint); font-size: 0.9rem; }
.download__sub a { color: var(--accent-text); }
.download__sub a:hover { text-decoration: underline; }
.download__sub code { font-family: var(--mono); font-size: 0.86em; color: var(--text-dim); overflow-wrap: anywhere; }

/* =========================================================================
   faq — glass list container
   ========================================================================= */
.faq__list {
  max-width: 820px;
  padding: 6px 26px;
  border-radius: var(--radius-lg);
}
.faq__list > * { position: relative; z-index: 2; }
.qa { border-bottom: 1px solid var(--glass-border); }
.qa:last-child { border-bottom: 0; }
.qa summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  font-size: 1.1rem; font-weight: 580;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary i {
  color: var(--accent-text); font-size: 1.3rem;
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}
.qa[open] summary i { transform: rotate(45deg); }
.qa p { color: var(--text-dim); padding: 0 4px 24px; max-width: 70ch; }

/* =========================================================================
   guides and search-intent articles
   ========================================================================= */
.guide-page,
.guides-page {
  width: min(var(--maxw), calc(100% - 40px));
  margin: 0 auto;
}
.guide-page { max-width: 920px; }
.guide-hero { padding: 96px 0 48px; max-width: 840px; }
.guide-hero--index { padding-bottom: 64px; }
.guide-hero h1 {
  max-width: 14ch;
  font-size: clamp(2.7rem, 7vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}
.guide-hero__lead {
  max-width: 64ch;
  margin-top: 24px;
  color: var(--text-dim);
  font-size: clamp(1.08rem, 2.2vw, 1.3rem);
  line-height: 1.65;
}
.guide-byline { margin-top: 24px; color: var(--text-faint); font-size: 0.9rem; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 34px;
  color: var(--text-faint);
  font-size: 0.86rem;
}
.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--accent-text); }
.guide-article {
  position: relative;
  padding: clamp(28px, 6vw, 64px);
  border-radius: var(--radius-lg);
  background: var(--glass-gloss), var(--glass-tint);
}
.guide-article > * { position: relative; z-index: 2; }
.guide-article h2 {
  margin: 2.8rem 0 0.85rem;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.035em;
}
.guide-article h2:first-child { margin-top: 0; }
.guide-article p,
.guide-article li { color: var(--text-dim); font-size: 1.02rem; line-height: 1.78; }
.guide-article p + p { margin-top: 1rem; }
.guide-article ul,
.guide-article ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.7rem; margin: 1rem 0 0; padding-left: 1.4rem; }
/* Long paths and commands in prose would otherwise widen the page on phones. */
.guide-article :not(pre) > code { overflow-wrap: anywhere; }
.guide-article ul { list-style: disc; }
.guide-article ol { list-style: decimal; }
.guide-article li { padding-left: 0.25rem; }
.guide-article strong { color: var(--text); }
.guide-article a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.guide-article .code { margin-top: 1.25rem; }
.guide-table-wrap { margin-top: 1.2rem; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.guide-table { width: 100%; min-width: 660px; border-collapse: collapse; }
.guide-table th,
.guide-table td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-table th { color: var(--text); background: rgba(255, 255, 255, 0.03); font-size: 0.86rem; }
.guide-table td { color: var(--text-dim); font-size: 0.92rem; }
.guide-table tr:last-child td { border-bottom: 0; }
.guide-faq,
.guide-related { padding: 88px 0 0; }
.guide-faq > h2,
.guide-related > h2 { margin-bottom: 28px; font-size: clamp(1.7rem, 4vw, 2.5rem); }
.guide-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 230px;
  flex-direction: column;
  gap: 12px;
  padding: 26px;
  border-radius: var(--radius);
  background: var(--glass-gloss), var(--glass-tint);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.guide-card > * { position: relative; z-index: 2; }
.guide-card:hover { transform: translateY(-4px); border-color: rgba(110, 242, 220, 0.3); box-shadow: var(--glass-inset), 0 24px 52px -20px rgba(0, 0, 0, 0.65); }
.guide-card__eyebrow { color: var(--accent-text) !important; font-size: 0.75rem !important; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }
.guide-card strong { color: var(--text); font-size: 1.2rem; line-height: 1.25; }
.guide-card > span { color: var(--text-dim); font-size: 0.92rem; line-height: 1.55; }
.guide-card__meta { margin-top: auto; color: var(--text-faint) !important; font-size: 0.82rem !important; }
.guide-related--compare { padding: 0 0 104px; }
/* /guides filter: app.js reveals it and hides cards and sections that don't match */
.guide-filter {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 520px;
  margin-top: 32px;
  border: 1px solid var(--glass-border);
  border-radius: var(--pill);
  background: var(--glass-gloss), var(--glass-tint-chip);
  box-shadow: var(--glass-inset);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.guide-filter:focus-within { border-color: var(--teal); box-shadow: var(--glass-inset), 0 0 0 3px var(--teal-soft); }
.guide-filter > .ph { position: absolute; left: 18px; color: var(--text-faint); font-size: 1.15rem; pointer-events: none; }
.guide-filter__input {
  width: 100%;
  min-width: 0;
  padding: 14px 20px 14px 48px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  outline: none;
}
.guide-filter__input::placeholder { color: var(--text-faint); }
.guide-filter-empty { padding: 0 0 104px; color: var(--text-dim); }
.guides-page [hidden] { display: none !important; }
.guide-download { padding-right: 0; padding-left: 0; }

/* blog: /blog and /blog/<slug> reuse the guide layout and cards */
.blog-hero h1 { max-width: 20ch; font-size: clamp(2.3rem, 6vw, 4.2rem); line-height: 1.02; }
.blog-feed-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-text); }
.blog-feed-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.blog-list { display: grid; gap: 16px; padding-bottom: 104px; }
.blog-card { min-height: 0; }
.blog-list .blog-card strong { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.blog-article :is(ul, ol, pre, .guide-table-wrap, .blog-figure) + p { margin-top: 1rem; }
.blog-note { padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.95rem !important; }
.blog-note + h2 { margin-top: 2.2rem; }
.blog-figure { margin: 1.8rem 0 0; }
.blog-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.blog-figure figcaption { margin-top: 0.7rem; color: var(--text-faint); font-size: 0.86rem; line-height: 1.55; }

/* AI assistants comparison: one section per app */
.guide-article .blog-note { margin-bottom: 2.4rem; }
.guide-article :is(ul, ol, pre, .guide-table-wrap, .blog-figure, .tool-facts) + p { margin-top: 1rem; }
.guide-table--wide { min-width: 640px; }
.guide-table--wide :is(th, td) { padding: 12px 10px; }
.guide-table--wide td { font-size: 0.86rem; }
.guide-table--wide th[scope="row"] a { color: var(--text); text-decoration: none; }
.guide-table--wide th[scope="row"] a:hover { color: var(--accent-text); }
.tool { margin-top: 3.4rem; padding-top: 2.6rem; border-top: 1px solid var(--line); scroll-margin-top: 96px; }
.tool:first-of-type { margin-top: 2rem; }
.tool h3 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); letter-spacing: -0.03em; }
.guide-article .tool-tagline { margin-top: 0.2rem; color: var(--text-faint); font-size: 0.98rem; }
.tool .blog-figure { margin-top: 1.4rem; margin-bottom: 1.4rem; }
.guide-article .tool-label { margin-top: 1.4rem; color: var(--text); font-weight: 600; font-size: 0.95rem; }
.guide-article .tool-label + ul { margin-top: 0.5rem; }
.tool-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 1.6rem 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 0.93rem; line-height: 1.55; }
.tool-facts dt { color: var(--text); font-weight: 600; }
.tool-facts dd { margin: 0; color: var(--text-dim); }
.tool-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2rem; }
.guide-article .tool-links a.btn { color: var(--text); text-decoration: none; }
.guide-article .tool-links a.btn:hover { color: var(--accent-text); }
.guide-article .source-list li { font-size: 0.9rem; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .tool-facts { grid-template-columns: 1fr; gap: 2px; }
  .tool-facts dd + dt { margin-top: 10px; }
}

@media (max-width: 820px) {
  .guide-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .guide-page, .guides-page { width: min(100% - 24px, var(--maxw)); }
  .guide-hero { padding-top: 64px; }
  .guide-card-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 0; }
}

/* =========================================================================
   footer
   ========================================================================= */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px 56px;
  border-top: 1px solid var(--glass-border);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer__brand p { color: var(--text-dim); font-size: 0.94rem; max-width: 38ch; margin-top: 14px; }
.footer__meta { color: var(--text-faint) !important; font-size: 0.85rem !important; margin-top: 10px !important; }
.footer__col h3 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 16px; }
.footer__col a { display: block; color: var(--text-dim); padding: 6px 0; font-size: 0.95rem; transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--accent-text); }
.footer__legal { grid-column: 1 / -1; border-top: 1px solid var(--glass-border); padding-top: 26px; color: var(--text-faint); font-size: 0.88rem; }

/* =========================================================================
   reveal animation
   ========================================================================= */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--rd, 0ms); }
.reveal.in { opacity: 1; transform: none; }

/* =========================================================================
   responsive
   ========================================================================= */
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 40px; min-height: 0; padding-top: 48px; text-align: center; }
  .hero__title, .hero__sub { max-width: none; }
  .hero__cta { justify-content: center; }
}

/* the homepage nav has six links, so it switches to the menu earlier */
@media (max-width: 960px) {
  .home .nav__links { display: none; }
  .home .nav__actions { margin-left: auto; }
  .home .nav__actions .nav__menu-button { display: inline-flex; }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__actions { margin-left: auto; }
  .nav__actions .nav__menu-button { display: inline-flex; }
  .section { padding: 72px 20px; }
  .hero { padding: 36px 20px 64px; }
  .footer { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
  .download__panel { padding: 44px 24px; }
}

@media (max-width: 420px) {
  .footer { grid-template-columns: 1fr; }
  .btn { width: 100%; justify-content: center; }
  .nav .btn { width: auto; }
}

/* =========================================================================
   homepage — product examples first; other pages keep their existing layout
   ========================================================================= */
.home .home-hero {
  max-width: 1420px;
  grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(28px, 3.4vw, 56px);
  min-height: 0;
  padding-top: clamp(20px, 3.6vh, 44px);
  padding-bottom: 56px;
  text-align: left;
}
.home .hero__title {
  max-width: 11ch;
  font-size: clamp(2.9rem, 4.1vw, 4.1rem);
  line-height: 1.02;
}
.home .hero__sub { max-width: 40ch; font-size: 1.06rem; }
.home .hero__cta { gap: 12px; margin-top: 28px; justify-content: flex-start; }
.home .hero__meta { margin-top: 20px; }
.home-requirements { margin-top: 6px; color: var(--text-faint); font-size: 0.85rem; }
.home .hero__kicker { margin-bottom: 10px; }
/* hero install line: Homebrew on a Mac, installer notes on Windows and Linux (app.js swaps the text) */
.home-install,
.home-platform-links { margin-top: 14px; color: var(--text-faint); font-size: 0.86rem; }
.home-platform-links { margin-top: 6px; }
.home-install { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; max-width: 52ch; }
.home-install[hidden], .home-platform-links[hidden] { display: none; }
.home-install__cmd { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.home-install code { font-family: var(--mono); font-size: 0.86em; color: var(--text-dim); overflow-wrap: anywhere; }
.home-install__copy {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
}
.home-install__copy:hover { color: var(--accent-text); border-color: rgba(110, 242, 220, 0.4); }
.home-install__copy:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.home-platform-links a { color: var(--accent-text); }
.home-platform-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.home-shot { margin: 0; min-width: 0; }
.home-image-link {
  display: block;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 22px 60px -24px rgba(0, 0, 0, 0.65);
}
.home-image-link picture { display: block; border-radius: inherit; }
.home-image-link img { display: block; width: 100%; height: auto; border-radius: inherit; }
.home figcaption { margin-top: 12px; color: var(--text-faint); font-size: 0.84rem; line-height: 1.5; }
.home .section { padding-top: 64px; padding-bottom: 64px; }
.home .section__head { margin-bottom: 28px; }
.home .home-examples { padding-top: 24px; padding-bottom: 24px; }
.home-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 44px) clamp(20px, 2.4vw, 32px); }
.home-card { min-width: 0; }
.home-card .home-loop { aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); border-color: var(--line-strong); }
.home-card h3 { margin-top: 18px; font-size: clamp(1.25rem, 2vw, 1.5rem); letter-spacing: -0.025em; }
.home-card p { margin-top: 8px; max-width: 54ch; color: var(--text-dim); }
.home-text-link { display: inline-flex; gap: 8px; align-items: center; margin-top: 24px; color: var(--accent-text); }
.home-writing__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.home-writing__grid .tile { padding: 28px; }
.home-writing__lead {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}
.home-writing__still { margin: 0; min-width: 0; }
.home-loop { aspect-ratio: 16 / 9; object-fit: contain; }
.home-writing__grid .tile .home-text-link { margin-top: 16px; }
.home-platforms__shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.home-platforms__note { max-width: 72ch; margin-top: 28px; color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; }
.home-platforms__note code { font-family: var(--mono); font-size: 0.88em; color: var(--text); }
.home-platforms__note a,
.home-blog__more a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.home-blog__more { margin-top: 20px; color: var(--text-faint); font-size: 0.9rem; }
.home-compare .tile h3 a { color: var(--accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.home-compare .tile h3 a:hover { text-decoration-thickness: 2px; }
.home-compare__note { margin-top: 20px; color: var(--text-faint); font-size: 0.84rem; }
.home-compare__note a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.home .home-privacy {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}
.home-privacy__heading .section__title { max-width: 16ch; }
.home-privacy__copy > p { color: var(--text-dim); }
.home-privacy__copy > p + p { margin-top: 20px; }
.home-privacy__links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 24px; font-size: 0.92rem; }
.home-privacy__links a, .home-download__help a, .home .qa a { color: var(--accent-text); }
.home-text-link:hover, .home-privacy__links a:hover, .home-download__help a:hover, .home .qa a:hover { text-decoration: underline; text-underline-offset: 3px; }
.home .download__panel { max-width: 900px; padding: 40px 28px; }
.home .download__icon { width: 64px; height: 64px; margin-bottom: 20px; }
.home-download__setup { margin-top: 24px; color: var(--text-dim); font-size: 0.94rem; line-height: 1.8; }
.home-download__help { margin-top: 16px; color: var(--text-faint); font-size: 0.92rem; }
.home .home-faq { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr); gap: 48px; padding-top: 16px; }
.home .home-faq .section__head { margin: 0; }
.home .qa summary { padding-top: 20px; padding-bottom: 20px; }

/* release badge above the hero title; update its text with each release */
.home .hero__copy { min-width: 0; }
.home-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 22px;
  padding: 4px 14px 4px 4px;
  border-radius: var(--pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-gloss), var(--glass-tint-chip);
  box-shadow: var(--glass-inset);
  color: var(--text-dim);
  font-size: 0.86rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.home-badge:hover { color: var(--text); border-color: rgba(110, 242, 220, 0.4); background: var(--teal-soft); }
.home-badge__tag {
  flex: none;
  padding: 3px 10px;
  border-radius: var(--pill);
  background: var(--teal-soft);
  color: var(--accent-text);
  font-weight: 620;
}
.home-badge__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-badge .ph { color: var(--accent-text); transition: transform 0.2s var(--ease); }
.home-badge:hover .ph { transform: translateX(2px); }
.home .hero__sub a { color: var(--accent-text); }
.home .hero__sub a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* phones and tablets: app.js reveals this beside "Send to my Mac" */
.home-handoff {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 46ch;
  margin-top: 16px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.5;
}
.home-handoff[hidden] { display: none; }
.home-handoff > .ph { margin-top: 0.15em; color: var(--accent-text); font-size: 1.1rem; }
.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-text);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* hero demo stage: short clips of the real app, one after another */
.demo-stage { margin: 0; min-width: 0; }
.demo-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab {
  position: relative;
  display: inline-flex;
  flex: 1 0 auto;
  gap: 7px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--pill);
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 560;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.demo-tab:hover { color: var(--text); background: var(--teal-soft); }
.demo-tab:active { transform: scale(0.98); }
.demo-tab .ph { font-size: 1.05em; }
.demo-tab.is-active { color: var(--accent-text); background: var(--teal-soft); border-color: var(--line-strong); }
.demo-tab:focus-visible { outline-offset: -2px; border-radius: var(--pill); }
/* how far the playing clip has got */
.demo-tab__bar {
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--accent-text);
  opacity: 0;
  transform: scaleX(var(--demo-progress, 0));
  transform-origin: left;
}
.demo-tab.is-active .demo-tab__bar { opacity: 0.8; }
.demo-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.7);
}
.demo-poster, .demo-poster img, .demo-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.demo-poster { transition: opacity 0.35s var(--ease); }
.demo-frame.is-playing .demo-poster { opacity: 0; }
.demo-video { opacity: 0; transition: opacity 0.28s var(--ease); }
.demo-video.is-front { opacity: 1; }
.demo-frame.is-animated { cursor: pointer; }
.demo-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--nav-solid);
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.demo-toggle[hidden] { display: none; }
.demo-frame:hover .demo-toggle,
.demo-frame.is-held .demo-toggle,
.demo-toggle:focus-visible { opacity: 1; }
.demo-toggle:active { transform: scale(0.94); }
.demo-notes {
  display: flex;
  gap: 8px 24px;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 14px;
}
.home figcaption.demo-notes { font-size: 0.95rem; color: var(--text-dim); }
.demo-note { display: none; max-width: 62ch; }
.demo-note.is-active { display: block; }
.demo-note kbd { font-size: 0.86em; }
.demo-note a { color: var(--accent-text); white-space: nowrap; }
.demo-note a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* without the script every clip's line still reads, under the first clip's controls */
.demo-stage:not(.is-ready) .demo-note { display: block; margin-bottom: 6px; }
.demo-stage:not(.is-ready) .demo-notes { display: block; }

/* how it works: job first, model second, size last */
.home-models {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--line-strong);
}
.home-models li { display: grid; gap: 4px; padding: 22px 24px; background: var(--bg-2); }
.home-models__job { color: var(--text-dim); font-size: 0.92rem; }
.home-models strong { font-size: 1.16rem; font-weight: 640; letter-spacing: -0.015em; }
.home-models__size { color: var(--text-faint); font-family: var(--mono); font-size: 0.8rem; }
.home-how__links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 18px; font-size: 0.92rem; }
.home-how__links a { color: var(--accent-text); }
.home-how__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

.home .home-agents {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  border-top: 1px solid var(--line-strong);
}
.home-agents__copy > p:not(.eyebrow) { margin-top: 20px; color: var(--text-dim); max-width: 46ch; }
.home-agents__copy code { font-family: var(--mono); font-size: 0.88em; color: var(--accent-text); }
.home-agents__facts { display: grid; gap: 14px; margin-top: 24px; }
.home-agents__facts li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-dim); font-size: 0.95rem; }
.home-agents__facts .ph { margin-top: 0.2em; color: var(--accent-text); font-size: 1.15rem; }
.home-agents__facts strong { color: var(--text); font-weight: 600; }
.home-agents__demo { min-width: 0; }
.home-phone__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home-phone .home-agents__copy > .home-phone__note { margin-top: 14px; color: var(--text-faint); font-size: 0.9rem; }
.home-phone__shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 240px));
  gap: 18px;
  justify-content: center;
  align-items: start;
}
.home-phone__shot { width: min(100%, 290px); justify-self: center; }
.home-phone__shots .home-phone__shot { width: 100%; }
.home-phone__shot .home-image-link { border-radius: 28px; }
.home-agents__links { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 16px; font-size: 0.92rem; }
.home-agents__links a { color: var(--accent-text); }
.home-agents__links a:hover { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 880px) {
  .home .home-hero { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 28px; }
  .home .hero__copy { display: contents; }
  .home .hero__title { max-width: 13ch; }
  .home .hero__sub { max-width: 54ch; }
  .home-hero > .demo-stage { order: 1; margin-top: 24px; }
  .home .hero__cta, .home-install, .home-platform-links { order: 2; }
  .home-handoff { order: 3; }
  .home .hero__meta { order: 4; }
  .home-requirements { order: 5; }
  .home-cards { grid-template-columns: minmax(0, 1fr); }
  .home-writing__grid, .home-writing__lead { grid-template-columns: 1fr; }
  .home-platforms__shots { grid-template-columns: 1fr; }
  .home-phone__shots { grid-template-columns: repeat(2, minmax(0, 220px)); gap: 14px; }
  .home .home-privacy, .home .home-faq { grid-template-columns: 1fr; gap: 28px; }
  .home .home-agents { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
@media (max-width: 600px) {
  .home .home-hero { padding-top: 20px; padding-bottom: 44px; }
  .home .hero__title { font-size: clamp(2.8rem, 11vw, 3.7rem); }
  .home .hero__sub { font-size: 1rem; margin-top: 18px; }
  .home .hero__cta { margin-top: 24px; }
  .home .section { padding-top: 40px; padding-bottom: 40px; }
  .home .home-examples { padding-top: 0; padding-bottom: 0; }
  .home .home-faq { padding-top: 0; }
  .home .faq__list { padding: 4px 16px; }
  .home .qa summary { font-size: 1rem; }
  .home .nav { gap: 10px; padding: 0 12px; }
  .home .nav .brand { gap: 8px; }
  .home .nav .brand__mark { width: 26px; height: 26px; }
  .home .nav .brand__name { font-size: 0.94rem; }
  .home .nav__actions { margin-left: auto; gap: 6px; }
  .home .nav__actions .icon-link { width: 34px; height: 34px; font-size: 1.1rem; }
  .home .nav .btn { padding: 10px 14px; font-size: 0.85rem; }
  .home-badge { margin-bottom: 18px; }
  .home-agents__demo .code { padding: 16px; font-size: 0.78rem; }
  .home-models { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-models li { padding: 16px; }
  .demo-frame { aspect-ratio: 4 / 5; border-radius: 14px; }
  .demo-tab { flex: 0 0 auto; padding: 7px 12px; font-size: 0.86rem; }
  .demo-tabs { margin-inline: -20px; padding-inline: 20px; }
  .demo-notes { display: block; }
}
@media (max-width: 480px) {
  .home-badge { display: none; }
}
/* small phones: keep the menu, GitHub icon, and "Send to my Mac" inside the nav */
@media (max-width: 360px) {
  .home .nav { gap: 8px; padding: 0 10px; }
  .home .nav .btn { padding: 9px 11px; font-size: 0.8rem; }
}
@media (max-width: 340px) {
  .home .nav .brand__name { display: none; }
}

/* =========================================================================
   accessibility fallbacks
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* If the browser can't frost (or the user prefers less transparency),
   fall back to solid surfaces so contrast and depth survive. */
@media (prefers-reduced-transparency: reduce) {
  .home-image-link { background: var(--surface); }
  .nav, .tile, .download__panel,
  .faq__list, .compare-wrap, .pick, .guide-article, .guide-card, .guide-filter, .btn--ghost, .icon-link, .home-badge, kbd {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--surface);
  }
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .home-image-link { background: var(--surface); }
  .nav, .tile, .download__panel, .faq__list,
  .compare-wrap, .pick, .guide-article, .guide-card {
    background: var(--surface);
  }
  .nav { background: var(--nav-solid); }
  .btn--ghost, .icon-link, .guide-filter, .home-badge, kbd {
    background: var(--surface-2);
  }
}

/* =========================================================================
   compare pages (lokalbot-vs-*.html)
   ========================================================================= */
.compare-head { padding-bottom: 8px; }
.compare-head .section__head { margin-bottom: 0; }
.compare-head .breadcrumbs { margin-bottom: 24px; }
.compare-updated { margin-top: 20px; font-size: 0.88rem; color: var(--text-faint); }
.compare-updated a { color: var(--text-dim); text-decoration: underline; text-underline-offset: 3px; }
.compare-updated a:hover { color: var(--accent-text); }

.section--tight { padding-top: 44px; padding-bottom: 44px; }

.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-tint);
  box-shadow: var(--glass-shadow);
}
.compare { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 0.95rem; }
.compare th, .compare td {
  padding: 16px 22px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--glass-border);
}
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-faint);
  background: rgba(8, 13, 20, 0.4);
}
.compare thead th:nth-child(2) { color: var(--accent-text); }
.compare tbody th { font-weight: 600; color: var(--text-dim); width: 24%; }
.compare td { color: var(--text); width: 38%; }
.compare td > i { margin-right: 7px; vertical-align: -1px; }
.compare td .ph-check { color: var(--accent-text); }
.compare td .ph-x { color: var(--text-faint); }
.compare .dim { color: var(--text-dim); }

.pick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pick {
  padding: 30px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--glass-tint);
  box-shadow: var(--glass-shadow);
}
.pick--lokal { border-color: rgba(35, 196, 174, 0.4); }
.pick h3 { font-size: 1.12rem; letter-spacing: -0.01em; }
.pick > p { color: var(--text-dim); font-size: 0.92rem; margin-top: 6px; }
.pick .checklist { margin-top: 20px; }
.pick .checklist li { align-items: flex-start; font-size: 0.95rem; }
.pick .checklist i { margin-top: 3px; }

.compare-more { display: flex; flex-wrap: wrap; gap: 12px; }
.compare-more a {
  padding: 9px 16px;
  border-radius: var(--pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-tint-chip);
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.compare-more a:hover { color: var(--accent-text); border-color: var(--line-strong); }
.compare-disclaimer { margin-top: 28px; color: var(--text-faint); font-size: 0.82rem; max-width: 72ch; }
.compare-disclaimer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.compare-disclaimer a:hover { color: var(--text-dim); }

@media (max-width: 760px) {
  .pick-grid { grid-template-columns: 1fr; }
  .section--tight { padding-top: 36px; padding-bottom: 36px; }
}

/* =========================================================================
   enshittification-proof page — working-paper accents on the legal layout
   ========================================================================= */
.proof-doc h3 { margin: 2.1rem 0 0.6rem; font-size: 1.12rem; letter-spacing: -0.01em; }
.proof-doc .qed { color: var(--accent-text); font-weight: 700; margin-left: 6px; }
.proof-abstract {
  font-style: italic;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.4rem;
  margin-bottom: 1.6rem;
}
.thm {
  margin: 1.6rem 0;
  padding: 18px 22px;
  border-left: 3px solid var(--accent-text);
  background: rgba(35, 196, 174, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.legal-card .thm p { color: var(--text); }
.thm strong { color: var(--accent-text); }
.thm--corollary { border-left-color: var(--amber); background: rgba(251, 191, 36, 0.07); }
.thm--corollary strong { color: var(--amber-text); }
.proof-meta { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--text-faint); }
.proof-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }

/* =========================================================================
   light theme — follows the visitor's system appearance
   Colours come from the app's light brand: teal text #075F55, teal fill
   #0C8275, attention #984C00, on slate ink #0E141C. Code blocks stay dark.
   ========================================================================= */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f7f7;
    --bg-2: #eef2f2;
    --surface: #ffffff;
    --surface-2: #f1f5f5;
    --line: rgba(14, 20, 28, 0.1);
    --line-strong: rgba(14, 20, 28, 0.16);

    --text: #0e141c;
    --text-dim: #2e3b44;
    /* like the dark theme, the faint tier clears 7:1 on the page field */
    --text-faint: #485660;

    --teal-soft: rgba(12, 130, 117, 0.1);
    --accent-text: #075f55;
    --amber-text: #984c00;

    --glass-tint: rgba(255, 255, 255, 0.62);
    --glass-tint-strong: rgba(255, 255, 255, 0.76);
    --glass-tint-chip: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(14, 20, 28, 0.09);
    --glass-gloss: linear-gradient(
      180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.2) 42%, rgba(255, 255, 255, 0) 70%);
    --glass-rim: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.95) 0%,
      rgba(255, 255, 255, 0.4) 24%,
      rgba(255, 255, 255, 0) 50%,
      rgba(12, 130, 117, 0.12) 82%,
      rgba(12, 130, 117, 0.2) 100%);
    --glass-shadow: 0 26px 60px -22px rgba(14, 20, 28, 0.18), 0 10px 26px -14px rgba(14, 20, 28, 0.1);
    --glass-inset: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(14, 20, 28, 0.04);

    --nav-gloss: rgba(255, 255, 255, 0.6);
    --nav-tint: rgba(255, 255, 255, 0.78);
    --nav-solid: rgba(250, 252, 252, 0.97);
    --kbd-bg: rgba(255, 255, 255, 0.85);
  }

  .bg-field {
    background:
      radial-gradient(70vw 70vw at -16vw -24vw, rgba(35, 196, 174, 0.14), transparent 62%),
      radial-gradient(64vw 64vw at 112% 112%, rgba(12, 130, 117, 0.1), transparent 62%),
      radial-gradient(44vw 44vw at 60% 38%, rgba(35, 196, 174, 0.05), transparent 64%),
      var(--bg);
  }
  .bg-glow--a { background: radial-gradient(circle, rgba(35, 196, 174, 0.22), transparent 62%); }
  .bg-glow--b { background: radial-gradient(circle, rgba(12, 130, 117, 0.14), transparent 62%); }
  .bg-field::before {
    background: radial-gradient(110% 85% at 50% 45%, rgba(12, 130, 117, 0.015) 25%, rgba(12, 130, 117, 0.055) 80%);
  }

  .btn--ghost { box-shadow: var(--glass-inset), 0 8px 22px -12px rgba(14, 20, 28, 0.18); }
  .btn--ghost:hover {
    background:
      linear-gradient(180deg, rgba(12, 130, 117, 0.08), rgba(255, 255, 255, 0) 60%),
      var(--glass-tint-strong);
    box-shadow: var(--glass-inset), 0 14px 30px -14px rgba(12, 130, 117, 0.3);
  }
  .icon-link:hover, .home-badge:hover { border-color: rgba(12, 130, 117, 0.35); }

  .home-loop { background: #f3f5f5; box-shadow: 0 18px 48px rgba(14, 20, 28, 0.14); }
  .download__icon { box-shadow: 0 16px 40px rgba(14, 20, 28, 0.16); }
  .home-image-link { box-shadow: 0 22px 60px -24px rgba(14, 20, 28, 0.3); }
  .demo-frame { box-shadow: 0 30px 70px -32px rgba(14, 20, 28, 0.34); }

  .tile:hover {
    box-shadow: var(--glass-inset), 0 30px 60px -20px rgba(14, 20, 28, 0.18),
      0 0 0 1px rgba(12, 130, 117, 0.16), 0 18px 50px -24px rgba(12, 130, 117, 0.25);
  }
  .guide-card:hover {
    border-color: rgba(12, 130, 117, 0.3);
    box-shadow: var(--glass-inset), 0 24px 52px -20px rgba(14, 20, 28, 0.16);
  }
  .guide-table th { background: rgba(14, 20, 28, 0.035); }
  .compare thead th { background: rgba(14, 20, 28, 0.04); }
  .pick--lokal { border-color: rgba(12, 130, 117, 0.35); }

  /* a mint dot would vanish on the light field; use the app's teal fill */
  .checklist i { color: #ffffff; background: #0c8275; }

  /* code keeps its dark slab, so it keeps light text */
  .code {
    color: #b9c8d2;
    background: #0e141c;
    border-color: rgba(14, 20, 28, 0.2);
  }
  .c-op { color: #8ba2b0; }

  .thm { background: rgba(12, 130, 117, 0.07); }
  .thm--corollary { border-left-color: #d97706; background: rgba(251, 191, 36, 0.12); }
}
