:root {
  --bg: #f4f1e8;
  --card: #fffdf8;
  --ink: #173024;
  --muted: #65766d;
  --line: #d9e1d9;
  --nav: #173c2a;
  --nav2: #214f36;
  --accent: #2f7d4a;
  --accent-dark: #235f39;
  --accent-soft: #e5f1e8;
  --grass: #5f9f4f;
  --grass2: #81b75f;
  --dirt: #9a7047;
  --stone: #7a8580;
  --sand: #e8d9b4;
  --danger: #b95358;
  --shadow: 0 10px 24px rgba(38, 69, 49, 0.08);
}
* {
  box-sizing: border-box;
}
html {
  font-size: 17px;
}
body {
  margin: 0;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: linear-gradient(180deg, #f8f6ef 0, #eef3ec 100%);
  color: var(--ink);
}
button,
input {
  font: inherit;
}
.app-shell {
  display: grid;
  grid-template-columns: 255px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(180deg, var(--nav), #12301f);
  color: #fff;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 6px solid #0d2b1a;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}
.brand-badge {
  width: 48px;
  height: 48px;
  background: var(--grass);
  display: grid;
  place-items: center;
  font-weight: 950;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 -8px 0 var(--dirt),
    4px 4px 0 rgba(0, 0, 0, 0.18);
  border-radius: 4px;
}
.brand-badge span {
  transform: translateY(-3px);
}
.brand h1 {
  font-size: 1.08rem;
  margin: 0;
  letter-spacing: 0.12em;
}
.brand p {
  font-size: 0.7rem;
  color: #bdd3c4;
  margin: 3px 0 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.nav-item {
  border: 0;
  background: transparent;
  color: #d4e3d8;
  padding: 13px 14px;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  font-weight: 750;
  font-size: 0.96rem;
  transition: 0.16s;
}
.nav-item:hover,
.nav-item.active {
  background: #2a5d40;
  color: #fff;
  transform: translateX(2px);
  box-shadow: inset 4px 0 0 #8dc56e;
}
.sidebar-footer {
  margin-top: auto;
}
.score-chip {
  background: #214f36;
  padding: 12px;
  border-radius: 7px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  border: 1px solid #3a684b;
}
.score-chip span,
.score-chip small {
  font-size: 0.62rem;
  color: #bdd3c4;
  letter-spacing: 0.08em;
}
.score-chip strong {
  font-size: 1.45rem;
}
.ghost-btn {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  border: 1px solid #4e765d;
  color: #c5d8ca;
  border-radius: 7px;
  padding: 10px;
  cursor: pointer;
}
.main-content {
  padding: 30px 36px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.topbar h2 {
  margin: 5px 0 0;
  font-size: 1.7rem;
}

.topbar {
  align-items: flex-start;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 65%;
}
.streak-card,
.session-chip {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  color: var(--muted);
  font-size: 0.84rem;
  box-shadow: 0 3px 0 rgba(47, 125, 74, 0.08);
}
.streak-card strong,
.session-chip strong {
  color: var(--ink);
}
.section {
  display: none;
}
.active-section {
  display: block;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px;
  background: linear-gradient(135deg, #fffdf8 55%, #e8f1e5);
  position: relative;
  overflow: hidden;
}
.hero:after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -24px;
  width: 160px;
  height: 70px;
  background: linear-gradient(
    90deg,
    var(--grass) 0 33%,
    var(--dirt) 33% 66%,
    var(--stone) 66%
  );
  opacity: 0.08;
  image-rendering: pixelated;
}
.hero-copy {
  max-width: 700px;
  position: relative;
  z-index: 1;
}
.pill {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 4px;
  padding: 7px 10px;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  border: 1px solid #cce0cf;
}
.hero h3 {
  font-size: 2.3rem;
  line-height: 1.08;
  margin: 14px 0 12px;
  max-width: 680px;
}
.hero p {
  font-size: 1rem;
  color: var(--muted);
  max-width: 650px;
  line-height: 1.6;
}
.hero-visual {
  width: 225px;
  height: 170px;
  border-radius: 7px;
  background: linear-gradient(#dbeed6 0 46%, #9ac46f 46% 58%, #8b6847 58%);
  color: #fff;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  border: 5px solid #214f36;
  box-shadow: 8px 8px 0 rgba(33, 79, 54, 0.12);
}
.hero-level {
  font-size: 3.8rem;
  font-weight: 950;
  line-height: 0.9;
  text-shadow: 3px 3px 0 #173c2a;
}
.hero-visual > span:not(.pixel-block) {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: #f2fff4;
  font-weight: 900;
}
.pixel-world {
  position: absolute;
  inset: 0;
}
.pixel-block {
  position: absolute;
  width: 28px;
  height: 28px;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.14);
}
.pixel-block.grass {
  background: var(--grass2);
}
.pixel-block.dirt {
  background: var(--dirt);
}
.pixel-block.stone {
  background: var(--stone);
}
.b1 {
  left: 12px;
  bottom: 28px;
}
.b2 {
  left: 40px;
  bottom: 28px;
}
.b3 {
  left: 12px;
  bottom: 0;
}
.b4 {
  right: 18px;
  bottom: 0;
}
.b5 {
  right: 46px;
  bottom: 28px;
}
.b6 {
  right: 46px;
  bottom: 0;
}
.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 6px;
  padding: 12px 16px;
  font-weight: 850;
  cursor: pointer;
  font-size: 0.92rem;
}
.primary-btn {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 0 #1f5935;
}
.primary-btn:hover {
  background: var(--accent-dark);
  transform: translateY(1px);
  box-shadow: 0 3px 0 #1f5935;
}
.secondary-btn {
  background: #e6efe5;
  color: #285c39;
  border: 1px solid #cbdcc9;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 16px 0;
}
.stat {
  padding: 19px;
  display: flex;
  gap: 13px;
  align-items: center;
}
.stat > span {
  width: 41px;
  height: 41px;
  border-radius: 6px;
  background: #edf4eb;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 950;
  color: var(--accent);
  border: 1px solid #d9e5d6;
}
.stat small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
}
.stat strong {
  font-size: 1.55rem;
}
.section-grid.two-col,
.progress-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
}
.panel-card {
  padding: 23px;
}
.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.card-heading h3,
.panel-card h3 {
  margin: 6px 0 12px;
}
.muted {
  color: var(--muted);
  font-size: 0.78rem;
}
.focus-card {
  background: linear-gradient(145deg, #183d2a, #25573a);
  color: #fff;
  border-color: #214d35;
}
.focus-card .eyebrow {
  color: #a9d499;
}
.focus-card p:not(.eyebrow) {
  color: #d2e2d6;
}
.level-list {
  display: grid;
  gap: 10px;
}
.level-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.level-track {
  height: 9px;
  background: #e8eee8;
  border-radius: 2px;
  overflow: hidden;
}
.level-track span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--grass) 0 18px,
    var(--grass2) 18px 36px
  );
}
.level-tag {
  font-size: 0.7rem;
  font-weight: 950;
  color: var(--accent);
}
.section-intro {
  padding: 23px 25px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.section-intro:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 72px;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0 45%,
    rgba(95, 159, 79, 0.08) 45% 65%,
    rgba(154, 112, 71, 0.08) 65%
  );
  pointer-events: none;
}
.section-intro h3 {
  margin: 8px 0 4px;
  font-size: 1.7rem;
}
.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.level-badge {
  padding: 10px 13px;
  border-radius: 6px;
  background: #edf4eb;
  color: #285c39;
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid #d2e3d1;
}
.level-badge strong {
  font-size: 1.2rem;
}
.level-badge.neutral {
  background: #f0f1ed;
  color: var(--muted);
  font-size: 0.72rem;
}
.exercise-layout,
.reading-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.exercise-card {
  padding: 26px;
  min-height: 340px;
}
.side-help {
  padding: 23px;
}
.pixel-note {
  background: linear-gradient(180deg, #fffdf8 0, #f5f2e7 100%);
  border-top: 5px solid #78aa5c;
}
.side-help h4 {
  font-size: 1.15rem;
  margin: 7px 0 14px;
}
.side-help p {
  line-height: 1.55;
}
.exercise-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
}
.mini-score {
  background: #edf3eb;
  padding: 6px 10px;
  border-radius: 4px;
}
.prompt {
  font-size: 1.35rem;
  font-weight: 850;
  margin: 24px 0;
  line-height: 1.45;
}
.math-prompt {
  font-size: 2.5rem;
  letter-spacing: 0.03em;
}
.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.option-btn {
  border: 2px solid var(--line);
  background: #fffefb;
  border-radius: 7px;
  padding: 15px;
  text-align: left;
  cursor: pointer;
  min-height: 56px;
  font-weight: 700;
  font-size: 0.98rem;
  box-shadow: 0 3px 0 rgba(33, 79, 54, 0.05);
}
.option-btn:hover {
  border-color: #91b79b;
  background: #f7fbf5;
}
.option-btn.correct {
  border-color: #2f9a68;
  background: #eaf8ee;
}
.option-btn.wrong {
  border-color: #cf767a;
  background: #fff0f0;
}
.feedback {
  min-height: 28px;
  margin: 15px 0;
  font-weight: 800;
  font-size: 0.86rem;
}
.feedback.ok {
  color: #1f744c;
}
.feedback.bad {
  color: #ad454c;
}
.hidden {
  display: none !important;
}
.division-answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}
.division-answer-row label {
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.division-answer-row input,
.guided-answer-row input {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fffefb;
  font-size: 1rem;
}
.division-answer-row input:focus,
.guided-answer-row input:focus {
  outline: 3px solid rgba(95, 159, 79, 0.18);
  border-color: #7daa72;
}
.formula {
  padding: 13px;
  border-radius: 6px;
  background: #edf3eb;
  font-weight: 850;
  margin: 12px 0;
  border-left: 5px solid var(--grass);
}
.mode-switch {
  padding: 6px;
  display: inline-flex;
  gap: 5px;
  margin-bottom: 14px;
}
.mode-btn {
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 780;
  color: var(--muted);
}
.mode-btn.active {
  background: #1e4d33;
  color: #fff;
  box-shadow: 0 3px 0 #133523;
}
.division-mode {
  display: none;
}
.division-mode.active-mode {
  display: grid;
}
.guided-grid {
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.long-division {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  margin: 24px 0;
  padding: 24px;
  border-radius: 7px;
  background: #f5f1e6;
  display: inline-block;
  min-width: 240px;
  border: 2px solid #d9ddcf;
}
.guided-instruction {
  font-size: 1.08rem;
  font-weight: 850;
  margin: 14px 0;
}
.guided-answer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  max-width: 470px;
}
.guided-answer-row input {
  margin: 0;
}
.reading-layout {
  grid-template-columns: 1.05fr 1fr;
}
.reading-text {
  padding: 26px;
  line-height: 1.8;
  font-size: 1rem;
}
.reading-text h4 {
  font-size: 1.4rem;
  margin-top: 0;
}
.reading-text p {
  margin-bottom: 0;
}
.homework-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}
.download-card {
  padding: 23px;
  text-align: left;
  cursor: pointer;
  transition: 0.16s;
  position: relative;
  overflow: hidden;
}
.download-card:after {
  content: "";
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--grass) 0 50%, var(--dirt) 50%);
  opacity: 0.09;
}
.download-card:hover {
  transform: translateY(-2px);
  border-color: #9ab7a0;
}
.download-card span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  font-weight: 950;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(47, 125, 74, 0.13);
}
.download-card strong {
  display: block;
  font-size: 1.05rem;
  margin: 13px 0 4px;
}
.download-card small {
  color: var(--muted);
  font-size: 0.76rem;
}
.download-card.featured {
  background: linear-gradient(135deg, #e9f3e7, #fffdf8);
}
.docx-status {
  margin-top: 13px;
  color: var(--muted);
  font-size: 0.78rem;
}
.progress-grid {
  margin-bottom: 14px;
}
.progress-subject {
  padding: 19px;
}
.progress-subject small {
  color: var(--muted);
}
.bar {
  height: 9px;
  background: #e9eee8;
  border-radius: 2px;
  overflow: hidden;
  margin: 10px 0;
}
.bar span {
  display: block;
  height: 100%;
  background: repeating-linear-gradient(
    90deg,
    var(--grass) 0 16px,
    var(--grass2) 16px 32px
  );
}
.session-chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 180px;
  padding-top: 20px;
}
.session-bar-wrap {
  flex: 1;
  min-width: 38px;
  text-align: center;
}
.session-bar {
  height: 140px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.session-bar span {
  display: block;
  width: 70%;
  max-width: 44px;
  background: repeating-linear-gradient(
    180deg,
    #5f9f4f 0 12px,
    #79b05d 12px 24px
  );
  border-radius: 3px 3px 0 0;
  min-height: 3px;
}
.session-bar-wrap small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  margin-top: 7px;
}
.recent-row {
  display: grid;
  grid-template-columns: 100px 1fr 42px;
  gap: 10px;
  align-items: center;
  margin: 12px 0;
  font-size: 0.76rem;
}
.history-table {
  overflow: auto;
}
.history-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr 0.7fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
}
.shape-visual {
  font-size: 5rem;
  text-align: center;
  margin: 10px 0;
}
.angle-box {
  height: 135px;
  display: grid;
  place-items: center;
}
.angle-lines {
  width: 135px;
  height: 100px;
  position: relative;
}
.angle-lines:before,
.angle-lines:after {
  content: "";
  position: absolute;
  left: 20px;
  bottom: 18px;
  width: 92px;
  height: 5px;
  background: #294337;
  border-radius: 2px;
  transform-origin: left center;
}
.angle-lines:after {
  transform: rotate(var(--angle, 45deg));
}
.angle-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}
@media (max-width: 950px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 5px solid #0d2b1a;
  }
  .nav-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .main-content {
    padding: 18px;
  }
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .section-grid.two-col,
  .exercise-layout,
  .reading-layout,
  .progress-grid,
  .guided-grid {
    grid-template-columns: 1fr;
  }
  .homework-grid {
    grid-template-columns: 1fr 1fr;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-visual {
    margin-top: 20px;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    align-items: flex-start;
    gap: 12px;
  }
  .topbar-actions {
    flex-direction: column;
  }
  .level-row {
    grid-template-columns: 110px 1fr auto;
  }
}
@media (max-width: 560px) {
  html {
    font-size: 16px;
  }
  .dashboard-grid,
  .homework-grid {
    grid-template-columns: 1fr;
  }
  .main-content {
    padding: 12px;
  }
  .hero h3 {
    font-size: 2rem;
  }
  .division-answer-row {
    grid-template-columns: 1fr;
  }
  .guided-answer-row {
    grid-template-columns: 1fr;
  }
  .history-row {
    min-width: 560px;
  }
  .level-row {
    grid-template-columns: 1fr auto;
  }
  .level-track {
    grid-column: 1/-1;
  }
  .hero-visual {
    width: 100%;
  }
}

