/* Ballpark */
[hidden] { display: none !important; }

:root {
  --t0: var(--good);
  --t1: color-mix(in srgb, var(--good) 70%, var(--ok));
  --t2: var(--ok);
  --t3: color-mix(in srgb, var(--ok) 45%, var(--bad));
  --t4: var(--bad);
}
.t0 { --tc: var(--t0); } .t1 { --tc: var(--t1); } .t2 { --tc: var(--t2); } .t3 { --tc: var(--t3); } .t4 { --tc: var(--t4); }

/* progress */
.bp-progress { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-size: 14px; }
.bp-round { color: var(--muted); font-weight: 700; min-width: 92px; }
.bp-total { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 92px; text-align: right; }
.bp-dots { display: flex; gap: 6px; flex: 1; justify-content: center; }
.bp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); }
.bp-dot.cur { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.bp-dot[class*=" t"] { background: var(--tc); border-color: var(--tc); }

/* question */
.bp-card { padding: 18px 16px 16px; }
.bp-q { text-align: center; }
.bp-emoji { font-size: 44px; line-height: 1.1; }
.bp-qtext { font-size: 19px; line-height: 1.35; margin: 8px 0 4px; font-weight: 750; text-wrap: balance; }

/* readout */
.bp-readwrap { display: flex; justify-content: center; margin: 14px 0 6px; min-height: 64px; align-items: center; }
.bp-readout {
  appearance: none; border: 1px dashed transparent; background: none; cursor: text; border-radius: 12px;
  padding: 4px 12px; display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; flex-wrap: wrap; justify-content: center;
}
.bp-readout:hover, .bp-readout:focus-visible { border-color: var(--border); background: var(--surface-2); outline: none; }
.bp-num { font-size: 40px; font-weight: 850; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: var(--text); }
.bp-unit { font-size: 17px; color: var(--muted); font-weight: 600; }
.bp-pencil { font-size: 16px; color: var(--muted); align-self: center; }
.bp-edit { width: 100%; }
.bp-edit-row { display: flex; align-items: center; gap: 8px; width: 100%; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.bp-chip {
  appearance: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 999px; padding: 8px 12px; min-height: 36px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.bp-chip:active { transform: scale(.96); }
.bp-input {
  flex: 1; min-width: 0; font: 800 28px/1.2 system-ui, -apple-system, sans-serif; text-align: right; padding: 8px 10px;
  border-radius: 12px; border: 2px solid var(--accent); background: var(--surface-2); color: var(--text);
}
.bp-input:focus { outline: none; }
.bp-ok { padding: 12px 16px; min-height: 48px; }
.bp-input::placeholder { color: var(--muted); opacity: .6; }

/* slider */
.bp-sliderwrap { padding: 6px 4px 0; }
.bp-slider {
  --fill: 50%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0;
  touch-action: pan-y; cursor: pointer;
}
.bp-slider:focus { outline: none; }
.bp-slider::-webkit-slider-runnable-track {
  height: 10px; border-radius: 999px;
  background: linear-gradient(to right, var(--accent) 0 var(--fill), var(--surface-2) var(--fill) 100%);
  border: 1px solid var(--border);
}
.bp-slider::-moz-range-track { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.bp-slider::-moz-range-progress { height: 10px; border-radius: 999px; background: var(--accent); }
.bp-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 32px; height: 32px; border-radius: 50%; margin-top: -12px;
  background: var(--surface); border: 3px solid var(--accent); box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.bp-slider::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.bp-slider:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); }
.bp-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -2px; }

.bp-controls { display: grid; grid-template-columns: 64px 1fr 64px; gap: 10px; margin-top: 16px; }
.bp-nudge { padding: 12px 0; font-size: 17px; }
.bp-lock { font-size: 18px; }
.bp-hint { text-align: center; margin: 12px 0 0; font-size: 12.5px; }

/* reveal */
.bp-reveal { text-align: center; margin-top: 10px; }
.bp-answer { display: flex; flex-direction: column; align-items: center; }
.bp-alabel { font-size: 12px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 700; }
.bp-aval { font-size: 17px; color: var(--muted); }
.bp-aval b { font-size: 36px; color: var(--text); font-weight: 850; letter-spacing: -.5px; }
.bp-yours { margin-top: 2px; }
.bp-yours b { color: var(--text); }
.bp-verdict { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; margin-top: 4px; }
.bp-tier { font-size: 22px; }
.bp-points { font-size: 30px; font-weight: 900; color: color-mix(in srgb, var(--tc) 72%, var(--text)); font-variant-numeric: tabular-nums; margin: 2px 0 4px; }
.bp-fact { margin: 10px 0 0; color: var(--text); opacity: .88; font-size: 15px; line-height: 1.45; text-align: left; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.bp-next { margin-top: 14px; }

/* number line (log scale): answer flag above the track, your flag below, ÷10 ÷2 ×2 ×10 labels at the bottom.
 * Bands: ÷2…×2 around the answer (≈400+ points), ÷10…×10 (anything outside scores 0). */
.bp-line { position: relative; height: 92px; margin: 14px 16px 2px; }
.bp-track { position: absolute; left: 0; right: 0; top: 37px; height: 4px; border-radius: 4px; background: var(--border); }
.bp-band { position: absolute; top: 29px; height: 20px; border-radius: 4px; }
.bp-band.z10 { background: color-mix(in srgb, var(--text) 7%, transparent); }
.bp-band.z2 { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.bp-rtick { position: absolute; top: 27px; width: 1.5px; height: 24px; background: var(--muted); opacity: .55; transform: translateX(-.75px); }
.bp-rlabel {
  position: absolute; top: 72px; transform: translateX(-50%); font-size: 11.5px; font-weight: 800; color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}
.bp-rlabel:not(.far) { color: color-mix(in srgb, var(--accent) 60%, var(--text)); }
.bp-end { position: absolute; top: 72px; font-size: 10.5px; color: var(--muted); opacity: .7; }
.bp-end.lo { left: -14px; } .bp-end.hi { right: -14px; }
.bp-gap { position: absolute; top: 36px; height: 6px; border-radius: 6px; background: var(--tc); opacity: .8; }
.bp-mark { position: absolute; top: 39px; width: 0; height: 0; }
.bp-mark::before {
  content: ""; position: absolute; left: -8px; top: -8px; width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid var(--surface); box-sizing: border-box; background: var(--text);
}
.bp-mark.answer { z-index: 2; }
.bp-mark.answer::before { background: var(--accent); width: 20px; height: 20px; left: -10px; top: -10px; }
.bp-flag {
  position: absolute; transform: translateX(-50%); font-size: 11px; font-weight: 800; white-space: nowrap;
  padding: 1px 6px; border-radius: 6px; background: var(--surface-2); color: var(--text); top: 11px; border: 1px solid var(--border);
}
.bp-mark.answer .bp-flag { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); top: auto; bottom: 13px; }
.bp-line.animate .bp-mark.answer { animation: bp-drop .4s cubic-bezier(.3,1.5,.6,1) .1s both; }
.bp-line.animate .bp-band, .bp-line.animate .bp-rtick, .bp-line.animate .bp-rlabel { animation: bp-fade .3s ease-out .35s both; }
.bp-line.animate .bp-gap { animation: bp-fade .3s ease-out .45s both; }
@keyframes bp-drop { from { transform: translateY(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bp-fade { from { opacity: 0; } }

/* finished */
.bp-final { text-align: center; }
.bp-final-title { font-size: 15px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); font-weight: 800; }
.bp-final-score { font-size: 46px; font-weight: 900; letter-spacing: -1px; }
.bp-of { font-size: 20px; color: var(--muted); font-weight: 700; letter-spacing: 0; }
.dg-result-head .bp-of { font-size: 16px; }
.bp-final-emoji { font-size: 26px; letter-spacing: 2px; margin: 4px 0; }
.bp-final-btns { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; margin-top: 16px; }
.bp-share { font-size: 18px; padding: 14px 18px; }
.bp-final .dg-next a { color: var(--text); font-weight: 700; }

/* more daily games (in-page, finished view) */
.bp-more-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bp-more-game {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; min-height: 44px;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.bp-more-game:hover { background: var(--surface-2); }
.bp-more-icon { font-size: 24px; line-height: 1.2; }
.bp-more-tag { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.bp-review-h { margin: 22px 4px 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.bp-review { margin-bottom: 10px; padding: 14px; }
.bp-review-top { display: flex; gap: 10px; align-items: flex-start; }
.bp-review-emoji { font-size: 24px; line-height: 1.2; }
.bp-review-q { flex: 1; font-weight: 700; font-size: 15px; }
.bp-review-pts { font-weight: 900; color: color-mix(in srgb, var(--tc) 72%, var(--text)); font-variant-numeric: tabular-nums; }
.bp-review-vals { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; font-size: 15px; flex-wrap: wrap; }
.bp-review .bp-line { margin-top: 4px; }
.bp-review-verdict { font-weight: 700; font-size: 14px; }
.bp-review .bp-fact { font-size: 14px; }

@media (min-width: 600px) {
  .bp-qtext { font-size: 21px; }
  .bp-num { font-size: 46px; }
}

/* standalone-site chrome: safe areas, bigger header targets */
.dg-header { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
.dg-main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
.dg-icon-btn, .dg-icon-spacer { width: 44px; height: 44px; }
.dg-toast { top: max(18px, env(safe-area-inset-top)); }
.dg-modal { max-height: calc(100vh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.dg-archive-day { padding: 11px 0; }
.dg-more { margin-top: 4px; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }

.bp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bp-noscript { max-width: 420px; margin: 40px auto; padding: 0 16px; text-align: center; }

/* how-to example */
.bp-how-lead { font-weight: 600; }
.bp-how-ex { background: var(--surface-2); border-radius: 12px; padding: 10px 14px 12px; margin: 10px 0 6px; text-align: center; }
.bp-how-cap { font-size: 14px; }
.bp-how-line { position: relative; height: 40px; margin: 6px 6px 0; }
.bp-how-track { position: absolute; left: 0; right: 0; top: 13px; height: 4px; border-radius: 4px; background: var(--border); }
.bp-how-z2 { position: absolute; left: 30%; width: 40%; top: 6px; height: 18px; border-radius: 4px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
.bp-how-dot { position: absolute; top: 15px; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 3px solid var(--surface-2); background: var(--text); }
.bp-how-dot.ans { background: var(--accent); width: 20px; height: 20px; margin: -10px 0 0 -10px; z-index: 1; }
.bp-how-l { position: absolute; top: 26px; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: color-mix(in srgb, var(--accent) 60%, var(--text)); }
.bp-how-res { font-weight: 800; font-size: 15px; }

.dg-btn:focus-visible, .bp-readout:focus-visible, .bp-chip:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 70%, var(--text)); outline-offset: 2px; }
