:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #1b1f24;
  --muted: #555b63;
  --body: #333a42;
  --border: #dad6cc;
  --border-soft: #e8e5de;
  --teal: #1f7a6d;
  --teal-soft: #e3f0ec;
  --terra: #c2562a;
  --cobalt: #2f5da8;
  --slate: #4a515b;
  --plum: #7a4ea3;
  --ochre: #b5841a;
  --warn: #a8431d;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
h1, h2, h3, .display {
  font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
  letter-spacing: -0.01em;
}
a { color: var(--cobalt); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, svg .tile:focus-visible {
  outline: 3px solid var(--cobalt);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 1000;
}
.skip-link:focus { left: 16px; }
.site-footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px 40px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}
.flag-details { display: inline-block; margin-left: 8px; }
.flag-details summary { cursor: pointer; font-size: 12px; color: var(--muted); list-style: none; text-decoration: underline; }
.flag-details[open] { display: block; margin-top: 6px; padding: 8px 10px; background: var(--bg); border-radius: 8px; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: 20px;
  font-weight: 700;
}
.brand-link:hover { text-decoration: none; }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.nav-pill:hover { background: var(--bg); text-decoration: none; }
.nav-pill.active { background: var(--ink); color: #fff; }
/* A shaded tray behind filter pills so the filter area reads as one control. */
.filter-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--bg); border: 1px solid var(--border-soft); border-radius: 14px; }
.filter-panel.row { flex-direction: row; }
.filter-panel .nav-pill { background: var(--surface); border-color: var(--border-soft); }
.filter-panel .nav-pill:hover { border-color: var(--border); }
.filter-panel .nav-pill.active { background: var(--ink); border-color: var(--ink); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.card-highlight { border: 2px solid var(--ink); }
code { overflow-wrap: anywhere; }
fieldset { min-width: 0; max-width: 100%; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid #c9c5bc;
  background: var(--surface);
  color: var(--ink);
  font: 500 14px Inter, system-ui, sans-serif;
  cursor: pointer;
}
.btn:hover { background: #f1efe9; text-decoration: none; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn-primary:hover { background: #2d333b; }
.btn-outline-dark { border-color: var(--ink); font-weight: 600; }
.btn-pill { border-radius: 999px; }
.btn-pill[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }

.banner {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--teal-soft);
  border: 1px solid var(--teal);
  color: #144f47;
  font-size: 14px;
}
.banner-warn {
  background: #fdf0eb;
  border-color: var(--warn);
  color: #7c2e12;
}

.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; min-width: 0; max-width: 100%; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; max-width: 100%; }
.row > *, .row-between > * { max-width: 100%; min-width: 0; }
select { max-width: 100%; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.studio-layout { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.studio-controls { flex: 1 1 380px; min-width: 0; }
.studio-preview { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; min-width: 0; max-width: 100%; }
.field input[type='text'],
.field input[type='email'],
.field input[type='number'],
.field input[type='date'],
.field input[type='url'],
.field select,
.field textarea {
  min-height: 44px;
  max-width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #c9c5bc;
  background: #fff;
  color: var(--ink);
  font: 500 14px Inter, system-ui, sans-serif;
}
input[type='range'] { width: 100%; accent-color: var(--ink); }

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #f1efe9;
  color: var(--body);
}
.muted { color: var(--muted); font-size: 13px; }
.tile:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }

.gap-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 8px 16px;
}
.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.day-col {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 118px;
}
.day-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 6px;
  background: var(--bg);
}

table.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.compare-table th, table.compare-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}
table.compare-table th { font-weight: 600; color: var(--muted); font-size: 13px; }

