/* Fraction Wall — page-specific styles */

.wall { display: flex; flex-direction: column; gap: 0.35rem; }

.wall-row {
  display: grid;
  grid-template-columns: 2.6rem 1fr 3.1rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.2rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
}

/* Rows shaded to the same amount are ringed together — that is the lesson. */
.wall-row.is-equal { border-color: var(--color-sun); background: #fffbe8; }

.wall-label, .wall-amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.wall-amount { text-align: right; color: var(--color-orange); }

.wall-bar { display: flex; gap: 2px; }

.part {
  flex: 1 1 0;
  height: clamp(1.5rem, 5.5vw, 2.1rem);
  min-width: 0;
  padding: 0;
  border: 2px solid #e0d6c2;
  border-radius: 5px;
  background: #f7f1e4;
  cursor: pointer;
  transition: background 0.12s;
}

.part:hover { background: #efe6d3; }
.part:focus-visible { outline: 3px solid #7a5cd6; outline-offset: -3px; }
.part.is-on { background: var(--color-orange); border-color: #e08a2e; }

.readout {
  margin-top: 0.7rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(0.92rem, 3.8vw, 1.1rem);
  color: var(--color-text);
  min-height: 2.4em;
}

.question {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  color: var(--color-text);
  min-height: 1.3em;
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.choice {
  padding: 0.7rem 0.6rem;
  border: 2px solid #e8e2d8;
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  cursor: pointer;
}

.choice:hover:not(:disabled), .choice:focus-visible { border-color: var(--color-orange); outline: none; }
.choice:disabled { cursor: default; opacity: 0.75; }
.choice.is-right { background: #e8f8f0; border-color: #7ad0a8; color: #1c6b4e; opacity: 1; }
.choice.is-wrong { background: #ffe9e6; border-color: #ffb0a5; color: #b8352a; opacity: 1; }

.choose-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0.9rem 0 0.35rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }

.chip {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 2px solid #e8e2d8;
  background: var(--color-bg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  cursor: pointer;
}

.chip:hover, .chip:focus-visible { border-color: var(--color-orange); outline: none; }
.chip.is-on { background: var(--color-orange); border-color: var(--color-orange); color: #fff; }

@media (prefers-reduced-motion: reduce) { .part { transition: none; } }

/* Phones: the bars were 24px tall. Width is the fraction and cannot change; height can. */
@media (pointer: coarse) {
  .part { height: 2.4rem; }
}

@media (max-width: 480px) {
  .wall-row { grid-template-columns: 2.1rem 1fr 2.5rem; gap: 0.35rem; }
}
