/* The page follows the Figma «Login-Aule» v8 (file yOAIYJNl5nZ7NgWtESN0Fo):
   the parent's screens on paper and ink (page 160:1345), the student's in the
   device's pure black on white (page 190:717). Each component block names its
   Figma component and ids; FIGMA.md has the whole map. */

/* ---- Fonts: our own files, nothing fetched from anywhere else ---------- */

/* Titles and the wordmark: Source Serif 4. */
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/serif.woff2?v=382475f38242") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("fonts/serif-italic.woff2?v=b4f56ddc9873") format("woff2");
}

/* Everything else: Inter. The italic is fetched only where a device field's example uses it. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/sans.woff2?v=3100e775e861") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/sans-italic.woff2?v=7291b5970da2") format("woff2");
}

/* ---- Tokens ------------------------------------------------------------- */

:root {
  /* Figma «Aule — color» (VariableCollectionId:3:3), mode Claro: the parent's screens. */
  --bg: #f5f2ea; /* color/fondo VariableID:3:4 */
  --surface: #fbfaf6; /* color/tarjeta VariableID:3:5 */
  --ink: #141414; /* color/texto VariableID:3:6 */
  --muted: #6b6b6b; /* color/secundario VariableID:3:7 */
  --line: #c9c3b4; /* color/linea VariableID:3:8 */
  --copper: #9a5b2e; /* color/acento VariableID:3:9 */
  --picked: #ebe4d3; /* raw: Opción/Grande · Seleccionada 160:1379 */
  --danger: #8f1d14; /* raw: Campo/Línea · Error 160:1368 */
  /* Opción/Grande · Foco 160:1384's ring in color/acento, solid: the Figma's 40 % is
     1.73:1 on the paper, under the 3:1 a focus indicator needs (4.80:1 solid). */
  --focus: #9a5b2e;
  /* Figma «Aparato — e-ink» (VariableCollectionId:90:691), mode Papel: the student's screens. */
  --device-ink: #000000; /* nivel/negro VariableID:162:427 */
  --device-paper: #ffffff; /* nivel/blanco VariableID:162:430 */
  --radius: 10px; /* the parent's options, buttons, boxes and digits */
  --device-radius: 12px; /* radio/tecla VariableID:90:699 */
  --device-card-radius: 20px; /* radio/cuadro VariableID:90:698 */
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* The device's type is drawn for its 800 px screen; a phone gets four fifths of it. */
  --k: 0.8;
  /* Room the cookie notice takes at the bottom while it shows (set by signin.js). */
  --notice-room: 0px;
  color-scheme: light;
}

@media (min-width: 800px) {
  :root {
    --k: 1;
  }
}

/* ---- Base ---------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

/* Elements with their own display value would otherwise ignore `hidden`. */
[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
  /* A control reached by Tab is scrolled clear of the cookie notice, not under it. */
  scroll-padding-bottom: var(--notice-room);
}

