/* studyfirst.app. Colours, type, radii and spacing come from tokens.css (generated from design/tokens.json):
   blue is study, Sunshine is fun, ink on white for reading. Rounded display type, system body type. */

@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("fonts/mplus-rounded-1c-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  /* The font's own line metrics sit low; these centre capitals in buttons and tight headings */
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("fonts/mplus-rounded-1c-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("fonts/mplus-rounded-1c-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
  ascent-override: 95%;
  descent-override: 22%;
  line-gap-override: 0%;
}

:root {
  --header-h: 72px;
  --measure: 65ch;
  --shadow-float: 0 22px 44px -18px rgb(23 32 51 / 0.32), 0 2px 6px rgb(23 32 51 / 0.08);
  --shadow-card: 0 1px 2px rgb(23 32 51 / 0.06);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink-900);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--blue-600);
}

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

::selection { background: var(--sun-400); color: var(--ink-900); }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--ink-900);
  text-wrap: balance;
}
h1 {
  font-weight: 800;
  font-size: clamp(2.375rem, 1.55rem + 3.3vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h2 {
  font-weight: 800;
  font-size: clamp(1.875rem, 1.45rem + 1.7vw, 2.375rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
h3 {
  font-weight: 700;
  font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
  line-height: 1.25;
}
p, ul, ol, dl, figure { margin: 0; }

a {
  color: var(--blue-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--blue-600); }

:focus-visible {
  outline: 3px solid var(--blue-600);
  outline-offset: 3px;
  border-radius: var(--radius-chip);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-input);
  background: var(--ink-900);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus, .skip-link:hover { top: 12px; color: var(--white); }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: currentColor;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line-200);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: var(--header-h);
}
.brand { display: inline-flex; border-radius: 8px; }
.brand img { height: 34px; width: auto; }
.site-nav { margin-left: auto; }
.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  padding: 0;
}
.site-nav a {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--ink-900);
  text-decoration: none;
}
.site-nav a:hover { color: var(--blue-600); }
.site-nav a[aria-current="page"] {
  color: var(--blue-700);
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 10px;
}
/* Log in is for parents who already use StudyFirst: a plain link like the nav, not a button competing with the badge */
.site-header__login {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--ink-900);
  text-decoration: none;
}
.site-header__login:hover { color: var(--blue-600); }

.menu-button {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-input);
  background: var(--white);
  color: var(--ink-900);
  cursor: pointer;
}
.menu-button .icon { width: 24px; height: 24px; }
.menu-button .icon-close { display: none; }
.menu-button[aria-expanded="true"] .icon-open { display: none; }
.menu-button[aria-expanded="true"] .icon-close { display: block; }

.site-menu {
  border-top: 1px solid var(--line-200);
  background: var(--white);
  padding: 8px 0 24px;
  /* On a landscape phone the open menu is taller than the screen: it scrolls on its own */
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.site-menu ul { list-style: none; padding: 0; }
.site-menu li + li { border-top: 1px solid var(--line-200); }
.site-menu a {
  display: block;
  padding: 14px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--ink-900);
  text-decoration: none;
}
.site-menu a[aria-current="page"] { color: var(--blue-700); }
.site-menu .store { display: inline-flex; margin: 16px 0 8px; padding: 0; }

@media (max-width: 860px) {
  .site-header__inner { gap: 12px; }
  .site-nav, .site-header .site-header__login { display: none; }
  .menu-button { display: inline-flex; }
  .brand img { height: 30px; }
}
@media (min-width: 861px) {
  .site-menu { display: none; }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-card);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn--sm { min-height: 40px; padding: 8px 16px; }
.btn--primary { background: var(--blue-600); color: var(--white); }
.btn--primary:hover { background: var(--blue-700); color: var(--white); }
.btn--secondary { background: var(--white); color: var(--ink-900); border-color: var(--control-400); }
.btn--secondary:hover { border-color: var(--ink-900); color: var(--ink-900); }

/* The download button: Apple's "Download on the App Store" badge (assets/app-store-badge.svg, Apple's artwork as
   downloaded) linking to StudyFirst in the App Store. Apple's marketing guidelines: never recolour, animate or
   otherwise change the artwork (so no hover effect), at least 40px tall, and clear space of a quarter of its height
   (14px at 56px) around it. The focus ring follows the badge's own corners. */
