/* Tokens copied from flic-connect-app: src/components/parking/ui.tsx and src/constants/theme.ts */
:root {
  --bg: #ffffff;
  --surface: #f7f8f6;
  --surface-2: #eef2ec;
  --line: #d6e3d5;
  --line-soft: #e6ece4;
  --ink: #1b2a3b;
  --body: #4f5458;
  --muted: #6b7378;
  --action: #2e6b2e;
  --action-ink: #ffffff;
  --action-soft: #e3eee1;
  --finished: #144d10;
  --overdue: #a8472f;
  --led: #3ad15a;
  --led-glow: rgba(58, 209, 90, 0.55);
  --shadow: rgba(27, 42, 59, 0.16);
  --phone: #141c24;
  --phone-2: #1c252e;
  --phone-line: #2a3540;
  --phone-ink: #f0f3f5;
  --phone-body: #a8b2bb;
  --phone-action: #7cb877;
  --notif: rgba(255, 255, 255, 0.95);
  --notif-ink: #1b2a3b;
  --notif-muted: #6b7378;
  --privacy: #144d10;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: 20px;
  --max: 1200px;
  --header: 64px;
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141c24;
    --surface: #1a232c;
    --surface-2: #212c36;
    --line: #2a3540;
    --line-soft: #232e38;
    --ink: #f0f3f5;
    --body: #a8b2bb;
    --muted: #8a95a0;
    --action: #7cb877;
    --action-ink: #0f1a12;
    --action-soft: #1f3326;
    --finished: #9acf95;
    --overdue: #e2735a;
    --shadow: rgba(0, 0, 0, 0.45);
    --phone: #0c1117;
    --phone-2: #161f28;
    --notif: rgba(44, 56, 67, 0.97);
    --notif-ink: #f0f3f5;
    --notif-muted: #a8b2bb;
    --privacy: #0f2a12;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141c24;
  --surface: #1a232c;
  --surface-2: #212c36;
  --line: #2a3540;
  --line-soft: #232e38;
  --ink: #f0f3f5;
  --body: #a8b2bb;
  --muted: #8a95a0;
  --action: #7cb877;
  --action-ink: #0f1a12;
  --action-soft: #1f3326;
  --finished: #9acf95;
  --overdue: #e2735a;
  --shadow: rgba(0, 0, 0, 0.45);
  --phone: #0c1117;
  --phone-2: #161f28;
  --notif: rgba(44, 56, 67, 0.97);
  --notif-ink: #f0f3f5;
  --notif-muted: #a8b2bb;
  --privacy: #0f2a12;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 8px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--action); text-underline-offset: 3px; }
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.15; text-wrap: balance; }
h2 { font-size: clamp(30px, 4.4vw, 48px); font-weight: 700; letter-spacing: -0.025em; }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.005em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--action);
}
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--bg);
  padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 12px; }
.fine-print { font-size: 13px; color: var(--muted); margin-top: 18px; }
.fine-print.center { text-align: center; }
.led-dot {
  display: inline-block; width: 14px; height: 6px; border-radius: 3px; background: var(--led);
  box-shadow: 0 0 10px 2px var(--led-glow); vertical-align: middle; margin-right: 6px;
  animation: led-pulse 2.6s ease-in-out infinite;
}
@keyframes led-pulse { 50% { opacity: 0.4; box-shadow: 0 0 3px 1px var(--led-glow); } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 999px; font: inherit; font-size: 16px; font-weight: 600; text-decoration: none;
  cursor: pointer; border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--action); color: var(--action-ink); }
.btn-primary:hover { background: var(--finished); }
.btn:disabled { cursor: progress; }
.btn-primary:disabled:hover { background: var(--action); }
.btn.is-loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--action); color: var(--action); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  min-height: var(--header);
  padding: env(safe-area-inset-top, 0px) max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter))) 0;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.site-header.scrolled { border-bottom-color: var(--line-soft); background: color-mix(in srgb, var(--bg) 92%, transparent); }