body {
  margin: 0;
  /* While the cookie notice shows, the end of the page can still scroll above it. */
  padding-bottom: var(--notice-room);
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* A student's screen is the device's: a white page. */
html[data-surface="ink"],
html[data-surface="ink"] body {
  background: var(--device-paper);
  color: var(--device-ink);
}

/* The cookie notice is not drawn there, so it needs no room. */
html[data-surface="ink"] {
  scroll-padding-bottom: 0;
}

html[data-surface="ink"] body {
  padding-bottom: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

p {
  margin: 0;
}

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

/* Focus on paper: Opción/Grande · Foco's ring (copper, 3 px). An outline, never
   a shadow, so forced colours (Windows High Contrast) keep it. */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Focus on a student's screen: black, 3 px out. */
html[data-surface="ink"] :focus-visible {
  outline: 3px solid var(--device-ink);
  outline-offset: 3px;
}

/* A screen's title takes the focus when the screen shows, and the editor's
   summaries when the home opens it there; neither is a control. */
h2[tabindex="-1"]:focus,
h3[tabindex="-1"]:focus {
  outline: none;
}

.filters {
  position: absolute;
}

/* ---- Screens and their motion -------------------------------------------- */

/* Paper screens come up from below as the Figma's phone prototype moves in
   (Move In, bottom, ease-out); going back they come down. Student screens
   change at once, as e-ink does. */
.screen.arrive {
  animation: arrive 240ms ease-out;
}

.screen.return {
  animation: return 240ms ease-out;
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@keyframes return {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen.arrive,
  .screen.return {
    animation: none;
  }
}

/* ---- Paper: the parent's screens (Figma §3.2 Móvil, §3.3 Escritorio) ----- */

/* Móvil 390×844: one column, padding 24; the body grows, so the button sits on the bottom edge. */
.frame {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - var(--notice-room));
  min-height: calc(100dvh - var(--notice-room));
  margin: 0;
  padding: 24px;
}

@media (max-width: 359px) {
  .frame {
    padding: 16px;
  }
}

/* Figma: Encabezado/Base 160:1348 (Atrás=Sí 160:1349, Atrás=No 160:1352) */
.screen-head {
  display: grid;
  gap: 14px;
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
}

.wordmark {
  font: 600 18px/1.35 var(--serif);
  color: var(--ink);
}

/* Figma: Barra de progreso/Base 160:1415 (Sin avance 160:1416; 1–12 de 12 160:1417…160:1439).
   Three named parts as wide as their steps (4 : 4 : 2); the current name in ink. */
.progress {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress .segment {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.progress .segment:nth-child(1),
.progress .segment:nth-child(2) {
  flex: 4 1 0;
}

.progress .segment:nth-child(3) {
  flex: 2 1 0;
}

.progress .track {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.progress .fill {
  display: block;
  height: 100%;
  background: var(--ink);
}

.progress .segment-name {
  min-height: 30px;
  font: 500 12px/15px var(--sans);
  color: var(--muted);
}

.progress .segment[aria-current] .segment-name {
  color: var(--ink);
}

/* Sin avance: a plain 2 px line outside the onboarding. */
.progress.plain {
  height: 2px;
  background: var(--line);
}

.screen-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 28px;
  padding-top: 40px;
}

/* Figma: Pregunta/Base 161:2101: the step, the title and the help under it. */
.question {
  display: grid;
  gap: 10px;
}

.question-step {
  font: 500 14px/1.3 var(--sans);
  color: var(--copper);
}

.question-title {
  margin: 0;
  font: 500 28px/34px var(--serif);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.question-help {
  font: 400 15px/22px var(--sans);
  color: var(--muted);
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

/* A list of options followed by a field (P07). */
.controls.spaced {
  gap: 24px;
}

.controls > .link {
  align-self: flex-start;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

/* Long lists use 52 px options, 8 apart (P07, the grades). */
.options.wrap,
.options.two {
  gap: 8px;
}

.options.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.options.wrap .option,
.options.two .option {
  min-height: 52px;
}

.options.two .option {
  padding: 8px 12px;
}

/* P03's two links: their 44 px targets touch, with no gap between them. */
.links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.screen-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 16px;
  padding-top: 12px;
}

.small-help,
.wait {
  font: 400 14px/20px var(--sans);
  color: var(--muted);
}

.wait {
  font-size: 13px;
}

/* P14: where the code went. */
.sent-to {
  font: 500 15px/22px var(--sans);
  color: var(--ink);
}

/* Escritorio 1280×800: the same screen in a 560 px column, centred both ways;
   the button follows the content. */
@media (min-width: 768px) {
  .screen[data-surface="paper"]:not([hidden]) {
    display: grid;
    place-items: center;
    min-height: calc(100vh - var(--notice-room));
    min-height: calc(100dvh - var(--notice-room));
    padding: 24px;
  }

  .frame {
    width: 560px;
    min-height: 0;
    padding: 0;
  }

  .screen-body {
    flex: none;
    padding: 40px 0 48px;
  }

  .screen-foot {
    padding: 0 0 40px;
    min-height: 56px;
  }

  .options.wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* ---- Paper components ---------------------------------------------------- */

/* Figma: Enlace/Base 161:2096: «← Atrás», «Reenviar», «Qué guardamos», «En otro momento»…
   13 px above and below the line make a 44 px target for a finger. */
.link {
  display: inline-block;
  padding: 13px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 15px/1.25 var(--sans);
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link:disabled {
  color: var(--muted);
  cursor: default;
}

/* The small link of P14. */
.link-small {
  padding-block: 14px;
  font-size: 13px;
}

/* A web addition: Enlace/Base in the error colour («Quitar a este alumno»). */
.link.danger {
  color: var(--danger);
}

.back {
  white-space: nowrap;
}

/* «← Atrás» keeps its 44 px target without making the header's 25 px row taller. */
.head-row .back {
  margin-block: -10px;
}

/* Figma: Opción/Grande 160:1374 (Normal 160:1375, Seleccionada 160:1379, Foco 160:1384, Error 160:1388) */
.option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 400 16px/20px var(--sans);
  text-align: left;
}

.option:hover {
  background: var(--surface);
}

.option[aria-pressed="true"],
.pick input:checked + .option {
  background: var(--picked);
}

.option[aria-pressed="true"]::after,
.pick input:checked + .option::after {
  content: "✓";
  margin-left: auto;
  font: 600 16px/1 var(--sans);
}

.option:focus-visible,
.pick input:focus-visible + .option {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  background: var(--surface);
}

.option[aria-invalid="true"] {
  border-color: var(--danger);
  color: var(--danger);
}

/* A choice of several (P07, the editor's chips): the box is the browser's, out of sight. */
.pick {
  position: relative;
  display: block;
  cursor: pointer;
}

/* Over the whole face, so focus scrolls all of it into view. */
.pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

/* Figma: Botón/Principal 160:1392 (Normal 160:1393, Deshabilitado 160:1395) */
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--surface);
  font: 600 16px/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
}

.primary:disabled {
  background: var(--line);
  color: var(--muted);
}

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

/* A web addition: Botón/Principal in the error colour («Borrar mi cuenta»). */
.primary.danger {
  background: var(--danger);
}

/* Figma: Acción/Pequeña 161:2104: «Configurar», «Olvidar», «Entendido». */
.small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  /* The Figma's 40, made 44 for a finger. */
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: 500 14px/1.2 var(--sans);
}

.small:hover {
  background: var(--surface);
}

/* Figma: Casilla/Base 160:1397 (Sin marcar 160:1398, Marcada 160:1401) */
.check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  /* A one-line choice is still a 44 px target. */
  min-height: 44px;
  color: var(--ink);
  font: 400 15px/22px var(--sans);
  cursor: pointer;
}

.check.boxed {
  padding: 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
}

/* The real box lies over the whole row, out of sight: focus scrolls the row
   clear of the cookie notice, not only its first line. */
.check input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
}

.check .box {
  display: grid;
  flex: none;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
}

.check input:checked + .box {
  background: var(--ink);
}

.check input:checked + .box::after {
  content: "✓";
  color: var(--surface);
  font: 600 14px/1 var(--sans);
}

/* The real box is out of sight, so its face carries the ring. */
.check input:focus-visible + .box {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Figma: Campo/Línea 160:1355 (Vacío 160:1356, Lleno 160:1362, Error 160:1368) */
.field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.field > label,
.group > legend {
  color: var(--muted);
  font: 500 14px/1.3 var(--sans);
}

.field input,
.field textarea,
.field select,
.add-row input {
  width: 100%;
  min-width: 0;
  /* A 44 px target for a finger, the rule included. */
  min-height: 44px;
  padding: 0 0 10px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 400 22px/1.2 var(--sans);
}

/* A line with room for a few lines of writing, as P06 draws it. */
.field textarea {
  min-height: 96px;
  resize: none;
}

.field select {
  appearance: none;
  padding-right: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141414' stroke-width='1.6'/%3E%3C/svg%3E") right 4px top 40% / 12px 8px no-repeat;
}

.field input::placeholder,
.field textarea::placeholder,
.add-row input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* A line field keeps its rule and shows focus as a copper line under it. The
   transparent outline is drawn by forced colours, which drop the shadow. */
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible,
.add-row input:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 3px 0 0 var(--focus);
}

.field [aria-invalid="true"] {
  border-bottom-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font: 400 14px/1.3 var(--sans);
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

/* Figma: Dígito/Base 160:1405 (Vacío 160:1406, Foco 160:1408, Lleno 160:1410).
   One real field lies over the six boxes, which mirror it. */
.digits {
  position: relative;
}

.digit-boxes {
  display: flex;
  gap: 8px;
}

.digit-boxes span {
  display: grid;
  flex: 1 1 0;
  place-items: center;
  height: 60px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  font: 600 24px/1 var(--sans);
}

.digit-boxes span.focus {
  border: 2.5px solid var(--copper);
}

.digits-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  caret-color: transparent;
  font-size: 16px;
  letter-spacing: 1em;
  opacity: 0;
  cursor: text;
}

.digits-input:disabled + .digit-boxes {
  opacity: 0.55;
}

/* Figma: Botón/Google 168:991 (Google draws it; only its slot is ours). */
.google-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
}

/* GitHub, Facebook and Apple share Google's button look, so they read as
   siblings; 44 px tall (Google's own is 40) for a finger. */
.other-ways summary {
  display: inline-block;
  list-style: none;
}

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

.providers {
  display: grid;
  gap: 0;
  margin-top: 8px;
}

.provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 400px;
  height: 44px;
  margin: 4px auto;
  padding: 0 12px;
  border: 1px solid #747775;
  border-radius: 4px;
  background: #fff;
  color: #1f1f1f;
  font: 500 14px/1.2 var(--sans);
  text-decoration: none;
}

.provider:hover {
  background: #f8f9fa;
}

.provider svg {
  flex: none;
  width: 18px;
  height: 18px;
}

/* P04's «Qué guardamos»: the two choices and what is never kept. Open from the
   start, and tight enough that «Autorizo» stays on a 390×844 phone's screen. */
.keep-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Its 44 px target reaches into the space around it, as «← Atrás»'s does. */
.keep-panel .link {
  justify-self: start;
  margin-block: -8px;
}

/* ---- Paper: the family's account and a student's settings ---------------- */

/* Figma: Fila/Alumno 161:2110: the name, then the actions; a rule under each. */
.student-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--line);
}

.student-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1.5px solid var(--line);
}

.student-go {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
}

.student-go b {
  font: 600 18px/1.3 var(--sans);
}

.student-go b::after {
  content: " →";
  font-weight: 400;
}

.student-go small {
  color: var(--muted);
  font: 400 14px/1.35 var(--sans);
}

.student-go:hover b {
  text-decoration: underline;
}

.student-go[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
}

.student-go[aria-disabled="true"] b::after {
  content: "";
}

/* Web-only, built from Fila/Alumno 161:2110: the student's latest sessions under the
   row, a line each, as the editor's #past list reads (D35); then Enlace/Base 161:2096
   «Ver resúmenes», small, to the review's summaries in Configurar. */
