/*
  Sift website: one shared stylesheet.
  No external fonts, images, scripts or trackers. Everything here is served from this site.
*/

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* Spacing scale */
  --s-25: 2px; --s-50: 4px; --s-75: 8px; --s-100: 12px; --s-200: 16px; --s-300: 24px;
  --s-400: 32px; --s-500: 40px; --s-600: 48px; --s-700: 64px; --s-800: 80px; --s-900: 96px;

  /* Radius scale */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-xl: 12px; --r-2xl: 16px; --r-3xl: 24px; --r-full: 9999px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-move: 500ms;
  --t-fade: 300ms;

  /* Light theme */
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebef;
  --text: #1d1d1f;
  --muted: #5e5e66;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #4545e6;
  --accent-fill: #4b4bf2;
  --accent-soft: rgba(75, 75, 242, 0.1);
  --on-accent: #ffffff;
  --keep: #14804a;
  --remove: #d1343a;
  --favorite: #c8236a;
  --fill-bg: #fff4d6;
  --fill-text: #6b4800;
  --nav-bg: rgba(255, 255, 255, 0.72);
  --panel-bg: rgba(255, 255, 255, 0.94);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.04), 0 24px 64px rgba(30, 30, 90, 0.14);
  --hero-from: #000000;
  --hero-to: #666666;
  --focus: #4545e6;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-alt: #181818;
    --surface: #1f1f1f;
    --surface-2: #272727;
    --surface-3: #313131;
    --text: #f5f5f7;
    --muted: #a8a8ae;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.2);
    --accent: #9a9aff;
    --accent-fill: #5a58e6;
    --accent-soft: rgba(138, 138, 255, 0.16);
    --keep: #4cc98a;
    --remove: #ff6b70;
    --favorite: #ff6fa8;
    --fill-bg: #4a3a12;
    --fill-text: #ffd98a;
    --nav-bg: rgba(31, 31, 31, 0.72);
    --panel-bg: rgba(0, 0, 0, 0.94);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 64px rgba(0, 0, 0, 0.6);
    --hero-from: #ffffff;
    --hero-to: #9b9b9b;
    --focus: #9a9aff;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Ubuntu, Cantarell, "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd, summary { text-wrap: pretty; }
::selection { background: var(--accent-soft); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r-lg);
}

.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: fixed; z-index: 100;
  top: calc(env(safe-area-inset-top) + var(--s-100)); left: calc(env(safe-area-inset-left) + var(--s-100));
  padding: var(--s-75) var(--s-100); min-height: 44px; display: inline-flex; align-items: center;
  background: var(--accent-fill); color: var(--on-accent); border-radius: var(--r-full);
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--t-fade) var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* ---------- Text styles ---------- */
.heading-1 { font-size: 3.75rem; line-height: 1; font-weight: 600; letter-spacing: -0.035em; }
.heading-2 { font-size: 3rem; line-height: 1; font-weight: 600; letter-spacing: -0.03em; }
.heading-3 { font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; letter-spacing: -0.025em; }
.heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: -0.02em; }
.heading-5 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.015em; }
.heading-6 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 600; letter-spacing: -0.01em; }
.title-1 { font-size: 1.25rem; line-height: 1.75rem; font-weight: 500; letter-spacing: -0.01em; }
.title-2 { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; letter-spacing: -0.005em; }
.title-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.title-4 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.body-1 { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.body-2 { font-size: 1rem; line-height: 1.5rem; font-weight: 500; }
.body-3 { font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
.body-5 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.body-6 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.button-lg { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
.button-md { font-size: 1rem; line-height: 1.5rem; font-weight: 600; }
.button-sm { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.caption-1 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: 0.75rem; line-height: 1rem; font-weight: 600; letter-spacing: 0.04em; }
.caption-4 { font-size: 0.75rem; line-height: 1rem; font-weight: 500; }
.caption-5 { font-size: 0.75rem; line-height: 1rem; font-weight: 400; }
.muted { color: var(--muted); }
.tabular { font-variant-numeric: tabular-nums; }

@media (max-width: 899px) {
  .heading-1 { font-size: 3rem; line-height: 1; }
  .heading-2 { font-size: 2.25rem; line-height: 2.5rem; }
  .heading-3 { font-size: 1.875rem; line-height: 2.25rem; }
}
@media (max-width: 559px) {
  .heading-1 { font-size: 2.25rem; line-height: 2.5rem; }
  .heading-2 { font-size: 1.875rem; line-height: 2.25rem; }
  .heading-3 { font-size: 1.5rem; line-height: 2rem; }
  .heading-4 { font-size: 1.5rem; line-height: 2rem; }
}
@media (max-width: 359px) {
  .heading-1 { font-size: 1.875rem; line-height: 2.25rem; }
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1168px;
  margin-inline: auto;
  padding-left: max(var(--s-300), env(safe-area-inset-left));
  padding-right: max(var(--s-300), env(safe-area-inset-right));
}
.container.narrow { max-width: 768px; }
@media (max-width: 559px) {
  .container {
    padding-left: max(var(--s-200), env(safe-area-inset-left));
    padding-right: max(var(--s-200), env(safe-area-inset-right));
  }
}
.section { padding-block: var(--s-900); }
.section.alt { background: var(--bg-alt); }
@media (max-width: 559px) { .section { padding-block: var(--s-700); } }

.section-head { max-width: 680px; margin-bottom: var(--s-600); }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s-75);
  color: var(--accent); text-transform: uppercase; margin-bottom: var(--s-200);
}
.section-head p { margin-top: var(--s-200); color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  min-height: 44px; padding: var(--s-75) var(--s-200);
  border-radius: var(--r-full); border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  font: inherit; font-size: 1rem; line-height: 1.5rem; font-weight: 600;
  transition: background-color var(--t-fade) var(--ease), color var(--t-fade) var(--ease),
              border-color var(--t-fade) var(--ease), transform var(--t-fade) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(0.98); transition-duration: 100ms; }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent-fill) 88%, #000); }