@media print {
  body { background: #fff; font-size: 12pt; }
  .topbar, body .no-print { display: none !important; }
  .container { max-width: 100%; padding: 0; }
  .card { break-inside: avoid; border: 1px solid #ccc; }
}

/* ---------------------------------------------------------------------------
   Public landing page (logged-out "/"), direction C "Bold mosaic".
   --------------------------------------------------------------------------- */
.lp { background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.55; }
.lp-wrap { max-width: 1200px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }
/* .lp-h is only used on h1–h3, which already get the display font from the global heading rule. */
.lp-h { letter-spacing: -0.02em; margin: 0; }
.lp-dark { background: var(--ink); color: var(--bg); }
.lp-dark a:not(.lp-btn):not(.lp-brand) { color: #9fd6cb; }
/* The global cobalt focus ring is ~2.6:1 on --ink; use a light ring on the dark bands. */
.lp-dark a:focus-visible { outline-color: #9fd6cb; }
.lp-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.lp-brand { display: flex; align-items: center; gap: 10px; color: var(--bg); font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 700; font-size: 19px; }
.lp-brand:hover { text-decoration: none; }
.lp-btn { display: inline-flex; align-items: center; min-height: 52px; padding: 0 26px; border-radius: 12px; font-weight: 700; font-size: 17px; border: 1px solid transparent; }
.lp-btn:hover { text-decoration: none; }
.lp-btn-light { background: var(--bg); color: var(--ink); }
.lp-btn-light:hover { background: #ffffff; }
.lp-btn-ghost { color: var(--bg); border-color: #555b63; font-weight: 600; }
.lp-btn-ghost:hover { border-color: var(--bg); }
.lp-btn-small { min-height: 44px; padding: 0 18px; font-size: 15px; font-weight: 600; color: var(--bg); border-color: var(--bg); }
.lp-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 56px; padding-top: 56px; padding-bottom: 88px; }
.lp-hero-copy { flex: 1 1 min(480px, 100%); display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.lp-hero h1 { font-size: 76px; line-height: 0.98; letter-spacing: -0.03em; }
.lp-lede { margin: 0; font-size: 20px; color: #d6d3cb; max-width: 520px; }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.lp-fine { margin: 0; font-size: 14px; color: #b9b5ac; }
.lp-hero-art { margin: 0; flex: 1 1 min(400px, 100%); max-width: 520px; width: 100%; }
.lp-hero-img { width: 100%; height: auto; display: block; border-radius: 16px; border: 1px solid rgba(246, 245, 241, 0.22); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28); background: var(--bg); }
.lp-editorial-art { margin: 14px 0 4px; max-width: 440px; }
.lp-editorial-img { width: 100%; height: auto; display: block; border-radius: 14px; border: 1px solid var(--border-soft); background: var(--bg); }
.lp-section { padding-top: 80px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 32px; }
.lp-section h2 { font-size: 40px; line-height: 1.1; max-width: 840px; text-wrap: balance; }
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.lp-card { color: #ffffff; border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; min-height: 260px; }
.lp-card h3 { font-size: 28px; line-height: 1.15; }
.lp-card p { margin: 0; font-size: 17px; }
.lp-card-num { font-family: 'Space Grotesk', Inter, sans-serif; font-weight: 700; font-size: 15px; }
.lp-teal { background: var(--teal); }
.lp-cobalt { background: var(--cobalt); }
.lp-plum { background: var(--plum); }
.lp-band { background: var(--surface); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.lp-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; padding-top: 72px; padding-bottom: 72px; }
.lp-split-intro, .lp-split-curricula { min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.lp-split h2 { font-size: 36px; line-height: 1.12; }
.lp-block { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.lp-label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.lp-sub { margin: 0; color: var(--body); font-size: 17px; }
.lp-note { margin: 0; font-size: 14px; color: var(--muted); }
.lp-curricula-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.lp-count { font-size: 13px; font-weight: 600; color: #144f47; background: var(--teal-soft); padding: 3px 10px; border-radius: 999px; }
.lp-curricula-groups { display: flex; flex-direction: column; gap: 18px; }
.lp-curricula-group { display: flex; flex-direction: column; gap: 8px; }
.lp-group-title { margin: 0; font-size: 14px; font-weight: 600; color: var(--body); font-family: Inter, system-ui, -apple-system, sans-serif; letter-spacing: 0; }
.lp-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.lp-chip-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 0 6px;
  line-height: 1.5;
}
.lp-more { border-top: 1px solid var(--border-soft); padding-top: 14px; }
.lp-more summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--cobalt);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  list-style: none;
}
.lp-more summary::-webkit-details-marker { display: none; }
.lp-more summary::before {
  content: '▸';
  font-size: 12px;
  transition: transform 0.15s ease;
}
.lp-more[open] > summary::before { transform: rotate(90deg); }
.lp-more summary:hover { text-decoration: underline; }
.lp-all-levels {
  margin: 12px 0 0;
  padding: 16px 18px;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr));
  gap: 6px 20px;
  font-size: 13px;
  color: var(--body);
}
.lp-cta-copy { display: flex; flex-direction: column; gap: 8px; }
.lp-cta-note { font-size: 18px; }
.lp-privacy { display: flex; flex-direction: column; gap: 28px; padding-top: 72px; padding-bottom: 72px; }
.lp-privacy h2 { font-size: 32px; line-height: 1.15; }
.lp-privacy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; }
.lp-privacy-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lp-privacy-item h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.lp-privacy-item p { margin: 0; color: var(--body); font-size: 15px; }
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-top: 80px; padding-bottom: 80px; }
.lp-cta h2 { font-size: 44px; line-height: 1.05; }
.lp-foot { border-top: 1px solid #2a2f36; }
.lp-foot .lp-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; padding-bottom: 24px; font-size: 14px; color: #b9b5ac; }
.lp-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
@media (max-width: 860px) {
  .lp-split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
}
@media (max-width: 640px) {
  .lp-hero { padding-top: 24px; padding-bottom: 56px; gap: 32px; }
  .lp-hero h1 { font-size: 48px; }
  .lp-lede { font-size: 18px; }
  .lp-section, .lp-split, .lp-privacy, .lp-cta { padding-top: 56px; padding-bottom: 56px; }
  .lp-section h2, .lp-cta h2 { font-size: 32px; }
  .lp-split h2 { font-size: 30px; }
}

/* Core builder (/children/:id/core) and core summaries — mobile first. */
.core-stats { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.core-stats li { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; font-size: 14px; }
.table-scroll { max-width: 100%; overflow-x: auto; }
.core-start { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.core-start .card, .core-filters .field { min-width: 0; }
.core-start select, .core-filters select { width: 100%; max-width: 100%; min-width: 0; }
.core-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.core-check input { margin-top: 3px; }
.core-subject { margin: 8px 0 0; font-size: 18px; }
.core-strand { display: flex; flex-direction: column; gap: 8px; }
.core-strand-title { margin: 0; font-size: 15px; font-weight: 600; }
.core-tiles { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.core-tile {
  border: 1px solid var(--border-soft);
  border-left: 4px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
  background: var(--surface);
}
.core-tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.core-badge { flex: none; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: #f1efe9; color: var(--body); }
.core-state-core { border-left-color: var(--teal); }
.core-state-needed_first { border-left-color: var(--terra); }
.core-state-known, .core-state-mastered { border-left-color: var(--slate); }
.core-state-later { border-left-color: var(--border); }
.core-badge-core { background: var(--teal-soft); color: #144f47; }
.core-badge-needed_first { background: #fdf0eb; color: #7c2e12; }
.core-badge-known, .core-badge-mastered { background: #e7e9ec; color: #2a2f36; }
.core-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.core-ideas summary { cursor: pointer; font-size: 13px; color: var(--cobalt); }
.core-idea-list { margin: 6px 0 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.core-alignment-body { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.studio-subject-tabs { gap: 8px; }
.core-lens-badge { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px dashed var(--cobalt); color: var(--cobalt); }
.core-summary-text { margin: 0; font-size: 13px; color: var(--body); }
.core-empty { margin: 0; padding: 14px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: 14px; }
/* Controls that need JavaScript (public/app.js adds the "js" class to <html>) stay hidden without it. */
html:not(.js) .js-only { display: none !important; }
.core-lens-picks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.core-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.core-filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: end; }
.core-summary { display: flex; flex-direction: column; gap: 12px; }
.core-summary-strand { display: flex; flex-direction: column; gap: 6px; }
.core-chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.core-chip { font-size: 13px; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border-soft); border-left: 4px solid var(--border); background: var(--surface); max-width: 100%; overflow-wrap: anywhere; }
.core-chip-state { color: var(--muted); font-size: 11px; margin-left: 4px; }
@media (min-width: 720px) {
  .core-start { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .core-tiles { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .core-filters { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
}
@media (max-width: 640px) {
  .container { padding: 16px 16px 48px; }
  .topbar-inner { padding: 10px 16px; }
}

/* Quest drag-sort tokens: pointer drags must not scroll the page on touch screens. */
.quest-token { touch-action: none; }

/* Quest world: the region backdrop with its host, and guild badges (generated art, decorative). */
.quest-stage { position: relative; border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.quest-backdrop { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 14px; }
.quest-backdrop-short { aspect-ratio: 4 / 1; }
.quest-host { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.9); font-weight: 600; }
.quest-portrait { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.quest-badge { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 160px; }
.quest-badge-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.quest-map { position: relative; border-radius: 16px; overflow: hidden; }
.quest-map-img { display: block; width: 100%; height: auto; }
.quest-map-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-glow { fill: #E8A435; opacity: 0.35; }
.map-glow.map-resting { fill: #DAD6CC; opacity: 0.4; }
.map-glow.map-lit { opacity: 0.6; }
.map-lantern { stroke: #1B1F24; stroke-width: 0.4; fill: #F6F5F1; }
.map-lantern.map-ready { fill: #E8A435; }
.map-lantern.map-lit { fill: #FFD27A; }
.map-label { font-size: 2.4px; font-weight: 700; fill: #1B1F24; paint-order: stroke; stroke: #F6F5F1; stroke-width: 0.8px; }
.quest-map-pins a:focus-visible .map-glow { stroke: #1B1F24; stroke-width: 0.6; opacity: 1; }
.map-list { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding-left: 18px; }
.guild-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.quest-badge-empty { background: #E8E5DE; }
.quest-badge-locked figcaption { opacity: 0.7; }
@media (prefers-reduced-motion: no-preference) {
  .map-glow.map-ready { animation: lantern-glow 2.4s ease-in-out infinite; }
}
@keyframes lantern-glow { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.55; } }

/* Shared Five-Pillar UX components (CSP-clean, zero inline styles, 320px safe) */
.subnav-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border-soft);
}
.subnav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 6px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.subnav-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.subnav-pill:hover { background: #efede6; text-decoration: none; }
.subnav-pill.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.chart-svg { display: block; width: 100%; height: auto; max-width: 100%; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; }
.stat-box { background: var(--bg); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-family: 'Space Grotesk', Inter, sans-serif; font-size: 24px; font-weight: 700; color: var(--ink); line-height: 1.15; }
.playpack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.playpack-card { border: 1px solid var(--border); border-left: 5px solid var(--teal); border-radius: 12px; padding: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.playpack-style-concrete { border-left-color: #1F7A6D; }
.playpack-style-narrative { border-left-color: #C2562A; }
.playpack-style-pattern { border-left-color: #2F5DA8; }
.playpack-style-procedural { border-left-color: #4A515B; }
.playpack-style-choice { border-left-color: #7A4EA3; }
.playpack-style-applied { border-left-color: #B5841A; }
.print-doc { max-width: 900px; margin: 0 auto; background: #fff; padding: 28px; border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 18px; }
.print-sig-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.print-sig-line { border-bottom: 1px solid var(--ink); min-height: 28px; margin-bottom: 4px; }
@media (max-width: 640px) {
  /* On phones the planning subnav and the main nav pills scroll sideways in one row instead of wrapping into a
     wall of ~20 pills above the content. */
  .subnav-inner { padding: 6px 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .subnav-pill { flex: 0 0 auto; white-space: nowrap; }
  .nav-links { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; min-width: 0; flex: 1 1 100%; padding-bottom: 2px; scrollbar-width: thin; }
  .nav-links > * { flex: 0 0 auto; white-space: nowrap; }
  .print-doc { padding: 16px; }
}
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .subnav-bar, .site-footer, body .no-print { display: none !important; }
  .container { max-width: 100%; padding: 0; gap: 12px; }
  .card, .print-doc { border: 1px solid #bbb; border-radius: 4px; padding: 12px; break-inside: avoid; box-shadow: none; }
  .table-scroll { overflow: visible; }
  a { color: #000; text-decoration: none; }
}

/* --- Methods & Mapped Curricula Guide (/methods) --- */
.methods-philosophy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.methods-phil-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.methods-phil-active {
  border-color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}
.methods-filter-grid,
.methods-cur-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}
.methods-filter-grid .field,
.methods-cur-filter-grid .field {
  min-width: 0;
}
.methods-filter-grid select,
.methods-filter-grid input,
.methods-cur-filter-grid select,
.methods-cur-filter-grid input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.methods-filter-btn {
  display: flex;
  align-items: flex-end;
}
.methods-cards-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
.methods-routine-card,
.methods-cur-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.methods-meta-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex-shrink: 0;
}
.methods-howto {
  line-height: 1.55;
  color: var(--ink);
}
.methods-details {
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.methods-details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--teal);
}
.methods-skill-list,
.methods-range-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.methods-level-block {
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
}
@media (min-width: 720px) {
  .methods-philosophy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .methods-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .methods-cur-filter-grid {
    grid-template-columns: minmax(0, 180px) minmax(0, 1fr) minmax(0, 180px) auto;
  }
  .methods-meta-col {
    align-items: flex-end;
    text-align: right;
  }
}
@media (min-width: 960px) {
  .methods-philosophy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .methods-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  }
  .methods-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.methods-rec-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.methods-reason-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: var(--teal);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.methods-compare-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

/* --- Worldview filter bar & badges (CSP-clean) --- */
.wv-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.wv-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.wv-badge-secular {
  background: #e6f4f1;
  color: #14594f;
  border-color: #b7dfd6;
}
.wv-badge-neutral {
  background: #eef1f5;
  color: #374151;
  border-color: #d1d8e0;
}
.wv-badge-christian {
  background: #f5eefb;
  color: #5b2d8a;
  border-color: #d9c2f0;
}
.wv-badge-other_faith {
  background: #fef3e8;
  color: #8f4714;
  border-color: #f3cfa7;
}
.wv-badge-mixed {
  background: #f3f1ea;
  color: #4a4538;
  border-color: #d9d3c3;
}

/* --- Crowdsourced Community Signals (privacy-first aggregates & voting) --- */
.community-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  min-width: 0;
  max-width: 100%;
}
.community-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.community-stat {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--body);
}
.community-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.vote-form {
  margin: 0;
  display: inline-flex;
}
.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: 600 12px Inter, system-ui, sans-serif;
  cursor: pointer;
}
.vote-btn:hover {
  background: #f1efe9;
}
.vote-btn.is-active {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: #144f47;
}
.vote-btn-down.is-active {
  background: #fdf0eb;
  border-color: var(--warn);
  color: #7c2e12;
}

/* ---------- Method Profiles, Side-by-Side Compare Mode & Redesigned Component Cards ---------- */

.mp-pill-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.mp-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.mp-pill:hover { background: #f1efe9; text-decoration: none; }
.mp-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.mp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.mp-essence {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  margin: 0;
}
.mp-best-for {
  font-size: 14px;
  color: var(--body);
  margin: 0;
}
.mp-micro-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.mp-style-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  padding: 16px;
}
.mp-honeycomb-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.mp-honeycomb-svg {
  width: 156px;
  height: auto;
  display: block;
}
.mp-style-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mp-style-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
}
.mp-style-legend-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--body);
}
.mp-style-legend-pct {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.mp-mix-bar-svg {
  width: 100%;
  height: 10px;
  display: block;
  border-radius: 999px;
  overflow: hidden;
}

.mp-day-strip-svg {
  width: 100%;
  height: auto;
  display: block;
}
.mp-day-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mp-day-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--body);
}
.mp-day-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}
.mp-swatch-concrete { background: var(--teal); }
.mp-swatch-narrative { background: var(--terra); }
.mp-swatch-pattern { background: var(--cobalt); }
.mp-swatch-procedural { background: var(--slate); }
.mp-swatch-choice { background: var(--plum); }
.mp-swatch-applied { background: var(--ochre); }
.mp-swatch-open { background: #dad4c7; border: 1px solid #bfb8a8; }
.mp-swatch-rhythm { background: var(--cobalt); }
.mp-swatch-outdoors { background: var(--ochre); }

.mp-effort-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mp-effort-row {
  display: grid;
  grid-template-columns: minmax(98px, 120px) minmax(56px, 76px) auto minmax(56px, 76px);
  gap: 8px;
  align-items: center;
  font-size: 13px;
}
.mp-effort-label { font-weight: 600; color: var(--ink); }
.mp-effort-pole { font-size: 12px; color: var(--muted); }
.mp-effort-pole-left { text-align: right; }
.mp-effort-mobile-poles { display: none; }
.cmp-mobile-label { display: none; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 3px; }
.mp-effort-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.mp-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: transparent;
  display: inline-block;
}
.mp-dot.is-filled { background: var(--ink); }

.mp-evidence-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mp-evidence-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.mp-evidence-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f1efe9;
  border: 1px solid var(--border-soft);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.mp-ages-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.mp-age-card {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-top: 3px solid var(--teal);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mp-age-band-0 { border-top-color: var(--teal); }
.mp-age-band-1 { border-top-color: var(--cobalt); }
.mp-age-band-2 { border-top-color: var(--plum); }
.mp-age-band-3 { border-top-color: var(--terra); }

.mp-ring-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.mp-ring-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.mp-ring-sm {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.mp-ring-sm .ring-svg { width: 96px; height: 96px; display: block; }
.mp-ring-sm .mp-ring-hole {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
}
.mp-ring-arrow { font-size: 20px; font-weight: 700; color: var(--muted); }

.mp-dark-callout {
  background: var(--ink);
  color: #ffffff;
  border-radius: 16px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mp-dark-callout .mp-micro-label { color: #b8c0cb; }
.mp-dark-callout p { color: #e6e8ec; margin: 0; }
.mp-btn-light {
  background: #ffffff;
  color: var(--ink);
  border-color: #ffffff;
}
.mp-btn-light:hover { background: #efede8; text-decoration: none; }

.mp-comp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

/* ---------- Redesigned Component Cards ---------- */

.mc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
}
.mc-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.mc-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.chip-method {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--ink);
  color: #ffffff;
  text-decoration: none;
}
.chip-method:hover { opacity: 0.9; text-decoration: none; }
.chip-new {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--teal-soft);
  color: #14594f;
  border: 1px solid #b5d9cf;
}

.mc-style-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.style-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px 3px 5px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid transparent;
}
.style-pill-concrete { background: #e3f0ec; color: #14594f; border-color: #b7dad0; }
.style-pill-narrative { background: #fbece6; color: #8c3a19; border-color: #ecc6b8; }
.style-pill-pattern { background: #e8eef8; color: #1f4482; border-color: #c1d1ee; }
.style-pill-procedural { background: #eceef1; color: #2f353d; border-color: #cfd4dc; }
.style-pill-choice { background: #f2ecf7; color: #573378; border-color: #d6c3e6; }
.style-pill-applied { background: #f9f1de; color: #7a570e; border-color: #e4cf9b; }

.cadence-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.cadence-days {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.cadence-day {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ece9e2;
  color: #82878f;
}
.cadence-day.is-on {
  background: var(--ink);
  color: #ffffff;
}

.mc-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.skill-hex-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.skill-hex-tile {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  color: var(--body);
  font-size: 12px;
  text-decoration: none;
  max-width: 100%;
}
.skill-hex-tile:hover {
  border-color: var(--teal);
  color: var(--ink);
  text-decoration: none;
}
.skill-hex-more { font-size: 12px; color: var(--muted); }
.skill-hex-more summary { cursor: pointer; font-weight: 600; }

/* ---------- Side-by-Side Compare Mode (/methods/compare) ---------- */

.cmp-selector-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.cmp-selector-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.cmp-selector-card {
  border-top: 4px solid var(--teal);
}
.cmp-accent-concrete { border-top-color: var(--teal); }
.cmp-accent-narrative { border-top-color: var(--terra); }
.cmp-accent-pattern { border-top-color: var(--cobalt); }
.cmp-accent-procedural { border-top-color: var(--slate); }
.cmp-accent-choice { border-top-color: var(--plum); }
.cmp-accent-applied { border-top-color: var(--ochre); }

.cmp-diff-list {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: #e6e8ec;
}
.cmp-blend-idea {
  margin: 8px 0 0;
  padding-top: 10px;
  border-top: 1px solid #353c45;
  font-size: 14px;
  color: #ffffff;
}

.cmp-butterfly-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(136px, 168px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}
.cmp-butterfly-side {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}
.cmp-butterfly-side-right {
  grid-template-columns: minmax(0, 1fr) 38px;
}
.cmp-butterfly-center {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.cmp-bar-svg {
  width: 100%;
  height: 12px;
  display: block;
}
.cmp-pct {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.cmp-pct-right { text-align: right; }

.cmp-3col-style-row {
  display: grid;
  grid-template-columns: minmax(120px, 150px) repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}
.cmp-3col-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
  align-items: center;
}

.cmp-day-trail {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

.cmp-effort-2-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 210px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cmp-effort-2-row:last-child { border-bottom: none; }
.cmp-effort-3-row {
  display: grid;
  grid-template-columns: minmax(130px, 180px) repeat(3, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cmp-effort-3-row:last-child { border-bottom: none; }
.cmp-effort-center { text-align: center; }

.cmp-ages-2-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cmp-ages-2-row:last-child { border-bottom: none; }
.cmp-ages-left { text-align: right; }
.cmp-ages-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}
.cmp-ages-3-row {
  display: grid;
  grid-template-columns: 72px repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cmp-ages-3-row:last-child { border-bottom: none; }

.evidence-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.evidence-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
}
.evidence-chip.is-shared {
  background: var(--teal-soft);
  border-color: var(--teal);
  color: #14594f;
  font-weight: 600;
}

@media (max-width: 1020px) {
  .mp-hero { grid-template-columns: 1fr; }
  .mp-ages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-comp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .mp-pill-strip { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .mp-honeycomb-row { grid-template-columns: 1fr; justify-items: start; }
  .mp-ages-grid { grid-template-columns: 1fr; }
  .mp-comp-grid { grid-template-columns: 1fr; }
  .mp-effort-row { grid-template-columns: minmax(0, 1fr) auto; }
  .mp-effort-pole { display: none; }
  .mp-effort-mobile-poles { display: block; }
  .cmp-mobile-label { display: block; }
  .cmp-selector-grid-2, .cmp-selector-grid-3 { grid-template-columns: 1fr; }
  .cmp-butterfly-row { grid-template-columns: minmax(0, 1fr) minmax(96px, 124px) minmax(0, 1fr); gap: 6px; }
  .cmp-butterfly-side { grid-template-columns: 30px minmax(0, 1fr); gap: 4px; }
  .cmp-butterfly-side-right { grid-template-columns: minmax(0, 1fr) 30px; }
  .cmp-butterfly-center { font-size: 12px; }
  .cmp-effort-2-row { grid-template-columns: 1fr; text-align: left; }
  .cmp-effort-center { text-align: left; }
  .cmp-ages-2-row { grid-template-columns: 1fr; }
  .cmp-ages-left { text-align: left; }
  .cmp-3col-style-row, .cmp-effort-3-row, .cmp-ages-3-row { grid-template-columns: 1fr; }
  .cmp-3col-cell { grid-template-columns: 1fr; }
}

/* Workbooks, Multi-Page OCR Scanner & Adaptive Step-Up UI */
.wb-section { margin-top: 20px; }
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
.wb-card { display: flex; flex-direction: column; gap: 10px; }
.wb-card-inactive { opacity: 0.85; }
.wb-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.wb-card-title { margin: 2px 0; font-size: 1.1rem; }
.wb-card-meta { margin: 0; font-size: 0.9rem; }
.wb-stats-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.88rem; color: var(--muted, #555b63); }
.wb-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.wb-lifecycle-row { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--border, #e2ded6); }
.wb-score-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; }
.badge-good { background: #e3f3ee; color: #145a4f; }
.badge-accent { background: #e6eefc; color: #1d478a; }
.badge-warn { background: #fdeee7; color: #9c3b15; }
.badge-neutral { background: #eceae4; color: #3d434a; }
.wb-rec-stack { display: flex; flex-direction: column; gap: 12px; }
.wb-rec-card { border-left: 4px solid #1f7a6d; }
.wb-rec-focus { border-left-color: #c2562a; }
.wb-rec-info { border-left-color: #2f5da8; }
.wb-rec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wb-rec-title { margin-top: 6px; font-size: 1.05rem; }
.wb-rec-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.wb-rec-rationale { margin: 8px 0 4px; }
.wb-next-list { margin: 6px 0 0 18px; }
.wb-cover-box { padding: 14px; border-radius: 10px; background: #f6f5f1; margin-bottom: 16px; }
.wb-cover-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.wb-picker-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.88rem; font-weight: 600; }
.wb-filter-bar { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.wb-full-field { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.wb-summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 14px; }
.wb-stat-box { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 8px; background: #f6f5f1; }
.wb-stat-box strong { font-size: 1.25rem; }
.wb-stat-box span { font-size: 0.82rem; color: var(--muted, #555b63); }
.wb-thumb-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.wb-thumb-card { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border, #dcd7cd); background: #fff; font-size: 0.85rem; }
.wb-redaction-bar { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.wb-manual-details { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border, #e2ded6); }
.wb-log-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.wb-table-wrap { overflow-x: auto; margin-top: 10px; }
.wb-warn-banner { border-left: 4px solid #c2562a; background: #fff8f4; margin-top: 12px; }
.wb-score-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.wb-live-score { text-align: right; padding: 8px 14px; border-radius: 10px; background: #f6f5f1; }
.wb-live-score strong { display: block; font-size: 1.5rem; }
.wb-low-conf-row { background: #fff8ee; }
.wb-input-sm { width: 110px; }
.wb-input-md { width: 150px; }
.wb-input-lg { width: 220px; }
.wb-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; margin-top: 16px; }
.wb-quote { margin: 10px 0 0; padding: 10px 14px; border-left: 3px solid #1f7a6d; background: #f6f5f1; font-style: italic; }
.wb-skill-checks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.wb-stepup-card { border-left: 4px solid #2f5da8; margin-top: 16px; }
.wb-stepup-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.wb-catchup-list { margin: 8px 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.wb-poll-card { border-left: 4px solid #2f5da8; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }

/* Interactive Learning Labs (Beaver Watershed & Youth Homestead Club) — zero inline styles */
.lab-canvas-shell { padding: 12px; background: #f6f5f1; }
.lab-scene-canvas { width: 100%; height: auto; display: block; border-radius: 10px; border: 1px solid var(--border, #dcd7cd); background: #eef6f4; }
.lab-tier-list { display: flex; flex-direction: column; gap: 8px; }
.lab-tier-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border, #dcd7cd); background: #fff; text-decoration: none; color: inherit; }
.lab-tier-link:hover { border-color: #1f7a6d; background: #f4faf8; }
.lab-tier-recommended { border-color: #1f7a6d; background: #eef7f4; }
.lab-col-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.lab-col-card { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 10px; border: 1px solid var(--border, #dcd7cd); background: #fff; }
.lab-col-title { font-size: 0.85rem; font-weight: 600; }
.lab-col-stack { display: flex; flex-wrap: wrap; gap: 4px; min-height: 24px; }
.lab-mat-chip { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; color: #fff; }
.lab-mat-stone { background: #6b7680; }
.lab-mat-stick { background: #8c5b32; }
.lab-mat-mud { background: #5c4934; }
.lab-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.lab-metric { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #f6f5f1; border: 1px solid var(--border, #e2ded6); }
.lab-metric span { font-size: 0.82rem; color: var(--muted, #555b63); }
.lab-metric strong { font-size: 1.1rem; }
.lab-gauge-card { padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--border, #dcd7cd); display: flex; flex-direction: column; gap: 6px; }
.lab-gauge-head { display: flex; justify-content: space-between; font-size: 0.9rem; }
.lab-gauge-svg { width: 100%; height: 14px; display: block; }
.lab-gauge-track { fill: #e6e4dd; }
.lab-tone-teal { fill: #1f7a6d; }
.lab-tone-sage { fill: #589464; }
.lab-tone-amber { fill: #c47a2c; }
.lab-tone-navy { fill: #2f5da8; }
.lab-growth-svg { width: 100%; height: auto; display: block; }
.lab-chart-bg { fill: #f6f5f1; stroke: #dcd7cd; }
.lab-chart-line { stroke: #1f7a6d; stroke-width: 3; }
.lab-chart-dot { fill: #1f7a6d; }
.lab-carton-svg { width: 100%; max-width: 260px; height: auto; display: block; }
.lab-egg-filled { fill: #f3dfba; stroke: #a67c52; stroke-width: 2; }
.lab-egg-empty { fill: #eceae4; stroke: #c8c3b8; stroke-width: 1.5; stroke-dasharray: 3 2; }
.lab-punnett-table { width: 100%; border-collapse: collapse; text-align: center; }
.lab-punnett-table th, .lab-punnett-table td { border: 1px solid var(--border, #dcd7cd); padding: 8px; }
.lab-punnett-table th { background: #eef5f3; font-weight: 700; }
.lab-completion-card { padding: 14px; border-radius: 10px; border: 1px solid var(--border, #dcd7cd); border-left: 4px solid #1f7a6d; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.lab-caption-strip { padding: 10px 14px; border-radius: 8px; background: #fffdf7; border: 1px solid #d9d2c2; font-weight: 600; color: #1b1f24; }
.lab-safety-box { padding: 12px 14px; border-radius: 10px; background: #fdf6e9; border: 1px solid #e6c68a; border-left: 4px solid #c47a2c; display: flex; flex-direction: column; gap: 6px; }
.lab-tile-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; display: block; background: #ece9e0; }




/* Destructive confirm steps (<details> "Are you sure?" pattern) and danger buttons */
.btn-danger { background: #a3361c; border-color: #a3361c; color: #fff; font-weight: 600; }
.btn-danger:hover { background: #87301a; }
.wb-confirm { margin-top: 12px; }
.wb-confirm > summary { list-style: none; display: inline-flex; cursor: pointer; }
.wb-confirm > summary::-webkit-details-marker { display: none; }
.wb-confirm[open] > form { margin-top: 8px; padding: 12px; border: 1px solid #e3c9bf; border-radius: 8px; background: #fff8f4; }
.wb-thumb-img { width: 96px; height: auto; border-radius: 4px; border: 1px solid var(--border, #dcd7cd); }
.wb-added-row input::placeholder { color: #8a8f96; }
.wb-extra-skills { margin: 8px 0; }

/* Books shelf & book reports */
.list-stack-4 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.br-transcript { white-space: pre-wrap; }

/* === #16 Chalkboard Letter Studio === */
.chalk-board-shell { padding: 14px; background: #f3eadb; border-color: #c9a77c; }
.chalk-canvas-frame { padding: 10px; border-radius: 14px; background: linear-gradient(145deg, #9c6538, #7b4a22); box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.28); }
.chalk-canvas { width: 100%; height: auto; display: block; border-radius: 10px; background: #1b2e27; touch-action: none; cursor: crosshair; }
.chalk-canvas:focus-visible { outline: 3px solid #ffe082; outline-offset: 2px; }
.chalk-tray { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #8c5930; color: #fff8eb; }
.chalk-tray-left { flex-direction: row-reverse; }
.chalk-swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chalk-swatch { min-width: 48px; min-height: 48px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, 0.35); cursor: pointer; font-weight: 700; font-size: 0.78rem; color: #1b2e27; display: inline-flex; align-items: center; justify-content: center; }
.chalk-swatch-active { border-color: #fff; box-shadow: 0 0 0 3px #ffe082; }
.chalk-swatch-cream { background: #fff8e7; }
.chalk-swatch-peach { background: #ffd6a5; }
.chalk-swatch-mint { background: #caffbf; }
.chalk-swatch-sky { background: #a0c4ff; }
.chalk-swatch-lilac { background: #ffc6ff; }
.chalk-find-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 12px; }
.chalk-find-tile { min-height: 68px; min-width: 68px; border-radius: 12px; border: 2px solid #96b8ab; background: #1b2e27; color: #fff8e7; font-size: 2rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.chalk-find-tile:hover, .chalk-find-tile:focus-visible { border-color: #ffe082; background: #243e35; outline: 2px solid #ffe082; outline-offset: 2px; }
.chalk-find-tile-hit { border-color: #a7f3d0; background: #1f5446; }
.chalk-demo-banner { padding: 10px 14px; border-radius: 10px; background: #eef7f4; border: 1px solid #98c7ba; color: #163b33; font-weight: 600; }
.chalk-stop-card { padding: 18px; border-radius: 12px; background: #f8f4e8; border: 2px solid #1f7a6d; }
.chalk-celebration-img { width: 100%; max-width: 360px; height: auto; border-radius: 10px; border: 1px solid #d9d0bd; display: block; }
.reporter-desk-banner { width: 100%; max-height: 140px; object-fit: cover; border-radius: 10px; margin-bottom: 10px; display: block; }
.chalk-btn-touch { min-height: 48px; min-width: 48px; }
.chalk-print-sheet { display: flex; flex-direction: column; gap: 12px; }
.chalk-print-row { position: relative; padding: 10px 12px; border: 1px solid #dcd7cd; border-radius: 8px; background: #fff; }
.chalk-print-guides { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.chalk-line-sky { border-top: 1.5px solid #6baed6; }
.chalk-line-fence { border-top: 1.5px dashed #74c476; }
.chalk-line-grass { border-top: 2px solid #8c6d46; }
.chalk-line-worm { border-top: 1px dotted #a9746e; }
.chalk-print-sample { font-size: 1.45rem; font-weight: 700; letter-spacing: 0.18em; color: #3d4852; }
/* === End #16 Chalkboard Letter Studio === */

/* === #17 La Plaza Spanish === */
.plaza-shell { color: #1b1f24; }
.plaza-svg { width: 100%; height: auto; border-radius: 12px; border: 1px solid #d8d0c0; background: #f6f5f1; display: block; }
.plaza-svg-sky { fill: #eaf2fb; }
.plaza-svg-ground { fill: #f1e6d2; }
.plaza-svg-bunting { fill: none; stroke: #c2562a; stroke-width: 3; stroke-dasharray: 8 6; }
.plaza-svg-fountain { fill: #2f5da8; opacity: 0.85; }
.plaza-svg-parrot-body { fill: #1f7a6d; }
.plaza-svg-parrot-beak { fill: #e3b341; }
.plaza-svg-parrot-eye { fill: #1b1f24; }
.plaza-svg-bldg-group { cursor: pointer; }
.plaza-svg-bldg-group:focus-visible rect { stroke: #1b1f24; stroke-width: 4; }
.plaza-svg-bldg-built { fill: #fff8ec; stroke: #c2562a; stroke-width: 2.5; }
.plaza-svg-bldg-open { fill: #f6f5f1; stroke: #2f5da8; stroke-width: 2; }
.plaza-svg-bldg-future { fill: #ece9e0; stroke: #a8a296; stroke-width: 1.5; stroke-dasharray: 4 3; }
.plaza-svg-bldg-active { stroke: #1f7a6d; stroke-width: 3.5; }
.plaza-svg-roof-built { fill: #c2562a; }
.plaza-svg-roof-open { fill: #2f5da8; }
.plaza-svg-label { fill: #1b1f24; font-size: 10px; font-weight: 700; }

.plaza-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.plaza-word-card { padding: 12px; border-radius: 12px; border: 2px solid #dcd5c7; background: #fffdf8; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.plaza-word-trigger { background: transparent; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #1b1f24; padding: 8px; border-radius: 10px; }
.plaza-word-trigger:focus-visible { outline: 3px solid #2f5da8; outline-offset: 2px; }
.plaza-touch-lg { min-height: 64px; min-width: 64px; }
.plaza-emoji-lg { font-size: 2rem; line-height: 1.1; }
.plaza-emoji { font-size: 1.5rem; }
.plaza-word-es { font-size: 1.1rem; color: #1b1f24; }
.plaza-alt-pill { padding: 6px 8px; border-radius: 8px; background: #eef4fb; border: 1px solid #2f5da8; color: #19386b; font-size: 0.85rem; font-weight: 600; }
.plaza-prompt-banner { padding: 12px 14px; border-radius: 10px; background: #fdf5e7; border: 1px solid #e3b341; border-left: 5px solid #c2562a; font-weight: 600; color: #1b1f24; }
.plaza-error-banner { background: #fdf0ec; border: 1px solid #c2562a; color: #7a240e; }
.plaza-warm-glow { border-color: #c2562a; box-shadow: 0 0 0 4px rgba(227, 179, 65, 0.45); background: #fff9ea; }
.plaza-card-matched { border-color: #1f7a6d; background: #eef7f5; }
.plaza-pot-active { outline: 3px solid #1b1f24; outline-offset: 2px; }
.plaza-paint-rojo { background: #fbe9e5; border-color: #c2562a; color: #7a240e; }
.plaza-paint-azul { background: #e8f0fc; border-color: #2f5da8; color: #173668; }
.plaza-paint-verde { background: #e6f5f2; border-color: #1f7a6d; color: #104940; }
.plaza-paint-amarillo { background: #fdf6dc; border-color: #b58918; color: #543e05; }
.plaza-karaoke-line { padding: 8px 12px; border-radius: 8px; border: 1px solid #e2dccf; background: #fff; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.plaza-karaoke-active { border-color: #c2562a; background: #fff7eb; }

/* Gender shape + colour chips (▲ teal masculine, ● orange feminine — accessible, never colour-alone) */
.plaza-chip { padding: 10px 14px; min-height: 44px; border-radius: 999px; border: 2px solid #8a8377; background: #fff; color: #1b1f24; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.plaza-chip-masc { border-color: #1f7a6d; background: #e5f5f2; color: #0e473f; }
.plaza-chip-fem { border-color: #c2562a; background: #fceee8; color: #7e2b0d; }
.plaza-chip-tray { min-height: 56px; padding: 10px; border-radius: 10px; border: 2px dashed #b9b1a1; background: #f6f5f1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plaza-coin-btn { min-width: 56px; min-height: 44px; border-radius: 999px; font-weight: 700; border: 2px solid #c2562a; background: #fff9eb; color: #5e2c0b; }
.plaza-dialogue-choice { text-align: left; white-space: normal; min-height: 44px; justify-content: flex-start; }

/* Parent hub helpers */
.plaza-fieldset { border: 1px solid #dcd5c7; border-radius: 10px; padding: 10px 12px; }
.plaza-check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.plaza-speaking-box { border-left: 4px solid #1f7a6d; background: #f4faf8; }
.plaza-word-print-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.plaza-word-print-card { padding: 10px; border: 1px solid #d8d0c0; border-radius: 8px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.plaza-hidden { display: none; }
.plaza-ml-8 { margin-left: 8px; }

@keyframes plaza-wiggle-kf {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-3deg); }
  75% { transform: rotate(3deg); }
}
.plaza-wiggle { animation: plaza-wiggle-kf 0.35s ease-in-out; }

@media (prefers-reduced-motion: reduce) {
  .plaza-wiggle { animation: none; }
}
.plaza-lola-row { display: flex; align-items: center; gap: 12px; }
.plaza-lola-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid #1f7a6d; flex-shrink: 0; background: #f6f5f1; }
.plaza-lola-speech { padding: 8px 12px; border-radius: 10px; background: #f6f5f1; border: 1px solid #d8d0c0; flex: 1; }
.plaza-backdrop-wrap { position: relative; border-radius: 12px; overflow: hidden; background-image: url('/static/art/la-plaza/plaza-backdrop.webp'); background-size: cover; background-position: center; }
.plaza-backdrop-wrap .plaza-svg { background: rgba(246, 245, 241, 0.72); }
.plaza-theme-scene-img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; border: 1px solid #d8d0c0; display: block; }
/* === End #17 La Plaza Spanish === */

/* === Log sheet (shared by Family Home and Play & Observe) === */
.sheet {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0 auto;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 10px 20px 24px;
  border: 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 -12px 40px rgba(27, 31, 36, 0.22);
  z-index: 900;
}
.sheet::backdrop { background: rgba(27, 31, 36, 0.45); }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(27, 31, 36, 0.45); z-index: 899; }
.sheet[open] + .sheet-backdrop { display: block; }
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--border); margin: 0 auto 12px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-eyebrow { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sheet-title { margin: 2px 0 0; font-size: 24px; line-height: 1.2; }
.sheet-close { min-width: 44px; padding: 0; font-size: 20px; }
.sheet-body { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.sheet-legend { padding: 0; margin: 0 0 8px; font-weight: 600; font-size: 16px; }
.sheet [hidden] { display: none !important; }
.sheet fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.sheet-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fbeae3; color: var(--warn); font-weight: 600; }
@media (min-width: 720px) {
  .sheet { inset: 6vh 0 auto 0; border-radius: 22px; padding: 18px 28px 28px; }
  .sheet-grab { display: none; }
}

.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice-card {
  display: block;
  position: relative;
  padding: 12px 16px;
  border: 2px solid var(--border-soft);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
}
.choice-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-card-label { display: block; font-weight: 600; font-size: 16px; }
.choice-card-desc { display: block; color: var(--body); font-size: 14px; }
.choice-card:hover { border-color: var(--border); }
.choice-card:has(input:checked) { border-color: var(--ink); background: #f1efe9; }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.choice-row .choice-card { text-align: center; }

.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}
.chip-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-toggle-check { display: none; }
.chip-toggle:has(input:checked) { background: var(--ink); color: #fff; }
.chip-toggle:has(input:checked) .chip-toggle-check { display: inline; }
.chip-toggle:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }

.level-row { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.level-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.level-row-name { margin: 0; font-size: 16px; font-weight: 600; }
.level-row-joined { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--teal-soft); color: #145a4f; }
.level-row[hidden] { display: none; }

.sheet-save { width: 100%; min-height: 52px; font-size: 16px; }
.sheet-save:disabled { background: #e8e5de; border-color: #8a8f96; color: #3d4148; cursor: not-allowed; }
.sheet-photo-drop { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1.5px dashed var(--border); border-radius: 14px; background: #faf9f6; }
/* === End log sheet === */

/* === Family Home === */
.home-status { font-size: 17px; font-weight: 600; color: var(--body); }
.needs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.needs-item > .btn { flex: none; white-space: nowrap; }
.needs-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 12px; }
.today-blocks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.today-block { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); }
.today-block.is-done { background: #f6f5f1; }
.today-block-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.today-block-title { font-weight: 600; }
.home-mosaic { display: flex; align-items: center; gap: 14px; color: var(--ink); padding: 8px 0 0; }
.home-mosaic:hover { text-decoration: none; }
.home-mosaic-art { display: block; width: 168px; flex: none; }
.home-week-bar { max-width: 380px; }
.menu-more { position: relative; }
.menu-more > summary { list-style: none; }
.menu-more > summary::-webkit-details-marker { display: none; }
.menu-more-list { position: absolute; z-index: 20; left: 0; top: calc(100% + 6px); min-width: 200px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(27, 31, 36, 0.12); }
.menu-more-list a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); }
.menu-more-list a:hover { background: #f1efe9; text-decoration: none; }
@media (max-width: 520px) {
  .home-mosaic { flex-direction: column; align-items: flex-start; }
}
/* === End Family Home === */

/* === Editorial Illustrations (Sign-In, Early Years, Methods, Empty States) === */
.signin-art-img { width: 100%; height: auto; max-height: 185px; object-fit: cover; display: block; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--bg); }
@media (max-width: 640px) {
  .signin-art-img { max-height: 120px; }
}

.ey-theme-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.ey-theme-tile { display: flex; flex-direction: column; background: var(--surface); border: 1.5px solid var(--border-soft); border-radius: 12px; overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
.ey-theme-tile:hover { border-color: var(--teal); text-decoration: none; transform: translateY(-1px); }
.ey-theme-tile.active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.ey-theme-tile.active:focus-visible { outline-offset: 4px; }
.ey-theme-img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; display: block; background: var(--bg); }
.ey-theme-label { padding: 7px 8px; font-size: 0.82rem; font-weight: 600; line-height: 1.25; }
.ey-theme-tile.active .ey-theme-label { background: var(--ink); color: #fff; }
@media (max-width: 900px) { .ey-theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) {
  .ey-theme-grid { display: flex; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .ey-theme-tile { flex: 0 0 132px; scroll-snap-align: start; }
}

.connect-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.connect-hero > div { flex: 1; min-width: 0; }
.connect-vignette-img { width: 210px; flex: none; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--bg); display: block; }
@media (max-width: 680px) {
  .connect-hero { flex-direction: column; }
  .connect-vignette-img { width: 100%; max-width: 280px; }
}

.method-spot-wrap { border-radius: 10px; overflow: hidden; border: 1px solid var(--border-soft); background: var(--bg); }
.method-spot-img { width: 100%; height: auto; aspect-ratio: 3 / 2; max-height: 150px; object-fit: cover; display: block; }
.mp-spot-img { width: 100%; max-width: 240px; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-soft); background: var(--bg); display: block; margin-bottom: 6px; }

.empty-state-card { display: flex; align-items: center; gap: 18px; }
.empty-state-img { width: 180px; flex: none; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 12px; border: 1px solid var(--border-soft); background: var(--bg); display: block; }
@media (max-width: 600px) {
  .empty-state-card { flex-direction: column; align-items: flex-start; }
  .empty-state-img { width: 100%; max-width: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  .ey-theme-tile { transition: none; }
  .ey-theme-tile:hover { transform: none; }
}
/* === End Editorial Illustrations === */

/* ---------------------------------------------------------------------------------------------------------
   Early Years: page tabs, Overview (Today row, What you've noticed, Recent moments, visit notes) and Daily rhythm
   (timeline, settings, picture strip, chooser). Colours of rhythm kinds live in views-early-years-day.ts. */
.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; }
.fieldset-plain { padding: 0; border: 0; min-width: 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.ey-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-top: 8px; scrollbar-width: none; }
.ey-tab { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; color: var(--muted); font-weight: 500; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ey-tab:hover { color: var(--ink); text-decoration: none; }
.ey-tab.active { color: var(--ink); border-bottom-color: var(--ink); font-weight: 600; }
.ey-tab-note { font-size: 11px; font-weight: 500; color: var(--muted); background: var(--bg); border: 1px solid var(--border-soft); border-radius: 999px; padding: 1px 7px; }

/* Overview */
.today-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.today-card { border-top: 4px solid var(--border); }
.today-card-idea { border-top-color: var(--terra); }
.today-card-rhyme { border-top-color: var(--plum); }
.today-card-title { font-size: 18px; font-weight: 700; }
.now-items { list-style: none; margin: 0; padding: 0; }
.now-item { display: flex; align-items: center; gap: 12px; }
.now-item[hidden] { display: none; }
.stack-2 { display: flex; flex-direction: column; gap: 2px; }
.day-bar { display: block; width: 100%; height: 20px; }
.day-bar-mini { height: 14px; }
.day-bar rect.is-now { stroke: var(--ink); stroke-width: 3; vector-effect: non-scaling-stroke; }

.start-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.start-step { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); }
.start-step-num { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 14px; }
.start-step.is-done .start-step-num { background: var(--teal); }
.start-step.is-done { background: var(--teal-soft); }

.noticed-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 12px; }
.noticed-area { --area: var(--slate); display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border-soft); border-top: 4px solid var(--area); border-radius: 12px; background: var(--surface); }
.noticed-area.area-talking_listening { --area: var(--terra); }
.noticed-area.area-early_maths { --area: var(--cobalt); }
.noticed-area.area-movement_practical { --area: var(--teal); }
.noticed-area.area-feelings_social { --area: var(--plum); }
.noticed-area.area-making_exploring { --area: var(--ochre); }
.noticed-area-title { display: flex; align-items: flex-start; gap: 6px; font-size: 15px; font-weight: 700; }
.area-icon { flex: none; color: var(--area); margin-top: 2px; }
.noticed-link { margin-top: auto; font-size: 14px; font-weight: 600; }
.noticed-levels, .noticed-key { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.noticed-key { gap: 6px 14px; font-size: 13px; align-items: center; }
.noticed-key li { display: inline-flex; align-items: center; gap: 6px; }
.noticed-sq { --area: var(--slate); display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--area); background: transparent; }
.noticed-area .noticed-sq { border-color: var(--area); }
.noticed-sq.stage-developing { background: color-mix(in srgb, var(--area) 30%, #fff); }
.noticed-sq.stage-secure { background: var(--area); }

.moments { list-style: none; margin: 0; padding: 0; }
.moment { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border-soft); }
.moment-day { font-size: 14px; font-weight: 600; }
.moment-level { color: var(--teal); }
.visit-card { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; background: var(--bg); }
.visit-card > .stack-4 { flex: 1 1 320px; }
.visit-lines { display: grid; gap: 22px; padding-top: 8px; }
.visit-lines span { display: block; border-bottom: 1px solid var(--border); }

/* Daily rhythm */
.rhythm-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .rhythm-layout { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; } }
.rhythm-timeline { list-style: none; margin: 0; padding: 0; }
.rhythm-row { display: grid; grid-template-columns: 52px 32px minmax(0, 1fr); gap: 12px; padding: 14px 8px; border-top: 1px solid var(--border-soft); border-radius: 10px; scroll-margin-top: 80px; }
.rhythm-row.is-now { background: var(--teal-soft); }
.rhythm-time { font-size: 13px; line-height: 1.3; text-align: right; display: flex; flex-direction: column; }
.rhythm-title { font-size: 16px; font-weight: 700; }
.rhythm-body { min-width: 0; }
.chip-soft { font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border-soft); color: var(--body); }
.badge-now { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--teal); color: #fff; }
.badge-now[hidden] { display: none; }
.rhythm-idea { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; border-left: 3px solid var(--ochre); border-radius: 8px; background: var(--bg); font-size: 14px; }
.btn-done { background: var(--teal-soft); border-color: var(--teal); color: var(--teal); font-weight: 600; }
.rhythm-icon { flex: none; display: block; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented-option { position: relative; }
.segmented-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented-option span { display: flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid var(--border); border-radius: 10px; font-weight: 600; background: var(--surface); }
.segmented-option input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.segmented-option input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }
[data-autosubmit-btn][hidden] { display: none; }
.picture-strip-mini { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }

.rhythm-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.rhythm-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rhythm-choices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rhythm-choice { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--border-soft); border-radius: 12px; background: var(--surface); }
.rhythm-choice.in-use { border: 2px solid var(--ink); }
.rhythm-choice-title { font-size: 16px; font-weight: 700; }
.badge-suggested { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal); }
.badge-in-use { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--ink); color: #fff; }
.btn-in-use:disabled { background: var(--bg); color: var(--body); border-color: var(--border); opacity: 1; cursor: default; }
.rhythm-choice-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.see-day > summary { list-style: none; cursor: pointer; }
.see-day > summary::-webkit-details-marker { display: none; }
.see-day[open] { flex-basis: 100%; }
.see-day-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.see-day-list li { display: grid; grid-template-columns: 84px 20px 1fr; gap: 8px; align-items: center; }
.see-day-time { color: var(--muted); }

.picture-strip-print ol { list-style: none; margin: 0; padding: 16px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; border: 2px dashed var(--border); border-radius: 16px; background: var(--surface); }
.picture-strip-print li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
@media print {
  .picture-strip-print ol { border-color: #999; gap: 10px; padding: 10px; }
  .picture-strip-print svg rect, .rhythm-icon rect { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .visit-notes { border: none; padding: 0; }
}

/* First visit to Settings: family-wide settings fold away behind one disclosure. */
.first-run-more { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 16px 22px; }
.first-run-more > summary { cursor: pointer; }
.first-run-more-body { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }

/* Activities (per child), the welcome page after adding a child, and Home "Try this week". */
.activity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 16px; }
.activity-card { display: flex; flex-direction: column; border: 1px solid var(--border-soft); border-radius: 14px; background: var(--surface); overflow: hidden; min-width: 0; }
.activity-card.is-pack { border-top: 4px solid var(--teal); }
.activity-img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: var(--bg); }
.activity-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.activity-title { font-size: 17px; font-weight: 700; }
.activity-actions { margin-top: auto; padding-top: 4px; }
.activity-all-link { align-self: flex-start; }
.activity-more { display: block; }
.activity-more[open] > summary { margin-bottom: 16px; }
.activity-more > summary { list-style: none; cursor: pointer; align-self: flex-start; }
.activity-more > summary::-webkit-details-marker { display: none; }
.activity-more .when-open { display: none; }
.activity-more[open] .when-open { display: inline; }
.activity-more[open] .when-closed { display: none; }

/* Learning Lab #18: La Ruta Secreta — Spanish Mystery & World Expedition */
.ruta-map-frame { background: #eef6fb; border-color: #c7dce8; }
.ruta-map-frame canvas.is-travel-ready { cursor: pointer; }
.ruta-board-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.95fr); gap: 16px; align-items: start; }
@media (max-width: 860px) {
  .ruta-board-grid { grid-template-columns: 1fr; }
}
.ruta-hint-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px dashed var(--teal);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ruta-hint-chip.is-revealed {
  border-style: solid;
  background: #e6f4f1;
  color: #124943;
}
.ruta-departure-board {
  list-style: none;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #1b2838;
  color: #f8e7b4;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  display: grid;
  gap: 6px;
}
.ruta-choice-btn { text-align: left; justify-content: flex-start; white-space: normal; height: auto; padding-top: 10px; padding-bottom: 10px; }
.ruta-dest-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.ruta-trait-list { list-style: none; padding: 0; }
.ruta-trait-item { padding: 8px 10px; font-size: 14px; }
.ruta-suspect-row {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  color: inherit;
  font: inherit;
  transition: opacity 0.15s ease;
}
.ruta-suspect-row.is-eliminated { opacity: 0.45; text-decoration: line-through; }
@media print {
  .ruta-board-grid { grid-template-columns: 1fr; }
  .ruta-departure-board { background: #ffffff; color: #1b1f24; border: 1px solid #999; }
}

/* ---------------------------------------------------------------------------
   Play Path (parent's phone, ages 2–5): mood → path → one game at a time → wrap-up
   --------------------------------------------------------------------------- */
.pp-shell { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; padding-bottom: 88px; }
.pp-moods { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pp-mood { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 14px; border: 1.5px solid var(--border-soft); border-radius: 14px; background: var(--surface); cursor: pointer; min-height: 72px; }
.pp-mood input, .pp-pill input, .pp-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pp-mood-label { font-weight: 700; font-size: 17px; }
.pp-mood-hint { color: var(--muted); font-size: 13px; }
.pp-mood:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.pp-mood:has(input:focus-visible), .pp-pill:has(input:focus-visible), .pp-choice:has(input:focus-visible) { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.pp-length { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pp-inline-legend { float: left; font-weight: 700; margin-right: 6px; padding: 0; }
.pp-pill { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); font-weight: 600; cursor: pointer; }
.pp-pill:has(input:checked) { background: var(--ink); border-color: var(--ink); color: #fff; }
.pp-section-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-family: Inter, system-ui, sans-serif; }
.pp-path { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pp-path-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.pp-path-row + .pp-path-row::before { content: ''; position: absolute; left: 17px; top: -10px; height: 18px; border-left: 2px solid var(--border); }
.pp-path-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pp-swap { font-size: 13px; font-weight: 600; padding: 10px 4px; min-height: 44px; display: inline-flex; align-items: center; }
.pp-theme-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; color: #fff; }
.pp-theme-balance_movement, .pp-dot.pp-theme-balance_movement { background: var(--teal); }
.pp-theme-sounds_listening, .pp-dot.pp-theme-sounds_listening { background: var(--terra); }
.pp-theme-shapes, .pp-dot.pp-theme-shapes { background: #8a5a00; }
.pp-theme-colours, .pp-dot.pp-theme-colours { background: var(--plum); }
.pp-theme-memory, .pp-dot.pp-theme-memory { background: var(--cobalt); }
.pp-theme-fine_motor, .pp-dot.pp-theme-fine_motor { background: var(--slate); }
.pp-sticky { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); margin: 0; }
.pp-cta { width: 100%; min-height: 54px; font-size: 17px; border-radius: 14px; justify-content: center; }
.pp-fav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pp-fav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.pp-game { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 20px; overflow: hidden; }
.pp-game-head { padding: 16px 18px 18px; color: #fff; display: flex; flex-direction: column; gap: 6px; background: var(--teal); }
.pp-head-sounds_listening { background: var(--terra); }
.pp-head-shapes { background: #8a5a00; }
.pp-head-colours { background: var(--plum); }
.pp-head-memory { background: var(--cobalt); }
.pp-head-fine_motor { background: var(--slate); }
.pp-game-eyebrow { font-size: 13px; font-weight: 600; opacity: 0.92; }
.pp-game-title { font-size: 26px; line-height: 1.15; color: #fff; }
.pp-game-meta { font-size: 14px; opacity: 0.92; }
.pp-dots { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.pp-dots li { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.45); }
.pp-dots li.is-done { background: rgba(255, 255, 255, 0.8); }
.pp-dots li.is-current { width: 26px; background: #fff; }
.pp-pause { color: #fff; border: 1.5px solid rgba(255, 255, 255, 0.7); border-radius: 10px; padding: 6px 12px; font-weight: 600; font-size: 14px; min-height: 36px; display: inline-flex; align-items: center; }
.pp-pause:hover { color: #fff; background: rgba(255, 255, 255, 0.14); text-decoration: none; }
.pp-game-body { padding: 18px; }
.pp-steps { margin: 0; padding-left: 22px; font-size: 17px; display: flex; flex-direction: column; gap: 6px; }
.pp-today, .pp-look, .pp-safety, .pp-next { border-radius: 12px; padding: 10px 12px; font-size: 14px; }
.pp-today { background: var(--teal-soft); }
.pp-look { background: #eef2f8; }
.pp-safety { background: #fdf5e4; border: 1px solid #efdcae; }
.pp-next { background: var(--bg); color: var(--body); }
.pp-legend { font-weight: 700; padding: 0; }
.pp-legend-small { font-size: 13px; color: var(--muted); padding: 0; }
.pp-stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pp-fit-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pp-choice { position: relative; display: flex; align-items: center; justify-content: center; min-height: 48px; padding: 6px 8px; border: 1.5px solid var(--border-soft); border-radius: 12px; font-weight: 600; text-align: center; cursor: pointer; background: var(--surface); }
.pp-choice-small { min-height: 44px; font-size: 14px; font-weight: 500; }
.pp-choice:has(input:checked) { border-color: var(--ink); background: #f1efe9; }
.pp-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: stretch; }
.pp-actions .btn { min-height: 54px; justify-content: center; }

.pp-done-head { text-align: center; align-items: center; display: flex; flex-direction: column; }
.pp-done-icons { display: flex; gap: 8px; }
.pp-done-icons .pp-theme-icon { width: 44px; height: 44px; border-radius: 12px; }
.pp-done-list { list-style: none; margin: 0; padding: 4px 16px; }
.pp-done-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.pp-done-row + .pp-done-row { border-top: 1px solid var(--border-soft); }
.pp-done-row strong { flex: 1; }
.pp-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--slate); }
.pp-note summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); }
.pp-note[open] summary { margin-bottom: 10px; }
.pp-note textarea { width: 100%; font: inherit; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.pp-fav-toggle { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border-soft); border-radius: 14px; padding: 12px 14px; background: var(--surface); font-size: 14px; }
.pp-fav-toggle input { margin-top: 3px; width: 20px; height: 20px; flex: none; }
.pp-link-quiet { text-align: center; font-size: 14px; }

/* Overview: Play now + Next to try */
.pp-play-now { display: flex; flex-direction: column; gap: 10px; }
.pp-next-try { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pp-next-try li { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.pp-theme-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pp-theme-form select { min-height: 40px; border-radius: 10px; border: 1px solid var(--border); padding: 0 10px; font: inherit; background: var(--surface); }
@media (max-width: 380px) {
  .pp-moods, .pp-stage-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------------
   Kid frame (every ages 5–7 Kid Mode screen): Grown-ups top-left, speaker top-right,
   guide bubble, play area, "Show a grown-up" ending. Picture-first, no scores or timers.
   --------------------------------------------------------------------------- */
.kf-page { max-width: 980px; padding-top: 16px; padding-bottom: 24px; }
.kf { background: #faf5ea; border: 1px solid #ece3cf; border-radius: 28px; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.kf-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kf-bar-right { display: flex; align-items: center; gap: 10px; }
.kf-grownups { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--body); font-size: 14px; font-weight: 600; }
.kf-grownups:hover { text-decoration: none; border-color: var(--ink); }
.kf-round { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; border: 0; cursor: pointer; }
.kf-speaker { width: 64px; height: 64px; background: var(--teal); color: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
.kf-speaker:hover { background: #18665b; }
.kf-home { width: 52px; height: 52px; background: var(--surface); color: var(--ink); border: 1.5px solid var(--border); }
.kf-home:hover { text-decoration: none; border-color: var(--ink); }
.kf-round:focus-visible, .kf-grownups:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.kf-guide { display: flex; align-items: center; gap: 12px; }
.kf-guide-avatar { width: 64px; height: auto; flex: none; }
.kf-bubble { position: relative; flex: 1; margin: 0; background: var(--surface); border-radius: 16px; padding: 14px 18px; font-size: 21px; font-weight: 700; line-height: 1.3; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05); }
.kf-bubble::before { content: ''; position: absolute; left: -9px; top: 50%; margin-top: -9px; border: 9px solid transparent; border-right-color: var(--surface); border-left: 0; }
.kf-play { display: flex; flex-direction: column; gap: 16px; }
.kf-end { display: flex; align-items: center; gap: 16px; justify-content: center; background: var(--surface); border-radius: 20px; padding: 16px; }
.kf-end[hidden] { display: none; }
.kf-end-text { font-size: 22px; font-weight: 700; margin: 0; }
.kf .lab-caption-strip.kf-mirrored { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.kf .lab-canvas-shell { position: relative; }
.kf-grownup-panel { border-top: 1px dashed var(--border); padding-top: 10px; }
.kf-grownup-panel > summary { cursor: pointer; color: var(--muted); font-size: 14px; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 600px) {
  .kf { border-radius: 20px; padding: 12px; }
  .kf-bubble { font-size: 18px; }
  .kf-speaker { width: 56px; height: 56px; }
}
@media print {
  .kf { background: none; border: 0; padding: 0; }
  .kf-bar, .kf-guide, .kf-end { display: none; }
}

/* Picture Games (#19): Memory pairs and Colours */
.pg-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 560px; width: 100%; margin: 0 auto; }
.pg-grid[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 640px; }
.pg-card { position: relative; aspect-ratio: 1 / 1; border: 0; padding: 0; background: none; cursor: pointer; perspective: 600px; border-radius: 16px; }
.pg-card-inner { position: absolute; inset: 0; transition: transform 0.35s ease; transform-style: preserve-3d; }
.pg-card.is-up .pg-card-inner { transform: rotateY(180deg); }
.pg-face { position: absolute; inset: 0; border-radius: 16px; display: flex; align-items: center; justify-content: center; backface-visibility: hidden; }
.pg-back { background: #2f5da8; border: 3px solid #1f437e; color: #dfe6f3; }
.pg-front { background: var(--surface); border: 3px solid #d9d2c1; transform: rotateY(180deg); flex-direction: column; gap: 4px; }
.pg-front img { width: 64%; height: auto; }
.pg-front-label { font-size: 14px; font-weight: 700; }
.pg-card.is-matched { visibility: hidden; }
.pg-card:focus-visible { outline: 4px solid var(--cobalt); outline-offset: 3px; }
.pg-basket { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 8px 14px; border: 2px dashed #d7b878; border-radius: 16px; background: #f2e5c6; flex-wrap: wrap; }
.pg-basket-pair { display: inline-flex; gap: 2px; }
.pg-basket-pair img { width: 36px; height: 36px; background: var(--surface); border-radius: 8px; padding: 3px; }
.pg-pots { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.pg-pot { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 128px; min-height: 128px; padding: 12px 8px; border: 2.5px solid #d9d4c7; border-radius: 18px; background: var(--surface); box-shadow: 0 4px 0 #e3ded2; font-size: 17px; font-weight: 700; cursor: pointer; }
.pg-pot.is-picked { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.pg-pot:focus-visible, .pg-swatch:focus-visible, .pg-frog:focus-visible { outline: 4px solid var(--cobalt); outline-offset: 3px; }
.pg-pot-swatch { width: 56px; height: 48px; border: 3px solid #1b1f24; border-top-width: 6px; border-radius: 4px 4px 12px 12px; }
.pg-mix-row { display: flex; align-items: center; justify-content: center; gap: 28px; flex-wrap: wrap; }
.pg-bowl-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; }
.pg-bowl { width: 140px; height: 70px; border: 4px solid #1b1f24; border-top: 0; border-radius: 0 0 70px 70px; background: #efece4; overflow: hidden; display: flex; align-items: flex-end; }
.pg-bowl-fill { width: 100%; height: 72%; transition: background-color 0.3s ease; }
.pg-frog { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 20px; }
.pg-frog svg { width: 140px; height: auto; display: block; }
.pg-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.pg-actions .btn { min-height: 56px; font-size: 18px; padding: 0 22px; border-radius: 16px; }
.pg-swatches { display: flex; justify-content: center; gap: 14px; }
.pg-swatch { width: 72px; height: 72px; border-radius: 999px; border: 4px solid var(--surface); box-shadow: 0 0 0 2px #cfc9bb; cursor: pointer; }
.pg-swatch.is-picked { box-shadow: 0 0 0 4px var(--ink); }
.pg-target { display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 700; }
.pg-target-dot { width: 32px; height: 32px; border-radius: 999px; border: 3px solid #1b1f24; }
@media (max-width: 600px) {
  .pg-grid, .pg-grid[data-cols="4"] { gap: 10px; }
  .pg-pot { width: 100px; min-height: 108px; }
}
@media (prefers-reduced-motion: reduce) {
  .pg-card-inner { transition: opacity 0.2s ease; transform: none !important; }
  .pg-card .pg-front { transform: none; opacity: 0; }
  .pg-card.is-up .pg-front { opacity: 1; }
  .pg-card.is-up .pg-back { opacity: 0; }
  .pg-bowl-fill { transition: none; }
}
.kf .plaza-framed .plaza-lola-row { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kf-shelf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.kf-shelf-tile { display: flex; flex-direction: column; background: var(--surface); border: 2px solid #e5dcc7; border-radius: 18px; overflow: hidden; color: var(--ink); font-weight: 700; font-size: 16px; min-height: 44px; }
.kf-shelf-tile:hover { text-decoration: none; border-color: var(--ink); }
.kf-shelf-tile:focus-visible { outline: 4px solid var(--cobalt); outline-offset: 3px; }
.kf-shelf-tile img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--bg); }
.kf-shelf-tile span { padding: 10px 12px; line-height: 1.25; }
.pg-emoji { font-size: clamp(34px, 7vw, 56px); line-height: 1; }
.pg-basket-pair { font-size: 26px; background: var(--surface); border-radius: 10px; padding: 2px 6px; }
/* The kid frame's own show/hide: an element with [hidden] stays hidden whatever its display rule. */
.kf [hidden] { display: none !important; }
.pp-shell fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.pg-grid[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 380px; }
.pg-grid[data-cols="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 760px; }
.pg-mix-row { margin-top: 32px; }