.student-sessions {
  display: grid;
  flex: 1 1 100%;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font: 400 14px/1.35 var(--sans);
}

.student-sessions b {
  color: var(--ink);
  font-weight: 500;
}

/* Small type, a whole target: 44 px tall (D21). */
.student-summaries {
  min-height: 44px;
  margin-top: -8px;
  padding-block: 12px;
  font-size: 14px;
}

/* Enlace/Base 161:2096 «Cuéntale a Aule sobre {nombre}», on a line of its own under the
   row, while the family has not told Aule what the child likes (D34); 44 px tall (D21). */
.student-interview {
  flex: 1 1 100%;
  min-height: 44px;
  margin-top: -8px;
  padding-block: 12px;
}

.account-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 24px;
  margin-top: 8px;
}

/* Open, the account's details take the whole row, and the form sits under its summary. */
.account[open] {
  flex-basis: 100%;
}

.account[open] > :not(summary) {
  margin-top: 12px;
}

.erase {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
}

.erase .field input {
  font-size: 18px;
}

/* The build, last in the account's details: small and faint, and left
   selectable, to be copied into a report. */
.build {
  font: 400 12px/16px var(--sans);
  color: var(--muted);
}

/* The editor: the same fields as before, on paper. */
.editor-fields {
  gap: 24px;
}

.group {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.group > legend {
  margin-bottom: 8px;
  padding: 0;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* A chip is a small Opción/Grande. */
.chip {
  position: relative;
  display: block;
  cursor: pointer;
}

.chip input,
.tone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  font: 400 15px/1.2 var(--sans);
}

.chip input:checked + span {
  background: var(--picked);
}

.chip input:checked + span::after {
  content: "✓";
  font-weight: 600;
}

.chip input:focus-visible + span,
.tone input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  background: var(--surface);
}

.tones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tone {
  position: relative;
  display: block;
  cursor: pointer;
}

.tone span {
  display: grid;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  color: var(--muted);
  font: 400 13px/1.35 var(--sans);
}

.tone b {
  display: block;
  color: var(--ink);
  font: 600 15px/1.3 var(--sans);
}

/* Picked, as a chip is: the fill, a «✓» after the name, and the description in
   ink (muted on the fill would be 4.21:1). */
.tone input:checked + span {
  background: var(--picked);
  color: var(--ink);
}

.tone input:checked + span b::after {
  content: " ✓";
}

@media (max-width: 420px) {
  .tones {
    grid-template-columns: 1fr;
  }
}

.add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px;
}

.add-row input {
  font-size: 18px;
}

.known {
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1.5px solid var(--line);
}

.known h3 {
  margin: 0;
  font: 600 15px/1.3 var(--sans);
}

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

.known li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  padding: 8px 0;
  border-bottom: 1.5px solid var(--line);
  font: 400 14px/1.4 var(--sans);
}

.known li.none {
  border-bottom: 0;
  color: var(--muted);
}

#past li {
  grid-template-columns: 1fr;
}

#past b {
  color: var(--muted);
  font: 500 13px/1.3 var(--sans);
}

/* ---- Ink: the student's screens (Figma §3.1, 800×480) ------------------- */

.screen[data-surface="ink"] {
  color: var(--device-ink);
  font-family: var(--sans);
}

/* Phones: one column, the button full width at the bottom. */
.ink-frame {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 24px 20px;
}

.ink-body {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 18px;
}

.ink-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ink-head .ink-link {
  margin-top: calc(-14px * var(--k));
}

.ink-title {
  margin: 0;
  font: 600 calc(34px * var(--k)) / calc(46px * var(--k)) var(--sans);
  overflow-wrap: anywhere;
}

.ink-text {
  font: 400 calc(22px * var(--k)) / calc(34px * var(--k)) var(--sans);
}

.ink-note {
  font: 400 calc(22px * var(--k)) / calc(30px * var(--k)) var(--sans);
}

.ink-note:empty {
  display: none;
}

/* A05's web-only status line (D22) stays in the accessibility tree while it
   is empty, so its words are read as they arrive (a live region that appears
   already filled may not be); out of the flow, it takes no room until then. */
#recovery-note:empty {
  position: absolute;
}

.ink-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.ink-foot > span:empty {
  display: none;
}

/* Under the device's size, a04-details' «Seguir» follows its fields instead of
   sitting on the bottom edge, where A05's «Empezar la sesión» shows next: a
   second tap on «Seguir» does not land on it (Nota · A04 190:972). */
@media (max-width: 799px), (max-height: 479px) {
  .screen[data-screen="a04-details"] .ink-body {
    flex-grow: 0;
  }
}

/* The device's size and up: its 800 px area, centred, 40 px at the sides and 32 above and below. */
@media (min-width: 800px) and (min-height: 480px) {
  .screen[data-surface="ink"]:not([data-screen="session"]):not([hidden]) {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .ink-frame {
    width: 800px;
    min-height: 480px;
    gap: 12px;
    padding: 32px 40px;
  }

  .ink-foot {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .ink-foot > span:empty {
    display: block;
  }
}

/* Figma: Botón/Negro 190:834 (Normal 190:835, Deshabilitado 190:838): drawn 56 tall in a 72 px hit area. */
.ink-button {
  position: relative;
  min-width: 260px;
  min-height: 56px;
  /* The 72 px hit frame starts 8 above the drawn button and ends 8 below it, in the margin. */
  margin: 8px 0 0;
  padding: 0 24px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-ink);
  color: var(--device-paper);
  font: 600 calc(24px * var(--k)) / 30px var(--sans);
}

.ink-button::before {
  content: "";
  position: absolute;
  inset: -10px -2px;
}

/* Disabled without grey: white, a dashed black border and a black label. */
.ink-button:disabled {
  border-style: dashed;
  background: var(--device-paper);
  color: var(--device-ink);
}

/* The device's link pattern («Enlace · …» 195:513, 190:959): underlined, a 60 px hit area,
   and never narrower than 44 px, as English's «Back» would be. */
.ink-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-width: 44px;
  min-height: 60px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--device-ink);
  font: 600 calc(22px * var(--k)) / calc(30px * var(--k)) var(--sans);
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* A link that cannot be followed yet (A05's «Empezar otra sesión» before the
   devices answer): dashed, as a disabled device button is (D14), never grey. */
.ink-link:disabled {
  text-decoration-style: dashed;
}

/* Two device links side by side at the bottom left (A05's web-only state). */
.ink-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 32px;
}

/* Figma: Íconos · Aparato 190:995 (Material Icons, Apache 2.0), drawn as masks in the control's colour. */
.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

