/* ── Kooch · tokens ─────────────────────────────────────────── */
:root {
  --dusk: #16112E;        /* page */
  --dusk-2: #1F1940;      /* raised */
  --dusk-3: #2A2352;      /* hover / inputs */
  --line: #3A3168;
  --ink: #ECE8F7;
  --ink-2: #A9A2C9;
  --saffron: #F5B841;     /* the old account */
  --saffron-ink: #2B1D00;
  --turq: #2EC4B6;        /* the new account */
  --turq-ink: #00211E;
  --danger: #FF7A85;
  --glow-s: rgb(245 184 65 / .16);
  --glow-t: rgb(46 196 182 / .16);

  --f-body: "Vazirmatn", system-ui, sans-serif;
  --f-display: "Lalezar", "Vazirmatn", serif;

  --r-lg: 28px;
  --r-md: 16px;
  --r-sm: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[lang="en"] { --f-display: "Bricolage Grotesque", "Vazirmatn", sans-serif; }

:root[data-theme="light"] {
  --dusk: #F3F1FA;
  --dusk-2: #FFFFFF;
  --dusk-3: #E9E5F6;
  --line: #D6D0EA;
  --ink: #1C1738;
  --ink-2: #5E577E;
  --saffron: #B97A00;
  --saffron-ink: #FFFFFF;
  --turq: #0B8478;
  --turq-ink: #FFFFFF;
  --danger: #C2283A;
  --glow-s: rgb(185 122 0 / .12);
  --glow-t: rgb(11 132 120 / .12);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --dusk: #F3F1FA; --dusk-2: #FFFFFF; --dusk-3: #E9E5F6; --line: #D6D0EA;
    --ink: #1C1738; --ink-2: #5E577E;
    --saffron: #B97A00; --saffron-ink: #FFFFFF; --turq: #0B8478; --turq-ink: #FFFFFF;
    --danger: #C2283A; --glow-s: rgb(185 122 0 / .12); --glow-t: rgb(11 132 120 / .12);
    color-scheme: light;
  }
}

/* ── base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--dusk);
  color: var(--ink);
  font: 400 1rem/1.75 var(--f-body);
  overflow-x: hidden;
}
:root[lang="en"] body { line-height: 1.6; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
svg { flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--turq); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; padding: 8px 14px; background: var(--ink); color: var(--dusk); border-radius: var(--r-sm); z-index: 20; }
.skip:focus { top: 8px; }

.display {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  line-height: 1.12;
  margin: 0;
  letter-spacing: 0;
  text-wrap: balance;
}
:root[lang="en"] .display { font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.display.sm { font-size: clamp(1.8rem, 4.2vw, 2.6rem); }
.lede { color: var(--ink-2); font-size: clamp(1.02rem, 1.6vw, 1.18rem); max-width: 34em; margin: 1rem 0 0; }
.lede.sm { font-size: 1rem; margin-top: .4rem; }

/* ── header / footer ────────────────────────────────────────── */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--gutter);
  max-width: 1180px; width: 100%; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; }
.m-src { fill: var(--saffron); } .m-dst { fill: var(--turq); }
.m-path { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-dasharray: 2 3; stroke-linecap: round; }
.brand-word { font-family: var(--f-display); font-size: 1.7rem; line-height: 1; }
:root[lang="en"] .brand-word { font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; }
.top-actions { display: flex; gap: 8px; }
.chip {
  height: 40px; min-width: 40px; padding: 0 14px;
  border: 1px solid var(--line); background: var(--dusk-2); border-radius: 999px;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 500; transition: background .2s;
}
.chip:hover { background: var(--dusk-3); }
.chip.icon { padding: 0; }
.chip svg { width: 18px; height: 18px; fill: var(--ink); }
.lang-chip { color: var(--ink); text-decoration: none; }
:root[lang="fa"] .lang-chip { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; }
:root[lang="en"] .lang-chip { font-family: "Vazirmatn", sans-serif; }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 8px var(--gutter) 40px; }

/* ── notice (banner / maintenance) ──────────────────────────── */
.notice { background: var(--dusk-3); border-bottom: 1px solid var(--line); text-align: center; padding: 10px var(--gutter); font-size: .95rem; }
.notice p { margin: 0 auto; max-width: 70em; }
.notice-warn { background: var(--saffron); color: var(--saffron-ink); border: 0; font-weight: 500; }

/* ── steps ──────────────────────────────────────────────────── */
.steps { list-style: none; display: flex; gap: 6px; padding: 0; margin: 8px 0 clamp(28px, 6vw, 56px); flex-wrap: wrap; }
.steps li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 8px; border-radius: 999px; font-size: .88rem; color: var(--ink-2);
  border: 1px solid transparent;
}
[dir="rtl"] .steps li { padding: 6px 8px 6px 14px; }
.steps .n {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--dusk-3); font-size: .78rem; font-weight: 700;
}
.steps li[aria-current="step"] { color: var(--ink); border-color: var(--line); background: var(--dusk-2); }
.steps li[aria-current="step"] .n { background: var(--ink); color: var(--dusk); }
.steps li.done .n { background: var(--turq); color: var(--turq-ink); }

/* ── view 1 · the route ─────────────────────────────────────── */
.hero-copy { max-width: 820px; }

