/*
  ClassNest website styles. One file, no frameworks, no web fonts.
  Colours come from the app's theme (src/theme/index.ts): black and gold,
  matching the app icon. Gold is an accent (the dark bands, buttons, links and
  small marks), not a frame for every block. Every text colour below meets
  WCAG 2.1 AA contrast on the background it is used on, in light and dark.
*/

:root {
  color-scheme: light dark;

  /* Brand colours (the same in light and dark) */
  --ink: #1a1814;
  --gold: #d9b45a;
  --gold-pressed: #c9a24a;

  /* Light theme (app palette) */
  --bg: #f7f4ec;
  --surface: #ffffff;
  --surface-muted: #efebe1;
  --border: #e3ddcf;
  --rule: #d5cdbb;
  --text: #1a1814;
  --text-muted: #5f594f;
  --primary: #7d5b12;
  --primary-pressed: #694c0e;
  --primary-soft: #f4ecd8;
  --on-primary: #ffffff;
  --focus: #7d5b12;

  /* The dark bands: the top of every page and the closing call to action */
  --band-bg: #1a1814;
  --band-text: #eeeae2;
  --band-muted: #b2ab9e;
  --band-rule: #36322b;

  /* Frames drawn round the screenshots */
  --frame-bar: #ebe6da;
  --frame-dot: #c9c1ae;
  --bezel: #1a1814;
  --bezel-ring: #3a362f;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow: 0 1px 2px rgb(20 18 14 / 5%), 0 8px 24px rgb(20 18 14 / 5%);
  --shadow-shot: 0 1px 2px rgb(20 18 14 / 8%), 0 28px 56px -28px rgb(20 18 14 / 45%);
  --max: 72rem;
  --font:
    system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;

  /* Type scale: one set of sizes for every page */
  --text-small: 0.9375rem;
  --text-body: 1.0625rem;
  --text-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --h3: 1.1875rem;
  --h3-large: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  --h2: clamp(1.75rem, 1.4rem + 1.5vw, 2.5rem);
  --h1: clamp(2.125rem, 1.5rem + 2.4vw, 3.125rem);
  --h1-home: clamp(2.25rem, 1.5rem + 2.6vw, 3.25rem);

  --section-space: clamp(3.5rem, 8vw, 6.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121110;
    --surface: #1c1a17;
    --surface-muted: #23201c;
    --border: #332f28;
    --rule: #3f3a32;
    --text: #eeeae2;
    --text-muted: #aba497;
    --primary: #d9b45a;
    --primary-pressed: #c9a24a;
    --primary-soft: #352b14;
    --on-primary: #121110;
    --focus: #d9b45a;
    --band-bg: #1c1a17;
    --band-rule: #332f28;
    --frame-bar: #2a2722;
    --frame-dot: #4d473d;
    --bezel: #0b0a09;
    --bezel-ring: #3f3a32;
    --shadow: none;
    --shadow-shot: 0 28px 56px -28px rgb(0 0 0 / 70%);
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
}

h1 {
  font-size: var(--h1);
  letter-spacing: -0.025em;
}

h2 {
  font-size: var(--h2);
  letter-spacing: -0.02em;
}

h3 {
  font-size: var(--h3);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p,
ul,
ol,
dl,
table {
  margin: 0 0 1rem;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: var(--primary);
  text-decoration-thickness: from-font;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 700;
}

.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;
}

.skip-link {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 30;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: var(--radius);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

/* The skip link moves focus to <main>; it isn't a control, so no ring. */
#main:focus {
  outline: none;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

@media (min-width: 40rem) {
  .container {
    width: min(100% - 4rem, var(--max));
  }
}

.prose {
  max-width: 68ch;
}

/* A text-only section keeps the page's left edge; only its lines are short. */
.container.prose {
  max-width: none;
}

.container.prose > * {
  max-width: 68ch;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: var(--text-small);
}

.lead {
  max-width: 62ch;
  font-size: var(--text-lead);
  line-height: 1.55;
}

.eyebrow {
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-wrap: balance;
}

/* Header and navigation.
   Wide screens: every link in one row. Narrow screens: Pricing, Sign in and a
   Menu button; the button (assets/site.js) shows the rest in a panel. Without
   JavaScript the button is hidden and every link shows (see the end of this
   section). Links that appear twice are only ever shown once at a time. */

.site-header {
  position: relative;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.55rem;
}

.site-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a:not(.button) {
  display: block;
  padding: 0.625rem 0.5rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:not(.button):hover {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.site-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-color: var(--primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

.menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  margin-left: 0.25rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.menu-button:hover {
  background: var(--surface-muted);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 1.125rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
  transition: transform 0.15s;
}

.menu-icon::before {
  top: -6px;
}

.menu-icon::after {
  top: 6px;
}

.menu-button[aria-expanded='true'] .menu-icon {
  background: transparent;
}

.menu-button[aria-expanded='true'] .menu-icon::before {
  transform: translateY(6px) rotate(45deg);
}

.menu-button[aria-expanded='true'] .menu-icon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.nav-panel {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  padding: 0.25rem max(1rem, (100% - var(--max)) / 2) 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 24px -18px rgb(20 18 14 / 30%);
}

.menu-button[aria-expanded='true'] + .nav-panel {
  display: block;
}

.nav-panel ul {
  flex-direction: column;
}

.nav-panel a:not(.button) {
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-panel .nav-wide {
  display: none;
}

.nav-actions .button {
  width: 100%;
  margin-top: 1.25rem;
}

@media (min-width: 40rem) {
  .nav-panel {
    padding-inline: max(2rem, (100% - var(--max)) / 2);
  }
}

.nav-quick a {
  white-space: nowrap;
}

/* Phones: a smaller logo, and the Menu button's label under its icon, so the
   row fits on one line down to 320px. */
@media (max-width: 29.99rem) {
  .header-inner {
    gap: 0.5rem;
  }

  .brand {
    gap: 0.5rem;
    font-size: 1.125rem;
  }

  .brand img {
    width: 2rem;
    height: 2rem;
  }

  .site-nav .nav-quick a {
    padding-inline: 0.4375rem;
    font-size: 1rem;
  }

  .menu-button {
    flex-direction: column;
    justify-content: center;
    gap: 0.25rem;
    min-width: 2.75rem;
    margin-left: 0.125rem;
    padding: 0.375rem;
    font-size: 0.75rem;
    line-height: 1;
  }

  .menu-icon {
    margin-block: 6px;
  }
}

/* The narrowest phones: the name stays for screen readers, the logo shows. */
@media (max-width: 21rem) {
  .site-header .brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
}

@media (min-width: 60rem) {
  .site-nav .nav-quick,
  .site-nav .menu-button {
    display: none;
  }

  .site-nav {
    flex: 1;
  }

  .nav-panel,
  .menu-button[aria-expanded='true'] + .nav-panel {
    display: flex;
    flex: 1;
    gap: 1.5rem;
    align-items: center;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav-panel ul {
    flex-direction: row;
    align-items: center;
  }

  .nav-panel .nav-wide {
    display: block;
  }

  .site-nav .nav-links {
    gap: 0 1.5rem;
    margin-left: 2.25rem;
  }

  .nav-panel a:not(.button) {
    padding: 0.5rem 0;
    border: 0;
  }

  .site-nav .nav-actions {
    gap: 1.5rem;
    margin-left: auto;
  }

  .nav-actions .button {
    width: auto;
    margin-top: 0;
  }
}

/* No JavaScript: no Menu button; every link wraps in a row under the logo. */
@media (scripting: none) and (max-width: 59.99rem) {
  .header-inner {
    flex-wrap: wrap;
    padding-block: 0.75rem;
  }

  .site-nav {
    flex-basis: 100%;
    margin-left: 0;
  }

  .site-nav .nav-quick,
  .menu-button {
    display: none;
  }

  .nav-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.25rem;
    position: static;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav-panel ul {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 1.25rem;
  }

  .nav-panel .nav-wide {
    display: block;
  }

  .nav-panel a:not(.button) {
    padding: 0.5rem 0;
    border: 0;
  }

  .nav-actions .button {
    width: auto;
    margin-top: 0;
  }
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.125rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 0.15s,
    color 0.15s;
}

.button:hover {
  text-decoration: none;
}

.button-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.button-primary:hover {
  background: var(--primary-pressed);
}

.button-secondary {
  border-color: currentColor;
  color: var(--primary);
}

.button-secondary:hover {
  background: var(--primary-soft);
}

.button-large {
  min-height: 3.25rem;
  padding: 0.8rem 1.4rem;
  font-size: var(--text-body);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Phones: buttons stack at full width rather than in a ragged pile. */
@media (max-width: 29.99rem) {
  .button-row > .button {
    flex: 1 1 100%;
  }
}

.text-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

/* Dark bands: the top of every page (.hero) and the closing call to action */

.hero,
.band {
  --focus: var(--gold);
  background: var(--band-bg);
  color: var(--band-text);
}

.hero {
  border-bottom: 1px solid var(--band-rule);
}

.hero a:not(.button),
.band a:not(.button) {
  color: var(--gold);
}

.hero .button-primary,
.band .button-primary {
  background: var(--gold);
  color: var(--ink);
}

.hero .button-primary:hover,
.band .button-primary:hover {
  background: var(--gold-pressed);
}

.hero .button-secondary,
.band .button-secondary {
  border-color: rgb(238 234 226 / 55%);
  color: var(--band-text);
}

.hero .button-secondary:hover,
.band .button-secondary:hover {
  background: rgb(255 255 255 / 8%);
}

.hero .eyebrow,
.band .eyebrow {
  color: var(--gold);
}

.hero .lead,
.band .lead,
.hero-note {
  color: var(--band-muted);
}

.hero-note {
  margin-bottom: 0;
  font-size: var(--text-small);
}

.hero-inner {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.hero-inner > :last-child,
.hero-copy > :last-child {
  margin-bottom: 0;
}

.hero-home h1 {
  font-size: var(--h1-home);
}

.hero-home .hero-inner {
  padding-block: clamp(3rem, 6vw, 4.75rem);
}

@media (min-width: 60rem) {
  .hero-home .hero-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 3.5rem;
  }
}

/* Screenshots in frames drawn here, not in the images:
   .shot-browser for the web app, .shot-phone for the phone apps. */

.shot {
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.shot-browser {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow-shot);
}

.shot-browser::before {
  content: '';
  display: block;
  height: 1.625rem;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(circle, var(--frame-dot) 0.2rem, transparent 0.23rem) 0.5rem 50% / 0.6rem 0.6rem
      no-repeat,
    radial-gradient(circle, var(--frame-dot) 0.2rem, transparent 0.23rem) 1.25rem 50% / 0.6rem
      0.6rem no-repeat,
    radial-gradient(circle, var(--frame-dot) 0.2rem, transparent 0.23rem) 2rem 50% / 0.6rem 0.6rem
      no-repeat,
    var(--frame-bar);
}

.shot-phone {
  width: 100%;
  max-width: 17.5rem;
  padding: 0.5rem;
  background: var(--bezel);
  border-radius: 2.25rem;
  box-shadow:
    0 0 0 1px var(--bezel-ring),
    var(--shadow-shot);
}

.shot-phone img {
  border-radius: 1.75rem;
}

/* The home page's opening picture: the web app with a phone in front. */
.hero-media {
  position: relative;
  padding: 0 13% 15% 0;
}

.hero-media .shot-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30%;
  max-width: none;
  padding: 0.3rem;
  border-radius: 1.5rem;
}

.hero-media .shot-phone img {
  border-radius: 1.2rem;
}

@media (min-width: 40rem) {
  .hero-media .shot-phone {
    padding: 0.45rem;
    border-radius: 2rem;
  }

  .hero-media .shot-phone img {
    border-radius: 1.55rem;
  }
}

/* Sections */

.section {
  padding-block: var(--section-space);
}

.section-alt {
  background: var(--surface-muted);
}

.section-surface {
  background: var(--surface);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.section-head > :last-child {
  margin-bottom: 0;
}

.section-head p:not(.eyebrow) {
  color: var(--text-muted);
  font-size: var(--text-lead);
  line-height: 1.55;
}

.section-foot {
  max-width: 68ch;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  color: var(--text-muted);
}

/* Two columns on wide screens: a heading on the left, the detail on the right. */
.split {
  display: grid;
  gap: 2rem 4rem;
}

.split > * > :last-child {
  margin-bottom: 0;
}

.split .lead {
  color: var(--text-muted);
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}

/* Short headed points separated by a rule, instead of boxes. */
.points {
  display: grid;
  gap: 2rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.points > * {
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.points > * > :last-child {
  margin-bottom: 0;
}

.points h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.points p {
  color: var(--text-muted);
}

.split > .points,
.split > div > .points {
  margin-bottom: 0;
}

@media (min-width: 40rem) {
  .points-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 48rem) {
  .points-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 40rem) {
  .modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .modules {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 2rem;
  }

  /* The eight new modules, in two rows of four. */
  .modules-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.points .module-plan {
  margin: -0.25rem 0 0.625rem;
  color: var(--primary);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.45;
}

.points .price {
  margin-bottom: 0.5rem;
  color: var(--text);
}

.points .amount {
  font-size: 2rem;
}

/* Office, Classroom and Parents: text beside a screenshot. */
.feature {
  display: grid;
  gap: 2.5rem 4rem;
  align-items: center;
}

.feature + .feature {
  margin-top: clamp(4.5rem, 10vw, 7.5rem);
}

.feature-text {
  max-width: 34rem;
}

.feature-text > :last-child {
  margin-bottom: 0;
}

.feature-text h3 {
  font-size: var(--h3-large);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.feature-text .intro {
  color: var(--text-muted);
  font-size: var(--text-lead);
  line-height: 1.55;
}

.feature-media .shot-phone {
  margin-inline: auto;
}

@media (max-width: 55.99rem) {
  .feature-media .shot-phone {
    max-width: 16rem;
  }
}

@media (min-width: 56rem) {
  .feature {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-wide {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }

  /* Picture on the left. It holds nothing focusable, so the reading and
     tab order (text first) stay the same. */
  .feature-flip .feature-media {
    order: -1;
  }

  .feature-flip .feature-text {
    justify-self: start;
  }
}

/* Lists */

.check-list {
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-bottom: 0.625rem;
  padding-left: 1.75rem;
}

.check-list li::before,
.tick {
  content: '';
  display: inline-block;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--primary);
  border-width: 0 0.18rem 0.18rem 0;
  transform: rotate(45deg);
}

.check-list li::before {
  position: absolute;
  top: 0.35em;
  left: 0.3rem;
}

/* A check list with a rule between items. */
.check-list-ruled {
  border-top: 1px solid var(--rule);
}

.check-list-ruled li {
  margin: 0;
  padding-block: 1rem;
  border-bottom: 1px solid var(--rule);
}

.check-list-ruled li::before {
  top: calc(1rem + 0.35em);
}

.steps {
  padding-left: 1.25rem;
}

.steps li {
  margin-bottom: 0.5rem;
}

.steps li::marker {
  color: var(--primary);
  font-weight: 700;
}

.callout {
  max-width: 68ch;
  padding: 1rem 1.25rem;
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
}

.callout > :last-child {
  margin-bottom: 0;
}

.tag {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.6rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* "New" after a module that has just joined a plan, in a list or a table. */
.new {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0 0.5rem;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 0.1em;
  white-space: nowrap;
}

/* The closing call to action */

.cta {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.cta-inner {
  max-width: 46rem;
}

.cta-inner > :last-child {
  margin-bottom: 0;
}

.cta .button-row {
  margin-block: 1.75rem 1.5rem;
}

/* Cards: only for plans on the pricing page */

.card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card > :last-child {
  margin-bottom: 0;
}

/* Pricing */

.billing {
  display: none;
  margin: 0 0 2rem;
  padding: 0;
  border: 0;
}

.billing legend {
  margin-bottom: 0.5rem;
  padding: 0;
  font-weight: 700;
}

.billing-options {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--text-muted);
  border-radius: 999px;
}

.billing input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  opacity: 0;
}

.billing label {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.billing input:checked + label {
  background: var(--primary);
  color: var(--on-primary);
}

.billing input:focus-visible + label {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (forced-colors: active) {
  .billing input:checked + label {
    outline: 2px solid CanvasText;
  }
}

.price-yearly {
  display: none;
}

/* The monthly/yearly switch needs :has(); without it, both prices show. */
@supports selector(:has(*)) {
  .billing {
    display: block;
  }

  main:has(#billing-yearly:checked) .price-monthly {
    display: none;
  }

  main:has(#billing-yearly:checked) .price-yearly {
    display: revert;
  }
}

.plans {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  margin-bottom: 1.25rem;
}

.plan {
  display: flex;
  flex-direction: column;
}

.plan h3 {
  margin-bottom: 0.25rem;
  font-size: 1.375rem;
}

.plan .pupils {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.plan .limits {
  margin: -0.5rem 0 1.25rem;
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: var(--text-small);
}

.plan .limits li {
  display: inline;
}

.plan .limits li + li::before {
  content: ' · ';
}

.plan .check-list {
  margin-bottom: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.plan .button {
  margin-top: auto;
}

.plan-featured {
  padding: calc(1.75rem - 1px);
  border: 2px solid var(--primary);
}

.price {
  margin-bottom: 0.25rem;
  color: var(--text);
}

.amount {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.price-alt {
  min-height: 1.6em;
  color: var(--text-muted);
  font-size: var(--text-small);
}

/* A list of extras with the price on the right. */
.price-list {
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.price-list > li {
  display: grid;
  gap: 0.5rem 3rem;
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.price-list > li > * > :last-child {
  margin-bottom: 0;
}

.price-list h3 {
  margin-bottom: 0.375rem;
}

.price-list p {
  max-width: 60ch;
  color: var(--text-muted);
}

.price-list .price-note {
  color: var(--text);
  font-weight: 700;
}

.price-list .price-note + p {
  margin-top: 0.25rem;
  font-size: var(--text-small);
}

@media (min-width: 48rem) {
  .price-list > li {
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 20rem);
  }
}

/* Tables */

.table-wrap {
  /* Keeps the visually hidden cell labels inside the scrolling box. */
  position: relative;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.compare {
  min-width: 46rem;
}

caption {
  padding: 1rem 1rem 0.75rem;
  font-weight: 700;
  text-align: left;
}

th,
td {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface-muted);
  font-weight: 700;
}

tbody th {
  font-weight: 600;
}

td.yes,
td.no {
  padding-left: 1.25rem;
}

td.no {
  color: var(--text-muted);
}

tfoot td,
tfoot th {
  font-weight: 700;
}

/* FAQ and definitions */

.faq {
  max-width: 68ch;
}

.faq h3 {
  margin-top: 2rem;
}

.faq h3:first-child {
  margin-top: 0;
}

.faq p {
  color: var(--text-muted);
}

.details-list {
  display: grid;
  grid-template-columns: minmax(8rem, max-content) 1fr;
  gap: 0.75rem 1.5rem;
}

.details-list dt {
  font-weight: 700;
}

.details-list dd {
  margin: 0;
}

@media (max-width: 30rem) {
  .details-list {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .details-list dd {
    margin-bottom: 0.75rem;
  }
}

/* Footer */

.site-footer {
  padding-block: 3.5rem 2rem;
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--text-small);
}

.footer-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
}

.footer-about {
  grid-column: 1 / -1;
  max-width: 26rem;
}

.footer-about .brand {
  margin-bottom: 0.75rem;
}

@media (min-width: 60rem) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }

  .footer-about {
    grid-column: auto;
  }
}

.footer-heading {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 0.9375rem;
  letter-spacing: 0;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 0.25rem;
}

.site-footer li a {
  display: inline-block;
  padding-block: 0.25rem;
}

.site-footer a:not(.brand) {
  color: var(--text-muted);
}

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

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-bottom > :last-child {
  margin-bottom: 0;
}

/* No stray space at the end of a section. */
.section .container > :last-child,
.cta .container > :last-child {
  margin-bottom: 0;
}

/* Motion and print */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  .skip-link,
  .site-nav,
  .billing {
    display: none;
  }

  .hero,
  .band {
    background: none;
    color: #000;
  }

  .hero .lead,
  .band .lead,
  .hero-note {
    color: #000;
  }

  .shot {
    box-shadow: none;
  }
}