/* Ícono/assignment 191:1415 */
.icon[data-icon="assignment"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M11.6667 25H23.3333V28.3333H11.6667V25ZM11.6667 18.3333H28.3333V21.6667H11.6667V18.3333ZM11.6667 11.6667H28.3333V15H11.6667V11.6667ZM31.6667 5H24.7C24 3.06667 22.1667 1.66667 20 1.66667C17.8333 1.66667 16 3.06667 15.3 5H8.33333C8.1 5 7.88333 5.01667 7.66667 5.06667C7.01667 5.2 6.43333 5.53333 5.98333 5.98333C5.68333 6.28333 5.43333 6.65 5.26667 7.05C5.1 7.43333 5 7.86667 5 8.33333V31.6667C5 32.1167 5.1 32.5667 5.26667 32.9667C5.43333 33.3667 5.68333 33.7167 5.98333 34.0333C6.43333 34.4833 7.01667 34.8167 7.66667 34.95C7.88333 34.9833 8.1 35 8.33333 35H31.6667C33.5 35 35 33.5 35 31.6667V8.33333C35 6.5 33.5 5 31.6667 5ZM20 4.58333C20.6833 4.58333 21.25 5.15 21.25 5.83333C21.25 6.51667 20.6833 7.08333 20 7.08333C19.3167 7.08333 18.75 6.51667 18.75 5.83333C18.75 5.15 19.3167 4.58333 20 4.58333ZM31.6667 31.6667H8.33333V8.33333H31.6667V31.6667Z'/%3E%3C/svg%3E"); }
/* Ícono/check 191:1398 */
.icon[data-icon="check"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z'/%3E%3C/svg%3E"); }
/* Ícono/help_outline 191:1421 */
.icon[data-icon="help_outline"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M18.3333 30H21.6667V26.6667H18.3333V30ZM20 3.33333C10.8 3.33333 3.33333 10.8 3.33333 20C3.33333 29.2 10.8 36.6667 20 36.6667C29.2 36.6667 36.6667 29.2 36.6667 20C36.6667 10.8 29.2 3.33333 20 3.33333ZM20 33.3333C12.65 33.3333 6.66667 27.35 6.66667 20C6.66667 12.65 12.65 6.66667 20 6.66667C27.35 6.66667 33.3333 12.65 33.3333 20C33.3333 27.35 27.35 33.3333 20 33.3333ZM20 10C16.3167 10 13.3333 12.9833 13.3333 16.6667H16.6667C16.6667 14.8333 18.1667 13.3333 20 13.3333C21.8333 13.3333 23.3333 14.8333 23.3333 16.6667C23.3333 20 18.3333 19.5833 18.3333 25H21.6667C21.6667 21.25 26.6667 20.8333 26.6667 16.6667C26.6667 12.9833 23.6833 10 20 10Z'/%3E%3C/svg%3E"); }
/* Ícono/mic 191:1401 */
.icon[data-icon="mic"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 56'%3E%3Cpath d='M28 32.6667C31.8733 32.6667 35 29.54 35 25.6667V11.6667C35 7.79333 31.8733 4.66667 28 4.66667C24.1267 4.66667 21 7.79333 21 11.6667V25.6667C21 29.54 24.1267 32.6667 28 32.6667Z'/%3E%3Cpath d='M39.6667 25.6667C39.6667 32.1067 34.44 37.3333 28 37.3333C21.56 37.3333 16.3333 32.1067 16.3333 25.6667H11.6667C11.6667 33.9033 17.7567 40.67 25.6667 41.8133V49H30.3333V41.8133C38.2433 40.67 44.3333 33.9033 44.3333 25.6667H39.6667Z'/%3E%3C/svg%3E"); }
/* Ícono/mic_off 191:1404 */
.icon[data-icon="mic_off"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10.8 4.9C10.8 4.24 11.34 3.7 12 3.7C12.66 3.7 13.2 4.24 13.2 4.9L13.19 8.81L15 10.6V5C15 3.34 13.66 2 12 2C10.46 2 9.21 3.16 9.04 4.65L10.8 6.41V4.9ZM19 11H17.3C17.3 11.58 17.2 12.13 17.03 12.64L18.3 13.91C18.74 13.03 19 12.04 19 11ZM4.41 2.86L3 4.27L9 10.27V11C9 12.66 10.34 14 12 14C12.23 14 12.44 13.97 12.65 13.92L14.31 15.58C13.6 15.91 12.81 16.1 12 16.1C9.24 16.1 6.7 14 6.7 11H5C5 14.41 7.72 17.23 11 17.72V21H13V17.72C13.91 17.59 14.77 17.27 15.55 16.82L19.75 21.02L21.16 19.61L4.41 2.86Z'/%3E%3C/svg%3E"); }
/* Ícono/school 191:1418 */
.icon[data-icon="school"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M20 5L1.66667 15L8.33333 18.6333V28.6333L20 35L31.6667 28.6333V18.6333L35 16.8167V28.3333H38.3333V15L20 5ZM31.3667 15L20 21.2L8.63333 15L20 8.8L31.3667 15ZM28.3333 26.65L20 31.2L11.6667 26.65V20.45L20 25L28.3333 20.45V26.65Z'/%3E%3C/svg%3E"); }
/* Ícono/task_alt 191:1413 */
.icon[data-icon="task_alt"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M36.6667 8.63333L17.65 27.6667L10.5833 20.6L12.9333 18.25L17.65 22.9667L34.3167 6.3L36.6667 8.63333ZM32.9833 17.0333C33.2 17.9833 33.3333 18.9833 33.3333 20C33.3333 27.3667 27.3667 33.3333 20 33.3333C12.6333 33.3333 6.66667 27.3667 6.66667 20C6.66667 12.6333 12.6333 6.66667 20 6.66667C22.6333 6.66667 25.0667 7.43333 27.1333 8.75L29.5333 6.35C26.8333 4.45 23.55 3.33333 20 3.33333C10.8 3.33333 3.33333 10.8 3.33333 20C3.33333 29.2 10.8 36.6667 20 36.6667C29.2 36.6667 36.6667 29.2 36.6667 20C36.6667 18.0167 36.3 16.1167 35.6667 14.35L32.9833 17.0333Z'/%3E%3C/svg%3E"); }
/* Ícono/videocam 191:1407 */
.icon[data-icon="videocam"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15 8V16H5V8H15ZM16 6H4C3.45 6 3 6.45 3 7V17C3 17.55 3.45 18 4 18H16C16.55 18 17 17.55 17 17V13.5L21 17.5V6.5L17 10.5V7C17 6.45 16.55 6 16 6Z'/%3E%3C/svg%3E"); }
/* Ícono/videocam_off 191:1410 */
.icon[data-icon="videocam_off"] { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.56 8L7.56 6L3.41 1.86L2 3.27L4.73 6H4C3.45 6 3 6.45 3 7V17C3 17.55 3.45 18 4 18H16C16.21 18 16.39 17.92 16.55 17.82L19.73 21L21.14 19.59L12.28 10.73L9.56 8ZM5 16V8H6.73L14.73 16H5ZM15 8V10.61L21 16.61V6.5L17 10.5V7C17 6.45 16.55 6 16 6H10.39L12.39 8H15Z'/%3E%3C/svg%3E"); }

/* The check of Cuadro/Opción · Seleccionada, drawn after the label. */
:root {
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12L3.41 13.41L9 19L21 7L19.59 5.59L9 16.17Z'/%3E%3C/svg%3E");
}

/* Figma: Cuadro/Opción 190:806, Cuadrícula (Normal 190:822, Seleccionada 190:825): 348×128, a 40 px icon on the left. */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.choice {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 14px 22px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-card-radius);
  background: var(--device-paper);
  color: var(--device-ink);
  font: 600 calc(24px * var(--k)) / calc(34px * var(--k)) var(--sans);
  text-align: left;
}

.choice .icon {
  width: 40px;
  height: 40px;
}

/* «Terminar tareas / de la escuela»: two even lines, as the Figma breaks them. */
.choice span:not(.icon) {
  text-wrap: balance;
}

/* Seleccionada: black, a 4 px border, white icon and words, and a check at the right. */
.choice[aria-pressed="true"] {
  padding: 12px 20px;
  border-width: 4px;
  background: var(--device-ink);
  color: var(--device-paper);
}

.choice[aria-pressed="true"]::after {
  content: "";
  flex: none;
  width: 24px;
  height: 24px;
  margin-left: auto;
  background: currentColor;
  -webkit-mask: var(--check) center / contain no-repeat;
  mask: var(--check) center / contain no-repeat;
}

@media (min-width: 800px) {
  .choice-grid {
    grid-template-columns: repeat(2, 348px);
    gap: 24px;
  }

  .choice {
    height: 128px;
  }
}

/* a02 «¿Eres tú?» (A02 ¿Eres tú? · Aparato 410:629, adapted): a line for the parent, A02's
   title, the name large (Inter 700; four fifths of it on a phone), and A02's two tiles,
   Cuadro/Opción 190:806 with no icon, side by side from 800 px and stacked below that. The
   tiles are A02's 200 px where the screen has room; on the device's 800 × 480 they are
   152 px, so «Volver» still fits under the added line for the parent (FIGMA.md D25). */
.handoff-name {
  font: 700 calc(56px * var(--k)) / 1.15 var(--sans);
  overflow-wrap: anywhere;
}

.handoff-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.choice.handoff {
  justify-content: center;
  min-height: 112px;
  text-align: center;
}

@media (min-width: 800px) {
  .handoff-tiles {
    grid-template-columns: repeat(2, 348px);
    gap: 24px;
  }

  .choice.handoff {
    height: 152px;
  }
}

@media (min-width: 800px) and (min-height: 560px) {
  .choice.handoff {
    height: 200px;
  }
}

/* Figma: Campo/Línea · Aparato 191:1333: 60 px tall, a 2 px black rule; the example in italic. */
.ink-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px 24px;
}

@media (min-width: 800px) {
  .ink-fields {
    grid-template-columns: 1fr 1fr;
  }

  .ink-field.wide {
    grid-column: 1 / -1;
  }
}

.ink-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ink-field label {
  font: 600 calc(22px * var(--k)) / 1.3 var(--sans);
}

.ink-field .optional {
  color: inherit;
  font-weight: 400;
}

.ink-field input,
.ink-field select {
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 13px 0 7px;
  border: 0;
  border-bottom: 2px solid var(--device-ink);
  border-radius: 0;
  background: var(--device-paper);
  color: var(--device-ink);
  font: 400 calc(30px * var(--k)) / 38px var(--sans);
}

.ink-field select {
  appearance: none;
  padding-right: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") right 4px center / 16px 10px no-repeat;
}

.ink-field input::placeholder {
  color: var(--device-ink);
  font-style: italic;
  opacity: 1;
}

.ink-field input:focus-visible,
.ink-field select:focus-visible {
  outline: 3px solid var(--device-ink);
  outline-offset: 3px;
}

/* A04 · Detalles' day: its last stop is the calendar button inside the field,
   where the field is :focus-within but neither :focus nor :focus-visible. */
.ink-field input[type="date"]:focus-within {
  outline: 3px solid var(--device-ink);
  outline-offset: 3px;
}

/* Figma: Botón/Micrófono 193:709 (Encendido 193:705: black, white icon; Apagado 193:708: white, black ring, icon crossed). */
.round-toggle {
  --size: 112px;
  display: grid;
  flex: none;
  place-items: center;
  width: var(--size);
  height: var(--size);
  padding: 0;
  border: 2px solid var(--device-ink);
  border-radius: 50%;
  background: var(--device-ink);
  color: var(--device-paper);
}

.round-toggle .icon {
  width: calc(var(--size) / 2);
  height: calc(var(--size) / 2);
}

.round-toggle[aria-pressed="false"] {
  background: var(--device-paper);
  color: var(--device-ink);
}

/* A microphone the browser will not give (Pendiente 260:716): the button cannot be pressed,
   so it is white with a dashed black border, as a disabled device button is (D14), and
   its icon is crossed; its sentence says the microphone is not available. */
.round-toggle:disabled {
  border-style: dashed;
  background: var(--device-paper);
  color: var(--device-ink);
}

.round-toggle.round-88 {
  --size: 88px;
}

.round-toggle.round-64 {
  --size: 64px;
}

.round-text {
  font: 400 calc(22px * var(--k)) / calc(34px * var(--k)) var(--sans);
}

/* A05: the microphone (and the web's camera) with the sentence that explains its colour.
   From 800 px the rows sit in one centred column as wide as the camera's row with its
   preview, so a longer line of the check never moves them. */
.device-rows {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  margin: 8px 0;
}

@media (min-width: 800px) {
  .device-rows {
    grid-template-columns: minmax(0, 670px);
    justify-content: center;
  }
}

.device-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 40px;
}

.device-says {
  display: grid;
  gap: 12px;
  width: 318px;
  max-width: 100%;
}

/* The camera's button sits in the microphone's 112 px column, so both sentences start together. */
.camera-row .round-toggle {
  margin: 0 12px;
}

/* The microphone's level, as Pendiente · Sesión del alumno 260:654 draws it under the camera:
   a black fill in a 2 px black frame, 24 px tall, across the sentence column. */
.level {
  height: 24px;
  overflow: hidden;
  border: 2px solid var(--device-ink);
  border-radius: 12px;
}

.level span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--device-ink);
  transition: width 80ms linear;
}

/* The bar's line («Si la barra se mueve cuando hablas, Aule te escucha.»), the camera's
   note and the sound test's line: smaller than the sentences they follow. */
.level-line,
.device-note {
  font: 400 calc(18px * var(--k)) / 1.4 var(--sans);
}

/* A05's check (web-only): Aule's face, the session's mascot at 72 px, beside the status
   line and, when it is needed, «Intentar otra vez». It takes the row's whole width under
   the microphone, so a long line has room; from 800 px it starts at the sentence column.
   Where the face cannot be drawn, the bar and the words do the job alone. */
.mic-check {
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  gap: 12px;
}

.check-words {
  display: grid;
  justify-items: start;
}

@media (min-width: 800px) {
  .mic-check {
    margin-left: 152px;
  }
}

.check-face {
  display: none;
  flex: none;
  width: 72px;
  height: 72px;
}

.mic-check.has-mascot .check-face {
  display: block;
}

.check-status {
  font: 600 calc(22px * var(--k)) / calc(30px * var(--k)) var(--sans);
}

/* A05's sound test (web-only): its line, a status that is never hidden, only empty;
   empty, it takes no room. */
.sound-line:empty {
  position: absolute;
}

.preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 160px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-paper);
}

.preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 799px) {
  .round-toggle {
    --size: 96px;
  }

  .round-toggle.round-88 {
    --size: 76px;
  }

  .device-row {
    gap: 16px 24px;
  }

  .device-says {
    flex: 1 1 160px;
    width: auto;
  }

  .camera-row .round-toggle {
    margin: 0 10px;
  }
}

/* ---- The session (A15, A16): Aule on a stage (D30) ---------------------------- */

/* One column on a phone held upright, and on any screen under 560 px. From 560 px on
   a short screen (a phone on its side, the device's 800 × 480) and from 901 px, two:
   the stage and what is done under it on the left, the talk on the right. The page's
   order puts the clock and «Terminar» last, so a Tab never reaches «Terminar» before
   the talk button; the grid draws them in the top bar, on the title's row. */
.screen[data-screen="session"] {
  /* Aule's face on the stage; 52 px in the band when a drawing or the camera takes it. */
  --face: clamp(120px, calc(42vh - 80px), 200px);
  /* The stage's height while Aule's face is on it; on one column a drawing or the camera
     may take more (below). */
  --stage: clamp(220px, 42vh, 440px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 12px 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 16px 32px;
}

.session-title,
.session-intro,
.session-message,
.session-help,
.session-retry,
.route,
.session-bar-end {
  grid-column: 1 / -1;
}

/* The top bar: the title on the left; the clock and «Terminar», small, on the right,
   where a long title never runs under them. */
.session-title {
  display: flex;
  grid-row: 1;
  align-items: center;
  min-height: 48px;
  margin: 0;
  padding-right: 168px;
  font: 600 20px/1.25 var(--sans);
}

.session-bar-end {
  display: flex;
  grid-row: 1;
  align-items: center;
  align-self: center;
  justify-self: end;
  gap: 12px;
}

/* Botón/Compacto 191:1396 in the top bar: «Terminar», 44 px tall. */
.session-end {
  min-height: 44px;
  padding: 0 14px;
  font-size: 15px;
}

/* A16 Hola, soy Aule 477:190, on a first run: the line under the title; while Aule does not
   arrive, the line that says so. A status that is never hidden, only empty; empty, it takes
   no room. */
.session-intro {
  margin-top: -6px;
  font: 400 calc(22px * var(--k)) / calc(30px * var(--k)) var(--sans);
}

.session-intro:empty {
  position: absolute;
}

/* A web-only state of the session: Aule did not arrive. Botón/Compacto 191:1396 under the line. */
.session-retry {
  justify-self: start;
}

/* Under a camera's problem, the adult's line (D33): empty, it takes no room. */
.session-help:empty {
  display: none;
}

/* The message line's place: no room (nor a gap of the grid) while it says nothing. */
.session-message:not(:has(> :not([hidden]))) {
  display: none;
}

.work,
.talking {
  display: grid;
  gap: 12px;
  min-width: 0;
}

/* The stage (web-only, D30): Aule's face, large, with one line under it; or what Aule
   draws, or the camera while the child aims at their work, with the face small in a
   band at the bottom. The stage swaps at once, as the ink screens do. */
.stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: var(--stage);
  overflow: hidden;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-card-radius);
  background: var(--device-paper);
  color: var(--device-ink);
}