.store {
  display: inline-flex;
  flex: none;
  border-radius: 9px;
}
.store img { display: block; width: auto; height: 56px; }
.store:focus-visible { border-radius: 9px; }
.store[hidden] { display: none; }

/* On phones and tablets the sticky header carries a 40px badge while no other badge is on screen and the menu is
   closed (site.js), so the download is always one tap away and only one badge is ever on screen. It switches without
   motion. What StudyFirst needs (iPhone or iPad, Family Sharing) is in the FAQ, not beside the badges. */
.store--header { margin-left: auto; }
.store--header img { height: 40px; }
.store--header:not([hidden]) + .menu-button { margin-left: 0; }
@media (min-width: 861px), (max-width: 359px) {
  .store--header { display: none; }
}

/* A badge row: the badge, and on computers a QR code beside it that takes the App Store link to the parent's iPhone */
.store-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
}
.qr { display: none; }
@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  .qr {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--slate-600);
    font-size: var(--text-xs);
    line-height: 1.4;
    text-align: left;
  }
}
.qr img {
  width: 80px;
  height: 80px;
  padding: 4px;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-chip);
  background: var(--white);
}
.qr span { max-width: 14ch; }
.get { display: grid; justify-items: center; gap: 18px; margin-top: 32px; }


.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--blue-700);
  text-decoration: none;
}
.link-arrow:hover { color: var(--blue-600); text-decoration: underline; }
.link-arrow .icon { transition: transform 0.2s var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Hero: the copy on the left; on the right the sun rises behind the phones and the parent's notification lands */

.hero { padding: clamp(36px, 5.5vw, 80px) 0 clamp(16px, 3vw, 40px); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 { max-width: 18ch; font-size: clamp(2.375rem, 1.6rem + 2.6vw, 3rem); }
.hero__lede {
  margin-top: 24px;
  max-width: 50ch;
  color: var(--slate-600);
  font-size: clamp(1.125rem, 1rem + 0.35vw, 1.25rem);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 32px;
}
.hero__trial { margin-top: 18px; color: var(--ink-900); font-weight: 600; }

.hero__art {
  position: relative;
  isolation: isolate;
  aspect-ratio: 1 / 1.04;
  border-radius: var(--radius-sheet);
  background: var(--blue-50);
  overflow: hidden;
}
.hero__sun {
  position: absolute;
  left: 50%;
  top: 3%;
  width: 72%;
  transform: translateX(-50%);
}
.hero__art .phone { position: absolute; width: 45%; }
.hero__art .phone--back { right: 7%; top: 31%; }
.hero__art .phone--front { left: 8%; top: 37%; }

.push {
  position: absolute;
  right: 4%;
  bottom: 6%;
  z-index: 2;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 12px;
  width: min(300px, 60%);
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-float);
  font-family: var(--font-body);
  line-height: 1.35;
}
.push img { grid-row: span 2; width: 38px; height: 38px; border-radius: var(--radius-chip); }
.push__app {
  display: flex;
  justify-content: space-between;
  color: var(--slate-600);
  font-size: var(--text-xs);
}
.push__title { font-weight: 700; font-size: var(--text-sm); }
.push__body { grid-column: 2; color: var(--ink-900); font-size: 0.875rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero__sun { animation: sun-rise 1.6s var(--ease-out) 0.1s both; }
  .push { animation: push-land 0.6s var(--ease-out) 1.15s both; }
  /* When the picture starts below the first screen (phones), the moment waits until it's on screen (site.js): the sun
     still below, the notification not yet arrived */
  .hero__art.is-waiting .hero__sun { animation: none; transform: translate(-50%, 42%) scale(0.9); }
  .hero__art.is-waiting .push { animation: none; opacity: 0; transform: translateY(16px); }
}
@keyframes sun-rise {
  from { transform: translate(-50%, 42%) scale(0.9); }
  to { transform: translate(-50%, 0) scale(1); }
}
@keyframes push-land {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .hero__art { aspect-ratio: 1 / 1.08; max-width: 560px; width: 100%; margin-inline: auto; }
}
@media (max-width: 520px) {
  /* Taller on phones, so the sun clears the phones and the notification clears the child's question */
  .hero__art { aspect-ratio: 1 / 1.25; }
  .hero__art .phone { width: 50%; }
  .hero__art .phone--back { right: 3%; top: 32%; }
  .hero__art .phone--front { left: 4%; top: 38%; }
  .push { right: 3%; bottom: 3%; width: 80%; }
}

/* Phone frames around real screenshots (1206 × 2622 px, the iPhone's screen corners) */

.phone {
  margin: 0;
  padding: 2.4%;
  border-radius: 15.4% / 7.2%;
  background: var(--ink-900);
  box-shadow: var(--shadow-float);
}
.phone img {
  width: 100%;
  border-radius: 13.7% / 6.3%;
  background: var(--white);
}

/* Sections */

.section { padding: 104px 0; }
.section--cloud { background: var(--cloud-50); }
.section--tint { background: var(--blue-50); }
/* Full-width colour pads its own sides, so content never meets the colour's edge */
.section--cloud, .section--tint, .band { padding-left: 20px; padding-right: 20px; }
.section--cloud > .wrap, .section--tint > .wrap, .band > .wrap { max-width: 1120px; padding-left: 0; padding-right: 0; }
@media (max-width: 900px) {
  .section { padding-top: 80px; padding-bottom: 80px; }
}
@media (max-width: 520px) {
  .section { padding-top: 56px; padding-bottom: 56px; }
}
.section__head { max-width: 760px; }
.section__head > p {
  margin-top: 16px;
  max-width: var(--measure);
  color: var(--slate-600);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
}
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center > p { margin-inline: auto; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  /* On one column the heading leads and the illustration follows */
  .split--text-first > :first-child { order: 2; }
}

/* How a day works: three steps, each shown as the screen it happens on */

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 20px clamp(28px, 4vw, 48px);
  margin-top: 56px;
  padding: 0;
  list-style: none;
}
/* Each step spans the list's three rows, so the illustrations, headings and text line up across steps */
.step { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; gap: 20px; }
.step__art {
  display: grid;
  align-items: center;
  min-height: 248px;
  padding: 24px;
  border-radius: var(--radius-sheet);
  background: var(--cloud-50);
}
.step__label { display: flex; align-items: center; gap: 12px; }
.step__num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-md);
}
.step p { color: var(--slate-600); }
@media (max-width: 900px) {
  .steps { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 48px; max-width: 520px; margin-inline: auto; }
  .step { grid-row: auto; grid-template-rows: none; }
  .step__art { min-height: 0; }
}
@media (max-width: 520px) {
  /* On phones the settings card is the least telling of the three pictures: step 1 is words only */
  .step--setup .step__art { display: none; }
}

