/* Rackoon website. Colors are the app's "Graphite & eyeshine amber" palette (gym-app/dev/src/theme.ts). */

/* Round 114: a softer light theme (her call: too white): a warm stone page and cards, never pure white;
   muted and accent a shade darker, so text stays at 4.5:1 or more on every surface. */
:root {
  --bg: #e8e6e1;
  --card: #f4f2ed;
  --text: #16181c;
  --muted: #545a62;
  --border: #d3cfc6;
  --primary: #1f2329;
  --primary-text: #ffffff;
  --accent: #8a5800;
  --accent-soft: #f1e3c4;
  --eyeshine: #f2b33d;
  --radius: 18px;
  --gutter: 16px;
  color-scheme: light;
}

/* Dark: follows the device unless the visitor picked light. Round 105: a soft charcoal (like VS Code's Dark Modern) instead of near-black. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1f1f1f;
    --card: #282828;
    --text: #e6e6e6;
    --muted: #a6a6a6;
    --border: #3c3c3c;
    --primary: #e6e8eb;
    --primary-text: #121417;
    --accent: #f2b33d;
    --accent-soft: #3a3020;
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --bg: #1f1f1f;
  --card: #282828;
  --text: #e6e6e6;
  --muted: #a6a6a6;
  --border: #3c3c3c;
  --primary: #e6e8eb;
  --primary-text: #121417;
  --accent: #f2b33d;
  --accent-soft: #3a3020;
  color-scheme: dark;
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Round 131: phones never scroll the page sideways (body's overflow-x alone doesn't stop it on Android). */
  overflow-x: clip;
  /* Round 141: room for the scrollbar on every page, so the top bar doesn't shift sideways between a
     short page (Review my data) and a long one, or while Exercises fills its list. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  /* Round 131: clip, not hidden. With html clipping too, "hidden" made body its own scroll box, and the
     sticky top bar stopped sticking (it stuck to body, which never scrolls). */
  overflow-x: clip;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: inline-flex;
}
.wordmark {
  height: 30px;
  width: auto;
}

/* Show the wordmark that matches the theme. */
.wordmark-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .wordmark-light {
    display: none;
  }
  :root:not([data-theme='light']) .wordmark-dark {
    display: block;
  }
}
:root[data-theme='dark'] .wordmark-light {
  display: none;
}
:root[data-theme='dark'] .wordmark-dark {
  display: block;
}