.brand { display: inline-flex; flex-shrink: 0; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.by-bitlliant { font-size: 13px; color: var(--muted); text-decoration: none; margin-left: -8px; }
.by-bitlliant:hover { color: var(--action); }
.desktop-nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.desktop-nav a { color: var(--body); text-decoration: none; }
.desktop-nav a:hover { color: var(--ink); }
.header-cta {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
  background: var(--action); color: var(--action-ink); font-size: 14px; font-weight: 600; text-decoration: none;
}
.header-cta:hover { background: var(--finished); }
.lang-switch { display: flex; align-items: center; gap: 8px; flex-shrink: 0; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
/* Vertical padding gives a ~44px tap target without widening the header. */
.lang-switch a { color: var(--muted); text-decoration: none; padding-block: 12px; }
.lang-switch a[aria-current="page"] { color: var(--ink); }
.lang-switch a:hover { color: var(--action); }
html[lang="zh-Hant"] body { font-family: var(--sans), "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }
html[lang="zh-Hant"] .hero h1 {
  letter-spacing: 0.04em; line-height: 1.2; font-size: clamp(44px, 7vw, 84px);
}
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; flex-shrink: 0;
  border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--action); color: var(--action); }
.theme-toggle img {
  width: 20px; height: 20px;
  background-color: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
  /* The file is black. Keep it out of the box so only the masked button color shows. */
  object-fit: none;
  object-position: 40px 40px;
}
.theme-toggle .icon-moon {
  -webkit-mask-image: url("assets/icon-moon.svg");
  mask-image: url("assets/icon-moon.svg");
}
.theme-toggle .icon-sun {
  -webkit-mask-image: url("assets/icon-sun.svg");
  mask-image: url("assets/icon-sun.svg");
}
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon,
:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
}
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.menu-toggle { display: none; flex-shrink: 0; width: 44px; height: 44px; border: 0; background: transparent; padding: 0; cursor: pointer; position: relative; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; border-radius: 1px; background: var(--ink); transition: transform 0.2s, top 0.2s; }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }
.mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line);
  display: grid; padding: 8px var(--gutter) 18px;
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { padding: 12px 0; color: var(--ink); text-decoration: none; font-size: 18px; border-bottom: 1px solid var(--line-soft); }
.mobile-nav a:last-child { border-bottom: 0; color: var(--action); font-weight: 600; }
@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .header-cta { margin-left: auto; }
  .menu-toggle { display: block; }
}
@media (min-width: 901px) { .mobile-nav { display: none !important; } }
@media (max-width: 560px) {
  .by-bitlliant { display: none; }
  .site-header { gap: 10px; }
  .header-cta { padding: 0 14px; }
}
/* Phones: tighten the header so the brand, CTA and controls stay on one line. */
@media (max-width: 440px) {
  .site-header { gap: 6px; padding-inline: 16px; }
  .header-cta { padding: 0 12px; font-size: 13px; }
  .menu-toggle { width: 36px; }
  .menu-toggle span { left: 8px; right: 8px; }
}
/* Smallest phones: the app icon alone stands in for the name (the link keeps its aria-label). */
@media (max-width: 380px) {
  .brand span { display: none; }
}

/* ---------- Notification card ---------- */
.notif {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 10px;
  padding: 11px 13px; border-radius: 18px; background: var(--notif); color: var(--notif-ink);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 16px 36px -16px var(--shadow);
  font-size: 14px; line-height: 1.35;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.notif img { width: 30px; height: 30px; border-radius: 7px; grid-row: span 2; background: #fff; }
.notif-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--notif-muted); }
.notif-top b { color: var(--notif-ink); font-weight: 600; }
.notif > p:not(.notif-top):not(.notif-actions) { grid-column: 2; }
.notif-actions { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.notif-actions span { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--action); }

