/* Hindi Voice Annotation Portal.
   One white sheet per task, hairlines instead of boxes, the child's text as the
   largest thing on the page, and marks on it in "teacher's red pen". */
:root {
  --ink: #1d2433;
  --muted: #667085;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --bg: #f6f7f9;
  --card: #fff;
  --hover: #f0f2f5;
  --accent: #0f6b5c;
  --accent-ink: #0b5246;
  --accent-soft: #e3f2ef;
  --pen: #b42318;            /* word marks and errors only */
  --error: #b42318;
  --error-soft: #fdecea;
  --warn: #9a6700;
  --warn-soft: #fff6dc;
  --hi: "Noto Sans Devanagari", "Kohinoor Devanagari", "Mangal", "Nirmala UI", sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, var(--hi);
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.45; }
main { max-width: 1680px; margin: 0 auto; padding: 1.25rem 2rem 0; }
a { color: var(--accent); }
h1 { font-size: 1.4rem; margin: .25rem 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
code { background: #eef0f4; padding: 0 .3em; border-radius: 3px; font-size: .85em; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[lang="hi"], .hi { font-family: var(--hi); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .55rem 2rem; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar a { color: var(--ink); text-decoration: none; }
.brand { font-weight: 700; }
.brand span { font-weight: 400; color: var(--muted); margin-left: .3rem; }
.topbar nav { display: flex; align-items: center; gap: 1.25rem; font-size: .9rem; }
.topbar nav a { color: var(--muted); }
.topbar nav a:hover { color: var(--ink); }
.who { color: var(--muted); }
.who b { color: var(--ink); }
button.link { background: none; border: 0; color: var(--muted); padding: 0; cursor: pointer; font: inherit; }
form.inline { display: inline; }

/* controls */
input, select, textarea, button, .button {
  font: inherit; border: 1px solid var(--line-strong); border-radius: 6px; padding: .4rem .55rem;
  background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { width: 100%; resize: vertical; }
button, .button { cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { border-color: var(--muted); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--accent-ink); }
button:disabled { opacity: .4; cursor: default; }
button.small { font-size: .8rem; padding: .2rem .55rem; }
label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--muted); }
label > input, label > select { color: var(--ink); font-size: .95rem; }
label i, legend i, .sheet-head i { color: var(--error); font-style: normal; }
label.inline { flex-direction: row; align-items: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; }
.card.narrow { max-width: 360px; margin: 3rem auto; }
.card.narrow form { display: grid; gap: .8rem; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
.cols .card form { display: grid; gap: .7rem; }
form.row { display: flex !important; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .75rem; }
pre { background: #f0f2f5; padding: .6rem; border-radius: 6px; overflow-x: auto; font-size: .8rem; }

.flashes { display: grid; gap: .4rem; margin-bottom: 1rem; }
.flash { padding: .5rem .8rem; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); }
.flash.error { background: var(--error-soft); color: var(--error); }

/* ---- segmented radio groups ------------------------------------------- */
fieldset.radios { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.radios legend { padding: 0; margin-bottom: .3rem; font-size: .8rem; color: var(--muted); }
.radio-opts { display: inline-flex; vertical-align: middle; background: #fff;
  border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
.radio-opts label { position: relative; display: block; color: var(--ink); font-size: .88rem;
  cursor: pointer; white-space: nowrap; }
.radio-opts label + label { border-left: 1px solid var(--line); }
.radio-opts input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.radio-opts label span { display: block; padding: .3rem .7rem; }
.radio-opts label:hover span { background: var(--hover); }
.radio-opts label:has(input:checked) span { background: var(--accent); color: #fff; }
.radio-opts label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; z-index: 1; }
button.clear-radio { border: 0; background: none; color: var(--muted); font-size: 1.1rem;
  line-height: 1; padding: 0 .3rem; vertical-align: middle; }
button.clear-radio:hover { color: var(--error); }
/* Not transcribable chosen: every required field on the row becomes optional, so drop its * */
.item:has(input[name$="-not_transcribable"]:checked) .nt-optional legend i,
.item:has(input[name$="-not_transcribable"]:checked) label.nt-optional > span > i,
.item:has(input[name$="-not_transcribable"]:checked) label.nt-optional > i { display: none; }
/* required group left empty after a save */
.item.has-error fieldset.radios:has(legend i):not(:has(input:checked)) .radio-opts { border-color: var(--error); }

/* ---- toggle chips (checkbox lists) ------------------------------------ */
fieldset.checks { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
fieldset.checks legend { padding: 0; margin-bottom: .35rem; font-size: .8rem; color: var(--muted); }
label.chip { position: relative; display: inline-block; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem;
  border: 1px solid var(--line-strong); border-radius: 99px; background: #fff;
  color: var(--ink); font-size: .85rem; }
.chip:hover span { border-color: var(--muted); }
.chip:has(input:checked) span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.chip:has(input:focus-visible) span { outline: 2px solid var(--accent); outline-offset: 1px; }
/* red dot: this tag marks the word incorrect; half dot: unless dialect-consistent */
.mk { display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: var(--pen);
  font-style: normal; vertical-align: middle; }
.chip .code { font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); }
.chip:has(input:checked) .code { color: var(--accent-ink); }
.mk.context { background: linear-gradient(90deg, var(--pen) 50%, #fff 50%); box-shadow: inset 0 0 0 1px var(--pen); }

/* ---- dashboard -------------------------------------------------------- */
.summary { display: flex; gap: 1.75rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .75rem; }
.stat { font-size: .9rem; color: var(--muted); }
.stat b { font-size: 1.5rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { display: block; font-size: .8rem; }
.summary .button.primary { margin-left: auto; align-self: center; }
.filters { display: flex; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
table.list { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.list th, table.list td { text-align: left; padding: .55rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list th { font-size: .8rem; font-weight: 600; color: var(--muted); background: #fafbfc; }
table.list td a { font-variant-numeric: tabular-nums; }
table.list td.nowrap { white-space: nowrap; }
progress { width: 90px; vertical-align: middle; accent-color: var(--accent); }
.pill { font-size: .78rem; padding: .1rem .55rem; border-radius: 99px; background: #eef0f4; color: var(--muted); white-space: nowrap; }
.pill.done { background: var(--accent-soft); color: var(--accent); }
.pill.started { background: #e8effd; color: #2453a6; }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.empty { color: var(--muted); padding: 2rem; text-align: center; }
td.steps { display: flex; flex-wrap: wrap; gap: .2rem .9rem; }
.step { font-size: .85rem; text-decoration: none; color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: .35rem; }
.step::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid currentColor; }
.step.started { color: #2453a6; }
.step.started::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.step.done { color: var(--accent); }
.step.done::before { background: currentColor; }
.step small { font-variant-numeric: tabular-nums; opacity: .8; }
table.guide td { font-size: .88rem; }
dl { margin: 0; } dt { font-weight: 600; margin-top: .5rem; } dd { margin: 0; color: var(--muted); font-size: .9rem; }
.lede { color: var(--muted); max-width: 70ch; }

/* ---- child header + steps ------------------------------------------- */
.child-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .6rem 2rem; margin-bottom: 1rem; }
.child-id { margin: 0; font-size: .95rem; }
.child-id b { font-weight: 600; font-variant-numeric: tabular-nums; margin-left: .2rem; }
.child-id .fact { color: var(--muted); margin-left: 1rem; }
.steps { display: flex; flex-wrap: wrap; gap: .2rem; }
.steps a { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .75rem;
  border-radius: 99px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.steps a:hover { background: var(--hover); color: var(--ink); }
.steps a.active { background: var(--ink); color: #fff; }
.steps a small { font-variant-numeric: tabular-nums; opacity: .75; }
.steps .dot { width: .5rem; height: .5rem; border-radius: 50%; border: 1.5px solid currentColor; }
.steps a.started .dot { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.steps a.done .dot { background: var(--accent); border-color: var(--accent); }
.steps a.active.done .dot { border-color: #fff; }

/* ---- the sheet (one per task) ---------------------------------------- */
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.item { position: relative; padding: .85rem 1.1rem; border-top: 1px solid var(--line); }
.sheet > .item:first-child, .sheet-head + .item { border-top: 0; }
/* status on the left edge: complete / draft with problems */
.item.complete { box-shadow: inset 3px 0 0 var(--accent); }
.item.has-error { box-shadow: inset 3px 0 0 var(--error); }
.item-no { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.badge { font-size: .72rem; font-weight: 500; color: var(--accent); margin-left: .3rem; }
.item.has-error .badge { color: var(--error); }
.label { font-size: .8rem; color: var(--muted); display: block; margin-bottom: .25rem; }
.hint { margin: 0 0 .5rem; font-size: .82rem; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, var(--hi); }
.canon-text { font-family: var(--hi); }
.transcribe input { font-family: var(--hi); font-size: 1.1rem; width: 100%; }
.transcribe textarea { font-family: var(--hi); font-size: 1.1rem; line-height: 1.7; }
audio { width: 100%; height: 36px; }
label.num input { width: 6.5rem; }
details.linguistic summary { cursor: pointer; font-size: .85rem; color: var(--accent); width: max-content; }
details.linguistic[open] { display: grid; gap: .75rem; }
.fields-row { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: flex-end; }
.fields-row label.wide { flex: 1 1 260px; }
.problems { margin: 0; padding: 0; list-style: none; font-size: .85rem; display: grid; gap: .2rem; }
.problems .error { color: var(--error); }
.problems .warn { color: var(--warn); }
.problems li::before { content: "● "; font-size: .6rem; vertical-align: middle; }
p.problems { display: block; }

/* Letters / Words: rows that wrap (narrow screens) ... */
#annotate.grid .sheet-head { display: none; }
#annotate.grid .item { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: flex-end; }
#annotate.grid .item .fields { display: contents; }
#annotate.grid .recording { flex: 1 1 220px; max-width: 260px; }
#annotate.grid .canon-text { font-size: 2.5rem; line-height: 1; min-width: 3rem; }
#annotate.grid .transcribe { flex: 1 1 180px; }
#annotate.grid .item-tags,
#annotate.grid details,
#annotate.grid .problems { flex-basis: 100%; }
#annotate.grid .item.word-tagged .canonical { flex-basis: 100%; }
#annotate.grid .item.word-tagged .canon-text { font-size: inherit; }

/* ... and one aligned table on wide screens: labels once, in the header. */
@media (min-width: 1240px) {
  #annotate.grid .sheet { display: grid; column-gap: 1rem;
    grid-template-columns: 1.5rem minmax(170px, 250px) 5rem minmax(8rem, 1fr) repeat(3, max-content); }
  #annotate.grid.has-disfluency .sheet {
    grid-template-columns: 1.5rem minmax(170px, 250px) 6.5rem minmax(8rem, 1fr) repeat(4, max-content); }
  #annotate.grid .item:not(.word-tagged) .radio-opts label span { padding: .3rem .6rem; }
  #annotate.grid .sheet-head,
  #annotate.grid .item:not(.word-tagged) { grid-column: 1 / -1; display: grid;
    grid-template-columns: subgrid; align-items: center; row-gap: .6rem; }
  #annotate.grid .sheet-head { padding: .6rem 1.1rem; border-bottom: 1px solid var(--line);
    font-size: .8rem; color: var(--muted); }
  #annotate.grid .item:not(.word-tagged) .recording { max-width: none; }
  /* labels are in the header row (only for the row's own fields, not the
     questions inside "Dialect, enumerator speech and notes") */
  #annotate.grid .item:not(.word-tagged) .fields > fieldset.radios > legend,
  #annotate.grid .item:not(.word-tagged) .transcribe .label { position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #annotate.grid .item:not(.word-tagged) .item-tags,
  #annotate.grid .item:not(.word-tagged) details,
  #annotate.grid .item:not(.word-tagged) .problems { grid-column: 4 / -1; }
  #annotate.grid .item.word-tagged { grid-column: 1 / -1; }
  #annotate.grid .item:not(.word-tagged) .badge { position: absolute; left: 1.1rem; top: 2.6rem; }
}

/* Words has one more column (Disfluency): keep the wrapping rows until it fits. */
@media (min-width: 1240px) and (max-width: 1379px) {
  #annotate.grid.has-disfluency .sheet { display: block; }
  #annotate.grid.has-disfluency .sheet-head { display: none; }
  #annotate.grid.has-disfluency .item:not(.word-tagged) { display: flex; }
  #annotate.grid.has-disfluency .item:not(.word-tagged) .fields > fieldset.radios > legend,
  #annotate.grid.has-disfluency .item:not(.word-tagged) .transcribe .label {
    position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  #annotate.grid.has-disfluency .item:not(.word-tagged) .badge { position: static; }
  #annotate.grid.has-disfluency .item:not(.word-tagged) .recording { max-width: 260px; }
}

/* Paragraph / Story */
#annotate.passage .item { display: grid; gap: 1.1rem; padding: 1.25rem 1.5rem; }
#annotate.passage:not(.multi) .item-no { display: none; }
#annotate.passage .recording { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .75rem 1.5rem; }
#annotate.passage .recording audio { flex: 1 1 360px; }
#annotate.passage .canon-text { font-size: 1.55rem; line-height: 2.2; background: #fbfbfc;
  border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1.2rem; }
#annotate.passage .fields { display: flex; flex-wrap: wrap; gap: 1rem 1.75rem; align-items: flex-end;
  padding-top: 1.1rem; border-top: 1px solid var(--line); }
#annotate.passage .transcribe { max-width: 70ch; }
#annotate.passage .level-def { margin: -.4rem 0 0; }
#annotate.passage label.notes { max-width: 70ch; }
.wcpm-auto { display: flex; flex-direction: column; gap: .25rem; }
.wcpm-auto .label { margin: 0; }
.wcpm-value { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.wp-dialect { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wp-dialect legend { float: left; margin: 0 .4rem 0 0; }

.actions { position: sticky; bottom: 0; z-index: 5; display: flex; gap: .5rem; align-items: center;
  margin: 1rem -2rem 0; padding: .7rem 2rem; background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line); }
.actions .skip { margin-left: auto; font-size: .85rem; margin-right: .5rem; }
.actions .primary { margin-left: auto; padding: .45rem 1.1rem; }
.actions .skip + .primary { margin-left: 0; }

@media (max-width: 860px) {
  main { padding: 1rem 1rem 0; }
  .actions { margin: 1rem -1rem 0; padding: .7rem 1rem; }
  .cols { grid-template-columns: 1fr; }
  .topbar { padding: .55rem 1rem; flex-wrap: wrap; }
}

/* ---- passage word marking ("teacher's red pen") --------------------- */
.words { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem 0; }
.word { font: inherit; font-family: var(--hi); line-height: inherit; padding: 0 .25rem; margin: 0;
  border: 0; border-radius: 4px; background: transparent; color: var(--ink); }
button.word { cursor: pointer; }
button.word:hover { background: var(--hover); }
.word.err { color: var(--pen); text-decoration: underline wavy var(--pen) 1.5px; text-underline-offset: .32em; }
.word.tagged { text-decoration: underline dotted var(--warn) 2px; text-underline-offset: .32em; }
.word.last::after { content: ""; display: inline-block; width: 3px; height: .95em; margin-left: .3rem;
  background: var(--pen); border-radius: 2px; vertical-align: -.1em; }
.word.after-last { opacity: .35; }
.word.current { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }

/* Gaps between words: click to add words the child inserted. Pointing at a gap
   pops up a "+" above the line; inserted words show as blue pills after a caret. */
:root { --ins: #2453a6; --ins-soft: #e8effd; }
.gap { position: relative; font: inherit; font-family: var(--hi); line-height: inherit; min-width: .75rem;
  padding: 0; margin: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ins);
  cursor: pointer; align-self: stretch; }
.gap:empty:hover, .gap.current:empty { background: var(--ins-soft); }
.gap:hover::after, .gap.current::after { content: "+"; position: absolute; z-index: 2; left: 50%; top: -.45em;
  transform: translateX(-50%); width: 1.2rem; height: 1.2rem; border-radius: 50%; background: var(--ins);
  color: #fff; font: 600 .9rem/1.2rem -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  text-align: center; box-shadow: 0 1px 3px rgba(16, 24, 40, .25); pointer-events: none; }
.gap.has-ins { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .2rem; margin: 0 .1rem;
  font-size: .8em; }
.gap.has-ins::before { content: "‸"; }
.ins-word { background: var(--ins-soft); color: var(--ins); border-radius: 4px; padding: 0 .3rem; line-height: 1.7; }
.gap.current { box-shadow: 0 0 0 2px var(--ins); }
.ins-mark { color: var(--ins); font-size: .8rem; }
.ins-mark::before { content: "‸"; margin-right: .1rem; }
.ins-panel { margin-top: .75rem; padding: .8rem 1rem; border: 1px solid var(--ins); border-radius: 10px;
  background: #fff; display: grid; gap: .6rem; }
.ins-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.ins-head .ins-title { color: var(--ins); font-weight: 600; font-size: .9rem; }
.ins-list { margin: 0; padding-left: 1.5rem; display: grid; gap: .4rem; max-width: 480px; color: var(--muted); }
.ins-list li { padding-left: .2rem; }
.ins-list li > * { vertical-align: middle; }
.ins-text { font-family: var(--hi); font-size: 1.05rem; width: calc(100% - 2rem); }
button.ins-del { border: 0; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; padding: 0 .3rem; }
button.ins-del:hover { color: var(--error); }
.ins-add { justify-self: start; color: var(--ins); }

.word-summary { margin-top: .6rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem;
  font-size: .85rem; color: var(--muted); }
.word-summary b { color: var(--ink); }
.word-summary .counts b { font-variant-numeric: tabular-nums; }
.word-summary .legend { margin-left: auto; display: flex; gap: .9rem; }
.word-summary .legend .word { font-family: inherit; font-size: .8rem; padding: 0; line-height: 1.6; }
.word-summary .legend .word.last { color: var(--muted); }

.word-panel { margin-top: .75rem; padding: .9rem 1rem; border: 1px solid var(--accent); border-radius: 10px;
  background: #fff; display: grid; gap: .85rem; }
.wp-head { display: flex; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; }
.wp-word { font-family: var(--hi); font-size: 1.5rem; line-height: 1.2; }
.wp-pos { font-size: .85rem; }
.wp-actions { margin-left: auto; display: flex; gap: .35rem; }
.wp-uttered-label { max-width: 420px; }
.wp-uttered-label small { color: var(--muted); }
.wp-uttered { font-family: var(--hi); font-size: 1.05rem; }
.auto-hint { color: var(--muted); font-weight: 400; }

/* reading start / end */
.reading-time { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: flex-end; }
.time-row { display: flex; gap: .25rem; align-items: center; }
input.time { width: 6rem; font-variant-numeric: tabular-nums; }
input.time.invalid { border-color: var(--error); background: var(--error-soft); }
.time-msg { color: var(--error); font-size: .82rem; flex-basis: 100%; }
.time-msg:empty { display: none; }

/* ---- ASER Level step --------------------------------------------------
   A centred panel; the five levels form a ladder (an ordered scale), one card
   per level joined by a line, the chosen card filled. */
/* header and panel share one centred column */
.aser-page { max-width: 1040px; margin: 0 auto; }
#annotate.aser .item { display: grid; gap: 1.25rem; padding: 1.6rem 1.75rem 1.75rem; }
#annotate.aser .aser-head h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
#annotate.aser .aser-head p { margin: 0; color: var(--muted); font-size: .92rem; }
#annotate.aser .actions { margin: 1rem 0 0; padding: .7rem 0; background: var(--bg); }
.callout { margin: 0; padding: .6rem .9rem; border-radius: 8px; font-size: .9rem; }
.callout.warn { background: var(--warn-soft); color: var(--warn); }
.callout a { color: inherit; font-weight: 600; }

.radio-opts.aser-levels { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem; border: 0; border-radius: 0; overflow: visible; background: none; }
.radio-opts.aser-levels::before { content: ""; position: absolute; left: 10%; right: 10%; top: 1.55rem;
  height: 2px; background: var(--line-strong); }
.radio-opts.aser-levels label, .radio-opts.aser-levels label + label { position: relative; z-index: 1;
  border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; white-space: normal; }
.radio-opts.aser-levels label span { display: flex; flex-direction: column; align-items: center; gap: .4rem;
  height: 100%; padding: 1.1rem .75rem 1rem; border-radius: 9px; text-align: center; }
.radio-opts.aser-levels label:hover span { background: var(--hover); }
.lvl-dot { flex: none; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; }
.radio-opts.aser-levels b { font-size: 1.05rem; font-weight: 600; }
.radio-opts.aser-levels small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.radio-opts.aser-levels label:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.radio-opts.aser-levels label:has(input:checked) span { background: var(--accent-soft); color: var(--accent-ink); }
.radio-opts.aser-levels label:has(input:checked) .lvl-dot { border-color: var(--accent); background: var(--accent);
  box-shadow: inset 0 0 0 3px #fff; }
.radio-opts.aser-levels label:has(input:checked) small { color: var(--accent-ink); }
#annotate.aser label.wide input { width: 100%; }

@media (max-width: 760px) {
  .radio-opts.aser-levels { grid-template-columns: 1fr; }
  .radio-opts.aser-levels::before { display: none; }
  .radio-opts.aser-levels label span { flex-direction: row; text-align: left; gap: .75rem; padding: .7rem .9rem; }
  .radio-opts.aser-levels b { min-width: 5.5rem; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