.btn-secondary { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-lg { min-height: 52px; padding: var(--s-100) var(--s-300); font-size: 1.125rem; line-height: 1.75rem; }

/* App Store state. Shown as "coming soon" until APP_STORE_URL in assets/site.js is filled in. */
.store-cta {
  display: inline-flex; align-items: center; gap: var(--s-100);
  min-height: 56px; padding: var(--s-75) var(--s-300) var(--s-75) var(--s-200);
  border-radius: var(--r-full);
  background: var(--surface-2); color: var(--text); border: 1px dashed var(--line-strong);
  text-decoration: none; cursor: default;
}
.store-cta .store-icon {
  width: 40px; height: 40px; flex: none; border-radius: var(--r-full);
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.store-cta .store-icon svg { width: 20px; height: 20px; }
.store-cta .store-text { display: flex; flex-direction: column; text-align: left; }
.store-cta .store-small { color: var(--muted); }
a.store-cta {
  cursor: pointer; background: var(--accent-fill); color: var(--on-accent); border: 1px solid transparent;
  transition: background-color var(--t-fade) var(--ease), transform var(--t-fade) var(--ease);
}
a.store-cta .store-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }
a.store-cta .store-small { color: rgba(255, 255, 255, 0.82); }
a.store-cta:hover { background: color-mix(in srgb, var(--accent-fill) 88%, #000); }
a.store-cta:active { transform: scale(0.98); }

/* ---------- Navigation ---------- */
.site-nav {
  position: fixed; z-index: 50;
  top: calc(env(safe-area-inset-top) + var(--s-100));
  left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - var(--s-400));
  display: flex; align-items: center; gap: var(--s-75);
  padding: var(--s-50);
  border-radius: var(--r-full);
  background: var(--nav-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.brand {
  display: inline-flex; align-items: center; gap: var(--s-75);
  min-height: 44px; padding: var(--s-50) var(--s-100) var(--s-50) var(--s-50);
  border-radius: var(--r-full);
  color: var(--text); text-decoration: none;
  font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; border-radius: var(--r-lg); }
.nav-links { display: flex; align-items: center; gap: var(--s-25); padding: 0; list-style: none; }
.nav-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: var(--s-75) var(--s-100);
  border-radius: var(--r-full); color: var(--muted); text-decoration: none;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  transition: color var(--t-fade) var(--ease), background-color var(--t-fade) var(--ease);
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px; border-radius: var(--r-full);
  border: 0; background: transparent; color: var(--text); cursor: pointer;
  place-items: center; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-fade) var(--ease);
}
.menu-toggle:hover { background: var(--surface-2); }
.menu-toggle .bars { position: relative; width: 18px; height: 12px; }
.menu-toggle .bars span {
  position: absolute; left: 0; width: 18px; height: 2px; border-radius: var(--r-full); background: currentColor;
  transition: transform var(--t-move) var(--ease), opacity var(--t-fade) var(--ease);
}
.menu-toggle .bars span:nth-child(1) { top: 0; }
.menu-toggle .bars span:nth-child(2) { top: 5px; }
.menu-toggle .bars span:nth-child(3) { top: 10px; }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(2) { opacity: 0; transform: scaleX(0.2); }
.menu-toggle[aria-expanded="true"] .bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.menu-panel {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: calc(env(safe-area-inset-top) + 96px) max(var(--s-300), env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + var(--s-400)) max(var(--s-300), env(safe-area-inset-left));
  background: var(--panel-bg);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  backdrop-filter: blur(32px) saturate(160%);
  opacity: 0; visibility: hidden;
  transition: opacity var(--t-fade) var(--ease), visibility 0s linear var(--t-fade);
  overflow-y: auto;
}
.menu-panel.is-open { opacity: 1; visibility: visible; transition: opacity var(--t-fade) var(--ease), visibility 0s; }
.menu-panel ul { list-style: none; padding: 0; display: grid; gap: var(--s-50); }
.menu-panel a {
  display: flex; align-items: center; min-height: 56px; padding: var(--s-75) var(--s-100);
  border-radius: var(--r-2xl); color: var(--text); text-decoration: none;
  font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; letter-spacing: -0.02em;
  opacity: 0; transform: translateY(24px);
  transition: opacity var(--t-move) var(--ease), transform var(--t-move) var(--ease), background-color var(--t-fade) var(--ease);
}
.menu-panel a:hover { background: var(--surface-2); }
.menu-panel a[aria-current="page"] { color: var(--accent); }
.menu-panel.is-open a { opacity: 1; transform: none; }
.menu-panel.is-open li:nth-child(1) a { transition-delay: 40ms; }
.menu-panel.is-open li:nth-child(2) a { transition-delay: 100ms; }
.menu-panel.is-open li:nth-child(3) a { transition-delay: 160ms; }
.menu-panel.is-open li:nth-child(4) a { transition-delay: 220ms; }
.menu-panel.is-open li:nth-child(5) a { transition-delay: 280ms; }
.menu-panel.is-open li:nth-child(6) a { transition-delay: 340ms; }
.menu-panel .menu-foot { margin-top: auto; padding: var(--s-300) var(--s-100) 0; color: var(--muted); }
.menu-panel .menu-foot a {
  display: inline; min-height: 0; padding: 0; font-size: inherit; line-height: inherit; font-weight: 500;
  color: var(--accent); opacity: 1; transform: none; letter-spacing: 0;
}
body.menu-open { overflow: hidden; }

@media (max-width: 719px) {
  .js .site-nav { width: calc(100% - var(--s-400)); justify-content: space-between; }
  .js .nav-links { display: none; }
  .js .menu-toggle { display: grid; }
  /* Without JavaScript the links stay visible and wrap under the brand. */
  html:not(.js) .site-nav { flex-wrap: wrap; justify-content: center; border-radius: var(--r-3xl); }
  html:not(.js) .nav-links { flex-wrap: wrap; justify-content: center; }
}
@media (min-width: 720px) { .menu-panel { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: calc(env(safe-area-inset-top) + 160px);
  padding-bottom: var(--s-900);
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: var(--s-700); align-items: center;
}
.hero-copy { max-width: 680px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: var(--s-75);
  padding: var(--s-50) var(--s-100) var(--s-50) var(--s-50);
  border-radius: var(--r-full); background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted); margin-bottom: var(--s-300);
}
.hero-badge .dot {
  display: inline-grid; place-items: center; padding: var(--s-25) var(--s-75);
  border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent);
}
.hero-title {
  max-width: 680px;
  padding-bottom: var(--s-75);
  background: linear-gradient(90deg, var(--hero-from), var(--hero-to));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-title .line { display: block; }
.hero-sub { max-width: 680px; margin-top: var(--s-300); color: var(--muted); font-size: 1.25rem; line-height: 1.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-200); margin-top: var(--s-500); }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300);
  margin-top: var(--s-500); padding: 0; list-style: none; color: var(--muted);
}
.hero-facts li { display: inline-flex; align-items: center; gap: var(--s-75); }
.hero-facts svg { width: 20px; height: 20px; color: var(--keep); flex: none; }