.theme-toggle {
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:focus-visible {
  outline: 3px solid var(--eyeshine);
  outline-offset: 2px;
}
/* Round 136: EN / ES, the same page in the other language (scripts/build-es.py fills in the links). It stays in
   the top bar on phones, next to ☰ and the theme button. */
.lang-switch {
  display: inline-flex;
  flex: none;
  height: 44px;
  box-sizing: border-box;
  padding: 3px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}
.lang-switch a {
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.lang-switch a:hover {
  color: var(--text);
}
.lang-switch a[aria-current] {
  background: var(--accent-soft);
  color: var(--text);
}
.lang-switch a:focus-visible {
  outline: 3px solid var(--eyeshine);
  outline-offset: 1px;
}
.icon-sun {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .icon-sun {
    display: inline;
  }
  :root:not([data-theme='light']) .icon-moon {
    display: none;
  }
}
:root[data-theme='dark'] .icon-sun {
  display: inline;
}
:root[data-theme='dark'] .icon-moon {
  display: none;
}

/* Hero */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-face {
  width: min(240px, 60vw);
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tagline {
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 640px;
}
.badge {
  display: inline-block;
  margin-top: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
}

/* Sections */
.section {
  padding: 48px 0;
}
.section h2 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  margin-bottom: 24px;
}
.section.alt {
  background: var(--card);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.soon .soon-price {
  margin: 12px 0 0;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 {
  font-size: 1.15rem;
  font-weight: 800;
}
.card p {
  color: var(--muted);
  margin: 0;
}
/* Round 114: the home page's "How Rackoon adapts to you". */
#adapts .lead {
  margin: 0 0 20px;
}
.adapt-more {
  margin: 20px 0 0;
  /* Round 119: "See the simulations →" beside it, well apart; stacked on narrow phones. */
  display: flex;
  flex-wrap: wrap;
  gap: 10px 40px;
}
.card-wide {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.card-wide h2 {
  margin-bottom: 12px;
}
.card-wide p {
  color: var(--text);
}

.two-col {
  display: grid;
  gap: 24px;
}
@media (min-width: 760px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.checks li {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

/* Footer */
.foot {
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center; /* round 115: centered on every page (her call) */
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.foot p {
  margin: 0;
}
.foot-face {
  width: 48px;
}

/* "Review my data" link (header and its section). */
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-link {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.nav-link:hover {
  color: var(--accent);
}
/* Round 141: the top bar always lists every page; the one you're on is amber. */
.nav-link[aria-current='page'],
.nav-link[aria-current='page']:hover {
  color: var(--accent);
}
/* Round 120: every link with → or ← ("See how it learns →", "Next: … →") is amber. */
.nav-link.go {
  color: var(--accent);
}
.nav-link.go:hover {
  text-decoration-thickness: 2px;
}

/* Round 104: the feature tour with app screenshots. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.top-actions {
  gap: 14px;
  font-size: 0.95rem;
}
@media (max-width: 560px) {
  .wide-only {
    display: none;
  }
  .top-actions {
    gap: 10px;
    font-size: 0.88rem;
  }
  .wordmark {
    height: 24px;
  }
}

/* Screenshots: the light and dark pictures follow the site theme, like the wordmark. */
.shot-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .shot-light {
    display: none;
  }
  :root:not([data-theme='light']) .shot-dark {
    display: block;
  }
}
:root[data-theme='dark'] .shot-light {
  display: none;
}
:root[data-theme='dark'] .shot-dark {
  display: block;
}

.phones {
  display: flex;
  justify-content: center;
  gap: 16px;
  min-width: 0;
}
.phone {
  margin: 0;
  /* Round 114: on phones a touch smaller, and smaller still on short screens, so a slideshow fits under the bars. */
  width: min(68vw, clamp(220px, calc((100svh - 230px) / 2.22), 252px));
  border: 6px solid var(--primary);
  border-radius: 28px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  flex: 0 1 auto;
}
.phone img {
  width: 100%;
  height: auto;
}
.phones.two .phone {
  width: min(232px, 43vw);
}
/* Round 112: the bigger computer frames of rounds 110–111 are gone (her call); a click enlarges instead.
   Round 113: on computers they grow (never below today's 260 / 240 px), about two thirds of the way to round
   111's 360 px, only as far as the window's height allows with the top bar, the caption and the slideshow's dots;
   the sticky chip row (.jump, on the home and feature pages) takes about 50 px more. */
@media (min-width: 900px) {
  .phone,
  .slide:not(:has(.paper)) {
    width: clamp(260px, calc((100vh - 210px) / 2.22), 325px);
  }
  .phones.two .phone {
    width: clamp(240px, calc((100vh - 220px) / 2.22), 305px);
  }
  body:has(.jump) .phone,
  body:has(.jump) .slide:not(:has(.paper)) {
    width: clamp(260px, calc((100vh - 260px) / 2.22), 325px);
  }
  body:has(.jump) .phones.two .phone {
    width: clamp(240px, calc((100vh - 270px) / 2.22), 305px);
  }
}

.hero-split {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero {
    text-align: left;
  }
  .hero-split {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .hero-inner {
    align-items: flex-start;
  }
  .hero .hero-face {
    width: 180px;
  }
}

/* Round 114: the top section's three screens (her CaliFlow reference). The middle one is in focus; the side ones
   sit back, smaller and turned in. tour.js moves the is-left / is-center / is-right classes. */
.hero-carousel {
  --w: min(52vw, clamp(190px, calc((100svh - 300px) / 2.22), 260px));
  width: calc(var(--w) * 1.82);
  max-width: 100%;
  margin-inline: auto;
  outline: none;
}
.hero-carousel:focus-visible .is-center {
  outline: 3px solid var(--eyeshine);
  outline-offset: 3px;
}
.hc-stage {
  position: relative;
  touch-action: pan-y;
  user-select: none;
  height: calc((var(--w) - 12px) / 0.45 + 12px);
  perspective: 1400px;
}
.hero-carousel .phone.hc-item {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--w);
  margin-left: calc(var(--w) / -2);
  transition: transform 0.6s ease, opacity 0.6s ease, filter 0.6s ease;
  will-change: transform;
}
.hero-carousel .is-center {
  z-index: 3;
  transform: none;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}
.hero-carousel .is-left,
.hero-carousel .is-right {
  z-index: 1;
  opacity: 0.72;
  filter: saturate(0.85) blur(0.5px);
  cursor: pointer;
}
.hero-carousel .is-left {
  transform: translateX(-52%) scale(0.78) rotateY(14deg);
}
.hero-carousel .is-right {
  transform: translateX(52%) scale(0.78) rotateY(-14deg);
}
.hc-dots {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 2px;
}
@media (min-width: 900px) {
  .hero-carousel {
    --w: clamp(240px, calc((100vh - 260px) / 2.22), 290px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .hero-carousel .phone.hc-item {
    transition: none;
  }
}

/* Round 105: the feature chips stay pinned under the header; the one in view lights up (tour.js). */
.jump {
  position: sticky;
  top: 64px;
  z-index: 9;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-block: 10px;
  margin-bottom: 28px;
}
/* Round 106: two rows. Round 113: one row everywhere (her call): from 1240 px the bar is wider than the page
   column so every chip fits; narrower, the row slides sideways (as on phones since round 109). */
.jump-inner {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.jump-row {
  display: contents;
}
@media (min-width: 1240px) {
  .jump .jump-inner {
    max-width: 1240px;
    justify-content: safe center;
  }
  /* The home page's bar sits in the page column: it reaches past it, centered. */
  .jump:not(:has(.wrap)) {
    width: min(1240px, 100vw);
    margin-left: 50%;
    transform: translateX(-50%);
    padding-inline: var(--gutter);
  }
  .jump:not(:has(.wrap)) .jump-inner {
    justify-content: safe center;
  }
}
.jump a {
  flex: 0 0 auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  white-space: nowrap;
}
.jump a:hover {
  border-color: var(--accent);
}
.jump a[aria-current] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
/* Round 106: "← All features" on the feature pages, pinned with the chips. */
.jump a.back-chip {
  background: none;
  border-color: transparent;
  color: var(--accent);
  padding-inline: 4px 10px;
}
.jump a.back-chip:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Round 109: on phones all the chips are one strip you can swipe, so the bar stays one chip tall. */
@media (max-width: 600px) {
  .jump-inner {
    scrollbar-width: none;
  }
  .jump-inner::-webkit-scrollbar {
    display: none;
  }
  .jump a {
    font-size: 0.85rem;
    padding: 5px 11px;
  }
  /* "← All features" stays at the start of its strip while the chips slide under it. */
  .jump a.back-chip {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg);
    border-radius: 0;
  }
}

.tour {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.tour-row {
  display: grid;
  gap: 24px;
  align-items: center;
  scroll-margin-top: 200px;
}
@media (min-width: 820px) {
  .tour-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
  }
  .tour-row.flip .tour-text {
    order: 2;
  }
}
.tour-text {
  min-width: 0;
}
/* Round 110: on phones, "See more" comes after the pictures (title, bullets, pictures, link). */
@media (max-width: 819px) {
  .tour-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .tour-row .tour-text {
    display: contents;
  }
  .tour-row > .slides {
    margin-top: 8px;
  }
  .tour-row .more-row {
    order: 1;
    margin: 16px 0 0;
    text-align: center;
  }
}
.tour-text h3 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  font-weight: 800;
}
.tour-text > p {
  color: var(--muted);
  font-size: 1.05rem;
}
.facts {
  margin: 0 0 1em;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
}
.facts li::marker {
  color: var(--accent);
}

.grid.two {
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}
.card .card-link {
  margin-top: 12px;
}
.soon {
  text-align: center;
}
.soon .lead {
  margin: 0 auto;
}
/* Round 125: the hero's badge links to "Tell me when it's out". */
a.badge {
  text-decoration: none;
}
/* Round 135: the hero's card, with the waitlist pill inside it. */
.soon-card {
  margin-top: 12px;
  max-width: 440px;
  padding: 16px 18px 18px;
  border-radius: 20px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  display: grid;
  gap: 8px;
  /* Centered like the rest of the top section on phones; on the left from 900 px. */
  justify-items: center;
  width: 100%;
  box-sizing: border-box;
}
@media (min-width: 900px) {
  .soon-card {
    justify-items: start;
  }
}
.soon-card p {
  margin: 0;
}
.soon-card-title {
  font-weight: 800;
  font-size: 1.1rem;
}
.soon-card-perk {
  color: var(--text);
  font-size: 0.95rem;
}
.soon-card-btn {
  /* Round 136: centered in the card at every width (the text stays left from 900 px). */
  justify-self: center;
  margin-top: 4px;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 800;
  text-decoration: none;
}
.soon-card-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.soon .soon-perk {
  max-width: 560px;
  margin: 14px auto 0;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-weight: 700;
}
.notify-legend {
  font-weight: 700;
  margin-right: 4px;
}
.notify {
  width: 100%;
  min-width: 0;
  max-width: 460px;
  margin: 24px auto 20px;
  display: grid;
  gap: 10px;
  text-align: left;
}
.notify-label {
  font-weight: 800;
}
.notify-row {
  display: flex;
  gap: 8px;
}
.notify-row input {
  flex: 1;
  min-width: 0;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 10px 16px;
}
.notify-row input[aria-invalid='true'] {
  border-color: var(--accent);
}
.notify-btn {
  flex: none;
  white-space: nowrap;
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  background: var(--primary);
  color: var(--primary-text);
  cursor: pointer;
}
.notify-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.notify input:focus-visible,
.notify-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.notify-chips {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.notify-chips label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.notify .hp {
  /* Round 131: hidden without moving it far off to the side. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  opacity: 0;
  overflow: hidden;
  clip-path: inset(50%);
  pointer-events: none;
}
/* Round 131: on narrow phones (a Galaxy S21 is 360 wide) the button goes under the email box, full width. */
@media (max-width: 400px) {
  .notify-row {
    flex-wrap: wrap;
  }
  .notify-btn {
    width: 100%;
  }
}
.notify-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}
.notify-msg {
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  margin: 0;
}
/* Round 142: the beta lines. The hint under the phone choice, the thank-you with its link (same box as
   .notify-msg), and "Already on the waitlist?" for people who signed up before. */
/* Her ask: the hint matters (Android: the email must be the Play Store's Google account), so it gets
   the amber outline used for things to notice, in full text color. */
.notify-hint {
  color: var(--text);
  font-size: 0.95rem;
  margin: 0;
  padding: 8px 12px;
  border: 2px solid var(--eyeshine);
  border-radius: 12px;
}
.notify-done {
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--accent-soft);
  margin: 0;
}
.notify-beta {
  font-size: 0.95rem;
  margin: 0;
}
.beta-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.foot-links a {
  color: var(--muted);
}

/* Round 105: slideshows. A scroll-snap strip of phones (swipe, or the dots); tour.js advances it. */
.slides {
  min-width: 0;
}
.track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px calc(50% - min(130px, 35vw)) 14px;
  /* The next and last pictures fade at the edges instead of being cut off. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.track::-webkit-scrollbar {
  display: none;
}
.track:focus-visible {
  outline: 2px solid var(--eyeshine);
  outline-offset: 2px;
}
.slide {
  flex: 0 0 auto;
  width: min(68vw, clamp(220px, calc((100svh - 230px) / 2.22), 252px));
  margin: 0;
  scroll-snap-align: center;
}
/* Round 106: printed pages a little larger, so they read in the slideshow. */
.slide:has(.paper) {
  width: min(400px, 84vw);
}
.slide .phone,
.slides .phone {
  width: 100%;
}
.slide figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}
.slide.single {
  justify-self: center;
}
.paper {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
}
.paper img {
  width: 100%;
  height: auto;
}
.dots {
  display: flex;
  justify-content: center;
  gap: 2px;
}
.dot {
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dot::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--muted);
}
.dot[aria-current='true']::before {
  background: var(--accent);
  border-color: var(--accent);
}
.dot:focus-visible {
  outline: 2px solid var(--eyeshine);
  border-radius: 50%;
}
.more {
  color: var(--accent);
  font-weight: 700;
  text-underline-offset: 3px;
}

/* Round 107: the top bar's links fold into a ☰ menu on phones (menu.js). */
.top-links {
  display: flex;
  align-items: center;
  gap: inherit;
}
.menu-btn {
  display: none;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.menu-btn:focus-visible {
  outline: 3px solid var(--eyeshine);
  outline-offset: 2px;
}
@media (max-width: 700px) {
  /* Round 136: until menu.js has folded them into ☰, the links stay hidden (no flash of the wide bar on each
     page load), and the theme button keeps the ☰ button's place so nothing shifts when it appears. */
  .js .top-actions > .nav-link {
    display: none;
  }
  .js:not(.has-menu) .top-actions > .theme-toggle {
    margin-left: 56px;
  }
  .has-menu .menu-btn {
    display: inline-flex;
  }
  .has-menu .top-links {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    right: max(16px, env(safe-area-inset-right, 0px));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    min-width: 200px;
    padding: 6px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    font-size: 1rem;
  }
  .has-menu .top-links.open {
    display: flex;
  }
  .has-menu .top-links .nav-link,
  .has-menu .top-links .wide-only {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
  }
  .has-menu .top-links .nav-link:hover {
    background: var(--bg);
  }
  .top-inner {
    position: relative;
  }
}

/* Round 107: short clips in the phone frames (tour.js plays the theme's copy while it's in view). */
.phone.clip video {
  width: 100%;
  height: auto;
  aspect-ratio: 540 / 1200;
  max-width: 100%;
  background: var(--card);
}

/* Round 109: when a phone won't play clips by itself, a ▶ in the middle plays it on tap (tour.js). */
.phone.clip {
  position: relative;
}
.clip-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: color-mix(in srgb, var(--primary) 82%, transparent);
  color: var(--primary-text);
  font-size: 1.6rem;
  line-height: 64px;
  padding: 0 0 0 4px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.clip-play:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* Round 111: a link to the comparison under the feature tour. */
.tour-compare {
  margin-top: 28px;
  text-align: center;
  font-weight: 700;
}

/* Round 111: on computers, a click on a picture or clip opens it big (tour.js). Round 113: it fits the window with
   its caption, never scrolling; --cap is the caption's height (tour.js), --avail what's left for the picture. */
.zoom-hint {
  display: none;
}
@media (min-width: 900px) and (hover: hover) {
  .phone[role='button'],
  .paper[role='button'] {
    cursor: zoom-in;
  }
  .phone[role='button']:focus-visible,
  .paper[role='button']:focus-visible {
    outline: 3px solid var(--eyeshine);
    outline-offset: 3px;
  }
  .zoom-hint {
    display: block;
    margin-top: 4px;
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
  }
}
.zoom {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  --avail: calc(100vh - 48px - 10px - var(--cap, 3em));
}
.zoom::backdrop {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(4px);
}
.zoom[open] {
  display: block;
  overflow: hidden;
  overscroll-behavior: contain;
}
.zoomed {
  overflow: hidden;
}
.zoom-stage {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 96px;
  box-sizing: border-box;
}
.zoom-item {
  user-select: none;
  touch-action: pan-y;
}
/* Round 113: .zoom in front, so the page's frame widths (body:has(.jump) .phone) never squeeze it. */
.zoom .zoom-item .phone {
  width: max-content;
  max-width: none;
  cursor: grab;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.zoom-item .phone > img,
.zoom-item .phone > video {
  height: min(calc(var(--avail) - 12px), calc((100vw - 220px) / 0.45));
  width: auto;
  max-width: none;
  aspect-ratio: 540 / 1200;
}
.zoom-item .paper img {
  width: auto;
  height: auto;
  max-width: min(820px, calc(100vw - 220px));
  max-height: calc(var(--avail) - 2px);
}
.zoom-cap {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  max-width: 60ch;
}
.zoom-nav,
.zoom-close {
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.zoom-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2rem;
  line-height: 1;
  padding-bottom: 4px;
  flex: 0 0 auto;
}
.zoom-prev {
  left: 24px;
}
.zoom-next {
  right: 24px;
}
.zoom:not(.many) .zoom-nav {
  visibility: hidden;
}
.zoom-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
}
.zoom-nav:hover,
.zoom-close:hover {
  border-color: var(--accent);
}
.zoom-nav:focus-visible,
.zoom-close:focus-visible {
  outline: 3px solid var(--eyeshine);
  outline-offset: 2px;
}