.route {
  --station: clamp(240px, 30vw, 330px);
  margin: clamp(36px, 7vw, 72px) 0 clamp(28px, 5vw, 44px);
  display: grid;
  grid-template-columns: var(--station) 1fr var(--station);
  align-items: center;
}
.station {
  position: relative;
  border-radius: var(--r-lg);
  padding: 22px;
  min-height: 210px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  background: var(--dusk-2);
  border: 1.5px dashed var(--line);
  transition: border-color .3s, background .3s, transform .3s var(--ease);
}
.station[data-role="source"] { --c: var(--saffron); --c-ink: var(--saffron-ink); --glow: var(--glow-s); }
.station[data-role="target"] { --c: var(--turq); --c-ink: var(--turq-ink); --glow: var(--glow-t); }
.station.on { border-style: solid; border-color: var(--c); background: linear-gradient(160deg, var(--glow), transparent 70%), var(--dusk-2); }
.st-label { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.st-label .n {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: var(--c-ink); font-size: .85rem;
}
.st-hint { color: var(--ink-2); font-size: .92rem; margin: 4px 0 0; }
.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--c); color: var(--c-ink); font-weight: 700; font-size: .98rem;
  text-decoration: none; transition: transform .15s var(--ease), filter .2s;
}
.st-btn:hover { filter: brightness(1.08); }
.st-btn:active { transform: scale(.98); }
.st-btn svg { width: 20px; height: 20px; fill: currentColor; }
.st-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover; flex: none;
  box-shadow: 0 0 0 3px var(--dusk-2), 0 0 0 5px var(--c);
  background: var(--dusk-3); display: grid; place-items: center;
  font-family: var(--f-display); font-size: 1.6rem; color: var(--c);
}
.who-name { font-weight: 700; font-size: 1.12rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-sub { color: var(--ink-2); font-size: .85rem; }
.st-links { display: flex; gap: 6px; flex-wrap: wrap; }
.link-btn {
  background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  color: var(--ink-2); padding: 6px 14px; font-size: .85rem; text-decoration: none;
}
.link-btn:hover { color: var(--ink); border-color: var(--ink-2); }

.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.hint { color: var(--ink-2); margin: 0; font-size: .95rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform .15s var(--ease), filter .2s, opacity .2s;
}
.btn.big { height: 60px; padding: 0 34px; font-size: 1.1rem; }
.btn.primary { background: var(--ink); color: var(--dusk); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.primary:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn:disabled { opacity: .35; cursor: not-allowed; }
.dir-arrow { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .dir-arrow { transform: scaleX(-1); }
.dir-arrow.flip { transform: scaleX(-1); }
[dir="rtl"] .dir-arrow.flip { transform: none; }

/* ── landing content: how it works + questions ─────────────── */
:root { interpolate-size: allow-keywords; }
.section-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.25; margin: 0 0 22px; }
:root[lang="en"] .section-title { font-weight: 800; letter-spacing: -.02em; }

.how { margin-top: clamp(72px, 11vw, 128px); }
.how-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px);
  counter-reset: how;
}
.how-list li { position: relative; padding-top: 22px; border-top: 2px solid var(--line); }
/* The caravan again: the rule fills from saffron (old) to turquoise (new) across the three steps. */
.how-list li::before {
  content: ""; position: absolute; top: -2px; inset-inline-start: 0; height: 2px; width: 44px;
  background: var(--saffron);
}
.how-list li:nth-child(2)::before { background: linear-gradient(90deg, var(--saffron), var(--turq)); }
.how-list li:nth-child(3)::before { background: var(--turq); }
.how-n { display: block; font-family: var(--f-display); font-size: 2.6rem; line-height: 1; color: var(--ink-2); margin-bottom: 12px; }
:root[lang="en"] .how-n { font-weight: 800; }
.how-list h3 { margin: 0 0 6px; font-size: 1.12rem; font-weight: 800; }
.how-list p { margin: 0; color: var(--ink-2); font-size: .97rem; max-width: 30em; }

.faq {
  margin-top: clamp(72px, 11vw, 128px);
  display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: clamp(20px, 4vw, 64px); align-items: start;
}
.faq .section-title { position: sticky; top: 24px; }
.qa-list { display: grid; gap: 10px; }
.qa { border-radius: var(--r-md); background: var(--dusk-2); border: 1px solid transparent; transition: border-color .25s, background .25s; }
.qa[open] { border-color: var(--line); }
.qa summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 20px; font-weight: 700; font-size: 1.02rem; line-height: 1.5; border-radius: var(--r-md);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--turq); }
.qa-icon {
  width: 30px; height: 30px; flex: none; padding: 7px; border-radius: 50%;
  background: var(--dusk-3); fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round;
  transition: transform .3s var(--ease), background .25s, stroke .25s;
}
.qa[open] .qa-icon { transform: rotate(45deg); background: var(--turq); stroke: var(--turq-ink); }
.qa::details-content { block-size: 0; overflow: clip; transition: block-size .32s var(--ease), content-visibility .32s allow-discrete; }
.qa[open]::details-content { block-size: auto; }
.qa-body { padding: 0 20px 20px; color: var(--ink-2); }
.qa-body p { margin: 0; max-width: 46em; }
.qa-body bdi { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* ── simple pages ───────────────────────────────────────────── */
.prose { max-width: 720px; padding-top: clamp(16px, 4vw, 40px); }
.prose h2 { font-size: 1.15rem; font-weight: 800; margin: 2em 0 .4em; }
.prose p { color: var(--ink-2); }
.prose .btn { margin-top: 1.5em; }
.muted { color: var(--ink-2); }
.lost { text-align: center; margin: 0 auto; padding-top: clamp(40px, 10vw, 96px); }
.lost-mark { width: 180px; margin: 0 auto 24px; display: block; }
.lost-mark .m-path { stroke-width: 2.5; }
.lost-ring { fill: none; stroke: var(--turq); stroke-width: 2.5; stroke-dasharray: 4 4; }

/* ── view 2 · pick ──────────────────────────────────────────── */
.back {
  display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer;
  color: var(--ink-2); padding: 4px 0; margin-bottom: 10px; font-size: .92rem;
}
.back:hover { color: var(--ink); }
.back .dir-arrow { width: 16px; height: 16px; }
.lede .src { color: var(--saffron); font-weight: 700; }
.lede .dst { color: var(--turq); font-weight: 700; }

.toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 14px 0; margin: 18px 0 8px;
  background: linear-gradient(var(--dusk) 75%, transparent);
}
.search {
  flex: 1 1 260px; max-width: 420px; display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px; border-radius: 999px; background: var(--dusk-2); border: 1px solid var(--line);
}
.search:focus-within { border-color: var(--turq); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--ink-2); stroke-width: 2; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; }
.search input::-webkit-search-cancel-button { filter: grayscale(1); }

