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

.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, .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-mosaic { flex: 1 1 min(400px, 100%); max-width: 520px; width: 100%; height: auto; }
.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, .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 === */