/* Small product-UI pieces used as illustrations */

.ui {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
  font-size: var(--text-xs);
  line-height: 1.4;
}
.ui__row { display: flex; align-items: center; gap: 12px; }
.ui__row--between { justify-content: space-between; }
.ui__avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-700);
  font-family: var(--font-display);
  font-weight: 800;
}
.ui small { display: block; color: var(--slate-600); font-size: var(--text-xs); }
.ui b { font-family: var(--font-display); font-weight: 700; }
.ui__value {
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--blue-50);
  color: var(--blue-700);
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ui__state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  font-family: var(--font-display);
  font-weight: 700;
}
.ui__state .icon { width: 22px; height: 22px; }
.ui__state--locked { background: var(--blue-50); color: var(--blue-700); }
.ui__state--open { background: var(--sun-50); color: var(--ink-900); }
.ui__state--open .icon { padding: 3px; border-radius: 50%; background: var(--sun-400); color: var(--ink-900); }
.ui__apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ui__app {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 22%;
  background: var(--tile-tint);
  color: var(--tile);
}
.ui__app--games { --tile: var(--subject-math); --tile-tint: var(--subject-math-tint); }
.ui__app--video { --tile: var(--subject-reading); --tile-tint: var(--subject-reading-tint); }
.ui__app--chat { --tile: var(--subject-spelling); --tile-tint: var(--subject-spelling-tint); }
.ui__app--web { --tile: var(--subject-social-studies); --tile-tint: var(--subject-social-studies-tint); }
/* The app's own glyph, dimmed: it's there, but locked */
.ui__app .ui__glyph { width: 50%; height: 50%; opacity: 0.5; }
.ui__app .ui__lock {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
}
.ui__answers { display: grid; gap: 10px; padding: 0; list-style: none; }
.ui__answers li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 2px 10px; }
.ui__answers .icon { width: 22px; height: 22px; color: var(--grass-500); }
.ui__answers small { grid-column: 2; }

/* Subjects: ink text on a 15% tint of the subject's colour, the icon in the colour itself */