.all-toggle { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; user-select: none; }
.all-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  width: 50px; height: 30px; border-radius: 999px; background: var(--dusk-3); border: 1px solid var(--line);
  position: relative; transition: background .25s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--ink-2); transition: inset-inline-start .25s var(--ease), background .25s;
}
.all-toggle input:checked + .switch { background: var(--turq); border-color: var(--turq); }
.all-toggle input:checked + .switch::after { inset-inline-start: 23px; background: var(--turq-ink); }
.all-toggle input:indeterminate + .switch::after { inset-inline-start: 13px; background: var(--turq); }
.all-toggle input:focus-visible + .switch { outline: 2px solid var(--turq); outline-offset: 3px; }

.group { margin-top: 26px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.group-head h3 { margin: 0; font-size: 1.1rem; font-weight: 800; }
.group-head p { margin: 2px 0 0; color: var(--ink-2); font-size: .88rem; }
.group-toggle { background: none; border: 0; color: var(--turq); cursor: pointer; font-weight: 700; font-size: .9rem; white-space: nowrap; padding: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.item {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 10px; padding-inline-end: 16px; border-radius: var(--r-md); cursor: pointer;
  background: var(--dusk-2); border: 1.5px solid transparent;
  transition: border-color .2s, background .2s;
}
.item:hover { background: var(--dusk-3); }
.item input { position: absolute; opacity: 0; pointer-events: none; }
.item:has(input:checked) { border-color: var(--turq); background: linear-gradient(90deg, var(--glow-t), transparent), var(--dusk-2); }
.item:has(input:focus-visible) { outline: 2px solid var(--turq); outline-offset: 2px; }
.cover {
  width: 60px; height: 60px; border-radius: var(--r-sm); flex: none; object-fit: cover;
  background: var(--dusk-3); display: grid; place-items: center;
}
.cover svg { width: 26px; height: 26px; fill: var(--ink-2); }
.cover.liked { background: linear-gradient(135deg, var(--saffron), var(--turq)); }
.cover.liked svg, .cover.album svg { fill: #fff; }
.cover.album { background: linear-gradient(135deg, #6B5BD2, #2A2352); }
.meta { flex: 1; min-width: 0; }
.meta b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta small { color: var(--ink-2); font-size: .84rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tick {
  width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); flex: none;
  display: grid; place-items: center; transition: background .2s, border-color .2s;
}
.tick svg { width: 14px; height: 14px; fill: none; stroke: var(--turq-ink); stroke-width: 3; opacity: 0; }
.item:has(input:checked) .tick { background: var(--turq); border-color: var(--turq); }
.item:has(input:checked) .tick svg { opacity: 1; }
.item.wide { grid-column: 1 / -1; }
@media (min-width: 720px) { .grid.lib { grid-template-columns: 1fr 1fr; } .item.wide { grid-column: auto; } }

.empty { color: var(--ink-2); padding: 18px; border: 1px dashed var(--line); border-radius: var(--r-md); text-align: center; }

.skeleton .item { pointer-events: none; }
.skeleton .cover, .skeleton .bar { background: var(--dusk-3); animation: pulse 1.4s ease-in-out infinite; }
.skeleton .bar { height: 12px; border-radius: 6px; margin: 6px 0; }
@keyframes pulse { 50% { opacity: .45; } }

.actionbar {
  position: sticky; bottom: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 28px calc(-1 * var(--gutter)) -40px; padding: 14px var(--gutter);
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--dusk) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.ab-text { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.ab-text strong { font-size: 1.05rem; }
.ab-text span { color: var(--ink-2); font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── view 3 · move ──────────────────────────────────────────── */
.move-head { display: flex; align-items: center; gap: clamp(18px, 4vw, 36px); margin-bottom: 28px; }
.meter { position: relative; width: clamp(104px, 18vw, 140px); aspect-ratio: 1; flex: none; }
.meter svg { width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .meter svg { transform: rotate(-90deg) scaleY(-1); }
.meter circle { fill: none; stroke-width: 9; }
.meter-bg { stroke: var(--dusk-3); }
.meter-fg { stroke: var(--turq); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7; transition: stroke-dashoffset .6s var(--ease); }
.meter-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-size: clamp(1.6rem, 3.6vw, 2.1rem); }

.tasks { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 8px; }
.task {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 14px 10px 10px; border-radius: var(--r-md); background: var(--dusk-2);
}
[dir="rtl"] .task { padding: 10px 10px 10px 14px; }
.task .cover { width: 48px; height: 48px; }
.task .cover svg { width: 22px; height: 22px; }
.task-bar { height: 4px; border-radius: 4px; background: var(--dusk-3); margin-top: 6px; overflow: hidden; }
.task-bar i { display: block; height: 100%; width: 0; background: var(--turq); border-radius: 4px; transition: width .4s var(--ease); }
.task[data-status="error"] .task-bar i { background: var(--danger); }
.task-state { font-size: .84rem; color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.task[data-status="done"] .task-state { color: var(--turq); }
.task[data-status="error"] .task-state { color: var(--danger); }
.meta small.task-msg { color: var(--danger); font-size: .82rem; white-space: normal; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--turq); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── toast ──────────────────────────────────────────────────── */
.toast {
  position: fixed; inset-inline: 16px; bottom: max(20px, env(safe-area-inset-bottom)); margin: 0 auto; max-width: 480px; z-index: 30;
  background: var(--ink); color: var(--dusk); padding: 14px 18px; border-radius: var(--r-md);
  font-weight: 500; box-shadow: 0 12px 40px rgb(0 0 0 / .35);
  animation: toast-in .35s var(--ease);
}
.toast.err { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translateY(16px); opacity: 0; } }

/* ── responsive ─────────────────────────────────────────────── */
@media (max-width: 860px) {
  .how-list { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; }
  .faq .section-title { position: static; }
  .route { grid-template-columns: 1fr; max-width: 480px; }
  .station { min-height: 0; }
}
@media (max-width: 560px) {
  .steps li:not([aria-current="step"]) span:not(.n) { display: none; }
  .steps li:not([aria-current="step"]) { padding: 6px; }
  .btn.big { width: 100%; }
  .cta-row .btn { flex: 1 1 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { max-width: none; }
  .all-toggle { justify-content: space-between; flex-direction: row-reverse; padding: 4px 4px 0; }
  .move-head { flex-direction: column; align-items: flex-start; }
  .actionbar .btn { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .route .dot { display: none; }
}
[dir="rtl"] .how-list li:nth-child(2)::before { background: linear-gradient(270deg, var(--saffron), var(--turq)); }

/* ── header nav ─────────────────────────────────────────────── */
.top { gap: 16px; }
.top-nav { display: flex; gap: 4px; margin-inline-start: auto; margin-inline-end: 8px; }
.top-nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 8px 14px; border-radius: 999px; transition: color .2s, background .2s;
}
.top-nav a:hover { color: var(--ink); background: var(--dusk-2); }
.top-nav a[aria-current="page"] { color: var(--ink); background: var(--dusk-2); }
@media (max-width: 560px) { .top-nav { display: none; } }

/* ── footer ─────────────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); margin-top: clamp(48px, 8vw, 96px); padding: 36px var(--gutter) 28px; }
.sf-inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start;
}
.sf-brand p { color: var(--ink-2); font-size: .9rem; margin: 12px 0 0; max-width: 34em; }
.sf-brand .brand-mark { width: 30px; height: 30px; }
.sf-brand .brand-word { font-size: 1.4rem; }
.sf-links { display: grid; gap: 8px; }
.sf-links a { color: var(--ink-2); text-decoration: none; font-size: .95rem; width: fit-content; }
.sf-links a:hover { color: var(--ink); }
.sf-social > span { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.sf-legal { max-width: 1180px; margin: 28px auto 0; color: var(--ink-2); font-size: .8rem; opacity: .8; }
@media (max-width: 760px) { .sf-inner { grid-template-columns: 1fr 1fr; } .sf-brand { grid-column: 1 / -1; } }

.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.social a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--dusk-2); border: 1px solid var(--line); transition: background .2s, border-color .2s, transform .2s var(--ease);
}
.social a:hover { background: var(--dusk-3); border-color: var(--turq); transform: translateY(-2px); }
.social svg { width: 19px; height: 19px; fill: var(--ink); }

/* ── shared page scaffolding ────────────────────────────────── */
.page { padding-top: clamp(8px, 3vw, 32px); }
.page-head { max-width: 760px; margin-bottom: clamp(28px, 5vw, 48px); }
.page-head .display { font-size: clamp(2.3rem, 6vw, 4.2rem); }
.page-head .muted { margin-top: 10px; }
.page-foot-line { color: var(--ink-2); margin-top: 40px; }
.page-foot-line a, .policy-body a, .consent a, .aside-card a { color: var(--turq); text-underline-offset: 3px; }

/* ── about ──────────────────────────────────────────────────── */
.about-route { position: relative; margin: 0 0 clamp(40px, 7vw, 80px); height: clamp(80px, 14vw, 140px); }
.about-route svg { width: 100%; height: 100%; display: block; overflow: visible; }
.ar-path { fill: none; stroke: var(--line); stroke-width: 3; stroke-dasharray: 3 10; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.ar-node { position: absolute; width: clamp(22px, 3.4vw, 34px); aspect-ratio: 1; border-radius: 50%; }
.ar-src { background: var(--saffron); left: 5%; bottom: 25%; transform: translate(-50%, 50%); box-shadow: 0 0 0 8px var(--glow-s); }
.ar-dst { background: var(--turq); left: 95%; top: 25%; transform: translate(-50%, -50%); box-shadow: 0 0 0 8px var(--glow-t); }
[dir="rtl"] .about-route { transform: scaleX(-1); }

.about-story { display: grid; grid-template-columns: minmax(200px, 1fr) 2fr; gap: clamp(20px, 4vw, 64px); }
.story-text p { margin: 0 0 1em; font-size: 1.08rem; max-width: 40em; }
.story-text p:first-child { font-size: 1.22rem; color: var(--ink); }
.story-text p + p { color: var(--ink-2); }

.about-stats { margin-top: clamp(56px, 9vw, 104px); }
.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; border-block: 1px solid var(--line); }
.stat-row > div { padding: 24px 0; display: flex; flex-direction: column-reverse; gap: 6px; }
.stat-row > div + div { border-inline-start: 1px solid var(--line); padding-inline-start: clamp(16px, 3vw, 32px); }
.stat-row dd { margin: 0; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; line-height: 1; }
.stat-row dt { color: var(--ink-2); font-size: .95rem; }

.about-values { margin-top: clamp(56px, 9vw, 104px); }
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.values li { background: var(--dusk-2); border-radius: var(--r-md); padding: 22px 24px; }
.values h3 { margin: 0 0 6px; font-size: 1.08rem; font-weight: 800; }
.values p { margin: 0; color: var(--ink-2); }

.cta-band {
  margin-top: clamp(56px, 9vw, 104px); padding: clamp(24px, 4vw, 40px);
  border-radius: var(--r-lg); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--glow-s), transparent 50%), linear-gradient(300deg, var(--glow-t), transparent 55%), var(--dusk-2);
  border: 1px solid var(--line);
}
.cta-band .section-title { margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--ink-2); }

/* ── contact ────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: clamp(20px, 4vw, 48px); align-items: start; }
.contact-form, .sent { background: var(--dusk-2); border-radius: var(--r-lg); padding: clamp(20px, 3.5vw, 36px); display: grid; gap: 18px; }
/* align-items: start so a field with a hint line never stretches its neighbour's input */
.row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.fld { display: grid; gap: 8px; align-content: start; border: 0; padding: 0; margin: 0; min-width: 0; }
.fld-l { font-weight: 700; font-size: .92rem; padding: 0; }
.fld input:not([type="radio"]), .fld textarea {
  width: 100%; border: 1px solid var(--line); background: var(--dusk); color: var(--ink); font: inherit;
  border-radius: var(--r-sm); padding: 0 14px; transition: border-color .2s, box-shadow .2s;
}
.fld input:not([type="radio"]) { height: 50px; }
.fld textarea { resize: vertical; height: 180px; min-height: 140px; max-height: 480px; padding: 12px 14px; line-height: 1.8; }
.fld input:focus, .fld textarea:focus { outline: none; border-color: var(--turq); box-shadow: 0 0 0 3px var(--glow-t); }
.fld [aria-invalid="true"] { border-color: var(--danger); }
.fld-hint { color: var(--ink-2); font-size: .82rem; }
.fld-err { color: var(--danger); font-size: .84rem; font-weight: 500; min-height: 0; }
.fld-err:empty { display: none; }
/* fieldset + legend don't take part in grid gaps, so space the chips explicitly */
.fld.topics { display: block; }
.fld.topics legend { margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { position: relative; }
.topic input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.topic span {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--dusk); color: var(--ink-2); font-weight: 500; font-size: .92rem;
  transition: background .2s, border-color .2s, color .2s;
}
.topic span:hover { color: var(--ink); border-color: var(--ink-2); }
.topic input:checked + span { background: var(--turq); border-color: var(--turq); color: var(--turq-ink); font-weight: 700; }
.topic input:focus-visible + span { outline: 2px solid var(--turq); outline-offset: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--turq); flex: none; }
.hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-msg { margin: 0; padding: 12px 14px; border-radius: var(--r-sm); background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); font-weight: 500; }
.contact-form .btn { justify-self: start; height: 52px; padding: 0 28px; font-size: 1rem; margin-top: 4px; }
.sent { text-align: center; justify-items: center; padding-block: clamp(40px, 7vw, 72px); }
.sent .section-title { margin: 0; }
.sent p { color: var(--ink-2); margin: 0; max-width: 30em; }
.sent:focus { outline: none; }
.sent-mark { width: 150px; }
.sent-mark .m-path { stroke-width: 2.5; }

.contact-aside { display: grid; gap: 10px; position: sticky; top: 24px; }
.aside-card { border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.aside-card h2 { margin: 0 0 6px; font-size: .86rem; font-weight: 700; color: var(--ink-2); }
.aside-card p { margin: 0; font-weight: 700; }
.aside-card .mail { font-weight: 800; font-size: 1.1rem; text-decoration: none; word-break: break-all; }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .about-story { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .row-2 { grid-template-columns: 1fr; }
  .contact-form .btn { justify-self: stretch; }
  .topic span { height: 38px; padding: 0 14px; font-size: .88rem; }
  .values { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-row > div + div { border-inline-start: 0; border-top: 1px solid var(--line); padding-inline-start: 0; }
  .cta-band .btn { width: 100%; }
}

/* ── privacy ────────────────────────────────────────────────── */
.summary {
  border-radius: var(--r-lg); padding: clamp(20px, 3.5vw, 32px); margin-bottom: clamp(36px, 6vw, 64px);
  background: linear-gradient(135deg, var(--glow-t), transparent 60%), var(--dusk-2); border: 1px solid var(--line);
}
.summary h2 { margin: 0 0 14px; font-size: 1.1rem; font-weight: 800; }
.summary ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 24px; }
.summary li { display: flex; gap: 10px; align-items: flex-start; }
.summary svg { width: 20px; height: 20px; flex: none; margin-top: 4px; fill: none; stroke: var(--turq); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

.policy { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.toc { position: sticky; top: 24px; }
.toc h2 { font-size: .86rem; color: var(--ink-2); font-weight: 700; margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc a { display: block; padding: 7px 12px; border-radius: var(--r-sm); color: var(--ink-2); text-decoration: none; font-size: .92rem; line-height: 1.5; }
.toc a:hover { background: var(--dusk-2); color: var(--ink); }
.policy-body { max-width: 760px; }
.policy-body section { padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); scroll-margin-top: 24px; }
.policy-body h2 { display: flex; align-items: baseline; gap: 12px; font-size: 1.25rem; font-weight: 800; margin: 0 0 12px; }
.sec-n { font-family: var(--f-display); font-weight: 400; color: var(--ink-2); font-size: 1.3rem; min-width: 1.2em; }
:root[lang="en"] .sec-n { font-weight: 800; }
.policy-body p, .policy-body li { color: var(--ink-2); }
.policy-body b { color: var(--ink); }
.policy-body ul { padding-inline-start: 1.2em; margin: 0; display: grid; gap: 8px; }
.policy-body code { background: var(--dusk-3); padding: 1px 7px; border-radius: 6px; font-size: .84em; direction: ltr; unicode-bidi: isolate; display: inline-block; margin: 1px 0; }
.scope-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 6px 0 12px; display: block; overflow-x: auto; }
.scope-table th { text-align: start; color: var(--ink-2); font-weight: 700; font-size: .8rem; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.scope-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.scope-table td:first-child { color: var(--ink); font-weight: 700; white-space: nowrap; }
.policy-contact { border-bottom: 0 !important; background: var(--dusk-2); border-radius: var(--r-lg); padding: 24px !important; }
.policy-contact p { margin: 0 0 6px; }
.pc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px !important; }
@media (max-width: 860px) {
  .policy { grid-template-columns: 1fr; }
  .toc { position: static; background: var(--dusk-2); border-radius: var(--r-md); padding: 16px; }
}
.social svg path { fill-rule: evenodd; }

/* ── 404: the route that never arrives ──────────────────────── */
.lost-page { text-align: center; max-width: 720px; margin: 0 auto; padding-top: clamp(16px, 5vw, 48px); }
.lost-code {
  display: flex; align-items: center; justify-content: center; gap: clamp(4px, 1.5vw, 14px);
  font-family: var(--f-display); font-size: clamp(6.5rem, 24vw, 13rem); line-height: .9; color: var(--ink);
  direction: ltr;
}
:root[lang="en"] .lost-code { font-weight: 800; letter-spacing: -.04em; }
.lc-ring { width: .82em; height: .82em; flex: none; overflow: visible; }
.lc-ring-dash {
  fill: none; stroke: var(--turq); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 2 13;
  transform-origin: 50% 50%; animation: lost-spin 18s linear infinite;
}
.lc-q { font-family: var(--f-body); font-weight: 800; font-size: 34px; fill: var(--ink-2); }
@keyframes lost-spin { to { transform: rotate(360deg); } }

.lost-route { display: block; width: min(100%, 560px); height: auto; margin: clamp(8px, 2vw, 18px) auto clamp(18px, 4vw, 34px); overflow: visible; }
[dir="rtl"] .lost-route { transform: scaleX(-1); }
.lr-path { fill: none; stroke: var(--line); stroke-width: 3; stroke-dasharray: 3 9; stroke-linecap: round; }
.lr-home { fill: var(--saffron); filter: drop-shadow(0 0 10px var(--glow-s)); }
.lr-end { fill: none; stroke: var(--turq); stroke-width: 2.5; stroke-dasharray: 3 5; opacity: .7; }
.lr-dot { fill: var(--saffron); }

.lost-page .lede { margin-inline: auto; }
.lost-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 28px 0 0; }
.lost-links { margin-top: clamp(40px, 7vw, 64px); padding-top: 24px; border-top: 1px solid var(--line); }
.lost-links h2 { font-size: .9rem; font-weight: 700; color: var(--ink-2); margin: 0 0 12px; }
.lost-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.lost-links a {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .92rem;
  transition: border-color .2s, background .2s;
}
.lost-links a:hover { border-color: var(--turq); background: var(--dusk-2); }
@media (max-width: 560px) { .lost-actions .btn { flex: 1 1 100%; } }
@media (prefers-reduced-motion: reduce) { .lc-ring-dash { animation: none; } .lr-dot { display: none; } }

/* ══════════════════════════════════════════════════════════════
   Motion
   One idea throughout: things travel from the old home (saffron) to the new one (turquoise).
   Everything below is switched off by prefers-reduced-motion.
   ══════════════════════════════════════════════════════════════ */

/* ── aurora: two slow glows behind the page ───────────────────── */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora span {
  position: absolute; border-radius: 50%; will-change: transform;
  width: 70vmax; height: 70vmax;
}
.aurora .a1 { top: -38vmax; inset-inline-end: -22vmax; background: radial-gradient(closest-side, var(--glow-s), transparent 70%); animation: drift-a 26s ease-in-out infinite alternate; }
.aurora .a2 { bottom: -42vmax; inset-inline-start: -26vmax; background: radial-gradient(closest-side, var(--glow-t), transparent 70%); animation: drift-b 32s ease-in-out infinite alternate; }
.aurora .a3 { top: 30vh; inset-inline-start: 30vw; width: 40vmax; height: 40vmax; opacity: .55;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--turq) 9%, transparent), transparent 70%); animation: drift-c 38s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(-9vmax, 7vmax) scale(1.12); } }
@keyframes drift-b { to { transform: translate(10vmax, -8vmax) scale(1.08); } }
@keyframes drift-c { from { transform: translate(-6vmax, 0) scale(.9); } to { transform: translate(8vmax, -6vmax) scale(1.15); } }

