/* Learn to Look — bright & playful design tokens (docs/visual_design_plan.md).
   Baloo 2 (headlines/labels only) + Atkinson Hyperlegible (all body text —
   built by the Braille Institute for low-vision readers) load via Google
   Fonts in templates/base.html. Old variable names are kept as aliases so
   nothing that already shipped breaks mid-rollout. */

:root {
  /* New tokens (docs/visual_design_plan.md Section 2) */
  --sky: #1D6FE0;
  --sky-dark: #144D9F;
  --sun: #F5A800;
  --sun-light: #FFE9B8;
  --grass: #1E9E5A;
  --coral: #E8483A;
  --navy: #16233F;
  --paper: #FFFBF3;
  --paper-card: #FFFFFF;
  --ink-grey: #5B6472;
  --border: #E7E0D2;

  /* Old names, aliased so existing inline styles (var(--danger) etc.) keep working */
  --accent: var(--sky);
  --light: var(--sun-light);
  --grey: var(--ink-grey);
  --danger: var(--coral);
  --success: var(--grass);

  --font-display: "Baloo 2", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  margin: 0;
  color: var(--navy);
  background: var(--paper);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
}

a { color: var(--sky); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .app-tile, .card { transition: transform 0.12s ease, box-shadow 0.12s ease; }
  .btn:hover { transform: translateY(-1px); }
  .app-tile:hover { transform: translateY(-2px); }
}

.messages { list-style: none; margin: 0; padding: 0; }
.message {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.message-success { background: #E5F6EC; color: #16693D; }
.message-error { background: #FDE7E4; color: #A62E22; }

/* ---- Site header (teacher/admin/public pages) ---- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  background: var(--paper-card);
  border-bottom: 1px solid var(--border);
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.site-header-welcome {
  color: var(--ink-grey);
  font-size: 0.9rem;
}
.site-header-logout { margin: 0; }
.site-header-logout .btn { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* ---- Teacher portal ---- */

.portal {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.portal-header h1 { margin: 0; color: var(--navy); font-size: 1.6rem; }

.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: 2px solid var(--sky);
  background: var(--sky);
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.btn-secondary { background: white; color: var(--sky); }
.btn-danger { background: white; color: var(--coral); border-color: var(--coral); }

.badge {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}
.badge-success { background: #E5F6EC; color: #16693D; }
.badge-accent { background: var(--sun-light); color: #7A4E00; }
.badge-neutral { background: var(--paper); color: var(--ink-grey); border: 1px solid var(--border); }
.badge-danger { background: #FDE7E4; color: #A62E22; }

.card {
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.stat-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.stat-row .stat-value { font-family: var(--font-display); font-size: 1.7rem; color: var(--sky-dark); display: block; }
.stat-row .stat-label { color: var(--ink-grey); font-size: 0.9rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--border); }
th { color: var(--ink-grey); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }

form.inline { display: inline; }

label { display: block; font-weight: 700; margin-bottom: 0.25rem; }
input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="date"],
input[type="number"], input[type="file"], select, textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
}

input[type="checkbox"] { width: auto; margin: 0; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.checkbox-row label { margin-bottom: 0; font-weight: 400; }

/* ---- Admin console tabs (Subscribers / Applications / Reporting) ---- */

.console-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}
.console-tab {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink-grey);
}
.console-tab:hover { background: var(--paper); color: var(--navy); }
.console-tab-active { background: var(--sky); color: white; }
.console-tab-active:hover { background: var(--sky); color: white; }

.section-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ---- Category-tree grouping (teacher "available applications" page) ---- */

.category-row { margin-bottom: 1.5rem; }
.category-row:last-child { margin-bottom: 0; }
.category-row-nested {
  border-left: 2px solid var(--border);
  padding-left: 0.9rem;
}
.category-row-heading {
  margin: 0 0 0.5rem;
  color: var(--navy);
  font-size: 1.05rem;
}
.category-row-nested .category-row-heading {
  font-size: 0.95rem;
  color: var(--sky-dark);
}

.link-box-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}
.link-box {
  flex: 1;
  background: var(--sun-light);
  border: 1px solid #F0D28F;
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-family: monospace;
  color: #5A3D00;
  word-break: break-all;
}
.link-box-open {
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
}

/* Empty states — mascot + friendly copy, never just a bare sentence */
.empty-state {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  color: var(--ink-grey);
}
.empty-state .empty-state-text { margin: 0; }
.empty-state a { font-weight: 700; }

/* ---- Admin console (/console/) ---- */

.console-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}
.console-tile {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0;
}
.console-tile h3 { margin: 0 0 0.25rem; color: var(--navy); }
.console-tile p { margin: 0; color: var(--grey); font-size: 0.9rem; }
@media (prefers-reduced-motion: no-preference) {
  .console-tile:hover { transform: translateY(-2px); }
}

/* Restore confirmation (apps/ops/templates/ops/console/restore_confirm.html)
   — the one console action that overwrites existing data outright, so it
   gets its own visually distinct warning treatment rather than the plain
   .card every other page uses. */
.notice-warning {
  background: #FDE7E4;
  border: 2px solid var(--coral);
}
.notice-warning h3 { color: #A62E22; }

/* ---- Login / public-facing ---- */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sky);
  padding: 1.5rem;
}
.auth-card {
  background: var(--paper-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 380px;
  width: 100%;
  box-shadow: 0 12px 30px rgba(20, 77, 159, 0.25);
  text-align: center;
}
.auth-card h1 {
  color: var(--navy);
  font-size: 1.5rem;
  margin: 0.75rem 0 0.25rem;
}
.auth-card .tagline {
  color: var(--ink-grey);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}
.auth-card form { text-align: left; }

/* ---- Student launcher — touch-first, large targets, high contrast ---- */

.launcher {
  min-height: 100vh;
  background: var(--sky-dark);
  padding: 2rem 1rem;
}

.launcher-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto 2rem;
  flex-wrap: wrap;
  text-align: left;
}
.launcher-head h1 {
  color: white;
  font-size: 1.7rem;
  margin: 0;
}
.launcher-head p {
  color: #CFE0FA;
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 160px;
  background: white;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  padding: 1.5rem;
  border: 4px solid transparent;
  position: relative;
}
.app-tile:active, .app-tile:focus {
  border-color: var(--sun);
  outline: none;
}

.app-tile-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--tile-accent, var(--sky));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-tile-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--sun);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 2px solid white;
}

