/* Stepper website
   Colors and type follow the Stepper app design system (DesignSystem.swift). */

/* Geist is self-hosted (SIL OFL 1.1, see assets/fonts/OFL.txt) so the site makes no third-party requests. */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Geist-Regular.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Geist-Medium.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Geist-SemiBold.woff2") format("woff2"); }

:root {
  --ink: #1c1c1f;
  --ink-2: #27272a;
  --text: #3f3f46;
  --muted: #52525b;
  --subtle: #71717a;
  --page: #f6f6f5;
  --card: #ededec;
  --surface: #ffffff;
  --line: #eaeae8;
  --fill-secondary: #f7f6f4;
  --finish-bg: #fed4cd;
  --finish-text: #a53513;
  --error-text: #931a1a;
  --success-text: #1e5a3c;
  --sky-fg: #0369a1;
  --sky-bg: #dfeff8;
  --indigo-fg: #4338ca;
  --lime-fg: #3f6212;
  --lime-bg: #e8f2d8;
  --footer: #262626;
  --sky:
    radial-gradient(90% 70% at 50% 115%, #4fa5ee 0%, rgba(227, 242, 253, 0) 62%),
    radial-gradient(45% 55% at 0% 70%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(45% 55% at 100% 65%, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #3280c4 0%, #4598da 45%, #8cc6f0 100%);
  --ui-shadow: 0 18px 40px rgba(28, 28, 31, 0.08), 0 0 0 1px rgba(28, 28, 31, 0.04);
  --font: "Geist", system-ui, -apple-system, sans-serif;
  --pad-x: 80px;
  --panel-inset: 16px;
  --radius-panel: 28px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: var(--ink); }
a:hover { color: #000; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }

:focus-visible { outline: 2px solid #3280c4; outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 999px; background: #fff; text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 16px; }

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

.container { width: 100%; max-width: 1440px; margin: 0 auto; }

/* ---------- Shared pieces ---------- */

.panel-wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--panel-inset); }
.sky-panel { background: var(--sky); border-radius: var(--radius-panel); color: #fff; }

.pill {
  display: inline-flex; align-items: center; height: 28px; padding: 0 14px; border-radius: 999px;
  font-size: 11px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase;
  background: #fff; box-shadow: inset 0 0 0 1px #e4e4e2; color: var(--muted);
}
.pill--glass { background: rgba(255, 255, 255, 0.14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); color: #fff; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px; border: 0;
  font: 500 16px/1 var(--font); letter-spacing: -0.4px; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn svg { flex-shrink: 0; }
.btn--white { background: #fff; color: var(--ink); box-shadow: 0 6px 20px rgba(20, 60, 110, 0.12); }
.btn--white:hover { color: var(--ink); background: #f3f8fc; }
.btn--ghost { background: transparent; color: #fff; }
.btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.btn--dark {
  color: #fff; border: 1px solid transparent;
  background:
    linear-gradient(#353539, #27272a) padding-box,
    linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.07)) border-box;
}
.btn--dark:hover { color: #fff; background: linear-gradient(#2b2b2f, #131315) padding-box, linear-gradient(rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.07)) border-box; }

.section-head { display: flex; flex-direction: column; gap: 16px; }
.section-head--center { align-items: center; text-align: center; }
.h2 { font-size: 56px; line-height: 1.06; font-weight: 500; letter-spacing: -2.4px; color: var(--ink); }
.lead { font-size: 17px; line-height: 1.55; color: var(--muted); }
.sky-panel .h2 { color: #fff; }
.sky-panel .lead { color: rgba(255, 255, 255, 0.95); font-size: 18px; font-weight: 500; }

.icon-circle {
  width: 56px; height: 56px; border-radius: 50%; background: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(28, 28, 31, 0.06);
}

/* ---------- Site header (inside the sky panel) ---------- */

.site-header {
  position: relative; z-index: 2; height: 96px; padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.brand span { font-size: 19px; font-weight: 500; letter-spacing: -0.5px; }
.site-nav { display: flex; gap: 36px; }
.site-nav a { color: rgba(255, 255, 255, 0.92); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:hover { color: #fff; }
.header-cta .short { display: none; }

/* ---------- Hero ---------- */

.hero { padding-top: var(--panel-inset); }
.hero-panel { position: relative; overflow: hidden; }
.hero-copy {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: 44px 24px 0; text-align: center;
}
.hero h1 { font-size: 96px; line-height: 0.98; font-weight: 500; letter-spacing: -4.6px; color: #fff; }
.hero h1 .line { display: block; }
.hero-sub { max-width: 520px; font-size: 18px; line-height: 1.5; font-weight: 500; color: rgba(255, 255, 255, 0.95); }
.hero-actions {
  display: flex; gap: 6px; padding: 6px; margin-top: 6px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}
.hero-visual { position: relative; height: 473px; margin-top: 37px; overflow: hidden; }
.hero-visual img { width: 446px; height: auto; margin: 0 auto; }
.hero-stats {
  position: absolute; left: 50%; bottom: 50px; transform: translateX(-50%);
  width: min(660px, calc(100% - 32px)); padding: 10px; border-radius: 26px;
  display: flex; align-items: center; gap: 8px;
  background-color: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.hero-stats .stat {
  flex: 1 1 0; height: 92px; border-radius: 16px; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background-color: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.hero-stats .stat:nth-child(3) { background: linear-gradient(180deg, rgba(39, 63, 74, 0.32) 28%, rgba(255, 255, 255, 0.1) 100%); }
.hero-stats .stat:nth-child(5) { background: linear-gradient(180deg, rgba(33, 44, 49, 0.18) 40%, rgba(31, 52, 64, 0) 100%); }
.hero-stats .value { font-size: 30px; font-weight: 400; letter-spacing: -1px; }
.hero-stats .label { font-size: 11px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(255, 255, 255, 0.9); }
.hero-stats .sep { color: rgba(255, 255, 255, 0.8); font-size: 18px; }

/* ---------- Features ---------- */

.features { padding: 140px var(--pad-x) 120px; display: flex; flex-direction: column; align-items: center; gap: 64px; }
.features .lead { max-width: 440px; }
.feature-stack { width: 100%; display: flex; flex-direction: column; gap: 20px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature-card {
  height: 470px; border-radius: 28px; background: var(--card); overflow: hidden;
  display: flex; flex-direction: column; gap: 20px;
}
.feature-visual { position: relative; height: 312px; flex-shrink: 0; overflow: hidden; }
.feature-text { padding: 8px 40px 36px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.feature-text h3 { font-size: 24px; font-weight: 500; letter-spacing: -0.7px; }
.feature-text p { font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 460px; }

.center-x { position: absolute; left: 0; right: 0; margin-left: auto; margin-right: auto; }
.ui-card { background: #fff; border-radius: 20px; box-shadow: var(--ui-shadow); }

/* Plan by the step */
.fv-map img { top: -5px; width: 299px; height: auto; }
.ctx-menu { position: absolute; right: 40px; top: 70px; width: 200px; padding: 6px; font-size: 14px; font-weight: 500; }
.ctx-menu div { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; }
.ctx-menu .danger { color: var(--error-text); }
.ctx-menu .active { background: var(--fill-secondary); color: var(--ink-2); }

/* Walk it live */
.walk-sheet { top: 56px; width: 340px; padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.grabber { align-self: center; width: 36px; height: 4px; border-radius: 2px; background: #d6d6d6; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; column-gap: 16px; }
.mini-stat { display: flex; flex-direction: column; gap: 2px; }
.mini-stat .v { font-size: 24px; font-weight: 500; letter-spacing: -0.8px; color: var(--ink-2); }
.mini-stat .l { font-size: 13px; color: var(--subtle); }
.walk-actions { display: flex; gap: 10px; }
.round-btn { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: var(--fill-secondary); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.finish-btn { flex-grow: 1; height: 48px; border-radius: 999px; background: var(--finish-bg); color: var(--finish-text); font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.paused-chip {
  position: absolute; left: calc(50% + 110px); top: 30px; height: 40px; padding: 0 16px 0 12px;
  display: flex; align-items: center; gap: 8px; border-radius: 999px; background: #fff;
  box-shadow: 0 10px 24px rgba(28, 28, 31, 0.1); font-size: 14px; font-weight: 500; color: var(--ink-2);
}

/* Climb the ranks */
.fv-rank img { top: 8px; width: 300px; height: auto; }
.rank-chip { position: absolute; left: calc(50% - 252px); top: 88px; width: 202px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.tile-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.tile-icon--sky { background: var(--sky-bg); color: var(--sky-fg); }
.tile-icon--lime { background: var(--lime-bg); color: var(--lime-fg); }
.chip-text { display: flex; flex-direction: column; gap: 2px; }
.chip-text .k { font-size: 12px; color: var(--subtle); }
.chip-text .v { font-size: 16px; font-weight: 500; letter-spacing: -0.3px; color: var(--ink-2); }

/* Saved routes */
.saved-card { top: 60px; width: 380px; padding: 16px; display: flex; flex-direction: column; gap: 14px; z-index: 1; }
.saved-head { display: flex; align-items: center; gap: 12px; }
.saved-tiles { display: flex; gap: 8px; }
.saved-tiles div { flex: 1 1 0; padding: 12px 8px; border-radius: 12px; background: var(--fill-secondary); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.saved-tiles .k { font-size: 12px; color: var(--subtle); }
.saved-tiles .v { font-size: 20px; font-weight: 500; letter-spacing: -0.6px; color: var(--ink-2); }
.saved-ghost { top: 216px; width: 300px; height: 54px; border-radius: 0 0 18px 18px; background: rgba(255, 255, 255, 0.6); }

.mini-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mini-card { min-height: 200px; padding: 28px; border-radius: 24px; background: var(--card); display: flex; flex-direction: column; gap: 18px; }
.mini-card .icon-circle { width: 44px; height: 44px; box-shadow: 0 4px 12px rgba(28, 28, 31, 0.06); }
.mini-card h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.4px; }
.mini-card p { font-size: 15px; line-height: 1.55; color: var(--muted); margin-top: 6px; }

/* ---------- How it works ---------- */

.how { padding: 120px var(--pad-x); display: flex; gap: 72px; align-items: center; }
.how .section-head { width: 480px; flex-shrink: 0; gap: 18px; align-items: flex-start; }
.how .lead { max-width: 380px; }
.timeline { position: relative; flex-grow: 1; display: flex; flex-direction: column; gap: 32px; list-style: none; padding: 0; }
.timeline::before { content: ""; position: absolute; left: 19px; top: 0; bottom: 0; border-left: 1px dashed #bdbdba; }
.step { position: relative; display: flex; gap: 32px; }
.step-num {
  position: relative; width: 40px; height: 40px; margin-top: 180px; flex-shrink: 0; border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; display: flex; align-items: center; justify-content: center;
}
.step-card { flex-grow: 1; min-width: 0; height: 400px; border-radius: 28px; background: var(--card); overflow: hidden; display: flex; flex-direction: column; gap: 20px; }
.step-visual { position: relative; height: 283px; flex-shrink: 0; overflow: hidden; }
.step-visual .fade-img { width: 332px; height: auto; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
.step-visual .s1 { top: -74px; }
.step-visual .s3 { top: -90px; }
.step-text { padding: 4px 40px 32px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.step-text h3 { font-size: 22px; font-weight: 500; letter-spacing: -0.6px; }
.step-text p { font-size: 16px; line-height: 1.55; color: var(--muted); }
.walk-card { top: 50px; width: 332px; padding: 16px; display: flex; flex-direction: column; gap: 22px; }
.walk-card-head { display: flex; align-items: center; gap: 12px; }
.walk-card-head img { width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 0 0 1px rgba(28, 28, 31, 0.06); }
.walk-card-head .t { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.walk-card-head .s { font-size: 12px; color: var(--subtle); }
.walk-rows { display: flex; flex-direction: column; gap: 8px; }
.walk-rows div { height: 44px; padding: 0 14px; border-radius: 12px; background: var(--fill-secondary); display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.walk-rows .finish { color: var(--finish-text); }

/* ---------- Ranks ---------- */

.ranks-panel { padding: 96px 0; display: flex; flex-direction: column; align-items: center; gap: 56px; overflow: hidden; }
.ranks-panel .section-head { align-items: center; text-align: center; gap: 24px; padding: 0 24px; }
.ranks-panel .h2 { max-width: 460px; }
.ranks-panel .lead { max-width: 420px; }
.rank-strip {
  width: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - 704px), #000 calc(50% - 440px), #000 calc(50% + 440px), transparent calc(50% + 704px));
  mask-image: linear-gradient(90deg, transparent calc(50% - 704px), #000 calc(50% - 440px), #000 calc(50% + 440px), transparent calc(50% + 704px));
}
.rank-strip ol {
  list-style: none; padding: 0; display: flex; gap: 12px; width: max-content;
  margin-left: calc(50% - 572px); /* keeps Lv.2–Lv.7 centred and fully visible */
}
.rank {
  width: 130px; height: 96px; flex: none; padding: 16px 12px; border-radius: 18px; color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
  background: rgba(255, 255, 255, 0.2); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.rank--wide { width: 150px; }
.rank .lv { font-size: 11px; font-weight: 500; letter-spacing: 1.4px; text-transform: uppercase; opacity: 0.9; }
.rank .name { display: block; font-size: 16px; line-height: 1.2; font-weight: 500; letter-spacing: -0.3px; }
.rank .steps { display: block; font-size: 12px; opacity: 0.85; margin-top: 4px; }

/* ---------- Privacy summary ---------- */

.privacy { padding: 120px var(--pad-x) 0; display: flex; flex-direction: column; align-items: center; gap: 56px; }
.privacy .lead { max-width: 560px; }
.privacy-grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.privacy-card { padding: 36px 32px; border-radius: 28px; background: var(--card); display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.privacy-card .icon-circle { color: var(--success-text); }
.privacy-card h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.5px; }
.privacy-card p { font-size: 16px; line-height: 1.55; color: var(--muted); margin-top: 8px; }

/* ---------- FAQ ---------- */

.faq { padding: 120px var(--pad-x); display: flex; gap: 72px; }
.faq .section-head { width: 440px; flex-shrink: 0; gap: 18px; align-items: flex-start; }
.faq-list { flex-grow: 1; display: flex; flex-direction: column; gap: 12px; }
.faq-item { border-radius: 22px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 26px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  font-size: 20px; font-weight: 500; letter-spacing: -0.4px; border-radius: 22px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { padding-bottom: 10px; }
.faq-item .toggle { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--page); display: flex; align-items: center; justify-content: center; transition: transform 0.2s ease; }
.faq-item[open] .toggle { transform: rotate(45deg); }
.faq-item p { padding: 0 80px 26px 28px; font-size: 16px; line-height: 1.6; color: var(--muted); }

/* ---------- Download CTA ---------- */

.cta { padding-bottom: 20px; }
.cta-panel { min-height: 560px; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.cta-panel img { width: 65px; height: 65px; border-radius: 18px; box-shadow: 0 16px 40px rgba(20, 60, 110, 0.25); }
.cta-panel h2 { font-size: 72px; line-height: 1; font-weight: 500; letter-spacing: -3.2px; color: #fff; }
.cta-panel p { font-size: 18px; font-weight: 500; color: rgba(255, 255, 255, 0.95); }

/* ---------- Footer ---------- */

.site-footer { background: var(--footer); color: #fff; overflow: hidden; margin-top: 0; }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 72px 64px 0; }
.footer-top { display: flex; justify-content: space-between; gap: 64px; }
.footer-about { width: 440px; display: flex; flex-direction: column; gap: 20px; }
.footer-about .brand img { width: 32px; height: 32px; }
.footer-about p { font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.86); }
.footer-cols { display: flex; gap: 96px; }
.footer-col { display: flex; flex-direction: column; gap: 18px; }
.footer-col h2 { font-size: 18px; font-weight: 500; }
.footer-col a { font-size: 15px; color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-meta { margin-top: 64px; display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: rgba(255, 255, 255, 0.64); }
.wordmark { margin-top: 40px; height: clamp(56px, 17.4vw, 250px); overflow: hidden; display: flex; justify-content: center; }
.wordmark span { font-size: clamp(80px, 23vw, 330px); line-height: 0.86; font-weight: 500; letter-spacing: -0.055em; white-space: nowrap; }

/* ---------- Legal pages ---------- */

.legal-hero-panel { padding-bottom: 72px; }
.legal-hero-copy { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 56px 24px 0; text-align: center; }
.legal-hero-copy h1 { font-size: 88px; line-height: 1; font-weight: 500; letter-spacing: -4px; color: #fff; }
.legal-hero-copy p { max-width: 560px; font-size: 18px; line-height: 1.5; font-weight: 500; color: rgba(255, 255, 255, 0.95); }
.legal-hero-copy .date { font-size: 11px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase; color: rgba(255, 255, 255, 0.9); }

.legal-main { padding: 96px var(--pad-x) 120px; display: flex; gap: 72px; align-items: flex-start; }
.toc { width: 320px; flex-shrink: 0; position: sticky; top: 24px; padding: 28px; border-radius: 24px; background: var(--card); }
.toc summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 11px; font-weight: 500; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted);
  pointer-events: none; /* always open on desktop */
}
.toc summary::-webkit-details-marker { display: none; }
.toc .chevron { display: none; }
.toc ol { list-style: none; padding: 0; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; font-size: 15px; line-height: 1.4; font-weight: 500; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }

.legal-article {
  flex-grow: 1; min-width: 0; padding: 56px 64px; border-radius: 28px; background: #fff; box-shadow: 0 0 0 1px var(--line);
  display: flex; flex-direction: column; gap: 48px;
}
.legal-article section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 24px; }
.legal-article h2 { font-size: 24px; line-height: 1.3; font-weight: 500; letter-spacing: -0.6px; color: var(--ink-2); }
.legal-article p,
.legal-article li { font-size: 17px; line-height: 1.65; color: var(--text); }
.legal-article ul { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.legal-article li { padding-left: 4px; }
.legal-article strong { font-weight: 600; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); }
.legal-article table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; color: var(--text); }
.legal-article th,
.legal-article td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-article th { background: var(--fill-secondary); font-weight: 600; color: var(--ink-2); }
.legal-article tr:last-child td { border-bottom: 0; }

/* ---------- 404 ---------- */

.notfound { min-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.notfound-copy { flex-grow: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 48px 24px 96px; text-align: center; }
.notfound-copy h1 { font-size: 72px; line-height: 1; font-weight: 500; letter-spacing: -3px; }
.notfound-copy p { font-size: 18px; font-weight: 500; color: rgba(255, 255, 255, 0.95); }

/* ======================================================
   Tablet
   ====================================================== */

@media (max-width: 1180px) {
  :root { --pad-x: 40px; }
  .hero h1 { font-size: 80px; letter-spacing: -3.8px; }
  .how { flex-direction: column; align-items: stretch; gap: 48px; }
  .how .section-head { width: auto; }
  .faq { flex-direction: column; gap: 40px; }
  .faq .section-head { width: auto; }
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-about { width: auto; max-width: 440px; }
  .legal-main { flex-direction: column; align-items: stretch; gap: 24px; }
  .toc { position: static; width: auto; }
  .legal-hero-copy h1 { font-size: 72px; letter-spacing: -3.2px; }
}

@media (max-width: 960px) {
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .mini-grid,
  .privacy-grid { grid-template-columns: minmax(0, 1fr); }
  .rank-chip { left: 16px; }
  .paused-chip { left: auto; right: 20px; top: 24px; }
}

/* ======================================================
   Mobile (matches the V2 mobile design, 390 px)
   ====================================================== */

@media (max-width: 760px) {
  :root { --pad-x: 16px; --panel-inset: 8px; --radius-panel: 24px; }

  .h2 { font-size: 36px; line-height: 1.08; letter-spacing: -1.6px; }
  .lead { font-size: 16px; }
  .sky-panel .lead { font-size: 16px; }

  .site-header { height: 72px; padding: 0 16px 0 20px; }
  .brand img { width: 28px; height: 28px; border-radius: 8px; }
  .brand span { font-size: 17px; }
  .site-nav { display: none; }
  .header-cta { height: 40px; padding: 0 20px; }
  .header-cta .long { display: none; }
  .header-cta .short { display: inline; }

  .hero-copy { gap: 16px; padding: 24px 20px 0; }
  .hero h1 { font-size: 46px; line-height: 1; letter-spacing: -2.2px; }
  .hero h1 .line { display: inline; }
  .hero-sub { font-size: 16px; }
  .hero-actions { align-self: stretch; flex-direction: column; gap: 4px; margin-top: 4px; border-radius: 30px; }
  .hero-actions .btn--ghost { height: 44px; }
  .hero-visual { height: 440px; margin-top: 36px; }
  .hero-visual img { width: 290px; }
  .hero-stats {
    bottom: 16px; width: calc(100% - 32px); padding: 8px; border-radius: 22px;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  }
  .hero-stats .sep { display: none; }
  .hero-stats .stat { height: 72px; border-radius: 14px; gap: 4px; }
  .hero-stats .value { font-size: 22px; letter-spacing: -0.8px; }
  .hero-stats .label { font-size: 10px; letter-spacing: 1.4px; }

  .features { padding: 72px var(--pad-x) 56px; gap: 32px; }
  .feature-stack,
  .feature-grid,
  .mini-grid { gap: 16px; }
  .feature-card { height: auto; border-radius: 24px; gap: 0; }
  .feature-visual { height: 280px; }
  .feature-text { padding: 4px 24px 28px; gap: 8px; }
  .feature-text h3 { font-size: 21px; letter-spacing: -0.6px; }
  .feature-text p { font-size: 15px; }
  .fv-map img { left: 24px; right: auto; margin: 0; top: 8px; width: 250px; }
  .ctx-menu { right: 16px; top: 64px; width: 170px; padding: 5px; font-size: 13px; }
  .ctx-menu div { gap: 8px; padding: 10px; }
  .walk-sheet { width: 300px; padding: 12px 18px 18px; gap: 14px; }
  .mini-stat .v { font-size: 22px; }
  .mini-stat .l { font-size: 12px; }
  .round-btn { width: 44px; height: 44px; }
  .finish-btn { height: 44px; font-size: 15px; }
  .paused-chip { height: 36px; font-size: 13px; }
  .fv-rank img { width: 270px; }
  .rank-chip { top: 96px; width: 190px; padding: 12px 14px; gap: 10px; }
  .tile-icon { width: 36px; height: 36px; border-radius: 10px; }
  .chip-text .k { font-size: 11px; }
  .chip-text .v { font-size: 15px; }
  .saved-card { top: 56px; width: calc(100% - 40px); max-width: 318px; padding: 14px; gap: 12px; }
  .saved-tiles { gap: 6px; }
  .saved-tiles .v { font-size: 17px; }
  .saved-tiles .k { font-size: 11px; }
  .saved-ghost { top: 202px; width: calc(100% - 98px); max-width: 260px; }
  .fv-saved { height: 260px; }
  .mini-card { min-height: 0; padding: 20px; border-radius: 22px; flex-direction: row; align-items: flex-start; gap: 16px; }
  .mini-card h3 { font-size: 17px; }

  .how { padding: 56px var(--pad-x) 72px; gap: 32px; }
  .how .section-head { gap: 12px; }
  .timeline { gap: 20px; }
  .timeline::before { left: 15px; }
  .step { gap: 12px; }
  .step-num { width: 32px; height: 32px; margin-top: 24px; font-size: 14px; }
  .step-card { height: auto; border-radius: 24px; gap: 0; }
  .step-visual { height: 230px; }
  .step-visual .fade-img { width: 262px; }
  .step-visual .s1 { top: -40px; }
  .step-visual .s3 { top: -60px; }
  .step-text { padding: 4px 20px 24px; gap: 6px; }
  .step-text h3 { font-size: 19px; letter-spacing: -0.5px; }
  .step-text p { font-size: 15px; }
  .walk-card { top: 36px; width: calc(100% - 40px); max-width: 262px; padding: 14px; gap: 16px; }
  .walk-card-head img { width: 36px; height: 36px; border-radius: 10px; }
  .walk-rows div { height: 40px; padding: 0 12px; font-size: 13px; }

  .ranks-panel { padding: 64px 0; gap: 36px; }
  .ranks-panel .section-head { gap: 14px; }
  .rank-strip {
    -webkit-mask-image: linear-gradient(90deg, transparent calc(50% - 187px), #000 calc(50% - 125px), #000 calc(50% + 125px), transparent calc(50% + 187px));
    mask-image: linear-gradient(90deg, transparent calc(50% - 187px), #000 calc(50% - 125px), #000 calc(50% + 125px), transparent calc(50% + 187px));
  }
  .rank-strip ol { gap: 10px; margin-left: calc(50% - 415px); /* keeps Lv.3–Lv.4 centred */ }
  .rank { width: 120px; height: 92px; padding: 14px 12px; border-radius: 16px; }
  .rank--wide { width: 150px; }
  .rank .name { font-size: 15px; }

  .privacy { padding: 72px var(--pad-x) 24px; gap: 32px; }
  .privacy-grid { gap: 12px; }
  .privacy-card { padding: 28px 24px; border-radius: 24px; gap: 16px; }
  .privacy-card .icon-circle { width: 52px; height: 52px; }
  .privacy-card h3 { font-size: 19px; }
  .privacy-card p { font-size: 15px; margin-top: 6px; }

  .faq { padding: 72px var(--pad-x); gap: 28px; }
  .faq .section-head { gap: 12px; }
  .faq-list { gap: 10px; }
  .faq-item, .faq-item summary { border-radius: 20px; }
  .faq-item summary { padding: 20px; font-size: 17px; gap: 12px; }
  .faq-item[open] summary { padding-bottom: 8px; }
  .faq-item .toggle { width: 28px; height: 28px; }
  .faq-item p { padding: 0 60px 20px 20px; font-size: 15px; line-height: 1.55; }

  .cta { padding-bottom: 8px; }
  .cta-panel { min-height: 0; padding: 64px 24px; gap: 20px; }
  .cta-panel img { width: 60px; height: 60px; border-radius: 16px; }
  .cta-panel h2 { font-size: 40px; line-height: 1.02; letter-spacing: -1.8px; }
  .cta-panel p { font-size: 16px; line-height: 1.5; }
  .cta-panel .btn { align-self: stretch; }

  .footer-inner { padding: 48px 20px 0; }
  .footer-top { gap: 40px; }
  .footer-about { gap: 16px; }
  .footer-about p { font-size: 15px; }
  .footer-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; column-gap: 16px; }
  .footer-col { gap: 14px; }
  .footer-col h2 { font-size: 16px; }
  .footer-meta { margin-top: 40px; flex-direction: column-reverse; gap: 6px; font-size: 13px; }
  .wordmark { margin-top: 32px; }

  .legal-hero-panel { padding-bottom: 48px; }
  .legal-hero-copy { gap: 16px; padding: 28px 20px 0; }
  .legal-hero-copy h1 { font-size: 44px; line-height: 1.02; letter-spacing: -2px; }
  .legal-hero-copy p { font-size: 16px; }
  .back-btn .long { display: none; }
  .back-btn { width: 40px; height: 40px; padding: 0; }

  .legal-main { padding: 24px var(--pad-x) 56px; gap: 16px; }
  .toc { padding: 12px 12px 12px 24px; border-radius: 22px; }
  .toc summary { pointer-events: auto; cursor: pointer; min-height: 44px; }
  .toc .chevron {
    display: flex; width: 32px; height: 32px; border-radius: 50%; background: #fff; color: var(--ink);
    align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(28, 28, 31, 0.06); transition: transform 0.2s ease;
  }
  .toc[open] .chevron { transform: rotate(180deg); }
  .toc ol { margin: 4px 0 12px; gap: 12px; }
  .legal-article { padding: 28px 20px; border-radius: 22px; gap: 36px; }
  .legal-article h2 { font-size: 20px; }
  .legal-article p,
  .legal-article li { font-size: 16px; line-height: 1.6; }
  .legal-article ul { padding-left: 20px; }
  /* Privacy table: one card per row on phones */
  .table-wrap { overflow: visible; box-shadow: none; border-radius: 0; }
  .legal-article table,
  .legal-article tbody,
  .legal-article tr,
  .legal-article td { display: block; width: 100%; }
  .legal-article thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .legal-article tr { margin-bottom: 12px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
  .legal-article tr:last-child { margin-bottom: 0; }
  .legal-article td { padding: 10px 16px; border-bottom: 0; font-size: 15px; }
  .legal-article td:first-child { background: var(--fill-secondary); padding-top: 12px; padding-bottom: 12px; }
  .legal-article td:not(:first-child)::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font-size: 11px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; color: var(--subtle);
  }

  .notfound-copy h1 { font-size: 44px; letter-spacing: -2px; }
}

@media (min-width: 761px) {
  .back-btn .long { display: inline; }
}

.panel-wrap--top { padding-top: var(--panel-inset); }
.icon-circle--sky { color: var(--sky-fg); }
.icon-circle--indigo { color: var(--indigo-fg); }
.icon-circle--lime { color: var(--lime-fg); }
