/* Decimal to Binary teaching deck, scoped on body.tpl-dbt. */
:root {
  --letter-tight: 0;
  --letter-normal: 0;
}

body.tpl-dbt {
  --dbt-bg: #05060a;
  --dbt-bg-2: #090b12;
  --dbt-panel: rgba(10, 15, 25, 0.88);
  --dbt-panel-2: rgba(15, 20, 35, 0.9);
  --dbt-line: rgba(0, 240, 255, 0.26);
  --dbt-line-hot: rgba(255, 43, 214, 0.38);
  --dbt-text: #f5f7ff;
  --dbt-muted: #aeb6cc;
  --dbt-dim: #727a91;
  --dbt-cyan: #00f0ff;
  --dbt-magenta: #ff2bd6;
  --dbt-amber: #f9f871;
  --dbt-green: #39ff14;
  --dbt-red: #ff4d6d;
  margin: 0;
  background:
    linear-gradient(90deg, rgba(0, 240, 255, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 43, 214, 0.06) 1px, transparent 1px),
    #05060a;
  background-size: 64px 64px;
  color: var(--dbt-text);
}

.tpl-dbt,
.tpl-dbt * {
  letter-spacing: 0 !important;
}

.tpl-dbt .deck {
  background: #05060a;
}

.tpl-dbt .slide {
  padding: 58px 78px 72px;
  background:
    linear-gradient(180deg, rgba(0, 240, 255, 0.04), transparent 24%),
    linear-gradient(135deg, #05060a 0%, #0a0a14 50%, #05060a 100%);
  color: var(--dbt-text);
}

.tpl-dbt .slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 43, 214, 0.06) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.42;
  mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 86%, transparent 100%);
}

.tpl-dbt .slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.025) 3px,
    rgba(255, 255, 255, 0.025) 4px
  );
  mix-blend-mode: screen;
}

.tpl-dbt .fx-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.26;
  pointer-events: none;
}

.tpl-dbt .right-fx {
  left: 45%;
  opacity: 0.38;
}

.tpl-dbt .slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.tpl-dbt .terminal-chrome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  padding: 10px 14px;
  border: 1px solid var(--dbt-line);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.68);
  color: var(--dbt-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: inset 0 0 24px rgba(0, 240, 255, 0.05);
}

.tpl-dbt .kicker {
  margin: 0 0 14px;
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.55);
}

.tpl-dbt .hero-title {
  margin: 0;
  color: var(--dbt-text);
  font-family: var(--font-display);
  font-size: 76px;
  line-height: 1.08;
  font-weight: 800;
  text-shadow:
    0 0 18px rgba(255, 43, 214, 0.75),
    0 0 44px rgba(0, 240, 255, 0.36);
}

.tpl-dbt .section-title {
  margin: 0 0 26px;
  max-width: 1040px;
  color: var(--dbt-text);
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1.2;
  font-weight: 780;
  text-shadow: 0 0 22px rgba(0, 240, 255, 0.24);
}

.tpl-dbt .lede {
  color: var(--dbt-muted);
}

.tpl-dbt .hero-layout {
  min-height: 650px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tpl-dbt .hero-equation {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 28px 0 10px;
  font-family: var(--font-mono);
  font-size: 84px;
  font-weight: 900;
  line-height: 1;
  color: var(--dbt-amber);
  text-shadow: 0 0 26px rgba(249, 248, 113, 0.38);
}

.tpl-dbt .hero-equation .arrow {
  color: var(--dbt-cyan);
  font-size: 44px;
  text-shadow: 0 0 24px rgba(0, 240, 255, 0.65);
}

.tpl-dbt .hero-lede {
  margin-top: 18px;
  font-size: 25px;
  color: var(--dbt-text);
}

.tpl-dbt .mission-strip {
  display: flex;
  gap: 12px;
  margin-top: 34px;
}

.tpl-dbt .mission-strip span,
.tpl-dbt .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--dbt-line);
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.06);
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.tpl-dbt .badge.magenta {
  border-color: var(--dbt-line-hot);
  background: rgba(255, 43, 214, 0.08);
  color: var(--dbt-magenta);
}

