/*
 * Zavori marketing site, full width.
 * Tokens follow the provided gsap.com design-system extraction, flipped to a light canvas (no dark
 * mode): warm off-white page, "just black" text, four loud accents, very large headings, radii 1/8/100, no shadows.
 * Mori (gsap.com's face) is licensed, so Familjen Grotesk stands in; two weights only (400, 600).
 */
:root {
  /* Color */
  --color-surface25: #42433d;
  --color-surface50: #7c7c6f;
  --color-surface75: #bbbaa6;
  --color-surface-white: #fffce1;
  --color-just-black: #0e100f;
  --color-lilac: #9d95ff;
  --color-shockingly-pink: #f100cb;
  --color-orangey: #ff8709;
  --color-blue: #00bae2;
  --color-shockingly-green: #0ae448;
  --color-text-purple: #d2ceff;
  --color-scroll-pink: #ffd7fd;
  --color-svg-tangerine: #ffe3c7;
  --color-lt-green: #abff84;
  --color-ui-blue: #bef3fe;
  /* Darker cuts of the accents for text on the light canvas (WCAG AA on --bg and --card). */
  --ink-green: #0a7a32;
  --ink-pink: #b0008f;
  --ink-orange: #a84f00;
  --ink-blue: #00708a;
  --ink-lilac: #5246d6;

  /* Light only: the page never switches to a dark scheme. */
  color-scheme: light;
  --bg: #fbfaf5;
  --text: var(--color-just-black);
  --text-2: #55564e;
  --line: #dedccd;
  --line-strong: #b4b2a2;
  --card: #f0eee2;
  --field: #ffffff;

  /* Type */
  --font: "Familjen Grotesk", "Mori", sans-serif;
  --text-xs: 14px;
  --text-sm: 16px;
  --text-base: 18px;
  --text-lg: 21px;
  --text-xl: 46px;
  --text-2xl: 48px;
  --text-3xl: 104px;
  --text-4xl: 120px;

  /* Spacing */
  --space-1: 6px;
  --space-2: 8px;
  --space-5: 12px;
  --space-6: 14px;
  --space-8: 16px;
  --space-10: 20px;
  --space-11: 24px;
  --space-13: 32px;
  --space-14: 46px;
  --space-16: 63px;
  --space-17: 70px;
  --space-18: 93px;
  --space-20: 122px;

  /* Shape */
  --radius-md: 8px;
  --radius-lg: 100px;

  /* Motion */
  --ease: cubic-bezier(0.645, 0.045, 0.355, 1);

  --gutter: clamp(var(--space-10), 4vw, var(--space-16));
  --measure: 62ch;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

[hidden] {
  display: none !important;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

::selection {
  background: var(--color-lilac);
  color: var(--color-just-black);
}

:focus-visible {
  outline: 2px solid var(--color-lilac);
  outline-offset: 3px;
  border-radius: var(--radius-md);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 20;
  padding: var(--space-2) var(--space-8);
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius-lg);
  text-decoration: none;
}

.skip:focus {
  top: var(--space-8);
}

/* Full width: content runs edge to edge with a fluid gutter; only prose keeps a measure. */
.wrap {
  width: 100%;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-11);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font: 600 var(--text-sm) / 1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.4;
}

.btn-primary {
  background: var(--color-shockingly-green);
  color: var(--color-just-black);
}

.btn-primary:hover {
  background: var(--color-lt-green);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--text);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--text);
}

.btn-light {
  background: var(--text);
  color: var(--bg);
}

.btn-light:hover {
  background: var(--color-surface25);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease-in;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-13);
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
}

.nav-links-wrap {
  margin-left: auto;
}

