/* After-answer layout (answer_ui.js, 11 Nov 2026): the highlighted "Why B is right" box, the folded wrong options and
   the "Sources & review" fold. Colours come from each theme. */
.ans-box { margin: 16px 0 10px; padding: 14px 16px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--ok) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, var(--line));
  border-left: 3px solid var(--ok); }
.ans-box.ans-key { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); border-left-color: var(--accent); }
.ans-h { margin: 0 0 6px; font: 700 11.5px/1.3 var(--ui, var(--sans)); letter-spacing: .08em; text-transform: uppercase; color: var(--ok); }
.ans-key .ans-h { color: var(--accent); }
.ans-also { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 1px solid var(--flag); border-radius: 999px; color: var(--flag); font-weight: 600; letter-spacing: .04em; vertical-align: 1px; }
.ans-txt { font: 400 1.05rem/1.6 var(--serif); color: var(--ink); overflow-wrap: anywhere; }
.ans-txt p { margin: 0; }
.ans-txt p + p { margin-top: .5em; }
.ans-txt b, .ans-txt strong { font-weight: 650; }

/* the two folds: why the others are wrong (under the box), Sources & review (at the end) */
details.ans-others, details.ans-review { margin: 8px 0 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
details.ans-review { margin-top: 22px; }
details.ans-others > summary, details.ans-review > summary { cursor: pointer; padding: 9px 13px; font: 600 .9rem/1.35 var(--ui, var(--sans)); color: var(--muted); list-style: revert; }
details.ans-others[open] > summary, details.ans-review[open] > summary { border-bottom: 1px solid var(--line); color: var(--ink); }
details.ans-others > summary:focus-visible, details.ans-review > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ans-n { display: inline-block; min-width: 1.5em; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--surface2, var(--bg));
  font-size: .78rem; text-align: center; color: var(--muted); }
.ans-tag { margin-left: 6px; font-weight: 500; font-size: .8rem; color: var(--muted); }
ul.ans-wrong { list-style: none; margin: 0; padding: 6px 13px 10px; font: 400 .98rem/1.55 var(--serif); color: var(--expl, var(--ink)); }
ul.ans-wrong li { display: grid; grid-template-columns: 1.6em 1fr; gap: 4px; padding: 6px 0; }
ul.ans-wrong li + li { border-top: 1px solid var(--line); }
.ans-l { font: 700 .9rem/1.6 var(--ui, var(--sans)); color: var(--bad); }
.ans-review-body { padding: 4px 13px 12px; }
.ans-review-body > .counter:first-child, .ans-review-body > .krev + .counter { margin-top: 10px; }
.ans-review-body details.anki-exp { margin: 12px 0 4px; }

/* a disputed or changed key, kept in view above the box (same look as inside the explanation) */
.ans-flags .krev { padding: 8px 11px; border-radius: 6px; margin: 12px 0 0; font-size: 13.5px; }
.ans-flags .krev-revised { background: var(--bad-bg); border-left: 3px solid var(--bad); }
.ans-flags .krev-disputed { background: var(--surface); border-left: 3px solid var(--flag); }
.ans-flags .krev-src { color: var(--muted); font-size: 12px; }
.ans-flags .krev-why { margin-top: 5px; font-size: 13px; color: var(--muted); }

/* the explanation's own top rule sits under the box now */
.ans-box ~ .expl, .ans-others ~ .expl { margin-top: 14px; }
html.dn-c .ans-box { padding: 10px 13px 9px; margin-top: 10px; }
html.dn-s .ans-box { padding: 18px 20px 16px; margin-top: 22px; }

/* ---- Minimised question header (cardbar.js, 11 Nov 2026) ---- */
.cardtop > .cb-btn { position: absolute; top: 8px; right: 0; z-index: 2; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font: 500 11.5px/1.4 var(--ui, var(--sans)); cursor: pointer; }
.cardtop > .cb-btn:hover { color: var(--ink); border-color: var(--muted); }
.cardtop > .cb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cardtop > h1 { padding-right: 96px; }
/* minimised and not hovered: one line — deck name, "3 of 25 · Questions", the flag dots */
html.cb-min .cardtop:not(.cb-open) { display: flex; align-items: baseline; gap: 14px; padding: 6px 30px 4px 0; cursor: default;
  border-bottom: 1px solid var(--line); }
html.cb-min .cardtop:not(.cb-open) > :not(h1):not(.cardhead) { display: none !important; }
html.cb-min .cardtop:not(.cb-open) > h1 { flex: 0 1 auto; min-width: 0; margin: 0; padding: 0; font-size: 1.05rem; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.cb-min .cardtop:not(.cb-open) > .cardhead { flex: 1 1 auto; margin: 0; }
html.cb-min .cardtop:not(.cb-open)::after { content: "\25BE"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 14px; pointer-events: none; }
/* opened by hover / tap: the full bar drops over the question with a shadow */
html.cb-min .cardtop.cb-open { box-shadow: 0 14px 22px -14px rgba(0, 0, 0, .45); border-bottom: 1px solid var(--line); padding-bottom: 4px; }
@media (max-width: 699px) { html.cb-min .cardtop:not(.cb-open) > .cardhead .ch-last { display: none; } }
html.cb-min .cardtop h1 { transition: none; }   /* the bar is measured the moment it opens */
