/* Colours and fonts come from web/site.json. Change them there, not here.
   The look: a paper page with a dot grid, plum buttons, headings in the one
   display font, and lesson plans drawn as ring-binder pages with index tabs. */
@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* The site has one palette, the cream paper one. "only light" stops browsers and
   in-app viewers in dark mode from darkening some colours and not others. */
:root {
  color-scheme: only light;
  --primary: #7A2948;
  --primary-dark: #5E1D36;
  --accent: #F2A65A;
  --teal: #2B7A7D;
  --butter: #F3D279;
  --ink: #2B1E2A;
  --muted: #6B5A66;
  --bg: #FBF6EE;
  --card: #FFFFFF;
  --tint: #F7E7DC;
  --line: #E6D8CC;
  --field-line: #8A7784;
  --rings: #D8C7BA;
  --ring-strip: #FDFBF8;
  --on-primary: #FFFFFF;
  --warn: #9A4411;
  --warn-tint: #FBF1D6;
  --error: #B3261E;
  --error-tint: #FCEBE9;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Fraunces", ui-serif, Georgia, serif;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;

  --radius: 12px;
  --radius-small: 8px;
  --radius-field: 6px;
  --radius-label: 4px;
  --shadow: 0 22px 44px -28px color-mix(in srgb, var(--primary-dark) 40%, transparent);
  --shadow-page: 0 34px 60px -34px color-mix(in srgb, var(--primary-dark) 45%, transparent);
  --wrap: 73.75rem;
  --gap: clamp(1.25rem, 3vw, 1.75rem);
  --section: clamp(3.5rem, 7vw, 5.5rem);

  --dots: radial-gradient(var(--line) 1.2px, transparent 1.4px);
  --ring-holes: radial-gradient(circle, var(--bg) 5px, var(--rings) 5.6px, var(--rings) 6.6px, transparent 7.2px) center 10px / 34px 46px repeat-y var(--ring-strip);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M3.5 9.5l3.6 3.6 7.4-8.2' fill='none' stroke='%237A2948' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5l4.5 4.5 4.5-4.5' fill='none' stroke='%232B1E2A' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

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

html {
  background-color: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem / 1.55 var(--font);
}

@media (min-width: 52rem) {
  body {
    font-size: 1.0625rem;
  }
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-synthesis: none;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.375rem, 4.7vw, 4rem);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.875rem, 3.5vw, 2.875rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.375rem;
}

p,
ul,
ol,
dl,
dd,
figure,
fieldset {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

fieldset {
  border: 0;
  min-width: 0;
}

a {
  color: var(--primary);
  text-underline-offset: 0.18em;
}

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

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-small);
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2 * var(--gap), var(--wrap));
  margin-inline: auto;
}

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

/* Sections alternate paper and blush. */
.section-tint {
  background: var(--tint);
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 44rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head p {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.45;
}

.eyebrow,
.section-head .eyebrow {
  display: inline-block;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.measure {
  max-width: 68ch;
}

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

.small {
  font-size: 0.875rem;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3.125rem;
  padding: 0.7rem 1.5rem;
  border: 0;
  border-radius: var(--radius-small);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

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

.button[disabled],
.button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.5;
}

/* While it works, the label says what is happening. */
.button[aria-busy="true"] {
  cursor: progress;
  opacity: 0.8;
}

.button[disabled]:hover {
  background: var(--primary);
}

.button-quiet[disabled]:hover {
  background: transparent;
  color: var(--primary);
}

.button-quiet {
  background: transparent;
  color: var(--primary);
  box-shadow: inset 0 0 0 1.5px var(--primary);
}

.button-quiet:hover {
  background: var(--tint);
  color: var(--primary-dark);
}

.button-small {
  min-height: 2.625rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.9375rem;
}

.button-wide {
  width: 100%;
}

.section-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
  margin-top: 1.5rem;
}

.button svg {
  flex: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  font-synthesis: none;
  /* The name is drawn with the font's large-size shapes, as in the logo files. */
  font-variation-settings: "opsz" 144;
  letter-spacing: -0.2px;
  line-height: 1.1;
  text-decoration: none;
}

.logo svg {
  flex: none;
}

.nav {
  display: none;
}

.nav a {
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-small);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.nav a:hover {
  background: var(--tint);
}

@media (min-width: 62rem) {
  .nav {
    display: flex;
    gap: 0.15rem;
    margin-left: auto;
  }
}

/* Below 62rem the links open from a menu button (site.js shows it). Without
   script the button stays hidden and the same links are in the footer. */
.nav-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-right: -0.4rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius-small);
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle[hidden] {
  display: none;
}