@media (max-width: 959px) {
  .hero { padding-top: calc(env(safe-area-inset-top) + 128px); }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s-700); }
  .hero-sub { font-size: 1.125rem; line-height: 1.75rem; }
}
@media (max-width: 559px) {
  .hero { padding-top: calc(env(safe-area-inset-top) + 112px); padding-bottom: var(--s-700); }
  .hero-actions { margin-top: var(--s-400); }
  .hero-actions .btn, .hero-actions .store-cta { width: 100%; justify-content: center; }
  .hero-facts { margin-top: var(--s-400); }
}

/* ---------- Swipe deck illustration ---------- */
.device {
  position: relative;
  width: 100%; max-width: 360px; margin-inline: auto;
  padding: var(--s-75);
  border-radius: var(--r-3xl);
  background: var(--surface-3);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
}
.screen {
  position: relative;
  border-radius: var(--r-2xl);
  background: var(--bg-alt);
  padding: var(--s-200);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) { .screen { background: #131209; } .device { background: #272727; } }
.screen-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-100); margin-bottom: var(--s-100); }
.screen-top .progress { display: flex; align-items: center; gap: var(--s-75); color: var(--muted); }
.progress-bar { width: 64px; height: 4px; border-radius: var(--r-full); background: var(--line-strong); overflow: hidden; }
.progress-bar i {
  display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--accent-fill);
  transform-origin: left center; transform: scaleX(0.4);
  transition: transform var(--t-move) var(--ease);
}