.launcher-empty {
  color: white;
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}
.launcher-empty p {
  font-size: 1.1rem;
  margin-top: 1rem;
}

/* ---- Student "play" wrapper: iframes the running app full-bleed, with a
   small floating way back to the launcher — no browser chrome (back
   button, address bar) required. Semi-transparent until hovered/focused
   so it doesn't compete with the app's own content, but still a full-size
   touch target per the launcher's touch-target guidelines. ---- */

.play-wrap {
  position: fixed;
  inset: 0;
  background: var(--navy);
}
.play-frame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.play-home {
  position: fixed;
  bottom: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-card);
  box-shadow: 0 2px 10px rgba(22, 35, 63, 0.35);
  opacity: 0.82;
  text-decoration: none;
}
.play-home:hover,
.play-home:focus-visible {
  opacity: 1;
}
.play-home.is-holding { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .play-home { transition: opacity 0.15s ease, transform 0.12s ease; }
  .play-home:hover, .play-home:focus-visible { transform: translateY(-1px); }
}

/* Press-and-hold confirmation ring (apps/students/templates/students/
   launcher/play.html) — a quick brush of the home button during play
   shouldn't exit the app, so it only navigates once held for
   PLAY_HOME_HOLD_MS (see the inline script). The ring is purely a visual
   progress cue; the real timer is JS, not this CSS transition. */