.nav-links {
  display: flex;
  gap: var(--space-11);
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  font-size: var(--text-sm);
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.nav-links a:hover,
.nav-links a[aria-current="true"] {
  color: var(--text);
}

.menu-button {
  display: none;
  margin-left: auto;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.menu-button:hover {
  border-color: var(--text);
}

.mobile-menu {
  position: fixed;
  inset: 72px 0 0;
  z-index: 9;
  padding: var(--space-13) var(--gutter);
  background: var(--bg);
  overflow-y: auto;
}

.mobile-menu ul {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-menu a:not(.btn) {
  display: block;
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.mobile-menu .btn {
  margin-top: var(--space-13);
  width: 100%;
}

/* ---------- Type ---------- */

.display {
  font-size: clamp(var(--text-2xl), 8.6vw, var(--text-4xl));
  line-height: 0.98;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.section-title {
  font-size: clamp(var(--text-xl), 7vw, var(--text-3xl));
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
  max-width: 14ch;
}

.lede {
  font-size: var(--text-lg);
  line-height: 1.45;
  color: var(--text-2);
  max-width: var(--measure);
}

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

.hero {
  padding-top: var(--space-16);
  padding-bottom: var(--space-20);
}

.hero .display {
  max-width: 14ch;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-16);
  align-items: center;
}

.hero-lede {
  margin-top: var(--space-13);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin-top: var(--space-13);
}

.availability {
  margin-top: var(--space-11);
  font-size: var(--text-xs);
  color: var(--text-2);
}

/* ---------- Device: an iPhone-like phone on its lock screen ---------- */
/*
 * Deliberately outside the site's radius tokens: a phone only reads as a phone with its real
 * corner radii (about 55px outside, 44px screen) and its own system type.
 */

.device-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.device {
  --device-w: 320px;
  position: relative;
  width: var(--device-w);
  aspect-ratio: 9 / 19.5;
  padding: 11px;
  border-radius: 56px;
  background: #1b1c1a;
  box-shadow:
    inset 0 0 0 1.5px #5b5c55,
    inset 0 0 0 4px #2a2b28,
    0 40px 80px -20px rgba(0, 0, 0, 0.7);
  flex: none;
}

/* Side buttons: action + volume on the left, side button on the right. */
.device::before,
.device::after {
  content: "";
  position: absolute;
  width: 4px;
  border-radius: 2px;
  background: #3a3b37;
}

.device::before {
  left: -3px;
  top: 118px;
  height: 120px;
  box-shadow: 0 -40px 0 -8px #3a3b37;
  background:
    linear-gradient(#3a3b37 0 0) 0 0 / 100% 52px no-repeat,
    linear-gradient(#3a3b37 0 0) 0 68px / 100% 52px no-repeat;
  background-color: transparent;
}

.device::after {
  right: -3px;
  top: 170px;
  height: 84px;
}

.screen {
  position: relative;
  height: 100%;
  border-radius: 45px;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  /* Wallpaper: the brand violet, pink and blue as soft light on near-black. */
  background:
    radial-gradient(120% 70% at 85% 105%, rgba(157, 149, 255, 0.85), transparent 60%),
    radial-gradient(90% 60% at 0% 80%, rgba(241, 0, 203, 0.55), transparent 65%),
    radial-gradient(80% 50% at 100% 20%, rgba(0, 186, 226, 0.45), transparent 60%),
    #120f1e;
}

.screen-night {
  background:
    radial-gradient(120% 70% at 85% 105%, rgba(157, 149, 255, 0.45), transparent 60%),
    radial-gradient(90% 60% at 0% 80%, rgba(241, 0, 203, 0.25), transparent 65%),
    #0a0912;
}

.island {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 104px;
  height: 31px;
  margin-left: -52px;
  border-radius: 20px;
  background: #000;
  z-index: 3;
}

.status {
  position: absolute;
  top: 17px;
  left: 30px;
  right: 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  z-index: 2;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lock-icon {
  display: grid;
  place-items: center;
  margin-top: 56px;
}

.lock-date {
  margin-top: 6px;
  text-align: center;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(255, 255, 255, 0.86);
}

.lock-time {
  margin-top: -2px;
  text-align: center;
  font-size: 84px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
}

.stack {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 236px;
  bottom: 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

/* iOS notification: frosted, app icon on the left, title + relative time, body. */
.notice {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 13px 12px 11px;
  border-radius: 22px;
  background: rgba(245, 245, 247, 0.62);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  color: #000;
}

.notice-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #fff;
  padding: 3px;
}

.notice-main {
  min-width: 0;
}

.notice-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.notice-title {
  font-size: 15px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice-top time {
  flex: none;
  font-size: 13px;
  line-height: 20px;
  color: rgba(60, 60, 67, 0.72);
}

.notice-body {
  font-size: 15px;
  line-height: 20px;
  letter-spacing: -0.01em;
  white-space: pre-line;
}

.notice-earlier {
  opacity: 0.92;
}

.notice-earlier .notice-body {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Long-press: the notification grows and its actions appear as a separate menu below. */
.expanded {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.actions {
  border-radius: 14px;
  overflow: hidden;
  background: rgba(245, 245, 247, 0.72);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
}

.action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: #000;
  font: 400 16px / 1.2 -apple-system, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
}

.action + .action {
  box-shadow: inset 0 0.5px 0 rgba(60, 60, 67, 0.36);
}

button.action:hover:not([disabled]) {
  background: rgba(0, 0, 0, 0.06);
}

button.action:focus-visible {
  outline: 2px solid #0a84ff;
  outline-offset: -2px;
  border-radius: 0;
}

.action[disabled] {
  cursor: default;
}

.action .mark {
  font-weight: 600;
}

.action.is-correct .mark {
  color: #1f9d48;
}

.action.is-wrong .mark {
  color: #d9640a;
}

span.action {
  cursor: default;
}

/* Lock-screen chrome at the bottom. */
.quick {
  position: absolute;
  left: 46px;
  right: 46px;
  bottom: 30px;
  display: flex;
  justify-content: space-between;
}

.quick span {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(30, 30, 34, 0.42);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.home-indicator {
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 134px;
  height: 5px;
  margin-left: -67px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.86);
}

.quiet-hours {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 110px;
  text-align: center;
  font-size: 15px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.78);
}

.quiet-hours strong {
  display: block;
  font-size: 17px;
  color: #fff;
}

/* Demo controls live outside the phone, so the phone shows only what a phone shows. */
.demo-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-11);
  min-height: 48px;
}

.demo-hint {
  text-align: center;
  font-size: var(--text-xs);
  color: var(--text-2);
}

/* Small phones: scale the whole device instead of reflowing its insides. */
@media (max-width: 380px) {
  .device {
    zoom: 0.9;
  }
}

/* ---------- Sections ---------- */

.section {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  border-top: 1px solid var(--line);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: var(--space-14);
  align-items: end;
}

.section-head .lede {
  padding-bottom: var(--space-2);
}

/* Every section has one accent; it marks the interactive and illustrated parts of that section. */
[data-accent="green"] { --accent: var(--color-shockingly-green); --accent-soft: var(--color-lt-green); --accent-ink: var(--ink-green); }
[data-accent="pink"] { --accent: var(--color-shockingly-pink); --accent-soft: var(--color-scroll-pink); --accent-ink: var(--ink-pink); }
[data-accent="orange"] { --accent: var(--color-orangey); --accent-soft: var(--color-svg-tangerine); --accent-ink: var(--ink-orange); }
[data-accent="blue"] { --accent: var(--color-blue); --accent-soft: var(--color-ui-blue); --accent-ink: var(--ink-blue); }
[data-accent="lilac"] { --accent: var(--color-lilac); --accent-soft: var(--color-text-purple); --accent-ink: var(--ink-lilac); }

/* Day story */
.day-story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-18);
  margin-top: var(--space-18);
}

.day-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-step {
  min-height: 70vh;
  padding: var(--space-13) 0;
  border-top: 1px solid var(--line);
}

.day-step:last-child {
  min-height: 60vh;
}

.day-step time {
  display: inline-block;
  padding: 2px var(--space-5);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  font-size: var(--text-xs);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.day-step.is-active time {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--color-just-black);
}

.day-step h3 {
  margin-top: var(--space-8);
  font-size: var(--text-xl);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.025em;
  max-width: 16ch;
}

.day-step p {
  margin-top: var(--space-8);
  max-width: var(--measure);
  color: var(--text-2);
}

.day-step em {
  font-style: normal;
  font-weight: 600;
  color: var(--text);
}

.day-note {
  padding-left: var(--space-8);
  border-left: 2px solid var(--accent);
  font-size: var(--text-sm);
}

.day-phone-wrap {
  position: relative;
}

.day-phone {
  position: sticky;
  top: 96px;
  margin: 0 auto;
}

.day-screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
}

.day-screen.is-active {
  opacity: 1;
  visibility: visible;
}

/* ---------- Tools (working simulators) ---------- */

.tool {
  margin-top: var(--space-18);
  padding: var(--space-14);
  border-radius: var(--radius-md);
  background: var(--card);
}

.tool-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-8);
  align-items: baseline;
}

.tool-head h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.tool-head p {
  font-size: var(--text-sm);
  color: var(--text-2);
}

/* Spaced repetition simulator */
.boxes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-11) var(--space-2);
  margin: var(--space-14) 0 0;
  padding: 0;
  list-style: none;
}

