/* PerformToUnlock — Calm Sage */

:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --surface-2: #EFEBE2;
  --primary: #3F7D5C;
  --primary-ink: #FFFFFF;
  --primary-soft: #E3EEE7;
  /* Text colours: at least 4.5:1 on every background they sit on (the fills above are too light for small text) */
  --primary-text: #35704F;
  --ink: #1F2A24;
  --muted: #616862;
  --line: #E4E0D6;
  --coral: #E8835A;
  --coral-soft: #FBE7DE;
  --coral-text: #9E4622;
  --sun: #FFB400;
  --sun-soft: #FFF1CC;
  --teal: #0E8C7A;
  --teal-soft: #D6EFEB;
  --teal-text: #0A6B5D;
  --frame: #1F2A24;
  --shadow: 0 1px 2px rgba(31, 42, 36, .06), 0 12px 32px rgba(31, 42, 36, .08);
  --radius: 20px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-kid: "Nunito", "Plus Jakarta Sans", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614;
    --surface: #1B201D;
    --surface-2: #222925;
    --primary: #7FBF9A;
    --primary-ink: #0F1A14;
    --primary-soft: #23342A;
    --primary-text: #7FBF9A;
    --ink: #E8ECE9;
    --muted: #9AA39D;
    --line: #2C342F;
    --coral: #F0956E;
    --coral-soft: #3A2820;
    --coral-text: #F0956E;
    --sun: #FFC233;
    --sun-soft: #3A3018;
    --teal: #3FB8A5;
    --teal-soft: #173430;
    --teal-text: #3FB8A5;
    --frame: #0A0D0B;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121614;
  --surface: #1B201D;
  --surface-2: #222925;
  --primary: #7FBF9A;
  --primary-ink: #0F1A14;
  --primary-soft: #23342A;
  --primary-text: #7FBF9A;
  --ink: #E8ECE9;
  --muted: #9AA39D;
  --line: #2C342F;
  --coral: #F0956E;
  --coral-soft: #3A2820;
  --coral-text: #F0956E;
  --sun: #FFC233;
  --sun-soft: #3A3018;
  --teal: #3FB8A5;
  --teal-soft: #173430;
  --teal-text: #3FB8A5;
  --frame: #0A0D0B;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--primary-text); }

h1, h2, h3 {
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.eyebrow {
  margin: 0 0 .75rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary-text);
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.5em;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid var(--primary);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--primary-text); }
.btn-small { padding: .5em 1.1em; font-size: .9rem; }
.btn-light { background: #FFFFFF; border-color: #FFFFFF; color: #2D5E44; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-links a:hover { color: var(--ink); }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* Sections */
.section { padding: 96px 0; }
.section-head { margin-bottom: 48px; }
.section-head .lede { margin-bottom: 0; }

/* Hero */
.hero { padding: 72px 0 96px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 28px; }
.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .92rem;
  color: var(--muted);
}
.hero-points li::before { content: "✓"; color: var(--primary-text); font-weight: 800; margin-right: 6px; }
.hero-visual { position: relative; min-height: 520px; display: flex; justify-content: center; align-items: center; }
.hero-visual .phone-front { position: relative; z-index: 2; transform: translateX(-36px) rotate(-3deg); }
.hero-visual .phone-back { position: absolute; z-index: 1; transform: translateX(96px) translateY(24px) rotate(6deg); opacity: .96; }
.sticker {
  position: absolute;
  z-index: 3;
  font-family: var(--font-kid);
  font-weight: 900;
  font-size: 1.1rem;
  padding: .5em 1em;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.sticker-sun { top: 40px; right: 6%; background: var(--sun); color: #3A2A00; transform: rotate(8deg); }

/* Phone frame */
.phone {
  --w: 260px;
  width: var(--w);
  aspect-ratio: 9 / 19.5;
  padding: 10px;
  border-radius: 40px;
  background: var(--frame);
  box-shadow: var(--shadow), 0 30px 60px -20px rgba(31, 42, 36, .35);
  flex-shrink: 0;
  position: relative;
}
.phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #000;
  z-index: 2;
}
.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 31px;
  overflow: hidden;
  /* CSS placeholder shown behind (or instead of) the screenshot */
  background:
    linear-gradient(var(--primary-soft), var(--primary-soft)) 16px 56px / calc(100% - 32px) 96px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 16px 168px / calc(60% - 16px) 14px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 16px 192px / calc(100% - 32px) 64px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 16px 268px / calc(100% - 32px) 64px no-repeat,
    linear-gradient(var(--surface-2), var(--surface-2)) 16px 344px / calc(100% - 32px) 64px no-repeat,
    var(--surface);
}
.screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.screen.is-empty img { display: none; }
.screen.is-empty::after {
  content: attr(data-label);
  position: absolute;
  left: 0; right: 0; bottom: 28px;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
}