.nav-toggle:hover {
  background: var(--tint);
}

/* An SVG stroke, not bars painted with background: a viewer that darkens pages it
   cannot be told to leave alone darkens backgrounds but lightens strokes, so the
   icon stays visible there too. */
.nav-toggle-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.nav-toggle-close,
.nav-toggle[aria-expanded="true"] .nav-toggle-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-close {
  display: inline;
}

@media (max-width: 61.99rem) {
  .site-header:not(.app-header) .header-actions {
    margin-left: auto;
  }

  .nav-open .nav {
    display: flex;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.5rem calc(var(--gap) - 0.75rem) 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 12px 24px rgb(43 30 42 / 0.08);
  }

  .nav-open .nav a {
    padding: 0.75rem;
    font-size: 1rem;
  }
}

@media (min-width: 62rem) {
  .nav-toggle {
    display: none;
  }
}

/* On the narrowest phones "Sign in" moves from the header into the menu. */
.nav .nav-sign-in {
  display: none;
}

@media (max-width: 24rem) {
  .site-header:not(.app-header):has(.nav-toggle:not([hidden])) .header-link {
    display: none;
  }

  .nav-open .nav .nav-sign-in:not([hidden]) {
    display: block;
  }
}

.site-header .button {
  flex: none;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  border: 0;
  border-radius: var(--radius-small);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.header-link:hover {
  background: var(--tint);
}

@media (max-width: 30rem) {
  .logo {
    gap: 0.4rem;
    font-size: 1.1875rem;
  }

  .logo svg {
    width: 1.75rem;
    height: 1.75rem;
  }

  .site-header .button {
    padding-inline: 0.65rem;
    font-size: 0.875rem;
  }

  .header-link {
    padding-inline: 0.45rem;
    font-size: 0.875rem;
  }

  .header-actions {
    gap: 0.1rem;
  }
}

/* Hero */

.hero {
  padding-block: clamp(2.25rem, 5vw, 3.75rem) clamp(3.75rem, 7vw, 5.75rem);
  background-image: var(--dots);
  background-size: 24px 24px;
}

.hero-grid {
  display: grid;
  gap: clamp(2.75rem, 5vw, 4rem);
  align-items: start;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  }
}

/* A tilted label, like a sticker on a planner page. */
.status,
.sticker {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-label);
  background: var(--accent);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.1;
  transform: rotate(-1.5deg);
}

.status {
  margin-bottom: 1.35rem;
}

/* Up to three stickers in a row, in the colors of the tabs they name. */
.stickers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.75rem;
  margin-bottom: 1.35rem;
}

.stickers .sticker:nth-child(2) {
  transform: rotate(1deg);
}

.stickers .sticker:nth-child(3) {
  transform: rotate(-2deg);
}

.sticker-butter {
  background: var(--butter);
}

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

.hero-line {
  margin-top: 0.6rem;
  max-width: 31em;
  font-weight: 700;
}

.hero h1 span {
  color: var(--primary);
}

/* A highlighter line under the last words. */
.hero h1 em {
  font-style: normal;
  background: linear-gradient(transparent 66%, var(--accent) 66%, var(--accent) 93%, transparent 93%);
}

.lede {
  margin-top: 1.1rem;
  max-width: 31em;
  color: var(--muted);
  font-size: clamp(1.125rem, 0.95rem + 0.6vw, var(--step-1));
  line-height: 1.5;
}

/* Demo form */

.demo {
  position: relative;
  margin-top: 2.1rem;
  padding: 1.75rem clamp(1rem, 3vw, 1.5rem) 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow);
}

