:root {
  --ink: #070707;
  --muted: #686868;
  --paper: #f4f2eb;
  --surface: #ffffff;
  --line: #151515;
  --green: #cfff00;
  --green-soft: #efffb5;
  --blue: #305dff;
  --blue-soft: #e6ebff;
  --rose: #ff3d7f;
  --rose-soft: #ffe3ee;
  --amber: #f2b705;
  --amber-soft: #fff1be;
  --charcoal: #050505;
  --neon: #d9ff00;
  --shadow: 8px 8px 0 #050505;
  --display:
    Impact, Haettenschweiler, "Arial Black", "Franklin Gothic Heavy",
    ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(5, 5, 5, 0.045) 1px, transparent 1px),
    var(--paper);
  background-size: 34px 34px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.92) 0 86px, transparent 86px),
    linear-gradient(135deg, transparent 0 70%, rgba(217, 255, 0, 0.32) 70% 100%);
}

button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 2px solid #fff;
  color: #fff;
  background: rgba(0, 0, 0, 0.96);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 8px;
  color: #000;
  background: var(--neon);
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 900;
}

.brand h1,
.brand p,
.eyebrow {
  margin: 0;
}

.brand h1 {
  color: #fff;
  font-family: var(--display);
  font-size: 1.46rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  color: #6f6f6f;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: var(--neon);
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tab-button,
.tool-button,
.icon-button,
.primary-button,
.secondary-button,
.chip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  color: var(--charcoal);
  background: #fff;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.tab-button {
  padding: 0 12px;
}

.topbar .tab-button {
  border-color: rgba(255, 255, 255, 0.32);
  color: #fff;
  background: #101010;
}

.tab-button svg,
.tool-button svg,
.icon-button svg,
.primary-button svg,
.secondary-button svg,
.chip-button svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.1;
}

.tab-button:hover,
.tool-button:hover,
.icon-button:hover,
.primary-button:hover,
.secondary-button:hover,
.chip-button:hover {
  transform: translateY(-1px);
  border-color: var(--charcoal);
}

.tab-button.is-active {
  border-color: var(--neon);
  color: #000;
  background: var(--neon);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 18px;
  width: min(1280px, calc(100vw - 32px));
  margin: 18px auto 28px;
}

.side-panel,
.workbench {
  min-width: 0;
}