.tpl-dbt .badge.cyan {
  color: var(--dbt-cyan);
}

.tpl-dbt .two-worlds {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  align-items: stretch;
  gap: 22px;
  margin-top: 16px;
}

.tpl-dbt .world-card,
.tpl-dbt .rule-panel,
.tpl-dbt .decompose-panel,
.tpl-dbt .binary-board,
.tpl-dbt .step-card,
.tpl-dbt .quiz-card,
.tpl-dbt .team-card,
.tpl-dbt .randomizer-panel,
.tpl-dbt .score-panel,
.tpl-dbt .takeaway {
  border: 1px solid var(--dbt-line);
  border-radius: 8px;
  background: var(--dbt-panel);
  box-shadow:
    inset 0 0 28px rgba(0, 240, 255, 0.05),
    0 0 0 1px rgba(255, 43, 214, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.35);
}

.tpl-dbt .world-card {
  min-height: 260px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tpl-dbt .world-card.is-computer {
  border-color: var(--dbt-line-hot);
}

.tpl-dbt .world-label {
  margin: 0 0 16px;
  color: var(--dbt-dim);
  font-family: var(--font-mono);
  font-size: 14px;
}

.tpl-dbt .digit-line {
  color: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 800;
  white-space: nowrap;
}

.tpl-dbt .world-card p:last-child {
  margin: 18px 0 0;
  color: var(--dbt-muted);
  font-size: 20px;
}

.tpl-dbt .switch-line {
  display: flex;
  gap: 16px;
}

.tpl-dbt .switch {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--dbt-line);
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 900;
}

.tpl-dbt .switch.off {
  color: var(--dbt-dim);
  background: rgba(114, 122, 145, 0.08);
}

.tpl-dbt .switch.on {
  color: var(--dbt-green);
  border-color: rgba(57, 255, 20, 0.45);
  background: rgba(57, 255, 20, 0.08);
  box-shadow: 0 0 24px rgba(57, 255, 20, 0.25);
}

.tpl-dbt .convert-arrow {
  display: grid;
  place-items: center;
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 46px;
  font-weight: 900;
}

.tpl-dbt .callout {
  margin-top: 24px;
  padding: 16px 18px;
  border-left: 4px solid var(--dbt-amber);
  border-radius: 8px;
  background: rgba(249, 248, 113, 0.08);
  color: var(--dbt-text);
  font-size: 22px;
}

.tpl-dbt .compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 18px;
}

.tpl-dbt .rule-panel {
  min-height: 268px;
  padding: 28px;
}

.tpl-dbt .rule-panel.hot {
  border-color: var(--dbt-line-hot);
}

.tpl-dbt .big-rule {
  margin: 24px 0 18px;
  color: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
}

.tpl-dbt .rule-panel.hot .big-rule {
  color: var(--dbt-green);
  text-shadow: 0 0 22px rgba(57, 255, 20, 0.28);
}

.tpl-dbt .rule-panel p {
  margin: 0;
  color: var(--dbt-muted);
  font-size: 21px;
}

.tpl-dbt .tiny-formula {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border: 1px dashed rgba(249, 248, 113, 0.42);
  border-radius: 8px;
  color: var(--dbt-amber);
  font-family: var(--font-mono);
}

.tpl-dbt .bit-power-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.tpl-dbt .power-cell {
  min-height: 220px;
  padding: 20px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 240, 255, 0.34);
  border-radius: 8px;
  background: rgba(4, 12, 20, 0.82);
}

.tpl-dbt .power-cell .power {
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 900;
}

.tpl-dbt .power-cell .bit {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.08);
  color: var(--dbt-green);
  font-family: var(--font-mono);
  font-size: 58px;
  font-weight: 900;
  box-shadow: 0 0 28px rgba(57, 255, 20, 0.18);
}