/* ---------- Device render + LED overlay ---------- */
.hero-device, .stage-device { position: relative; }
.device-led {
  /* Sits over the LED in button.png (centre ≈ 49.3% × 78.6%). */
  position: absolute; left: 49.3%; top: 78.6%; width: 7.8%; height: 2.7%;
  transform: translate(-50%, -50%); border-radius: 999px; pointer-events: none;
  background: var(--led); opacity: 0; box-shadow: 0 0 22px 8px var(--led-glow);
  transition: opacity 0.12s;
}
.device-led.on { opacity: 1; }
.device-led.red { opacity: 1; background: #ef6a4c; box-shadow: 0 0 22px 8px rgba(239, 106, 76, 0.5); }
.ripple {
  position: absolute; left: 50%; top: 45%; width: 62%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid var(--action); transform: translate(-50%, -50%) scale(1); opacity: 0; pointer-events: none;
}
.ripple.go { animation: ripple 0.9s ease-out; }
.ripple.r2.go { animation-delay: 0.18s; }
@keyframes ripple { from { opacity: 0.8; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px 48px; align-items: center; padding-block: clamp(32px, 6vw, 72px) 40px;
}
.eyebrow { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--body); }
.hero h1 {
  font-size: clamp(56px, 9.5vw, 116px); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; margin-top: 20px;
}
.hero h1 span { color: var(--action); }
.hero-sub { font-size: clamp(18px, 1.8vw, 21px); max-width: 30ch; margin-top: 24px; color: var(--body); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-art { position: relative; width: min(100%, 520px); justify-self: center; }
.hero-device img { width: 100%; filter: drop-shadow(0 40px 50px var(--shadow)); animation: settle 0.6s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.hero-device .device-led { animation: blink-once 1.4s 0.5s ease-out both; }
@keyframes settle { from { transform: translateY(18px) scale(0.97); opacity: 0; } }
@keyframes blink-once { 0% { opacity: 0; } 20% { opacity: 1; } 55% { opacity: 1; } 100% { opacity: 0; } }
.hero-notif { position: absolute; left: -6%; bottom: 4%; width: min(88%, 340px); animation: drop 0.5s 1s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
@keyframes drop { from { transform: translateY(-16px); opacity: 0; } }
.hero-strip {
  grid-column: 1 / -1; list-style: none; margin: 16px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 32px; font-family: var(--mono); font-size: 13px; color: var(--body);
}
@media (max-width: 800px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; width: min(82%, 380px); }
  .hero-notif { left: -4%; bottom: -10%; }
  .hero-art { margin-bottom: 28px; }
}

/* ---------- Problem ---------- */
.problem { background: var(--surface); padding-block: clamp(64px, 9vw, 112px); }
.problem-quote {
  margin-top: 18px; max-width: 24ch; font-size: clamp(30px, 4.6vw, 54px); font-weight: 600;
  color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance;
}
.problem-quote time { font-family: var(--mono); font-weight: 600; letter-spacing: -0.03em; }
.problem-quote .t-start { color: var(--action); }
.problem-quote .t-late, .problem-quote em { color: var(--overdue); font-style: normal; }
.problem-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.problem-points > div { display: grid; gap: 8px; align-content: start; border-top: 2px solid var(--line); padding-top: 18px; }
.problem-points > div:last-child { border-top-color: var(--action); }
@media (max-width: 760px) { .problem-points { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* ---------- Section head ---------- */
.section-head { display: grid; gap: 14px; max-width: 700px; margin-bottom: 44px; }
.section-head > p:not(.label) { font-size: 18px; }

/* ---------- Scroll story ----------
   Default (no JS, reduced motion): chapters show as a static grid with their own notifications.
   With JS, .is-pinned makes the section tall and pins a stage that scroll progress drives. */
.story { padding-block: clamp(64px, 9vw, 112px); }
.story-head { display: grid; gap: 12px; margin-bottom: 40px; }
.chapters { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.chapter { border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.chapter h3 { font-size: 24px; }
.chapter .notif { margin-top: 8px; }
.stage { display: none; }
.story-progress { display: none; }
@media (max-width: 700px) { .chapters { grid-template-columns: minmax(0, 1fr); } }

.story.is-pinned { height: 440vh; padding: 0; }
.story.is-pinned .story-sticky {
  position: sticky; top: var(--header); height: calc(100vh - var(--header)); height: calc(100svh - var(--header));
  overflow: hidden; display: flex; flex-direction: column; justify-content: center;
}
.story.is-pinned .story-inner { width: 100%; }
.story.is-pinned .story-head { margin-bottom: clamp(16px, 4vh, 40px); }
.story.is-pinned .story-body { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.story.is-pinned .chapters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.story.is-pinned .chapter {
  grid-area: 1 / 1; border: 0; padding: 0; opacity: 0; transform: translateY(14px);
  transition: opacity 0.35s, transform 0.35s; visibility: hidden;
}
.story.is-pinned .chapter.active { opacity: 1; transform: none; visibility: visible; }
.story.is-pinned .chapter h3 { font-size: clamp(30px, 3.6vw, 44px); letter-spacing: -0.02em; }
.story.is-pinned .chapter > p:not(.label) { font-size: 18px; max-width: 38ch; }
.story.is-pinned .chapter .notif { display: none; }
.story.is-pinned .stage { display: flex; align-items: center; justify-content: center; gap: clamp(8px, 3vw, 40px); }
.story.is-pinned .story-progress {
  display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line-soft);
}
.story-progress span { display: block; height: 100%; width: 0; background: var(--action); }
.stage-device { width: min(46%, 300px); }
.stage-device img { width: 100%; filter: drop-shadow(0 30px 36px var(--shadow)); }

/* Phone frame, shared by the story stage and the app screens */
.phone {
  width: min(52%, 280px); aspect-ratio: 9 / 18.5; border-radius: 38px; background: var(--phone);
  padding: 10px; box-shadow: 0 30px 60px -24px var(--shadow), inset 0 0 0 1.5px #3a4652; flex-shrink: 0;
}
.phone-screen {
  position: relative; height: 100%; border-radius: 29px; overflow: hidden; padding: 18px 12px;
  background: radial-gradient(120% 70% at 50% 0%, #2c4a33, #141c24 70%); color: var(--phone-ink);
  display: flex; flex-direction: column; gap: 8px;
}
.lock-date { text-align: center; font-size: 12px; color: var(--phone-body); margin-top: 8px; }
.lock-time { text-align: center; font-size: clamp(40px, 5vw, 60px); font-weight: 600; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.lock-notifs { display: grid; gap: 8px; margin-top: 14px; }
.lock-notifs .notif { font-size: 12.5px; padding: 9px 10px; border-radius: 16px; grid-template-columns: 26px minmax(0, 1fr); animation: drop 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
.lock-notifs .notif img { width: 26px; height: 26px; }
.lock-notifs .notif.old { opacity: 0.5; transform: scale(0.96); animation: none; }
.lock-history { display: none; margin-top: 10px; background: var(--phone-2); border-radius: 16px; padding: 12px; gap: 2px; }
.phone-lock.show-history .lock-history { display: grid; animation: drop 0.4s ease-out; }
.phone-lock.show-history .lock-notifs { display: none; }
.lh-title { font-weight: 600; font-size: 15px; margin-bottom: 4px; }
.lh-row { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--phone-body); padding: 7px 0; border-top: 1px solid var(--phone-line); }
.lh-row span b { display: block; color: var(--phone-ink); font-weight: 500; font-size: 12.5px; }
.lh-row em { font-style: normal; font-family: var(--mono); color: var(--phone-action); white-space: nowrap; }
/* Phones and narrow tablets: stage on top, text below. The phone keeps a wide screen and takes
   whatever height is left, so notifications stay readable; the lock screen's content is at the top. */
@media (max-width: 800px) {
  .story.is-pinned .story-inner { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-block: 16px 20px; }
  .story.is-pinned .story-head { margin-bottom: 12px; }
  .story.is-pinned .story-body { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 16px; }
  .story.is-pinned .stage { flex: 1; min-height: 0; order: -1; align-items: stretch; gap: 12px; }
  .stage-device { width: min(26%, 120px); align-self: center; }
  .story.is-pinned .phone { width: min(66%, 270px); height: 100%; max-height: 520px; aspect-ratio: auto; border-radius: 30px; padding: 7px; }
  .story.is-pinned .phone-screen { border-radius: 24px; padding: 12px 10px; gap: 4px; }
  .story.is-pinned .lock-date { margin-top: 2px; }
  .story.is-pinned .lock-notifs { margin-top: 8px; }
  .lock-time { font-size: 34px; }
  .story.is-pinned .chapter { gap: 6px; }
  .story.is-pinned .chapter h3 { font-size: 26px; }
  .story.is-pinned .chapter > p:not(.label) { font-size: 16px; }
}
/* Short screens (small phones, Safari toolbars showing): less type, so the phone keeps its share. */
@media (max-width: 800px) and (max-height: 640px) {
  .story.is-pinned .story-head { display: none; }
  .story.is-pinned .chapter h3 { font-size: 22px; }
  .story.is-pinned .chapter > p:not(.label) { font-size: 15px; line-height: 1.45; }
  .lock-time { font-size: 28px; }
}

/* ---------- Try it ---------- */
.try { padding-block: clamp(64px, 9vw, 112px); background: var(--surface); }
.demo {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); border-radius: 28px; overflow: hidden;
  border: 1px solid var(--line); background: var(--bg);
}
.demo-left {
  display: grid; place-items: center; gap: 12px; padding: 36px 24px;
  background: radial-gradient(circle at 50% 45%, var(--bg), var(--surface-2) 75%);
}
.demo-button {
  position: relative; width: min(100%, 340px); aspect-ratio: 1; padding: 0; border: 0; background: transparent;
  cursor: pointer; border-radius: 50%; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
}
.demo-button picture img { width: 100%; filter: drop-shadow(0 28px 30px var(--shadow)); transition: transform 0.08s, filter 0.08s; pointer-events: none; }
.demo-button.down picture img { transform: translateY(3px) scale(0.975); filter: drop-shadow(0 14px 16px var(--shadow)); }
.demo-button .ripple { top: 45%; }
.hold-ring { position: absolute; inset: 2%; width: 96%; height: 96%; pointer-events: none; transform: rotate(-90deg); }
.hold-ring circle { fill: none; stroke: var(--action); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 604; stroke-dashoffset: 604; opacity: 0; }
.demo-button.holding .hold-ring circle { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.demo-hint { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.demo-right { padding: 28px; display: grid; gap: 12px; align-content: start; border-left: 1px solid var(--line); }
.demo-state { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.chip.active { background: var(--action-soft); color: var(--action); }
.demo-place { font-size: 14px; color: var(--muted); }
.demo-clock { font-family: var(--mono); font-size: clamp(40px, 5vw, 56px); font-weight: 600; color: var(--ink); letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.demo-since { font-size: 14px; color: var(--muted); min-height: 2.8em; }
.phone-mini { background: var(--phone); border-radius: 22px; padding: 14px; display: grid; gap: 8px; align-content: start; min-height: 220px; }
.lock-label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; color: var(--phone-body); }
.lock-empty { font-size: 13.5px; color: var(--phone-body); text-align: center; padding: 40px 8px; }
.phone-mini .notif { animation: drop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.15); }
.phone-mini .notif.old { opacity: 0.5; transform: scale(0.97); animation: none; }
.demo-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-controls button {
  font: inherit; font-size: 14px; font-weight: 500; min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer;
}
.demo-controls button:hover { border-color: var(--action); color: var(--action); }
.gestures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.gestures > div { display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: 20px; background: var(--bg); border: 1px solid var(--line); }
.gesture-mark { display: flex; gap: 6px; height: 20px; align-items: center; }
.gesture-mark i { width: 16px; height: 16px; border-radius: 50%; background: var(--action); }
.gesture-mark i.long { width: 64px; border-radius: 8px; }
@media (max-width: 860px) {
  .demo { grid-template-columns: minmax(0, 1fr); }
  .demo-right { border-left: 0; border-top: 1px solid var(--line); }
  .demo-button { width: min(100%, 280px); }
  .gestures { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Why a button ---------- */
.need { padding-block: clamp(64px, 9vw, 112px); background: var(--surface-2); }
.need-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.need-points > div { display: grid; gap: 8px; align-content: start; border-top: 2px solid var(--line); padding-top: 18px; }
.need-points > div:last-child { border-top-color: var(--action); }
@media (max-width: 760px) { .need-points { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* ---------- The app ---------- */
.app { padding-block: clamp(64px, 9vw, 112px); }
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.screen { margin: 0; display: grid; gap: 18px; justify-items: center; text-align: center; }
.screen .phone { width: min(100%, 270px); }
.screen figcaption { font-size: 15px; max-width: 30ch; }
.screen figcaption b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 4px; }
.app-screen { background: var(--phone); padding: 14px 14px; gap: 6px; font-size: 12.5px; text-align: left; }
.as-status { display: flex; justify-content: space-between; font-size: 11px; font-weight: 600; color: var(--phone-ink); padding: 0 6px 6px; }
.as-status span:last-child { letter-spacing: 1px; font-size: 8px; }
.as-chip { justify-self: start; align-self: flex-start; font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--phone-action); background: #1f3326; padding: 3px 9px; border-radius: 999px; }
.as-place { font-size: 16px; font-weight: 600; color: var(--phone-ink); }
.tariff { position: relative; width: 74%; margin: 8px auto 4px; aspect-ratio: 1; }
.tariff svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tr-track { fill: none; stroke: var(--phone-line); stroke-width: 9; }
.tr-fill { fill: none; stroke: var(--phone-action); stroke-width: 9; stroke-linecap: round; stroke-dasharray: 70 100; }
.tr-mark { fill: #e2735a; }
.tariff p { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.tariff b { font-family: var(--mono); font-size: clamp(18px, 2vw, 24px); font-weight: 600; color: var(--phone-ink); letter-spacing: -0.02em; }
.tariff span { font-size: 10.5px; color: var(--phone-body); }
.as-rows { display: grid; gap: 0; background: var(--phone-2); border-radius: 12px; padding: 2px 12px; }
.as-rows p { display: flex; justify-content: space-between; padding: 7px 0; color: var(--phone-body); }
.as-rows p + p { border-top: 1px solid var(--phone-line); }
.as-rows b { font-family: var(--mono); color: var(--phone-ink); font-weight: 500; }
.as-btn { margin-top: 4px; text-align: center; padding: 9px; border-radius: 12px; background: var(--phone-action); color: #0f1a12; font-weight: 600; }
.as-btn.quiet { background: var(--phone-2); color: var(--phone-action); margin-top: 0; }
.as-title { font-size: 19px; font-weight: 700; color: var(--phone-ink); margin: 4px 0 6px; letter-spacing: -0.01em; }
.as-input { background: var(--phone-2); border: 1.5px solid var(--phone-action); border-radius: 12px; padding: 10px 12px; color: var(--phone-ink); font-size: 13px; }
.as-input i { display: inline-block; width: 1.5px; height: 14px; background: var(--phone-action); vertical-align: -2px; margin-left: 2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.as-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--phone-body); margin-top: 10px; }
.as-pick, .as-stay { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--phone-2); border-radius: 12px; padding: 9px 12px; color: var(--phone-ink); }
.as-pick.on { outline: 1.5px solid var(--phone-action); }
.as-pick em, .as-stay em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--phone-body); white-space: nowrap; }
.as-stay em { color: var(--phone-action); }
.as-stay span { color: var(--phone-body); font-size: 11px; }
.as-stay span b { display: block; color: var(--phone-ink); font-size: 12.5px; font-weight: 500; }
@media (max-width: 860px) {
  .screens {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(78%, 280px);
    overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  }
  .screen { scroll-snap-align: center; }
}
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 72px; }
.mode { border: 1px solid var(--line); border-radius: 24px; padding: 28px; display: grid; gap: 10px; align-content: start; }
.mode h3 { font-size: 24px; letter-spacing: -0.015em; }
.mode-times { list-style: none; margin: 12px 0 0; padding: 0; display: grid; }
.mode-times li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--line-soft); font-size: 15px; }
.mode-times time { font-family: var(--mono); font-weight: 600; color: var(--action); font-variant-numeric: tabular-nums; }
.mode-times li.over time { color: var(--overdue); }
@media (max-width: 760px) { .modes { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Privacy ---------- */
.privacy { background: var(--privacy); color: #cfe3cb; padding-block: clamp(64px, 9vw, 112px); }
.privacy .label { color: #9acf95; }
.privacy h2 { color: #ffffff; margin-top: 14px; max-width: 16ch; }
.privacy-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.privacy-points > div { display: grid; gap: 8px; align-content: start; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 18px; }
.privacy-points h3 { color: #ffffff; }
@media (max-width: 760px) { .privacy-points { grid-template-columns: minmax(0, 1fr); gap: 24px; } }

/* ---------- Setup ---------- */
.setup { padding-block: clamp(64px, 9vw, 112px); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li { display: grid; gap: 10px; align-content: start; padding: 26px; border-radius: 22px; background: var(--surface); }
.step-n { font-family: var(--mono); font-size: 14px; font-weight: 600; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--action); color: var(--action-ink); }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Notify ---------- */
.notify { padding-block: 0 clamp(64px, 9vw, 112px); }
.notify-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; align-items: center;
}
.notify-inner > div, .notify-form { display: grid; gap: 12px; }
.notify-inner > div { padding: 0; }
.notify h2 { font-size: clamp(28px, 3.6vw, 40px); }
.notify-form label { font-size: 14px; font-weight: 600; color: var(--ink); }
.notify-row { display: flex; gap: 10px; flex-wrap: wrap; }
.notify-row input {
  flex: 1 1 220px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;
}
.notify-row input:focus { border-color: var(--action); outline: 2px solid var(--action-soft); }
.notify-status { font-size: 14px; min-height: 1.5em; }
.notify-status.ok { color: var(--action); }
.notify-status.error { color: var(--overdue); }
@media (max-width: 760px) { .notify-inner { grid-template-columns: minmax(0, 1fr); } }
.notify .wrap.notify-inner {
  padding-block: clamp(32px, 5vw, 56px); border-radius: 28px; background: var(--action-soft);
  max-width: calc(var(--max) - var(--gutter) * 2); padding-inline: clamp(24px, 4vw, 56px);
}
@media (max-width: 1240px) { .notify .wrap.notify-inner { margin-inline: var(--gutter); } }

/* ---------- FAQ ---------- */
.faq { padding-block: clamp(56px, 8vw, 96px); background: var(--surface); }
.faq-inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px 64px; align-items: start; }
.faq-list details { border-top: 1px solid var(--line); }
.faq-list details:last-child { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 22px; font-weight: 500; color: var(--action); transition: transform 0.2s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list details p { padding: 0 36px 20px 0; max-width: 60ch; }
@media (max-width: 860px) { .faq-inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { padding-block: 48px calc(40px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: start; }
.footer-brand { display: grid; gap: 10px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-nav a { color: var(--body); text-decoration: none; }
.footer-nav a:hover { color: var(--action); }
.footer-legal { grid-column: 1 / -1; color: var(--muted); font-size: 13px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
@media (max-width: 700px) { .footer-inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