/* A strip of tape that holds the form to the page. */
.demo::before {
  content: "";
  position: absolute;
  top: -13px;
  left: 30px;
  width: 116px;
  height: 26px;
  background: color-mix(in srgb, var(--accent) 82%, transparent);
  transform: rotate(-3deg);
  clip-path: polygon(0 0, 5% 50%, 0 100%, 100% 100%, 95% 50%, 100% 0);
}

.field {
  display: grid;
  gap: 0.3rem;
}

.field label,
.legend {
  font-size: 0.875rem;
  font-weight: 600;
}

.input,
.select {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--field-line);
  border-radius: var(--radius-field);
  background: var(--card);
  color: var(--ink);
}

.input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.input:hover,
.select:hover {
  border-color: var(--muted);
}

.input:focus-visible,
.select:focus-visible {
  outline-offset: 0;
  border-color: var(--primary);
  border-radius: var(--radius-field);
}

.input[aria-invalid="true"] {
  border: 2px solid var(--error);
}

.field-error {
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;
}

.input-large {
  min-height: 3.5rem;
  font-size: 1.125rem;
}

.select {
  appearance: none;
  padding-right: 2.2rem;
  background-image: var(--caret);
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 0.75rem;
}

.demo-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

/* On a wide screen the four choices sit in one row, as short as their words. */
@media (min-width: 75rem) {
  .demo-row {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.06fr) minmax(0, 1.1fr) minmax(0, 1.24fr);
    gap: 0.5rem;
  }

  .demo-row .select {
    padding: 0.6rem 1.4rem 0.6rem 0.55rem;
    background-position: right 0.45rem center;
    font-size: 0.875rem;
    text-overflow: ellipsis;
  }
}

.choice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.2rem;
  margin-top: 0.85rem;
}

.choice .legend {
  float: left;
  margin-right: 0.3rem;
}

.choice label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  cursor: pointer;
}

input[type="radio"] {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--primary);
}

.demo .button {
  margin-top: 1rem;
}

.under-button {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

/* Messages come in three kinds: a plain note, a warning and an error. */
.message {
  margin-top: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-label);
  background: var(--tint);
  font-size: 0.9375rem;
}

.message-error {
  border-left-color: var(--error);
  background: var(--error-tint);
  font-weight: 600;
}

.examples {
  margin-top: 1.1rem;
}

.examples p {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.examples ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  min-height: 2.25rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--primary);
  background: var(--tint);
}

/* Lesson plan sheet: a ring-binder page with four index tabs. */

.hero-art {
  position: relative;
  padding-top: 38px;
}

@media (min-width: 52rem) {
  .hero-art {
    padding: 0 42px 0 0;
  }
}

.sheet {
  position: relative;
  padding-left: 34px;
  border: 1px solid var(--line);
  border-radius: 6px var(--radius) var(--radius) 6px;
  background: var(--card);
  box-shadow: var(--shadow-page);
  overflow: hidden;
}

.sheet::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 34px;
  border-right: 1px solid var(--line);
  background: var(--ring-holes);
}

.tabs {
  position: absolute;
  top: 0;
  left: 34px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 38px;
}

.tabs li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 9px;
  border-radius: 9px 9px 0 0;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 23.4rem) {
  .tabs {
    left: 26px;
    gap: 2px;
  }

  .tabs li {
    padding: 0 5px;
    font-size: 0.625rem;
  }
}

.tabs li:nth-child(1) {
  height: 38px;
  background: var(--primary);
  color: var(--on-primary);
}

.tabs li:nth-child(3) {
  background: var(--teal);
  color: var(--on-primary);
}

.tabs li:nth-child(4) {
  background: var(--butter);
}

@media (min-width: 52rem) {
  .tabs {
    top: 64px;
    right: 0;
    left: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    width: 42px;
    height: auto;
  }

  .tabs li {
    writing-mode: vertical-rl;
    width: 36px;
    height: auto;
    padding: 14px 0;
    border-radius: 0 9px 9px 0;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
  }

  .tabs li:nth-child(1) {
    width: 42px;
    height: auto;
  }
}

.sheet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.7rem clamp(0.9rem, 3vw, 1.25rem);
  border-bottom: 1px solid var(--line);
}