.subjects { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; }
.subject {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: var(--radius-pill);
  background: var(--subject-tint);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
}
.subject .icon { width: 20px; height: 20px; color: var(--subject); }
.subject--math { --subject: var(--subject-math); --subject-tint: var(--subject-math-tint); }
.subject--reading { --subject: var(--subject-reading); --subject-tint: var(--subject-reading-tint); }
.subject--spelling { --subject: var(--subject-spelling); --subject-tint: var(--subject-spelling-tint); }
.subject--grammar { --subject: var(--subject-grammar); --subject-tint: var(--subject-grammar-tint); }
.subject--science { --subject: var(--subject-science); --subject-tint: var(--subject-science-tint); }
.subject--social { --subject: var(--subject-social-studies); --subject-tint: var(--subject-social-studies-tint); }
.subject--geography { --subject: var(--subject-geography); --subject-tint: var(--subject-geography-tint); }
.subject--topic { --subject: var(--subject-topic); --subject-tint: var(--subject-topic-tint); }

/* Homework: a worksheet becomes a topic, the topic becomes questions */

.demo {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-sheet);
  background: var(--cloud-50);
}
.demo__label {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--slate-600);
  font-size: var(--text-xs);
  font-weight: 600;
}
.worksheet {
  position: relative;
  width: min(100%, 340px);
  padding: 18px 20px 20px;
  border-radius: var(--radius-chip);
  background: var(--white);
  box-shadow: var(--shadow-float);
}
.worksheet__title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-md); }
.worksheet__title small { display: block; color: var(--slate-600); font-family: var(--font-body); font-weight: 400; font-size: var(--text-xs); }
.worksheet ol { margin-top: 10px; padding-left: 1.4em; font-size: var(--text-sm); line-height: 32px; font-variant-numeric: tabular-nums; }
.worksheet li { border-bottom: 1px solid var(--line-200); }
.demo__step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-600);
  font-size: 0.875rem;
}
.demo__step .icon { width: 20px; height: 20px; color: var(--blue-600); }
.question {
  width: min(100%, 360px);
  padding: 18px;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-card);
  background: var(--white);
}
.question__q { font-family: var(--font-display); font-weight: 700; font-size: var(--text-md); line-height: 1.3; }
.question ul { display: grid; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.question li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: 2px solid var(--line-200);
  border-radius: var(--radius-input);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.question li.is-right { border-color: var(--grass-500); background: var(--grass-50); color: var(--grass-700); }
.question li .icon { width: 20px; height: 20px; }
.question__why { margin-top: 12px; color: var(--slate-600); font-size: 0.875rem; }

.facts { display: grid; gap: 14px; margin-top: 28px; padding: 0; list-style: none; }
.answers-phone { width: min(100%, 300px); justify-self: center; }
@media (max-width: 520px) {
  /* Pictures that make a section clearer on a wide screen but only add scrolling on a phone (Karl, 2026-11-09): the
     homework section's worksheet and the quality section's screenshot */
  .wide-only { display: none; }
}
.facts li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.facts .icon { width: 24px; height: 24px; margin-top: 2px; color: var(--blue-600); }
.facts b { font-family: var(--font-display); font-weight: 700; }

/* The lock: four plain facts, two by two */

.locklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  margin-top: 48px;
  padding: 0;
  list-style: none;
}
.locklist li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; align-items: start; }
.locklist .icon-tile {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-input);
  background: var(--white);
  color: var(--blue-600);
}
.locklist .icon-tile .icon { width: 24px; height: 24px; }
.locklist h3 { font-size: var(--text-lg); }
.locklist p { margin-top: 4px; color: var(--slate-600); }
@media (max-width: 760px) {
  .locklist { grid-template-columns: 1fr; }
}

/* Family, and under its story what we keep about a child: three lines, the privacy policy has the rest */

.family-photo {
  overflow: hidden;
  border-radius: var(--radius-sheet);
  aspect-ratio: 4 / 5;
  background: var(--cloud-50);
}
.family-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 520px) {
  .family-photo { aspect-ratio: 1 / 1; }
  .family-photo img { object-position: 50% 30%; }
}
.keep { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--line-200); }
.keep h3 { font-size: var(--text-lg); }
.keep .facts { margin-top: 16px; }
.keep__more { margin-top: 20px; }