.stage .tutor {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 0;
  padding: 12px;
}

/* «Tu turno», «Te escucho», «Pensando…», «Hablando»: Inter 600, 24 px (19 on a phone). */
.tile-state {
  font: 600 calc(24px * var(--k)) / 1.3 var(--sans);
  text-align: center;
}

.tutor[data-state="reconnecting"] .tile-state {
  font-weight: 700;
}

/* The dot, where Aule's face cannot be drawn. */
.orb {
  width: 64px;
  height: 64px;
  border: 2px solid var(--device-ink);
  border-radius: 50%;
  background: radial-gradient(circle, var(--device-ink) 0 22%, transparent 24%);
  opacity: 0.4;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.tutor[data-state="listening"] .orb {
  opacity: 0.7;
}

.tutor[data-state="thinking"] .orb {
  opacity: 0.85;
  animation: pulse 1.2s ease-in-out infinite;
}

.tutor[data-state="speaking"] .orb {
  opacity: 1;
  animation: pulse 0.6s ease-in-out infinite;
}

.tutor[data-state="reconnecting"] .orb {
  border-style: dashed;
}

@keyframes pulse {
  50% {
    transform: scale(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none !important;
  }
}

/* Aule's face, in place of the dot when the browser can draw it. */
.mascot {
  display: none;
  width: var(--face);
  height: var(--face);
}

.tutor.has-mascot .mascot {
  display: block;
}

.tutor.has-mascot .orb {
  display: none;
}

/* A drawing or the camera takes the stage: two rows, and the face shrinks to a band
   under them, with its line beside it. The band never covers the drawing. */
.stage[data-shows="drawing"],
.stage[data-shows="camera"] {
  grid-template-rows: minmax(0, 1fr) auto;
}

.stage[data-shows="drawing"] .tutor,
.stage[data-shows="camera"] .tutor {
  display: flex;
  grid-row: 2;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 4px 12px 6px;
  border-top: 2px solid var(--device-ink);
}

.stage[data-shows="drawing"] .mascot,
.stage[data-shows="camera"] .mascot {
  width: 52px;
  height: 52px;
}

.stage[data-shows="drawing"] .orb,
.stage[data-shows="camera"] .orb {
  width: 40px;
  height: 40px;
}

.stage[data-shows="drawing"] .tile-state,
.stage[data-shows="camera"] .tile-state {
  font-size: 17px;
  text-align: left;
}

.stage > .board,
.stage > .camera-view {
  grid-row: 1;
  min-height: 0;
}

/* While the camera shows, a drawing waits under it and comes back after. */
.stage[data-shows="camera"] > .board {
  display: none;
}

/* What the camera sees while the child aims: on this device only until «Listo» (D31). */
.camera-view {
  position: relative;
}

/* All of the frame, on the stage's paper: the child aims with what Aule will get, a
   phone's upright frame as much as a laptop's wide one, never a crop of it. */
.camera-view video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Not mirrored: what the student holds up (a notebook, a sheet) reads the
     right way round, the way the tutor sees it. */
}

/* Under the stage: «Mostrar mi tarea»; while the camera is on, the line that says what
   to do, «Listo» and «Cancelar»; «Modo tinta» for the team. The open microphone's
   switch is with the talk, where the talk button is with held turns. */
.session-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

/* A status that is never hidden, only empty; empty, it takes no room. */
.camera-aim {
  flex: 1 1 100%;
  font: 600 calc(22px * var(--k)) / 1.3 var(--sans);
}

.camera-aim:empty {
  position: absolute;
}

/* Botón/Negro 190:834 «Listo», in the row, and the device link «Cancelar» beside it. */
.ink-button.send {
  min-width: 160px;
  margin: 0;
}

.session-actions .ink-link {
  align-self: center;
}

/* A15: the round microphone and the sentence that says how it is. */
.mic-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mic-group .round-text {
  max-width: 220px;
  font-size: 17px;
  line-height: 1.35;
}

/* Figma: Botón/Compacto 191:1396: white, a 2 px black border, radius 12. */
.compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 16px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-paper);
  color: var(--device-ink);
  font: 600 16px/1.2 var(--sans);
}

