/* ==========================================================================
   Design tokens - hand-transcribed from theme/colors.ts, theme/typography.ts,
   theme/radii.ts, theme/spacing.ts, theme/elevation.ts. This file has no build
   step, so these must be updated by hand if the theme/ files change (last synced
   with the app on 2026-09-26). No hex value appears outside this block, mirroring
   the app's own "colours only in theme/" rule.
   ========================================================================== */
:root {
  /* Colors - theme/colors.ts */
  --color-primary: #FBE181;
  --color-on-primary: #1C1B17;
  --color-secondary: #176873;
  --color-on-secondary: #FFFFFF;
  --color-secondary-container: #A7EEFB;
  --color-tertiary: #136A58;
  --color-tertiary-container: #A3F1DA;
  --color-on-tertiary-container: #1D705E;
  --color-error: #BA1A1A;
  --color-on-error: #FFFFFF;
  --color-error-container: #FFDAD6;
  --color-on-error-container: #410002;
  --color-background: #FCF9F4;
  --color-on-background: #1C1C19;
  --color-surface-lowest: #FFFFFF;
  --color-surface-low: #F8F4ED;
  --color-surface: #F2EDE4;
  --color-surface-high: #ECE7DD;
  --color-hairline: #EAE4D8;
  --color-outline: #7D7766;
  --color-outline-variant: #CEC6B2;
  /* Landing-only: outline blended toward the body text, so 14 px descriptions reach 4.5:1 contrast outdoors. */
  --color-muted: color-mix(in srgb, var(--color-outline) 80%, var(--color-on-background));

  /* Typography - theme/typography.ts (Inter only, no fallback family) */
  --font-family: 'Inter', sans-serif;
  --display-lg-size: 57px;      --display-lg-lh: 64px;
  --headline-lg-size: 32px;     --headline-lg-lh: 40px;
  --headline-mobile-size: 28px; --headline-mobile-lh: 36px;
  --title-lg-size: 22px;        --title-lg-lh: 28px;
  --title-sm-size: 16px;        --title-sm-lh: 22px;
  --body-lg-size: 16px;         --body-lg-lh: 24px;
  --body-md-size: 14px;         --body-md-lh: 20px;
  --label-lg-size: 14px;        --label-lg-lh: 20px;
  --label-sm-size: 11px;        --label-sm-lh: 16px;

  /* Radii - theme/radii.ts. Buttons are rounded rectangles, NEVER pills. */
  --radius-button: 16px;
  --radius-input: 10px;
  --radius-card: 20px;
  --radius-pill: 9999px;

  /* Spacing - theme/spacing.ts. 8px base unit. */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --screen-margin: 16px;

  /* Elevation - theme/elevation.ts. Flat everywhere except buttons (level1) and map pins. */
  --shadow-level1: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-pin: 0 1px 4px rgba(0, 0, 0, 0.35);
}

@font-face { font-family: 'Inter'; src: url('fonts/Inter_400Regular.woff2') format('woff2');  font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter_500Medium.woff2') format('woff2');   font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fonts/Inter_600SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root { color-scheme: light; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: var(--font-family);
  font-weight: 400;
  background: var(--color-background);
  color: var(--color-on-background);
  font-size: var(--body-lg-size);
  line-height: var(--body-lg-lh);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 2px; }

.ic {
  width: 1em; height: 1em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 var(--screen-margin); }

/* ---------- Header (AppHeader: flat gold bar, no shadow, rounded wordmark badge) ---------- */
header.site-header { background: var(--color-primary); position: sticky; top: 0; z-index: 40; }
.header-row {
  display: flex; align-items: center; gap: var(--space-sm);
  padding: var(--space-sm) var(--screen-margin);
  max-width: 1040px; margin: 0 auto;
}
.badge { width: 32px; height: 32px; border-radius: var(--radius-input); overflow: hidden; flex-shrink: 0; background: var(--color-primary); }
.badge img { width: 100%; height: 100%; object-fit: contain; }
.brand-link { display: flex; position: relative; border-radius: var(--radius-input); transition: opacity 0.15s ease; }
.brand-link::after { content: ''; position: absolute; inset: -6px; }
@media (hover: hover) { .brand-link:hover { opacity: 0.85; } }
.wordmark-text { font-weight: 600; font-size: var(--title-lg-size); line-height: var(--title-lg-lh); color: var(--color-on-primary); }
nav.primary-nav { display: flex; align-items: center; gap: var(--space-lg); margin-left: var(--space-md); flex: 1; }
nav.primary-nav a {
  text-decoration: none; font-size: var(--label-lg-size); line-height: var(--label-lg-lh);
  font-weight: 500; color: var(--color-on-primary); opacity: 0.85;
}
@media (hover: hover) { nav.primary-nav a:hover { opacity: 1; } }
.header-actions { display: flex; align-items: center; gap: var(--space-sm); margin-left: auto; }