/* Pricing */

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 880px;
  margin: 48px auto 0;
}
.plan {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--line-200);
  border-radius: var(--radius-sheet);
  background: var(--white);
}
.plan__name { font-size: var(--text-xl); }
.plan__who { color: var(--slate-600); }
.plan__price {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.375rem, 2rem + 1.2vw, 3rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.plan__price span { color: var(--slate-600); font-size: var(--text-md); font-weight: 700; letter-spacing: 0; }
/* What both plans include, said once under them */
.plans__both { max-width: 60ch; margin: 24px auto 0; text-align: center; }
.fineprint { max-width: 64ch; margin: 32px auto 0; color: var(--slate-600); font-size: var(--text-xs); }
@media (max-width: 700px) {
  /* Side by side on phones: name, who it's for and price */
  .plans { gap: 12px; margin-top: 32px; }
  .plan { gap: 4px; padding: 20px 16px; }
  .plan__name { font-size: var(--text-lg); }
  .plan__who { min-height: 2.8em; font-size: var(--text-xs); line-height: 1.4; } /* two lines, so the prices line up */
  .plan__price { margin-top: 10px; font-size: 2rem; }
  .plan__price span { display: block; margin-top: 6px; font-size: var(--text-xs); }
}
@media (max-width: 359px) {
  .plans { grid-template-columns: 1fr; }
}

/* Questions and answers */

.qa { max-width: 820px; margin: 40px auto 0; }
.qa details { border-bottom: 1px solid var(--line-200); }
.qa details:first-child { border-top: 1px solid var(--line-200); }
.qa summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .icon { width: 22px; height: 22px; color: var(--blue-600); transition: transform 0.2s var(--ease-out); }
.qa details[open] summary .icon { transform: rotate(180deg); }
.qa summary:hover { color: var(--blue-700); }
.qa__a { max-width: var(--measure); padding-bottom: 24px; color: var(--slate-600); }
.qa__a ul { padding-left: 1.2em; margin-top: 0.75em; }
.qa__a li + li { margin-top: 0.4em; }
.qa__more { margin-top: 32px; text-align: center; }

/* The closing band: Study Blue, with the sun coming up behind the last line */

.band {
  /* The sun rises from the band's bottom edge, below the text: the space under the text is the visible sun plus a gap,
     so white words never sit on the yellow (it reads at 1.5:1) at any width */
  --sun-width: min(440px, 80vw);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 120px;
  padding-bottom: calc(var(--sun-width) * 0.36 + 40px);
  background: var(--blue-600);
  color: var(--white);
  text-align: center;
}
.band h2 { color: var(--white); font-size: clamp(1.875rem, 1.5rem + 2.4vw, 3rem); }
@media (max-width: 900px) {
  .band { padding-top: 96px; }
}
@media (max-width: 520px) {
  .band { padding-top: 72px; }
}
.band p.band__sub { max-width: 46ch; margin: 16px auto 0; font-size: var(--text-md); }
.band__actions { display: grid; justify-items: center; gap: 18px; margin-top: 36px; }
.band__sun {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: -1;
  width: var(--sun-width);
  height: auto;
  /* Its centre a little below the edge: the rays and the top of the sun show */
  transform: translate(-50%, 58%);
}
.band :focus-visible { outline-color: var(--white); }
.band a:not(.store) { color: var(--white); }
.band .qr { color: var(--white); }
.band .qr img { border-color: var(--white); }

/* Footer */

.site-footer {
  padding: 56px 0 32px;
  background: var(--cloud-50);
  color: var(--slate-600);
  font-size: var(--text-xs);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
}
.site-footer__brand img { height: 30px; width: auto; }
.site-footer__brand p { margin-top: 14px; max-width: 30ch; }
.site-footer h2 {
  margin-bottom: 12px;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0;
}
.site-footer ul { display: grid; gap: 8px; padding: 0; list-style: none; }
.site-footer a { color: var(--ink-900); text-decoration: none; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--blue-700); text-decoration: underline; }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line-200);
}
@media (max-width: 860px) {
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

/* Inner pages */

.page-head { padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 4vw, 48px); }
.page-head h1 { max-width: 20ch; font-size: clamp(2.375rem, 1.6rem + 2.6vw, 3rem); }
.page-head p { max-width: var(--measure); margin-top: 18px; color: var(--slate-600); font-size: clamp(1.125rem, 1rem + 0.3vw, 1.25rem); }