.side-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.panel-block,
.loading-card,
.coach-panel,
.theory-card,
.case-card,
.quiz-card,
.matrix-panel,
.oral-panel,
.names-panel {
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.panel-block {
  padding: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.icon-button {
  width: 36px;
  height: 36px;
  padding: 0;
}

.day-list,
.theory-list,
.radar {
  display: grid;
  gap: 8px;
}

.day-item,
.theory-item,
.radar-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 2px solid rgba(5, 5, 5, 0.16);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.day-item.is-active,
.theory-item.is-active {
  border-color: var(--charcoal);
  background: var(--neon);
}

.theory-item.is-done {
  border-color: var(--charcoal);
  background: #101010;
  color: #fff;
}

.theory-item.is-done .theory-meta {
  color: #e5e5e5;
}

.day-meta,
.theory-meta,
.radar-item span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.day-title,
.theory-title,
.radar-item strong {
  font-size: 0.92rem;
}

.score-pill,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 2px solid #000;
  color: #000;
  background: var(--neon);
  font-size: 0.78rem;
  font-weight: 800;
}

.tag.blue {
  color: #102044;
  background: var(--blue-soft);
}

.tag.rose {
  color: #4a061c;
  background: var(--rose-soft);
}

.tag.amber {
  color: #453200;
  background: var(--amber-soft);
}

.workbench {
  display: grid;
  gap: 14px;
}

.coach-panel {
  display: grid;
  gap: 20px;
  padding: 22px;
  overflow: hidden;
}

.loading-card {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.loading-card h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.86;
}

.loading-card p {
  max-width: 52ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.hero-lockup {
  display: grid;
  gap: 0;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.mega-title {
  padding: clamp(18px, 4vw, 42px) 16px clamp(14px, 3vw, 34px);
  color: #fff;
  background: #000;
  font-family: var(--display);
  font-size: clamp(3rem, 10vw, 8.7rem);
  font-weight: 900;
  line-height: 0.82;
  text-align: center;
  text-transform: uppercase;
}

.hero-strip {
  display: grid;
  grid-template-columns: 0.45fr 1fr 0.55fr;
  border-top: 2px solid #fff;
}

.hero-strip span {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 8px;
  border-right: 2px solid #000;
  color: #000;
  background: #fff;
  font-family: var(--display);
  font-size: clamp(1rem, 2.4vw, 2rem);
  text-align: center;
  text-transform: uppercase;
}

.hero-strip span:last-child {
  border-right: 0;
  background: var(--neon);
}

.coach-header {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  gap: 20px;
  align-items: stretch;
}

.coach-title {
  display: grid;
  align-content: start;
  gap: 12px;
}

.coach-title h2 {
  max-width: 780px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.5vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: 0;
  text-transform: uppercase;
}

.coach-title p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-button,
.secondary-button,
.chip-button {
  padding: 0 13px;
}

.primary-button {
  border-color: #000;
  color: #000;
  background: var(--neon);
  font-weight: 900;
}

.secondary-button {
  color: var(--charcoal);
  background: #fff;
}

.theory-map {
  position: relative;
  min-height: 260px;
  padding: 16px;
  border: 2px solid #000;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    #050505;
  background-size: 28px 28px;
}

.map-line {
  position: absolute;
  height: 2px;
  transform-origin: left center;
  background: rgba(217, 255, 0, 0.72);
}

.map-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 96px;
  min-height: 42px;
  padding: 8px;
  border: 2px solid #000;
  border-radius: 8px;
  color: var(--charcoal);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 4px 4px 0 rgba(217, 255, 0, 0.95);
}

.map-node.core {
  width: 120px;
  color: #000;
  background: var(--neon);
}

.map-node.green {
  background: var(--green-soft);
}

.map-node.blue {
  background: var(--blue-soft);
}

.map-node.rose {
  background: var(--rose-soft);
}

.map-node.amber {
  background: var(--amber-soft);
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.camp-blocks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.camp-block {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 188px;
  padding: 14px;
  border: 2px solid var(--charcoal);
  border-radius: 8px;
  background: #fff;
}

.camp-block:nth-child(2n) {
  background: #111;
  color: #fff;
}

.camp-block:nth-child(3n) {
  background: var(--neon);
  color: #000;
}

.camp-block span {
  width: fit-content;
  padding: 4px 7px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-family: var(--display);
  font-size: 0.92rem;
}

.camp-block h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.camp-block p {
  margin: 0;
  color: inherit;
  line-height: 1.38;
}

.camp-block .chip-button {
  align-self: end;
  justify-self: start;
}

.mini-card,
.concept-card,
.question-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 15px;
  border: 2px solid rgba(5, 5, 5, 0.18);
  border-radius: 8px;
  background: #fff;
}

.inline-theory {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 4px 6px 0;
  padding: 0 8px;
  border: 2px solid #000;
  border-radius: 999px;
  color: #000;
  background: var(--neon);
  font-size: 0.82rem;
  font-weight: 900;
}

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

.mini-card h3,
.concept-card h3,
.question-card h3,
.case-card h3,
.quiz-card h3,
.oral-panel h3,
.names-panel h3 {
  margin: 0;
  font-size: 1rem;
}

.mini-card p,
.concept-card p,
.question-card p,
.case-card p,
.quiz-card p,
.oral-panel p,
.names-panel p,
.comparison-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.theory-card,
.case-card,
.quiz-card,
.matrix-panel,
.oral-panel,
.names-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.theory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.theory-hero h2,
.case-card h2,
.quiz-card h2,
.matrix-panel h2,
.oral-panel h2,
.names-panel h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2vw, 2rem);
  letter-spacing: 0;
  text-transform: uppercase;
}

.theory-hero p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.example-box {
  padding: 14px;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: var(--blue-soft);
}

.example-box:nth-child(2) {
  border-left-color: var(--rose);
  background: var(--rose-soft);
}

.coach-note {
  padding: 15px;
  border: 2px solid #000;
  border-radius: 8px;
  color: #000;
  background: var(--amber-soft);
  line-height: 1.5;
}

.coach-note.compact {
  padding: 11px 12px;
}

.practice-box {
  display: grid;
  gap: 10px;
}

textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 12px;
  border: 2px solid rgba(5, 5, 5, 0.32);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  line-height: 1.45;
}

textarea:focus,
select:focus,
button:focus-visible {
  outline: 3px solid rgba(49, 95, 140, 0.24);
  outline-offset: 2px;
}

.feedback-box {
  display: none;
  padding: 12px;
  border-radius: 8px;
  border: 2px solid #000;
  color: #000;
  background: var(--green-soft);
  line-height: 1.48;
}

.feedback-box.is-visible {
  display: block;
}

.case-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.case-situation {
  padding: 18px;
  border: 1px solid rgba(37, 49, 58, 0.12);
  border-radius: 8px;
  background: #fbfaf6;
  font-size: 1.05rem;
  line-height: 1.55;
}

.case-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.names-hero {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 2px solid #000;
  border-radius: 8px;
  color: #fff;
  background: #000;
}

.names-hero h2 {
  max-width: 780px;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 5.6rem);
  line-height: 0.86;
}

.names-hero p {
  max-width: 780px;
  color: #e9e9e9;
  font-size: 1.05rem;
}