.lang-toggle { display: flex; border: 1px solid var(--color-on-primary); border-radius: var(--radius-pill); overflow: hidden; }
.lang-toggle button {
  border: none; background: transparent; color: var(--color-on-primary);
  font-size: 12px; line-height: 16px; font-weight: 500; padding: 8px 12px;
}
.lang-toggle button[aria-pressed="true"] { background: var(--color-on-primary); color: var(--color-primary); }

.nav-toggle { display: none; position: relative; border: none; background: transparent; padding: 6px; }
.nav-toggle::after { content: ''; position: absolute; inset: -5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--color-on-primary); margin: 4px 0; border-radius: 2px; }

/* ---------- Buttons (components/Button.tsx variants: rounded rectangle, label centred) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  border-radius: var(--radius-button); padding: var(--space-md) var(--space-xl);
  font-size: var(--label-lg-size); line-height: var(--label-lg-lh); font-weight: 500;
  text-align: center; border: none; text-decoration: none; transition: opacity 0.15s ease;
}
.btn:active { opacity: 0.85; }
.btn-primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-level1); }
.btn-secondary { background: var(--color-secondary); color: var(--color-on-secondary); box-shadow: var(--shadow-level1); }
.btn-outlined { background: transparent; color: var(--color-secondary); border: 1px solid var(--color-secondary); }
.btn-compact { padding: var(--space-xs) var(--space-md); font-size: var(--label-sm-size); line-height: var(--label-sm-lh); }
.btn-block { width: 100%; }

/* ---------- Sections ---------- */
section { padding: var(--space-xxl) 0; scroll-margin-top: 48px; }
.section-cream { background: var(--color-background); }
.section-white { background: var(--color-surface-lowest); }

.eyebrow {
  display: inline-block; background: var(--color-tertiary-container); color: var(--color-on-tertiary-container);
  font-size: 13px; line-height: 18px; font-weight: 500;
  padding: 4px 12px; border-radius: var(--radius-pill); margin-bottom: var(--space-md);
}
.section-title { font-size: var(--headline-mobile-size); line-height: var(--headline-mobile-lh); font-weight: 600; margin-bottom: var(--space-sm); }
.section-subtitle { color: var(--color-muted); margin-bottom: var(--space-xl); max-width: 640px; }
@media (min-width: 720px) { .section-title { font-size: var(--headline-lg-size); line-height: var(--headline-lg-lh); } }

/* Card = white + 1px hairline, no shadow (features/listings/ListingCard.tsx) */
.card { background: var(--color-surface-lowest); border: 1px solid var(--color-hairline); border-radius: var(--radius-card); }

/* Status pills (components/StatusBadge.tsx tones) */
.pill { display: inline-block; border-radius: var(--radius-pill); padding: 2px 8px; font-size: var(--label-sm-size); line-height: var(--label-sm-lh); font-weight: 500; }
.pill-positive  { background: var(--color-tertiary-container);  color: var(--color-on-tertiary-container); }
.pill-completed { background: var(--color-secondary-container); color: var(--color-secondary); }
.pill-attention { background: var(--color-primary);             color: var(--color-on-primary); }
.pill-neutral   { background: var(--color-surface-high);        color: var(--color-outline); }

/* SegmentedControl: white rounded-rectangle track, active segment fills secondary */
.seg {
  display: flex; background: var(--color-surface-lowest); border: 1px solid var(--color-hairline);
  border-radius: var(--radius-button); padding: 3px; gap: 0;
}
.seg button {
  flex: 1; text-align: center; padding: var(--space-sm) var(--space-md);
  border: none; background: transparent; border-radius: var(--radius-button);
  font-size: var(--label-lg-size); line-height: var(--label-lg-lh); font-weight: 500; color: var(--color-secondary); cursor: pointer;
}
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--color-secondary); color: var(--color-on-secondary); }