.box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 132px;
  padding: var(--space-8);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  transition: border-color 0.3s var(--ease), background-color 0.3s var(--ease);
}

.box-name {
  font-size: var(--text-xs);
  color: var(--text-2);
}

.box strong {
  font-size: clamp(var(--text-lg), 2.6vw, var(--text-2xl));
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.box-note {
  margin-top: auto;
  font-size: 12px;
  color: var(--text-2);
}

.box-learned {
  border-color: color-mix(in srgb, var(--color-shockingly-green) 55%, var(--card));
}

.box.is-current {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
}

/* The card sits on the edge of the box it is in; Flip animates it between boxes. */
.box {
  position: relative;
}

.token {
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  width: max-content;
  margin: 0 auto;
  display: grid;
  place-items: center;
  height: 40px;
  padding: 0 var(--space-8);
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--color-just-black);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  z-index: 1;
}

.token.is-wrong {
  background: var(--color-orangey);
}

.sim-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-13);
}

.btn-knew {
  background: var(--color-shockingly-green);
  color: var(--color-just-black);
}

.btn-knew:hover {
  background: var(--color-lt-green);
}

.btn-missed {
  background: var(--color-orangey);
  color: var(--color-just-black);
}

.btn-missed:hover {
  background: var(--color-svg-tangerine);
}