.memory-rule {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.memory-rule div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  border: 2px solid #000;
  border-radius: 8px;
  background: var(--neon);
}

.memory-rule strong {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #000;
  font-family: var(--display);
  font-size: 1.35rem;
}

.memory-rule span {
  font-weight: 900;
}

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

.name-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
}

.name-card:nth-child(4n + 2),
.name-card:nth-child(4n + 3) {
  background: #111;
  color: #fff;
}

.name-card:nth-child(4n + 2) p,
.name-card:nth-child(4n + 3) p {
  color: #eeeeee;
}

.name-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.name-card h3 {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.8vw, 3.4rem);
  line-height: 0.86;
  text-transform: uppercase;
}

.sound-hook {
  width: fit-content;
  padding: 8px 10px;
  border: 2px solid currentColor;
  border-radius: 999px;
  color: #000;
  background: var(--neon);
  font-weight: 950;
}

.exam-line {
  padding: 12px;
  border: 2px solid #000;
  border-radius: 8px;
  color: #000;
  background: var(--amber-soft);
  font-weight: 850;
  line-height: 1.45;
}

.trap {
  padding: 10px;
  border-left: 5px solid var(--rose);
  background: var(--rose-soft);
}

.names-drill {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 2px solid #000;
  border-radius: 8px;
  color: #000;
  background: var(--neon);
}

.names-drill h3 {
  font-family: var(--display);
  font-size: 2.2rem;
  line-height: 0.9;
  text-transform: uppercase;
}

.lens-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.lens-button {
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgba(37, 49, 58, 0.13);
  border-radius: 8px;
  color: var(--charcoal);
  background: #fff;
  text-align: left;
}

.lens-button.is-active {
  border-color: rgba(36, 105, 92, 0.46);
  background: var(--green-soft);
}

.quiz-options {
  display: grid;
  gap: 10px;
}

.quiz-arena {
  gap: 18px;
}

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

.quiz-header h2 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 7vw, 6.2rem);
  line-height: 0.82;
  text-transform: uppercase;
}

.quiz-header p {
  max-width: 700px;
}

.quiz-count {
  display: grid;
  min-width: 118px;
  min-height: 96px;
  place-items: center;
  border: 2px solid #000;
  border-radius: 8px;
  color: #000;
  background: var(--neon);
  font-family: var(--display);
}

.quiz-count strong {
  font-size: 3.2rem;
  line-height: 0.8;
}

.quiz-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: 14px;
  align-items: end;
  padding: 14px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #101010;
}

.quiz-controls .eyebrow {
  color: var(--neon);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.segmented button {
  min-height: 38px;
  padding: 0 10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  background: #000;
}

.segmented button.is-active {
  border-color: var(--neon);
  color: #000;
  background: var(--neon);
  font-weight: 900;
}

.select-wrap {
  display: grid;
  gap: 8px;
}

.select-wrap select {
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 2px solid #fff;
  border-radius: 8px;
  color: #000;
  background: #fff;
}

.quiz-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 14px;
  align-items: start;
}

.quiz-question-card,
.scoreboard {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
}

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

.question-meta span {
  min-height: 28px;
  padding: 4px 8px;
  border: 2px solid #000;
  border-radius: 999px;
  color: #000;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.quiz-question-card h3 {
  font-size: clamp(1.35rem, 3vw, 2.4rem);
  line-height: 1.05;
}

.quiz-option {
  justify-content: flex-start;
  min-height: 52px;
  padding: 10px 12px;
  text-align: left;
}

.quiz-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  justify-content: start;
}

.option-letter {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #000;
  font-family: var(--display);
}

.quiz-option.is-correct {
  border-color: #000;
  background: var(--neon);
}

.quiz-option.is-wrong {
  border-color: #000;
  background: var(--rose-soft);
}

.oral-quiz-prompt {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 14px;
  border: 2px dashed #000;
  border-radius: 8px;
  background: var(--amber-soft);
}

.oral-quiz-prompt svg {
  width: 32px;
  height: 32px;
}

.pre-answer-note {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 2px dashed #000;
  border-radius: 8px;
  color: #000;
  background: #fff;
}

.pre-answer-note strong {
  font-family: var(--display);
  font-size: 1.2rem;
  text-transform: uppercase;
}

.answer-key {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 2px solid #000;
  border-radius: 8px;
  color: #000;
  background: #f7f6ef;
}

.answer-key-head {
  display: grid;
  gap: 8px;
}

.answer-key-head h3 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3vw, 2.5rem);
  line-height: 0.9;
  text-transform: uppercase;
}

.model-answer {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 2px solid #000;
  border-radius: 8px;
  color: #000;
  background: var(--neon);
}

.model-answer strong,
.reflection-strip strong {
  font-family: var(--display);
  font-size: 1.15rem;
  text-transform: uppercase;
}