.deck-stage {
  position: relative;
  aspect-ratio: 3 / 4;
  margin-top: var(--s-100);
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.pcard {
  position: absolute; inset: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform-origin: 50% 100%;
  transition: transform var(--t-move) var(--ease), opacity var(--t-move) var(--ease);
  will-change: transform;
}
.pcard svg.art { width: 100%; height: 100%; }
.pcard[data-depth="0"] { z-index: 4; cursor: grab; }
.pcard[data-depth="1"] { z-index: 3; transform: translateY(10px) scale(0.95); }
.pcard[data-depth="2"] { z-index: 2; transform: translateY(20px) scale(0.9); opacity: 0.7; }
.pcard[data-depth="3"] { z-index: 1; transform: translateY(28px) scale(0.86); opacity: 0; }
.pcard.is-dragging { cursor: grabbing; transition: none; }
.pcard.is-live { transition: none; }
.pcard.is-recycled { transition: none; opacity: 0; }

.pcard .chip {
  position: absolute; left: var(--s-100); bottom: var(--s-100); max-width: calc(100% - var(--s-300));
  display: inline-flex; align-items: center; gap: var(--s-50);
  padding: var(--s-50) var(--s-100);
  border-radius: var(--r-full);
  background: rgba(0, 0, 0, 0.6); color: #fff;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.pcard .chip svg { width: 14px; height: 14px; flex: none; }
.stamp {
  position: absolute; top: var(--s-300);
  padding: var(--s-50) var(--s-100);
  border: 3px solid currentColor; border-radius: var(--r-lg);
  font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0; pointer-events: none;
}
.stamp-keep { left: var(--s-300); color: #14804a; transform: rotate(-12deg); }
.stamp-remove { right: var(--s-300); color: #d1343a; transform: rotate(12deg); }
.stamp-fav { left: 50%; top: auto; bottom: 30%; color: #c8236a; transform: translateX(-50%); }

.deck-controls {
  display: flex; justify-content: center; align-items: center; gap: var(--s-300);
  margin-top: var(--s-500);
}
.deck-btn {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: var(--r-full);
  border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fade) var(--ease), background-color var(--t-fade) var(--ease);
}
.deck-btn svg { width: 24px; height: 24px; }
.deck-btn.small { width: 48px; height: 48px; }
.deck-btn.small svg { width: 20px; height: 20px; }
.deck-btn:hover { background: var(--surface-2); }
.deck-btn:active { transform: scale(0.92); transition-duration: 100ms; }
.deck-btn.keep { color: var(--keep); }
.deck-btn.remove { color: var(--remove); }
.deck-btn.fav { color: var(--favorite); }
.deck-status { margin-top: var(--s-200); text-align: center; color: var(--muted); }
.deck-pause {
  display: block; margin: 0 auto; min-height: 44px; padding: 0 var(--s-200);
  background: none; border: 0; cursor: pointer; font-family: inherit;
  color: var(--muted); text-decoration: underline; text-underline-offset: 0.18em;
}
.deck-pause[hidden] { display: none; }
.deck-pause:hover { color: var(--text); }
.deck-caption { margin-top: var(--s-200); text-align: center; color: var(--muted); max-width: 380px; margin-inline: auto; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-300); padding: 0; list-style: none; counter-reset: step; }
.step {
  position: relative; padding: var(--s-300);
  border-radius: var(--r-3xl); background: var(--surface); border: 1px solid var(--line);
}
.section.alt .step { border-color: transparent; box-shadow: var(--shadow-sm); }
.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent); margin-bottom: var(--s-300);
}
.step h3 { margin-bottom: var(--s-75); }
.step p { color: var(--muted); }
@media (max-width: 799px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Feature grid ---------- */
.features {
  display: grid; gap: var(--s-200);
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.feature {
  grid-column: span 2;
  display: flex; flex-direction: column;
  padding: var(--s-300);
  border-radius: var(--r-3xl);
  background: var(--surface);
  border: 1px solid var(--line);
  min-width: 0;
}
.section.alt .feature { border-color: transparent; box-shadow: var(--shadow-sm); }
.feature.wide { grid-column: span 3; }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--r-xl);
  display: grid; place-items: center; margin-bottom: var(--s-300);
  background: var(--accent-soft); color: var(--accent);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: var(--s-75); }
.feature p { color: var(--muted); }
.feature .art-slot { margin-top: auto; padding-top: var(--s-300); }
@media (max-width: 959px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature, .feature.wide { grid-column: span 1; }
}
@media (max-width: 599px) {
  .features { grid-template-columns: minmax(0, 1fr); }
}

/* Mini illustrations inside feature cards */
.mini {
  border-radius: var(--r-2xl); background: var(--surface-2); padding: var(--s-200);
}
.mini-daily { display: flex; align-items: center; gap: var(--s-300); }
.ring { position: relative; width: 88px; height: 88px; flex: none; }
.ring svg { width: 88px; height: 88px; transform: rotate(-90deg); }
.ring .ring-track { stroke: var(--line-strong); }
.ring .ring-fill { stroke: var(--accent-fill); stroke-dasharray: 226; stroke-dashoffset: 226; transition: stroke-dashoffset 1200ms var(--ease) 200ms; }
.reveal.is-in .ring .ring-fill, html:not(.js) .ring .ring-fill { stroke-dashoffset: 68; }
.ring .ring-label { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.streak { display: flex; gap: var(--s-50); margin-top: var(--s-75); }
.streak i { width: 16px; height: 16px; border-radius: var(--r-full); background: var(--accent-fill); }
.streak i.off { background: var(--line-strong); }

.mini-widget { display: flex; justify-content: center; }
.widget {
  width: 168px; padding: var(--s-100); border-radius: var(--r-3xl);
  background: var(--surface); box-shadow: var(--shadow-md);
}
.widget .thumb { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 3; }
.widget .thumb svg { width: 100%; height: 100%; }
.widget .row { display: flex; gap: var(--s-75); margin-top: var(--s-75); }
.widget .row span {
  flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: var(--s-50);
  padding: var(--s-50); border-radius: var(--r-full); background: var(--surface-2);
}
.widget .row svg { width: 14px; height: 14px; }
.widget .row .k { color: var(--keep); }
.widget .row .d { color: var(--remove); }

.mini-shrink { display: grid; gap: var(--s-100); }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: var(--s-100); }
.bar { height: 12px; border-radius: var(--r-full); background: var(--line-strong); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--muted); transform-origin: left; transform: scaleX(1); }
.bar.after i { background: var(--accent-fill); transform: scaleX(0.38); }