.play-home-ring {
  position: absolute;
  inset: -4px;
  transform: rotate(-90deg);
  pointer-events: none;
}
.play-home-ring-track,
.play-home-ring-fill {
  fill: none;
  stroke-width: 4;
}
.play-home-ring-track { stroke: rgba(22, 35, 63, 0.12); }
.play-home-ring-fill {
  stroke: var(--sun);
  stroke-linecap: round;
  stroke-dasharray: 175.9;
  stroke-dashoffset: 175.9;
}

/* "Tap to start" cover (apps/students/templates/students/launcher/
   play.html) — sits over the whole play-wrap until tapped. Exists so
   entering fullscreen can happen inside a real user gesture (browsers
   refuse a bare, unrequested requestFullscreen() call), and doubles as a
   "get ready" beat before the app itself appears. */
.play-start {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  width: 100%;
  border: 0;
  background: var(--navy);
  color: white;
  cursor: pointer;
}
.play-start-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  text-align: center;
  padding: 0 2rem;
}
.play-start-dismissed {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .play-start { transition: opacity 0.2s ease; }
}

/* ---- Public marketing site (home, contact) ---- */

.logo-wordmark { font-family: var(--font-display); }

.public-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 2rem;
}
.public-header-brand { text-decoration: none; display: inline-flex; }
.public-header-nav { display: flex; align-items: center; gap: 1.5rem; font-weight: 700; }
.public-header-nav a { text-decoration: none; color: var(--navy); }
.public-header-teacher-login { color: var(--sky); }

.hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
  flex-wrap: wrap;
}
.hero-copy { flex: 1 1 380px; }
.hero-copy h1 { font-size: 2.2rem; line-height: 1.15; margin: 0 0 1rem; color: var(--navy); }
.hero-sub { font-size: 1.05rem; color: var(--ink-grey); margin: 0 0 1.5rem; max-width: 480px; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-art-wrap { flex: 1 1 320px; display: flex; justify-content: center; }
.hero-art { width: 100%; max-width: 380px; height: auto; }

.btn-hero { background: var(--sky-dark); border-color: var(--sky-dark); padding: 0.75rem 1.6rem; font-size: 1.05rem; }

.section { max-width: 1100px; margin: 0 auto; padding: 3rem 2rem; }
.section-alt { background: var(--paper-card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; font-size: 1.6rem; color: var(--navy); margin: 0 0 2rem; }

.feature-grid, .steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.feature-card, .step-card {
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}
.feature-card h3, .step-card h3 { margin: 0 0 0.4rem; font-size: 1.1rem; color: var(--navy); }
.feature-card p, .step-card p { margin: 0; color: var(--ink-grey); font-size: 0.95rem; }

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--sun);
  color: var(--navy);
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.cta-banner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}
.cta-banner h2 { margin: 0 0 0.25rem; font-size: 1.4rem; color: var(--navy); }
.cta-banner p { margin: 0; color: var(--ink-grey); }

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--ink-grey);
  font-size: 0.85rem;
}
.site-footer nav { display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center; }
.site-footer nav a { color: var(--ink-grey); text-decoration: none; font-weight: 700; }

.contact-section {
  display: flex;
  gap: 2.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
  flex-wrap: wrap;
}
.contact-intro { flex: 1 1 280px; }
.contact-intro h1 { font-size: 1.8rem; color: var(--navy); margin: 0.75rem 0 0.75rem; }
.contact-intro p { color: var(--ink-grey); }
.contact-card { flex: 1 1 320px; align-self: flex-start; }

textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  resize: vertical;
}
textarea:focus { outline: 3px solid var(--sun); outline-offset: 1px; }

.field-error { color: var(--danger); font-size: 0.85rem; margin: -0.75rem 0 1rem; }

/* ---- Public Activities & Resources (apps/content) ------------------
   Reuses the marketing-side .section wrapper and the shared card/badge
   tokens rather than introducing a parallel visual language — these
   pages sit in the same public journey as the landing and contact
   pages, so they should feel like the same site. ---- */

