/* AZF-Trainer: baut auf /assets/site.css auf und ergänzt nur die Elemente der Anwendung. */
:root {
  --surface: rgba(255, 255, 255, .92); --solid: #fffdf9; --muted: #6a5550; --line: #d9d0c3; --grid: #ebe5da;
  --accent: #4c3602; --on-accent: #ffffff; --select: #fbf1d6;
  --ok: #0b6e4f; --ok-bg: #ddf1e8; --bad: #b3261e; --bad-bg: #fbe3e0;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--topbar); outline-offset: 2px; }
main { padding-block: clamp(20px, 5vh, 56px); }
.trainer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; width: 100%; max-width: 760px; }
.screen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.site-nav { align-items: center; }
.header-right { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-weight: 400; }
h2 { margin: 0; font-size: 22px; line-height: 1.25; outline: none; }
h3 { margin: 0; color: var(--ink-strong); font-size: 17px; }
p { margin: 0; }
.muted, .facts { color: var(--muted); font-size: 15px; }
.tally { color: var(--muted); font: 500 13px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.panel { display: grid; gap: 12px; max-width: none; min-width: 0; padding: 18px 20px; background: var(--surface); }
.panel.wide { max-width: none; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 16px; }
.trainer-note { gap: 6px; color: var(--muted); font-size: 14px; }
#syncState { color: var(--ink-strong); font-weight: 600; }
#syncState:empty { display: none; }
#app > p { padding: 12px 20px; background: var(--surface); }

.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; border-bottom: 1px solid var(--line); }
.tab { padding: 8px 0; background: none; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink-strong); border-bottom-color: var(--gold); }
form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; color: var(--ink-strong); font-size: 15px; font-weight: 600; }
label small { color: var(--muted); font-weight: 400; }
input[type=text], input[type=password], input[type=number] { width: 100%; min-height: 44px; padding: 8px 10px; background: #fff; border: 1px solid var(--muted); border-radius: 0; font-weight: 400; }
.error { color: var(--bad); font-size: 15px; font-weight: 600; }
.error:empty, .message:empty { display: none; }
.good { color: var(--ok); font-size: 15px; font-weight: 600; }
.code { padding: 12px; background: var(--select); font: 500 18px/1.4 var(--mono); overflow-wrap: anywhere; user-select: all; }
.primary, .secondary { min-height: 46px; padding: 0 20px; font-weight: 600; cursor: pointer; }
.primary { background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); }
.primary:hover:not(:disabled) { background: var(--ink-strong); }
.primary:disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.secondary { background: transparent; border: 1px solid var(--ink-strong); color: var(--ink-strong); }
.quiet { padding: 4px 0; background: none; border: 0; color: var(--gold-dark); text-decoration: underline; cursor: pointer; }
.site-nav .quiet { color: var(--ink-strong); font-weight: 600; }
.danger { color: var(--bad); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.chart { position: relative; height: 200px; margin-left: 30px; container-type: inline-size; }
.plot { position: absolute; inset: 22px 0 24px 0; }
.gridline { position: absolute; left: 0; right: 0; height: 1px; background: var(--grid); }
.gridline.base { background: var(--muted); }
.gridline span { position: absolute; right: 100%; top: -8px; padding-right: 7px; color: var(--muted); font: 500 11px/16px var(--mono); }
.cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 2px; }
.col { position: relative; height: 100%; }
.col:hover { background: var(--select); }
.bar-mark { position: absolute; bottom: 0; left: 50%; width: min(34px, 62%); transform: translateX(-50%); background: var(--gold); border-radius: 4px 4px 0 0; }
.bar-val { position: absolute; left: 0; right: 0; color: var(--ink-strong); text-align: center; font: 500 13px/18px var(--mono); }
.bar-name { position: absolute; left: 0; right: 0; top: calc(100% + 5px); color: var(--muted); font-size: 13px; line-height: 18px; text-align: center; white-space: nowrap; }
.bar-name .short { display: none; }
@container (max-width: 300px) { .bar-name .long { display: none; } .bar-name .short { display: inline; } }