.tpl-dbt .power-cell small {
  color: var(--dbt-dim);
  font-size: 15px;
}

.tpl-dbt .dim-cell .bit {
  background: rgba(114, 122, 145, 0.12);
  color: var(--dbt-dim);
  box-shadow: none;
}

.tpl-dbt .power-path {
  width: 100%;
  height: 110px;
  margin-top: 24px;
  overflow: visible;
}

.tpl-dbt .power-path path {
  fill: none;
  stroke: var(--dbt-amber);
  stroke-width: 4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(249, 248, 113, 0.4));
}

.tpl-dbt .power-path text {
  fill: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 22px;
  text-anchor: middle;
}

.tpl-dbt .demo-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 14px;
}

.tpl-dbt .decompose-panel {
  padding: 28px;
}

.tpl-dbt .decimal-big {
  color: var(--dbt-magenta);
  font-family: var(--font-mono);
  font-size: 120px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 32px rgba(255, 43, 214, 0.38);
}

.tpl-dbt .sum-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 20px;
  font-family: var(--font-mono);
  font-size: 35px;
  font-weight: 900;
}

.tpl-dbt .sum-line .on {
  color: var(--dbt-green);
}

.tpl-dbt .sum-line .off {
  color: var(--dbt-dim);
  text-decoration: line-through;
}

.tpl-dbt .sum-line .plus {
  color: var(--dbt-cyan);
}

.tpl-dbt .decompose-panel p {
  margin: 0;
  color: var(--dbt-muted);
  font-size: 20px;
}

.tpl-dbt .binary-board {
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-content: center;
}

.tpl-dbt .bit-slot {
  aspect-ratio: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
  border: 1px solid var(--dbt-line);
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.06);
}

.tpl-dbt .bit-slot b {
  margin-top: 12px;
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 20px;
}

.tpl-dbt .bit-slot span {
  align-self: center;
  color: var(--dbt-text);
  font-family: var(--font-mono);
  font-size: 64px;
  font-weight: 900;
}

.tpl-dbt .bit-slot.active {
  border-color: rgba(57, 255, 20, 0.45);
  background: rgba(57, 255, 20, 0.08);
}

.tpl-dbt .bit-slot.active span {
  color: var(--dbt-green);
}

.tpl-dbt .bit-slot.inactive {
  opacity: 0.62;
}

.tpl-dbt .binary-result {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--dbt-line-hot);
  color: var(--dbt-amber);
  background: rgba(255, 43, 214, 0.06);
  font-family: var(--font-mono);
  font-size: 58px;
  font-weight: 900;
  text-align: center;
}

.tpl-dbt .steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.tpl-dbt .step-card {
  min-height: 250px;
  padding: 22px;
}

.tpl-dbt .step-no {
  display: inline-block;
  margin-bottom: 38px;
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
}

.tpl-dbt .step-card h3 {
  margin: 0 0 12px;
  color: var(--dbt-text);
  font-size: 28px;
}

.tpl-dbt .step-card p {
  margin: 0;
  color: var(--dbt-muted);
  font-size: 18px;
  line-height: 1.6;
}

.tpl-dbt .formula-console {
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid var(--dbt-line);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.76);
  color: var(--dbt-green);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
}

.tpl-dbt .quiz-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 22px;
}

.tpl-dbt .quiz-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
}

.tpl-dbt .quiz-progress {
  min-height: 54px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(0, 240, 255, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(57, 255, 20, 0.04)),
    rgba(4, 8, 14, 0.82);
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.tpl-dbt .quiz-progress span:last-child {
  color: var(--dbt-dim);
}

.tpl-dbt .quiz-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.tpl-dbt .quiz-toolbar button {
  min-width: 118px;
  border-color: rgba(0, 240, 255, 0.36);
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.14), rgba(255, 43, 214, 0.08)),
    rgba(4, 8, 14, 0.86);
  box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.06);
}