.tags { display: flex; flex-wrap: wrap; gap: var(--s-75); padding: 0; list-style: none; }
.tags li { padding: var(--s-50) var(--s-100); border-radius: var(--r-full); background: var(--surface-2); color: var(--text); }
.tags li.warn { background: var(--fill-bg); color: var(--fill-text); }

/* ---------- Tagline reveal ---------- */
.tagline { padding-block: var(--s-900); }
.tagline p { max-width: 880px; margin-inline: auto; text-align: center; }
.tagline .line { display: block; }
.tagline .w { color: var(--text); transition: opacity 600ms var(--ease); }
.js .tagline .w { opacity: 0.3; }
.js .tagline .w.on { opacity: 1; }

/* ---------- Privacy ---------- */
.privacy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-200); padding: 0; list-style: none; }
.privacy-item {
  display: flex; gap: var(--s-200); align-items: flex-start;
  padding: var(--s-300); border-radius: var(--r-3xl); background: var(--surface); border: 1px solid var(--line);
}
.section.alt .privacy-item { border-color: transparent; box-shadow: var(--shadow-sm); }
.privacy-item .tick {
  width: 32px; height: 32px; flex: none; border-radius: var(--r-full);
  display: grid; place-items: center; background: var(--accent-soft); color: var(--accent);
}
.privacy-item .tick svg { width: 18px; height: 18px; }
.privacy-item h3 { margin-bottom: var(--s-50); }
.privacy-item p { color: var(--muted); }
.privacy-note {
  margin-top: var(--s-400); padding: var(--s-300);
  border-radius: var(--r-3xl); border: 1px dashed var(--line-strong);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-200);
}
.privacy-note p { max-width: 640px; color: var(--muted); }
@media (max-width: 959px) { .privacy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .privacy-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-300); max-width: 960px; margin-inline: auto; }
.plan {
  display: flex; flex-direction: column;
  padding: var(--s-400); border-radius: var(--r-3xl);
  background: var(--surface); border: 1px solid var(--line);
}
.plan.featured { border: 2px solid var(--accent-fill); box-shadow: var(--shadow-lg); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-100); margin-bottom: var(--s-100); }
.plan-tag { padding: var(--s-50) var(--s-100); border-radius: var(--r-full); background: var(--accent-soft); color: var(--accent); }
.plan-price { margin-top: var(--s-200); }
.plan-price-note { margin-top: var(--s-50); color: var(--muted); }
.plan ul { margin-top: var(--s-300); padding: 0; list-style: none; display: grid; gap: var(--s-100); }
.plan li { display: flex; gap: var(--s-100); align-items: flex-start; }
.plan li svg { width: 20px; height: 20px; flex: none; margin-top: var(--s-25); color: var(--accent); }
.plan-foot { margin-top: auto; padding-top: var(--s-300); color: var(--muted); }
.reassure {
  max-width: 960px; margin: var(--s-400) auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-75) var(--s-300);
  padding: 0; list-style: none; color: var(--muted);
}
.reassure li { display: inline-flex; align-items: center; gap: var(--s-75); }
.reassure svg { width: 18px; height: 18px; color: var(--keep); }
@media (max-width: 799px) { .plans { grid-template-columns: minmax(0, 1fr); } .plan { padding: var(--s-300); } }