.phone-plain { aspect-ratio: auto; }
.phone-plain::before { display: none; }
.phone-plain .screen { height: auto; aspect-ratio: 616 / 1200; }

/* Reality */
.reality { background: var(--surface); border-block: 1px solid var(--line); }
.reality p { font-size: 1.1rem; }
.quote-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.bubble {
  font-family: var(--font-kid);
  font-weight: 800;
  padding: .6em 1.1em;
  border-radius: 18px 18px 18px 4px;
  background: var(--coral-soft);
  color: var(--ink);
}
.bubble-alt { border-radius: 18px 18px 4px 18px; background: var(--surface-2); }

/* Cards */
.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.icon svg, .pi svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-move { background: var(--coral-soft); color: var(--coral); }
.icon-learn { background: var(--sun-soft); color: #B07C00; }
.icon-think { background: var(--teal-soft); color: var(--teal); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-learn { color: var(--sun); } }
:root[data-theme="dark"] .icon-learn { color: var(--sun); }

/* Steps */
.how { background: var(--surface); border-block: 1px solid var(--line); }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  counter-reset: step;
}
.step { position: relative; }
.step p { color: var(--muted); margin: 0; }
.step-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-ink);
  font-weight: 800;
  margin-bottom: 18px;
}
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 22px;
  left: 60px;
  right: -16px;
  border-top: 2px dashed var(--line);
}

/* Challenges */
.challenge {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 64px;
  align-items: center;
  padding: 40px 0;
}
.challenge + .challenge { border-top: 1px solid var(--line); }
.challenge.reverse { grid-template-columns: auto 1fr; }
.challenge.reverse .challenge-copy { order: 2; }
.challenge-copy { max-width: 460px; }
.challenge-copy h3 { font-size: 1.6rem; margin-top: 14px; }
.challenge-copy p { color: var(--muted); font-size: 1.05rem; }
.challenge .phone { --w: 230px; }

.tag {
  display: inline-block;
  font-family: var(--font-kid);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .02em;
  padding: .3em .9em;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}
