/* /css/ALSXZLesson.css
// ==========================================================
// Sudoku Paradise — ALS-XZ Interactive Lesson
// ----------------------------------------------------------
// Extends XYChainLesson.css with ALS arithmetic, X/Z roles,
// responsive Z sightlines, and a guided set-based proof.
// ========================================================== */

.als-equation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(11, 104, 112, 0.24);
  border-radius: 11px;
  background: #eef5f5;
}

.als-equation span {
  display: inline-flex;
  min-width: 7.5rem;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem;
  border: 2px solid #42975c;
  border-radius: 10px;
  background: #edf8ef;
  color: #174f55;
}

.als-equation span strong {
  font-size: 1.65rem;
}

.als-equation span small {
  color: #547074;
  font-weight: 800;
}

.als-equation b {
  color: #0b6870;
  font-size: 1.45rem;
}

.als-equation .als-result {
  border-color: #b7891f;
  background: #fff7d9;
}

.bvc-als-bridge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(37, 136, 163, 0.45);
  border-radius: 11px;
  background: #eef8fa;
}

.bvc-als-bridge h3 {
  margin: 0 0 0.4rem;
  color: #174f55;
}

.bvc-als-bridge p:last-child {
  margin-bottom: 0;
}

.bvc-als-cell {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  justify-content: center;
  width: 6.8rem;
  height: 6.8rem;
  border: 3px solid #2588a3;
  border-radius: 9px;
  background: linear-gradient(135deg, #e3f2f6 0 50%, #edf8ef 50%);
}

.bvc-als-cell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: #17637a;
  font-size: 1.1rem;
  font-weight: 950;
}

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

.xz-role-grid article {
  min-width: 0;
  padding: 1rem;
  border: 2px solid transparent;
  border-radius: 11px;
}

.xz-role-grid h3 {
  margin: 0 0 0.45rem;
  color: #174f55;
  font-size: 1.05rem;
}

.xz-role-grid p:last-child {
  margin-bottom: 0;
}

.role-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 0 0.55rem;
  border-radius: 50%;
  font-size: 1.15rem;
  font-weight: 950;
}

.x-role-card {
  border-color: #2588a3 !important;
  background: #eef8fa;
}

.x-role-card .role-symbol {
  background: #d8edf5;
  color: #17637a;
}

.z-role-card {
  border-color: #42975c !important;
  background: #edf8ef;
}

.z-role-card .role-symbol {
  background: #dff4e5;
  color: #185f38;
}

.victim-role-card {
  border-color: #b94742 !important;
  background: #fdebea;
}

.victim-role-card .role-symbol {
  background: #f6d0ce;
  color: #8d2b27;
}

.als-natural-figure {
  margin-top: 1.2rem;
}

.als-natural-figure img {
  width: 100%;
  max-width: none;
  border: 0;
}

.als-board-wrap {
  position: relative;
  display: block;
  width: min(100%, 328px);
  margin: 0 auto;
  border: 3px solid #566164;
  background: #ffffff;
  line-height: 0;
}

.als-sightline-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.als-sightline-overlay.is-visible {
  opacity: 1;
}

.sightline-halo {
  fill: none;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
}

.sightline-core {
  fill: #ffffff;
  stroke: #b94742;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.illustration-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 1rem;
  margin-top: 0.9rem;
  color: #405d61;
  font-size: 0.9rem;
  font-weight: 750;
}

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

.legend-swatch {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 1px solid rgba(35, 59, 62, 0.48);
  border-radius: 3px;
}

.legend-swatch.als-a {
  border-color: #42975c;
  background: #abd4ab;
}

.legend-swatch.als-b {
  border-color: #b7891f;
  background: #ead68c;
}

.legend-swatch.als-x {
  border-color: #2588a3;
  background: #abc7e9;
}

.legend-swatch.als-victim {
  border-color: #b94742;
  background: #e9abab;
}

.sightline-control {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.85rem;
  border-radius: 9px;
  background: #eef5f5;
}

.sightline-control button {
  padding: 0.68rem 0.9rem;
  border: 1px solid #b94742;
  border-radius: 7px;
  background: #ffffff;
  color: #8d2b27;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.sightline-control button:hover,
.sightline-control button:focus-visible,
.sightline-control button[aria-pressed="true"] {
  background: #fdebea;
}

.sightline-control p {
  flex: 1 1 300px;
  margin: 0;
  color: #405d61;
  font-size: 0.92rem;
  font-weight: 700;
}

.als-inventory-table tbody tr {
  transition: background 160ms ease, box-shadow 160ms ease;
}

.als-inventory-table tr.is-highlighted {
  background: #fff7d9;
  box-shadow: inset 4px 0 0 #d39a1f;
}

.als-inventory-table tr.is-confirmed {
  background: #edf8ef;
}

.als-proof-steps li {
  border-left: 3px solid transparent;
}

.als-proof-steps li.is-current {
  border-left-color: #d39a1f;
}

.als-proof-steps li.is-complete {
  text-decoration: none;
}

.proof-road-grid article.is-tested {
  border-color: #23864c;
  background: #dff4e5;
}

.contradiction-card {
  background: linear-gradient(145deg, #fff7f6, #ffffff);
}

.contradiction-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(185, 71, 66, 0.3);
  border-radius: 11px;
  background: #fffafa;
}

.contradiction-flow span {
  display: inline-flex;
  min-width: 9rem;
  flex-direction: column;
  align-items: center;
  padding: 0.7rem;
  border: 1px solid rgba(11, 104, 112, 0.25);
  border-radius: 9px;
  background: #ffffff;
  color: #174f55;
  font-weight: 850;
  text-align: center;
}

.contradiction-flow span small {
  margin-top: 0.2rem;
  color: #65797c;
  font-size: 0.72rem;
  font-weight: 750;
}

.contradiction-flow b {
  color: #8d2b27;
  font-size: 1.3rem;
}

.contradiction-flow .contradiction-end {
  border-color: #b94742;
  background: #fdebea;
  color: #8d2b27;
}

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

.audit-checklist h3 {
  margin: 0 0 0.55rem;
  color: #174f55;
}

.audit-checklist ul {
  margin-bottom: 0;
  padding-left: 1.25rem;
}

.audit-checklist li::marker {
  color: #0b6870;
}

@media (max-width: 800px) {
  .xz-role-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .bvc-als-bridge {
    grid-template-columns: 1fr;
  }

  .bvc-als-cell {
    margin: 0 auto;
  }

  .als-equation,
  .contradiction-flow {
    flex-direction: column;
  }

  .als-equation b,
  .contradiction-flow b {
    transform: rotate(90deg);
  }

  .als-inventory-table {
    min-width: 720px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .als-sightline-overlay,
  .als-inventory-table tbody tr {
    transition: none;
  }
}