.compact .icon {
  width: 24px;
  height: 24px;
}

/* A toggle that is off is still a control, as Botón/Micrófono · Apagado 193:708
   draws one: the border stays solid, its label says «apagada» and the camera's
   icon is crossed (app.js). Dashed is only for a button that cannot be pressed
   now (Botón/Negro · Deshabilitado, D14). */
.compact:disabled {
  border-style: dashed;
}

.clock {
  font: 600 17px/1 var(--sans);
  font-variant-numeric: tabular-nums;
}

#transcript {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The conversation in the device's ink: the tutor on white, the student in black. */
#transcript li {
  max-width: 85%;
  padding: 10px 14px;
  overflow-wrap: anywhere;
  border: 2px solid var(--device-ink);
  border-radius: 14px;
  background: var(--device-paper);
  color: var(--device-ink);
  font: 400 16px/1.5 var(--sans);
}

#transcript li[data-who="you"] {
  justify-self: end;
  margin-left: auto;
  background: var(--device-ink);
  color: var(--device-paper);
}

#transcript li::before {
  content: attr(data-name);
  display: block;
  font: 700 11px/1.5 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* What the tutor shows, on the stage: the drawing fits it and sits in its middle. */
.board {
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
  background: var(--device-paper);
}

.board svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* The drawing as the device shows it, for the team (D32): the panel's shape (800 x 480),
   its greys, and the flash it makes when it redraws. */
