/* assess area styles (owned by the assess builder). Use app.css tokens; keep the restrained house style. */

/* ------------------------------------------------------------ numeric answers */
.num-field { display: flex; flex-direction: column; gap: 10px; }
.num-row { display: flex; align-items: center; gap: 10px; }
.num-input { min-height: 52px; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: .01em; flex: 1; min-width: 0; }
.num-unit { font-weight: 600; color: var(--ink-2); font-size: 15px; flex: none; }
.num-keys { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; max-width: 460px; }
.num-key { min-height: 40px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); font: 600 15px/1 var(--font-ui); color: var(--ink); display: grid; place-items: center;
  transition: border-color .16s var(--ease), transform .16s var(--ease); touch-action: manipulation; }
.num-key:hover { border-color: var(--ink-3); }
.num-key:active { transform: scale(.96); }
.num-read { min-height: 24px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.num-read .katex { font-size: 1.1em; }
.num-read[data-state="ok"] { animation: settle .24s var(--ease) both; }
.bad-text { color: var(--bad); display: inline-flex; align-items: center; gap: 6px; }

/* ---------------------------------------------------------- equation toolbar */
.mtb { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.mtb-row { display: flex; flex-wrap: wrap; gap: 4px; }
.mtb-b { min-width: 34px; min-height: 32px; padding: 2px 8px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--ink); font-size: 13px; display: inline-grid; place-items: center;
  transition: background .14s var(--ease), border-color .14s var(--ease); }
.mtb-b:hover { background: var(--surface); border-color: var(--line-2); }
.mtb-b:active { transform: scale(.97); }
.mtb-b[aria-expanded="true"] { background: var(--surface); border-color: var(--ink-3); }
.mtb-b .katex { font-size: 1em; }
.mtb-text { font: 600 12px/1 var(--font-ui); color: var(--ink-2); }
.mtb-greek { border-top: 1px solid var(--line); padding-top: 6px; }
.field .mtb { margin: 6px 0 8px; }
.mtb-prev, .qb-prev { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 10px 12px; background: var(--surface); font-size: 14.5px; line-height: 1.55; white-space: pre-line; overflow-x: auto; }
.mtb-prev { margin-top: 8px; }
.mtb-prev-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.qb-tools { position: sticky; top: calc(var(--topbar) + 8px); z-index: 4; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; padding: 8px; border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); }
.qb-num { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.qb-num .field { min-width: 0; }
.qb-sample { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); animation: settle .28s var(--ease) both; }
.qb-sample-opts { margin: 8px 0 0 20px; font-size: 14px; display: grid; gap: 4px; }

/* ---------------------------------------------------------------- pool health */
.pool-health { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); }
.pool-meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 8px; }
.pool-meter > i { display: block; height: 100%; border-radius: inherit; background: var(--ink); transform-origin: left; transition: transform .42s var(--ease); }
.pool-health[data-level="Good"] .pool-meter > i { background: var(--ok); }
.pool-health[data-level="Weak"] .pool-meter > i { background: var(--warn); }

/* -------------------------------------------------------------- listening test */
.lt-body { width: min(820px, 100%); }
.lt-h { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.02em; margin-top: 8px; }
.lt-h2 { font-size: 17px; }
.lt-rules { margin: 16px 0 0 18px; display: grid; gap: 6px; max-width: 70ch; }
.lt-check { margin-top: 22px; display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: center; }
.lt-camhost { width: 240px; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: grid; }
.lt-camhost .proctor-tile { width: 100%; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.lt-cam-off { display: grid; place-items: center; align-content: center; gap: 8px; color: var(--ink-3); }
.lt-camdock { position: fixed; right: 16px; bottom: 16px; z-index: 7; width: 168px; animation: settle .32s var(--ease) both; }
.lt-camdock .lt-camhost { width: 100%; box-shadow: var(--sh-2); }
.lt-player { position: sticky; top: 62px; z-index: 4; margin-bottom: 18px; padding: 16px 18px; }
.lt-pl { display: flex; align-items: center; gap: 16px; }
.lt-big { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: none;
  transition: transform .2s var(--ease), opacity .2s var(--ease); }
.lt-big:hover:not(:disabled) { transform: scale(1.04); }
.lt-big:active:not(:disabled) { transform: scale(.97); }
.lt-big:disabled { opacity: .35; cursor: default; }
.lt-big.on { background: var(--surface-3); color: var(--ink); }
.lt-pl-main { flex: 1; min-width: 0; }
.lt-pl-label { font-weight: 600; }
.lt-track { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.lt-track > i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); transition: transform .25s linear; }
.lt-seek { width: 100%; margin-top: 10px; accent-color: var(--ink); }
.lt-vol { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); }
.lt-vol input { width: 110px; accent-color: var(--ink); }
.lt-qs { display: grid; gap: 14px; }
.lt-q { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--surface); }
.lt-qh { font-size: 16.5px; line-height: 1.45; font-weight: 600; margin: 6px 0 14px; letter-spacing: -.01em; }
.lt-q .opt { min-height: 48px; }
.lt-submit { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; flex-wrap: wrap; }
.lt-overlay { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(6px); animation: fadeIn .22s var(--ease) both; }
.lt-ov-box { width: min(440px, 100%); text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: 28px 24px; box-shadow: var(--sh-3); animation: settle .32s var(--ease) both; }
.lt-ov-box h2 { font-size: 19px; margin-top: 12px; }
.lt-ov-icon { width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
@keyframes fadeIn { from { opacity: 0; } }
.lt-builder .card-head h3 { display: inline-flex; align-items: center; gap: 8px; }
.lt-up { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lt-up audio { width: min(360px, 100%); height: 36px; }
.lt-up .bar { flex-basis: 100%; }

/* ------------------------------------------------- results and attempt drawer */
.li-btn { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; border-radius: 6px; transition: background .12s; color: inherit; font: inherit; }
.li-btn:hover { background: var(--surface-2); }
.dr-h { font-size: 14px; font-weight: 600; }
.snap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.snap { border: 1px solid var(--line); border-radius: 8px; padding: 0; overflow: hidden; background: var(--surface-2); display: flex; flex-direction: column; cursor: zoom-in; }
.snap img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.snap span { font-size: 11px; color: var(--ink-3); padding: 3px 6px; font-variant-numeric: tabular-nums; }
.tl-item.flag::before { border-color: var(--warn); background: var(--warn); }

@media (max-width: 720px) {
  .lt-check { grid-template-columns: 1fr; }
  .lt-camhost { width: 100%; max-width: 320px; }
  .lt-camdock { width: 92px; right: 10px; bottom: 10px; }
  .lt-player { top: 56px; padding: 12px 14px; }
  .lt-big { width: 54px; height: 54px; }
  .lt-vol input { width: 80px; }
  .num-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .qb-tools { position: static; }
}
