/* Nano landing: the app's blue Figma system ("Color 1"), day and night, Inter, Phosphor icons. */

@font-face { font-family: "Inter"; src: url("assets/fonts/inter-medium.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/inter-bold.woff2") format("woff2"); font-weight: 700 800; font-display: swap; }


:root {
  /* NanoColors day */
  --bg: #f2f8fb;
  --fg: #0d1925;
  --fg2: #0d1925b3;
  --fg3: #0d192566;
  --card: #ffffff;
  --line: #0d19251a;
  --fill: #0d19250d;
  --brand: #259df4;
  --brand-2: #1689df;
  --accent: #1478c8; /* brand text on the page: #259DF4 darkened to keep 4.5:1 */
  --brand-surface: #eaf7ff;
  --bubble: #d6eeff;
  --bubble-ink: #1689df;
  --danger: #ff6859;
  --nav-bg: #f2f8fbb8;
  --glass-rim: #ffffffb3;
  --shadow: 0 1px 2px #0d19250d, 0 12px 32px -16px #0d192529;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
  scroll-behavior: smooth;
}

/* NanoColors night: follows the system setting only */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1925; --fg: #f2f8fb; --fg2: #f2f8fbb3; --fg3: #f2f8fb66; --card: #152635; --line: #f2f8fb1a; --fill: #f2f8fb0d;
    --accent: #5db8ff; --brand-surface: #0d2137; --bubble: #102a47; --bubble-ink: #a9ddff;
    --nav-bg: #0d1925b8; --glass-rim: #f2f8fb1f; --shadow: 0 1px 2px #0000004d, 0 12px 32px -16px #00000080;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html.i18n-pending body { visibility: hidden; }
html.sheet-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; }
svg { fill: currentColor; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2 * var(--gutter)); }

h1, h2 { font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; text-wrap: balance; }
h1 { font-size: clamp(40px, 8.2vw, 92px); }
.h1-line { white-space: nowrap; }
@media (max-width: 600px) { .h1-line { white-space: normal; } }
h2 { font-size: clamp(34px, 5.2vw, 62px); }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 16px; margin-bottom: 10px; }
.accent { color: var(--accent); }
.sub, .lede { color: var(--fg2); font-size: clamp(18px, 2vw, 22px); line-height: 1.4; text-wrap: pretty; }

/* Buttons: NanoButton — brand gradient with a light rim; secondary is a soft fill */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 999px;
  background: linear-gradient(180deg, var(--brand), var(--brand-2)); color: #fff;
  box-shadow: inset 0 0 0 2px #f2f8fb1a, 0 8px 20px -10px #1689dfaa;
  font-weight: 600; font-size: 16px; letter-spacing: -0.01em; white-space: nowrap;
  transition: transform 0.25s var(--ease), opacity 0.2s, filter 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn-small { min-height: 36px; padding: 0 16px; font-size: 14px; box-shadow: inset 0 0 0 2px #f2f8fb1a; }
.btn-wide { width: 100%; }
.btn-secondary { background: var(--fill); color: var(--fg); box-shadow: none; }
.btn:hover { filter: brightness(1.06); }
.btn:active, .badge:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; filter: none; }

.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 14px; color: var(--accent); font-weight: 600; }
.text-link svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.text-link:hover svg { transform: translateX(3px); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.badge { display: block; border-radius: 9px; transition: transform 0.25s var(--ease), opacity 0.2s; }
.badge img { height: 54px; width: auto; }
.badge:hover { opacity: 0.86; }

a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 10px; }