/* ---------- Hero ---------- */
.hero { padding-top: var(--space-xl); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-xxl); align-items: stretch; }
.hero-copy { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }
.hero-art { align-self: start; }
.hero h1 { font-size: var(--headline-mobile-size); line-height: var(--headline-mobile-lh); font-weight: 600; margin-bottom: 12px; }
@media (min-width: 720px) { .hero h1 { font-size: var(--headline-lg-size); line-height: var(--headline-lg-lh); } }
@media (min-width: 1060px) { .hero h1 { font-size: var(--display-lg-size); line-height: var(--display-lg-lh); letter-spacing: -0.02em; } }
.hero p.lead { color: var(--color-on-background); margin-bottom: 20px; max-width: 460px; }
.store-title { font-size: var(--title-lg-size); line-height: var(--title-lg-lh); font-weight: 600; color: var(--color-secondary); margin: 40px 0 var(--space-sm); }
.store-title::before { content: ''; display: block; width: 40px; height: 4px; border-radius: var(--radius-pill); background: var(--color-primary); margin-bottom: 10px; }
.store-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); margin-bottom: var(--space-lg); }
.play-badge { height: 48px; width: auto; }
/* iPhone "notify me": a quiet secondary button next to the Play badge that expands an email form in place */
.store-notify-btn { display: flex; align-items: center; gap: 8px; width: 272px; max-width: 100%; height: 48px; padding: 0 8px 0 4px; background: var(--color-surface-lowest); border: 1px solid var(--color-hairline); border-radius: 10px; color: var(--color-on-background); text-align: left; }
.store-notify-btn > img { width: 40px; height: 40px; flex-shrink: 0; filter: grayscale(1); opacity: 0.55; }
.store-notify-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.store-notify-title { font-size: 13px; line-height: 17px; font-weight: 600; }
.store-notify-title, .store-notify-sub { white-space: nowrap; }
.store-notify-sub { font-size: 12px; line-height: 16px; color: var(--color-muted); }
.store-notify-btn .chevron { flex-shrink: 0; width: 24px; height: 24px; border-radius: var(--radius-pill); background: var(--color-surface); display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease; font-size: 14px; color: var(--color-secondary); }
.store-notify-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }
@media (hover: hover) { .store-notify-btn:hover { border-color: var(--color-outline-variant); } }
.notify-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s ease, margin-top 0.25s ease; }
.notify-panel[data-open="true"] { grid-template-rows: 1fr; margin-top: 12px; }
.hero .notify-panel[data-open="true"] { margin-top: -12px; }
.footer-download .notify-panel[data-open="true"] { margin-top: 4px; }
.notify-panel > div { min-height: 0; overflow: hidden; }
.notify-card { padding: var(--space-md); max-width: 440px; }
.notify-card .seg button { padding: 8px 10px; font-size: 13px; line-height: 18px; }
.notify-fields { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: 12px; }
.notify-fields .text-input { flex: 1 1 170px; min-width: 0; padding: 11px 14px; }
.notify-fields .btn { padding: 11px 20px; flex: 0 0 auto; }
.notify-fields .btn:disabled { opacity: 0.6; cursor: default; }
.text-input { width: 100%; border: 1px solid var(--color-outline-variant); border-radius: var(--radius-input); padding: var(--space-md); font-size: var(--body-lg-size); font-family: var(--font-family); background: var(--color-surface-lowest); color: var(--color-on-background); }
.text-input:focus { outline: none; border-color: var(--color-secondary); }
.text-input.invalid { border-color: var(--color-error); }
.field-error { color: var(--color-error); font-size: var(--body-md-size); line-height: var(--body-md-lh); margin-top: 6px; }
.field-error[hidden] { display: none; }
@media (max-width: 359px) {
  .notify-card .seg button { padding: 8px 4px; font-size: 12px; }
  .notify-fields .btn { flex: 1 1 100%; }
}
.notify-note { font-size: 12px; line-height: 16px; color: var(--color-muted); margin-top: 10px; }
.notify-success { display: flex; gap: 12px; align-items: flex-start; }
.notify-success[hidden], .notify-form[hidden] { display: none; }
.notify-success .check { flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius-pill); background: var(--color-tertiary-container); color: var(--color-on-tertiary-container); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.notify-success-title { font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; }
.notify-success p:last-child { font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); }
.hero-badge { width: 128px; height: 128px; border-radius: calc(var(--radius-card) * 1.5); overflow: hidden; margin-bottom: var(--space-md); background: var(--color-primary); flex-shrink: 0; }
.hero-badge img { width: 100%; height: 100%; object-fit: contain; }
.hero-cta-row { margin-top: var(--space-md); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.btn-scroll .scroll-arrow { font-size: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .btn-scroll .scroll-arrow { animation: nudge-down 1.6s ease-in-out infinite; }
  .btn-scroll:hover .scroll-arrow { animation-duration: 0.8s; }
}
@keyframes nudge-down { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
.hero-art { display: flex; flex-direction: column; align-items: center; gap: var(--space-md); }

/* Phone mock-up: the app's five tabs rebuilt from its own components and tokens (scaled to ~0.8 of a phone) */
.phone { zoom: 0.84; width: 300px; height: 620px; border-radius: 42px; background: var(--color-on-background); padding: 9px; flex-shrink: 0; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 34px; overflow: hidden; background: var(--color-surface-lowest); display: flex; flex-direction: column; font-size: 11px; line-height: 15px; }
.status-bar { background: var(--color-primary); display: flex; justify-content: space-between; align-items: center; padding: 10px 22px 2px; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--color-on-primary); }
.status-icons { display: flex; gap: 4px; align-items: center; }
.status-icons svg { height: 9px; width: auto; fill: currentColor; }
.app-bar { background: var(--color-primary); display: flex; align-items: center; gap: var(--space-sm); padding: 6px 12px 9px; }
.app-bar .badge { width: 28px; height: 28px; border-radius: 8px; }
.app-bar-title { font-weight: 600; font-size: 19px; line-height: 26px; color: var(--color-on-primary); }
.lang-pill { margin-left: auto; display: flex; align-items: center; gap: 4px; border: 1px solid var(--color-outline); border-radius: var(--radius-pill); padding: 2px 9px; font-size: 10px; line-height: 14px; font-weight: 500; color: var(--color-outline); }
.lang-pill .ic { font-size: 12px; }

.screens { position: relative; flex: 1; min-height: 0; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; overflow-y: auto; scrollbar-width: none; background: var(--color-surface-lowest); }
.screen::-webkit-scrollbar { display: none; }
.screen.active { display: flex; }
.screen-pad { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }

/* phone-scale controls */
.seg-sm { padding: 2px; border-radius: 13px; }
.seg-sm button { padding: 6px 8px; font-size: 11px; line-height: 15px; border-radius: 11px; }
.m-card { display: flex; align-items: center; gap: 10px; background: var(--color-surface-lowest); border: 1px solid var(--color-hairline); border-radius: 16px; padding: 10px; }
.m-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-title { font-size: 13px; line-height: 17px; font-weight: 600; }
.m-sub { font-size: 11px; line-height: 15px; color: var(--color-outline); }
.m-text { font-size: 11px; line-height: 15px; }
button.m-card { width: 100%; text-align: left; font: inherit; color: inherit; }
.sub-panel[hidden] { display: none; }
.cover { position: relative; overflow: hidden; flex-shrink: 0; background: var(--color-outline-variant); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--color-surface-lowest); font-weight: 600; font-size: 20px; }
.cover::before { content: 'P'; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.fab[hidden] { display: none; }
.fab { position: absolute; right: 14px; bottom: 14px; width: 46px; height: 46px; border-radius: 15px; background: var(--color-primary); color: var(--color-on-primary); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); font-size: 22px; }

