/* Frost landing. Dark only, like the app's legal and onboarding screens.
   Palette from Screen Time/Resources/Assets.xcassets/Colors. */

@font-face { font-family: "Geist"; src: url("/fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Geist"; src: url("/fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0d1324;
  --surface: #17203a;          /* Background 2 */
  --surface-raised: #303b59;   /* onboardingCard, dark */
  --border: rgba(242, 246, 255, 0.10);
  --text: #f2f6ff;             /* backgroundColor */
  --text-muted: rgba(242, 246, 255, 0.66);
  --text-faint: rgba(242, 246, 255, 0.45);
  --accent: #335cff;           /* custom_blue */
  --accent-hover: #4a6fff;
  --danger: #ff5c5c;           /* custom_red */
  --success: #5cd68a;
  --radius: 20px;
  --radius-sm: 12px;
  --gutter: 16px;
  --max: 1080px;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(1200px 600px at 50% -200px, rgba(51, 92, 255, 0.22), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-size: 17px;
  line-height: 1.5;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
p { margin: 0; }

.visually-hidden, .honeypot {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }

/* Header / footer */
.site-header {
  max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: center;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 19px; }
.brand img { border-radius: 8px; }

.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  color: var(--text-faint); font-size: 15px; border-top: 1px solid var(--border);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { text-decoration: none; color: var(--text-muted); }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: var(--text); }

main:not(.legal):not(.faq) > section {
  --section-gap: 96px;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) var(--section-gap);
}
/* The first section carries the page's top padding, whichever section it is. */
main:not(.legal):not(.faq) > section:first-child { padding-top: 48px; }
@media (max-width: 720px) {
  main:not(.legal):not(.faq) > section { --section-gap: 72px; }
  main:not(.legal):not(.faq) > section:first-child { padding-top: 28px; }
}
.section-lede { color: var(--text-muted); margin-top: 12px; }
.calculator h2, .how h2, .features h2, .home-faq h2 { font-size: clamp(28px, 5vw, 42px); }

/* App screenshots: rounded, no frame */
.phone { margin: 0; }
.phone img {
  width: 100%; height: auto; aspect-ratio: 924 / 2000; object-fit: cover;
  border-radius: 36px; background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
@media (max-width: 720px) { .phone img { border-radius: 28px; } }

/* Hero */
.hero { text-align: center; }
.hero, .join { position: relative; isolation: isolate; }
/* Full-width band behind the hero and the waitlist, with a hairline on the side facing the page,
   so the opening and the closing ask read as their own blocks. The band spans the viewport;
   body has overflow-x: hidden. */
.hero::before, .join::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%);
  background:
    radial-gradient(60% 120% at 30% 0%, rgba(51, 92, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(23, 32, 58, 0.15), rgba(23, 32, 58, 0.6));
  border-bottom: 1px solid var(--border);
}
.join::before { border-bottom: 0; border-top: 1px solid var(--border); }
/* The waitlist band fades back into the page color toward the footer, mirroring the hero's top. */
.join::before {
  background:
    linear-gradient(0deg, var(--bg) 0, rgba(13, 19, 36, 0) 140px),
    radial-gradient(60% 120% at 30% 0%, rgba(51, 92, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(23, 32, 58, 0.15), rgba(23, 32, 58, 0.6));
}
/* The hero band touches the top of the page. iOS Safari fills the area under the status bar
   with the page background (and theme-color), so the band starts as exactly that color and
   fades into its tint; otherwise the status bar looks like it cuts the band off. */
.hero::before {
  background:
    linear-gradient(180deg, var(--bg) 0, rgba(13, 19, 36, 0) 140px),
    radial-gradient(60% 120% at 30% 0%, rgba(51, 92, 255, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(23, 32, 58, 0.15), rgba(23, 32, 58, 0.6));
}
main:not(.legal):not(.faq) > section.hero { padding-bottom: 72px; margin-bottom: 96px; }
/* The waitlist follows the FAQ at the normal section gap (no extra top padding). Its band
   starts halfway into that gap so the heading isn't pressed against the hairline. */
main:not(.legal):not(.faq) > section.join { padding-top: 0; padding-bottom: 72px; scroll-margin-top: calc(var(--section-gap) / 2); }
.join::before { top: calc(var(--section-gap) / -2); }
@media (max-width: 720px) {
  main:not(.legal):not(.faq) > section.hero { padding-bottom: 56px; margin-bottom: 72px; }
  /* The closing title and the full-width field need more than the 16px page gutter. */
  main:not(.legal):not(.faq) > section.join { padding-bottom: 56px; padding-left: 28px; padding-right: 28px; }
}
.hero-icon { margin: 0 auto 20px; border-radius: 39px; box-shadow: 0 20px 60px rgba(51, 92, 255, 0.35); }
.hero h1 > span { display: block; }
.tagline { margin-top: 12px; color: var(--text); font-size: clamp(20px, 3vw, 26px); font-weight: 500; letter-spacing: -0.01em; }

/* Wordmark: plain white text, no effects. */
.wordmark {
  width: fit-content; margin: 0 auto; padding: 0 0.04em 0 0.06em; /* left +letter-spacing keeps it centered */
  font-size: clamp(40px, 8vw, 68px); letter-spacing: 0.02em; line-height: 1;
  color: #fff;
}
.lede { max-width: 560px; margin: 16px auto 0; color: var(--text-muted); font-size: clamp(16px, 2.4vw, 18px); }
/* Jumps to the waitlist at the bottom; hidden with the form once the App Store link is live. */
.hero-cta { margin-top: 28px; }
/* Wide screens: icon and wordmark on the left, tagline and description beside them. */
@media (min-width: 861px) {
  .hero { display: grid; grid-template-columns: auto minmax(0, 520px); justify-content: center; align-items: center; gap: 72px; }
  .hero-copy { text-align: left; }
  .hero-icon { width: 120px; height: 120px; border-radius: 28px; margin-bottom: 14px; }
  .hero .wordmark { font-size: 52px; }
  /* Same size and weight as the section headings ("How much of your life…"). */
  .hero-copy .tagline { margin-top: 0; font-size: clamp(28px, 5vw, 42px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
  .hero-copy .lede { margin: 16px 0 0; }
  .hero-cta { margin-top: 32px; }
}

/* Waitlist */
.waitlist { max-width: 480px; margin: 32px auto 0; }
.waitlist-row { display: flex; gap: 8px; }
.waitlist input[type="email"] {
  flex: 1; min-width: 0; height: 52px; padding: 0 18px;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
}
.waitlist input[type="email"]::placeholder { color: var(--text-faint); }
.waitlist input[type="email"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.waitlist button, .button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 22px; border: 0; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 600; color: #fff; text-decoration: none;
  background: var(--accent); cursor: pointer; white-space: nowrap;
  transition: background-color 120ms ease;
}
.waitlist button:hover:not(:disabled), .button:hover { background: var(--accent-hover); }
.waitlist button:focus-visible, .button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.waitlist button:disabled { opacity: 0.6; cursor: default; }
.waitlist.is-done .waitlist-row { display: none; }
.waitlist-status { min-height: 1.5em; margin-top: 12px; font-size: 15px; }
.waitlist-status[data-kind="error"] { color: var(--danger); }
.waitlist-status[data-kind="success"] { color: var(--success); font-size: 17px; }
.waitlist-status[data-kind="pending"] { color: var(--text-muted); }
.waitlist-note { color: var(--text-faint); font-size: 14px; }
.waitlist-note a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.appstore { margin-top: 32px; }

@media (max-width: 480px) {
  .waitlist-row { flex-direction: column; }
  .waitlist input[type="email"] { flex: none; }
  .waitlist button { width: 100%; }
}

/* Calculator: the problem, right after the hero. Card beside scroll.webp on wide screens,
   the phone under the card (smaller) on narrow ones. */
.calculator { display: grid; grid-template-columns: minmax(0, 560px) 260px; justify-content: center; align-items: center; gap: 64px; }
.calc-copy { min-width: 0; }
@media (max-width: 860px) {
  .calculator { grid-template-columns: minmax(0, 560px); gap: 40px; text-align: center; }
  .calc-phone { width: min(56%, 220px); justify-self: center; }
}
/* The card freezes as the projection grows: --frost goes 0 → 1 (set by main.js),
   and the background, border, frost layer and result text all read from it. */
@property --frost { syntax: "<number>"; inherits: true; initial-value: 0; }
.calc-card {
  --frost: 0.52;
  --ice: #bfe6ff;
  position: relative; isolation: isolate;
  margin-top: 28px; padding: 28px; text-align: left;
  border: 1px solid color-mix(in srgb, var(--border), rgba(191, 230, 255, 0.5) calc(var(--frost) * 100%));
  border-radius: calc(var(--radius) * 1.5);
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(160, 215, 255, calc(var(--frost) * 0.22)), transparent 60%),
    radial-gradient(120% 90% at 0% 100%, rgba(120, 190, 255, calc(var(--frost) * 0.16)), transparent 60%),
    color-mix(in oklab, var(--surface), #203f63 calc(var(--frost) * 60%));
  box-shadow:
    inset 0 0 calc(var(--frost) * 56px) rgba(191, 230, 255, calc(var(--frost) * 0.28)),
    0 0 calc(var(--frost) * 64px) rgba(120, 190, 255, calc(var(--frost) * 0.16));
  transition: --frost 500ms ease-out;
}
.calc-card > :not(.calc-frost) { position: relative; }
.calc-frost {
  position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: url("/assets/frost.svg") center / 420px auto;
  opacity: calc(var(--frost) * 0.75);
  /* Frost creeps in from the edges: the clear middle shrinks as --frost grows. */
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, transparent calc(30% + (1 - var(--frost)) * 55%), #000 calc(75% + (1 - var(--frost)) * 40%));
  mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, transparent calc(30% + (1 - var(--frost)) * 55%), #000 calc(75% + (1 - var(--frost)) * 40%));
}

/* Icy text: white tints toward ice blue and picks up a cold glow. */
.calc-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--text-muted); font-weight: 500; }
.calc-label output { white-space: nowrap; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }

.calc-label output, .calc-years {
  color: color-mix(in oklab, var(--text), var(--ice) calc(var(--frost) * 100%));
  text-shadow:
    0 0 calc(var(--frost) * 18px) rgba(140, 205, 255, calc(var(--frost) * 0.7)),
    0 0 2px rgba(225, 245, 255, calc(var(--frost) * 0.5)),
    0 1px 2px rgba(5, 15, 35, 0.6);
}
.calc-years #years-unit { color: color-mix(in oklab, var(--text-muted), var(--ice) calc(var(--frost) * 70%)); }
.calc-caption { color: color-mix(in oklab, var(--text-muted), var(--ice) calc(var(--frost) * 45%)); }

/* Slider: thick track with an accent-to-ice fill, white thumb with a soft halo
   that grows on hover and while dragging. --progress is set by main.js. */
input[type="range"] {
  --progress: 25%;
  --fill: linear-gradient(90deg, var(--accent), #8fd0ff);
  --halo: rgba(191, 230, 255, 0.22);
  width: 100%; margin: 5px 0 6px; height: 32px; background: transparent;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  touch-action: pan-y; /* a vertical swipe that starts on the slider still scrolls the page */
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: var(--fill) 0 0 / var(--progress) 100% no-repeat, rgba(242, 246, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px;
  border-radius: 50%; border: 0; background: #fff;
  box-shadow: 0 0 0 5px var(--halo), 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
input[type="range"]::-moz-range-track {
  height: 8px; border-radius: 999px; background: rgba(242, 246, 255, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--fill); }
input[type="range"]::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%; border: 0; background: #fff;
  box-shadow: 0 0 0 5px var(--halo), 0 3px 10px rgba(0, 0, 0, 0.45);
  transition: box-shadow 160ms ease, transform 160ms ease;
}
input[type="range"]:hover { --halo: rgba(191, 230, 255, 0.32); }
input[type="range"]:active { --halo: rgba(191, 230, 255, 0.4); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.08); }
input[type="range"]:active::-moz-range-thumb { transform: scale(1.08); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--accent), 0 3px 10px rgba(0, 0, 0, 0.45); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--accent), 0 3px 10px rgba(0, 0, 0, 0.45); }

/* morphText(): old and new value share one grid cell while they cross-fade. */
.morph { display: inline-grid; }
.morph > span { grid-area: 1 / 1; }
.calc-years .morph > span { transform-origin: left center; }
.calc-label .morph > span { justify-self: start; transform-origin: left center; }

.calc-scale { display: flex; justify-content: space-between; color: var(--text-faint); font-size: 13px; }
.calc-controls { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.calc-years { font-size: clamp(56px, 12vw, 80px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.calc-years #years-unit { font-size: 0.4em; letter-spacing: -0.01em; }
.calc-caption { margin-top: 8px; }
.calc-payoff { margin-top: 10px; color: var(--text); font-weight: 500; }
.calc-payoff #reclaim-value { font-variant-numeric: tabular-nums; font-weight: 600; color: #8fd0ff; }
.calc-payoff .morph > span { justify-self: center; }

.calc-info {
  display: inline-flex; align-items: center; justify-content: center; vertical-align: 1px;
  width: 20px; height: 20px; margin-left: 4px; padding: 0;
  border: 1.5px solid currentColor; border-radius: 50%; background: transparent;
  color: var(--text-faint); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}
.calc-info:hover, .calc-info[aria-expanded="true"] { color: var(--text); }
.calc-info[aria-expanded="true"] { background: rgba(242, 246, 255, 0.12); }
.calc-info:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.calc-formula {
  position: absolute; z-index: 2; top: calc(100% + 10px); left: -8px; right: -8px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: #24304f; border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  color: var(--text-muted); font-size: 13px; line-height: 1.5;
}

@media (max-width: 720px) {
  .calc-card { margin-top: 20px; padding: 22px 20px; }
  .calc-controls { margin-top: 18px; padding-top: 14px; }
  .calculator .section-lede { margin-top: 8px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .calc-card { transition: none; }
  input[type="range"]::-webkit-slider-thumb { transition: none; }
  input[type="range"]::-moz-range-thumb { transition: none; }
}

/* How it works: protect.webp, then the three steps beside it */
.how { display: grid; grid-template-columns: 260px minmax(0, 480px); justify-content: center; align-items: center; gap: 64px; }
.how-phone { order: -1; } /* phone on the left on wide screens; under the steps on phones */
.how-steps { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: step; display: grid; gap: 14px; }
.how-steps li {
  counter-increment: step; display: flex; align-items: center; gap: 16px;
  padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 18px; font-weight: 500;
}
.how-steps li::before {
  content: counter(step); flex: none; display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: rgba(51, 92, 255, 0.18); color: #8fb0ff; font-size: 15px; font-weight: 600;
}
@media (max-width: 860px) {
  .how { grid-template-columns: minmax(0, 560px); gap: 40px; }
  .how h2 { text-align: center; }
  .how-phone { order: 0; width: min(56%, 220px); justify-self: center; }
}

/* Features */
.features h2 { text-align: center; max-width: 720px; margin: 0 auto; }
/* Cards stacked on the left, attention.webp on the right. Show the whole poster. */
.features-body {
  display: grid; grid-template-columns: minmax(0, 560px) 260px; justify-content: center; align-items: center;
  gap: 48px; margin-top: 40px;
}
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.features-photo { margin: 0; }
.features-photo img {
  width: 100%; height: auto; aspect-ratio: 473 / 1024; object-fit: cover;
  border-radius: 36px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
@media (max-width: 860px) {
  .features-body { grid-template-columns: minmax(0, 560px); gap: 32px; }
  .features-photo { width: min(56%, 220px); justify-self: center; }
}
@media (max-width: 720px) { .features-photo img { border-radius: 28px; } }
.feature-list li { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.feature-list h3 { font-size: 19px; }
.feature-list p { margin-top: 10px; color: var(--text-muted); font-size: 16px; }

/* Trust line */
.trust p {
  max-width: 640px; margin: 0 auto; padding: 18px 24px; text-align: center;
  color: var(--text-muted); border: 1px solid var(--border); border-radius: var(--radius);
}

/* Short FAQ on the home page: the /faq rows (styles below), three of them. */
.home-faq { max-width: 720px !important; }
.home-faq h2 { text-align: center; margin-bottom: 28px; }
.home-faq-more { margin-top: 24px; text-align: center; }
/* The page's one waitlist form, at the end, after the questions. */
/* Waitlist: the page's one form, last on the page, on the same band as the hero. */
.join-card { max-width: 880px; margin: 0 auto; text-align: center; }
/* Breaks like the reference: "Your time is worth / protecting." (no balancing). */
.join h2 { max-width: 600px; margin: 0 auto; font-size: clamp(34px, 7vw, 58px); line-height: 1.06; text-wrap: wrap; }
.join-sub { max-width: 520px; margin: 16px auto 0; color: var(--text); opacity: 0.85; font-size: clamp(17px, 2.4vw, 20px); line-height: 1.45; }
.join .waitlist { max-width: 600px; margin-top: 32px; }
.join .waitlist-row { flex-direction: column; gap: 18px; }
.join .waitlist input[type="email"] { flex: none; }
.join .waitlist input[type="email"] { height: 60px; padding: 0 22px; font-size: 18px; }
/* White "light" button with near-black text, like Continue on the app's Session Complete screen. */
.hero .hero-cta { height: 60px; padding: 0 28px; font-size: 18px; background: #fff; color: var(--bg); }
/* "Reserve My Free Trial →" on both buttons. */
.cta-arrow { flex: none; margin-left: 10px; }
.join .waitlist-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; font-size: 15px; color: var(--text-muted); }
/* The status line takes no room until it has a message, so the note sits close under the button. */
.join .waitlist-status:empty { min-height: 0; margin-top: 0; }
.join .waitlist-note svg { flex: none; }
.join .waitlist-note a { color: inherit; text-underline-offset: 3px; }
.join .waitlist-note a:hover { color: var(--text); }
.hero .hero-cta:hover { background: #e6ecff; }
.join .waitlist button, .join .button { height: 60px; padding: 0 28px; font-size: 18px; background: #fff; color: var(--bg); }
.join .waitlist button:hover:not(:disabled), .join .button:hover { background: #e6ecff; }
.join .waitlist-status[data-kind="success"] { font-size: 19px; font-weight: 500; }
.text-link { color: var(--text-muted); text-decoration: underline; text-underline-offset: 3px; }
.text-link:hover { color: var(--text); }

/* Legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 24px var(--gutter) 72px; }
.legal h1 { font-size: clamp(34px, 6vw, 48px); }
.legal-updated { margin-top: 12px; color: var(--text-faint); font-size: 15px; }
.legal-toc { margin: 32px 0 8px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.legal-toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 15px; }
.legal-toc li { break-inside: avoid; padding: 3px 0; }
.legal-toc a { color: var(--text-muted); text-decoration: none; }
.legal-toc a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 560px) { .legal-toc ol { columns: 1; } }
.legal section { margin-top: 40px; scroll-margin-top: 24px; }
.legal p[id] { scroll-margin-top: 24px; }
.legal h2 { font-size: 22px; }
.legal section p, .legal section ul { margin-top: 12px; color: var(--text-muted); }
.legal section ul { padding-left: 22px; }
.legal section li + li { margin-top: 6px; }

/* FAQ: mirrors FAQView in the app (pill rows, 8pt gaps, 32pt between sections, +/− icon) */
.faq { max-width: 720px; margin: 0 auto; padding: 24px var(--gutter) 72px; }
.faq h1 { font-size: clamp(34px, 6vw, 48px); }
.faq-section { margin-top: 32px; }
.faq-section h2 { padding: 0 16px; margin-bottom: 8px; font-size: 16px; font-weight: 500; letter-spacing: -0.03em; }
.faq-list { display: grid; gap: 8px; }

.faq-item {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 24px;
  font-size: 15px; line-height: 1.6;
  scroll-margin-top: 24px;
  transition: border-radius 200ms ease-in-out;
}
.faq-item[open] { border-radius: 16px; }
/* js/faq.js keeps [open] until a close animation ends; data-state shows where it is heading. */
.faq-item[data-state="closing"] { border-radius: 24px; }
.faq-item summary {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 0 16px;
  list-style: none; cursor: pointer; border-radius: inherit;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.faq-item[open] summary { align-items: flex-start; gap: 16px; padding-top: 12px; min-height: 0; }
.faq-q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faq-item[open] .faq-q { white-space: normal; }

.faq-icon { position: relative; flex: none; width: 16px; height: 16px; }
.faq-item[open] .faq-icon { margin-top: 4px; }
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 7px; height: 2px;
  border-radius: 1px; background: var(--text); transition: transform 200ms ease;
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item[open] .faq-icon::after { transform: rotate(0deg); }
.faq-item[data-state="closing"] .faq-icon::after { transform: rotate(90deg); }

.faq-a { padding: 8px 48px 16px 16px; color: rgba(255, 255, 255, 0.6); transition: opacity 200ms ease-in-out; }
.faq-item[data-state="opening"] .faq-a { animation: faq-fade-in 200ms ease-in-out; }
.faq-item[data-state="closing"] .faq-a { opacity: 0; }
@keyframes faq-fade-in { from { opacity: 0; } }
.faq-a p + p, .faq-a p + ul, .faq-a ul + p { margin-top: 8px; }
.faq-a ul { margin: 4px 0 0; padding-left: 20px; }
.faq-a li + li { margin-top: 2px; }
@media (prefers-reduced-motion: reduce) {
  .faq-item, .faq-a, .faq-icon::before, .faq-icon::after { transition: none; }
}
.nowrap { white-space: nowrap; }