.sheet-source {
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sheet-actions {
  display: flex;
  gap: 0.5rem;
}

.sheet-actions button {
  min-height: 2rem;
  padding: 0.2rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-field);
  background: transparent;
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.sheet-actions button:hover {
  border-color: var(--primary);
  background: var(--tint);
}

.sheet-scroll {
  max-height: 30rem;
  overflow-y: auto;
  padding: clamp(1.1rem, 3vw, 1.5rem) clamp(1rem, 3vw, 1.6rem) 1.75rem;
  overscroll-behavior: contain;
}

@media (min-width: 62rem) {
  .sheet-scroll {
    max-height: 43rem;
  }
}

.sheet-scroll:focus-visible {
  outline-offset: -3px;
}

.sheet[aria-busy="true"] .sheet-scroll {
  opacity: 0.45;
}

.plan-title {
  font-size: clamp(1.4375rem, 1.2rem + 1vw, 1.6875rem);
  line-height: 1.15;
}

.plan-summary {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
}

.plan-notice {
  margin-top: 0.9rem;
  padding: 0.6rem 0.8rem;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-label);
  background: var(--warn-tint);
  font-size: 0.9375rem;
}

.plan-section {
  margin-top: 1.15rem;
}

.plan-section h3 {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--line);
  color: var(--primary);
  font-size: 1.125rem;
}

.plan-section ul {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.35rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.plan-section li {
  position: relative;
  padding-left: 1.4rem;
}

/* A small box to tick, as on a planner page. */
.plan-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.32em;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--primary);
  border-radius: 3px;
}

.sheet-foot {
  padding: 0.85rem clamp(0.9rem, 3vw, 1.25rem);
  border-top: 1px solid var(--line);
  background: var(--tint);
  font-size: 0.875rem;
  line-height: 1.45;
}

.sheet-foot strong {
  display: block;
}

.sheet-foot a {
  font-weight: 700;
}

/* What you get */

.outputs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
  gap: 1rem;
}

.output {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.output svg {
  margin-bottom: 0.9rem;
}

.output h3,
.output h4 {
  font-size: 1.125rem;
}

.example-subject {
  margin: 2rem 0 0.9rem;
  font-size: 1.375rem;
}

.example-subject:first-of-type {
  margin-top: 1.25rem;
}

.output p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.example-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.example-card .button {
  margin-top: auto;
}

.example-card .note {
  margin-bottom: 1rem;
}

.icon-page {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 2;
}

.icon-line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-soft {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.icon-fill {
  fill: var(--primary);
}

.icon-accent {
  fill: var(--accent);
}

.icon-tint {
  fill: var(--tint);
}

.icon-check {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 2rem 1.5rem;
  padding-top: 1rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.65rem 1.5rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  counter-increment: step;
}

.step::before {
  content: counter(step);
  position: absolute;
  left: 1.25rem;
  top: -1rem;
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.125rem;
  border-radius: var(--radius-label);
  background: var(--butter);
  color: var(--ink);
  font-weight: 700;
  line-height: 1;
  transform: rotate(-3deg);
}

.step p {
  margin-top: 0.4rem;
  color: var(--muted);
}

/* Audience */

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

.audience {
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.audience .sticker {
  align-self: flex-start;
  margin-bottom: 0.9rem;
  background: var(--butter);
  color: var(--ink);
}

.audience-art {
  width: 100%;
  height: auto;
  margin-bottom: 1.25rem;
  border-radius: var(--radius-small);
  background: var(--tint);
}

.audience h3 {
  font-size: 1.375rem;
}

.audience > p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.ticks {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 1.125rem;
  height: 1.125rem;
  background: var(--tick) center / contain no-repeat;
}

.audience .note {
  margin-top: auto;
  padding-top: 1.25rem;
  font-size: 0.9375rem;
}

/* Reasons */

.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.25rem 2rem;
}

.reason {
  padding-top: 1.1rem;
  border-top: 3px solid var(--primary);
}

.reason p {
  margin-top: 0.4rem;
  color: var(--muted);
}

/* Comparison table */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.table-gap {
  margin-top: clamp(2rem, 5vw, 3rem);
}

.compare {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  text-align: left;
}

.compare th,
.compare td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.compare tr:last-child th,
.compare tr:last-child td {
  border-bottom: 0;
}

.compare thead th,
.compare thead td {
  background: var(--tint);
  font-size: 0.9375rem;
  line-height: 1.3;
}

.compare tbody th {
  width: 19%;
  font-weight: 700;
}

.compare .ours {
  width: 29%;
  font-weight: 600;
}

.compare thead .ours {
  color: var(--primary);
}

.table-note {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Honest limits */

.limits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
  gap: 1rem;
}

.limit {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.limit h3 {
  font-size: 1.125rem;
}

.limit p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Pricing */

/* Each plan is a card with an index tab that says how many lesson plans it holds. */
.plans {
  display: grid;
  gap: 3.4rem 1.5rem;
  align-items: stretch;
  margin-top: 3.6rem;
}

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

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  background: var(--card);
}

.plan-card::before {
  content: attr(data-tab);
  position: absolute;
  left: -1px;
  top: -31px;
  display: flex;
  align-items: center;
  height: 31px;
  padding: 0 1rem;
  border-radius: 9px 9px 0 0;
  background: var(--teal);
  color: var(--on-primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.plan-card-plus::before {
  background: var(--primary);
}

.plan-card-pro::before {
  background: var(--accent);
  color: var(--ink);
}

.plan-card-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-page);
}

.plan-card-featured::before {
  left: -2px;
  top: -32px;
}

.plan-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  font-size: 1.375rem;
}

.badge {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-label);
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  transform: rotate(-2deg);
}