.tag-sun { background: var(--sun-soft); color: #8A6100; }
.tag-teal { background: var(--teal-soft); color: var(--teal-text); }
.tag-coral { background: var(--coral-soft); color: var(--coral-text); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-sun { color: var(--sun); } }
:root[data-theme="dark"] .tag-sun { color: var(--sun); }

.more-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.mini-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.mini-card h3 { margin-top: 14px; }
.mini-card p { color: var(--muted); margin: 0; }
.mini-card.soon { background: transparent; border-style: dashed; }

/* Coming soon */
.next-up { margin-top: 56px; }
.next-head { margin-bottom: 20px; }
.next-head h3 { font-size: 1.6rem; margin-top: 14px; }
.next-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.next-card {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.next-card p { color: var(--muted); }
.next-card .next-extra { margin: 0; color: var(--ink); }
.next-card p:last-child { margin-bottom: 0; }

/* 10,000 hours */
.mastery-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: center; }
.mastery .lede { margin-bottom: 0; }
.hours-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 44px 28px 32px;
}
.hours-num {
  font-family: var(--font-kid);
  font-weight: 900;
  font-size: clamp(3.6rem, 9vw, 5.6rem);
  line-height: 1;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.hours-label { margin-top: 6px; font-weight: 700; color: var(--muted); }
.hours-bar {
  width: 100%;
  height: 10px;
  margin: 24px 0 10px;
  border-radius: 999px;
  background: var(--surface-2);
  overflow: hidden;
}
.hours-bar span { display: block; width: 6%; height: 100%; border-radius: 999px; background: var(--sun); }
.hours-left { font-size: .9rem; color: var(--muted); }
.hours-sticker { top: -14px; right: 18px; }

/* Parents / kids */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.side { border-radius: 28px; padding: 40px; }
.side h3 { font-size: 1.5rem; margin-bottom: 20px; }
.side-parent { background: var(--primary-soft); }
.side-kid { background: var(--sun-soft); }
.side-kid h3 { font-family: var(--font-kid); font-weight: 900; font-size: 1.65rem; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.checks li { position: relative; padding-left: 36px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.side-kid .checks li::before { background-color: var(--teal); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .checks li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121614' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] .checks li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121614' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E");
}

/* Insights */
.insights-grid { display: grid; grid-template-columns: auto 1fr; gap: 72px; align-items: center; }
.insights-grid > div:last-child > p { color: var(--muted); font-size: 1.05rem; }
.insights-grid > div:last-child > .more-link { margin: 24px 0 0; color: var(--ink); font-weight: 600; }
.privacy { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 18px; }
.privacy li { display: flex; gap: 16px; align-items: flex-start; }
.pi {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.pi svg { width: 22px; height: 22px; }

/* FAQ */
.faq { background: var(--surface); border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary {
  cursor: pointer;
  list-style: none;
  padding: 22px 40px 22px 0;
  font-weight: 700;
  font-size: 1.08rem;
  position: relative;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--primary-text);
  transition: transform .2s ease;
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--muted); padding-right: 40px; }

/* CTA */
.cta { padding-top: 96px; }
.cta-box {
  background: #3F7D5C;
  color: #FFFFFF;
  border-radius: 32px;
  padding: 64px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before, .cta-box::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.cta-box::before { width: 220px; height: 220px; background: rgba(255, 180, 0, .25); top: -80px; right: -60px; }
.cta-box::after { width: 160px; height: 160px; background: rgba(232, 131, 90, .25); bottom: -70px; left: -40px; }
.cta-box h2 { position: relative; }
.cta-box p { position: relative; max-width: 34em; margin: 0 auto 28px; opacity: .9; font-size: 1.1rem; }
.cta-box .btn { position: relative; }

/* "Get early access": an email field and a button on one row (stacked on phones), the consent tick under it */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.interest-form { position: relative; max-width: 30em; margin: 0 auto; text-align: left; }
.interest-row { display: flex; gap: 10px; flex-wrap: wrap; }
.interest-row input[type="email"] {
  flex: 1 1 14em; min-width: 0; min-height: 48px; padding: .6em 1em;
  border: 2px solid #FFFFFF; border-radius: 999px; font: inherit; color: #1C2B23; background: #FFFFFF;
}
.interest-row input[type="email"]:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.interest-row .btn { flex: 0 0 auto; min-height: 48px; font-family: inherit; }
.interest-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: .95rem; line-height: 1.45; }
.interest-consent input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 1px; accent-color: #FFFFFF; }
.interest-consent a { color: #FFFFFF; text-decoration: underline; }
.cta-box .interest-message { min-height: 1.4em; margin: 10px 0 0; font-weight: 600; color: #FFF3D6; }
.cta-box .interest-thanks { position: relative; max-width: 30em; margin: 0 auto; font-size: 1.15rem; font-weight: 600; }
.interest-thanks:focus { outline: none; }
@media (max-width: 520px) { .interest-row .btn { flex-basis: 100%; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta-box { background: #2D5E44; } }
:root[data-theme="dark"] .cta-box { background: #2D5E44; }

/* Footer */
.site-footer { padding: 48px 0 56px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 32px; }
.footer-inner p { margin: 0; font-size: .92rem; }
.footer-inner .muted { margin-left: auto; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { font-size: .92rem; font-weight: 600; }

/* Privacy policy */
.policy { padding: 56px 0 72px; }
.policy h1 { font-size: clamp(2.1rem, 4.6vw, 3.1rem); }
.policy h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 2.4em 0 .6em; scroll-margin-top: 88px; }
.policy h3 { margin: 1.6em 0 .4em; }
.policy ul { margin: 0 0 1em; padding-left: 1.3em; }
.policy li { margin-bottom: .45em; }
.policy .updated { color: var(--muted); font-size: .95rem; }
.policy-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 14px;
  margin: 32px 0;
}
.policy-summary h2 { margin-top: 0; }
.policy-toc { columns: 2; column-gap: 32px; margin: 0 0 1em; padding-left: 1.3em; font-size: .97rem; }
.policy-toc li { break-inside: avoid; }
.policy table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .97rem; }
.policy th, .policy td { text-align: left; vertical-align: top; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); }
.policy th { font-weight: 700; }
.policy thead th { color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.policy tbody th { width: 34%; }
.policy .note {
  background: var(--primary-soft);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 0 0 1.2em;
}
.policy .note p:last-child { margin: 0; }

/* Responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { min-height: 0; padding: 20px 0 30px; }
  .cards.three { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .step { padding-left: 64px; }
  .step-num { position: absolute; left: 0; top: 0; }
  .step:not(:last-child)::after { top: 52px; bottom: -22px; left: 21px; right: auto; border-top: 0; border-left: 2px dashed var(--line); }
  .challenge, .challenge.reverse { grid-template-columns: 1fr; gap: 32px; justify-items: center; text-align: center; }
  .challenge.reverse .challenge-copy { order: 0; }
  .split { grid-template-columns: 1fr; }
  .mastery-grid { grid-template-columns: 1fr; gap: 40px; }
  .next-grid { grid-template-columns: 1fr; }
  .insights-grid { grid-template-columns: 1fr; gap: 40px; justify-items: center; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav { height: 60px; gap: 12px; }
  .nav-links { display: none; }
  .nav .brand { margin-right: auto; }
  .nav .btn-small { white-space: nowrap; }
  .section { padding: 64px 0; }
  .hero { padding: 40px 0 56px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .phone { --w: 220px; border-radius: 34px; padding: 8px; }
  .screen { border-radius: 27px; }
  .hero-visual .phone-front { transform: translateX(-44px) rotate(-3deg); }
  .hero-visual .phone-back { transform: translateX(60px) translateY(20px) rotate(6deg); }
  .hero-visual .phone { --w: 190px; }
  .sticker-sun { top: 8px; right: 0; }
  .challenge .phone { --w: 210px; }
  .more-row { grid-template-columns: 1fr; }
  .side { padding: 28px 22px; }
  .cta-box { padding: 48px 22px; }
  .footer-inner .muted { margin-left: 0; }
  .policy { padding: 36px 0 48px; }
  .policy-summary { padding: 22px 20px 8px; }
  .policy-toc { columns: 1; }
  .policy tbody th { width: 40%; }
}

/* The narrowest phones: the logo alone, so the theme button and "Early access" still fit on one row */
@media (max-width: 360px) {
  .brand span { display: none; }
  /* The back phone in the hero leans past the edge of the screen */
  .hero { overflow-x: clip; }
  .hero-grid > * { min-width: 0; }
}