.subject-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line-200);
}
.subject-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 18px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line-200);
}
.subject-list .icon-tile {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-input);
  background: var(--subject-tint);
  color: var(--subject);
}
.subject-list .icon-tile .icon { width: 26px; height: 26px; }
.subject-list h2 { font-size: var(--text-xl); }
.subject-list p { margin-top: 6px; color: var(--slate-600); }
@media (max-width: 760px) {
  .subject-list { grid-template-columns: 1fr; }
}

.gallery {
  display: grid;
  /* Rows of three phones, centred: each group has three or six, so no row is left half empty */
  grid-template-columns: repeat(3, minmax(0, 240px));
  justify-content: center;
  gap: 28px;
  margin-top: 32px;
  padding: 8px 0 0;
}
.gallery:focus-visible { outline: 3px solid var(--blue-600); outline-offset: 4px; border-radius: var(--radius-card); }
@media (max-width: 760px) {
  .gallery {
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 62%;
    padding: 8px 4px 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--control-400) transparent;
    scrollbar-width: thin;
  }
}
.gallery figure { scroll-snap-align: start; }
.gallery figcaption { margin-top: 18px; }
.gallery figcaption b { display: block; font-family: var(--font-display); font-weight: 700; }
.gallery figcaption span { display: block; margin-top: 4px; color: var(--slate-600); font-size: var(--text-xs); line-height: 1.5; }
.gallery-group + .gallery-group { margin-top: clamp(48px, 6vw, 80px); }
/* Room before the closing band */
.gallery-group:last-child { padding-bottom: clamp(72px, 9vw, 128px); }

.story-hero {
  overflow: hidden;
  border-radius: var(--radius-sheet);
  aspect-ratio: 3 / 2;
  background: var(--cloud-50);
}
.story-hero img { width: 100%; height: 100%; object-fit: cover; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2em; font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); }
.prose h3 { margin-top: 1.6em; font-size: var(--text-lg); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.45em; }
.prose strong { font-weight: 700; }
.team { display: grid; gap: 40px; margin-top: 48px; padding: 0; list-style: none; }
.team li { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 28px; align-items: start; }
.team img { width: 168px; height: 168px; border-radius: var(--radius-sheet); object-fit: cover; }
.team h3 { font-size: var(--text-xl); }
.team__role { margin-top: 2px; color: var(--blue-700); font-family: var(--font-display); font-weight: 700; font-size: var(--text-xs); }
.team p:not(.team__role) { margin-top: 10px; max-width: var(--measure); color: var(--slate-600); }
@media (max-width: 600px) {
  .team li { grid-template-columns: 1fr; gap: 16px; }
  .team img { width: 132px; height: 132px; }
}

.faq-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}
.toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc h2 { font-size: var(--text-xs); font-weight: 800; }
.toc ul { display: grid; gap: 4px; margin-top: 12px; padding: 0; list-style: none; }
.toc a {
  display: block;
  padding: 6px 12px;
  border-radius: var(--radius-chip);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xs);
  text-decoration: none;
}
.toc a:hover { background: var(--cloud-50); color: var(--blue-700); }
.faq-group + .faq-group { margin-top: 56px; }
.faq-group > h2 { font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem); }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--line-200); }
.faq-item:first-of-type { margin-top: 16px; border-top: 1px solid var(--line-200); }
.faq-item h3 { font-size: var(--text-lg); }
.faq-item .prose { margin-top: 10px; color: var(--slate-600); }
.faq-item .prose strong { color: var(--ink-900); }
.callout {
  padding: 16px 18px;
  border-radius: var(--radius-card);
  background: var(--blue-50);
  color: var(--ink-900);
}
@media (max-width: 860px) {
  .faq-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .toc ul { display: flex; flex-wrap: wrap; gap: 8px; }
  .toc a { background: var(--cloud-50); }
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 64px;
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-sheet);
  background: var(--cloud-50);
}
.contact h2 { font-size: var(--text-xl); }
.contact .btn { white-space: normal; max-width: 100%; }
.contact p { margin-top: 4px; color: var(--slate-600); }

.legal { padding-bottom: clamp(64px, 8vw, 112px); }
.legal .last-updated { margin-top: 12px; color: var(--slate-600); font-size: var(--text-xs); }
.legal .prose { margin-top: 32px; }

.notfound { padding: clamp(64px, 10vw, 140px) 0; text-align: center; }
.notfound img { width: 120px; margin: 0 auto 28px; }
.notfound p { max-width: 44ch; margin: 16px auto 0; color: var(--slate-600); }
.notfound .hero__actions { justify-content: center; }