/* Search */
.s-row { display: flex; gap: 8px; padding: 8px 10px; background: var(--color-background); }
.s-pill { display: flex; align-items: center; justify-content: flex-start; gap: 6px; background: var(--color-surface-lowest); border: 1px solid var(--color-hairline); border-radius: var(--radius-pill); padding: 7px 12px; color: var(--color-secondary); font-size: 12px; line-height: 16px; font-weight: 500; box-shadow: var(--shadow-level1); }
.s-pill.grow { flex: 1; }
.s-pill .ic { font-size: 14px; }
.map { position: relative; flex: 1; background: var(--color-surface-low); overflow: hidden; }
.map-inner { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); aspect-ratio: 1080 / 1188; }
.map-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zoom { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; background: var(--color-surface-lowest); border: 1px solid var(--color-outline-variant); border-radius: 6px; overflow: hidden; }
.zoom span { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; font-size: 15px; line-height: 1; color: var(--color-on-background); }
.zoom span + span { border-top: 1px solid var(--color-hairline); }
.attr { position: absolute; right: 0; bottom: 0; background: var(--color-surface-lowest); opacity: 0.8; font-size: 7px; line-height: 10px; padding: 1px 4px; color: var(--color-outline); }
.pin {
  position: absolute; transform: translate(-50%, -100%); border: 1.5px solid var(--color-surface-lowest);
  border-radius: var(--radius-pill); padding: 3px 9px; font-size: 11px; line-height: 15px; font-weight: 600; white-space: nowrap;
  background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-pin); transition: transform 0.15s ease;
}
.pin::after { content: ''; position: absolute; inset: -14px -8px; }
.pin[aria-pressed="true"] { background: var(--color-tertiary-container); color: var(--color-secondary); z-index: 2; transform: translate(-50%, -100%) scale(1.08); }
.listing-preview { position: absolute; left: 10px; right: 10px; bottom: 16px; display: flex; gap: 10px; padding: 8px; background: var(--color-surface-lowest); border: 1px solid var(--color-hairline); border-radius: 16px; }
.listing-preview .cover { width: 68px; height: 68px; }
.listing-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.listing-title { font-size: 13px; line-height: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-sub { font-size: 10.5px; line-height: 14px; color: var(--color-outline); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.listing-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 3px; }
.listing-price { font-size: 13px; line-height: 17px; font-weight: 600; }
.listing-price small { font-size: 10px; font-weight: 400; color: var(--color-outline); }
.listing-row .btn { padding: 4px 12px; font-size: 10.5px; line-height: 15px; border-radius: 11px; }

/* Notifications */
.n-icon { width: 32px; height: 32px; border-radius: var(--radius-pill); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 16px; align-self: flex-start; }
.n-icon.req { background: var(--color-secondary-container); color: var(--color-secondary); }
.n-icon.ok { background: var(--color-tertiary-container); color: var(--color-on-tertiary-container); }
.n-icon.gold { background: var(--color-primary); color: var(--color-on-primary); }
.m-card.top { align-items: flex-start; }
.n-time { font-size: 9.5px; line-height: 13px; color: var(--color-outline); font-weight: 500; }
.unread-dot { width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--color-primary); flex-shrink: 0; margin-top: 5px; }
.n-text { font-size: 12px; line-height: 17px; }
.n-text.unread { font-weight: 500; }