.sim-status {
  margin-top: var(--space-11);
  font-size: var(--text-lg);
  line-height: 1.4;
}

.sim-log {
  display: grid;
  gap: var(--space-1);
  margin: var(--space-11) 0 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--text-2);
  max-height: 168px;
  overflow-y: auto;
}

.sim-log li {
  display: flex;
  gap: var(--space-5);
}

.sim-log time {
  flex: none;
  min-width: 96px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-13);
  margin-top: var(--space-17);
}

.rules > div,
.privacy > div {
  padding-top: var(--space-10);
  border-top: 2px solid var(--accent, var(--text));
}

.rules h3,
.privacy h3,
.platform h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.rules p,
.privacy p,
.platform p,
.platform li {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-2);
}

/* Platforms */
.platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-18);
}

.platform {
  padding: var(--space-13);
  border-radius: var(--radius-md);
  background: var(--card);
}

.platform h3 {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.platform h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: var(--radius-lg);
  background: var(--accent);
}

.platform ol {
  margin: var(--space-2) 0 0;
  padding-left: var(--space-10);
}

.platform li::marker {
  color: var(--text);
  font-weight: 600;
}

/* Import */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-18);
  align-items: start;
  margin-top: var(--space-18);
}

.steps {
  display: grid;
  gap: var(--space-11);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--space-8);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--accent);
  color: var(--accent-ink, var(--text));
  font-weight: 600;
}

.steps strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 600;
}

.steps span {
  color: var(--text-2);
  font-size: var(--text-sm);
}

/* Students: one exam laid out as a 30-day strip, today on the left, exam day on the right. */
.exam-card {
  margin: 0;
  padding: var(--space-13);
  border-radius: var(--radius-md);
  background: var(--card);
}

.exam-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-8);
}

.exam-head strong {
  display: block;
  font-size: var(--text-lg);
  font-weight: 600;
}

.exam-head span {
  font-size: var(--text-sm);
  color: var(--text-2);
}

.exam-count {
  font-size: var(--text-sm);
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
}

.exam-count b {
  display: block;
  font-size: var(--text-2xl);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
}

.exam-days {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: 3px;
  height: 56px;
  margin: var(--space-13) 0 0;
  padding: 0;
  list-style: none;
}

.exam-days li {
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 22%, var(--field));
  transform-origin: bottom center;
}

.exam-days .is-today {
  background: var(--accent);
}

.exam-days .is-exam {
  background: var(--text);
}

.exam-legend {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-2);
}

.exam-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  margin: var(--space-11) 0 0;
}

.exam-figures div {
  padding: var(--space-8);
  border-radius: var(--radius-md);
  background: var(--field);
}

.exam-figures dt {
  font-size: var(--text-xs);
  color: var(--text-2);
}

