/* 6-data (plan 119): Veri Doktoru (units/6-data-boards.js) and the Hızlı Parmak dot plot (u6d-figure, markup in
   units/6-data-core.js). Theme tokens only, so light, dark and high contrast follow tokens.css and the world tokens
   of topic-games.css. Tones: coral = the headline's claim, brand = the pupil's try, green = the truth; each also
   has its own label text, so colour is never the only cue. */

/* ---------- Board ---------- */
.u6d-board { width: min(100%, 1040px); }
.u6d-doctor__work { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: clamp(12px, 2vw, 28px); width: 100%; }
.u6d-desk { display: grid; gap: 4px; width: min(100%, 580px); margin: 0; padding: 8px 10px; background: var(--world-model); border: 2px solid var(--world-model-edge); border-radius: 16px; }
.u6d-desk__caption { color: var(--world-ink); font-size: clamp(16px, 1.5vw, 19px); font-weight: 900; text-align: center; }
.u6d-doctor__controls { display: grid; justify-items: center; }
.u6d-spark { min-height: 1.6em; margin: 0; padding: 2px 14px; color: var(--ink); background: var(--red-tint); border: 2px solid var(--red-base); border-left-width: 8px; border-radius: 12px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.u6d-spark:empty { visibility: hidden; }
.u6d-reason { margin: 0; padding: 6px 16px; color: var(--world-ink); background: var(--world-band); border: 2px solid var(--world-band-edge); border-radius: 14px; font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.u6d-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: min(100%, 420px); }
.u6d-choice { min-width: 0; padding: 6px 12px; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.u6d-choice[data-missed] { border-color: var(--red-base); border-style: dashed; }
.u6d-choice[data-answer] { color: var(--green-ink); background: var(--green-tint); border-color: var(--green-base); opacity: 1; }

/* ---------- The dot plot ---------- */
.u6d-figure { display: block; width: min(100%, 520px); height: auto; margin-inline: auto; overflow: visible; }
.u6d-dot { fill: var(--brand); stroke: var(--ink); stroke-width: 1.5; }
.u6d-axis { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.u6d-tick { stroke: var(--ink-2); stroke-width: 2; }
.u6d-tick-label { fill: var(--ink-2); font-size: 17px; font-weight: 800; }
.u6d-label { font-size: 18px; font-weight: 900; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.u6d-label--claim { fill: var(--coral-ink); }
.u6d-label--try { fill: var(--brand-ink); }
.u6d-label--truth { fill: var(--green-ink); }
.u6d-line { fill: none; stroke-width: 2.5; stroke-dasharray: 6 4; }
.u6d-mk--claim .u6d-line { stroke: var(--coral-base); }
.u6d-mk--try .u6d-line { stroke: var(--brand); }
.u6d-mk--truth .u6d-line { stroke: var(--green-base); stroke-dasharray: none; stroke-width: 3; }
.u6d-shape { stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
.u6d-mk--claim .u6d-shape { fill: var(--coral-base); }
.u6d-mk--try .u6d-shape { fill: var(--brand); }
.u6d-mk--truth .u6d-shape { fill: var(--green-base); }
.u6d-column { fill-opacity: .18; stroke-width: 3; }
.u6d-bracket { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.u6d-mk--claim .u6d-column { fill: var(--coral-base); stroke: var(--coral-base); stroke-dasharray: 6 4; }
.u6d-mk--try .u6d-column { fill: var(--brand); stroke: var(--brand); }
.u6d-mk--truth .u6d-column { fill: var(--green-base); stroke: var(--green-base); }
.u6d-mk--claim .u6d-bracket { stroke: var(--coral-base); stroke-dasharray: 6 4; }
.u6d-mk--try .u6d-bracket { stroke: var(--brand); }
.u6d-mk--truth .u6d-bracket { stroke: var(--green-base); }
.u6d-desk .u6d-figure { width: 100%; }

/* High contrast: marks speak through ink borders and weight, not tints. */
body.high-contrast .u6d-dot { fill: var(--surface); stroke-width: 3; }
body.high-contrast .u6d-column { fill-opacity: 0; }
body.high-contrast .u6d-mk--claim .u6d-line, body.high-contrast .u6d-mk--claim .u6d-column, body.high-contrast .u6d-mk--claim .u6d-bracket,
body.high-contrast .u6d-mk--try .u6d-line, body.high-contrast .u6d-mk--try .u6d-column, body.high-contrast .u6d-mk--try .u6d-bracket,
body.high-contrast .u6d-mk--truth .u6d-line, body.high-contrast .u6d-mk--truth .u6d-column, body.high-contrast .u6d-mk--truth .u6d-bracket { stroke: var(--ink); }
body.high-contrast .u6d-mk--claim .u6d-shape, body.high-contrast .u6d-mk--try .u6d-shape, body.high-contrast .u6d-mk--truth .u6d-shape { fill: var(--ink); }
body.high-contrast .u6d-label { fill: var(--ink); }

/* A short landscape board (1366 × 768): the kicker goes and the plot is capped by height (labels stay about 16 px) so the reason line stays above the
   instruction bar. */
@media (orientation: landscape) and (min-width: 900px) and (max-height: 820px) {
  .question-card--topic:has(.u6d-board) .question-kicker { display: none; }
  .question-card--topic:has(.u6d-board) .question-copy { margin-bottom: 8px; }
  .u6d-desk { width: min(100%, 500px); }
  .u6d-desk .u6d-figure { max-height: 42vh; }
}

@media (max-width: 700px) {
  /* A 390 × 844 phone holds the whole round above the instruction bar: the plot is capped by height (labels stay 12 px or more), two choices a row. */
  /* The spark sits between the plot and the keypad, so a wrong try's meaning is read where the eye already is
     (below the pad it hides under the toast). */
  .u6d-board { gap: 8px; }
  .u6d-doctor__work { display: contents; }
  .u6d-doctor__controls { order: 2; }
  .u6d-spark { order: 1; }
  .u6d-reason { order: 3; }
  .u6d-desk { gap: 2px; padding: 4px 6px; }
  .u6d-desk .u6d-figure { max-height: 28vh; }
  .u6d-choices { gap: 8px; }
}