/* Glass: page tint, 20px blur, a light rim — the app's liquidGlass on the web */
.glass, .nav, .sheet {
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

/* Nav */
.nav {
  position: fixed; inset: 12px 0 auto; z-index: 20;
  width: min(1000px, 100% - 2 * var(--gutter)); margin-inline: auto;
  height: 56px; padding: 0 8px 0 16px;
  display: flex; align-items: center; gap: 20px;
  border-radius: 999px;
  background: var(--nav-bg);
  box-shadow: inset 0 0 0 1px var(--glass-rim), 0 0 0 1px var(--line), 0 10px 30px -18px #0d192540;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; letter-spacing: -0.02em; }
.brand img { border-radius: 23%; }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: 14px; color: var(--fg2); }
.nav-links a { padding: 12px 0; transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }

/* Segmented pill (SegmentedPill / PillTabs) */
.lang-switch, .segmented {
  display: inline-flex; padding: 3px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.lang-switch button, .segmented button {
  min-height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--fg2);
  font-size: 13px; font-weight: 600; transition: background-color 0.18s, color 0.18s;
}
.lang-switch [aria-checked="true"], .segmented [aria-checked="true"] { background: var(--brand); color: #fff; }
.segmented { margin: 0 auto 32px; display: flex; width: max-content; }
.segmented button { min-height: 40px; padding: 0 20px; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.discount { padding: 2px 7px; border-radius: 999px; background: #ffbf70; color: #0d1925; font-size: 12px; }
@media (max-width: 860px) { .nav-links { display: none; } .lang-switch { margin-left: auto; } }
@media (max-width: 380px) { .nav .btn { display: none; } }

/* Hero: big type, then the providers drifting in two rows like the paywall strip. Only transforms move; nothing follows the scroll. */
.hero { position: relative; padding: calc(116px + env(safe-area-inset-top)) 0 0; text-align: center; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 34%, #259df42e, transparent 70%);
}
.hero h1 { font-size: clamp(56px, 9.4vw, 128px); font-weight: 800; line-height: 0.95; letter-spacing: -0.05em; }
.hero .lede { max-width: 600px; margin: 24px auto 28px; }

.providers {
  display: grid; gap: 16px; margin-top: 56px; padding-block: 12px 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.orbit { display: flex; width: max-content; }
.orbit-row { display: flex; gap: 16px; padding-right: 16px; }
.orbit-left { animation: orbit 60s linear infinite; }
.orbit-right { animation: orbit 60s linear infinite reverse; }
@keyframes orbit { to { transform: translate3d(-50%, 0, 0); } }
.orbit-row li {
  display: grid; place-items: center; width: 104px; height: 104px; border-radius: 50%; flex: none;
  background: color-mix(in srgb, var(--card) 72%, transparent);
  box-shadow: inset 0 0 0 1px var(--glass-rim), inset 0 0 0 1.5px var(--line), var(--shadow);
}
.orbit-row img { width: 48px; height: 48px; }

@media (max-width: 600px) {
  .hero { padding-top: calc(112px + env(safe-area-inset-top)); }
  .hero h1 { font-size: clamp(52px, 15vw, 72px); }
  .providers { gap: 12px; margin-top: 48px; }
  .orbit-row { gap: 12px; padding-right: 12px; }
  .orbit-row li { width: 72px; height: 72px; }
  .orbit-row img { width: 36px; height: 36px; }
}

/* Sections */
section { scroll-margin-top: 80px; }
.section { padding: 120px 0; }
.section + .section { padding-top: 0; }
#features { padding-top: 120px; }
.head { text-align: center; margin-bottom: 48px; }
.head .sub { max-width: 620px; margin: 16px auto 0; }
@media (max-width: 600px) { .section, #features { padding-block: 88px; } .section + .section { padding-top: 0; } .head { margin-bottom: 32px; } }

/* Wall: real Image Lab and Video Maker results; videos play only while on screen */
.wall { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.wall figure { position: relative; margin: 0; overflow: hidden; border-radius: 24px; background: var(--fill); aspect-ratio: 3 / 4; }
.wall .wall-lead { grid-row: span 2; aspect-ratio: auto; }
.wall img, .wall video { display: block; width: 100%; height: 100%; object-fit: cover; }
.wall .wall-lead img { object-position: 50% 20%; }
.wall figcaption {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  padding: 5px 11px; border-radius: 999px; background: #0d1925a6; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3;
}
@media (max-width: 700px) {
  .wall { grid-template-columns: 1fr 1fr; gap: 8px; }
  .wall figure { border-radius: 20px; }
  .wall .wall-lead { grid-column: span 2; grid-row: auto; aspect-ratio: 4 / 3; }
  .wall figcaption { left: 8px; bottom: 8px; font-size: 12px; }
}

/* Tools: the app's Tool Shortcut as a list */
.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool { display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); }
.tool img { flex: none; width: 64px; height: 64px; object-fit: contain; }
.tool h3 { font-size: 18px; }
.tool p { color: var(--fg2); font-size: 14px; line-height: 1.35; margin-top: 4px; }
@media (max-width: 900px) { .tools { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .tools { grid-template-columns: 1fr; gap: 10px; } .tool { padding: 12px 14px; } .tool img { width: 52px; height: 52px; } }

/* Assistants: native horizontal swipe on phones, a 3×2 grid on wide screens */
.cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 300px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain;
  padding: 0 var(--gutter) 8px; scrollbar-width: none;
}
.cards::-webkit-scrollbar { display: none; }
.cards li { scroll-snap-align: start; min-width: 0; }
.cards img { width: 100%; height: auto; aspect-ratio: 1080 / 806; object-fit: cover; border-radius: 22px; margin-bottom: 12px; }
.cards p { color: var(--fg2); font-size: 15px; margin-top: 4px; }
@media (min-width: 900px) {
  .cards { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; gap: 32px 20px; overflow: visible; width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: 0; }
}

/* Start: same background as the rest of the page */
.start-title { font-size: clamp(40px, 7vw, 80px); letter-spacing: -0.04em; text-align: center; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 64px; }
.facts li { border-top: 1px solid var(--line); padding-top: 22px; }
.facts p { color: var(--fg2); margin-top: 8px; max-width: 320px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr; gap: 28px; margin-top: 40px; } }

/* Plans: Card/Plan */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 28px 24px 24px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow);
}
.plan h3 { font-size: 22px; }
.plan-popular { box-shadow: inset 0 0 0 2px var(--brand), var(--shadow); }
.plan-badge { position: absolute; top: 24px; right: 20px; padding: 4px 10px; border-radius: 999px; background: var(--brand-surface); color: var(--accent); font-size: 13px; font-weight: 600; }
.plan-price { font-size: clamp(28px, 3vw, 34px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; min-height: 1.15em; font-variant-numeric: tabular-nums; }
.plan-note { color: var(--fg2); font-size: 14px; min-height: 1.4em; }
.plan-perks { display: grid; gap: 10px; margin: 10px 0 18px; font-size: 15px; }
.plan-perks li { display: flex; gap: 10px; align-items: center; }
.plan-perks svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.plan .btn { margin-top: auto; width: 100%; }
@media (max-width: 860px) { .plans-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.how li { display: flex; gap: 14px; align-items: flex-start; color: var(--fg2); font-size: 15px; }
.how span { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-surface); color: var(--accent); font-weight: 700; font-size: 14px; }
@media (max-width: 760px) { .how { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* Skeleton: the app's silver shimmer */
.skeleton {
  display: inline-block; width: 7em; max-width: 100%; height: 0.9em; vertical-align: middle; border-radius: 8px;
  background: linear-gradient(90deg, var(--fill) 0%, color-mix(in srgb, var(--fg) 12%, transparent) 50%, var(--fill) 100%) 0 0 / 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skeleton-short { width: 10em; height: 0.8em; }
.skeleton-block { display: block; width: 100%; height: 320px; border-radius: 20px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 68px; padding: 14px 0; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--fg2); border-bottom: 2px solid var(--fg2); transform: rotate(45deg); transition: transform 0.35s var(--ease); margin-right: 6px; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { color: var(--fg2); padding: 0 40px 24px 0; max-width: 640px; }

/* CTA + footer */
.cta { text-align: center; }
.cta-icon { margin: 0 auto 28px; border-radius: 23%; box-shadow: 0 24px 48px -20px #1689df80; }
.cta h2 { margin-bottom: 32px; }

.footer { border-top: 1px solid var(--line); padding: 36px 0 48px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; margin-bottom: 24px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 14px; color: var(--fg2); }
.footer nav a { padding: 8px 0; }
.footer nav a:hover { color: var(--fg); }
.fine { color: var(--fg2); font-size: 12px; line-height: 1.5; max-width: 820px; }
.fine + .fine { margin-top: 10px; }

/* Checkout sheet: AppSheet on phones (bottom, snaps up), a centered card on wider screens */
.sheet-root { position: fixed; inset: 0; z-index: 40; display: grid; align-items: end; justify-items: center; }
.sheet-scrim { position: absolute; inset: 0; background: #000000b3; opacity: 0; transition: opacity 0.3s var(--ease); }
.sheet {
  position: relative; width: min(480px, 100%); max-height: min(92svh, 760px); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
  border-radius: 32px 32px 0 0; background: color-mix(in srgb, var(--card) 94%, transparent);
  box-shadow: inset 0 0 0 1px var(--glass-rim), 0 -20px 60px -30px #0d192580;
  transform: translateY(100%); transition: transform 0.42s var(--ease);
}
.sheet::before { content: ""; display: block; width: 36px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: var(--fg3); }
.sheet-root.is-open .sheet-scrim { opacity: 1; }
.sheet-root.is-open .sheet { transform: none; }
@media (min-width: 640px) {
  .sheet-root { align-items: center; }
  .sheet { border-radius: 32px; padding: 24px 28px 28px; transform: translateY(24px) scale(0.96); opacity: 0; transition: transform 0.42s var(--ease), opacity 0.3s var(--ease); }
  .sheet::before { display: none; }
  .sheet-root.is-open .sheet { opacity: 1; }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: 24px; letter-spacing: -0.02em; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; margin-right: -8px; border: 0; border-radius: 50%; background: var(--fill); }
.icon-btn svg { width: 20px; height: 20px; }
.sheet-summary { margin: 4px 0 20px; color: var(--accent); font-weight: 600; }
.sheet-summary:empty { display: none; }
/* One column no wider than the sheet: Safari sizes an input by its own default width (20 characters), which with
   the code's letter spacing is wider than the sheet and would push every row past its right edge. */
.sheet-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.sheet-step > * { min-width: 0; }
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; font-size: 14px; font-weight: 600; }
.field input {
  width: 100%; min-width: 0; box-sizing: border-box;
  min-height: 56px; padding: 0 18px; border: 0; border-radius: 18px; background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 17px; font-weight: 500;
}
.field input[name="code"] { letter-spacing: 0.4em; font-variant-numeric: tabular-nums; font-size: 22px; }
.field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--brand); }
.hint { color: var(--fg2); font-size: 14px; line-height: 1.45; }
.hint b { color: var(--fg); font-weight: 600; }
.link-btn { padding: 0; border: 0; background: none; color: var(--accent); font-weight: 600; min-height: 24px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--fg2); line-height: 1.45; cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--brand); }
.check a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.widget { min-height: 320px; }
.secure { display: flex; align-items: center; gap: 8px; }
.secure svg { width: 16px; height: 16px; flex: none; }
.sheet-step[data-step="wait"], .sheet-step[data-step="done"], .sheet-step[data-step="failed"] { justify-items: center; text-align: center; padding: 12px 0 4px; }
.wait-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid var(--fill); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.done-mark svg { width: 56px; height: 56px; color: var(--brand); }
.invite { width: 100%; display: grid; gap: 10px; justify-items: center; padding: 20px; border-radius: 24px; background: var(--brand-surface); }
.invite-label { color: var(--fg2); font-size: 14px; }
.invite-code { font-size: clamp(24px, 7vw, 30px); font-weight: 700; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; user-select: all; }
.stores-small .badge img { height: 45px; }

/* Top toast (NotificationService on the web) */
.toast {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 50%; z-index: 60;
  width: max-content; max-width: min(460px, 100% - 32px); padding: 14px 20px; border-radius: 20px;
  background: color-mix(in srgb, var(--card) 92%, transparent); color: var(--fg); font-size: 15px;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  box-shadow: inset 0 0 0 1px var(--glass-rim), 0 12px 32px -12px #0d192566;
  transform: translate(-50%, -140%); transition: transform 0.35s var(--ease);
}
.toast.is-on { transform: translate(-50%, 0); }

/* Reveal: once, on enter; opacity and transform only */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.facts .reveal:nth-child(2), .plans-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.facts .reveal:nth-child(3), .plans-grid .reveal:nth-child(3) { transition-delay: 0.16s; }

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .reveal { transition: opacity 0.2s; transform: none !important; }
  .orbit-left, .orbit-right, .skeleton { animation: none; }
  .sheet, .sheet-scrim, .toast { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav, .sheet, .toast { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Legal pages (terms.html, privacy.html), rendered from docs/legal by build-legal.sh */
.legal { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; padding: clamp(120px, 17vh, 170px) 0 clamp(72px, 12vh, 140px); }
.legal-head { margin-bottom: clamp(36px, 6vh, 64px); }
.legal-head h1 { font-size: clamp(30px, 6.4vw, 72px); overflow-wrap: break-word; }
.legal-draft { margin-top: 22px; max-width: 640px; padding: 14px 18px; border-radius: 14px; background: var(--card); color: var(--fg2); font-size: 15px; box-shadow: inset 3px 0 0 var(--accent); }
.legal-grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }

.legal-toc { position: sticky; top: 88px; max-height: calc(100svh - 112px); overflow-y: auto; font-size: 14px; line-height: 1.35; }
.legal-toc > p { color: var(--fg); font-weight: 600; margin-bottom: 10px; }
.legal-toc ul ul { display: none; }
.legal-toc a { display: block; padding: 6px 0; color: var(--fg2); transition: color 0.2s; }
.legal-toc a:hover { color: var(--fg); }

.legal-body { max-width: 720px; font-size: 17px; line-height: 1.6; overflow-wrap: break-word; }
.legal-body > :first-child { margin-top: 0; }
.legal-body h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -0.02em; line-height: 1.15; margin: 56px 0 16px; scroll-margin-top: 92px; text-wrap: balance; }
.legal-body h3 { font-size: 19px; margin: 32px 0 10px; scroll-margin-top: 92px; }
.legal-body p, .legal-body ul, .legal-body table { margin: 0 0 16px; }
.legal-body ul { list-style: disc; padding-left: 22px; }
.legal-body li { margin-bottom: 8px; }
.legal-body li::marker { color: var(--fg2); }
.legal-body strong { font-weight: 600; }
.legal-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal-body table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.legal-body th, .legal-body td { min-width: 150px; padding: 12px 16px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-body th { font-weight: 600; white-space: nowrap; }
.legal-body .todo { padding: 1px 6px; border-radius: 6px; background: #ffe9a8; color: #5c4400; font-size: 0.88em; font-weight: 500; }

@media (max-width: 860px) {
  .legal-grid { grid-template-columns: minmax(0, 1fr); }
  .legal-toc { position: static; max-height: none; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
  .legal-toc ul { columns: 2; column-gap: 24px; }
  .legal-toc li { break-inside: avoid; }
}
@media (max-width: 520px) { .legal-toc ul { columns: 1; } }
.legal-page .nav-links { display: flex; }
/* Phones: the nav keeps only the language switch; both documents stay linked in the footer. */
@media (max-width: 720px) { .legal-page .nav-links a:not([hreflang]) { display: none; } .legal-page .nav-links { margin-left: auto; } .legal-page .nav .btn { margin-left: 0; } }