.board.device {
  display: grid;
  place-items: center;
  max-width: 800px;
  aspect-ratio: 800 / 480;
  border: 14px solid var(--device-ink);
  border-radius: 10px;
}

.board.device svg {
  max-height: 100%;
  filter: url("#four-greys");
}

/* On the stage the panel fills the space a drawing has, and never runs under the band. */
.stage > .board.device {
  aspect-ratio: auto;
}

.board.device.redraw svg {
  animation: redraw 360ms steps(1, end);
}

@keyframes redraw {
  0% {
    filter: url("#four-greys") invert(1);
  }
  45% {
    filter: url("#four-greys");
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.board:not([hidden]) svg {
  animation: drawn 0.35s ease-out;
}

@keyframes drawn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .board.device.redraw svg,
  .board:not([hidden]) svg {
    animation: none;
  }
}

/* A session the engine runs: where it is, and the exercise in hand. */
.route {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route li {
  display: grid;
  flex: 1 1 0;
  gap: 2px;
  min-width: 0;
  padding: 8px 12px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-paper);
  color: var(--device-ink);
  font: 400 14px/1.3 var(--sans);
}

.route li strong {
  font: 600 16px/1.3 var(--sans);
}

.route li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route li[data-state="pending"] {
  border-style: dashed;
}

.route li[data-state="current"] {
  border-width: 4px;
  padding: 6px 10px;
}

.route li[data-state="done"] {
  background: var(--device-ink);
  color: var(--device-paper);
}

.card {
  margin: 0;
  padding: 16px 18px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-paper);
}

.card-title {
  font: 700 13px/1.4 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-statement {
  margin-top: 6px;
  font: 600 20px/1.4 var(--sans);
}

.card form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.card label {
  display: grid;
  gap: 6px;
  font: 600 14px/1.3 var(--sans);
}

.card input,
.card textarea,
.type input {
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-paper);
  color: var(--device-ink);
  font: 400 16px/1.4 var(--sans);
}

.card textarea {
  resize: vertical;
}

.card .compact {
  justify-self: start;
}

.note {
  font: 400 14px/1.4 var(--sans);
}

/* Hold to talk: white until held, black while it listens. */
.talk {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  padding: 22px 12px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-paper);
  color: var(--device-ink);
  font: 600 18px/1.3 var(--sans);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.talk[aria-pressed="true"] {
  background: var(--device-ink);
  color: var(--device-paper);
}

/* A web-only state of the talk button: while it is held, a 4 px white bar along its bottom
   follows the microphone's level, measured in this browser. */
.talk-level {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  height: 4px;
}

.talk[aria-pressed="true"] .talk-level {
  display: block;
}

.talk-level span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--device-paper);
  transition: width 80ms linear;
}

/* A web-only state of the talk button: the coach right above it, on a first run, and a hint
   after a tap. A status that is never hidden, only empty; empty, it takes no room. */
.talk-coach {
  padding: 10px 14px;
  border: 2px solid var(--device-ink);
  border-radius: var(--device-radius);
  background: var(--device-paper);
  color: var(--device-ink);
  font: 600 17px/1.35 var(--sans);
  animation: coach-in 200ms ease-out;
}

.talk-coach:empty {
  position: absolute;
  padding: 0;
  border: 0;
  animation: none;
}

@keyframes coach-in {
  from {
    opacity: 0;
  }
}

.talk:disabled {
  border-style: dashed;
}

.type {
  display: flex;
  gap: 8px;
}

/* Two columns: the conversation keeps to its column and scrolls inside it, so the page
   and its buttons stay where they are. */
@media (min-width: 901px), (min-width: 560px) and (max-width: 900px) and (max-height: 639px) {
  .talking {
    position: sticky;
    top: 16px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 32px);
  }

  .talking > * {
    flex: none;
  }

  .talking #transcript {
    flex: 1 1 auto;
    align-content: start;
    min-height: 0;
    padding-right: 4px;
    overflow-y: auto;
  }
}

@media (min-width: 901px) {
  .screen[data-screen="session"] {
    --face: 240px;
    --stage: clamp(300px, calc(100vh - 300px), 520px);
    grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
    padding-top: 16px;
  }

  .session-title {
    font-size: 22px;
  }
}

/* A short screen from 560 px (the device's 800 × 480, a phone on its side): two columns,
   and nothing is fixed. The stage takes what the bar and the row under it leave, and
   what shows over it (A16's lines, an engine's route), so «Mostrar mi tarea» stays on
   the first screen. */
@media (min-width: 560px) and (max-width: 900px) and (max-height: 639px) {
  .screen[data-screen="session"] {
    --face: clamp(72px, calc(100vh - 230px - var(--intro-room, 0px) - var(--route-room, 0px)), 200px);
    --stage: max(160px, calc(100vh - 128px - var(--intro-room, 0px) - var(--route-room, 0px) - var(--aim-room, 0px)));
    grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
    gap: 8px 16px;
    padding-top: 4px;
    padding-bottom: 8px;
  }

  /* A16's lines, while Aule's face is on the stage: a drawing or the camera sets them aside. */
  .screen[data-screen="session"]:has(.session-intro:not(:empty)):has(.stage[data-shows="face"]) {
    --intro-room: 72px;
  }

  /* A session the engine runs: its route, over the stage. */
  .screen[data-screen="session"]:has(#route:not([hidden])) {
    --route-room: 49px;
  }

  .talking {
    top: 4px;
    max-height: calc(100vh - 8px);
  }

  .session-intro {
    font-size: 17px;
    line-height: 1.35;
  }

  /* While the camera is on, its line shares the row with «Listo» and «Cancelar», and the
     stage leaves room for their height, so both stay on the first screen. */
  .camera-aim {
    flex: 1 1 160px;
    font-size: 17px;
  }

  .screen[data-screen="session"]:has(.camera-aim:not(:empty)) {
    --aim-room: 16px;
  }

  .route li span {
    display: none;
  }
}

/* One column: the conversation scrolls in its own box, and A16's lines take room from the
   stage. With held turns the talk button stays at the bottom of the screen, under the
   thumb, however far the conversation pushes the page down. */
