/* Backoff — a Logical Art nibble.
 *
 * The subject is a row of slots, so the page is a row of slots. Each cell is
 * one turn on the wire and is one of three things: empty, ruined, or carrying
 * a frame. Nothing else on the page is coloured, because nothing else is a
 * measurement.
 *
 * Three colours, and the assignment is the argument. A collision is the
 * machine's accent, because a collision is the event this page exists to
 * explain and not an error. A delivered frame is the studio ink. An idle slot
 * is a hairline, because an empty wire is the cost nobody notices.
 */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--la-font-ui);
  background: var(--la-page);
  color: var(--la-ink);
  line-height: var(--la-leading-body);
  -webkit-font-smoothing: antialiased;
}

main.nibble {
  max-width: var(--la-measure);
  margin: 0 auto;
  padding: 3rem 1.25rem 3rem;
}

main.nibble p, main.nibble ul, main.nibble ol, main.nibble dl,
main.nibble h1, main.nibble h2 { max-width: none; }

/* Read but not seen. [hidden] is restated because any selector carrying a
   display value outranks the user-agent rule for the attribute, which has
   shipped broken in this family three times. */
.bo-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.bo-sr[hidden] { display: none; }


/* ---- the wire ----------------------------------------------------------- */
.bo-wire {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: var(--la-space-3);
  background: var(--la-sunken);
  border: 1px solid var(--la-hairline);
  border-radius: var(--la-radius-sm);
}

.bo-slot {
  width: 0.55rem;
  height: 1.6rem;
  border-radius: 1px;
  background: var(--la-hairline);
}
.bo-slot.is-hit { background: var(--accent); }
.bo-slot.is-sent { background: var(--la-ink); }

.bo-more {
  align-self: center;
  margin-left: var(--la-space-2);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm);
  color: var(--la-ink-dim);
}

/* ---- what it measured ---------------------------------------------------- */
.bo-readout {
  display: flex;
  flex-wrap: wrap;
  gap: var(--la-space-2);
  margin-top: var(--la-space-3);
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm);
}

.bo-reg {
  padding: 0.2rem 0.55rem;
  background: var(--la-sunken);
  border: 1px solid var(--la-hairline);
  border-radius: var(--la-radius-sm);
  color: var(--la-ink);
  white-space: nowrap;
}

.bo-verdictline {
  margin-top: var(--la-space-3);
  padding-left: var(--la-space-3);
  border-left: 3px solid var(--la-hairline-strong);
  color: var(--la-ink);
}
.bo-verdictline.is-good { border-left-color: var(--la-ink); }
.bo-verdictline.is-bad { border-left-color: var(--accent); }

/* ---- the knobs ----------------------------------------------------------- */
.bo-controls {
  display: grid;
  gap: var(--la-space-4);
  margin-top: var(--la-space-4);
}

.bo-knob {
  display: grid;
  gap: var(--la-space-1);
}

.bo-knob label {
  font-size: var(--la-text-sm);
  color: var(--la-ink-dim);
}

.bo-range { width: 100%; min-height: 1.75rem; accent-color: var(--accent); }

.bo-out {
  font-family: var(--la-font-mono);
  font-size: var(--la-text-sm);
  color: var(--la-ink);
}

.bo-policies {
  display: grid;
  gap: var(--la-space-1);
  padding: var(--la-space-3);
  border: 1px solid var(--la-hairline);
  border-radius: var(--la-radius-sm);
}

.bo-policies legend {
  padding: 0 0.4rem;
  font-size: var(--la-text-sm);
  color: var(--la-ink-dim);
}

/* The row is the target, not the dot, so the 24px minimum is met by something
   a finger can actually find. */
.bo-radio {
  display: flex;
  align-items: center;
  gap: var(--la-space-2);
  min-height: 2.25rem;
  padding: 0 0.3rem;
  border-radius: var(--la-radius-sm);
  cursor: pointer;
}
.bo-radio:hover { background: var(--la-sunken); }
.bo-radio input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }

.bo-button {
  font-family: inherit;
  font-size: var(--la-text-sm);
  min-height: 2.25rem;
  padding: 0.35rem 0.7rem;
  justify-self: start;
  color: var(--la-ink);
  background: var(--la-sunken);
  border: 1px solid var(--la-hairline-strong);
  border-radius: var(--la-radius-sm);
  cursor: pointer;
}
.bo-button:hover { border-color: var(--accent); }

/* ---- the four stages ----------------------------------------------------- */
.bo-stages {
  margin-top: var(--la-space-5);
  list-style: none;
  display: grid;
  gap: var(--la-space-4);
}

.bo-step {
  padding-left: var(--la-space-4);
  border-left: 1px solid var(--la-hairline);
}

.bo-steplabel { font-weight: 600; color: var(--la-ink); }

.bo-stepno {
  display: inline-block;
  min-width: 1.6rem;
  margin-left: calc(-1 * var(--la-space-4) - 0.8rem);
  margin-right: 0.4rem;
  font-family: var(--la-font-mono);
  color: var(--accent);
}

.bo-line { margin-top: var(--la-space-1); color: var(--la-ink-dim); }
.bo-line.is-quiet { color: var(--la-ink-faint); font-size: var(--la-text-sm); }

/* ---- the two tables ------------------------------------------------------ */
.bo-subhead {
  margin-top: var(--la-space-5);
  font-size: var(--la-text-lg);
  line-height: var(--la-leading-tight);
}

.bo-compare {
  margin-top: var(--la-space-2);
  list-style: none;
  display: grid;
  gap: var(--la-space-1);
  font-size: var(--la-text-sm);
}

.bo-row {
  padding: 0.35rem var(--la-space-3);
  background: var(--la-sunken);
  border-left: 3px solid var(--la-hairline);
  border-radius: var(--la-radius-sm);
  color: var(--la-ink-dim);
}
.bo-row.is-current { border-left-color: var(--la-ink); color: var(--la-ink); }
.bo-row.is-bad { border-left-color: var(--accent); color: var(--la-ink); }

.bo-proof,
.bo-note {
  margin-top: var(--la-space-4);
  padding-top: var(--la-space-3);
  border-top: 1px solid var(--la-hairline);
  font-size: var(--la-text-sm);
  color: var(--la-ink-dim);
}

/* ---- the prose ----------------------------------------------------------- */
.bo-why { margin-top: var(--la-space-6); }
.bo-why h2 {
  margin-top: var(--la-space-5);
  margin-bottom: var(--la-space-2);
  font-size: var(--la-text-xl);
  line-height: var(--la-leading-tight);
}
.bo-why h2:first-child { margin-top: 0; }
.bo-why p { margin-top: var(--la-space-3); }
.bo-why q { font-style: italic; }