/* Visually hidden but still announced by screen readers — used for the
   "(opens in a new tab)" note on outbound resource links, which sighted
   users get from the arrow glyph instead. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.content-intro { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.content-intro-text { color: var(--ink-grey); font-size: 1.05rem; }

.content-group { margin-bottom: 2.5rem; }
.content-group-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin: 0 0 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}
.content-group-description { color: var(--ink-grey); margin: 0.5rem 0 1rem; }

.content-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.content-card {
  display: block;
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  text-decoration: none;
  color: inherit;
}
.content-card:hover, .content-card:focus-visible {
  border-color: var(--sky);
  box-shadow: 0 3px 12px rgba(22, 35, 63, 0.08);
}
.content-card-title { font-family: var(--font-display); color: var(--sky-dark); margin: 0 0 0.4rem; font-size: 1.1rem; }
.content-card-summary { color: var(--ink-grey); font-size: 0.95rem; margin: 0 0 0.75rem; }
.content-card-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .content-card, .resource-row { transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease; }
  .content-card:hover, .resource-row:hover { transform: translateY(-1px); }
}

/* -- Activity detail -- */
.content-detail { max-width: 780px; }
.content-back-link { display: inline-block; margin-bottom: 1rem; font-weight: 700; text-decoration: none; }
.content-detail-title { font-family: var(--font-display); color: var(--navy); margin: 0 0 0.25rem; }
.content-detail-category { color: var(--sky); font-weight: 700; margin: 0 0 1rem; }
.content-detail-summary { font-size: 1.1rem; color: var(--ink-grey); margin-bottom: 1.5rem; }

.content-detail-panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.content-panel { margin-bottom: 0; }
.content-panel-title { font-family: var(--font-display); font-size: 1.05rem; color: var(--navy); margin: 0 0 0.6rem; }
.content-panel-list { margin: 0; padding-left: 1.1rem; color: var(--ink-grey); }
.content-panel-list li { margin-bottom: 0.35rem; }

/* Admin-authored rich text. Deliberately styles child elements rather
   than requiring the editor to emit our classes — the stored HTML is
   sanitized to a plain tag allowlist (apps/content/sanitize.py), so
   these element selectors are the only reliable styling hook. */
.content-body { line-height: 1.7; }
.content-body h2, .content-body h3, .content-body h4 {
  font-family: var(--font-display);
  color: var(--navy);
  margin: 1.75rem 0 0.5rem;
}
.content-body p { margin: 0 0 1rem; }
.content-body ul, .content-body ol { margin: 0 0 1rem; padding-left: 1.4rem; }
.content-body li { margin-bottom: 0.35rem; }
.content-body img { max-width: 100%; height: auto; border-radius: var(--radius-md); margin: 1rem 0; }
.content-body figure { margin: 1.5rem 0; }
.content-body figcaption { color: var(--ink-grey); font-size: 0.9rem; text-align: center; margin-top: 0.4rem; }
.content-body blockquote {
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1rem;
  border-left: 4px solid var(--sun);
  color: var(--ink-grey);
}
.content-body table { width: 100%; margin: 1rem 0; }
.content-body pre { background: var(--paper); padding: 0.75rem 1rem; border-radius: var(--radius-md); overflow-x: auto; }

.content-detail-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* -- Resources -- */
.resource-list { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }
.resource-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
}
.resource-row:hover, .resource-row:focus-visible { border-color: var(--sky); }
.resource-row-body { flex: 1; }
.resource-row-title { font-family: var(--font-display); color: var(--sky-dark); margin: 0 0 0.25rem; font-size: 1.05rem; }
.resource-row-description { color: var(--ink-grey); font-size: 0.95rem; margin: 0; }
.resource-row-arrow { color: var(--sky); font-size: 1.3rem; flex-shrink: 0; }

/* ---- Registration / verification / individual account -------------- */

.auth-card-wide { max-width: 520px; }
.auth-section-heading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--navy);
  margin: 1.75rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.auth-alt-action { margin-top: 1.25rem; color: var(--ink-grey); font-size: 0.95rem; }
