/* /css/EmptyRectangleLesson.css
// ==========================================================
// Sudoku Paradise — Empty Rectangle Interactive 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;
}

.lesson-card {
  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.94);
  box-shadow: 0 8px 22px rgba(20, 55, 60, 0.1);
}

.lesson-card h2 {
  margin: 0 0 0.85rem;
  color: #0b6870;
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
  line-height: 1.25;
}

.lesson-card p,
.lesson-card li {
  line-height: 1.65;
}

.distinction {
  background: linear-gradient(145deg, #eef9f8, #ffffff);
}

.memory-rule,
.shape-caution {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-left: 4px solid #d39a1f;
  background: rgba(255, 246, 216, 0.8);
  color: #174f55;
}

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

.shape-gallery article {
  padding: 1rem;
  border: 1px solid rgba(11, 104, 112, 0.22);
  border-radius: 11px;
  background: #f7fbfb;
  text-align: center;
}

.shape-gallery h3 {
  margin: 0 0 0.75rem;
  color: #174f55;
}

.shape-gallery p {
  margin-bottom: 0;
  font-size: 0.92rem;
}

.shape-box,
.mini-candidate-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 126px;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 3px solid #536367;
  background: #ffffff;
}

.shape-box span,
.mini-candidate-box span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 1px solid #bac5c6;
}

.shape-box .intersection {
  color: #174f55;
  font-weight: 900;
}

.shape-t span:nth-child(1),
.shape-t span:nth-child(4),
.shape-t span:nth-child(5),
.shape-t span:nth-child(6),
.shape-t span:nth-child(7),
.shape-l span:nth-child(1),
.shape-l span:nth-child(4),
.shape-l span:nth-child(7),
.shape-l span:nth-child(8),
.shape-l span:nth-child(9),
.shape-plus span:nth-child(2),
.shape-plus span:nth-child(4),
.shape-plus span:nth-child(5),
.shape-plus span:nth-child(6),
.shape-plus span:nth-child(8) {
  background: #cfe8d0;
}

.case-layout {
  display: grid;
  grid-template-columns: minmax(260px, 350px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
}

.case-layout figure {
  margin: 0;
  text-align: center;
}

.case-layout img {
  display: block;
  width: 100%;
  height: auto;
  border: 3px solid #566164;
  background: #ffffff;
}

.case-layout figcaption {
  margin-top: 0.55rem;
  color: #547074;
  font-size: 0.88rem;
}

.case-explanation h3,
.two-road-proof h3,
.recognition-card h3 {
  margin-top: 0;
  color: #174f55;
}

.case-explanation ol {
  padding-left: 1.25rem;
}

code {
  color: #075f68;
  font-weight: 800;
}

.proof-workbench {
  background: linear-gradient(145deg, #f3fbfa, #ffffff);
}

.proof-buttons,
.recognition-actions,
.cta-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.proof-buttons button,
.recognition-actions button,
.cta-links a {
  padding: 0.68rem 0.9rem;
  border: 1px solid #0b6870;
  border-radius: 7px;
  background: #ffffff;
  color: #075f68;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.proof-buttons button:hover,
.proof-buttons button:focus-visible,
.recognition-actions button:hover,
.recognition-actions button:focus-visible,
.cta-links a:hover,
.cta-links a:focus-visible {
  background: #e7f5f4;
}

.proof-buttons button.is-tested,
.recognition-actions button.is-correct {
  border-color: #23864c;
  background: #dff4e5;
  color: #185f38;
}

.recognition-actions button.is-wrong {
  border-color: #b94742;
  background: #fbe0df;
  color: #932e29;
}

.proof-result {
  min-height: 5.4rem;
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 9px;
  background: #eef5f5;
  line-height: 1.6;
}

.proof-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.proof-progress span {
  padding: 0.38rem 0.65rem;
  border-radius: 999px;
  background: #e8eeee;
  color: #547074;
  font-size: 0.86rem;
  font-weight: 750;
}

.proof-progress span.is-complete {
  background: #dff4e5;
  color: #185f38;
}

.proof-conclusion {
  padding: 0.85rem 1rem;
  border-left: 4px solid #b94742;
  background: #fdebea;
  color: #762824;
}

.two-road-proof {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.two-road-proof article {
  padding: 1rem;
  border: 1px solid rgba(11, 104, 112, 0.22);
  border-radius: 11px;
  background: #f7fbfb;
}

.two-road-proof p {
  margin-bottom: 0;
}

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

.recognition-card {
  padding: 1rem;
  border: 1px solid rgba(11, 104, 112, 0.22);
  border-radius: 11px;
  background: #f7fbfb;
}

.recognition-card p {
  margin-bottom: 0.75rem;
}

.mini-candidate-box {
  width: 144px;
  margin-bottom: 0.9rem;
}

.mini-candidate-box .has-seven {
  background: #cfe8d0;
  color: #176f3e;
  font-size: 1.05rem;
  font-weight: 900;
}

.recognition-feedback {
  min-height: 3.2rem;
  margin: 0.7rem 0 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.recognition-feedback.success {
  color: #185f38;
}

.recognition-feedback.error {
  color: #932e29;
}

.recognition-score {
  margin-bottom: 0;
  color: #0b6870;
  font-weight: 850;
  text-align: right;
}

.near-misses ul {
  padding-left: 1.25rem;
}

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

.lesson-faq summary {
  color: #174f55;
  font-weight: 800;
  cursor: pointer;
}

.lesson-faq details p {
  margin-bottom: 0;
}

.lesson-cta {
  background: linear-gradient(145deg, #eef9f8, #ffffff);
}

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

.lesson-page-footer {
  padding: 1rem;
  color: #547074;
  text-align: center;
}

@media (max-width: 760px) {
  .shape-gallery,
  .case-layout,
  .two-road-proof,
  .recognition-grid {
    grid-template-columns: 1fr;
  }

  .case-layout figure {
    width: min(100%, 350px);
    margin: 0 auto;
  }

  .lesson-page-header {
    padding-left: 6rem;
  }
}

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

  .lesson-card {
    padding: 1rem;
  }

  .proof-buttons button,
  .recognition-actions button,
  .cta-links a {
    width: 100%;
    text-align: center;
  }
}