/* ── first paint: headline words rise, the rest follows ───────── */
.motion-on [data-split] .w { display: inline-block; overflow: hidden; padding-block: .08em; margin-block: -.08em; vertical-align: top; }
.motion-on [data-split] .w > span {
  display: inline-block; transform: translateY(105%) rotate(4deg); opacity: 0;
  animation: word-in .9s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + 80ms);
}
[dir="rtl"].motion-on [data-split] .w > span, :root[dir="rtl"].motion-on [data-split] .w > span { transform: translateY(105%) rotate(-4deg); }
@keyframes word-in { to { transform: none; opacity: 1; } }

.motion-on .rise { opacity: 0; transform: translateY(18px); animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: .45s; }
.motion-on .route.rise { animation-delay: .6s; }
.motion-on .cta-row.rise { animation-delay: .75s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── the route ────────────────────────────────────────────────── */
.path { position: relative; height: 150px; margin: 0 -8px; }
.route-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rp-base { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 2 9; stroke-linecap: round; }
.rp-flow {
  fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 2 9; opacity: 0;
  stroke: var(--saffron); transition: opacity .6s, stroke .6s;
}
.route.has-source .rp-flow { opacity: .9; animation: march 1.6s linear infinite; }
.route.ready .rp-flow { stroke: var(--turq); animation-duration: .8s; }
@keyframes march { to { stroke-dashoffset: -22; } }
[dir="rtl"] .route.has-source .rp-flow { animation-name: march; }

.notes { position: absolute; inset: 0; pointer-events: none; }
.note {
  position: absolute; left: 0; top: 0; font-size: 1.25rem; line-height: 1; font-weight: 700;
  color: color-mix(in oklab, var(--saffron), var(--turq) var(--p, 0%));
  text-shadow: 0 0 14px color-mix(in oklab, var(--glow-s), var(--glow-t) var(--p, 0%));
  will-change: transform, opacity;
}

/* stations: spotlight under the pointer, a breath when ready, a ring when an account lands */
.station { isolation: isolate; overflow: hidden; }
.spot::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--c, var(--turq)) 16%, transparent), transparent 70%);
}
.spot:hover::after { opacity: 1; }
.station.on { box-shadow: 0 0 0 0 transparent; }
.route.ready .station[data-role="target"] { animation: breathe 2.8s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 8px var(--glow-t), 0 18px 50px -20px var(--turq); } }
.station.landed { animation: land .9s cubic-bezier(.2, .9, .3, 1.3); }
.station.landed::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--c); pointer-events: none;
  animation: ring 1.2s ease-out forwards;
}
@keyframes land { 0% { transform: scale(.94); } 60% { transform: scale(1.02); } 100% { transform: none; } }
@keyframes ring { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.12); } }
.avatar { transition: transform .4s cubic-bezier(.2, .9, .3, 1.4); }
.station:hover .avatar { transform: scale(1.06) rotate(-3deg); }