/* ---------- FAQ ---------- */
.faq { max-width: 768px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; cursor: pointer; list-style: none;
  min-height: 44px; padding: var(--s-300) var(--s-600) var(--s-300) 0;
  font-size: 1.125rem; line-height: 1.75rem; font-weight: 500;
  border-radius: var(--r-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: var(--s-75); top: 50%; width: 24px; height: 24px; margin-top: -12px;
  background: currentColor; color: var(--muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 24px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 24px no-repeat;
  transition: transform var(--t-move) var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 var(--s-600) var(--s-300) 0; color: var(--muted); }
.faq .answer p + p, .faq .answer p + ul, .faq .answer ul + p { margin-top: var(--s-100); }
.faq .answer ul { padding-left: var(--s-300); }
.faq .answer li + li { margin-top: var(--s-75); }
.faq .answer strong { color: var(--text); }
.faq-more { margin-top: var(--s-400); text-align: center; color: var(--muted); }
@media (max-width: 559px) { .faq summary { padding-right: var(--s-500); font-size: 1rem; line-height: 1.5rem; } .faq .answer { padding-right: 0; } }

/* ---------- Final CTA ---------- */
.final {
  text-align: center;
  padding: var(--s-800) var(--s-300);
  border-radius: var(--r-3xl);
  background: var(--surface-2);
}
.final img { width: 80px; height: 80px; margin: 0 auto var(--s-300); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); }
.final p { max-width: 560px; margin: var(--s-200) auto 0; color: var(--muted); }
.final .hero-actions { justify-content: center; }
@media (max-width: 559px) { .final { padding: var(--s-600) var(--s-200); } }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: var(--s-600);
  padding-bottom: calc(env(safe-area-inset-bottom) + var(--s-600));
  color: var(--muted);
}
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-400); }
.footer-brand { max-width: 360px; }
.footer-brand .brand { padding-left: 0; margin-left: calc(var(--s-50) * -1); }
.footer-brand p { margin-top: var(--s-100); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s-400); }
.footer-links h2 { color: var(--text); margin-bottom: var(--s-75); }
.footer-links ul { list-style: none; padding: 0; }
.footer-links a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--muted); text-decoration: none;
  transition: color var(--t-fade) var(--ease);
}
.footer-links a:hover { color: var(--text); text-decoration: underline; }
.footer-links a[aria-current="page"] { color: var(--accent); }
.footer-legal { margin-top: var(--s-500); padding-top: var(--s-300); border-top: 1px solid var(--line); display: grid; gap: var(--s-75); }

