/* /css/SudokuSetsLesson.css
// ==========================================================
// Sudoku Paradise — Pairs, Triples, and Quads Lesson
// ========================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: #243b3e;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lesson-page-header {
  display: flex;
  justify-content: center;
  padding: 1.1rem 5rem 0.4rem;
}

.lesson-brand {
  color: #0b6870;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.lesson-page-main {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.7rem 0 2.5rem;
}

.lesson-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  max-width: 920px;
  margin: 0 auto 1rem;
  color: #547074;
  font-size: 0.84rem;
}

.lesson-breadcrumbs a,
.lesson-page-footer a {
  color: #0b6870;
  font-weight: 700;
}

.lesson-hero {
  max-width: 920px;
  margin: 0 auto 1.4rem;
  text-align: center;
}

.lesson-eyebrow,
.section-kicker {
  margin: 0 0 0.4rem;
  color: #0b6870;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.lesson-hero h1 {
  margin: 0;
  color: #174f55;
  font-size: clamp(2rem, 6vw, 3.35rem);
  line-height: 1.08;
}

.lesson-lead {
  max-width: 820px;
  margin: 1rem auto 0;
  font-size: clamp(1.03rem, 2.4vw, 1.18rem);
  line-height: 1.68;
}

.plain-rule,
.two-views,
.hidden-pair-focus,
.practice-workbench,
.reveals-section,
.scan-story,
.comparison-section,
.near-miss-section,
.advanced-bridge,
.lesson-faq,
.lesson-cta {
  max-width: 920px;
  margin: 1.3rem auto;
  padding: clamp(1.15rem, 4vw, 1.8rem);
  border: 1px solid rgba(11, 104, 112, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 8px 22px rgba(20, 55, 60, 0.1);
}

.plain-rule h2,
.two-views h2,
.hidden-pair-focus h2,
.practice-workbench h2,
.reveals-section h2,
.scan-story h2,
.comparison-section h2,
.near-miss-section h2,
.advanced-bridge h2,
.lesson-faq h2,
.lesson-cta h2 {
  margin: 0 0 0.85rem;
  color: #0b6870;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  line-height: 1.25;
}

.plain-rule p,
.view-card p,
.hidden-pair-focus li,
.search-tip,
.reveals-section p,
.scan-story p,
.scan-story li,
.near-miss-section > p,
.advanced-bridge p,
.lesson-faq p,
.lesson-cta p {
  line-height: 1.65;
}

.plain-rule > p {
  margin: 0.55rem 0;
}

.memory-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.memory-strip span {
  padding: 0.75rem;
  border-left: 4px solid #0b6870;
  border-radius: 5px;
  background: rgba(232, 247, 245, 0.85);
  line-height: 1.45;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.view-card {
  padding: 1.1rem;
  border: 1px solid rgba(11, 104, 112, 0.24);
  border-radius: 12px;
}

.naked-card {
  background: rgba(239, 249, 248, 0.82);
}

.hidden-card {
  background: rgba(255, 246, 216, 0.76);
}

.view-label {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #0b6870;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hidden-card .view-label {
  background: #a46900;
}

.view-card h3 {
  margin: 0.75rem 0 0.35rem;
  color: #174f55;
  font-size: 1.15rem;
}

.view-card p {
  margin: 0.45rem 0;
}

.view-note {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(11, 104, 112, 0.17);
  color: #486467;
  font-size: 0.9rem;
}

.hidden-pair-focus {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.65fr);
  align-items: center;
  gap: 1.2rem;
}

.hidden-pair-focus ol {
  margin: 0.7rem 0 0;
  padding-left: 1.35rem;
}

.hidden-pair-focus li + li {
  margin-top: 0.4rem;
}

.search-tip {
  margin: 0;
  padding: 1rem;
  border-left: 4px solid #d39a1f;
  border-radius: 6px;
  background: rgba(255, 246, 216, 0.78);
}

.workbench-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

#nextExerciseButton,
.practice-actions button,
.classification-choices button {
  appearance: none;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

#nextExerciseButton {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(11, 104, 112, 0.38);
  background: #ffffff;
  color: #0b6870;
}

.exercise-title {
  margin: 0.35rem 0;
  color: #174f55;
  font-size: 1.12rem;
}

.exercise-prompt,
.practice-instruction {
  margin: 0.4rem 0;
  line-height: 1.55;
}

.practice-instruction {
  color: #486467;
  font-size: 0.9rem;
  text-align: center;
}

.house-wrap {
  max-width: 49rem;
  margin: 1rem auto;
}

.house-label {
  margin: 0 0 0.45rem;
  color: #174f55;
  font-size: 0.86rem;
  font-weight: 800;
  text-align: center;
}

.candidate-house {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  border: 3px solid #526467;
  background: #ffffff;
}

.house-cell {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  aspect-ratio: 1;
  min-width: 0;
  border-right: 1px solid #aeb9ba;
  background: rgba(255, 255, 255, 0.98);
}

.house-cell:nth-child(3n) {
  border-right: 2px solid #526467;
}

.house-cell:last-child {
  border-right: 0;
}

.house-cell.is-set-cell {
  background: rgba(255, 246, 216, 0.64);
  box-shadow: inset 0 0 0 3px rgba(211, 154, 31, 0.72);
}

.candidate-button,
.candidate-blank {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(0.62rem, 2vw, 0.92rem);
  line-height: 1;
}

button.candidate-button {
  color: #315b60;
  cursor: pointer;
}

.candidate-button.is-set-digit {
  color: #075a62;
  font-weight: 900;
}

.candidate-button:hover,
.candidate-button:focus-visible {
  z-index: 2;
  background: #edf9f7;
  outline: 2px solid #0b6870;
  outline-offset: -2px;
}

.candidate-button.is-selected {
  background: #dff4f1;
  box-shadow: inset 0 0 0 2px #0b6870;
}

.candidate-button.is-correct {
  background: #d9f2dd;
  color: #1f6d31;
  box-shadow: inset 0 0 0 2px #27813a;
}

.candidate-button.is-missed {
  background: #fff0bc;
  color: #8b5e00;
  box-shadow: inset 0 0 0 2px #c48a0b;
}

.candidate-button.is-wrong {
  background: #f8d9d9;
  color: #8f2828;
  box-shadow: inset 0 0 0 2px #a93434;
}

.practice-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: 49rem;
  margin: 0.75rem auto;
  color: #486467;
  font-size: 0.88rem;
}

.practice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
}

.practice-actions button {
  min-height: 42px;
  padding: 0.6rem 0.85rem;
  border: 1px solid rgba(11, 104, 112, 0.38);
  background: #ffffff;
  color: #0b6870;
}

.practice-actions .primary-action {
  border-color: #0b6870;
  background: #0b6870;
  color: #ffffff;
}

.practice-actions button:hover,
.practice-actions button:focus-visible,
#nextExerciseButton:hover,
#nextExerciseButton:focus-visible {
  border-color: #084f56;
  outline: 2px solid rgba(11, 104, 112, 0.22);
}

.practice-result {
  max-width: 44rem;
  min-height: 3.2rem;
  margin: 1rem auto 0;
  padding: 0.8rem 1rem;
  border-left: 4px solid #0b6870;
  background: rgba(231, 247, 244, 0.82);
  line-height: 1.55;
}

.practice-result.is-success,
.classification-result.is-success {
  border-color: #27813a;
  background: rgba(224, 246, 227, 0.86);
}

.practice-result.is-error,
.classification-result.is-error {
  border-color: #a93434;
  background: rgba(250, 226, 226, 0.86);
}

.practice-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem 1rem;
  margin-top: 0.85rem;
  color: #486467;
  font-size: 0.8rem;
}

.practice-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.legend-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid rgba(20, 55, 60, 0.28);
  border-radius: 3px;
}

.legend-swatch.set-digit { background: #fff0bc; }
.legend-swatch.selected { background: #dff4f1; }
.legend-swatch.correct { background: #d9f2dd; }
.legend-swatch.missed { background: #fff0bc; }
.legend-swatch.wrong { background: #f8d9d9; }

.reveals-section {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 1.4rem;
}

.reveals-copy p {
  margin: 0.55rem 0;
}

.reveal-steps {
  margin: 0.85rem 0;
  padding-left: 1.35rem;
}

.reveal-steps li {
  line-height: 1.58;
}

.reveal-steps li + li {
  margin-top: 0.55rem;
}

.proof-warning {
  margin-top: 1rem !important;
  padding: 0.8rem 1rem;
  border-left: 4px solid #d39a1f;
  background: rgba(255, 246, 216, 0.72);
}

.real-example-slot {
  margin: 0;
  min-height: 230px;
  padding: 1.25rem;
  border: 2px dashed rgba(11, 104, 112, 0.42);
  border-radius: 12px;
  background: rgba(239, 249, 248, 0.72);
  color: #486467;
  text-align: center;
}

.real-example-slot img {
  display: block;
  width: min(100%, 430px);
  height: auto;
  margin: 0 auto;
  border: 2px solid #526467;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(20, 55, 60, 0.14);
}

.real-example-slot figcaption {
  margin-top: 0.65rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

.real-example-label {
  color: #0b6870;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.scan-steps {
  margin: 1rem 0;
  padding-left: 1.35rem;
}

.scan-steps li + li {
  margin-top: 0.65rem;
}

.rectangle-preview {
  margin-top: 1.2rem;
  padding: 1.1rem;
  border: 1px solid rgba(100, 69, 154, 0.3);
  border-left: 5px solid #67459a;
  border-radius: 10px;
  background: rgba(245, 240, 252, 0.78);
}

.rectangle-preview h3 {
  margin: 0 0 0.65rem;
  color: #54357f;
  font-size: clamp(1.12rem, 3vw, 1.35rem);
  line-height: 1.3;
}

.rectangle-layout {
  display: grid;
  grid-template-columns: minmax(250px, 329px) minmax(0, 1fr);
  align-items: center;
  gap: 1.1rem;
}

.rectangle-figure {
  margin: 0;
  color: #5e5570;
  text-align: center;
}

.rectangle-figure img {
  display: block;
  width: min(100%, 329px);
  height: auto;
  margin: 0 auto;
  border: 2px solid #675b75;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(46, 31, 67, 0.15);
}

.rectangle-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  line-height: 1.45;
}

.rectangle-preview p {
  margin: 0.55rem 0;
}

.rectangle-caution {
  padding: 0.75rem 0.9rem;
  border-left: 4px solid #d39a1f;
  background: rgba(255, 249, 230, 0.9);
}

.scan-total {
  margin: 1rem 0 0 !important;
  padding: 0.8rem 1rem;
  border-left: 4px solid #0b6870;
  background: rgba(232, 247, 245, 0.85);
  color: #174f55;
}

.comparison-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border: 1px solid rgba(11, 104, 112, 0.22);
  border-radius: 10px;
}

.comparison-section table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  background: #ffffff;
  font-size: 0.92rem;
}

.comparison-section th,
.comparison-section td {
  padding: 0.78rem;
  border-right: 1px solid rgba(11, 104, 112, 0.14);
  border-bottom: 1px solid rgba(11, 104, 112, 0.14);
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.comparison-section th:last-child,
.comparison-section td:last-child {
  border-right: 0;
}

.comparison-section tbody tr:last-child th,
.comparison-section tbody tr:last-child td {
  border-bottom: 0;
}

.comparison-section thead th {
  background: #0b6870;
  color: #ffffff;
}

.comparison-section tbody th {
  background: rgba(232, 247, 245, 0.78);
  color: #174f55;
}

code {
  padding: 0.08rem 0.25rem;
  border-radius: 4px;
  background: rgba(11, 104, 112, 0.09);
  color: #174f55;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
}

.classification-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.classification-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid rgba(11, 104, 112, 0.2);
  border-radius: 10px;
  background: rgba(246, 251, 250, 0.86);
}

.classification-card h3 {
  margin: 0;
  color: #174f55;
  font-size: 1.05rem;
}

.classification-card > p {
  line-height: 1.55;
}

.classification-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: auto;
}

.classification-choices button {
  min-height: 39px;
  padding: 0.45rem;
  border: 1px solid rgba(11, 104, 112, 0.32);
  background: #ffffff;
  color: #174f55;
}

.classification-choices button:hover,
.classification-choices button:focus-visible {
  border-color: #0b6870;
  outline: 2px solid rgba(11, 104, 112, 0.2);
}

.classification-choices button.is-correct {
  border-color: #27813a;
  background: #d9f2dd;
  color: #1f6d31;
}

.classification-choices button.is-wrong {
  border-color: #a93434;
  background: #f8d9d9;
  color: #8f2828;
}

.classification-result {
  min-height: 2.4rem;
  margin: 0.7rem 0 0 !important;
  padding: 0.45rem 0.6rem;
  border-left: 3px solid #0b6870;
  background: rgba(231, 247, 244, 0.7);
  font-size: 0.88rem;
}

.classification-explanation {
  margin-bottom: 0 !important;
  color: #486467;
  font-size: 0.88rem;
}

.advanced-bridge {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  border-color: rgba(211, 154, 31, 0.46);
  background: linear-gradient(145deg, rgba(255, 249, 230, 0.96), rgba(255, 255, 255, 0.96));
}

.advanced-number {
  display: flex;
  flex: 0 0 4.2rem;
  align-items: center;
  justify-content: center;
  min-height: 4.2rem;
  padding: 0.4rem;
  border-radius: 50%;
  background: #d39a1f;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 850;
}

.lesson-faq details {
  padding: 0.8rem 0;
  border-top: 1px solid rgba(11, 104, 112, 0.17);
}

.lesson-faq details:last-child {
  border-bottom: 1px solid rgba(11, 104, 112, 0.17);
}

.lesson-faq summary {
  color: #174f55;
  cursor: pointer;
  font-weight: 750;
  line-height: 1.45;
}

.lesson-faq details p {
  margin: 0.65rem 0 0.1rem;
}

.lesson-cta {
  text-align: center;
}

.lesson-cta > p {
  max-width: 720px;
  margin-right: auto;
  margin-left: auto;
}

.cta-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.cta-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 0.95rem;
  border: 1px solid rgba(11, 104, 112, 0.42);
  border-radius: 9px;
  background: #ffffff;
  color: #0b6870;
  font-weight: 750;
  text-decoration: none;
}

.cta-links .cta-primary {
  border-color: #0b6870;
  background: #0b6870;
  color: #ffffff;
}

.lesson-page-footer {
  padding: 1rem;
  color: #486467;
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 780px) {
  .lesson-page-header {
    padding-top: 3.6rem;
  }

  .view-grid,
  .hidden-pair-focus,
  .reveals-section,
  .rectangle-layout,
  .classification-list {
    grid-template-columns: 1fr;
  }

  .memory-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .lesson-page-main {
    width: min(100% - 1rem, 1040px);
  }

  .workbench-heading,
  .advanced-bridge {
    flex-direction: column;
  }

  .candidate-house {
    overflow-x: auto;
  }

  .house-cell {
    min-width: 3.15rem;
  }

  .practice-actions button {
    flex: 1 1 calc(50% - 0.6rem);
  }

  .classification-choices {
    grid-template-columns: 1fr;
  }
}

@media print {
  .site-menu-button,
  .site-drawer,
  .site-drawer-backdrop,
  .lesson-page-header,
  .lesson-breadcrumbs,
  .practice-workbench,
  .near-miss-section,
  .lesson-cta,
  .lesson-page-footer {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #111111;
  }

  .lesson-page-main {
    width: 100%;
    padding: 0;
  }

  .plain-rule,
  .two-views,
  .hidden-pair-focus,
  .reveals-section,
  .scan-story,
  .comparison-section,
  .advanced-bridge,
  .lesson-faq {
    break-inside: avoid;
    border-color: #8a8a8a;
    box-shadow: none;
  }
}