/* V3 · subtle block-world visual system + larger type */
html {
  font-size: 18px;
}
body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.88)),
    repeating-linear-gradient(
      0deg,
      rgba(95, 159, 79, 0.04) 0 24px,
      rgba(154, 112, 71, 0.035) 24px 48px
    );
}
.main-content {
  max-width: 1440px;
}
.sidebar {
  background:
    linear-gradient(180deg, #173c2a 0 78%, #143220 78%),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0 28px,
      transparent 28px 56px
    );
}
.brand-badge {
  border-radius: 4px;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.18);
  position: relative;
}
.brand-badge:after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 11px;
  height: 11px;
  background: #8c6847;
  border: 2px solid #173c2a;
}
.nav-item {
  font-size: 0.94rem;
  min-height: 48px;
}
.topbar h2 {
  font-size: 1.95rem;
}
.hero {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #5f9f4f 0 34px,
    #79b05d 34px 68px,
    #8c6847 68px 102px
  );
}
.hero h3 {
  font-size: 2.45rem;
}
.hero p,
.section-intro p {
  font-size: 1.02rem;
}
.card {
  border-radius: 9px;
  box-shadow: 0 5px 0 rgba(32, 68, 45, 0.05);
}
.section-intro.block-banner:before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background: repeating-linear-gradient(
    90deg,
    #74a95a 0 30px,
    #8d6845 30px 60px
  );
}
.prompt {
  font-size: 1.48rem;
  line-height: 1.5;
}
.option-btn {
  font-size: 1.05rem;
  padding: 17px 18px;
  min-height: 62px;
}
.reading-text {
  font-size: 1.06rem;
  line-height: 1.86;
}
.side-help p {
  font-size: 0.93rem;
}
.side-help h4 {
  font-size: 1.22rem;
}
.feedback {
  font-size: 0.95rem;
  line-height: 1.45;
}

.language-switch {
  display: inline-flex;
  gap: 7px;
  padding: 7px;
  margin-bottom: 14px;
}
#printCognitive { display:block; width:max-content; max-width:100%; margin:20px 0 0 auto; }
.cognitive-conditions { display:table; margin:22px 0 26px; padding:16px 22px; border-left:6px solid var(--grass); border-radius:10px; background:#edf3eb; color:var(--ink); font-size:1.3rem; font-weight:850; line-height:1.45; }
.language-mode-btn {
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 850;
  color: var(--muted);
  font-size: 0.92rem;
}
.language-mode-btn.active {
  background: #1e4d33;
  color: #fff;
  box-shadow: 0 3px 0 #133523;
}
.language-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  gap: 14px;
}
.language-topic {
  display: inline-block;
  margin-top: 18px;
  padding: 7px 10px;
  border-radius: 4px;
  background: #edf4eb;
  color: #285c39;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-left: 5px solid #5f9f4f;
}
.text-answer-area {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.text-answer-area textarea {
  width: 100%;
  resize: vertical;
  min-height: 78px;
  overflow-y: hidden;
  border: 2px solid var(--line);
  background: #fffefb;
  border-radius: 7px;
  padding: 14px 15px;
  font: inherit;
  font-size: 1.03rem;
  line-height: 1.5;
  color: var(--ink);
}
.text-answer-area textarea:focus {
  outline: 3px solid rgba(95, 159, 79, 0.16);
  border-color: #7daa72;
}
.explanation {
  margin: -2px 0 16px;
  padding: 12px 14px;
  border-left: 5px solid #78a95c;
  background: #f0f6ec;
  border-radius: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #385544;
}
.language-help {
  padding: 22px;
  background: linear-gradient(180deg, #f9fbf6, #f2f5e9);
  border-top: 5px solid #5f9f4f;
}
.rule-cards {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.rule-card {
  padding: 12px 13px;
  background: #fff;
  border: 1px solid #dfe8dc;
  border-radius: 6px;
  box-shadow: 3px 3px 0 rgba(85, 122, 75, 0.06);
}
.rule-card strong {
  display: block;
  color: #23563a;
  margin-bottom: 3px;
  font-size: 0.9rem;
}
.rule-card span {
  display: block;
  color: #647265;
  font-size: 0.82rem;
  line-height: 1.35;
}

.download-card strong {
  font-size: 1.1rem;
}
.download-card small {
  font-size: 0.81rem;
  line-height: 1.35;
}
.docx-status {
  font-size: 0.86rem;
}

@media (max-width: 950px) {
  html {
    font-size: 17px;
  }
  .language-layout {
    grid-template-columns: 1fr;
  }
  .language-help {
    order: 2;
  }
}
@media (max-width: 560px) {
  html {
    font-size: 16px;
  }
  .language-switch {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .language-mode-btn {
    text-align: left;
  }
  .hero h3 {
    font-size: 2.05rem;
  }
}

/* V4 · perfiles, edades y arquitectura escalable */
.profile-panel {
  margin: 18px 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}
.profile-panel small {
  display: block;
  color: #bcd5c2;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  margin-bottom: 7px;
}
.profile-panel select {
  width: 100%;
  padding: 10px;
  border-radius: 5px;
  border: 0;
  background: #f5f1e6;
  color: #173326;
  font-weight: 800;
}
.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
.mini-btn {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  padding: 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.72rem;
}
.mini-btn.danger {
  color: #ffd5d5;
}
.profile-gate {
  position: fixed;
  inset: 0;
  background: rgba(11, 28, 19, 0.82);
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 20px;
}
.profile-modal {
  width: min(480px, 100%);
  padding: 30px;
}
.profile-modal h2 {
  margin: 12px 0 8px;
  font-size: 1.7rem;
}
.profile-modal p {
  color: var(--muted);
  line-height: 1.55;
}
.profile-modal label {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  margin: 16px 0 6px;
}
.profile-modal input,
.profile-modal select,
.worksheet-toolbar select {
  width: 100%;
  padding: 12px 13px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fffefb;
  font: inherit;
  margin-top: 6px;
}
.worksheet-toolbar {
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: end;
  gap: 18px;
}
.worksheet-toolbar label {
  font-weight: 800;
  font-size: 0.78rem;
  min-width: 180px;
}
.worksheet-toolbar span {
  color: var(--muted);
  font-size: 0.82rem;
  padding-bottom: 9px;
}
.self-assessment {
  margin: 14px 0;
  padding: 14px;
  background: #f4f7ef;
  border-radius: 7px;
  border-left: 5px solid var(--grass);
}
.self-assessment p {
  font-weight: 800;
  margin-top: 0;
}
.self-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ghost-light-btn {
  border: 2px solid var(--line);
  background: white;
  padding: 11px 14px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}
.reading-passage {
  padding: 18px 20px;
  background: #f6f1e5;
  border-left: 6px solid #78a95c;
  border-radius: 6px;
  margin: 18px 0;
}
.reading-passage h4 {
  margin: 0 0 8px;
  font-size: 1.22rem;
}
.reading-passage p {
  margin: 0;
  line-height: 1.75;
  font-size: 1rem;
}
.coverage-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}
.progress-subject strong {
  display: block;
  font-size: 1.55rem;
  margin-top: 6px;
}
.download-card {
  border: none;
  width: 100%;
}
.download-card:focus-visible,
.nav-item:focus-visible,
.option-btn:focus-visible {
  outline: 3px solid #9bc889;
  outline-offset: 2px;
}
.section-intro {
  position: relative;
  overflow: hidden;
}
@media (max-width: 720px) {
  .worksheet-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .worksheet-toolbar label {
    min-width: 0;
  }
  .profile-actions {
    grid-template-columns: 1fr;
  }
}
.division-mode-btn {
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 10px 13px;
  cursor: pointer;
  font-weight: 780;
  color: var(--muted);
  font-size: 0.92rem;
}
.division-mode-btn.active {
  background: #1e4d33;
  color: #fff;
  box-shadow: 0 3px 0 #133523;
}

.progress-export-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.session-panel {
  margin-top: 20px;
}
.session-evolution {
  overflow-x: auto;
}
.session-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
.session-table th,
.session-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(31, 99, 59, 0.12);
  text-align: left;
  font-size: 0.95rem;
}
.session-table th {
  color: #214f36;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.session-table td strong {
  color: #214f36;
}
.trend-up {
  color: #257044;
  font-weight: 700;
}
.trend-down {
  color: #9b493f;
  font-weight: 700;
}
.trend-flat {
  color: #68736c;
  font-weight: 700;
}
@media (max-width: 760px) {
  .progress-export-actions {
    width: 100%;
  }
  .progress-export-actions button {
    flex: 1 1 220px;
  }
}

/* V7 · English, current-interest literacy, games and worksheet builder */
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  gap: 14px;
}
.game-area {
  min-height: 210px;
}
.game-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.game-choice {
  border: 2px solid var(--line);
  background: #fffefb;
  border-radius: 7px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  min-height: 62px;
}
.game-choice:hover {
  border-color: #91b79b;
  background: #f7fbf5;
}
.game-choice.correct {
  border-color: #2f9a68;
  background: #eaf8ee;
}
.game-choice.wrong {
  border-color: #cf767a;
  background: #fff0f0;
}
.order-target {
  min-height: 78px;
  border: 2px dashed #b8c8b8;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  background: #f7faf5;
  margin-bottom: 14px;
}
.token-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}
.word-token,
.placed-token {
  padding: 10px 12px;
  border-radius: 6px;
  font-weight: 800;
}
.word-token {
  border: 2px solid #d8e1d6;
  background: white;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 3px 0 rgba(33, 79, 54, 0.06);
}
.word-token:disabled {
  opacity: 0.38;
  cursor: default;
}
.placed-token {
  display: inline-block;
  background: #e5f1e8;
  border: 1px solid #bfd7c3;
  color: #214f36;
}
.game-controls {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.match-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.match-column {
  display: grid;
  gap: 9px;
}
.match-card {
  min-height: 58px;
  border: 2px solid var(--line);
  background: #fffefb;
  border-radius: 7px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 760;
  color: var(--ink);
}
.match-card.selected {
  border-color: #6a9d58;
  background: #edf6e8;
}
.match-card.matched {
  border-color: #2f9a68;
  background: #eaf8ee;
  color: #1e613f;
  opacity: 0.72;
  cursor: default;
}
.worksheet-builder {
  padding: 22px;
}
.worksheet-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 260px));
  gap: 14px;
  margin-bottom: 22px;
}
.worksheet-controls label {
  font-weight: 850;
  font-size: 0.78rem;
  color: var(--muted);
}
.worksheet-controls select {
  width: 100%;
  padding: 11px 12px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fffefb;
  font: inherit;
  margin-top: 6px;
  color: var(--ink);
}
.worksheet-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 12px;
}
.worksheet-heading-row h4 {
  font-size: 1.15rem;
  margin: 5px 0 0;
}
.worksheet-quick-actions {
  display: flex;
  gap: 7px;
}
.worksheet-quick-actions .mini-btn {
  color: #285c39;
  background: #eef5ec;
  border: 1px solid #cbdcc9;
  padding: 9px 11px;
}
.homework-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.homework-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 2px solid #e0e7df;
  border-radius: 8px;
  padding: 13px;
  background: #fffefb;
  cursor: pointer;
}
.homework-option:has(input:checked) {
  border-color: #7fab70;
  background: #f0f7ec;
}
.homework-option input {
  margin-top: 4px;
  accent-color: #2f7d4a;
  transform: scale(1.12);
}
.homework-option strong {
  display: block;
  font-size: 0.91rem;
}
.homework-option small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 3px;
}
.worksheet-generate {
  margin-top: 18px;
}
.worksheet-note {
  margin: 12px 0 0;
}
.docx-status {
  padding: 12px 2px;
  min-height: 24px;
}
@media (max-width: 950px) {
  .game-layout {
    grid-template-columns: 1fr;
  }
  .homework-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .game-quick-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 620px) {
  .homework-options,
  .worksheet-controls,
  .match-board {
    grid-template-columns: 1fr;
  }
  .worksheet-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }
  .worksheet-quick-actions {
    width: 100%;
  }
  .worksheet-quick-actions button {
    flex: 1;
  }
}

/* V7.1 hotfix - restore persistent desktop sidebar without changing app logic */
@media (min-width: 951px) {
  .app-shell {
    display: block;
    min-height: 100vh;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 255px;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
  }
  .main-content {
    width: auto;
    max-width: none;
    margin-left: 255px;
  }
}
@media (max-width: 950px) {
  .app-shell {
    display: block;
  }
  .sidebar {
    position: relative;
    left: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    z-index: auto;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

/* V8 cloud/auth/cognitive additions */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef5ec, #f7f1df);
  padding: 24px;
}
.auth-card {
  width: min(460px, 94vw);
  padding: 32px;
}
.auth-card label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
}
.auth-card input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #c8d2c9;
  border-radius: 10px;
  font: inherit;
  box-sizing: border-box;
}
.auth-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.auth-actions button {
  flex: 1;
}
.symbol-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 14px 0;
}
.symbol-grid span,
.symbol-grid button {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid #d8e0d9;
  border-radius: 8px;
  background: #fff;
  font-size: 24px;
}
.symbol-grid.interactive button {
  cursor: pointer;
}
.reaction-card {
  font-size: 54px;
  font-weight: 900;
  text-align: center;
  padding: 38px;
  border-radius: 16px;
  background: #e9f5e9;
  margin-bottom: 18px;
}
.reaction-card.stop {
  background: #fde8e8;
}
.stroop-word {
  font-size: 56px;
  font-weight: 900;
  text-align: center;
  margin: 25px 0;
}
.ink-red {
  color: #c43333;
}
.ink-blue {
  color: #235bb3;
}
.ink-green {
  color: #22824f;
}
.sequence-display {
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 8px;
  padding: 32px;
}
.rule-card {
  text-align: center;
  padding: 20px;
}
.rule-card strong {
  display: block;
  margin-bottom: 12px;
}
.hidden {
  display: none !important;
}