/* ---------- Document pages (privacy, terms, support) ---------- */
.doc-hero {
  padding-top: calc(env(safe-area-inset-top) + 144px);
  padding-bottom: var(--s-600);
  border-bottom: 1px solid var(--line);
}
.doc-hero .lede { margin-top: var(--s-200); color: var(--muted); font-size: 1.25rem; line-height: 1.75rem; max-width: 680px; }
.doc-meta { margin-top: var(--s-300); display: flex; flex-wrap: wrap; gap: var(--s-75) var(--s-300); padding: 0; list-style: none; color: var(--muted); }
.doc-meta strong { color: var(--text); font-weight: 500; }
@media (max-width: 559px) {
  .doc-hero { padding-top: calc(env(safe-area-inset-top) + 112px); padding-bottom: var(--s-400); }
  .doc-hero .lede { font-size: 1.125rem; line-height: 1.75rem; }
  .doc-meta { flex-direction: column; }
}

.doc-layout {
  display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: var(--s-700);
  padding-block: var(--s-600) var(--s-900);
}
.toc { position: sticky; top: 104px; align-self: start; }
.toc h2 { color: var(--muted); margin-bottom: var(--s-100); }
.toc ol { list-style: none; padding: 0; display: grid; gap: var(--s-25); border-left: 1px solid var(--line); }
.toc a {
  display: flex; align-items: center; min-height: 36px; padding: var(--s-50) var(--s-100);
  margin-left: -1px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none;
  transition: color var(--t-fade) var(--ease), border-color var(--t-fade) var(--ease);
}
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--accent); border-left-color: var(--accent); }
@media (max-width: 899px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: var(--s-400); padding-top: var(--s-400); }
  .toc { display: none; }
}

.prose { max-width: 720px; }
.prose > section { padding-block: var(--s-400); border-top: 1px solid var(--line); }
.prose > section:first-child { border-top: 0; padding-top: 0; }
.prose h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 600; letter-spacing: -0.015em; margin-bottom: var(--s-200); }
.prose p, .prose ul { font-size: 1.125rem; line-height: 1.75rem; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: var(--s-200); }
.prose ul { padding-left: var(--s-300); }
.prose li + li { margin-top: var(--s-75); }
.prose li::marker { color: var(--muted); }
@media (max-width: 559px) { .prose p, .prose ul { font-size: 1rem; line-height: 1.75rem; } }