.plan-price {
  margin-top: 0.85rem;
  font-family: var(--display);
  font-size: 3.375rem;
  font-weight: 600;
  font-synthesis: none;
  letter-spacing: -0.012em;
  line-height: 1;
}

.plan-price small {
  color: var(--muted);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
}

.plan-price-note {
  margin-top: 0.35rem;
  color: var(--muted);
}

.plan-credits {
  margin-top: 1.1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-field);
  background: var(--tint);
}

.plan-credits strong {
  display: block;
  font-size: 1.125rem;
}

.plan-credits span {
  color: var(--muted);
  font-size: 0.875rem;
}

.plan-card .ticks {
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

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

.plan-buy .choice {
  margin: 0 0 0.85rem;
  gap: 0.2rem 1.2rem;
  font-size: 0.9375rem;
}

.rules {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem 3rem;
}

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

.rules h3 {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
}

.rules li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--muted);
}

.rules li + li {
  margin-top: 0.45rem;
}

.rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--muted);
}

.rules .rules-next {
  margin-top: 1.75rem;
}

/* Founder */

.founder {
  display: grid;
  gap: 1.25rem 4rem;
}

@media (min-width: 52rem) {
  .founder {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  }
}

.founder-story {
  max-width: 68ch;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 1.125rem;
  line-height: 1.55;
}

.founder-story p + p {
  margin-top: 0.9rem;
}

.founder-story .founder-sign {
  color: var(--muted);
  font-size: var(--step-0);
}

/* FAQ */

.faq {
  max-width: 48rem;
  border-top: 1px solid var(--line);
}

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

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.25rem;
  font-family: var(--display);
  font-size: 1.1875rem;
  font-weight: 600;
  font-synthesis: none;
  line-height: 1.3;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  margin-right: 0.3rem;
  border-right: 2.5px solid var(--primary);
  border-bottom: 2.5px solid var(--primary);
  transform: rotate(45deg) translate(-2px, -2px);
}

.faq details[open] summary::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.faq details p {
  max-width: 68ch;
  padding: 0 0.25rem 1.1rem;
  color: var(--muted);
}

/* The last call to action: paper with the dot grid, like the hero. */

.signup {
  border-top: 1px solid var(--line);
  background-image: var(--dots);
  background-size: 24px 24px;
}

.signup-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .signup-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
  }
}

.signup-copy p {
  margin-top: 0.9rem;
  max-width: 32rem;
  color: var(--muted);
  font-size: var(--step-1);
  line-height: 1.45;
}

.signup-copy .ticks {
  margin-bottom: 1.25rem;
}