.exam-figures dd {
  margin: 2px 0 0;
  font-size: var(--text-lg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.exam-card figcaption {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  margin-top: var(--space-11);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-2);
}

.exam-card figcaption .dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  background: var(--color-shockingly-green);
}

.fine {
  margin-top: var(--space-13);
  font-size: var(--text-xs);
  color: var(--text-2);
}

.import-stage {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-13);
  border-radius: var(--radius-md);
  background: var(--card);
}

.doc {
  position: relative;
  padding: var(--space-10);
  border-radius: var(--radius-md);
  background: var(--field);
  color: var(--color-just-black);
  border: 1px solid var(--line);
  overflow: hidden;
}

.doc-head {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.file-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.doc-head strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
}

.doc-head span:not(.file-icon) {
  font-size: var(--text-xs);
  color: var(--text-2);
}

.doc-lines {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-10);
}

.doc-lines span {
  height: 8px;
  border-radius: var(--radius-lg);
  background: var(--line);
}

.scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
}

.cards-out {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.cards-out li {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: var(--space-5);
  padding: var(--space-5) var(--space-8);
  border-radius: var(--radius-md);
  background: var(--field);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.cards-out li span:first-child {
  font-weight: 600;
  color: var(--accent-ink, var(--text-2));
}

/* Planner calculator */
.planner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: var(--space-14);
  margin-top: var(--space-13);
}

.fields {
  display: grid;
  gap: var(--space-11);
  align-content: start;
}

.field label,
.field legend {
  display: flex;
  justify-content: space-between;
  gap: var(--space-5);
  width: 100%;
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.field output {
  font-weight: 400;
  color: var(--accent-ink, var(--text-2));
  font-variant-numeric: tabular-nums;
}

fieldset.field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.hint {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--text-2);
}

input[type="range"] {
  width: 100%;
  margin-top: var(--space-5);
  cursor: pointer;
}

.time-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-5);
}

.time-pair label {
  display: grid;
  justify-content: stretch;
  gap: var(--space-1);
  font-weight: 400;
  color: var(--text-2);
}

/* Interval: one tap per choice instead of a dropdown. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.field .chip {
  position: relative;
  display: inline-flex;
  width: auto;
  font-weight: 400;
  cursor: pointer;
}

.chip input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--space-8);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  color: var(--text);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.chip:hover span {
  border-color: var(--text);
}

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--color-just-black);
  font-weight: 600;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--color-lilac);
  outline-offset: 3px;
}

/* Hours and card count: custom field look with its own chevron. */
select,
input[type="number"] {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-8);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background-color: var(--field);
  color: var(--text);
  font: 600 var(--text-lg) / 1 var(--font);
  font-variant-numeric: tabular-nums;
  transition: border-color 0.3s var(--ease);
}

select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230E100F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

select option {
  background: var(--field);
  color: var(--text);
}

input[type="number"] {
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

select:hover,
input[type="number"]:hover {
  border-color: var(--text);
}

select:focus-visible,
input[type="number"]:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent);
}

/* Days slider: a thick track that fills up to the thumb. */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 28px;
  background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--radius-lg);
  background: linear-gradient(var(--accent), var(--accent)) 0 / var(--fill, 25%) 100% no-repeat, var(--line);
}

input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: var(--radius-lg);
  background: var(--field);
}

input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: var(--radius-lg);
  background: var(--accent);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -8px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent);
}

input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 40%, transparent);
}

input[type="range"]:focus-visible {
  outline: none;
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px var(--color-lilac);
}

input[type="number"][aria-invalid="true"] {
  border-color: var(--color-shockingly-pink);
}

.field-error {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--ink-pink);
}

.switch {
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center;
  gap: var(--space-5);
  margin-top: var(--space-5);
  font-weight: 400 !important;
  cursor: pointer;
}

.switch input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  align-content: start;
}

.result {
  padding: var(--space-10);
  border-radius: var(--radius-md);
  background: var(--field);
}

.result span {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-2);
}

.result strong {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xl);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.verdict {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  padding: var(--space-10);
  border-radius: var(--radius-md);
  background: var(--field);
  font-size: var(--text-sm);
}

.dot {
  flex: none;
  border-radius: var(--radius-lg);
}

.verdict .dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
}

.verdict[data-status="ok"] .dot { background: var(--color-shockingly-green); }
.verdict[data-status="tight"] .dot { background: var(--color-orangey); }
.verdict[data-status="no"] .dot { background: var(--color-shockingly-pink); }
.verdict[data-status="calm"] .dot { background: var(--color-blue); }