/* Messages */
.avatar { border-radius: var(--radius-pill); background: var(--color-secondary-container); color: var(--color-secondary); display: flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.avatar.sm { width: 46px; height: 46px; font-size: 18px; }
.m-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-row { display: flex; align-items: center; gap: 4px; }
.m-prev.unread { color: var(--color-on-background); font-weight: 500; }

/* Profile */
.profile-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 12px 8px; text-align: center; }
.avatar.lg { width: 64px; height: 64px; font-size: 26px; }
.link-teal { color: var(--color-secondary); font-size: 12px; line-height: 16px; font-weight: 500; display: flex; align-items: center; gap: 2px; }
.profile-name { font-size: 18px; line-height: 24px; font-weight: 600; margin-top: 4px; }
.menu { margin: 6px 12px; background: var(--color-surface-lowest); border: 1px solid var(--color-hairline); border-radius: 16px; }
.menu-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; font-size: 13px; line-height: 17px; }
.menu-row + .menu-row { border-top: 1px solid var(--color-hairline); margin: 0 12px; padding-left: 0; padding-right: 0; }
.menu-row .ic { font-size: 16px; color: var(--color-secondary); }
.menu-row .chev { margin-left: auto; color: var(--color-outline); font-size: 14px; }

/* Bottom tab bar (app/(tabs)/_layout.tsx): active tab is a rounded-rectangle pill filled with secondary */
.tabbar { display: flex; background: var(--color-surface-lowest); border-top: 1px solid var(--color-hairline); padding: 6px 4px 10px; }
.tab { flex: 1; display: flex; justify-content: center; background: transparent; border: none; padding: 0; color: var(--color-on-background); }
.tab-pill { width: 100%; max-width: 58px; height: 46px; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tab-pill .ic { font-size: 17px; }
.tab-pill > span:not(.ic-wrap) { font-size: 9px; line-height: 11px; font-weight: 500; white-space: nowrap; }
.ic-wrap { position: relative; display: flex; }
.tab-badge { position: absolute; top: -6px; right: -10px; min-width: 14px; height: 14px; border-radius: 7px; padding: 0 3px; background: var(--color-primary); color: var(--color-on-primary); border: 1.5px solid var(--color-surface-lowest); font-size: 8.5px; line-height: 11px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.tap-hint { display: inline-flex; align-items: center; gap: 6px; background: var(--color-tertiary-container); color: var(--color-on-tertiary-container); border-radius: var(--radius-pill); padding: 6px 14px; font-size: var(--label-lg-size); line-height: var(--label-lg-lh); font-weight: 500; }
.tap-hint .ic { font-size: 16px; }

/* Hover feedback on everything in the phone that can be tapped */
@media (hover: hover) {
  .tab:not([aria-selected="true"]):hover .tab-pill { background: var(--color-surface-low); }
  .pin:hover { transform: translate(-50%, -100%) scale(1.08); }
  .seg-sm button:not([aria-selected="true"]):hover { background: var(--color-surface-low); }
}

/* First-visit hint: a soft, staggered pulse on the tabs and one pin. Starts when the phone scrolls into view and stops at the first touch (script removes .hint). */
@media (prefers-reduced-motion: no-preference) {
  .phone.hint .tab:not([aria-selected="true"]) .tab-pill { animation: hint-ring 2s ease-out 4; }
  .phone.hint .tab:nth-child(2) .tab-pill { animation-delay: 0s; }
  .phone.hint .tab:nth-child(3) .tab-pill { animation-delay: 0.2s; }
  .phone.hint .tab:nth-child(4) .tab-pill { animation-delay: 0.4s; }
  .phone.hint .tab:nth-child(5) .tab-pill { animation-delay: 0.6s; }
  .phone.hint .hint-pin[aria-pressed="false"] { animation: hint-pin 2s ease-out 0.3s 4; }
}
@keyframes hint-ring {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-secondary) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 9px transparent; }
}
@keyframes hint-pin {
  0% { box-shadow: var(--shadow-pin), 0 0 0 0 color-mix(in srgb, var(--color-secondary) 55%, transparent); }
  70%, 100% { box-shadow: var(--shadow-pin), 0 0 0 10px transparent; }
}
.tab[aria-selected="true"] .tab-pill { background: var(--color-secondary); color: var(--color-on-secondary); }