.signup-copy .ticks + p {
  margin-top: 0;
}

.trap {
  position: absolute;
  left: -200vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Footer */

.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 48rem) {
  .site-footer .wrap {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: start;
  }
}

.site-footer p {
  margin-top: 0.75rem;
  max-width: 30rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

@media (min-width: 48rem) {
  .footer-links {
    justify-content: flex-end;
  }
}

.footer-links a {
  display: inline-block;
  padding-block: 0.35rem;
  color: var(--ink);
}

/* Plain text pages (privacy, terms, thanks, 404) */

.page {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.prose {
  max-width: 68ch;
}

.prose h1 {
  font-size: clamp(1.9rem, 1.4rem + 2vw, var(--step-4));
}

.prose h2 {
  margin-top: 2.25rem;
  font-size: var(--step-2);
}

.prose p,
.prose ul,
.prose ol {
  margin-top: 0.9rem;
}

.prose ul {
  padding-left: 1.25rem;
  list-style: disc;
}

.prose ol {
  padding-left: 1.4rem;
  list-style: decimal;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose .button {
  margin-top: 1.5rem;
}

.callout {
  margin-top: 1.25rem;
  padding: 0.9rem 1.1rem;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  background: var(--card);
}

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

  * {
    transition: none !important;
  }
}

/* Printing the page prints only the lesson plan, black on white, 11pt. */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .home > *:not(main),
  .home main > *:not(.hero),
  .hero-copy,
  .sheet-bar,
  .sheet-foot,
  .sheet::before,
  .tabs {
    display: none !important;
  }

  .hero {
    background: none;
  }

  .hero-art {
    padding: 0;
  }

  .hero,
  .hero-grid {
    display: block;
    padding: 0;
  }

  .wrap {
    width: 100%;
  }

  .sheet {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .sheet-scroll {
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .plan-section {
    break-inside: avoid;
    border-color: #999;
  }

  .plan-section h3 {
    border-color: #000;
    color: #000;
  }

  .plan-section li::before {
    border-color: #000;
  }

  .plan-summary {
    color: #000;
  }

  /* An example page prints the lesson plan only, with the worksheet and the
     answer key on pages of their own, as in the app. */
  .example-page ~ *,
  body:has(.example-page) .site-header,
  body:has(.example-page) .site-footer,
  body:has(.example-page) main > section:not(.page-top),
  .example-page > :not(.example-plan) {
    display: none !important;
  }

  .packet-part {
    border-top: 0;
    padding-top: 0;
  }

  .packet-student,
  .packet-key {
    break-before: page;
  }

  .packet-note {
    color: #000;
  }
}

/* Dedicated pages: the first section holds the page heading */

.page-top {
  padding-bottom: clamp(0.5rem, 2vw, 1.25rem);
}

.page-top .section-head {
  margin-bottom: 0;
}

.page-top + .section .section-head .eyebrow {
  display: none;
}

.example-page {
  max-width: 48rem;
}

.example-page .sheet-scroll {
  max-height: none;
}

.example-page .plan-title {
  font-size: var(--step-3);
}

.example-page .plan-section h2 {
  font-size: var(--step-1);
}

.packet-part {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--line);
}

.packet-part h3 {
  margin-top: 1rem;
}

.packet-name {
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}

.packet-note {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.packet-list {
  margin-top: 0.6rem;
  padding-left: 1.5rem;
  display: grid;
  gap: 0.6rem;
  list-style: decimal;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.packet-list li {
  padding-left: 0.25rem;
}

.packet-list li::before {
  content: none;
}

.packet-tag {
  color: var(--primary);
}

.example-note {
  margin: 1rem 0;
}

.example-card h3 a,
.example-card h4 a {
  color: inherit;
}

.breadcrumb a {
  color: inherit;
}

.link-list {
  display: grid;
  gap: 0.6rem 2rem;
  margin: 1.25rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

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

.link-list a {
  font-weight: 600;
}

/* The preview after a failed request: the earlier lesson plan, faded. */
.plan-stale #plan-sections,
.plan-stale #plan-title,
.plan-stale #plan-summary {
  opacity: 0.45;
}