.exercise-layout.single {
  grid-template-columns: 1fr;
}
.level-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #edf4eb;
  color: #285c39;
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid #d2e3d1;
}
.level-control select {
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 900;
  color: #285c39;
  cursor: pointer;
}
.exercise-meta > span:last-child {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.symbol-grid {
  margin-top: 8px;
}

/* V9 · functional cognitive bank */
.cognitive-photo {
  display: block;
  width: min(100%, 760px);
  max-height: 430px;
  object-fit: cover;
  margin: 18px auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(31, 76, 50, 0.1);
}
.icon-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.icon-grid.level-2 {
  grid-template-columns: repeat(6, minmax(48px, 1fr));
}
.icon-grid.level-3,
.pair-grid {
  grid-template-columns: repeat(6, minmax(58px, 1fr));
}
.icon-cell {
  min-height: 62px;
  display: grid;
  place-items: center;
  background: #f8faf5;
  border: 1px solid #d8e2d5;
  border-radius: 8px;
  font-size: 1.8rem;
}
.pair-cell {
  grid-template-columns: 1fr 1fr;
  font-size: 1.4rem;
  padding: 8px;
  gap: 4px;
}
.target-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  background: #eef5ea;
  border-left: 5px solid var(--grass);
  border-radius: 6px;
}
.target-cue span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 900;
}
.target-cue strong {
  font-size: 1.6rem;
}
.memory-reveal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.memory-card {
  min-height: 95px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffefb;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
}
.memory-card b {
  font-size: 2rem;
}
.memory-card strong {
  color: var(--accent-dark);
}
.memory-card span {
  font-size: 0.9rem;
  line-height: 1.35;
}
.memory-timer {
  padding: 10px 12px;
  background: #edf4eb;
  border-radius: 6px;
  color: #315f40;
  font-weight: 800;
  text-align: center;
  margin-bottom: 14px;
}
.sequence-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.sequence-shot {
  position: relative;
}
.sequence-shot img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.sequence-shot span {
  position: absolute;
  left: 7px;
  bottom: 7px;
  background: rgba(23, 48, 36, 0.88);
  color: white;
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 850;
}
@media (max-width: 780px) {
  .icon-grid,
  .icon-grid.level-2,
  .icon-grid.level-3,
  .pair-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .sequence-preview {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* V10 cognitive workspace */
.multi-select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.multi-option.selected {
  border-color: #5f8f68;
  background: #edf6e8;
  box-shadow: inset 0 0 0 2px rgba(47, 125, 74, 0.12);
}
.multi-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.multi-actions span {
  color: var(--muted);
  font-weight: 800;
}
.sequence-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}
.sequence-slots {
  display: grid;
  gap: 9px;
}
.sequence-slot {
  width: 100%;
  min-height: 58px;
  border: 2px dashed #b8c8b8;
  border-radius: 8px;
  background: #f8faf6;
  padding: 10px 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--muted);
  cursor: default;
}
.sequence-slot span {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dfeadf;
  color: #285c39;
  font-weight: 900;
}
.sequence-slot.filled {
  border-style: solid;
  border-color: #8fb19a;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.sequence-slot.filled:after {
  content: "Toca para retirar";
  font-size: 0.68rem;
  color: var(--muted);
  justify-self: end;
}
.token-bank {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcf8;
}
.token-bank .eyebrow {
  margin-bottom: 10px;
}
.word-token.used {
  opacity: 0.35;
}
.sequence-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
  flex-wrap: wrap;
}
.game-loading,
.game-limit-card {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
}
.game-limit-card {
  align-content: center;
  gap: 8px;
  padding: 24px;
  border: 1px solid #d7e1d7;
  border-radius: 10px;
  background: #f7faf5;
}
.game-limit-card strong {
  font-size: 1.1rem;
}
.game-limit-card span {
  color: var(--muted);
}
.game-legend {
  padding: 10px 14px;
  border-radius: 8px;
  background: #edf4eb;
  text-align: center;
  font-weight: 850;
  margin-bottom: 14px;
}
.inhibition-cue,
.nback-symbol,
.rule-stimulus {
  font-size: 5rem;
  min-height: 150px;
  display: grid;
  place-items: center;
  text-align: center;
}
.reaction-button {
  display: block;
  width: min(360px, 100%);
  margin: 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 20px;
  background: var(--accent);
  color: white;
  font-weight: 950;
  font-size: 1.15rem;
  cursor: pointer;
  box-shadow: 0 5px 0 var(--accent-dark);
}
.round-progress {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 12px;
}
.game-area.flash-ok {
  background: #edf8ef;
}
.game-area.flash-bad {
  background: #fff0f0;
}
.spatial-board {
  width: min(430px, 100%);
  margin: 12px auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.spatial-cell {
  aspect-ratio: 1;
  border: 2px solid #cad7cb;
  border-radius: 12px;
  background: #f5f8f3;
  cursor: pointer;
}
.spatial-cell.active {
  background: #5f9f4f;
  box-shadow: 0 0 0 4px #dcebd6;
}
.spatial-cell.tap {
  transform: scale(0.94);
  background: #dfeadf;
}
.game-instruction {
  text-align: center;
  font-weight: 800;
}
.rule-banner {
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  background: #edf4eb;
  color: #285c39;
  font-weight: 950;
  letter-spacing: 0.04em;
}
.rule-stimulus {
  font-size: 6rem;
}
.ink-blue {
  color: #235bb3;
}
.ink-green {
  color: #22824f;
}
@media (max-width: 900px) {
  .sequence-workspace {
    grid-template-columns: 1fr;
  }
  .multi-select-grid {
    grid-template-columns: 1fr;
  }
  .sequence-slot.filled:after {
    display: none;
  }
}

/* V11 international + clinical UX */
.profile-locale-label {
  display: block;
  margin-top: 10px;
  font-size: 0.68rem;
  color: #bdd3c4;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.profile-locale-label select {
  width: 100%;
  margin-top: 5px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #4e765d;
  background: #214f36;
  color: #fff;
}
.guided-session-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 14px;
  margin-bottom: 12px;
  background: #eef5ea;
  border-left: 5px solid var(--accent);
}
.guided-session-bar strong {
  color: var(--accent-dark);
}
.guided-session-bar span {
  color: var(--muted);
  font-size: 0.82rem;
}
.guided-session-bar button {
  margin-left: auto;
}
.code-model {
  width: min(420px, 100%);
  margin: 16px auto;
  padding: 18px;
  border: 2px solid #a9c2ac;
  border-radius: 10px;
  background: #f5f9f3;
  text-align: center;
}
.code-model span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 900;
  letter-spacing: 0.12em;
}
.code-model strong {
  display: block;
  font-size: 2.2rem;
  letter-spacing: 0.14em;
  margin-top: 5px;
}
.pattern-rows {
  display: grid;
  gap: 9px;
  margin: 16px 0;
}
.pattern-rows > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pattern-rows span {
  font-size: 1.35rem;
  letter-spacing: 0.18em;
}
.session-builder {
  padding: 24px;
}
.session-config-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr;
  gap: 22px;
}
.session-domain-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.session-domain {
  display: flex;
  gap: 10px;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}
.session-domain:has(input:checked) {
  border-color: #7fab70;
  background: #f0f7ec;
}
.session-domain input {
  margin-top: 7px;
  accent-color: var(--accent);
}
.session-domain span {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 8px;
}
.session-domain b {
  font-size: 1.1rem;
}
.session-domain strong {
  align-self: center;
}
.session-domain small {
  grid-column: 2;
  color: var(--muted);
  line-height: 1.35;
  margin-top: 2px;
}
.session-settings label {
  display: block;
  font-size: 0.78rem;
  font-weight: 850;
  color: var(--muted);
}
.session-settings select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 11px;
  border: 2px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
}
.session-estimate {
  margin-top: 14px;
  padding: 16px;
  border-radius: 9px;
  background: #edf4eb;
  color: #285c39;
  font-weight: 900;
  text-align: center;
}
.session-plan-preview {
  margin: 20px 0;
}
.session-plan-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.session-plan-chips span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #eef4eb;
  border: 1px solid #d4e2d2;
  font-size: 0.78rem;
  font-weight: 800;
}
.session-complete {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 9px;
  background: #eaf6ec;
  border: 1px solid #bdd9c3;
}
.session-complete strong {
  color: #27623d;
}
.session-complete span {
  color: var(--muted);
}
@media (max-width: 800px) {
  .session-config-grid,
  .session-domain-options {
    grid-template-columns: 1fr;
  }
  .guided-session-bar {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .guided-session-bar button {
    margin-left: 0;
  }
}

/* V12 content-quality components */
.scenario-card {
  margin: 16px 0 18px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: #f7faf5;
  line-height: 1.55;
}
.scenario-card p {
  margin: 7px 0 0;
  font-size: 1.02rem;
  color: var(--ink);
}
.scenario-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
}
.code-model {
  margin: 12px 0 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf5;
  display: flex;
  gap: 18px;
  align-items: center;
}
.code-model span {
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
}
.code-model strong {
  font-size: 1.35rem;
  letter-spacing: 0.12em;
}
.pattern-rows {
  display: grid;
  gap: 10px;
  margin: 10px 0 18px;
}
.pattern-rows > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pattern-rows span {
  font-size: 1.25rem;
  letter-spacing: 0.16em;
}

/* V13: richer cognitive content */
.v13-visual-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.v13-visual-items span {
  min-height: 72px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}
.scenario-card {
  max-width: 980px;
}
.scenario-card p {
  font-size: 1rem;
  line-height: 1.62;
}
.exercise-card .prompt {
  max-width: 1180px;
}

/* V14 */
.level-control::before {
  content: "Dificultad";
  font-size: 0.68rem;
  color: var(--muted);
  margin-right: 6px;
}
.auth-card input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.billing-btn {
  white-space: nowrap;
}
.billing-btn.hidden {
  display: none !important;
}

.topbar .mini-btn {
  color: var(--accent-dark);
  background: #eef5ec;
  border: 1px solid #cfe0cf;
  font-weight: 800;
}

.topbar .mini-btn:hover {
  background: #dfeedd;
  border-color: #9fbd9f;
}