/* ---------- How it works ---------- */
.flow-tabs { max-width: 420px; margin-bottom: var(--space-xl); }
.how-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: var(--space-xl); align-items: start; }
.why-card { padding: var(--space-lg); background: var(--color-surface-low); }
.why-card h3 { font-size: var(--title-lg-size); line-height: var(--title-lg-lh); font-weight: 600; color: var(--color-secondary); margin-bottom: var(--space-md); }
.why-list { display: flex; flex-direction: column; }
.why-list[hidden] { display: none; }
.why-item { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-hairline); }
.why-item:first-child { border-top: none; padding-top: 0; }
.why-item:last-child { padding-bottom: 0; }
.why-icon { width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--radius-input); background: var(--color-secondary-container); color: var(--color-secondary); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.why-item h4 { margin: 0 0 2px; font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; }
.why-item p { font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); }
.flow-steps { position: relative; }
.flow-step { display: flex; gap: var(--space-md); padding-bottom: var(--space-lg); position: relative; }
.flow-step:last-child { padding-bottom: 0; }
/* dashed road-like connector - a quiet echo of the road-shaped "y" in the wordmark */
.flow-step:not(:last-child)::before {
  content: ''; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 0;
  border-left: 2px dashed var(--color-outline-variant);
}
.flow-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--radius-pill);
  background: var(--color-tertiary-container); color: var(--color-on-tertiary-container);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600;
}
.flow-step-title { font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; margin-bottom: 2px; }
.flow-step-desc { font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); }
.flow-panel[hidden] { display: none; }


