/* /css/SnyderPractice.css
// ==========================================================
// Sudoku Paradise — Snyder Notation Practice Page
// ========================================================== */

*,
*::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;
}

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

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

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

.practice-hero {
  max-width: 800px;
  margin: 0 auto 1.35rem;
  text-align: center;
}

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

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

.practice-lead {
  max-width: 730px;
  margin: 1rem auto 0;
  font-size: 1.08rem;
  line-height: 1.65;
}

.snyder-rule,
.practice-workbench,
.lesson-copy,
.practice-faq,
.practice-cta {
  margin: 1.25rem auto;
  padding: clamp(1.1rem, 4vw, 1.75rem);
  border: 1px solid rgba(11, 104, 112, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 22px rgba(20, 55, 60, 0.1);
}

.snyder-rule {
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  max-width: 820px;
}

.rule-badge {
  display: flex;
  flex: 0 0 3rem;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #0b6870;
  color: #ffffff;
  font-size: 1.45rem;
  font-weight: 850;
}

.snyder-rule h2,
.practice-workbench h2,
.lesson-copy h2,
.practice-faq h2,
.practice-cta h2 {
  margin: 0 0 0.7rem;
  color: #0b6870;
  font-size: 1.4rem;
}

.snyder-rule p,
.lesson-copy p,
.practice-faq p,
.practice-cta p {
  line-height: 1.65;
}

.snyder-rule p {
  margin: 0.4rem 0;
}

.rule-warning {
  padding: 0.65rem 0.8rem;
  border-left: 4px solid #d39a1f;
  background: rgba(255, 244, 208, 0.72);
}

.practice-workbench {
  max-width: 820px;
}

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

#newPositionButton,
.practice-actions button,
.digit-buttons button {
  appearance: none;
  margin: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
}

#newPositionButton {
  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;
}

.practice-prompt {
  margin: 0 0 1rem;
  color: #486467;
  line-height: 1.5;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  width: min(100%, 33rem);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 3px solid #34494c;
  background: #ffffff;
}

.practice-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-right: 1px solid #aeb9ba;
  border-bottom: 1px solid #aeb9ba;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.97);
  color: #142e31;
  font-family: inherit;
  font-size: clamp(1rem, 4.4vw, 1.6rem);
  line-height: 1;
}

button.practice-cell {
  cursor: pointer;
}

.practice-cell:nth-child(9n) {
  border-right: 0;
}

.practice-cell:nth-child(n + 73) {
  border-bottom: 0;
}

.practice-cell:nth-child(9n + 3),
.practice-cell:nth-child(9n + 6) {
  border-right: 2px solid #526467;
}

.practice-cell:nth-child(n + 19):nth-child(-n + 27),
.practice-cell:nth-child(n + 46):nth-child(-n + 54) {
  border-bottom: 2px solid #526467;
}

.practice-cell.is-given {
  background: rgba(238, 244, 244, 0.94);
  font-weight: 800;
}

button.practice-cell:hover,
button.practice-cell:focus-visible {
  z-index: 2;
  background: #e4f5f2;
  outline: 3px solid #0b6870;
  outline-offset: -3px;
}

.candidate-mark {
  display: none;
  position: absolute;
  top: 8%;
  left: 12%;
  color: #0b6870;
  font-size: clamp(0.72rem, 2.2vw, 1rem);
  font-weight: 850;
  line-height: 1;
}

.practice-cell.is-marked .candidate-mark,
.practice-cell.is-correct .candidate-mark,
.practice-cell.is-missed .candidate-mark,
.practice-cell.is-wrong .candidate-mark {
  display: block;
}

.practice-cell.is-marked {
  background: #dff4f1;
}

.practice-cell.is-correct {
  background: #d9f2dd;
  box-shadow: inset 0 0 0 3px #27813a;
}

.practice-cell.is-missed {
  background: #fff0bc;
  box-shadow: inset 0 0 0 3px #c48a0b;
}

.practice-cell.is-wrong {
  background: #f8d9d9;
  box-shadow: inset 0 0 0 3px #a93434;
}

.digit-chooser {
  max-width: 33rem;
  margin: 1rem auto 0;
}

.digit-chooser p {
  margin: 0 0 0.45rem;
  color: #405d60;
  font-size: 0.9rem;
  font-weight: 750;
}

.digit-buttons {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 0.35rem;
}

.digit-buttons button {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(11, 104, 112, 0.35);
  background: #ffffff;
  color: #174f55;
  font-size: 1rem;
}

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

.digit-buttons button[aria-pressed="true"] {
  border-color: #0b6870;
  background: #0b6870;
  color: #ffffff;
}

.digit-buttons button.is-mastered::after {
  content: "✓";
  position: absolute;
  transform: translate(0.15rem, -0.4rem);
  color: #27813a;
  font-size: 0.7rem;
}

.practice-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  max-width: 33rem;
  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 {
  border-color: #084f56;
  outline: 2px solid rgba(11, 104, 112, 0.22);
}

.practice-actions .primary-action:hover,
.practice-actions .primary-action:focus-visible {
  background: #084f56;
}

.practice-result {
  max-width: 40rem;
  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 {
  border-color: #27813a;
  background: rgba(224, 246, 227, 0.86);
}

.practice-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-mark {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid rgba(20, 55, 60, 0.28);
  border-radius: 3px;
}

.legend-mark.chosen {
  background: #dff4f1;
}

.legend-mark.correct {
  background: #d9f2dd;
}

.legend-mark.missed {
  background: #fff0bc;
}

.legend-mark.wrong {
  background: #f8d9d9;
}

.lesson-copy,
.practice-faq,
.practice-cta {
  max-width: 820px;
}

.lesson-copy h2:not(:first-child) {
  margin-top: 1.5rem;
}

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

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

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

.practice-faq details p {
  margin-bottom: 0.2rem;
}

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

.practice-cta a {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.7rem 1rem;
  border-radius: 9px;
  background: #0b6870;
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
}

.practice-cta a:hover,
.practice-cta a:focus-visible {
  background: #084f56;
}

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

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

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

  .snyder-rule,
  .workbench-heading {
    flex-direction: column;
  }

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