.tpl-dbt .quiz-toolbar button[aria-pressed="true"] {
  border-color: rgba(57, 255, 20, 0.62);
  color: var(--dbt-green);
  box-shadow:
    inset 0 0 20px rgba(57, 255, 20, 0.1),
    0 0 18px rgba(57, 255, 20, 0.18);
}

.tpl-dbt .quiz-carousel {
  grid-template-columns: minmax(420px, 760px);
  justify-content: center;
  margin-top: 14px;
}

.tpl-dbt .quiz-card {
  min-height: 230px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  text-align: center;
}

.tpl-dbt .quiz-carousel .quiz-card {
  display: none;
  min-height: 270px;
  padding: 22px 34px;
}

.tpl-dbt .quiz-carousel .quiz-card.is-active {
  display: grid;
  animation: quizCardIn 0.36s cubic-bezier(0.22, 0.8, 0.2, 1) both;
}

.tpl-dbt .quiz-card span {
  color: var(--dbt-dim);
  font-family: var(--font-mono);
  font-size: 23px;
  font-weight: 800;
}

.tpl-dbt .quiz-card b {
  color: var(--dbt-green);
  font-family: var(--font-mono);
  font-size: 54px;
  font-weight: 900;
  text-shadow: 0 0 20px rgba(57, 255, 20, 0.22);
}

.tpl-dbt .quiz-card b.quiz-answer {
  transition:
    color 0.25s ease,
    opacity 0.25s ease,
    text-shadow 0.25s ease,
    transform 0.25s ease;
}

.tpl-dbt .quiz-card b.quiz-answer.is-hidden,
.tpl-dbt .quiz-card.challenge b.quiz-answer.is-hidden {
  color: var(--dbt-dim);
  opacity: 0.54;
  text-shadow: none;
  transform: scale(0.96);
}

.tpl-dbt .quiz-card small {
  color: var(--dbt-muted);
  font-size: 15px;
  min-height: 24px;
  transition:
    color 0.25s ease,
    opacity 0.25s ease,
    transform 0.25s ease;
}

.tpl-dbt .quiz-card small.quiz-process.is-hidden {
  color: rgba(139, 148, 174, 0.42);
  opacity: 0.72;
  transform: translateY(2px);
}

.tpl-dbt .quiz-card.challenge {
  border-color: var(--dbt-line-hot);
}

.tpl-dbt .quiz-card.challenge b {
  color: var(--dbt-magenta);
}

@keyframes quizCardIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

.tpl-dbt .team-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.tpl-dbt .team-card {
  padding: 16px;
}

.tpl-dbt .team-card h3 {
  margin: 0 0 14px;
  color: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 24px;
}

.tpl-dbt .players {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}

.tpl-dbt .player {
  min-height: 150px;
  padding: 8px 6px;
  display: grid;
  grid-template-rows: auto 1fr;
  place-items: center;
  border: 1px solid rgba(0, 240, 255, 0.24);
  border-radius: 8px;
  background: rgba(4, 8, 14, 0.64);
  position: relative;
}

.tpl-dbt .player::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
  box-shadow: 0 0 18px currentColor;
}

.tpl-dbt .player::after {
  content: "";
  position: absolute;
  top: 48px;
  width: 34px;
  height: 58px;
  border: 1px solid currentColor;
  border-radius: 8px;
  opacity: 0.65;
}

.tpl-dbt .player span {
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
}

.tpl-dbt .player b {
  align-self: end;
  color: var(--dbt-text);
  font-family: var(--font-mono);
  font-size: 32px;
  line-height: 1;
}

.tpl-dbt .player.on {
  color: var(--dbt-green);
  border-color: rgba(57, 255, 20, 0.42);
}

.tpl-dbt .player.off {
  color: var(--dbt-dim);
}

.tpl-dbt .players.muted .player {
  color: var(--dbt-dim);
}