/* ── buttons: a light sweep on the main actions ───────────────── */
.btn.primary, .st-btn { position: relative; overflow: hidden; isolation: isolate; }
.btn.primary::after, .st-btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .28) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
.btn.primary:hover::after, .st-btn:hover::after { transform: translateX(120%); }
#next:not(:disabled) { animation: nudge 2.6s ease-in-out 1.4s infinite; }
@keyframes nudge { 0%, 80%, 100% { transform: none; } 88% { transform: translateY(-3px); } 94% { transform: translateY(0); } }
.btn .dir-arrow { transition: transform .25s var(--ease); }
.btn:hover .dir-arrow { transform: translateX(4px); }
[dir="rtl"] .btn:hover .dir-arrow { transform: scaleX(-1) translateX(4px); }
[dir="rtl"] .btn:hover .dir-arrow.flip { transform: translateX(4px); }

/* theme switch: the moon turns */
#theme svg { transition: transform .6s cubic-bezier(.2, .9, .3, 1.3); }
:root[data-theme="light"] #theme svg { transform: rotate(-200deg) scale(.9); }

/* ── how it works: the rule fills from saffron to turquoise as you scroll in ── */
.motion-on .how[data-reveal] .how-list li::before { width: 0; transition: width 1s cubic-bezier(.2, .8, .2, 1); }
.motion-on .how[data-reveal].in .how-list li::before { width: 100%; }
.motion-on .how[data-reveal] .how-list li { opacity: 0; transform: translateY(16px); transition: opacity .7s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.motion-on .how[data-reveal].in .how-list li { opacity: 1; transform: none; }
.how-list li:nth-child(2), .how-list li:nth-child(2)::before { transition-delay: .18s; }
.how-list li:nth-child(3), .how-list li:nth-child(3)::before { transition-delay: .36s; }
.motion-on .how[data-reveal] .how-n { display: inline-block; transform: scale(.6); opacity: 0; transition: transform .8s cubic-bezier(.2, .9, .3, 1.5), opacity .5s; transition-delay: inherit; }
.motion-on .how[data-reveal].in .how-n { transform: none; opacity: 1; }

/* generic reveal for other sections (FAQ, about) */
.motion-on [data-reveal]:not(.how) { opacity: 0; transform: translateY(26px); transition: opacity .8s, transform .9s cubic-bezier(.2, .8, .2, 1); }
.motion-on [data-reveal]:not(.how).in { opacity: 1; transform: none; }
.motion-on .faq[data-reveal] .qa { opacity: 0; transform: translateY(12px); transition: opacity .5s, transform .6s cubic-bezier(.2, .8, .2, 1); }
.motion-on .faq[data-reveal].in .qa { opacity: 1; transform: none; }
.faq .qa:nth-child(2) { transition-delay: .07s; } .faq .qa:nth-child(3) { transition-delay: .14s; }
.faq .qa:nth-child(4) { transition-delay: .21s; } .faq .qa:nth-child(5) { transition-delay: .28s; }
.qa-body { animation: none; }
.qa[open] .qa-body { animation: qa-in .35s cubic-bezier(.2, .8, .2, 1); }
@keyframes qa-in { from { opacity: 0; transform: translateY(-6px); } }

/* about: the big route draws itself; the values light up in turn */
.motion-on .about-route[data-reveal] .ar-path { stroke-dasharray: 3 10; animation: march 2.4s linear infinite; }
.motion-on .about-route[data-reveal] .ar-node { transform-origin: center; }
.motion-on .about-route[data-reveal].in .ar-dst { animation: breathe-dot 2.6s ease-in-out infinite; }
@keyframes breathe-dot { 50% { box-shadow: 0 0 0 16px var(--glow-t); } }
.motion-on .about-values[data-reveal] .values li { opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .6s, transform .7s cubic-bezier(.2, .8, .2, 1); }
.motion-on .about-values[data-reveal].in .values li { opacity: 1; transform: none; }
.values li:nth-child(2) { transition-delay: .1s; } .values li:nth-child(3) { transition-delay: .2s; } .values li:nth-child(4) { transition-delay: .3s; }
.values li { position: relative; transition: background .3s; }
.values li:hover { background: var(--dusk-3); }
.stat-row dd { font-variant-numeric: tabular-nums; }

/* ── pick: the library cascades in once; ticks draw themselves ── */
#library.enter .group-head, #library.enter .item {
  opacity: 0; transform: translateY(14px);
  animation: rise .55s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i, 0) * 28ms);
}
.item { transition: border-color .2s, background .2s, transform .2s cubic-bezier(.2, .9, .3, 1.4); }
.item:active { transform: scale(.985); }
.item .cover { transition: transform .35s cubic-bezier(.2, .9, .3, 1.4); }
.item:hover .cover { transform: scale(1.05) rotate(-2deg); }
.tick svg { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s cubic-bezier(.2, .8, .2, 1) .05s, opacity .1s; }
.item:has(input:checked) .tick svg { stroke-dashoffset: 0; }
.item:has(input:checked) .tick { animation: pop .35s cubic-bezier(.2, .9, .3, 1.6); }
@keyframes pop { 50% { transform: scale(1.25); } }
#sel-count.bump { animation: bump .35s cubic-bezier(.2, .9, .3, 1.6); display: inline-block; }
@keyframes bump { 50% { transform: scale(1.18); color: var(--turq); } }
.switch::after { transition: inset-inline-start .35s cubic-bezier(.2, .9, .3, 1.4), background .25s; }

