/* Focused lesson and review surfaces. Scoped to the player so simulations,
   checkout and the course library keep their own layout and behavior. */
.view.deck {
  --ink: #172b2a;
  --muted: #61726d;
  --paper: #fff;
  --espresso: #146b55;
  --espresso-deep: #105640;
  --latte: #e7ece8;
  --tan: #d6e0d9;
  --green: #146b55;
  --green-soft: #edf7f1;
  --red: #a93d32;
  --red-soft: #fff1ee;
  max-width: 780px;
  padding: 24px 24px 112px;
  color: var(--ink);
}

.deck .deck-top {
  gap: 12px;
  padding: 14px 0 18px;
  margin-bottom: 20px;
  background: var(--cream);
  border-bottom: 1px solid var(--latte);
}

.deck .icon-btn {
  height: 44px;
  width: 44px;
  border: 1px solid var(--tan);
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  color: var(--ink);
  transition: background 150ms ease, border-color 150ms ease;
}

.deck .map-btn {
  width: auto;
  padding: 0 14px;
  gap: 7px;
}

.deck .icon-btn:hover:not(:disabled) {
  border-color: #8bad9d;
  background: #f1f6f2;
  box-shadow: none;
  transform: none;
  filter: none;
}

.deck .icon-btn:disabled { box-shadow: none; opacity: .4; }
.deck .deck-expert { width: auto; padding: 0 12px; color: var(--espresso); }
.deck .deck-expert-label { font-size: 13px; font-weight: 600; }
.deck .deck-progress { height: 6px; background: #dfe8e1; }
.deck .deck-progress-fill { background: var(--espresso); }
.deck .deck-count { min-width: 48px; font-size: 12px; font-family: var(--mono); font-weight: 500; }

.deck .card {
  border: 1px solid var(--latte);
  border-radius: 18px;
  padding: 40px;
  box-shadow: 0 4px 18px rgba(23, 43, 42, .035);
}

.deck .card-kicker {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 9px;
  border-radius: 5px;
  background: #edf5ef;
  color: var(--espresso);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.deck .card-title {
  margin: 0 0 22px;
  color: var(--ink);
  font-size: clamp(25px, 3.5vw, 33px);
  font-weight: 500;
  letter-spacing: -.025em;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.deck .card-body {
  margin: 0 0 26px;
  color: #43564e;
  font-size: 17px;
  line-height: 1.85;
}

.deck .card-body b, .deck .card-body strong { color: var(--ink); font-weight: 600; }
.deck .card-table { margin-top: 24px; font-size: 14px; border-radius: 8px; box-shadow: none; }
.deck .card-table th { padding: 12px 14px; background: #eff4f0; color: #304a3e; font-weight: 600; }
.deck .card-table td { padding: 12px 14px; border-top-color: var(--latte); }
.deck .card-table tr:nth-child(even) td { background: #f8faf8; }
.deck .card-table-wrap { border: 1px solid var(--latte); border-radius: 9px; margin: 24px 0; }
.deck .card-table-wrap .card-table { margin: 0; }

.deck .formula-block {
  margin: 26px 0 14px;
  padding: 22px;
  border: 1px solid #dce7de;
  border-left: 3px solid var(--espresso);
  border-radius: 8px;
  background: #f2f7f2;
  color: #254e3c;
  font-size: 16px;
  font-weight: 500;
}

.deck .formula-example { font-size: 13px; line-height: 1.8; }
.deck .choices { gap: 12px; margin-top: 26px; }
.deck .choice {
  min-height: 64px;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid #dce5de;
  border-radius: 9px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  box-shadow: none;
}

.deck .choice > span:last-child { min-width: 0; overflow-wrap: break-word; }
.deck .choice-key { width: 28px; height: 28px; border-radius: 6px; background: #f0f4f0; font-family: var(--mono); font-size: 12px; font-weight: 500; }
.deck .choice:hover:not(:disabled) { border-color: #91b7a3; background: #f7faf7; transform: none; }
.deck .choice.selected { border-color: var(--espresso); background: #eef7f0; box-shadow: inset 0 0 0 1px var(--espresso); }
.deck .choice.selected .choice-key { background: var(--espresso); color: #fff; }
.deck .choice.correct { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.deck .choice.wrong { border-color: var(--red); background: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red); }
.deck .choice.locked:not(.correct):not(.wrong) { opacity: .65; }
.deck .explain { margin-top: 24px; padding: 20px; border-radius: 9px; font-size: 15px; line-height: 1.75; }
.deck .explain-head { margin-bottom: 8px; font-weight: 600; }
.deck .explain-right { color: #23523a; }
.deck .explain-wrong { color: #793a30; }

.deck .btn-primary {
  min-height: 50px;
  border: 1px solid var(--espresso);
  border-radius: 9px;
  background: var(--espresso);
  color: #fff;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  text-shadow: none;
}

.deck .btn-primary::after { content: none; }
.deck .btn-primary:hover:not(:disabled) { background: var(--espresso-deep); transform: none; box-shadow: none; filter: none; }
.deck .btn-primary:disabled { border-color: #dce5de; background: #e6ece7; color: #65786b; opacity: 1; cursor: not-allowed; }
.deck .btn-block { margin-top: 32px; }
.deck .btn-ghost { border: 1px solid var(--tan); border-radius: 9px; box-shadow: none; font-size: 14px; }
.deck .btn-row { flex-wrap: wrap; }
.deck .btn-row .btn { flex: 1 1 160px; }
.deck .recap-list { margin-top: 24px; }
.deck .recap-list li { padding: 14px 0; border-bottom-color: var(--latte); color: #43564e; font-size: 16px; line-height: 1.75; }

.deck .peek-banner { padding: 12px 14px; border: 1px solid #d8e5db; border-radius: 9px; background: #edf5ef; font-size: 13px; font-weight: 500; }
.deck .peek-nav-btn { width: 36px; height: 36px; border-radius: 7px; border: 1px solid var(--tan); box-shadow: none; }
.deck .review-pill { border-radius: 4px; background: #edf5ef; color: var(--espresso); font-size: 10px; font-weight: 500; }
.deck .pos-btn { min-height: 44px; border: 1px solid var(--tan); border-radius: 9px; background: #fff; box-shadow: none; }
.deck .redo-confirm { border: 1px solid var(--tan); border-radius: 10px; background: #eff5f0; }

.deck button:focus-visible,
.deck a:focus-visible {
  outline: 3px solid #367e65;
  outline-offset: 4px;
}

@media (max-width: 600px) {
  .view.deck { padding: 12px 16px 104px; }
  .deck .deck-top { padding: 10px 0 14px; margin-bottom: 16px; gap: 8px; }
  .deck .card { padding: 26px 22px; border-radius: 14px; }
  .deck .card-kicker { margin-bottom: 16px; }
  .deck .card-title { margin-bottom: 20px; font-size: 26px; }
  .deck .card-body { font-size: 16px; line-height: 1.8; }
  .deck .choice { padding: 13px; gap: 11px; font-size: 14px; }
  .deck .formula-block { padding: 16px; font-size: 14px; }
  .deck .btn-block { margin-top: 26px; }
  .deck .explain { padding: 16px; font-size: 14px; }
}

@media (max-width: 480px) {
  .deck .deck-expert { width: 44px; padding: 0; }
  .deck .map-btn { padding: 0 11px; }
}

@media (max-width: 360px) {
  .view.deck { padding-right: 12px; padding-left: 12px; }
  .deck .card { padding: 24px 18px; }
  .deck .deck-count { min-width: 40px; font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .deck .card, .deck .explain { animation: none; }
  .deck .deck-progress-fill { transition: none; }
}