.auth-note-success { color: #16693D; font-weight: 700; }
.auth-org-note { margin-top: 1.5rem; text-align: left; }

.field-help { color: var(--ink-grey); font-size: 0.85rem; margin: -0.75rem 0 1rem; }

/* Informational counterpart to .notice-warning — same card treatment,
   calmer colour, for "here's how this works" rather than "be careful". */
.notice-info {
  background: #EAF2FD;
  border: 2px solid var(--sky);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1rem;
  text-align: left;
  font-size: 0.95rem;
}
.notice-info p { margin: 0; }

/* The student's bookmarkable link — long, and the whole point of the
   page, so it wraps rather than overflowing and gets a monospace
   treatment to make it obviously copyable. */
.student-link-box {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9rem;
  word-break: break-all;
}

/* ---- Plans / pricing (apps/billing) --------------------------------
   Plans are rendered as an indented hierarchy rather than a flat row of
   cards, because the tiering IS the product: a plan nested under another
   is included in it, and that relationship has to be visible or the
   prices look arbitrary. ---- */

.plan-list { display: flex; flex-direction: column; gap: 1rem; max-width: 780px; margin: 0 auto; }
.plan-card {
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-left: 5px solid var(--sky);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}
.plan-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.plan-card-title { font-family: var(--font-display); color: var(--navy); margin: 0 0 0.25rem; font-size: 1.25rem; }
.plan-card-nested { color: var(--sky); font-size: 0.85rem; font-weight: 700; margin: 0 0 0.4rem; }
.plan-card-description { color: var(--ink-grey); margin: 0 0 0.5rem; }
.plan-card-price { text-align: right; white-space: nowrap; }
.plan-price-amount { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--sky-dark); }
.plan-price-period { color: var(--ink-grey); font-size: 0.85rem; }
.plan-card-includes-label { font-weight: 700; font-size: 0.9rem; margin: 0.75rem 0 0.35rem; }
.plan-card-apps { margin: 0 0 1rem; padding-left: 1.2rem; color: var(--ink-grey); font-size: 0.95rem; }
.plan-card-apps li { margin-bottom: 0.2rem; }

.plan-org-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: 780px;
  margin: 2.5rem auto 0;
}

/* ---- Landing page: two-audience layout -----------------------------
   The site now serves two quite different journeys (families who
   self-serve, organizations who talk to us first). These styles exist to
   make that split legible at a glance rather than burying one audience
   in prose aimed at the other. ---- */

.hero-note { margin: 1rem 0 0; color: var(--ink-grey); font-size: 0.95rem; }

.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.audience-card {
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.audience-badge {
  align-self: flex-start;
  background: var(--sky);
  color: white;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}
/* Dark amber rather than --sun itself: the badge is white text, and
   --sun (#F5A800) doesn't carry enough contrast against it. */
.audience-badge-alt { background: #A06A00; }
.audience-card h3 { font-family: var(--font-display); color: var(--navy); margin: 0 0 0.5rem; font-size: 1.25rem; }
.audience-card > p { color: var(--ink-grey); margin: 0 0 1rem; }
.audience-list { margin: 0 0 1.5rem; padding-left: 1.2rem; color: var(--ink-grey); font-size: 0.95rem; }
.audience-list li { margin-bottom: 0.35rem; }
.audience-card .btn { align-self: flex-start; margin-top: auto; }

.free-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}
.free-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--paper-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}
.free-card:hover, .free-card:focus-visible { border-color: var(--sky); }
.free-card h3 { font-family: var(--font-display); color: var(--navy); margin: 0 0 0.4rem; }
.free-card p { color: var(--ink-grey); margin: 0 0 0.6rem; font-size: 0.95rem; }
.free-card-link { color: var(--sky); font-weight: 700; font-size: 0.9rem; }

.cta-banner-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .free-card { transition: border-color 0.12s ease, transform 0.12s ease; }
  .free-card:hover { transform: translateY(-1px); }
}