/* loading skeleton: a shimmer instead of a blink */
.skeleton .cover, .skeleton .bar {
  animation: none;
  background: linear-gradient(90deg, var(--dusk-3) 25%, color-mix(in srgb, var(--dusk-3) 60%, var(--ink-2)) 50%, var(--dusk-3) 75%);
  background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ── move: gradient ring, gliding bars, a flash when a row finishes ── */
.mg-a { stop-color: var(--saffron); }
.mg-b { stop-color: var(--turq); }
.meter-fg { stroke: url(#meter-grad); filter: drop-shadow(0 0 6px var(--glow-t)); }
.meter::before {
  content: ""; position: absolute; inset: 8%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, transparent, var(--glow-t), transparent 40%);
  animation: spin 2.4s linear infinite; mask: radial-gradient(closest-side, transparent 82%, #000 84%);
}
.meter.complete::before { animation: none; opacity: 0; transition: opacity .6s; }
.meter.complete { animation: land .9s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes spin { to { transform: rotate(360deg); } }
.task { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
.task-bar i { transition: width .8s cubic-bezier(.2, .8, .2, 1); background: linear-gradient(90deg, var(--saffron), var(--turq)); }
[dir="rtl"] .task-bar i { background: linear-gradient(270deg, var(--saffron), var(--turq)); }
.task[data-status="running"] .task-bar i { background-size: 200% 100%; animation: flow 1.2s linear infinite; }
@keyframes flow { to { background-position: -200% 0; } }
.task.flash { animation: flash 1.1s ease-out; }
@keyframes flash { 0% { box-shadow: inset 0 0 0 2px var(--turq); background: color-mix(in srgb, var(--turq) 16%, var(--dusk-2)); } 100% { box-shadow: inset 0 0 0 2px transparent; } }
.task.shake { animation: shake .45s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* celebration burst */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.burst span {
  position: fixed; font-size: 1.4rem; font-weight: 800; transform: translate(-50%, -50%);
  animation: fly 1.5s cubic-bezier(.15, .7, .3, 1) forwards; animation-delay: var(--d);
  opacity: 0;
}
.burst .b-s { color: var(--saffron); } .burst .b-t { color: var(--turq); }
@keyframes fly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 60px)) rotate(var(--r)) scale(1); }
}

/* ── steps indicator ──────────────────────────────────────────── */
.steps li { transition: background .4s, border-color .4s, color .4s; }
.steps .n { transition: background .4s, color .4s, transform .4s cubic-bezier(.2, .9, .3, 1.5); }
.steps li[aria-current="step"] .n { transform: scale(1.1); }

/* ── view transitions between steps ───────────────────────────── */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(root) { animation-name: vt-out; }
::view-transition-new(root) { animation-name: vt-in; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px) scale(.99); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(18px) scale(.99); } }

/* toast springs in */
.toast { animation: toast-in .5s cubic-bezier(.2, .9, .3, 1.4); }

/* ── reduced motion: everything still, nothing hidden ─────────── */
@media (prefers-reduced-motion: reduce) {
  .aurora span { animation: none; }
  .notes, .rp-flow { display: none; }
  [data-reveal], [data-reveal] *, .rise { opacity: 1 !important; transform: none !important; }
}

/* ── responsive route ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .path { height: 110px; width: 90px; justify-self: center; margin: -6px 0; }
  .note { font-size: 1.05rem; }
}