/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 720px; }
.faq-item { margin-bottom: var(--space-sm); overflow: hidden; }
.faq-question {
  width: 100%; text-align: left; background: transparent; border: none; padding: var(--space-md) var(--space-lg);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-md);
  font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; color: var(--color-on-background);
}
.faq-question .chevron {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: var(--radius-pill); background: var(--color-surface);
  display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease; font-size: 14px; color: var(--color-secondary);
}
.faq-item[data-open="true"] .chevron { transform: rotate(180deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s ease; }
.faq-item[data-open="true"] .faq-answer { grid-template-rows: 1fr; }
.faq-answer > div { min-height: 0; overflow: hidden; }
.faq-answer p { padding: 0 var(--space-lg) var(--space-md); font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); }

/* ---------- Footer: brand left, downloads right, one slim line underneath ---------- */
footer { background: var(--color-surface); padding: var(--space-xl) 0 var(--space-lg); border-top: 1px solid var(--color-hairline); }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-xl); padding-bottom: var(--space-xl); }
.footer-brand { display: flex; align-items: center; gap: var(--space-md); }
.footer-brand .badge { width: 56px; height: 56px; border-radius: 14px; }
.footer-brand .wordmark-text { display: block; color: var(--color-on-background); }
.footer-tagline { font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); margin-top: 2px; }
.footer-download { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-sm); }
.footer-download-title { font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; }
.footer-download .store-row { margin-bottom: 0; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-sm) var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-hairline); font-size: var(--label-lg-size); line-height: var(--label-lg-lh); color: var(--color-muted); }

/* ---------- Reveal-on-scroll (only when JS is running, so nothing is ever hidden without it) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .faq-answer, .faq-question .chevron, .pin, .notify-panel, .store-notify-btn .chevron { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-grid, .how-grid { grid-template-columns: 1fr; }
  nav.primary-nav { margin-left: var(--space-sm); gap: var(--space-md); }
  nav.primary-nav a { position: relative; font-size: 13px; white-space: nowrap; }
  nav.primary-nav a::after { content: ''; position: absolute; inset: -14px -6px; }
  .flow-tabs button { padding: 12px var(--space-md); }
  .phone { zoom: 1; }
}
@media (max-width: 359px) {
  .nav-toggle { display: block; }
  nav.primary-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--color-primary);
    flex-direction: column; align-items: flex-start; gap: 0; padding: 0 var(--screen-margin) var(--space-md); margin-left: 0;
  }
  nav.primary-nav.open { display: flex; }
  nav.primary-nav a { padding: 12px 0; width: 100%; font-size: var(--label-lg-size); }
  nav.primary-nav a::after { display: none; }
  .phone { zoom: 0.92; }
}
@media (max-width: 860px) { .hero-badge { width: 96px; height: 96px; border-radius: var(--radius-card); } }

/* ---------- Footer links (privacy policy, account deletion, contact) ---------- */
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-md); }
.footer-links a { color: inherit; text-decoration: none; padding: 6px 0; }
@media (hover: hover) { .footer-links a:hover { text-decoration: underline; } }
.notify-note a { color: var(--color-secondary); text-decoration: underline; }
.footer-slim { padding: var(--space-lg) 0; }
.footer-slim .footer-bottom { border-top: none; padding-top: 0; }

/* ---------- Sub pages: privacy policy, account deletion ---------- */
.page-section { padding-top: var(--space-xl); }
.back-link { display: flex; width: fit-content; align-items: center; gap: 6px; padding: 6px 0; margin-bottom: var(--space-md); font-size: var(--label-lg-size); line-height: var(--label-lg-lh); font-weight: 500; color: var(--color-secondary); text-decoration: none; }
.back-link .ic { font-size: 16px; }
.email-address { font-weight: 600; color: var(--color-secondary); overflow-wrap: anywhere; }

