:root {
  --ink: #17231f;
  --muted: #5f706a;
  --paper: #f5f2e9;
  --card: #fffdf7;
  --forest: #0d3b2f;
  --acid: #d8f459;
  --border: #ddded4;
  --shadow: 0 22px 70px rgba(13, 59, 47, 0.12);

  /* Board */
  --loop: #4c2a91;
  --lattice: rgba(23, 35, 31, 0.16);
  --clue: #3a2d6d;

  /* Sector markings, following Jonathan Olson's guide */
  --only-one: #e0463a;
  --not-one: #2f7fe0;
  --not-two: #e08a1e;
  --not-zero: #12a866;

  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% 6%, rgba(216, 244, 89, 0.18), transparent 26rem),
    linear-gradient(180deg, #f9f7f0 0%, var(--paper) 100%);
}

button, a { font: inherit; }
button { color: inherit; background: none; border: none; cursor: pointer; }
button:disabled { cursor: default; opacity: 0.35; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--acid);
  outline-offset: 2px;
}

.shell { width: min(1460px, 100%); margin: 0 auto; min-height: 100vh; }
.is-hidden { display: none !important; }

/* ------------------------------------------------------------------ topbar */

.topbar {
  height: 74px;
  padding: 0 clamp(18px, 4vw, 60px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--forest);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.brand-mark {
  display: grid;
  grid-template-columns: 7px 7px;
  gap: 3px;
}
.brand-mark i { width: 7px; height: 7px; border-radius: 50%; background: var(--forest); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(3) { background: var(--only-one); }

.topbar-actions { display: flex; align-items: center; gap: 18px; }
.focus-label { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }
@media (max-width: 760px) { .focus-label { display: none; } }

.language-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--card);
}
.language-button {
  padding: 7px 15px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.language-button.is-active { background: var(--forest); color: #fff; }

/* -------------------------------------------------------------------- hero */

.hero {
  padding: clamp(40px, 7vw, 92px) clamp(18px, 4vw, 60px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } }

.eyebrow {
  margin: 0 0 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 850;
}
.hero h1 em { font-style: normal; color: var(--only-one); }

.hero-lead { margin: 0 0 28px; font-size: 17px; line-height: 1.6; max-width: 54ch; color: #2c3a35; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { margin: 22px 0 0; font-size: 12.5px; color: var(--muted); letter-spacing: 0.03em; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.12s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { background: var(--forest); color: #fff; }
.button.ghost { border-color: var(--border); background: var(--card); color: var(--forest); }

.rule-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.rule-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}
.status-dot { color: var(--forest); }
.rule-visual { position: relative; margin: 14px 0 16px; }
.rule-visual svg { width: 100%; height: auto; display: block; }
.demo-cut { fill: rgba(216, 244, 89, 0.3); stroke: var(--forest); stroke-width: 2; stroke-dasharray: 7 6; }
.demo-loop { fill: none; stroke: var(--loop); stroke-width: 5; stroke-linejoin: round; }
.demo-hits circle { fill: var(--only-one); }
.even-stamp {
  position: absolute;
  right: 8px;
  bottom: 2px;
  background: var(--forest);
  color: var(--acid);
  border-radius: 999px;
  padding: 5px 13px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.05em;
}
.rule-equation { margin: 0 0 4px; font-size: 15px; font-weight: 650; line-height: 1.45; }
.rule-detail { margin: 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ course */

.course {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: clamp(18px, 3vw, 38px);
  padding: 26px clamp(18px, 4vw, 60px) 60px;
  align-items: start;
}
@media (max-width: 1040px) {
  /* Content first: a fifteen-item table of contents above the lesson would mean
     scrolling past the whole course to read any of it. */
  .course { grid-template-columns: 1fr; }
  .stage { order: 1; }
  .rail { order: 2; }
}

.rail {
  position: sticky;
  top: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}
@media (max-width: 1040px) {
  .rail { position: static; max-height: 60vh; }
  .rail-head { position: sticky; top: 0; background: var(--card); }
}

.rail-head {
  display: flex;
  justify-content: space-between;
  padding: 2px 8px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.rail-group {
  margin: 14px 0 4px;
  padding: 0 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-transform: uppercase;
}
.rail-item {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 12px;
  text-align: left;
  font-size: 13px;
  line-height: 1.3;
  color: #35443e;
}
.rail-item:hover { background: rgba(13, 59, 47, 0.06); }
.rail-item.is-active { background: var(--forest); color: #fff; }
.rail-item span { font-size: 10.5px; font-weight: 800; opacity: 0.65; letter-spacing: 0.06em; }
.rail-item strong { font-weight: 600; }
.rail-item i { font-style: normal; font-size: 10.5px; text-align: right; opacity: 0.7; }
.rail-item.is-seen:not(.is-active) strong { color: var(--forest); }
.rail-foot { margin: 14px 8px 2px; font-size: 11px; color: var(--muted); line-height: 1.45; }

/* ------------------------------------------------------------------- panel */

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--shadow);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.panel-head h2 {
  margin: 0;
  font-size: clamp(21px, 2.5vw, 30px);
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 24ch;
}
.panel-head .eyebrow { margin-bottom: 8px; }
.counter {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
}

.lesson-grid, .drill-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  }
@media (min-width: 941px) {
  .walkthrough .lesson-grid { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}
.lesson-grid, .drill-grid {
  gap: clamp(22px, 3vw, 42px);
  align-items: start;
}
@media (max-width: 940px) { .lesson-grid, .drill-grid { grid-template-columns: 1fr; } }

.lesson-copy p, .prose p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.62; color: #2b3833; }
.lesson-copy > :last-child { margin-bottom: 0; }
.intro { margin: 0 0 22px; font-size: 15.5px; line-height: 1.6; color: #2b3833; max-width: 70ch; }

.rule-block, .why-block, .note-block, .warn-block {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border-left: 4px solid var(--forest);
  background: rgba(13, 59, 47, 0.05);
}
.rule-block { border-left-color: var(--only-one); background: rgba(224, 70, 58, 0.07); }
.why-block { border-left-color: var(--not-one); background: rgba(47, 127, 224, 0.07); }
.warn-block { border-left-color: var(--not-two); background: rgba(224, 138, 30, 0.09); }
.rule-block span, .why-block span, .note-block span, .warn-block span {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.rule-block p, .why-block p, .note-block p, .warn-block p { margin: 0; font-size: 15px; line-height: 1.55; }
.rule-block p { font-weight: 650; }

.quote-block { margin: 0 0 18px; padding: 0 0 0 18px; border-left: 3px solid var(--border); }
.quote-block blockquote { margin: 0 0 8px; font-size: 15px; line-height: 1.6; font-style: italic; color: #35443e; }
.quote-block figcaption { font-size: 12px; color: var(--muted); }
.quote-block figcaption a { color: var(--muted); }
.quote-block.small blockquote { font-size: 14px; }

.steps-block { margin: 0 0 18px; padding-left: 20px; }
.steps-block li { margin-bottom: 10px; font-size: 15px; line-height: 1.55; }

.lesson-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 14px; }
.lesson-table th, .lesson-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.lesson-table th { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.lesson-table td:first-child { font-weight: 700; }

/* Sector figures ---------------------------------------------------------- */

.fig-set {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(13, 59, 47, 0.03);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fig-block { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fig-block figcaption { display: flex; align-items: center; gap: 8px; }
.fig-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fig { width: 64px; height: 64px; flex: none; }
.fig-lattice line { stroke: var(--lattice); stroke-width: 1; stroke-dasharray: 3 4; }
.fig-line { stroke: var(--loop); stroke-width: 5; stroke-linecap: round; }
.fig-cross line { stroke: #93a09a; stroke-width: 2.2; stroke-linecap: round; }
.fig-dot { fill: #384741; }
.fig-arc { fill: none; stroke-width: 3.4; stroke-linecap: round; }
.fig.is-forbidden { opacity: 0.42; }
.fig-strike { stroke: #93a09a; stroke-width: 1.6; }
.fig-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

.propagation-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}
.propagation-flow .board-frame { min-width: 0; }
.propagation-arrow { color: var(--muted); font-size: 24px; font-weight: 750; }

/* The arc takes the marking's colour and stroke from the shared sector rules. */
.sector-only-one .fig-arc { stroke: var(--only-one); }
.sector-not-one .fig-arc { stroke: var(--not-one); }
.sector-not-two .fig-arc { stroke: var(--not-two); stroke-dasharray: 5 4; }
.sector-not-zero .fig-arc { stroke: var(--not-zero); stroke-dasharray: 5 4; }

.fig-parity .fig-row { gap: 12px; }
.fig-cell { width: 104px; height: 104px; }
.fig-cell-body { fill: rgba(216, 244, 89, 0.28); stroke: var(--border); stroke-width: 1; }
.fig-cell.is-impossible .fig-cell-body { fill: rgba(224, 70, 58, 0.09); stroke: var(--only-one); stroke-dasharray: 5 4; }
.fig-count {
  font-size: 22px;
  font-weight: 850;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--forest);
}
.fig-cell.is-impossible .fig-count { fill: var(--only-one); }

.state-defs {
  list-style: none;
  margin: 0 0 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(13, 59, 47, 0.03);
}
.state-defs li { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.state-defs .swatch { width: 18px; flex: none; }
.state-defs b { font-weight: 750; }
.state-defs small { color: var(--muted); font-size: 12px; }
.state-defs code,
.sector-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sector-table { table-layout: auto; }
.sector-table th { text-align: center; }
.sector-table th:first-child, .sector-table td:first-child { text-align: left; }
.sector-table td { text-align: center; vertical-align: middle; }
.sector-table td:first-child, .sector-table td:nth-child(2) { white-space: nowrap; }
.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.01em;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.chip-only-one { color: var(--only-one); background: rgba(224, 70, 58, 0.09); }
.chip-not-one { color: var(--not-one); background: rgba(47, 127, 224, 0.09); }
.chip-not-two { color: var(--not-two); background: rgba(224, 138, 30, 0.11); }
.chip-not-zero { color: var(--not-zero); background: rgba(18, 168, 102, 0.1); }
.chip-two { color: var(--loop); background: rgba(76, 42, 145, 0.09); }
.chip-zero { color: #6d7a74; background: rgba(109, 122, 116, 0.1); }
.chip-free { color: var(--muted); background: transparent; border-style: dashed; font-weight: 600; }

.lesson-link {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  color: var(--forest);
  font-weight: 650;
}
.pair-tag { font-size: 12px !important; letter-spacing: 0.06em; color: var(--muted) !important; text-transform: uppercase; }

.panel-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.panel-actions .primary { margin-left: auto; }
.source-link { font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------------- board */

.board-frame {
  background: #fbfaf4;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
}
.board { width: 100%; height: auto; display: block; }

.lattice { stroke: var(--lattice); stroke-width: 1; stroke-dasharray: 3 5; }
.board-line { stroke: var(--loop); stroke-width: 5.5; stroke-linecap: round; }
.board-cross line { stroke: #93a09a; stroke-width: 2.2; stroke-linecap: round; }
.board-ghost { stroke: var(--acid); stroke-width: 7; stroke-linecap: round; opacity: 0.75; }
.board-dot { fill: #384741; }
.board-clue {
  font-size: 21px;
  font-weight: 700;
  fill: var(--clue);
  text-anchor: middle;
  dominant-baseline: central;
}
.board-focus {
  stroke: var(--only-one);
  stroke-width: 8;
  stroke-linecap: round;
  opacity: 0.45;
}

.board-region rect { fill: rgba(13, 59, 47, 0.07); }
.board-region.tone-focus rect { fill: rgba(216, 244, 89, 0.4); }
.board-region.tone-alt rect { fill: rgba(47, 127, 224, 0.1); }
.region-edge line { stroke: var(--forest); stroke-width: 2; stroke-dasharray: 5 4; }
.region-label, .cut-label { font-size: 13px; font-weight: 800; fill: var(--forest); }

.board-cut rect { fill: rgba(224, 138, 30, 0.1); }
.board-cut.tone-alt rect { fill: rgba(47, 127, 224, 0.1); }
.cut-edge line { stroke: var(--not-two); stroke-width: 2.4; stroke-dasharray: 7 5; }
.board-cut.tone-alt .cut-edge line { stroke: var(--not-one); }
.board-cut.tone-alt .cut-label { fill: var(--not-one); }
.board-cut .cut-label { fill: var(--not-two); }

.board-shade.tone-inside rect { fill: rgba(76, 42, 145, 0.16); }
.board-shade.tone-outside rect { fill: rgba(255, 255, 255, 0.01); }

.sector path { fill: none; stroke-width: 3.4; stroke-linecap: round; }
.sector-only-one path { stroke: var(--only-one); }
.sector-not-one path { stroke: var(--not-one); }
.sector-not-two path { stroke: var(--not-two); stroke-dasharray: 5 4; }
.sector-not-zero path { stroke: var(--not-zero); stroke-dasharray: 5 4; }
.sector-zero path { stroke: #93a09a; stroke-dasharray: 2 4; }
.sector-two path { stroke: var(--loop); }
.sector-free path { stroke: rgba(23, 35, 31, 0.2); stroke-dasharray: 2 5; }
.sector.tone-gained path { stroke-width: 5; }
.sector.tone-gained .sector-chip { stroke: currentColor; stroke-width: 2; }
.sector-only-one.tone-gained .sector-chip { stroke: var(--only-one); }
.sector-not-one.tone-gained .sector-chip { stroke: var(--not-one); }
.sector-zero.tone-gained .sector-chip { stroke: #6d7a74; }
.sector-not-two.tone-gained .sector-chip { stroke: var(--not-two); }
.sector-not-zero.tone-gained .sector-chip { stroke: var(--not-zero); }
.sector-two.tone-gained .sector-chip { stroke: var(--loop); }
.sector-chip { fill: #fbfaf4; stroke: none; }
.sector-leader { stroke: currentColor; stroke-width: 1.2; opacity: 0.5; }
.sector-only-one .sector-leader { stroke: var(--only-one); }
.sector-not-one .sector-leader { stroke: var(--not-one); }
.sector-not-two .sector-leader { stroke: var(--not-two); }
.sector-not-zero .sector-leader { stroke: var(--not-zero); }
.sector-zero .sector-leader { stroke: #93a09a; }
.sector.is-past { opacity: 0.52; }
.sector-label {
  font-size: 13px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
  fill: currentColor;
}
.sector-only-one .sector-label { fill: var(--only-one); }
.sector-not-one .sector-label { fill: var(--not-one); }
.sector-not-two .sector-label { fill: var(--not-two); }
.sector-not-zero .sector-label { fill: var(--not-zero); }
.sector-zero .sector-label { fill: #6d7a74; }
.sector-two .sector-label { fill: var(--loop); }

.pick-edge {
  fill: rgba(76, 42, 145, 0.07);
  cursor: pointer;
  transition: fill 0.1s ease;
}
.pick-edge:hover { fill: rgba(224, 70, 58, 0.28); }
.pick-cell { fill: transparent; cursor: pointer; }
.pick-cell:hover { fill: rgba(216, 244, 89, 0.35); }

.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 0;
  padding: 0;
  font-size: 11.5px;
  color: var(--muted);
}
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.swatch.only-one { background: var(--only-one); }
.swatch.not-one { background: var(--not-one); }
.swatch.not-two { background: repeating-linear-gradient(90deg, var(--not-two) 0 4px, transparent 4px 7px); }
.swatch.not-zero { background: repeating-linear-gradient(90deg, var(--not-zero) 0 4px, transparent 4px 7px); }
.figure-note { margin: 10px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.45; }

/* ------------------------------------------------------------------ drills */

.mode-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin: -6px 0 20px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(13, 59, 47, 0.05);
}
.mode-button {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.mode-button.is-active { background: var(--card); color: var(--forest); box-shadow: 0 1px 4px rgba(13, 59, 47, 0.12); }

.walk-step { border: 1px solid var(--border); border-radius: 18px; padding: 18px; background: rgba(13, 59, 47, 0.03); }
.walk-meta {
  margin: 0 0 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.walk-step h3 { margin: 0 0 10px; font-size: 19px; line-height: 1.25; letter-spacing: -0.01em; }
.walk-step > p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: #2b3833; }
.walk-items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.walk-items li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.walk-items b.marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--only-one);
  color: var(--only-one);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.walk-items span { font-size: 14px; line-height: 1.5; color: #2b3833; }
.walk-controls { display: flex; gap: 10px; align-items: center; }
.walk-controls .primary { margin-left: auto; }

.explain-head { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.04em; color: var(--muted); }
.explain-chain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.explain-chain li { font-size: 13px; line-height: 1.5; }
.explain-chain strong { display: block; font-size: 13px; }
.explain-chain span { color: #35443e; }
.explain-chain ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.explain-chain ul li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--muted); font-size: 12.5px; }
.explain-chain ul b.marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--only-one);
  color: var(--only-one);
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.board-cross line { opacity: 0.75; }

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

.stall-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(13, 59, 47, 0.04);
}
.stall-card span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.stall-card p { margin: 6px 0 12px; font-size: 14px; line-height: 1.5; }
.stall-meters { display: flex; gap: 22px; }
.stall-meters div { display: flex; flex-direction: column; }
.stall-meters b { font-size: 22px; font-weight: 850; line-height: 1; color: var(--forest); }
.stall-meters small { font-size: 10.5px; color: var(--muted); margin-top: 4px; }

.task { margin: 0; font-size: 14.5px; line-height: 1.5; }
.picked {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 700;
  color: var(--only-one);
  letter-spacing: 0.04em;
}
.answer-row { display: flex; gap: 10px; }
.answer {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: var(--card);
}
.answer.is-on { border-color: var(--forest); background: rgba(13, 59, 47, 0.08); }
.mark-line { width: 20px; height: 5px; border-radius: 3px; background: var(--loop); display: inline-block; }
.mark-cross { font-style: normal; color: #93a09a; font-size: 17px; }

.inline-message { margin: 0; min-height: 18px; font-size: 13px; color: var(--only-one); }
.drill-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.drill-tools .button { padding: 8px 14px; font-size: 12.5px; }
.hint-line { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.explain-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(47, 127, 224, 0.06);
  font-size: 13px;
  line-height: 1.55;
}
.explain-card p { margin: 0 0 6px; }
.explain-card p:last-child { margin: 0; }

.feedback {
  border-radius: 16px;
  padding: 16px;
  background: rgba(18, 168, 102, 0.1);
  border: 1px solid rgba(18, 168, 102, 0.3);
}
.feedback strong { display: block; font-size: 16px; margin-bottom: 4px; }
.feedback p { margin: 0; font-size: 14px; color: #2b3833; }

/* ------------------------------------------------------------------ footer */

footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 26px clamp(18px, 4vw, 60px) 40px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
footer a { color: var(--muted); }