.tpl-dbt .rule-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.tpl-dbt .rule-strip span {
  padding: 10px 14px;
  border: 1px solid rgba(249, 248, 113, 0.32);
  border-radius: 8px;
  background: rgba(249, 248, 113, 0.07);
  color: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
}

.tpl-dbt .game-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  margin-top: 18px;
}

.tpl-dbt .randomizer-panel,
.tpl-dbt .score-panel {
  padding: 28px;
  min-height: 350px;
}

.tpl-dbt .panel-label {
  display: block;
  color: var(--dbt-dim);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.tpl-dbt .challenge-number {
  margin: 18px 0 8px;
  color: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 132px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 32px rgba(249, 248, 113, 0.34);
}

.tpl-dbt .challenge-number.is-rolling {
  color: var(--dbt-cyan);
  animation: numberRoll 0.18s steps(2) infinite;
  text-shadow:
    0 0 18px rgba(0, 240, 255, 0.72),
    0 0 44px rgba(255, 43, 214, 0.35);
}

.tpl-dbt .answer-bits {
  width: 100%;
  min-height: 56px;
  margin-bottom: 22px;
  color: var(--dbt-green);
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 900;
}

.tpl-dbt .answer-bits.is-hidden {
  color: var(--dbt-dim);
}

.tpl-dbt .button-row {
  display: flex;
  gap: 12px;
}

.tpl-dbt button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--dbt-line);
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.08);
  color: var(--dbt-text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.tpl-dbt button:hover,
.tpl-dbt button:focus-visible {
  border-color: rgba(249, 248, 113, 0.6);
  outline: none;
  box-shadow: 0 0 18px rgba(249, 248, 113, 0.24);
}

.tpl-dbt button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  box-shadow: none;
}

.tpl-dbt .score-panel {
  display: grid;
  gap: 12px;
}

.tpl-dbt .score-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.05);
}

.tpl-dbt .score-row b {
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 18px;
}

.tpl-dbt .score-row span {
  color: var(--dbt-text);
  font-size: 21px;
}

.tpl-dbt .score-total {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(249, 248, 113, 0.3);
  background:
    linear-gradient(90deg, rgba(255, 43, 214, 0.16), rgba(0, 240, 255, 0.08)),
    rgba(255, 43, 214, 0.08);
  color: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 0 24px rgba(255, 43, 214, 0.16);
}

.tpl-dbt .summary-layout {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tpl-dbt .summary-title {
  max-width: 1080px;
  margin: 0 0 34px;
  color: var(--dbt-text);
  font-family: var(--font-display);
  font-size: 58px;
  line-height: 1.18;
  font-weight: 900;
}

.tpl-dbt .takeaway-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.tpl-dbt .takeaway {
  min-height: 160px;
  padding: 20px;
}

.tpl-dbt .takeaway b {
  display: block;
  margin-bottom: 20px;
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 19px;
}

.tpl-dbt .takeaway span {
  color: var(--dbt-text);
  font-size: 25px;
  font-weight: 800;
}

.tpl-dbt .final-mission {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.08);
  color: var(--dbt-green);
  font-size: 28px;
  font-weight: 900;
  text-align: center;
}