@media (max-width: 900px) and (min-height: 640px), (max-width: 559px) {
  .screen[data-screen="session"]:has(.session-intro:not(:empty)) {
    --face: clamp(110px, calc(42vh - 140px), 180px);
  }

  .screen[data-screen="session"]:has(.session-intro:not(:empty)) .stage {
    --stage: clamp(200px, calc(42vh - 64px), 400px);
  }

  /* Both of A16's lines (D35): the stage takes what they, the bar, «Mostrar mi tarea» and the
     coach's shelf leave, so «Mostrar mi tarea» clears the shelf on a small phone too (375 × 548,
     a small iPhone with Safari's bars). A drawing or the camera may take more (above). */
  .screen[data-screen="session"]:has(#session-parent:not(:empty)) {
    --face: clamp(80px, calc(100vh - 463px), 170px);
  }

  .screen[data-screen="session"]:has(#session-parent:not(:empty)) .stage {
    --stage: clamp(140px, calc(100vh - 404px), 380px);
  }

  .talking #transcript {
    max-height: 50vh;
    overflow-y: auto;
  }

  .route li span {
    display: none;
  }

  /* A drawing takes the stage at the screen's full width, with the band under it (D30):
     its words are as large as the width allows. */
  .stage[data-shows="drawing"] {
    height: max(var(--stage), calc((100vw - 36px) * 0.6 + 68px));
  }

  /* The camera takes what the screen leaves above «Listo» and the shelf (D31), up to a
     square at the full width: an upright frame and a wide one both show whole. */
  .stage[data-shows="camera"] {
    height: max(var(--stage), min(calc(100vw + 32px), calc(100vh - 318px), 560px));
  }

  main.push-to-talk .screen[data-screen="session"] {
    padding-bottom: 128px;
  }

  main.push-to-talk .talk {
    position: fixed;
    right: 16px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 16px;
    z-index: 10;
    width: auto;
    margin: 0;
  }

  /* A web-only shelf under the fixed talk button (and the coach, when it shows): the page
     scrolls behind it, so nothing of the session shows between the coach and the button. */
  main.push-to-talk .screen[data-screen="session"]::after {
    content: "";
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9;
    height: calc(max(12px, env(safe-area-inset-bottom)) + 100px);
    background: linear-gradient(to bottom, transparent, var(--device-paper) 16px);
    pointer-events: none;
  }

  /* The coach sits right above the fixed button, wherever the button is fixed: on a small
     phone too, where in the page it went behind the button. It is one short line, so the
     shelf grows by about its height, and the session leaves it room. */
  main.push-to-talk .talk-coach:not(:empty) {
    position: fixed;
    right: 16px;
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + 84px);
    left: 16px;
    z-index: 10;
  }

  main.push-to-talk.coached .screen[data-screen="session"] {
    padding-bottom: 176px;
  }

  main.push-to-talk.coached .screen[data-screen="session"]::after {
    height: calc(max(12px, env(safe-area-inset-bottom)) + 148px);
  }

  /* What the keyboard reaches, and «Listo» as the camera opens, scroll to above the shelf. */
  html[data-screen="session"]:has(main.push-to-talk) {
    scroll-padding-bottom: calc(max(12px, env(safe-area-inset-bottom)) + 108px);
  }

  html[data-screen="session"]:has(main.push-to-talk.coached) {
    scroll-padding-bottom: calc(max(12px, env(safe-area-inset-bottom)) + 156px);
  }
}

/* Under 901 px, A16's lines step aside while a drawing or the camera takes the stage, so
   either has the room, and come back with Aule's face. Out of sight only: the first is a
   status, and stays where a screen reader reads it. */
@media (max-width: 900px) {
  .screen[data-screen="session"]:has(.stage:not([data-shows="face"])) .session-intro:not(:empty) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

/* On a short screen an exercise card takes the room: Aule's face goes to its band, as with
   a drawing, so the card's words and its answer are on the first screen. */
@media (max-width: 900px) and (max-height: 760px) {
  .screen[data-screen="session"]:has(#card:not([hidden])) .stage[data-shows="face"] {
    height: auto;
  }

  .screen[data-screen="session"]:has(#card:not([hidden])) .stage[data-shows="face"] .tutor {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 4px 12px 6px;
  }

  .screen[data-screen="session"]:has(#card:not([hidden])) .stage[data-shows="face"] .mascot {
    width: 52px;
    height: 52px;
  }

  .screen[data-screen="session"]:has(#card:not([hidden])) .stage[data-shows="face"] .orb {
    width: 40px;
    height: 40px;
  }

  .screen[data-screen="session"]:has(#card:not([hidden])) .stage[data-shows="face"] .tile-state {
    font-size: 17px;
    text-align: left;
  }
}

/* With less motion asked for, the bars jump to each level and the coach appears at once. */
@media (prefers-reduced-motion: reduce) {
  .level span,
  .talk-level span {
    transition: none;
  }

  .talk-coach {
    animation: none;
  }
}

/* ---- The message line, the cookie notice and the footer ------------------ */

/* Figma: the error of Campo/Línea (Inter 14, #8f1d14); on a student's screen, Inter Semi Bold 22, black. */
.message {
  color: var(--danger);
  font: 400 14px/1.4 var(--sans);
}

.message[data-tone="info"] {
  color: var(--ink);
}

.screen[data-surface="ink"] .message {
  color: var(--device-ink);
  font: 600 calc(22px * var(--k)) / 1.4 var(--sans);
}

.screen[data-screen="session"] .message {
  font-size: 18px;
}

/* The cookie notice: a card at the bottom until it is read, its words in two lines
   beside «Entendido» (D36). */
.cookie-notice {
  position: fixed;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 16px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font: 400 13px/1.45 var(--sans);
}

.cookie-notice p {
  flex: 1 1 280px;
}

.cookie-notice a {
  color: inherit;
}

/* On a phone, and on a screen under 600 px tall (a phone on its side, the device's
   800 × 480), a slim bar along the bottom edge, as the brand site's notice is: the
   words beside «Entendido», which keeps Acción/Pequeña's 44 px. The sides are tight
   enough for the words to take three lines on a 390 px phone (66 px in all). With no
   gap under it, nothing of the page shows between the bar and the screen's edge. */
@media (max-width: 480px), (max-height: 600px) {
  .cookie-notice {
    right: 0;
    bottom: 0;
    left: 0;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-width: 1.5px 0 0;
    border-radius: 0;
    font: 400 12px/1.35 var(--sans);
  }

  .cookie-notice p {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cookie-notice .small {
    padding-inline: 8px;
  }
}

html[data-surface="ink"] .cookie-notice {
  display: none;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  padding: 24px 16px 32px;
  font: 400 13px/1.4 var(--sans);
}

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

html[data-surface="ink"] .site-footer a {
  color: var(--device-ink);
}

html[data-screen="session"] .site-footer {
  display: none;
}

/* ---- The family guide (guia.html, guide.html): one column of paper -------- */

/* The parent's screens' column and type: the wordmark over the plain line,
   Source Serif titles, Inter text, copper for what leads. */
.guide {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 24px 8px;
}

@media (max-width: 359px) {
  .guide {
    padding-inline: 16px;
  }
}

.guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 25px;
  border-bottom: 2px solid var(--line);
}

.guide-head .link {
  font-size: 14px;
}

.guide h1 {
  margin: 40px 0 10px;
  font: 500 32px/38px var(--serif);
  color: var(--ink);
}

.guide-lead {
  font: 400 17px/26px var(--sans);
}

.guide section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.guide h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
  font: 500 22px/28px var(--serif);
}

.guide-number {
  flex: none;
  color: var(--copper);
  font: 600 15px/1 var(--sans);
}

.guide h3 {
  margin: 20px 0 8px;
  font: 600 16px/1.35 var(--sans);
}

.guide section p,
.guide li {
  font: 400 16px/24px var(--sans);
}

.guide section > p + p {
  margin-top: 10px;
}

.guide ol,
.guide ul {
  margin: 0;
  padding-left: 22px;
}

.guide li + li {
  margin-top: 8px;
}

.guide ol + p,
.guide ul + p {
  margin-top: 12px;
}

.guide a:not(.primary, .link) {
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* The plan's price on a card, as the landing shows it. */
.guide-plan {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
}

.guide .guide-price {
  font: 500 28px/34px var(--serif);
}

.guide-price span {
  color: var(--muted);
  font: 400 16px/1 var(--sans);
}

.guide-foot {
  display: grid;
  gap: 14px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.guide-note {
  color: var(--muted);
  font: 400 13px/1.45 var(--sans);
}