.verdict strong {
  display: block;
  font-weight: 600;
}

.verdict p {
  color: var(--text-2);
}

/* Collections */
.totals {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-16);
  margin-top: var(--space-18);
}

.totals span {
  font-size: var(--text-lg);
  color: var(--text-2);
}

.totals strong {
  display: block;
  color: var(--text);
  font-size: clamp(var(--text-2xl), 9vw, var(--text-4xl));
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--space-14);
  margin: var(--space-17) 0 0;
  padding: 0;
  list-style: none;
}

.shelf li {
  display: flex;
  gap: var(--space-6);
  padding: var(--space-10) 0;
  border-bottom: 1px solid var(--line);
}

.spine {
  flex: none;
  width: 4px;
  border-radius: var(--radius-lg);
  background: var(--tone);
  transform-origin: top center;
}

.shelf h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.shelf p {
  font-size: var(--text-xs);
  color: var(--text-2);
}

/* Privacy */
.privacy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-13);
  margin-top: var(--space-18);
}

/* Pricing */
.price {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-18);
  align-items: start;
  margin-top: var(--space-18);
}

.price-card {
  padding: var(--space-14);
  border-radius: var(--radius-md);
  background: var(--color-just-black);
  color: var(--color-surface-white);
}

.price-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.price-amount {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.price-amount strong {
  font-size: var(--text-3xl);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.price-amount span {
  color: var(--text-2);
}

.price-trial {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
}

.price-list {
  display: grid;
  gap: var(--space-5);
  margin: var(--space-13) 0 0;
  padding: var(--space-11) 0 0;
  border-top: 1px solid var(--color-surface25);
  list-style: none;
  font-size: var(--text-sm);
}

.price-list li {
  display: flex;
  gap: var(--space-5);
}

.price-list svg {
  flex: none;
  margin-top: 4px;
}

.price-side p {
  max-width: 48ch;
  color: var(--text-2);
}

.price-side p + p {
  margin-top: var(--space-11);
}

.price-side strong {
  display: block;
  color: var(--text);
  font-weight: 600;
}

/* Plans */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-18);
}

.plan {
  display: flex;
  flex-direction: column;
  padding: var(--space-13);
  border-radius: var(--radius-md);
  background: var(--card);
}

.plan-featured {
  background: var(--color-just-black);
  color: var(--color-surface-white);
}

.plan h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.plan-for {
  margin-top: var(--space-1);
  min-height: 3em;
  font-size: var(--text-sm);
  color: var(--text-2);
}

.plan-featured .plan-for,
.plan-featured .price-amount span,
.price-card .price-amount span {
  color: var(--color-surface75);
}

.plan .price-amount strong {
  font-size: clamp(var(--text-xl), 5vw, 72px);
}

.plan .price-list {
  border-top-color: var(--line-strong);
}

.plan-featured .price-list {
  border-top-color: var(--color-surface25);
}

.plan .price-list b {
  font-weight: 600;
}

.plan:not(.plan-featured) .price-list svg {
  color: var(--ink-green);
}

.price-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-11) var(--space-14);
  margin-top: var(--space-16);
}

.price-notes p {
  color: var(--text-2);
  font-size: var(--text-sm);
}

.price-notes strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
  font-size: var(--text-base);
  font-weight: 600;
}

.price-notes a,
.inline-link,
.legal a {
  color: var(--ink-lilac);
}

/* FAQ */
.faq {
  margin-top: var(--space-18);
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-10);
  padding: var(--space-11) 0;
  font-size: var(--text-lg);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: color 0.3s var(--ease);
}

.faq summary:hover {
  color: var(--ink-lilac);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary svg {
  flex: none;
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary svg {
  transform: rotate(45deg);
}

.faq details p {
  padding: 0 0 var(--space-11);
  max-width: var(--measure);
  color: var(--text-2);
}

/* Closing */
.closing {
  padding-top: var(--space-20);
  padding-bottom: var(--space-20);
  border-top: 1px solid var(--line);
}

.closing img {
  width: 72px;
  height: 72px;
}

.closing .display {
  margin-top: var(--space-13);
  max-width: 16ch;
}

.closing .lede {
  margin-top: var(--space-11);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin: var(--space-13) 0 0;
  padding: 0;
  list-style: none;
}

.stores li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 48px;
  padding: 0 var(--space-11);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
}

.site-footer {
  padding: var(--space-13) 0 var(--space-14);
  border-top: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--text-2);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-8);
}