.model-answer p {
  color: #000;
  font-weight: 750;
}

.key-concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.key-concept {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
}

.key-concept span {
  width: fit-content;
  padding: 4px 7px;
  border: 2px solid #000;
  border-radius: 999px;
  color: #fff;
  background: #000;
  font-size: 0.74rem;
  font-weight: 900;
}

.key-concept h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.key-concept p {
  color: #333;
  line-height: 1.45;
}

.reflection-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.reflection-strip div {
  padding: 12px;
  border: 2px solid #000;
  border-radius: 8px;
  color: #fff;
  background: #000;
}

.reflection-strip div:nth-child(2) {
  color: #000;
  background: var(--amber-soft);
}

.reflection-strip p {
  margin-top: 4px;
  color: inherit;
}

.quiz-actions,
.score-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.scoreboard {
  position: sticky;
  top: 92px;
  color: #fff;
  background: #000;
}

.scoreboard .eyebrow {
  color: var(--neon);
}

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

.scoreboard h3 {
  margin: 3px 0 0;
  font-family: var(--display);
  font-size: 2rem;
  line-height: 0.95;
  text-transform: uppercase;
}

.icon-button.inverse {
  border-color: #fff;
  color: #fff;
  background: #000;
}

.team-list {
  display: grid;
  gap: 8px;
}

.team-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border: 2px solid #fff;
  border-radius: 8px;
  color: #fff;
  background: #111;
  text-align: left;
}

.team-row.is-active {
  color: #000;
  background: var(--neon);
}

.team-row strong {
  font-family: var(--display);
  font-size: 1.6rem;
}

.coach-note.dark {
  border-color: #fff;
  color: #fff;
  background: #111;
}

.comparison-row {
  display: grid;
  grid-template-columns: 170px 1fr 1fr 1fr;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid rgba(37, 49, 58, 0.1);
  border-radius: 8px;
  background: #fff;
}

.comparison-row.header {
  color: #fff;
  background: var(--charcoal);
  font-weight: 800;
}

.comparison-row strong,
.comparison-row p {
  padding: 6px;
}

.oral-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.65fr);
  gap: 14px;
}

.prompt-stack {
  display: grid;
  gap: 10px;
}

.prompt-card {
  padding: 14px;
  border: 1px solid rgba(37, 49, 58, 0.12);
  border-radius: 8px;
  background: #fff;
}

.answer-formula {
  display: grid;
  gap: 8px;
}

.answer-formula div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 8px;
  background: rgba(248, 247, 242, 0.84);
}

.answer-formula strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--charcoal);
  font-size: 0.82rem;
}

.answer-formula span {
  color: var(--muted);
  font-size: 0.86rem;
}

.timer-display {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(37, 49, 58, 0.12);
  border-radius: 8px;
  color: var(--charcoal);
  background: #fbfaf6;
  font-variant-numeric: tabular-nums;
  font-size: 2rem;
  font-weight: 900;
  text-align: center;
}

.timer-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.empty-state {
  padding: 20px;
  border: 1px dashed rgba(37, 49, 58, 0.2);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

@media (max-width: 1180px) {
  .main-grid {
    grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  }

  .coach-header,
  .oral-grid,
  .quiz-stage {
    grid-template-columns: 1fr;
  }

  .scoreboard {
    position: static;
  }

  .camp-blocks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px;
  }

  .view-tabs {
    justify-content: flex-start;
  }

  .main-grid {
    grid-template-columns: 1fr;
    width: min(100vw - 20px, 760px);
  }

  .workbench {
    order: -1;
  }

  .section-grid,
  .concept-grid,
  .example-grid,
  .lens-grid,
  .key-concept-grid,
  .reflection-strip,
  .quiz-controls,
  .hero-strip,
  .camp-blocks,
  .memory-rule,
  .name-grid,
  .names-drill {
    grid-template-columns: 1fr;
  }

  .quiz-header {
    flex-direction: column;
  }

  .quiz-count {
    width: 100%;
  }

  .theory-hero,
  .comparison-row {
    grid-template-columns: 1fr;
  }

  .comparison-row.header {
    display: none;
  }

  .tab-button span {
    display: none;
  }

  .tab-button {
    width: 42px;
    padding: 0;
  }
}

@media (max-width: 540px) {
  .coach-panel,
  .theory-card,
  .case-card,
  .quiz-card,
  .matrix-panel,
  .oral-panel,
  .names-panel {
    padding: 15px;
  }

  .theory-map {
    min-height: 330px;
  }

  .map-node {
    width: 82px;
    font-size: 0.72rem;
  }

  .mega-title {
    font-size: clamp(2.6rem, 19vw, 4.4rem);
  }

  .quiz-option {
    grid-template-columns: 28px minmax(0, 1fr);
  }
}