/* Placeholder + the typography a pasted policy will get (h2, h3, p, ul, ol, a) */
.placeholder-card { display: flex; gap: var(--space-md); align-items: flex-start; padding: var(--space-lg); max-width: 720px; }
.note-icon { flex-shrink: 0; width: 40px; height: 40px; border-radius: var(--radius-input); background: var(--color-secondary-container); color: var(--color-secondary); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.placeholder-card h2 { font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; margin-bottom: 2px; }
.placeholder-card p { font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); }
.legal { max-width: 720px; }
.legal h2 { font-size: var(--title-lg-size); line-height: var(--title-lg-lh); font-weight: 600; margin: var(--space-xl) 0 var(--space-sm); }
.legal h3 { font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; margin: var(--space-lg) 0 var(--space-xs); }
.legal p, .legal li { margin-bottom: var(--space-sm); }
.legal ul, .legal ol { padding-left: 22px; margin-bottom: var(--space-md); }
.legal ul { list-style: disc; }
.legal ol { list-style: decimal; }
.legal a { color: var(--color-secondary); text-decoration: underline; }
.legal h2 { scroll-margin-top: var(--space-md); padding-top: var(--space-lg); border-top: 1px solid var(--color-hairline); }
.legal h2:first-child { margin-top: 0; }
.legal-num { font-weight: 600; }
.legal-meta { color: var(--color-muted); }
.legal-note { max-width: 720px; margin-bottom: var(--space-md); color: var(--color-muted); }
.legal-jump { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.legal-jump a { border: 1px solid var(--color-secondary); border-radius: var(--radius-pill); padding: var(--space-sm) var(--space-md); color: var(--color-secondary); font-weight: 500; text-decoration: none; }
.legal-table { overflow-x: auto; margin: var(--space-sm) 0 var(--space-md); border: 1px solid var(--color-hairline); border-radius: var(--radius-input); }
.legal table { width: 100%; border-collapse: collapse; font-size: var(--body-md-size); line-height: var(--body-md-lh); }
.legal th, .legal td { text-align: left; vertical-align: top; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--color-hairline); min-width: 120px; }
.legal thead th { background: var(--color-surface-low); font-weight: 600; }
.legal tbody th { font-weight: 600; }
.legal tbody tr:last-child th, .legal tbody tr:last-child td { border-bottom: 0; }

/* Account deletion: numbered steps beside a preview of the email to send */
.delete-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: var(--space-xl); align-items: start; }
.delete-grid h2, .info-stack h2 { font-size: var(--title-lg-size); line-height: var(--title-lg-lh); font-weight: 600; margin-bottom: var(--space-md); }
.mail-preview { overflow: hidden; }
.mail-head { display: flex; flex-direction: column; gap: 6px; padding: 14px var(--space-md); background: var(--color-surface-low); border-bottom: 1px solid var(--color-hairline); }
.mail-row { display: flex; gap: var(--space-sm); font-size: var(--body-md-size); line-height: var(--body-md-lh); }
.mail-label { width: 56px; flex-shrink: 0; color: var(--color-muted); }
.mail-value { font-weight: 500; overflow-wrap: anywhere; }
.mail-body { padding: var(--space-md); font-size: var(--body-md-size); line-height: 22px; }
.mail-body p { margin-bottom: 10px; }
.mail-body p:last-child { margin-bottom: 0; }
.fill { background: color-mix(in srgb, var(--color-primary) 55%, transparent); border-radius: 4px; padding: 0 4px; }
.info-stack { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); margin-top: var(--space-xxl); }
.info-card { padding: var(--space-lg); }
.info-card h3 { font-size: var(--title-sm-size); line-height: var(--title-sm-lh); font-weight: 600; margin-bottom: var(--space-sm); }
.info-card p, .info-card li { font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); }
.info-card ul { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: var(--space-sm); }
.privacy-line { margin-top: var(--space-lg); font-size: var(--body-md-size); line-height: var(--body-md-lh); color: var(--color-muted); }
.privacy-line a { color: var(--color-secondary); text-decoration: underline; }
@media (max-width: 860px) {
  .delete-grid, .info-stack { grid-template-columns: 1fr; }
  .info-stack { margin-top: var(--space-xl); }
}