.site-footer nav {
  display: flex;
  gap: var(--space-11);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

/* SplitText line masks keep descenders intact. */
.line-mask {
  padding: 0.14em 0 0.1em;
  margin: -0.14em 0 -0.1em;
}

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

.legal {
  padding-top: var(--space-17);
  padding-bottom: var(--space-20);
}

.legal-head .section-title {
  max-width: 18ch;
  font-size: clamp(var(--text-xl), 6vw, var(--text-3xl));
}

.legal-head .lede {
  margin-top: var(--space-11);
}

.legal-meta {
  margin-top: var(--space-8);
  font-size: var(--text-xs);
  color: var(--text-2);
}

.legal-grid {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr);
  gap: var(--space-18);
  margin-top: var(--space-18);
  padding-top: var(--space-13);
  border-top: 1px solid var(--line);
}

.legal-aside {
  position: sticky;
  top: 104px;
  align-self: start;
}

.legal-aside-title {
  font-size: var(--text-xs);
  color: var(--text-2);
}

.legal-aside-title + .legal-toc {
  margin-top: var(--space-2);
}

.legal-toc + .legal-aside-title {
  margin-top: var(--space-13);
}

.legal-toc {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
}

.legal .legal-toc a {
  color: var(--text);
  text-decoration: none;
}

.legal .legal-toc a:hover,
.legal .legal-toc a[aria-current="page"] {
  color: var(--ink-lilac);
}

.legal-body {
  max-width: 78ch;
}

.legal-section {
  scroll-margin-top: 96px;
}

.legal-section + .legal-section {
  margin-top: var(--space-14);
}

.legal-section h2 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.legal-section p,
.legal-section li {
  color: var(--text-2);
  font-size: var(--text-base);
  line-height: 1.6;
}

.legal-section p {
  margin-top: var(--space-5);
}

.legal-section ul {
  display: grid;
  gap: var(--space-2);
  margin: var(--space-5) 0 0;
  padding-left: var(--space-11);
}

.table-wrap {
  margin-top: var(--space-8);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.legal th,
.legal td {
  padding: var(--space-5) var(--space-8);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal th {
  font-weight: 600;
  background: var(--card);
}

.legal td {
  color: var(--text-2);
}

.legal tr:last-child td {
  border-bottom: 0;
}

/* A value the owner still has to fill in before publishing. */
mark.fill {
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--color-orangey) 30%, transparent);
  color: var(--ink-orange);
}

.legal-back,
.nav > .btn.legal-back {
  display: inline-flex;
  margin-left: auto;
}

.legal-links {
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-13);
  }

  .legal-aside {
    position: static;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .nav-links,
  .nav > .btn {
    display: none;
  }

  .menu-button {
    display: grid;
    place-items: center;
  }

  .hero-grid,
  .section-head,
  .split-layout,
  .planner,
  .price {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-13);
  }

  .hero-grid .device-wrap {
    align-items: center;
  }

  .day-story {
    grid-template-columns: minmax(0, 1fr);
  }

  .day-phone-wrap {
    display: none;
  }

  .day-step,
  .day-step:last-child {
    min-height: 0;
  }

  .boxes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: var(--space-13);
  }


  .rules,
  .platforms,
  .privacy,
  .plans,
  .price-notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .shelf {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .exam-card {
    padding: var(--space-10);
  }

  .exam-figures div {
    padding: var(--space-5) var(--space-6);
  }

  .exam-figures dd {
    font-size: var(--text-base);
    white-space: nowrap;
  }

  .hero {
    padding-top: var(--space-14);
    padding-bottom: var(--space-17);
  }

  .section,
  .closing {
    padding-top: var(--space-17);
    padding-bottom: var(--space-17);
  }

  .tool,
  .price-card {
    padding: var(--space-11) var(--space-8);
  }

  .boxes,
  .results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shelf {
    grid-template-columns: minmax(0, 1fr);
  }


  .price-amount strong {
    font-size: var(--text-2xl);
  }

  .result strong {
    font-size: var(--text-lg);
  }

  .day-step h3 {
    font-size: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