.topbar .billing-btn {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.topbar .billing-btn:hover {
  background: var(--accent-dark);
}
.reading-passage table { width:100%; border-collapse:collapse; margin:12px 0; }
.reading-passage td { padding:10px 14px; border:1px solid var(--line); text-align:left; }
.reading-passage li { margin:8px 0; }

/* Structured tasks must occupy the whole options region, not one grid cell. */
.options-grid.structured-options { display:block; }
.main-content { min-width:0; }
#exercise.early-primary .exercise-layout { grid-template-columns:minmax(0,1fr); }
#exercise.early-primary .exercise-card { container-type:inline-size; min-width:0; padding:clamp(16px,3vw,30px); }
#exercise.early-primary .exercise-meta { gap:12px; flex-wrap:wrap; line-height:1.6; }
#exercise.early-primary .prompt { font-size:clamp(1.15rem,2vw,1.4rem); line-height:1.5; overflow-wrap:anywhere; }
#exercise.early-primary .reading-passage { padding:18px; min-width:0; border-left-width:4px; }
#exercise.early-primary .reading-passage p { font-size:1.12rem; line-height:1.6; }
#exercise.early-primary .options-grid:not(.structured-options) { grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:16px; }
#exercise.early-primary .option-btn { display:flex; align-items:center; gap:12px; min-height:76px; padding:16px; font-size:1.12rem; line-height:1.5; overflow-wrap:anywhere; }
#exercise.early-primary .option-btn svg { width:44px; height:44px; flex:none; }
#exercise.early-primary .sequence-workspace { grid-template-columns:minmax(0,1fr); gap:18px; }
#exercise.early-primary .sequence-slot,#exercise.early-primary .word-token { font-size:1.06rem; line-height:1.5; min-height:56px; overflow-wrap:anywhere; }
#exercise.early-primary .sequence-slot.filled:after { grid-column:2; }
#exercise.early-primary .sequence-actions { justify-content:flex-start; }
#exercise.early-primary .sequence-actions button { min-height:48px; }
.stimulus-only-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.stimulus-cards { display:flex; flex-wrap:wrap; align-items:stretch; gap:14px; margin:12px 0; padding:0; }
.stimulus-unit { position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-width:72px; max-width:180px; padding:12px; border:1px solid #c5d6c8; border-radius:12px; background:white; text-align:center; line-height:1.45; }
.stimulus-unit svg { width:60px; height:60px; }
.count-units .stimulus-unit { min-width:64px; padding:6px; }
.ordered-cards .unit-position { font-size:.8rem; font-weight:800; color:#486250; }
.picture-icon { display:inline-flex; vertical-align:middle; }
.picture-glyphs { display:inline-flex; flex-wrap:wrap; align-items:center; gap:12px; vertical-align:middle; }
.picture-glyphs svg { width:42px; height:42px; flex:none; }
.early-model { padding:16px; border:2px solid #56866d; border-radius:12px; background:#fff; margin:12px 0 22px; }
.stimulus-caption { display:block; font-size:1rem; font-weight:800; margin:8px 0 12px; }
.early-model .picture-glyphs svg { width:52px; height:52px; }
#exercise.early-primary .early-comparison { table-layout:fixed; }
#exercise.early-primary .early-comparison td { padding:14px 12px; font-size:1.08rem; line-height:1.6; overflow-wrap:anywhere; }
#exercise.early-primary .early-comparison td:first-child { width:34%; font-weight:800; }
#exercise.early-primary .early-comparison .picture-icon svg { width:44px; height:44px; }
@container (min-width:760px) { #exercise.early-primary .sequence-workspace { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
@media(max-width:600px) {
  #exercise.early-primary .section-intro { flex-wrap:wrap; gap:14px; }
  #exercise.early-primary .reading-passage { padding:12px; }
  #exercise.early-primary .picture-glyphs { gap:6px; }
  #exercise.early-primary .picture-glyphs svg { width:32px; height:32px; }
  #exercise.early-primary .early-comparison td { padding:10px 8px; }
}

/* Adventure framing is an early-primary layer; older dashboards stay mature. */
.early-experience #home > .hero,
.early-experience #home > .dashboard-grid,
.early-experience #home > .section-grid { display:none; }
.early-hub { display:grid; gap:24px; }
.explore-welcome { display:grid; grid-template-columns:minmax(0,1fr) minmax(220px,.55fr); gap:24px; padding:30px; background:linear-gradient(120deg,#f4f8ed,#fff9e8); border-top:5px solid #79a86b; }
.explore-welcome h3 { font-size:clamp(1.7rem,3vw,2.4rem); line-height:1.2; margin:10px 0; }
.explore-welcome p { max-width:42ch; line-height:1.7; }
.explore-welcome .primary-btn { margin-top:14px; min-height:52px; white-space:normal; }
.explore-summary { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; text-align:center; }
.hub-illustration svg { width:100px; height:100px; }
.explore-summary small { color:var(--muted); line-height:1.5; }
.hub-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.hub-heading h3 { margin:4px 0; font-size:1.5rem; }
.hub-heading > span { color:var(--muted); font-size:.9rem; }
.early-area-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,310px),1fr)); gap:16px; }
.early-area-card { display:flex; gap:16px; align-items:flex-start; text-align:left; padding:22px; min-width:0; color:var(--ink); background:var(--card); cursor:pointer; border:1px solid var(--line); border-top:4px solid #92b57f; font:inherit; }
.early-area-card:hover { background:#f2f7ed; border-color:#75a174; }
.early-area-card:focus-visible,.mission-card button:focus-visible { outline:3px solid #2f7d4a; outline-offset:3px; }
.early-area-card:nth-child(4n+2) { border-top-color:#8bafc4; }
.early-area-card:nth-child(4n+3) { border-top-color:#d3b36a; }
.early-area-card:nth-child(4n) { border-top-color:#c69dba; }
.area-illustration { flex:none; padding:8px; border-radius:16px; background:#f2f5eb; }
.area-illustration svg { display:block; width:54px; height:54px; }
.area-copy { display:flex; flex:1; min-width:0; flex-direction:column; gap:6px; line-height:1.5; }
.area-copy strong { font-size:1.13rem; overflow-wrap:anywhere; }
.area-copy > small { color:#567249; font-weight:700; }
.area-copy > span:not(.area-progress) { color:var(--muted); font-size:.92rem; }
.area-progress { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; }
.area-progress i { width:12px; height:12px; border-radius:50%; border:1px solid #79a174; background:white; }
.area-progress i.done { background:#52814c; }
.area-progress small { flex-basis:100%; color:var(--muted); font-size:.8rem; }
.early-mission-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
.mission-card { display:flex; align-items:flex-start; gap:16px; padding:22px; min-width:0; }
.mission-card > span svg { width:42px; height:42px; }
.mission-card h4 { font-size:1.05rem; margin:0; line-height:1.5; }
.mission-card p { color:var(--muted); font-size:.9rem; line-height:1.6; margin:8px 0 14px; }
.mission-card button { min-height:48px; }
.mission-resume { padding:16px 20px; margin:0; line-height:1.7; border-radius:12px; background:#edf4e8; }
.early-task-guide { display:flex; align-items:center; flex-wrap:wrap; gap:16px; padding-bottom:18px; margin-bottom:22px; border-bottom:1px solid var(--line); }
.early-task-guide button { min-height:44px; }
.early-task-guide .mini-btn,.early-experience .guided-session-bar .mini-btn { color:var(--ink); background:#eef3e8; border:1px solid #c5d5bb; font-weight:700; }
.task-steps { display:flex; flex-wrap:wrap; gap:8px; font-size:.85rem; }
.task-steps span { padding:7px 10px; border-radius:8px; background:#f2f4ec; }
.task-steps .ready { background:#d9ead4; font-weight:700; }
.early-task-guide small { color:var(--muted); margin-left:auto; }
#exercise.early-primary #exerciseVisual { margin:24px 0 30px; }
#exercise.early-primary #exerciseVisual .reading-passage { border:1px solid #bfd1b8; border-left:5px solid #79a46c; background:#f4f6eb; padding:24px; border-radius:16px; }
#exercise.early-primary #exerciseOptions { padding-top:22px; border-top:2px dashed #d4dfcf; }
#exercise.early-primary #exerciseOptions .option-btn { background:#fff; border-width:2px; }
#exercise.early-primary #exerciseNext { min-height:52px; margin-top:18px; }
.early-experience .streak-card { display:none; }
@media(max-width:760px) {
  .explore-welcome { grid-template-columns:minmax(0,1fr); padding:22px; }
  .explore-summary { align-items:flex-start; text-align:left; }
  .hub-illustration { display:none; }
  .early-task-guide small { margin-left:0; flex-basis:100%; }
  .early-area-card { padding:18px; gap:12px; }
  #exercise.early-primary #exerciseVisual .reading-passage { padding:16px; }
}

/* Separate original visual languages for 8–10 and 10–12; early stays intact. */
.school-experience #home > .hero,.school-experience #home > .dashboard-grid,.school-experience #home > .section-grid { display:none; }
.school-hub { display:grid; gap:24px; }
.school-hero { padding:30px; display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:24px; }
.school-hero h3 { font-size:clamp(1.7rem,3vw,2.4rem); margin:8px 0; line-height:1.2; }
.school-hero p { line-height:1.7; max-width:48ch; }
.school-hero button { min-height:52px; margin-top:10px; }
.school-summary { display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center; gap:8px; }
.school-summary strong { font-size:2.6rem; }
.school-summary small { opacity:.85; }
.school-area-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:16px; }
.school-area-card { display:flex; align-items:center; text-align:left; gap:16px; padding:20px; min-width:0; color:var(--ink); font:inherit; cursor:pointer; }
.school-area-card > span:nth-child(2) { flex:1; min-width:0; display:grid; gap:8px; }
.school-area-card strong { overflow-wrap:anywhere; line-height:1.4; }
.school-area-card small { font-size:.82rem; color:var(--muted); }
.school-icon svg { width:46px; height:46px; display:block; }
.school-mission-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr)); gap:16px; }
.school-mission-card { padding:22px; }
.school-mission-card h4 { margin:0 0 10px; font-size:1.1rem; }
.school-mission-card p { color:var(--muted); line-height:1.6; min-height:3em; }
.school-mission-card button { min-height:48px; }
.school-task-guide { display:flex; align-items:center; flex-wrap:wrap; gap:18px; padding-bottom:18px; border-bottom:1px solid var(--line); margin-bottom:22px; }
.school-task-guide button { min-height:44px; }
.school-task-guide > span { color:var(--muted); font-size:.9rem; }
.school-experience[data-age-theme="workshop"] .school-hero { border:3px solid #657f53; border-radius:8px; background:repeating-linear-gradient(0deg,transparent,transparent 31px,#74965a0a 32px),repeating-linear-gradient(90deg,#f5f6e9,#f5f6e9 31px,#74965a22 32px); }
.school-experience[data-age-theme="workshop"] .school-area-card { border:2px solid #859872; border-radius:8px; box-shadow:4px 4px 0 #dce5ce; }
.school-experience[data-age-theme="workshop"] .school-mission-card { border-radius:8px; border-top:5px solid #bba573; }
.school-experience[data-age-theme="base"] .school-hero { color:#fff; border:1px solid #545688; background:linear-gradient(125deg,#202b49,#414477 65%,#225967); border-radius:18px; position:relative; }
.school-experience[data-age-theme="base"] .school-hero .eyebrow { color:#b8e9f0!important; }
.school-experience[data-age-theme="base"] .school-hero p { color:#ecedf6; }
.school-experience[data-age-theme="base"] .school-hero .primary-btn { background:#dbf1f0!important; color:#202b49!important; border-color:#a6c9d0!important; }
.school-experience[data-age-theme="base"] .school-area-card { border-left:5px solid #6873a0; border-radius:12px; box-shadow:0 5px 14px #2533550c; }
.school-experience[data-age-theme="base"] .school-mission-card { border-top:4px solid #738cae; }
.school-experience #exerciseOptions .option-btn { min-height:68px; font-size:1.07rem; padding:18px; }
.school-experience #exerciseVisual .reading-passage { padding:22px; line-height:1.7; }
.school-experience .guided-session-bar .mini-btn { color:var(--ink); background:#eef1f6; border:1px solid #bdcad6; }
.school-area-card:focus-visible { outline:3px solid #476674; outline-offset:3px; }
#exercise.early-primary #languageModeSwitch { display:flex; flex-wrap:wrap; width:fit-content; max-width:100%; gap:6px; }
#exercise.early-primary #languageModeSwitch .language-mode-btn { min-height:48px; flex:1 1 140px; white-space:normal; }
@media(max-width:760px) {
  .school-hero { grid-template-columns:minmax(0,1fr); padding:22px; }
  .school-summary { align-items:flex-start; text-align:left; }
  .school-hero button { white-space:normal; }
}
.structured-stimulus-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; list-style:none; margin:16px 0; padding:0; }
.structured-stimulus-list li { padding:16px; border:1px solid #bdcbd0; border-radius:10px; background:#fff; line-height:1.6; overflow-wrap:anywhere; }
.stimulus-table-scroll { max-width:100%; overflow-x:auto; margin:16px 0; }
.structured-stimulus-table { width:100%; border-collapse:collapse; text-align:left; }
.structured-stimulus-table th,.structured-stimulus-table td { padding:14px 18px; border:1px solid #bdcbd0; line-height:1.6; }
.structured-stimulus-table th { background:#e7eef1; font-weight:700; }
.structured-stimulus-table tr:nth-child(odd) td { background:#f7fafb; }
.stimulus-paragraph { max-width:none; width:100%; line-height:1.85; white-space:pre-line; overflow-wrap:anywhere; }
.scenario-card p { white-space:pre-line; }
.table-scroll-hint { display:none; }
#exercise:not(.early-primary) .exercise-layout.single { grid-template-columns:minmax(0,1fr); }
#exercise:not(.early-primary) .exercise-card, #exercise:not(.early-primary) #exerciseVisual { min-width:0; }
[data-age-theme="workshop"] #exercise .exercise-card { border-top:5px solid #718b51; }
[data-age-theme="base"] #exercise .exercise-card { border-top:5px solid #5a719e; }
[data-age-theme="studio"] .sidebar { background:linear-gradient(160deg,#202c44,#303b58)!important; }
[data-age-theme="studio"] .main-content { background:#edf0f6!important; }
[data-age-theme="studio"] .block-banner { border:1px solid #c4cedd; border-bottom:4px solid #6e75ab; background:#f8f9fd!important; }
[data-age-theme="studio"] .block-banner::before { background:#6e75ab; }
[data-age-theme="studio"] #exercise .exercise-card { border:1px solid #c4cedd; border-top:5px solid #6e75ab; border-radius:16px; box-shadow:0 6px 18px #202c4409; }
[data-age-theme="studio"] #exercise .prompt { color:#263954!important; }
[data-age-theme="studio"] #exerciseVisual .reading-passage { background:#f2f4fa!important; border-left-color:#6e75ab!important; }
[data-age-theme="studio"] .level-control { background:#e5eaf5; border-color:#c4cedd; color:#263954; }
[data-age-theme="studio"] .primary-btn { background:#405481!important; border-color:#2c3d60!important; color:white!important; }
[data-age-theme="studio"] .language-topic { background:#e4e9f4; color:#263954; }
[data-age-theme="studio"] .hero-visual { display:none; }
/* Youth display type stays on the compact area pill, not on large headings. */
#appShell:is([data-age-route="middle"],[data-age-route="teen"]) #exercisePill {
  font-family:"Arial Black",Arial,sans-serif;
  font-weight:800;
  letter-spacing:.04em;
  font-size:.78rem;
  line-height:1.35;
}
@media(max-width:600px) { .structured-stimulus-list { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; } .structured-stimulus-list li { padding:12px; } .structured-stimulus-table th,.structured-stimulus-table td { padding:12px; min-width:95px; } }
@media(max-width:640px) {
  #exercise:not(.early-primary) .section-intro { flex-direction:column; align-items:stretch; gap:18px; }
  #exercise:not(.early-primary) .section-intro>div { min-width:0; width:100%; }
  #exercise:not(.early-primary) .level-control { position:static; align-self:flex-start; width:fit-content; }
  .table-scroll-hint { display:block; font-size:.85rem; color:#4b5f69; }
}

/* Recall positions keep their geometry at every viewport width. */
.recall-grid,.spatial-answer-grid{--grid-size:2;display:grid;grid-template-columns:repeat(var(--grid-size),minmax(0,1fr));gap:.6rem;width:100%;max-width:40rem;margin:1rem auto}
.recall-grid>[role=row]{display:contents}
.recall-grid [role=cell]{display:flex;align-items:center;justify-content:center;min-height:6rem;padding:.6rem;text-align:center;background:#fff;border:2px solid #bccdbf;border-radius:.6rem;overflow-wrap:anywhere}
.recall-grid .picture-icon svg{width:3rem;height:3rem}
.spatial-answer-grid .option-btn{min-height:6rem;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:.5rem;text-align:center}

/* Keep the activity family and its instruction legible as one reading unit. */
#appShell[data-design] #exerciseTopic.language-topic{display:block;margin:0;padding:0;border:0;border-radius:0;background:transparent!important;color:var(--accent-dark)!important;font-family:inherit;font-size:.95rem;font-weight:750;line-height:1.45;letter-spacing:normal}
#appShell[data-design] #exerciseTopic.language-topic.hidden{display:none!important}
#appShell[data-design] #exercise:has(#exerciseTopic:not(.hidden)) #exercisePrompt{margin:5px 0 16px;padding:0;border:0;border-radius:0;background:transparent!important;color:var(--ink)!important;font-family:inherit;font-weight:750;line-height:1.4;box-shadow:none}
.homework-board caption.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.spatial-answer-grid small{font-size:.8rem}.sequence-flash{min-height:10rem;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;font-size:2rem}.sequence-flash svg{width:6rem;height:6rem}
.speed-key{display:inline-block;margin-right:1rem;padding:.2rem .5rem;border:1px solid currentColor;border-radius:.25rem;font-size:.85rem}.speed-result{font-size:1rem;font-weight:400;line-height:1.6;color:#163c2c}
@media(max-width:480px){.recall-grid [role=cell]{min-height:5rem;padding:.3rem;font-size:.9rem}.recall-grid{gap:.3rem}.recall-grid .picture-icon svg{width:2rem;height:2rem}}
/* Keep a timed trial's source and response controls together, especially on phones. */
#exercise.speed-active .section-intro,#exercise.speed-active .exercise-meta,#exercise.speed-active #exerciseTopic,#exercise.speed-active .early-task-guide,#exercise.speed-active .school-task-guide{display:none!important}
#exercise.speed-active .exercise-card{padding:1rem!important}
#exercise.speed-active #exercisePrompt{font-size:1.35rem!important;margin:.25rem 0 .75rem!important;scroll-margin-top:.5rem}
#exercise.speed-active #exerciseOptions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.5rem!important;margin-top:.6rem!important}
#exercise.speed-active #exerciseOptions .option-btn{min-height:3.5rem!important;padding:.5rem!important;font-size:1.15rem!important}
#exercise.speed-active #exerciseVisual table{margin:.3rem 0!important}
#exercise.speed-active #exerciseVisual th,#exercise.speed-active #exerciseVisual td{padding:.35rem .6rem!important;font-size:1rem!important;line-height:1.25!important}
/* Pair recall uses a calm, bounded reading surface rather than a page-wide ledger. */
.association-frame{max-width:48rem;margin:1rem auto;border:1px solid #dce7e1;border-radius:1rem;overflow:hidden;background:#fff;box-shadow:0 8px 24px #173b2910}
.homework-board{max-width:58rem;margin:1rem auto;border:2px solid #91aa95;border-radius:.75rem;background:#fbfaf4;box-shadow:0 5px 0 #d8dfd1;overflow:hidden;color:#263f3a}.homework-board-heading{display:flex;align-items:center;gap:.6rem;padding:.7rem 1rem;background:#e7efe0;border-bottom:1px solid #c8d6c5;text-transform:uppercase;letter-spacing:.06em;font-size:.85rem;color:#486556}.homework-board-scroll{overflow-x:auto}.homework-board table{width:100%;border-collapse:collapse;margin:0!important}.homework-board th,.homework-board td{padding:.8rem 1rem;border-bottom:1px solid #d9dfd6;text-align:left;vertical-align:middle}.homework-board thead th{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#5a7167;background:#f1f3e8}.homework-board tbody th{min-width:9rem;white-space:nowrap;color:#365a52}.homework-board tbody tr:last-child th,.homework-board tbody tr:last-child td{border-bottom:0}.homework-area-icon{display:inline-flex;width:2.4rem;height:2.4rem;margin-right:.55rem;vertical-align:middle;align-items:center;justify-content:center}.bioart-area-icon{display:block;width:2.4rem;height:2.4rem}.homework-board td{line-height:1.5}
#exercise .memory-associations{width:100%;border-collapse:collapse;margin:0!important;font-size:1.12rem}
#exercise .memory-associations thead th{background:#edf5f0;color:#486556;text-transform:uppercase;letter-spacing:.08em;font-size:.72rem;padding:1rem 1.25rem;text-align:left;border:0}
#exercise .memory-associations tbody th,#exercise .memory-associations tbody td{padding:.8rem 1.25rem;border:0;border-top:1px solid #edf1ee;text-align:left;background:#fff;font-weight:500}
.person-initial{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;margin-right:.75rem;border-radius:50%;background:#e3eee6;color:#296043;font-size:.85rem;font-weight:800}
.memory-order-workspace .sequence-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}
#exercise .memory-order-workspace .sequence-slot{min-height:3.8rem;display:flex!important;align-items:center;gap:.65rem;padding:.65rem;overflow-wrap:anywhere;text-align:left}
#exercise .memory-order-workspace .sequence-slot>span{flex:0 0 1.8rem}
#exercise .memory-order-workspace .sequence-slot.filled:after{display:none!important}
#exercise .memory-order-workspace .token-tray{display:flex;flex-wrap:wrap;gap:.5rem}
@media(max-width:600px){#exercise .memory-associations tbody th,#exercise .memory-associations tbody td{padding:.65rem .75rem;font-size:1rem}.person-initial{margin-right:.45rem;width:1.7rem;height:1.7rem}.memory-order-workspace .sequence-slots{grid-template-columns:1fr}}

/* Legible original documents, shared with the printable source. */
:is(#documentModeSwitch,#photoModeSwitch,#interactionKindSwitch,#speedModeSwitch){width:fit-content;max-width:100%;flex-wrap:wrap;gap:.35rem;margin-bottom:1rem;padding:.5rem}
:is(#documentModeSwitch,#photoModeSwitch,#interactionKindSwitch,#speedModeSwitch) button[aria-pressed="true"]{background:var(--green,#2f7d4a);color:white}
.practice-document{margin:1rem auto;max-width:540px}
.practice-document.landscape-document{width:100%;max-width:1050px}
.practice-document.receipt-document{max-width:430px}
.practice-document img{display:block;width:100%;height:auto;background:white;border:1px solid #dce5df;box-shadow:0 6px 22px #17332615;border-radius:8px}
.practice-document figcaption{display:flex;justify-content:space-between;gap:1rem;flex-wrap:wrap;font-size:.9rem;color:#52675b;padding:.7rem 0}
.document-transcript{max-width:48rem;margin:1rem auto;padding:.8rem 1rem;border:1px solid #dce5df;border-radius:10px;background:#fff}
.document-transcript summary{cursor:pointer;font-weight:700;color:#215a3a}
.document-transcript[open] summary{margin-bottom:1rem}
:is(#documentModeSwitch,#photoModeSwitch,#interactionKindSwitch,#speedModeSwitch) button{border:0;background:transparent;border-radius:7px;padding:.75rem 1rem;min-height:44px;font:inherit;font-weight:750;color:var(--muted,#52675b);cursor:pointer;flex:1 1 auto}
:is(#documentModeSwitch,#photoModeSwitch,#interactionKindSwitch,#speedModeSwitch) button[aria-pressed="true"]{background:#1e4d33;color:#fff;box-shadow:0 2px 0 #133523}
:is(#documentModeSwitch,#photoModeSwitch,#interactionKindSwitch,#speedModeSwitch) button:focus-visible{outline:3px solid #d9b74c;outline-offset:2px}

.auth-link{display:block;margin:1rem auto 0;border:0;background:transparent;color:#215a3a;text-decoration:underline;font:inherit;cursor:pointer;padding:.5rem}
.password-dialog{border:1px solid #dce5df;border-radius:16px;padding:1.8rem;max-width:30rem;width:calc(100% - 2rem);color:#173326;background:#fffdf8;box-shadow:0 20px 60px #17332633}
.password-dialog::backdrop{background:#102a20a8}
.password-dialog h2{margin-top:0}
.password-dialog label{display:grid;gap:.4rem;margin:1rem 0;font-weight:650}
.password-dialog input{width:100%;padding:.8rem;border:1px solid #c4d5c9;border-radius:7px;font:inherit}
.password-dialog [role=status]{min-height:1.5rem;overflow-wrap:anywhere}
.password-dialog .auth-actions{display:flex;flex-wrap:wrap;gap:.6rem}

/* Early exploration layer: original small vectors; older routes retain their UI. */
.early-experience .discovery-trail{padding:22px;border:1px solid #ccdbc7;border-radius:16px;background:#fffdf7;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.6fr);gap:24px}
.discovery-trail>div{display:grid;gap:8px;align-content:center}
.discovery-trail>div>span{font-size:.9rem;color:#536b57}
.discovery-trail progress{width:100%;height:12px;accent-color:#397c50}
.discovery-trail ol{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.discovery-trail li{display:flex;align-items:center;gap:10px;padding:12px;border-radius:12px;background:#f0f3ec;line-height:1.5;min-width:0}
.discovery-trail li>span:first-child{font-size:1.5rem;flex:none;color:#527653}
.discovery-trail li small{display:block;color:#536b57;font-size:.8rem}
.discovery-trail .discovered{background:#e0efdb;border:1px solid #9dbe90}
.early-experience .early-area-card{border-radius:18px;box-shadow:0 4px 0 #1d422d0c;transition:background .15s}
.early-experience .early-area-card[data-area=language],.early-experience .early-area-card[data-area=reading]{background:#fffaf1}
.early-experience .early-area-card[data-area=attention],.early-experience .early-area-card[data-area=memory]{background:#f4faf6}
.early-experience .early-area-card[data-area=division]{background:#f2f8fc}
#exercise.early-primary .task-steps .current{background:#e0eed8;border:1px solid #9ab78a;font-weight:750}
#exercise.early-primary .early-model{padding:20px;background:#fffdf5;border:2px solid #96b583;border-radius:14px;margin-bottom:22px}
#exercise.early-primary .early-comparison td{padding:18px;letter-spacing:.06em;line-height:1.7}
#exercise.early-primary .early-comparison tr{border-bottom:8px solid #f4f6eb}
#exercise.early-primary .stimulus-unit{min-height:84px;border-radius:14px}
@media(max-width:900px){.early-experience .discovery-trail{grid-template-columns:1fr}.discovery-trail ol{gap:8px}}
@media(max-width:520px){.discovery-trail ol{grid-template-columns:1fr}.early-experience .discovery-trail{padding:18px}#exercise.early-primary .early-comparison td{padding:14px 10px}}
@media(prefers-reduced-motion:reduce){.early-experience .early-area-card{transition:none}}
.attention-model{display:flex;flex-wrap:wrap;align-items:center;gap:18px;padding:20px;border:2px solid #90ad85;border-radius:14px;background:#fffdf6;margin-bottom:22px}
.attention-model>span{font-weight:800;color:#386344;font-size:.85rem;letter-spacing:.08em}
.attention-model code,.attention-comparison code{font-family:ui-monospace,Consolas,monospace;font-variant-ligatures:none;font-size:1.25em;letter-spacing:.12em;overflow-wrap:anywhere}
.attention-comparison{width:100%;border-collapse:separate;border-spacing:0 12px}
.attention-comparison th{width:3rem;background:#e4efdf;border-radius:10px 0 0 10px;padding:16px;font-weight:800}
.attention-comparison td{padding:16px 22px;background:white;border:1px solid #d4e0ce;border-radius:0 10px 10px 0}
/* Object recall has one consistent visual contract at every age. */
.memory-object-sequence{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center}
.memory-object-sequence .stimulus-unit{display:flex;flex-direction:column;align-items:center;gap:.5rem;min-width:7rem;max-width:11rem;padding:1rem;background:white;border:1px solid #cfddd5;border-radius:12px;text-align:center}
.memory-object-sequence .picture-icon svg,.memory-associations .picture-icon svg{width:3.5rem;height:3.5rem;display:block}
.memory-associations td>span{vertical-align:middle}.memory-associations .picture-icon{display:inline-block;margin-right:.8rem}
.empty-memory-cell{font-size:.85rem;color:#64786c;border:1px dashed #b3c5b8;border-radius:8px;padding:.5rem}
.speed-comparison{display:grid;grid-template-columns:1fr;gap:1.3rem;margin:1rem auto;max-width:62rem}
.speed-series{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:.9rem;padding:1rem;background:white;border:2px solid #bfd0c5;border-radius:14px;min-height:7rem}
.speed-symbol{display:inline-flex;flex-direction:column;align-items:center;font-family:ui-monospace,Consolas,monospace;font-size:2.5rem;font-weight:650;line-height:1.4;min-width:3rem}
.speed-symbol .picture-icon svg{width:4.5rem;height:4.5rem;display:block}.speed-symbol .picture-icon+span{font:500 .9rem system-ui,sans-serif}
.speed-symbol .picture-glyphs svg{width:3.8rem;height:3.8rem}
@media(max-width:520px){.speed-series{gap:.65rem;padding:.8rem;min-height:6rem}.speed-symbol{font-size:2.1rem;min-width:2.2rem}.speed-symbol .picture-icon svg{width:3.6rem;height:3.6rem}.speed-symbol .picture-glyphs svg{width:3rem;height:3rem}.memory-object-sequence .stimulus-unit{min-width:6rem;max-width:8rem}.memory-associations .picture-icon svg{width:2.7rem;height:2.7rem}}
.recall-grid [role=cell]{flex-direction:column;gap:.45rem}.recall-grid .picture-icon svg{width:3.5rem;height:3.5rem}
@media(max-width:480px){.recall-grid .picture-icon svg{width:3rem;height:3rem}}

/* Executive situations use the available card width; reading retains its measure. */
#exercise[data-subject="executive"] .stimulus-paragraph { max-width:none; }
#exercise[data-subject="executive"] .scenario-card { max-width:none; }

/* A single source panel, with clear labels and comfortable response controls. */
#exercise .reading-passage{border:1px solid #d8e2d7;border-left:5px solid #77a366;background:#f6f8f1;border-radius:12px;padding:clamp(16px,2vw,26px)}
#exercise .reading-passage:has(.practice-document){background:#fbfcf8}
#exercise .reading-passage>.stimulus-caption{font-weight:750;color:#355b43;font-size:.88rem;letter-spacing:.025em;margin:1.25rem 0 .65rem;line-height:1.5}
#exercise .reading-passage>.stimulus-caption:first-child{margin-top:0}
#exercise .reading-passage .stimulus-paragraph+.stimulus-paragraph{margin-top:1rem}
.reader-assist{display:flex;align-items:center;flex-wrap:wrap;gap:.45rem;margin:0 0 .65rem;padding:.55rem;border:1px solid #d6dfeb;border-radius:.7rem;background:#f4f6fa;color:#263954}
.reader-assist strong{margin-inline:.3rem}.reader-assist button{min-height:2.7rem;padding:.35rem .65rem;font-size:.9rem}
#exercise .reading-passage{font-size:calc(1rem * var(--reader-scale,1));line-height:1.65}
#exercise .reading-passage.reader-wide-spacing{letter-spacing:.045em;word-spacing:.12em;line-height:1.9}
#exercise .reading-passage.reader-warm{background:#fbf4e7!important;color:#2d332e!important}
#exercise .reading-passage.reader-clear-font,#exercise .reading-passage.reader-clear-font *{font-family:"Atkinson Hyperlegible",Arial,sans-serif!important}
.typography-compare{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;max-width:52rem;margin:1rem auto}
.typeface-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.65rem;min-height:11rem;padding:1rem;border:2px solid #d5dfea;border-radius:1rem;background:#fff;color:#183c50;min-width:0}
.typeface-card>span{text-transform:uppercase;font-size:.75rem;font-weight:750;letter-spacing:.08em;color:#4f6572}
.typeface-card>strong{font-size:clamp(2rem,6vw,3.75rem);line-height:1.15;overflow-wrap:anywhere}
.graffiti-word>strong{font-family:"Arial Black",Arial,sans-serif;letter-spacing:.08em;color:#2754b6;-webkit-text-stroke:.7px #183c50;text-shadow:2px 2px 0 #f3c947,4px 4px 0 #dce7fa}
.print-word>strong{font-family:Georgia,"Times New Roman",serif;font-weight:700;letter-spacing:.12em;color:#8b3455}
.reader-assist button[aria-pressed=true]{background:#315e82;color:#fff}
@media(max-width:560px){.typography-compare{gap:.5rem}.typeface-card{min-height:8rem;padding:.5rem}.typeface-card>strong{font-size:clamp(1.4rem,7vw,2.4rem)}.reader-assist{gap:.35rem}.reader-assist button{flex:1 1 auto}}
#exercise .structured-stimulus-table th{color:#234a36;background:#e7eee3}
#exercise .structured-stimulus-table td{background:#fff;vertical-align:top}
#exercise .structured-stimulus-table tr:nth-child(odd) td{background:#f7faf5}
#exercise .review-plan-table{table-layout:fixed}
#exercise .review-plan-table th:first-child{width:24%}
#exercise .review-plan-table th,#exercise .review-plan-table td{overflow-wrap:anywhere;min-width:0}
#exercise .multi-select-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%}
#exercise .multi-option{display:flex;align-items:center;gap:1rem;text-align:left;position:relative;padding:1rem 1.25rem;min-height:64px;border-radius:10px;overflow-wrap:anywhere;white-space:normal;line-height:1.5}
#exercise .multi-option::before{content:'';position:static;transform:none;display:inline-grid;place-items:center;flex:0 0 1.25rem;width:1.25rem;height:1.25rem;border:2px solid #8da58e;border-radius:4px;background:white}
#exercise .multi-option[aria-pressed=true]::before{content:'✓';display:grid;place-items:center;background:#255d3b;border-color:#255d3b;color:white;font-size:.85rem}
#exercise .multi-option:focus-visible{outline:3px solid #a57a24;outline-offset:3px}
#exercise .multi-actions{display:flex;gap:1rem;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:1rem}
@media(max-width:520px){#exercise .multi-select-grid{grid-template-columns:1fr}#exercise .review-plan-table th,#exercise .review-plan-table td{padding:10px 8px;font-size:.92rem}}

.review-column-label{display:none}
@media(max-width:600px){
 #exercise .review-plan-table,#exercise .review-plan-table tbody{display:block;width:100%}
 #exercise .review-plan-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 #exercise .review-plan-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:14px;border:1px solid #c6d4c4;border-radius:10px;overflow:hidden}
 #exercise .review-plan-table tbody th{grid-column:1/-1;width:auto;padding:12px;font-size:1rem;border:0;background:#e7eee3;overflow-wrap:normal}
 #exercise .review-plan-table tbody td{padding:12px;border:0;font-size:1rem;overflow-wrap:normal;hyphens:auto;line-height:1.6}
 #exercise .review-plan-table tbody td:last-child{border-left:1px solid #d8e2d7}
 #exercise .review-column-label{display:block;margin-bottom:.5rem;font-size:.78rem;line-height:1.4;font-weight:750;color:#355b43}
}

#exercise.early-primary .reading-passage>.stimulus-caption{font-size:1rem}

.feedback.practice{color:#635223;background:#fcf6e6;border-left:4px solid #b89b46;padding:12px 16px;border-radius:6px;line-height:1.6}
#reviseWritingAnswer{margin:12px 0}
.document-mode-hint{margin:0 0 1rem;line-height:1.5}
.multi-option .picture-icon{display:inline-flex;vertical-align:middle;margin-right:.6rem}
.multi-option .picture-icon svg{width:2.7rem;height:2.7rem}

/* Labelled attention data keep their source letters even when answers shuffle. */
.reading-passage .attention-data {max-width:48rem;table-layout:fixed;border-collapse:separate;border-spacing:0 8px}
.attention-data thead th {width:auto;background:transparent;text-align:left;font-size:.85rem;color:var(--muted);padding:4px 16px}
.attention-data thead th:first-child {width:5rem}
.attention-data td {overflow-wrap:anywhere;line-height:1.5}

/* Shared vectors keep readable text and a calm visual hierarchy. */
.memory-object-sequence .picture-icon,.recall-grid .picture-icon{filter:drop-shadow(0 3px 3px #264b4310)}
.memory-scene,.memory-route{margin:0 auto;max-width:800px}
.memory-scene>svg,.memory-route>svg{display:block;width:100%;height:auto;border:1px solid #d4dfd2;border-radius:20px}
.memory-scene details{margin-top:12px;color:#4c685c}
.route-legend{display:flex;flex-wrap:wrap;gap:10px 26px;padding-left:24px;margin:16px 0 0;font-size:.88rem;color:#4c685c}
.speed-search-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;max-width:760px;margin:auto}
.speed-search-grid>div{display:flex;justify-content:center;align-items:center;min-width:0;padding:8px;background:#fff;border-radius:12px;border:1px solid #d8e3d8}
.speed-search-grid .picture-icon+span,.speed-search-grid .picture-glyphs+span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.flanker-strip{display:flex;align-items:center;justify-content:center;gap:clamp(6px,2vw,22px);padding:24px 8px;font-size:clamp(1.2rem,3.4vw,2.4rem);font-weight:700;white-space:nowrap}
.flanker-strip>div{min-width:0}
.reading-passage .pair-scan{border-collapse:separate;border-spacing:0 7px;table-layout:fixed;max-width:780px;margin:auto}
.pair-scan td{padding:10px 18px;background:#fff;border-radius:7px;text-align:center}
.pair-scan code{font-variant-ligatures:none;letter-spacing:.14em;overflow-wrap:anywhere;font-size:1.16rem}
.spatial-answer-grid .option-btn:has(>span:only-child){aspect-ratio:1;min-height:70px;font-size:1.35rem;color:#6a8c7d;justify-content:center;align-items:center;background:#f6faf4}
.accuracy-ring{position:relative;width:150px;height:150px;margin:12px auto}
.accuracy-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.accuracy-ring circle{fill:none;stroke-width:9}
.ring-track{stroke:#e9eee5}.ring-value{stroke:#548c76;stroke-linecap:round;transition:stroke-dasharray .3s ease}
.accuracy-ring>div{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px}
.accuracy-ring strong{font-size:2rem}.accuracy-ring span{font-size:.78rem;color:#60796a}
.progress-subject{text-align:center;border-top:3px solid #adc7ad}
.speed-timing-card{margin-top:20px}
.speed-timing-card h3{margin:6px 0 12px}
.speed-timing-intro,.speed-timing-note{line-height:1.65;color:#60796a}
.speed-timing-scale{display:flex;justify-content:space-between;color:#60796a;font-size:.8rem;margin:24px 0 10px}
.speed-timing-list{display:grid;gap:24px;margin:0;padding:0;list-style:none}
.speed-timing-row{min-width:0}
.speed-timing-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:10px;flex-wrap:wrap}
.speed-timing-heading strong{font-size:.95rem;overflow-wrap:anywhere}
.speed-timing-value{color:#285143;font-size:1.2rem;font-weight:750;font-variant-numeric:tabular-nums}
.speed-timing-row svg{display:block;width:100%;height:18px}
.speed-timing-row p{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:8px 0 0;color:#60796a;font-size:.8rem}
.speed-timing-row p strong{color:#285143}
.speed-timing-table{overflow-x:auto}
.speed-timing-table table{font-size:.85rem}
.progress-chart-summary{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;color:#60796a}.progress-chart-summary strong{color:#285143;font-size:1.35rem}
.evolution-chart{display:block;width:100%;height:auto;max-height:350px;margin-top:20px;background:linear-gradient(#fbfcf8,#fffdf7);border-radius:16px}
.progress-chart-data table{width:100%;border-collapse:collapse;margin-top:12px}.progress-chart-data th,.progress-chart-data td{padding:10px;text-align:left;border-bottom:1px solid #e1e9de}
@media(max-width:600px){.speed-search-grid{gap:6px;grid-template-columns:repeat(5,minmax(0,1fr))}.speed-search-grid svg{width:38px;height:38px}.pair-scan code{font-size:1rem;letter-spacing:.06em}.pair-scan td{padding:10px 6px}.accuracy-ring{width:126px;height:126px}.progress-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.speed-progress-detail{overflow-wrap:anywhere}}

/* Everyday photographs: full scenes, no answer-bearing captions during recall. */
.everyday-photo{max-width:900px;margin:0 auto}
.everyday-photo figure,.photo-comparison figure{margin:0;min-width:0}
.everyday-photo img,.photo-comparison img{display:block;width:100%;height:auto;border-radius:14px;border:1px solid #d4dfd2}
.photo-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.photo-comparison figcaption{padding:10px;text-align:center;font-weight:750;color:#285143}
.photo-ready{padding:24px;border-radius:12px;background:#eef5e9;line-height:1.7}
#photoModeSwitch{max-width:100%;flex-wrap:wrap}
@media(max-width:700px){.photo-comparison{grid-template-columns:1fr;gap:16px}}

.everyday-photo img{width:auto;max-width:100%;max-height:60vh;object-fit:contain;margin:0 auto}
.photo-hit-image{position:relative}
.photo-hit{position:absolute;min-height:0;padding:0;border:3px solid transparent;border-radius:12px;background:transparent;cursor:crosshair;box-shadow:none}
.photo-hit:hover,.photo-hit:focus-visible{border-color:#b89536;background:#ffdc631c;outline:2px solid #fff;outline-offset:1px}
.photo-hit.selected{border-color:#285e50;background:#5cbda938;box-shadow:0 0 0 2px #fff}
.photo-hit.correct{border-color:#2b8151;background:#43c17435}
.photo-hit.wrong{border-color:#bd4141;background:#df555540}
.photo-hit.selected::after,.photo-hit.correct::after{content:'✓';position:absolute;right:0;top:0;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#285e50;color:#fff;font-size:16px;font-weight:800}
.photo-mark-help{margin:12px 0 0;line-height:1.6;color:#526b5c;font-size:.9rem}

/* A compact overview keeps all areas legible without oversized chart tiles. */
#progressCards{grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px;margin-bottom:12px}
#progressCards .progress-subject{display:grid;grid-template-columns:78px minmax(0,1fr);grid-template-rows:1fr 1fr;gap:4px 12px;align-items:center;min-height:110px;padding:12px;text-align:left;background:var(--progress-tint);border-top:3px solid var(--progress-color)}
#progressCards .progress-subject>small:first-child{grid-column:2;grid-row:1;align-self:end;color:var(--progress-color);font-size:.85rem;font-weight:750;line-height:1.35;overflow-wrap:anywhere}
#progressCards .progress-subject>small:last-child{grid-column:2;grid-row:2;align-self:start;font-size:.72rem;line-height:1.4}
#progressCards .accuracy-ring{grid-column:1;grid-row:1/3;width:78px;height:78px;margin:0}
#progressCards .accuracy-ring strong{font-size:1.2rem}
#progressCards .accuracy-ring span{font-size:.55rem}
#progressCards .accuracy-ring>div{gap:2px}
#progressCards .ring-value{stroke:var(--progress-color)}
.speed-timing-card{margin-top:12px;padding:18px}
.speed-timing-card h3{font-size:1.2rem;margin:4px 0 8px}
.speed-timing-intro{font-size:.85rem;margin:0}
.speed-timing-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 28px}
.speed-timing-heading{gap:6px;margin-bottom:6px}
.speed-timing-heading strong{font-size:.8rem}
.speed-timing-value{font-size:1rem}
.speed-timing-row svg{height:12px}
.speed-timing-row p{font-size:.7rem;margin-top:5px}
.speed-timing-scale{margin-top:14px}
.speed-timing-note{font-size:.75rem;margin:12px 0}
.speed-timing-history{margin-top:14px}
.speed-timing-history summary{cursor:pointer;color:#506b5e;margin-bottom:14px;font-size:.85rem;font-weight:650}
#progress .section-intro{padding:18px 22px}
#progress .section-intro h3{font-size:1.5rem}
#progress .section-intro p{font-size:.85rem;line-height:1.5}
@media(max-width:650px){#progressCards{grid-template-columns:repeat(2,minmax(0,1fr))}#progressCards .progress-subject{grid-template-columns:1fr;text-align:center;gap:5px;min-height:155px;padding:10px}#progressCards .progress-subject>small:first-child{grid-column:1;grid-row:1;align-self:center}#progressCards .accuracy-ring{grid-column:1;grid-row:2;margin:auto;width:70px;height:70px}#progressCards .progress-subject>small:last-child{grid-column:1;grid-row:3}.speed-timing-list{grid-template-columns:1fr;gap:16px}.speed-timing-card{padding:14px}}

/* Cohesive original area icons. Text labels carry meaning; artwork is decorative. */
#exerciseHeading{display:flex;align-items:center;gap:12px;min-width:0}
#exerciseHeading::before,.nav-area-icon,[data-area] .area-illustration{content:'';display:inline-block;background-image:url('../assets/icons/learning-areas-3d.png');background-size:400% 300%;background-repeat:no-repeat;background-position:0 0;border-radius:12px;flex-shrink:0}
#exerciseHeading::before{width:64px;height:64px;flex-basis:64px}
.nav-area-icon{width:32px;height:32px;vertical-align:middle;margin-right:7px}
.nav-item[data-subject]{display:flex;align-items:center;text-align:left;min-width:0}
.nav-area-label{flex:1;min-width:0;overflow-wrap:anywhere}
[data-area] .area-illustration{width:64px;height:64px}
[data-area] .area-illustration svg{visibility:hidden}
#billingMessage{margin:0;padding:12px 20px;background:#eef5e9;color:#244f40;border-bottom:1px solid #d4dfd2;line-height:1.5}
#billingMessage:empty{display:none}
/* Support stays available on the sign-in screen and in the workspace. */
.support-contact { margin: 1rem .5rem; font-size: .85rem; overflow-wrap: anywhere; }
.support-contact a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.interactive-rules,.interactive-trial,.room-response{max-width:850px;margin:0 auto;width:100%}
.interactive-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;min-height:180px;width:min(280px,100%);margin:1rem auto;padding:1.2rem;border:2px solid #c4d8d0;border-radius:24px;background:linear-gradient(135deg,#fffdf4,#eaf3f8);box-shadow:0 8px 22px #244c4310}
.interactive-card strong{font-family:'DejaVu Sans',sans-serif;font-size:5rem;color:#285c65;line-height:1.2}
.interactive-card strong.word-cue{font-size:2rem}
.interactive-card span{text-transform:capitalize;font-weight:700}
.interactive-wait{padding:1rem;border-radius:12px;background:#fff5dc;text-align:center}
.interactive-wait progress{width:min(420px,100%);height:15px;accent-color:#287869}
.interactive-rule-help{margin-top:1rem}
.interactive-rule-help summary{cursor:pointer;font-weight:700}
.room-response{display:flex;flex-wrap:wrap;gap:1rem}
.room-response label,.room-response textarea,.room-response p{width:100%}
.room-response textarea{min-height:130px;font:inherit;padding:1rem;border:1px solid #b7cec5;border-radius:12px}
.single-selection .multi-option::before{border-radius:50%}
.interactive-observations{margin:1rem 0;padding:1rem}
.interactive-observations summary{cursor:pointer;font-weight:700}
.interactive-observations li{padding:.5rem 0;overflow-wrap:anywhere}

#interactionKindSwitch{display:flex;width:fit-content;max-width:100%;flex-wrap:wrap}

.practice-document.editorial-document{width:100%;max-width:850px}

#exercise[data-subject='language'] #exerciseHeading::before,.nav-item[data-subject='language'] .nav-area-icon,[data-area='language'] .area-illustration{background-position:0.000000% 0%}
#exercise[data-subject='middleLanguage'] #exerciseHeading::before,.nav-item[data-subject='middleLanguage'] .nav-area-icon,[data-area='middleLanguage'] .area-illustration{background-position:0.000000% 0%}
#exercise[data-subject='teenLanguage'] #exerciseHeading::before,.nav-item[data-subject='teenLanguage'] .nav-area-icon,[data-area='teenLanguage'] .area-illustration{background-position:0.000000% 0%}
#exercise[data-subject='division'] #exerciseHeading::before,.nav-item[data-subject='division'] .nav-area-icon,[data-area='division'] .area-illustration{background-position:33.333333% 0%}
#exercise[data-subject='middleMath'] #exerciseHeading::before,.nav-item[data-subject='middleMath'] .nav-area-icon,[data-area='middleMath'] .area-illustration{background-position:33.333333% 0%}
#exercise[data-subject='teenMath'] #exerciseHeading::before,.nav-item[data-subject='teenMath'] .nav-area-icon,[data-area='teenMath'] .area-illustration{background-position:33.333333% 0%}
#exercise[data-subject='reading'] #exerciseHeading::before,.nav-item[data-subject='reading'] .nav-area-icon,[data-area='reading'] .area-illustration{background-position:66.666667% 0%}
#exercise[data-subject='middleReading'] #exerciseHeading::before,.nav-item[data-subject='middleReading'] .nav-area-icon,[data-area='middleReading'] .area-illustration{background-position:66.666667% 0%}
#exercise[data-subject='literacy'] #exerciseHeading::before,.nav-item[data-subject='literacy'] .nav-area-icon,[data-area='literacy'] .area-illustration{background-position:66.666667% 0%}
#exercise[data-subject='attention'] #exerciseHeading::before,.nav-item[data-subject='attention'] .nav-area-icon,[data-area='attention'] .area-illustration{background-position:100.000000% 0%}
#exercise[data-subject='executive'] #exerciseHeading::before,.nav-item[data-subject='executive'] .nav-area-icon,[data-area='executive'] .area-illustration{background-position:0.000000% 50%}
#exercise[data-subject='memory'] #exerciseHeading::before,.nav-item[data-subject='memory'] .nav-area-icon,[data-area='memory'] .area-illustration{background-position:33.333333% 50%}
#exercise[data-subject='speedReasoning'] #exerciseHeading::before,.nav-item[data-subject='speedReasoning'] .nav-area-icon,[data-area='speedReasoning'] .area-illustration{background-position:66.666667% 50%}
#exercise[data-subject='social'] #exerciseHeading::before,.nav-item[data-subject='social'] .nav-area-icon,[data-area='social'] .area-illustration{background-position:100.000000% 50%}
#exercise[data-subject='english'] #exerciseHeading::before,.nav-item[data-subject='english'] .nav-area-icon,[data-area='english'] .area-illustration{background-position:0.000000% 100%}
#exercise[data-subject='geometry'] #exerciseHeading::before,.nav-item[data-subject='geometry'] .nav-area-icon,[data-area='geometry'] .area-illustration{background-position:33.333333% 100%}
#exercise[data-subject='applied'] #exerciseHeading::before,.nav-item[data-subject='applied'] .nav-area-icon,[data-area='applied'] .area-illustration{background-position:66.666667% 100%}
@media(max-width:650px){#exerciseHeading::before{width:48px;height:48px;flex-basis:48px}.nav-area-icon{width:28px;height:28px}[data-area] .area-illustration{width:52px;height:52px}}
.listening-samples{display:flex;gap:.5rem;flex-wrap:wrap;margin:1rem 0}.listening-rules #listeningStatus{min-height:3em}

.privacy-panel{font-size:.8rem}.privacy-panel p{line-height:1.5;color:#d4e3d8}.privacy-panel .ghost-btn{margin-top:.5rem}#privacyDialog{max-height:calc(100dvh - 2rem);overflow-y:auto}#privacyDialog .auth-actions{flex-direction:column}#privacyDialog button{white-space:normal;overflow-wrap:anywhere}
/* Compact, high-contrast location recall keeps the same grid geometry. */
.recall-grid,.spatial-answer-grid{max-width:360px;gap:.5rem}
.spatial-answer-grid .option-btn,.spatial-answer-grid .option-btn:has(>span:only-child){min-height:4.5rem;aspect-ratio:1.35;border:2px solid #476c75;background:#e5f0f5;color:#173e4b;box-shadow:0 2px 0 #bacdd4}
.spatial-answer-grid .option-btn:hover,.spatial-answer-grid .option-btn:focus-visible{background:#cde6ef;border-color:#12495e;outline:3px solid #e6b959;outline-offset:2px}
.recall-grid [role=cell]{min-height:4.5rem;border-color:#476c75;background:#edf4f8}

/* Usage and bank size are separate, readable facts. */
.exercise-meta>.exercise-account-usage{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;flex-wrap:wrap}.daily-usage{position:relative;font-size:.8rem}.daily-usage summary{cursor:pointer}.daily-usage p{max-width:24rem;margin:.5rem 0;line-height:1.5}.bank-size-hint{font-size:.75rem;color:#365461;background:#edf3f7;padding:.3rem .5rem;border-radius:.4rem}
#exerciseVisual .stimulus-caption{margin:1.4rem 0 .65rem;font-weight:700}#exerciseVisual .memory-object-sequence{margin-bottom:1.25rem}

#roomSpeedClock{font-size:2.5rem;font-weight:700;color:#30576d;font-variant-numeric:tabular-nums}#speedModeSwitch{margin-bottom:1rem}#environmentSpeedProgress{padding:1rem;line-height:1.6}

.processing-sources{max-width:48rem;margin:auto}.processing-sources.two-keys{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.processing-sources .stimulus-caption{margin:.25rem 0 .5rem!important}.processing-sources .structured-stimulus-table td,.processing-sources .structured-stimulus-table th{padding:.35rem .45rem;font-size:.88rem}.processing-sources .stimulus-table-scroll{min-width:0}.processing-source{min-width:0}

@media(max-width:600px){.processing-sources.two-keys{grid-template-columns:minmax(0,1fr)}.processing-sources .structured-stimulus-table{table-layout:fixed;width:100%}.processing-sources .structured-stimulus-table td,.processing-sources .structured-stimulus-table th{overflow-wrap:anywhere;padding:.3rem;font-size:.82rem}}
/* Activity choices share one baseline; native groups remain available to assistive technology. */
.activity-toolbar{display:flex;align-items:stretch;flex-wrap:wrap;gap:8px;margin:16px 0;padding:8px;border:1px solid var(--border,#d8e3e0);border-radius:14px;background:var(--card,#fffdf8)}
.activity-toolbar>.mode-switch:not(.hidden){display:contents}
.activity-toolbar button{min-height:50px;margin:0;display:inline-flex;align-items:center;justify-content:center;line-height:1.25;padding:12px 18px;box-sizing:border-box}
.activity-toolbar button[aria-pressed=true]{background:var(--accent,#247453);color:#fff}
.executed-area{display:block!important}.executed-area>.secondary-btn{margin:12px 8px 0 0;min-height:48px}
.executed-grid{display:grid;grid-template-columns:repeat(var(--executed-cols),minmax(0,1fr));gap:10px;max-width:680px;margin:16px auto}
.executed-cell{display:flex;align-items:center;justify-content:center;min-height:90px;padding:8px;border:2px solid #82999b;border-radius:12px;background:#fff;color:#173e46;min-width:0}
.executed-cell[aria-pressed=true]{border:4px solid #215a99;background:#dbeafb;box-shadow:inset 0 0 0 2px #fff}
.executed-cell[aria-pressed=true]::after{content:'✓';font-weight:800;align-self:flex-start}
.executed-picture .picture-icon svg,.executed-picture .picture-icon img{width:64px;height:64px;object-fit:contain;max-width:100%}
.executed-picture{display:inline-flex;align-items:center;justify-content:center;flex-direction:column;max-width:100%}
.executed-picture .picture-label{font-size:1rem}
.executed-model,.executed-choices,.executed-picked{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:14px;margin:16px 0}
.executed-picked{min-height:90px;border:2px dashed #82999b;border-radius:12px}
.executed-choices button{min-width:88px;min-height:94px}.executed-token{display:flex;flex-direction:column;align-items:center;gap:4px;max-width:140px}.executed-token small{font-weight:700}
.executed-status{font-size:1.1rem;line-height:1.6}.executed-area button:focus-visible{outline:3px solid #143c9b;outline-offset:3px}
.speed-search-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.speed-search-grid>div{min-height:88px}
.speed-search-grid .picture-icon svg,.speed-search-grid .picture-icon img,.speed-search-grid .picture-glyphs svg{width:80px;height:80px;max-width:100%;object-fit:contain}
.speed-symbol .picture-icon img{width:88px;height:88px;object-fit:contain}
@media(max-width:600px){.activity-toolbar button{min-height:48px;padding:10px 12px;flex:1 1 auto}.executed-grid{gap:8px}.executed-cell{min-height:76px;padding:4px}.executed-picture .picture-icon svg,.executed-picture .picture-icon img{width:52px;height:52px}.executed-choices{gap:8px}.executed-choices button{min-width:72px;min-height:82px}.speed-search-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.speed-search-grid .picture-icon svg,.speed-search-grid .picture-icon img,.speed-search-grid .picture-glyphs svg{width:64px;height:64px}.speed-search-grid>div{min-height:76px}}
/* Activity choices wrap into clear groups instead of forcing a horizontal scrollbar. */
#appShell .activity-toolbar{flex-wrap:wrap;overflow:visible;max-width:100%;align-items:flex-start}
#appShell .activity-toolbar>.mode-switch:not(.hidden){display:inline-flex!important;flex-wrap:wrap;align-items:center;gap:4px;max-width:100%;min-width:0}
#appShell .activity-toolbar button{flex:0 1 auto;white-space:normal;min-height:50px;height:auto;margin:0;align-self:center}
#appShell .activity-toolbar #executedMode[aria-pressed=true]{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
/* Larger exercise stimuli without replacing the approved asset library. */
.executed-model .executed-picture .picture-icon svg,.executed-model .executed-picture .picture-icon img{width:104px;height:104px}
.executed-choices .executed-picture .picture-icon svg,.executed-choices .executed-picture .picture-icon img{width:88px;height:88px}
#appShell[data-design="impulso"] .executed-picture svg>rect[fill="#f3f5ef"]{fill:transparent}

/* A restrained area palette adds distinction while keeping the Calma/Impulso layouts familiar. */
#appShell[data-subject="executive"]{--accent:#6b58b5;--accent-dark:#51408f;--accent-soft:#f0edfb}
#appShell[data-subject="attention"]{--accent:#bd6259;--accent-dark:#8f443e;--accent-soft:#faeeec}
#appShell[data-subject="memory"]{--accent:#32818f;--accent-dark:#23616d;--accent-soft:#eaf5f6}
#appShell[data-subject="speedReasoning"]{--accent:#b67a2d;--accent-dark:#875a1e;--accent-soft:#fbf3e6}
#appShell[data-subject="social"]{--accent:#287f78;--accent-dark:#1c5f59;--accent-soft:#eaf5f2}
#appShell[data-subject="reading"],#appShell[data-subject="middleReading"],#appShell[data-subject="literacy"]{--accent:#4177a8;--accent-dark:#2e5881;--accent-soft:#edf3f9}
#appShell[data-subject="language"],#appShell[data-subject="middleLanguage"],#appShell[data-subject="teenLanguage"]{--accent:#8c619b;--accent-dark:#694778;--accent-soft:#f5eef8}
#appShell[data-subject="middleMath"],#appShell[data-subject="teenMath"],#appShell[data-subject="division"],#appShell[data-subject="geometry"]{--accent:#4f73ad;--accent-dark:#36527f;--accent-soft:#edf2fa}
#appShell .activity-toolbar{align-items:center!important;background:linear-gradient(110deg,var(--card),var(--accent-soft));border-color:color-mix(in srgb,var(--accent) 22%,var(--line));box-shadow:0 8px 24px color-mix(in srgb,var(--accent) 8%,transparent)}
#appShell .activity-toolbar>.mode-switch:not(.hidden){align-self:center;min-height:58px;padding:4px;border:1px solid color-mix(in srgb,var(--accent) 20%,var(--line));background:color-mix(in srgb,var(--accent-soft) 72%,var(--card));border-radius:12px}
#appShell .activity-toolbar>button{align-self:center;min-height:50px;border:1px solid var(--line);border-radius:11px;background:var(--card)}
#appShell .activity-toolbar button[aria-pressed=true]{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important;box-shadow:0 3px 0 var(--accent-dark)}
#appShell #exerciseHeading{color:var(--ink)}
#appShell .section-intro{border-top:3px solid color-mix(in srgb,var(--accent) 62%,transparent)}

/* Show the correct response in the activity itself instead of repeating it in a separate solution panel. */
.cognitive-answer-correct{border:3px solid #26834f!important;background:#edf7ef!important;box-shadow:inset 0 0 0 1px #fff!important}
.cognitive-answer-incorrect{border:2px solid #c65b58!important;background:#fff1ef!important}

/* One flat, accessible modality grid for every area. Mode wrappers remain only
   as implementation hooks; they do not create nested visual groups. */
#appShell #activityOptions.activity-settings{display:block;margin:0 0 16px;padding:14px 16px;border:1px solid var(--line,#d8e3e0);border-radius:16px;background:var(--card,#fffdf8)}
#appShell #activityOptions.activity-settings.hidden{display:none!important}
#appShell #activityOptions>h4{margin:0 0 10px;color:var(--ink,#173e46);font-size:1rem}
#appShell #activityOptions .activity-settings-content{display:block;padding:0}
#appShell #activityOptions .activity-toolbar{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));align-items:stretch;gap:9px;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
#appShell #activityOptions .activity-settings-content .activity-toolbar>.mode-switch:not(.hidden){display:contents!important;align-self:initial;min-height:0;margin:0;padding:0;border:0;background:transparent;box-shadow:none}
#appShell #activityOptions .activity-toolbar>button,#appShell #activityOptions .activity-toolbar>.mode-switch button{display:inline-flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:48px;height:auto;margin:0;padding:11px 14px;border:1px solid var(--line,#d8e3e0);border-radius:11px;background:var(--card,#fffdf8);color:var(--ink,#173e46);font:inherit;font-weight:750;line-height:1.35;text-align:center;white-space:normal;cursor:pointer}
#appShell #activityOptions .activity-toolbar button[aria-pressed=true]{background:var(--accent,#247453)!important;border-color:var(--accent,#247453)!important;color:#fff!important;box-shadow:0 2px 0 var(--accent-dark,#185a41)}
#appShell #activityOptions .activity-toolbar button:focus-visible{outline:3px solid var(--accent,#247453);outline-offset:3px}
#appShell #activityOptions .activity-toolbar button.hidden{display:none!important}
#appShell #activityOptions #cognitiveFamilyModes{display:contents}
#appShell #activityOptions #cognitiveFamilyModes.hidden{display:none!important}
#appShell #activityOptions #documentModeHint.hidden{display:none!important}
@media(max-width:699px){#appShell #activityOptions{padding:12px}#appShell #activityOptions .activity-toolbar{grid-template-columns:minmax(0,1fr);gap:8px}#appShell #activityOptions .activity-toolbar>button,#appShell #activityOptions .activity-toolbar>.mode-switch button{min-height:50px}}
.cognitive-candidate.cognitive-answer-correct{border-width:3px;}
.cognitive-plan-updated{margin:12px 0 18px;padding:18px;border:1px solid #e8bdd5;border-left:6px solid #a73575;border-radius:14px;background:linear-gradient(110deg,#fff7fb,#f8edf4)}
.cognitive-plan-updated>strong{display:block;margin-bottom:6px;font-size:1.15rem;color:#7f2859}
.cognitive-plan-updated>p{margin:0 0 12px;color:#594252}
.cognitive-plan-updated-steps{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.cognitive-plan-step{padding:8px 12px;border:1px solid #e2d8df;border-radius:10px;background:var(--card);font-weight:650}
.cognitive-plan-step-changed{border:2px solid #a73575;background:#f8e3ef;color:#7f2859;font-weight:800}
.cognitive-plan-step-changed::before{content:'CAMBIO · ';font-size:.72em;letter-spacing:.06em}
.cognitive-candidates{grid-auto-rows:minmax(250px,1fr);align-items:stretch}
.cognitive-candidate{display:flex;height:100%;min-height:250px;flex-direction:column}
.cognitive-candidate-actions{margin-top:auto}
.cognitive-rule-wait,.executed-wait-countdown{width:fit-content;min-width:min(360px,100%);margin:16px auto;padding:14px 22px;border:2px solid #d59b42;border-radius:14px;background:#fff5df;color:#684408;text-align:center;font-size:clamp(1.3rem,3vw,1.8rem);font-weight:850;line-height:1.35}
.guided-wait-panel{display:grid;gap:18px;justify-items:center;width:min(620px,100%);margin:24px auto;padding:clamp(22px,5vw,44px);border:1px solid #cbd8d5;border-radius:18px;background:#f8faf8;box-sizing:border-box}.guided-wait-clock{margin:0;color:#214e48;text-align:center;font-size:clamp(1.35rem,3vw,2rem);font-weight:750;line-height:1.4}.guided-wait-progress{display:block;width:100%;height:24px;border:0;border-radius:999px;overflow:hidden;accent-color:#287f70}.guided-wait-progress::-webkit-progress-bar{background:#e0e9e5;border-radius:999px}.guided-wait-progress::-webkit-progress-value{background:#287f70;border-radius:999px;transition:width .12s linear}.guided-wait-progress::-moz-progress-bar{background:#287f70;border-radius:999px}
.everyday-material{width:min(760px,100%);margin:18px auto;border:1px solid #bcc9c8;border-radius:12px;background:#fff;color:#263b41;box-shadow:0 5px 16px rgba(24,44,48,.08);overflow:hidden}.everyday-material>header{padding:12px 18px;border-bottom:1px solid #d8e0df;background:#f4f7f6}.everyday-material>header>span{font-size:.76rem;letter-spacing:.08em;color:#596b6d;font-weight:750}.everyday-material>header h3{margin:4px 0 0;font-size:1.14rem;color:#183c43}.everyday-material-table{max-width:100%;overflow:auto}.everyday-material table{width:100%;border-collapse:collapse}.everyday-material th,.everyday-material td{padding:11px 16px;border-bottom:1px solid #e0e5e4;text-align:left;font-size:1rem}.everyday-material th{background:#f7f9f8;font-weight:700}.everyday-material tbody tr:nth-child(even){background:#f7f9f8}.material-phoneScreen,.material-tabletScreen,.material-desktopScreen{border-color:#96a5a5;background:#f8fafb}.material-phoneScreen{width:min(560px,100%);border-radius:24px;box-shadow:inset 0 0 0 5px #eef1f1,0 6px 18px rgba(24,44,48,.1)}.material-phoneScreen>header{margin:5px 5px 0;border-radius:19px 19px 0 0}.material-streetBoard,.material-whiteboard{border-left:5px solid #446b6b}.material-catalog,.material-poster{background:#fffefa}.material-receipt{width:min(590px,100%);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;border-style:dashed;border-radius:4px;box-shadow:none}.material-receipt>header{background:#fffefa;border-bottom-style:dashed}.material-receipt table th,.material-receipt table td{font-family:inherit;font-size:.94rem}.material-tabletScreen,.material-desktopScreen{border-top:4px solid #819394}
.executed-rule-stimulus{display:grid;min-height:320px;place-items:center;text-align:center}
.executed-rule-stimulus .executed-picture .picture-icon svg,.executed-rule-stimulus .executed-picture .picture-icon img{width:clamp(132px,25vw,220px);height:clamp(132px,25vw,220px)}
.executed-rule-stimulus .executed-picture .picture-label{font-size:1.35rem;font-weight:750}
@media(max-width:700px){.cognitive-candidates{grid-auto-rows:minmax(220px,1fr)}.cognitive-candidate{min-height:220px}.executed-rule-stimulus{min-height:260px}}
.signal-mode-control{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:14px 0;margin-bottom:14px;font-weight:600;border-bottom:1px solid var(--line)}
.signal-mode-control select{min-height:48px;padding:8px 12px;max-width:100%;background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:8px}
@media(max-width:600px){.executed-model .executed-picture .picture-icon svg,.executed-model .executed-picture .picture-icon img{width:80px;height:80px}.executed-choices .executed-picture .picture-icon svg,.executed-choices .executed-picture .picture-icon img{width:68px;height:68px}}

/* Cognitive families: stable, readable controls in both Calma and Impulso. */
#cognitiveFamilyControl{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:1rem}
#cognitiveFamilyControl.hidden{display:none}
#cognitiveFamilySelect,.cognitive-area input[type=text]{min-height:48px;max-width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--card);font:inherit}
#appShell .activity-toolbar #cognitiveMode[aria-pressed=true]{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
.cognitive-area{display:block!important;min-width:0}.cognitive-status,.executed-status{font-size:1.25rem;line-height:1.6}
.cognitive-choices,.cognitive-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.cognitive-area button{min-height:52px;white-space:normal;font-size:1.1rem;padding:12px 18px;margin:6px 4px;max-width:100%;overflow-wrap:anywhere}
.cognitive-fact{display:flex;align-items:center;gap:14px;padding:18px;border:2px solid var(--line);border-radius:12px;font-size:1.15rem;line-height:1.55;cursor:pointer}
.cognitive-fact:has(input:checked){border-color:var(--accent);background:var(--bg)}.cognitive-fact input{flex:0 0 24px;width:24px;height:24px;margin:0}
.cognitive-candidates{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr));gap:12px;margin-top:16px;align-items:start}
.cognitive-candidate{border:1px solid var(--line);border-radius:12px;padding:12px;min-width:0;background:var(--card)}.cognitive-candidate.excluded{border-style:dashed;background:#e7e9eb}.cognitive-candidate.excluded h4::after{content:' · TACHADA'}
.cognitive-candidate h4{margin:0 0 8px;font-size:1.02rem}.cognitive-attributes{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}.cognitive-attributes li{padding:5px 9px;border-radius:999px;background:var(--bg);font-size:.98rem;line-height:1.3;overflow-wrap:anywhere}
.cognitive-candidate-actions{display:flex;gap:6px;margin-top:9px}.cognitive-candidate-actions button{flex:1 1 0;min-height:44px;margin:0;padding:8px;font-size:.95rem}
.cognitive-clues{margin:12px 0;padding:14px 18px;border-left:5px solid var(--accent);border-radius:10px;background:var(--bg)}.cognitive-clues h4{margin:0 0 8px}.cognitive-clues ol{margin:0;padding-left:1.5rem}.cognitive-clues li{padding:4px 0;line-height:1.4}.photo-mark-help{padding:12px 16px;border-left:4px solid var(--accent);background:var(--bg);font-size:1.05rem;line-height:1.55}
.cognitive-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:16px 0}.cognitive-source-card{min-width:0;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--card)}.cognitive-source-card>h4{margin:0 0 10px;font-size:1.1rem}.cognitive-source-fact{display:flex;align-items:flex-start;gap:10px;padding:10px 8px;border-top:1px solid var(--line);cursor:pointer}.cognitive-source-copy{display:grid;gap:3px;min-width:0;overflow-wrap:anywhere;line-height:1.4}.cognitive-source-copy strong{font-size:.9rem;color:var(--muted)}.cognitive-source-fact:has(input:checked){background:var(--bg)}
.cognitive-picture{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;align-items:center;margin:10px 0;font-size:1.25rem}
.cognitive-picture .picture-icon svg,.cognitive-picture .picture-icon img{width:112px;height:112px;max-width:100%}
.cognitive-switch{font-size:clamp(7rem,20vw,12rem);line-height:1;font-weight:800;text-align:center;padding:20px}.cognitive-rule-change{display:grid;justify-items:center;text-align:center;padding:20px}.cognitive-rule-change p{max-width:42rem;margin:0;font-size:clamp(1.4rem,4vw,2rem);font-weight:800;line-height:1.5}.executed-rule-intro,.executed-rule-change{margin:18px auto;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--bg);text-align:center}.executed-rule-intro h2,.executed-rule-change h2{margin:4px 0 12px;font-size:clamp(1.35rem,3vw,2rem)}.executed-rule-rows{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.executed-rule-rows p{margin:0;padding:12px 18px;border-radius:12px;background:var(--card);font-size:clamp(1.4rem,4vw,2rem);font-weight:800}.executed-rule-intro>p:last-child,.executed-rule-change>p{margin:12px 0 0;font-size:clamp(1.1rem,2.5vw,1.4rem);font-weight:700}.executed-next-cue{display:block;padding:12px;text-align:center;font-weight:700;letter-spacing:.04em}
.cognitive-area button:focus-visible,.cognitive-area input:focus-visible{outline:3px solid #155a9d;outline-offset:4px}
.cognitive-solution,.memory-solution{margin:22px 0;padding:18px;border:2px solid var(--accent);border-radius:12px;background:var(--card);color:var(--ink)}
.memory-solution h4,.cognitive-solution h4{font-size:1.2rem;margin:0 0 12px}.memory-solution ol{list-style-position:inside;padding-left:8px}.cognitive-plan-slots{min-height:90px;line-height:1.8;font-size:1.2rem}
#interactiveSeconds{font-size:clamp(1.6rem,4vw,2.2rem);font-weight:800;line-height:1.4}
#exercise .interactive-card .word-cue{font-size:clamp(2rem,6vw,3.4rem)}
#exerciseOptions .option-btn{font-size:1.125rem;line-height:1.55}
#exerciseVisual .reading-passage{font-size:1.15rem;line-height:1.75}
@media(max-width:700px){.cognitive-choices,.cognitive-facts,.cognitive-source-grid{grid-template-columns:1fr}}
@media(max-width:600px){.cognitive-picture .picture-icon svg,.cognitive-picture .picture-icon img{width:88px;height:88px}.cognitive-area button{font-size:1.1rem;margin:6px 0}.cognitive-area form input{width:100%;box-sizing:border-box}.cognitive-fact{padding:14px}.cognitive-candidate-actions button{font-size:.9rem;padding:8px 4px}}

#cognitiveFamilyControl{margin:14px 0;max-width:100%}

/* Clear feedback, legible prompts and aligned answer controls. */
#exercise:has(.cognitive-area) #exercisePrompt{font-size:clamp(1.3rem,2.1vw,1.75rem);line-height:1.5}
.cognitive-answer-correct{border-color:#247747!important;background:#e3f4e8!important;color:#174e2e!important;box-shadow:inset 0 0 0 2px #247747!important}
.cognitive-answer-incorrect{border-color:#b83d3d!important;background:#fff0ef!important;color:#762929!important}
.cognitive-candidate.cognitive-answer-correct{outline:3px solid #247747;outline-offset:2px}
.interactive-current-rule{padding:.75rem 1rem;margin:.25rem 0 .8rem;border-left:5px solid var(--accent);background:var(--bg);font-size:clamp(1.2rem,2.6vw,1.7rem);font-weight:800;line-height:1.4}
.cognitive-plan-context{padding:1rem 1.25rem;border-left:5px solid var(--accent);border-radius:10px;background:var(--bg);font-size:clamp(1.15rem,2.3vw,1.45rem);line-height:1.65}
.cognitive-plan-context p{margin:.35rem 0}
#exercisePrompt{white-space:pre-line}

/* Keep writing source notes compact, while preserving a clear reading measure. */
#exercise[data-subject="literacy"] .reading-passage>.stimulus-paragraph{display:inline;margin:0 .35em 0 0;line-height:1.45;font-size:1.02rem}
#exercise[data-subject="literacy"] .reading-passage>.stimulus-paragraph+.stimulus-paragraph{margin-top:0}
#exercise[data-subject="literacy"] .reading-passage:not(:has(.practice-document)) .stimulus-paragraph{max-width:100%}
.offer-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:min(100%,58rem);margin:1rem 0}
.offer-card{display:flex;flex-direction:column;gap:.5rem;padding:clamp(16px,2vw,24px);border:2px solid #a6c4b3;border-radius:14px;background:linear-gradient(145deg,#fff,#eef6ef);box-shadow:0 5px 16px #1e4d3312;font-size:clamp(1.2rem,2vw,1.6rem);line-height:1.4}
.offer-card strong{color:#17533a;font-size:1.08em}
.cognitive-plan-goal{padding:12px 15px;border-radius:10px;background:#e7f1df;color:#153f2f;font-size:1.2em;font-weight:700}
.cognitive-candidate{border:1px solid #bacbe5;border-radius:14px;background:linear-gradient(155deg,#fff,#f2f5fc);box-shadow:0 5px 14px #364a7614;transition:transform .16s ease,box-shadow .16s ease}
.cognitive-candidate:hover{transform:translateY(-2px);box-shadow:0 9px 20px #364a7622}
.cognitive-candidate.excluded{filter:grayscale(.8);opacity:.6}
.cognitive-candidate.cognitive-answer-correct{background:linear-gradient(145deg,#e9f8e8,#d4f2d7)!important;outline:3px solid #32a852;outline-offset:2px}
.cognitive-candidate.cognitive-answer-incorrect{background:linear-gradient(145deg,#fff3de,#ffe0b4)!important;outline:3px solid #e39b30;outline-offset:2px;color:#70460c!important}
.reading-poster{max-width:54rem;margin:1rem auto;padding:clamp(22px,3vw,38px);border:2px solid #246da1;border-radius:10px;background:linear-gradient(145deg,#fff,#eef6ff);text-align:center;box-shadow:0 8px 20px #234b6b18}
.reading-poster>span,.reading-marquee>span{display:block;font-size:.8rem;font-weight:900;letter-spacing:.12em;color:#246da1}
.reading-poster h3{margin:.6rem 0;font-size:clamp(1.5rem,3vw,2.2rem);text-transform:uppercase}
.reading-poster p{font-size:clamp(1.1rem,2vw,1.4rem);line-height:1.55}
.reading-poster small{color:#5c7184}
.reading-marquee{max-width:58rem;margin:1rem auto;padding:22px;border:8px solid #264454;border-radius:18px;background:#162f3c;color:#f5f6c2;text-align:center;box-shadow:inset 0 0 0 2px #688294,0 8px 18px #22374722}
.reading-marquee>span{color:#b9e3ff}
.reading-marquee p{font-family:ui-monospace,Consolas,monospace;font-size:clamp(1.2rem,2.4vw,1.8rem);font-weight:700;line-height:1.5;letter-spacing:.025em}
@media(max-width:560px){.offer-comparison{grid-template-columns:1fr}.offer-card{font-size:1.2rem}.reading-poster,.reading-marquee{padding:18px}}