.tpl-dbt .deck-footer {
  left: 78px;
  right: 78px;
  bottom: 26px;
  z-index: 8;
  color: var(--dbt-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.tpl-dbt .progress-bar > span {
  background: linear-gradient(90deg, var(--dbt-cyan), var(--dbt-magenta), var(--dbt-amber));
}

@media (max-width: 980px) {
  .tpl-dbt .slide {
    padding: 34px 28px 58px;
  }

  .tpl-dbt .hero-title {
    font-size: 50px;
  }

  .tpl-dbt .section-title,
  .tpl-dbt .summary-title {
    font-size: 34px;
  }

  .tpl-dbt .two-worlds,
  .tpl-dbt .compare-grid,
  .tpl-dbt .demo-grid,
  .tpl-dbt .game-grid {
    grid-template-columns: 1fr;
  }

  .tpl-dbt .steps-grid,
  .tpl-dbt .bit-power-row,
  .tpl-dbt .team-board,
  .tpl-dbt .takeaway-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tpl-dbt .quiz-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tpl-dbt .quiz-stage {
    align-items: stretch;
    flex-direction: column;
  }

  .tpl-dbt .quiz-toolbar {
    justify-content: flex-start;
  }

  .tpl-dbt .quiz-carousel {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Updated lesson flow: subtraction-method bridge + 5-bit team game. */
.tpl-dbt .review-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
  margin-top: 22px;
}

.tpl-dbt .division-trace,
.tpl-dbt .remainder-panel {
  min-height: 390px;
  padding: 28px;
  border: 1px solid var(--dbt-line);
  border-radius: 8px;
  background: var(--dbt-panel);
  box-shadow:
    inset 0 0 28px rgba(0, 240, 255, 0.05),
    0 18px 44px rgba(0, 0, 0, 0.35);
}

.tpl-dbt .trace-line {
  display: grid;
  grid-template-columns: 150px 1fr 92px;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.05);
  font-family: var(--font-mono);
}

.tpl-dbt .trace-line b {
  color: var(--dbt-cyan);
  font-size: 22px;
}

.tpl-dbt .trace-line span {
  color: var(--dbt-text);
  font-size: 20px;
}

.tpl-dbt .trace-line em {
  color: var(--dbt-amber);
  font-style: normal;
  font-size: 22px;
  font-weight: 900;
}

.tpl-dbt .remainder-stack {
  display: grid;
  grid-template-columns: repeat(4, 76px);
  gap: 14px;
  margin: 36px 0 28px;
}

.tpl-dbt .reduction-stack {
  grid-template-columns: repeat(5, 64px);
}

.tpl-dbt .remainder-stack span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(57, 255, 20, 0.45);
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.08);
  color: var(--dbt-green);
  font-family: var(--font-mono);
  font-size: 44px;
  font-weight: 900;
  box-shadow: 0 0 26px rgba(57, 255, 20, 0.16);
}

.tpl-dbt .game-rule-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.tpl-dbt .rule-hero-card {
  min-height: 280px;
  padding: 26px;
  border: 1px solid var(--dbt-line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(0, 240, 255, 0.08), rgba(255, 43, 214, 0.04)),
    var(--dbt-panel);
  box-shadow:
    inset 0 0 32px rgba(0, 240, 255, 0.06),
    0 18px 44px rgba(0, 0, 0, 0.35);
}

.tpl-dbt .rule-index {
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 900;
}

.tpl-dbt .rule-hero-card h3 {
  margin: 42px 0 16px;
  color: var(--dbt-text);
  font-size: 34px;
}

.tpl-dbt .rule-hero-card p {
  margin: 0;
  color: var(--dbt-muted);
  font-size: 21px;
  line-height: 1.55;
}

.tpl-dbt .rule-banner {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(57, 255, 20, 0.38);
  border-radius: 8px;
  background: rgba(57, 255, 20, 0.08);
  color: var(--dbt-green);
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 900;
  text-align: center;
}

.tpl-dbt .callout.compact {
  font-size: 24px;
  line-height: 1.55;
}

.tpl-dbt .sum-line.six {
  flex-wrap: wrap;
  gap: 8px;
  font-size: 28px;
}

.tpl-dbt .six-bit-board {
  grid-template-columns: repeat(5, 1fr);
}

.tpl-dbt .six-bit-board .bit-slot span {
  font-size: 50px;
}

.tpl-dbt .six-bit-board .binary-result {
  font-size: 52px;
}

.tpl-dbt .interactive-board {
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 18px;
  margin-top: 14px;
}

.tpl-dbt .interactive-board .team-card {
  min-height: 170px;
  padding: 14px 16px;
}