.modes { display: grid; gap: 8px; padding: 18px 20px; background: var(--surface); }
.mode { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; width: 100%; padding: 12px 14px; color: var(--ink-strong); text-align: left; background: var(--solid); border: 1px solid var(--line); cursor: pointer; }
.mode:hover:not(:disabled) { border-color: var(--gold); background: var(--select); }
.mode b { font-weight: 600; }
.mode small { grid-column: 1; color: var(--muted); font-size: 14px; line-height: 1.3; }
.mode .n { grid-column: 2; grid-row: 1 / span 2; font: 500 18px/1 var(--mono); }
.mode.lead, .mode.lead:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.mode.lead small { color: inherit; }
.mode:disabled { background: transparent; color: var(--muted); cursor: not-allowed; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.boxes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.boxes .mode { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 4px; padding: 10px 4px; text-align: center; }
.boxes .mode .n { grid-column: 1; grid-row: auto; }

.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 6px 20px; background: var(--surface); }
.strip { background: var(--solid); border: 1px solid var(--ink-strong); }
.strip-head { display: flex; flex-wrap: wrap; color: var(--ink-strong); border-bottom: 1px solid var(--ink-strong); font: 500 13px/1.2 var(--mono); }
.strip-head > div { padding: 7px 12px; border-right: 1px solid var(--line); white-space: nowrap; }
.strip-head > div:last-child { flex: 1 1 auto; border-right: 0; color: var(--muted); text-align: right; }
.strip-head > div:empty { display: none; }
.question { padding: 20px 18px 18px; color: var(--ink-strong); font-size: 21px; font-weight: 600; line-height: 1.32; outline: none; overflow-wrap: anywhere; text-wrap: pretty; }
.option { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: start; width: 100%; padding: 12px 18px; color: var(--ink); text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line); cursor: pointer; }
.option:hover, .option[aria-pressed="true"] { background: var(--select); }
.letter { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--muted); font: 500 14px/1 var(--mono); }
.option-text { min-width: 0; padding-top: 3px; overflow-wrap: anywhere; }
.tag { display: block; font: 500 12px/1.4 var(--mono); }
.option[aria-pressed="true"] .letter { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.answered .option { cursor: default; }
.answered .option:hover, .answered .option[aria-pressed="true"] { background: transparent; }
.answered .option[aria-pressed="true"] .letter { background: transparent; border-color: var(--muted); color: inherit; }
.answered .option:not(.is-right):not(.is-wrong) .option-text { color: var(--muted); }
.answered .option.is-right, .answered .option.is-right:hover { background: var(--ok-bg); }
.answered .option.is-right .letter { background: var(--ok); border-color: var(--ok); color: #fff; }
.answered .option.is-right .tag { color: var(--ok); }
.answered .option.is-wrong, .answered .option.is-wrong:hover { background: var(--bad-bg); }
.answered .option.is-wrong .letter { background: var(--bad); border-color: var(--bad); color: #fff; }
.answered .option.is-wrong .tag { color: var(--bad); }
.explain { display: grid; gap: 12px; padding: 14px 18px; background: var(--select); border-top: 1px solid var(--line); }
.explain-text, .notice { display: grid; gap: 6px; }
.explain .reveal { justify-self: start; }
.notice { padding: 12px; background: var(--solid); border: 2px solid var(--gold); }
.explain .source { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.bar { position: sticky; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--solid); border-top: 1px solid var(--ink-strong); }
.verdict { flex: 1 1 240px; min-width: 0; color: var(--muted); font-size: 15px; line-height: 1.3; }
.verdict strong { display: block; font-size: 18px; letter-spacing: .03em; }
.verdict.right strong { color: var(--ok); }
.verdict.wrong strong { color: var(--bad); }
.score { color: var(--ink-strong); font-size: 38px; font-weight: 700; line-height: 1.1; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; }
.check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); text-align: left; }
.table-wrap { overflow-x: auto; }
@media (hover: none) { .keys { display: none; } }
@media (max-width: 520px) {
  .panel, .modes { padding: 14px 12px; }
  .crumbs { padding: 6px 12px; }
  .boxes { gap: 5px; }
  .bar-name { font-size: 12px; }
  .question { padding: 16px 14px; font-size: 19px; }
  .option { gap: 10px; padding: 11px 14px; }
  .bar { padding-left: 14px; padding-right: 14px; }
  .bar .primary, .row .primary, .row .secondary, form .primary { width: 100%; }
  .strip-head > div { padding: 7px 8px; }
}

select { width: 100%; min-height: 44px; padding: 8px 10px; background: #fff; border: 1px solid var(--muted); border-radius: 0; font: inherit; color: inherit; }
fieldset.module-picker { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.module-picker legend { padding: 0 0 4px; color: var(--ink-strong); font-weight: 600; }
.question-image { display: block; width: 72px; height: auto; margin-top: 12px; background: #fff; }
.panel + .quiet, #app > .quiet { justify-self: start; padding: 6px 20px; background: var(--surface); }

.stat-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stat-summary div, .stat-user { background: var(--solid); border: 1px solid var(--line); }
.stat-summary div { padding: 10px 12px; }
dt { color: var(--muted); font-size: 13px; }
dd { margin: 0; color: var(--ink-strong); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-summary dd { font-size: 22px; line-height: 1.2; }
.stat-list { display: grid; gap: 10px; }
.stat-user { display: grid; gap: 9px; padding: 12px; min-width: 0; }
.stat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; color: var(--ink-strong); }
.stat-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stack { display: flex; gap: 2px; height: 14px; background: var(--solid); }
.stack .seg { display: block; flex-basis: 0; min-width: 3px; }
.stack .seg:first-child { border-radius: 4px 0 0 4px; }
.stack .seg:last-child { border-radius: 0 4px 4px 0; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 13px; }
.stack-legend span { display: inline-flex; align-items: center; gap: 5px; }
.stack-legend i { display: block; width: 11px; height: 11px; }
.seg-0 { background: #e7e1d6; }
.seg-1 { background: #f5dd9b; }
.seg-2 { background: #efc656; }
.seg-3 { background: #d99c16; }
.seg-4 { background: #a2700f; }
.seg-5 { background: #5f4106; }
@media (max-width: 520px) {
  .stat-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.scope-note { margin: 0; font-size: 14px; color: var(--ink-strong); }
.club-note { margin: 0; padding: 10px 12px; background: var(--solid); border-left: 3px solid var(--gold); }
.access-tag { display: inline-block; padding: 0 6px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 400; vertical-align: middle; }
.trial-banner { border-left: 3px solid var(--gold); }
.trial-banner p { margin: 0; }
.access-list { margin: 0; padding-left: 20px; }
.buy { display: grid; gap: 10px; margin-top: 14px; padding: 14px; background: var(--solid); border: 1px solid var(--line); }
.buy h3 { margin: 0; }
.order-summary { display: grid; gap: 6px; margin: 0; }
.order-summary div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.order-summary dd { font-weight: 400; }
.check.is-soon { color: var(--muted); }
.check.is-soon b { color: var(--ink-strong); }