.callout {
  padding: var(--s-300); border-radius: var(--r-3xl);
  background: var(--accent-soft);
}
.prose > section.callout { border-top: 0; padding: var(--s-400); margin-bottom: var(--s-200); }
@media (max-width: 559px) { .prose > section.callout { padding: var(--s-300); } }
.checks { list-style: none; padding: 0 !important; }
.checks li { position: relative; padding-left: var(--s-400); }
.checks li + li { margin-top: var(--s-100); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: var(--r-full);
  background: var(--accent-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.75 2.75L14.5 7.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}

.fill {
  background: var(--fill-bg); color: var(--fill-text); border-radius: var(--r-md);
  padding: 0 var(--s-50); font-weight: 600;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

.contact-card {
  display: grid; gap: var(--s-200); justify-items: start;
  padding: var(--s-400); border-radius: var(--r-3xl);
  background: var(--surface-2);
}
.contact-card .note { color: var(--muted); }
@media (max-width: 559px) { .contact-card { padding: var(--s-300); } .contact-card .btn { width: 100%; } }

/* ---------- 404 ---------- */
.notfound {
  min-height: 100vh; display: grid; place-items: center; text-align: center;
  padding: calc(env(safe-area-inset-top) + 112px) max(var(--s-200), env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + var(--s-700)) max(var(--s-200), env(safe-area-inset-left));
}
.notfound-art { position: relative; width: 160px; height: 176px; margin: 0 auto var(--s-500); }
.notfound-art .c {
  position: absolute; left: 24px; top: 8px; width: 112px; height: 144px; border-radius: var(--r-2xl);
  background: var(--surface-2); border: 1px solid var(--line);
}
.notfound-art .c1 { transform: rotate(-8deg) translateX(-12px); }
.notfound-art .c2 {
  background: var(--surface); box-shadow: var(--shadow-lg);
  display: grid; place-items: center; color: var(--muted);
  font-size: 2.25rem; line-height: 2.5rem; font-weight: 600; letter-spacing: -0.02em;
  animation: swipe-away 3200ms var(--ease) 600ms infinite;
}
@keyframes swipe-away {
  0%, 20% { transform: rotate(6deg) translateX(8px); opacity: 1; }
  55% { transform: rotate(22deg) translate(140px, -12px); opacity: 0; }
  56% { transform: rotate(6deg) translateX(8px) scale(0.9); opacity: 0; }
  80%, 100% { transform: rotate(6deg) translateX(8px) scale(1); opacity: 1; }
}
.notfound p { max-width: 480px; margin: var(--s-200) auto 0; color: var(--muted); }
.notfound .hero-actions { justify-content: center; }

/* ---------- Scroll reveals ---------- */
.js .reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-group > .reveal:nth-child(2) { transition-delay: 60ms; }
.js .reveal-group > .reveal:nth-child(3) { transition-delay: 120ms; }
.js .reveal-group > .reveal:nth-child(4) { transition-delay: 180ms; }
.js .reveal-group > .reveal:nth-child(5) { transition-delay: 240ms; }
.js .reveal-group > .reveal:nth-child(6) { transition-delay: 300ms; }

/* Hero entrance */
.js .rise { opacity: 0; transform: translateY(24px); animation: rise 800ms var(--ease) forwards; }
.js .rise.d1 { animation-delay: 80ms; }
.js .rise.d2 { animation-delay: 160ms; }
.js .rise.d3 { animation-delay: 240ms; }
.js .rise.d4 { animation-delay: 320ms; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .js .reveal, .js .rise, .menu-panel a { transform: none !important; }
  .js .reveal { transition: opacity 300ms var(--ease); }
  .js .rise { animation: none; opacity: 1; }
  .pcard, .progress-bar i, .ring .ring-fill, .menu-toggle .bars span { transition-property: opacity; }
  .menu-panel a { transition: opacity var(--t-fade) var(--ease); transition-delay: 0ms !important; }
  .notfound-art .c2 { animation: none; transform: rotate(6deg) translateX(8px); }
  .btn:active, .deck-btn:active, a.store-cta:active { transform: none; }
  .js .tagline .w { opacity: 1; transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-nav { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-panel { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --line: rgba(127, 127, 127, 0.6); --muted: var(--text); }
}
@media print {
  .site-nav, .menu-panel, .skip-link, .toc { display: none !important; }
  .doc-hero { padding-top: 0; }
  body { background: #fff; color: #000; }
}

/* ---------- Support page ---------- */
.section-tight { padding-block: var(--s-600) 0; }
.section-tight:last-child { padding-bottom: var(--s-900); }
.faq-title { margin-bottom: var(--s-200); }
.prose .contact-card h2 { margin-bottom: 0; }
.prose .callout .btn { margin-top: var(--s-75); }
.footer-legal a { color: inherit; }
.notfound .eyebrow { margin-bottom: var(--s-100); color: var(--accent); }
.store-cta .store-text .button-md { text-wrap: balance; }
.pcard .chip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Long button labels inside documents wrap on very narrow screens. */
.prose .btn { white-space: normal; text-align: center; }