.tpl-dbt .interactive-board .team-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.tpl-dbt .interactive-board .players {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.tpl-dbt button.player {
  width: 100%;
  min-height: 82px;
  padding: 6px 4px;
  color: var(--dbt-dim);
  cursor: pointer;
  transition: transform 0.16s var(--ease), border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.tpl-dbt button.player:hover,
.tpl-dbt button.player:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(249, 248, 113, 0.62);
  box-shadow: 0 0 18px rgba(249, 248, 113, 0.18);
}

.tpl-dbt .player.is-on {
  color: var(--dbt-green);
  border-color: rgba(57, 255, 20, 0.48);
  background: rgba(57, 255, 20, 0.08);
}

.tpl-dbt .player.is-on b {
  color: var(--dbt-green);
}

.tpl-dbt .interactive-board .player::before {
  width: 22px;
  height: 22px;
}

.tpl-dbt .interactive-board .player::after {
  display: none;
}

.tpl-dbt .interactive-board .player span {
  font-size: 13px;
}

.tpl-dbt .interactive-board .player b {
  font-size: 30px;
  align-self: center;
}

.tpl-dbt .team-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(249, 248, 113, 0.28);
  border-radius: 8px;
  background: rgba(249, 248, 113, 0.06);
  font-family: var(--font-mono);
}

.tpl-dbt .team-result .binary {
  color: var(--dbt-amber);
  font-size: 20px;
  font-weight: 900;
}

.tpl-dbt .team-result .decimal {
  min-width: 42px;
  color: var(--dbt-green);
  font-size: 24px;
  text-align: right;
}

.tpl-dbt .score-game-grid {
  grid-template-columns: 0.78fr 1.22fr;
}

.tpl-dbt .team-score-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.tpl-dbt .match-row {
  display: grid;
  grid-template-columns: 1fr 64px 1fr;
  gap: 14px;
  align-items: stretch;
}

.tpl-dbt .versus {
  display: grid;
  place-items: center;
  color: var(--dbt-magenta);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 900;
}

.tpl-dbt .team-score {
  display: grid;
  grid-template-columns: 56px 72px 76px repeat(3, 54px);
  gap: 8px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(0, 240, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(0, 240, 255, 0.08), rgba(255, 43, 214, 0.04)),
    rgba(0, 240, 255, 0.05);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

.tpl-dbt .team-score b {
  color: var(--dbt-cyan);
  font-family: var(--font-mono);
  font-size: 16px;
}

.tpl-dbt .team-score .score {
  color: var(--dbt-amber);
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.tpl-dbt .team-score .status {
  justify-self: start;
  padding: 4px 7px;
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 6px;
  color: var(--dbt-green);
  background: rgba(57, 255, 20, 0.06);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.tpl-dbt .team-score button {
  min-height: 38px;
  padding: 0;
  font-size: 13px;
}

.tpl-dbt .team-score.score-pop {
  transform: scale(1.03);
  box-shadow: 0 0 22px rgba(249, 248, 113, 0.22);
}

.tpl-dbt .team-score.is-eliminated {
  border-color: rgba(255, 77, 109, 0.48);
  background:
    linear-gradient(135deg, rgba(255, 77, 109, 0.14), rgba(4, 8, 14, 0.7)),
    rgba(4, 8, 14, 0.72);
  opacity: 0.72;
}

.tpl-dbt .team-score.is-eliminated .status {
  border-color: rgba(255, 77, 109, 0.46);
  background: rgba(255, 77, 109, 0.12);
  color: var(--dbt-red);
}

@keyframes numberRoll {
  0% { transform: translateY(0) skewX(0deg); filter: blur(0); }
  45% { transform: translateY(-5px) skewX(-4deg); filter: blur(1px); }
  100% { transform: translateY(4px) skewX(4deg); filter: blur(0); }
}

@media (max-width: 980px) {
  .tpl-dbt .review-grid,
  .tpl-dbt .score-game-grid {
    grid-template-columns: 1fr;
  }

  .tpl-dbt .interactive-board {
    grid-template-columns: 1fr;
  }

  .tpl-dbt .team-score-grid {
    grid-template-columns: 1fr;
  }
}
