/* ==========================================================================
   German Mock Tests — one stylesheet for the candidate site and the staff area.
   Contents: 1 tokens & base · 2 app shell · 3 components · 4 candidate pages
             5 exam runner · 6 sign-in & home · 7 staff area · 8 print · 9 motion
   Font: Inter (self-hosted, assets/fonts). No external requests are made (strict CSP).
   ========================================================================== */

/* ---------- 1. tokens & base ---------- */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var-latin.woff") format("woff");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy-950: #081230;
  --navy-900: #0c1a3d;
  --navy-800: #12234f;
  --navy-700: #1b3068;
  --blue-700: #1b45c9;
  --blue-600: #2554e8;
  --blue-500: #3b6cff;
  --blue-100: #e3ebff;
  --blue-50: #f1f5ff;
  --indigo-500: #5b5bf0;

  --ink: #0f1b3d;
  --ink-2: #34426a;
  --muted: #5d6a8a;
  --faint: #8d98b3;
  --line: #e2e7f2;
  --line-2: #edf0f7;
  --bg: #f4f6fb;
  --card: #ffffff;

  --green-600: #0d7f45;
  --green-500: #13a05a;
  --green-100: #dff6e9;
  --green-700: #0b6b3b;
  --teal-600: #0e9488;
  --teal-700: #0a7468;
  --teal-100: #d9f3ef;
  --violet-600: #6d4ae8;
  --violet-100: #ece7ff;
  --violet-700: #5236c4;
  --orange-600: #d96d00;
  --orange-100: #fff0dc;
  --orange-700: #9a4f00;
  --red-600: #e0383e;
  --red-100: #fde6e7;
  --red-700: #b4232a;
  --amber-100: #fff5d6;
  --amber-700: #7d5200;

  --flag-black: #151515;
  --flag-red: #dd0000;
  --flag-gold: #ffce00;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --shadow-1: 0 1px 2px rgba(15, 27, 61, .05), 0 2px 10px rgba(15, 27, 61, .04);
  --shadow-2: 0 1px 2px rgba(15, 27, 61, .06), 0 16px 36px -16px rgba(15, 27, 61, .28);
  --focus: 0 0 0 3px rgba(37, 84, 232, .3);
  --side-w: 248px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 15px/1.55 var(--font);
  letter-spacing: -.006em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; color: var(--ink); }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.25rem; }
h3, .h3 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -.015em; }
h4, .h4 { font-size: .9375rem; font-weight: 700; }
p { margin: 0 0 .85em; }
ul, ol { margin: 0 0 .85em; padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code { font: 500 .85em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #eef1f8; padding: 2px 6px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.lead { font-size: 1.0625rem; color: var(--ink-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.text-warn { color: var(--amber-700); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; text-decoration: none; }
[hidden] { display: none !important; }
.icon { flex: none; vertical-align: middle; }

/* ---------- 2. app shell ---------- */
.shell { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--side-w);
  display: flex; flex-direction: column; gap: 4px; padding: 20px 14px 16px;
  background: linear-gradient(185deg, #10224e 0%, var(--navy-900) 38%, var(--navy-950) 100%);
  color: #c5d0ee; overflow-y: auto;
}
.side-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 4px 8px 20px; margin-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .09); }
.side-brand:hover { text-decoration: none; }
.side-tag { font-size: .75rem; font-weight: 600; color: #b9c7ef; background: rgba(255, 255, 255, .09); padding: 3px 10px; border-radius: 999px; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-link {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: #c5d0ee; font-weight: 500; transition: background .15s, color .15s;
}
.side-link:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.side-link.is-active { color: #fff; background: linear-gradient(90deg, rgba(59, 108, 255, .38), rgba(59, 108, 255, .1)); }
.side-link.is-active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--blue-500); }
.side-link .count { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--flag-gold); color: #231a00; font-size: .75rem; font-weight: 700; text-align: center; }
.side-note { margin-top: auto; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .08); font-size: .8125rem; color: #b9c7ef; }
.side-note p { margin: 8px 0 8px; }
.side-note strong { color: #fff; }
.side-note a { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 600; }
.side-note-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(255, 206, 0, .16); color: var(--flag-gold); }

.shell-main { margin-left: var(--side-w); min-height: 100vh; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 64px; padding: 0 32px;
  background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .topbar-brand, .topbar .side-toggle { display: none; }
.topbar-date { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .875rem; font-weight: 500; }
.topbar-right { margin-left: auto; }
.content { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 28px 32px 44px; }
.content--wide { max-width: 1400px; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(8, 18, 48, .55); }

.iconbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.iconbtn:hover { background: var(--blue-50); }

.avatar { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--blue-500), var(--indigo-500)); color: #fff; font-weight: 700; font-size: .8125rem; letter-spacing: 0; }
.avatar--lg { width: 64px; height: 64px; font-size: 1.35rem; }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { background: var(--bg); border-color: var(--line); }
.usermenu-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.usermenu-name { font-weight: 600; font-size: .875rem; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-sub { font-size: .75rem; color: var(--muted); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usermenu-caret { color: var(--muted); transition: transform .2s; }
.usermenu[open] .usermenu-caret { transform: rotate(180deg); }
.usermenu-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; min-width: 220px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-2); }
.usermenu-pop a, .usermenu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--bg); text-decoration: none; }
.usermenu-pop .icon { color: var(--muted); }

.foot { margin-top: auto; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .6); }
.foot-in { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 16px 32px; color: var(--muted); font-size: .8125rem; }
.credit strong { color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.credit::before { content: "</>"; margin-right: 8px; padding: 1px 6px; border-radius: 6px; background: var(--navy-900); color: var(--flag-gold); font: 700 .6875rem/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; }

.page-head { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: flex-end; margin-bottom: 24px; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.page-actions, .block-actions, .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.block-head { display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; align-items: flex-end; margin: 36px 0 14px; }
.block-head:first-child { margin-top: 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; padding: 0; list-style: none; font-size: .8125rem; color: var(--muted); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 6px; color: var(--faint); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

.app--bare, .app--focus { background: var(--bg); }
.barebar { display: flex; justify-content: center; padding: 28px 16px 0; }
.bare-main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; }
.fail { text-align: center; }
.fail-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 16px; background: var(--amber-100); color: var(--amber-700); }
.narrow { max-width: 640px; margin: 0 auto; }
.narrow--wide { max-width: 860px; }

@media (max-width: 1023px) {
  .side { transform: translateX(-104%); visibility: hidden; transition: transform .26s ease, visibility 0s .26s; box-shadow: 24px 0 48px -12px rgba(8, 18, 48, .5); }
  .side.is-open { transform: none; visibility: visible; transition: transform .26s ease; }
  .shell-main { margin-left: 0; }
  .topbar .side-toggle, .topbar .topbar-brand { display: inline-grid; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-date { display: none; }
  .content { padding: 22px 16px 36px; }
  .foot-in { padding: 14px 16px; }
}
@media (max-width: 640px) {
  .usermenu-text, .usermenu-caret { display: none; }
  .usermenu summary { padding: 3px; }
  h1 { font-size: 1.5rem; }
}

/* ---------- 3. components ---------- */
.sheet { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.sheet--pad { padding: 24px; }
.sheet + .sheet { margin-top: 18px; }
.two-col > .sheet + .sheet { margin-top: 0; }
.grid2 > .sheet, .grid3 > .sheet, .dash-grid > .sheet, .dash-grid > .chart-card { margin-top: 0; }
.sheet > h2:first-child, .sheet > .h3:first-child { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.grid2--eq { align-items: stretch; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.span2 { grid-column: span 2; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 20px; align-items: start; }
@media (max-width: 900px) { .grid2, .grid3, .two-col { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; } }
.prose p { max-width: 70ch; }
.plain-list { margin: 0; padding: 0; list-style: none; }
.plain-list li { padding: 6px 0; }
.inline { display: inline; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
  font: 600 .9375rem/1 var(--font); letter-spacing: -.005em; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.btn:hover { background: var(--blue-50); border-color: #c5d3f6; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; box-shadow: 0 6px 14px -7px rgba(37, 84, 232, .75); }
.btn--primary:hover { background: var(--blue-700); border-color: var(--blue-700); }
.btn--white { background: #fff; border-color: #fff; color: var(--blue-700); box-shadow: 0 8px 20px -8px rgba(8, 18, 48, .5); }
.btn--white:hover { background: #f3f6ff; border-color: #f3f6ff; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--blue-600); }
.btn--ghost:hover { background: var(--blue-50); border-color: transparent; }
.btn--danger { color: var(--red-700); border-color: #f1c2c5; }
.btn--danger:hover { background: var(--red-100); border-color: #eaa4a8; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: .8125rem; border-radius: 8px; gap: 6px; }
.btn--lg { min-height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 12px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--blue-600); font: inherit; font-weight: 600; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* chips, levels, skill badges */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #edf0f8; color: var(--ink-2); font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.chip--pass { background: var(--green-100); color: var(--green-700); }
.chip--fail { background: var(--red-100); color: var(--red-700); }
.chip--wait { background: var(--amber-100); color: var(--amber-700); }
.chip--info { background: var(--blue-100); color: var(--blue-700); }
.chip--lesen { background: var(--teal-100); color: var(--teal-700); }
.chip--hoeren { background: var(--violet-100); color: var(--violet-700); }
.chip--schreiben { background: var(--orange-100); color: var(--orange-700); }
.level { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 8px; border-radius: 12px; font-weight: 800; font-size: .9375rem; letter-spacing: -.02em; color: #fff; background: var(--navy-700); }
.level--a1 { background: #0369a1; }
.level--a2 { background: #0d7f45; }
.level--b1 { background: #2563eb; }
.level--b2 { background: #4f46e5; }
.level--c1 { background: #7c3aed; }
.level--c2 { background: #c026d3; }
.skill-badge { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; }
.skill-badge--lesen { background: var(--teal-100); color: var(--teal-700); }
.skill-badge--hoeren { background: var(--violet-100); color: var(--violet-600); }
.skill-badge--schreiben { background: var(--orange-100); color: var(--orange-700); }

/* progress */
.progress { height: 8px; border-radius: 999px; background: #e9edf7; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue-500), var(--indigo-500)); transition: width .5s ease; }
.progress--lesen > i { background: var(--teal-600); }
.progress--pass > i { background: var(--green-500); }
.progress--hoeren > i { background: var(--violet-600); }
.progress--schreiben > i { background: var(--orange-600); }
.progress--fail > i { background: var(--red-600); }

/* notices */
.notices { display: grid; gap: 10px; margin-bottom: 20px; }
.notice { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 16px; border-radius: 12px; border: 1px solid; font-size: .9rem; }
.notice .icon { margin-top: 2px; }
.notice--ok { background: #ecfaf2; border-color: #bfe8d0; color: var(--green-700); }
.notice--error { background: #fff0f0; border-color: #f5c6c8; color: var(--red-700); }
.notice--warn { background: #fff8e3; border-color: #f2dc9b; color: var(--amber-700); }
.notice--info { background: var(--blue-50); border-color: #cddbfb; color: var(--blue-700); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%); box-shadow: var(--shadow-2); max-width: calc(100% - 32px); }

/* forms */
.field { margin: 0 0 16px; }
.field > label, .label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .8125rem; color: var(--ink); }
.req { color: var(--red-600); }
.help { margin: 6px 0 0; color: var(--muted); font-size: .8125rem; }
.help--check { display: block; margin: 4px 0 0 30px; }
.input {
  display: block; width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid #cbd4e7; border-radius: 10px;
  background: #fff; color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #a9b6d4; }
.input:focus { outline: none; border-color: var(--blue-600); box-shadow: var(--focus); }
.input::placeholder { color: var(--faint); }
.input[readonly], .input[disabled] { background: #f3f5fa; color: var(--muted); }
textarea.input { min-height: 112px; line-height: 1.5; resize: vertical; }
select.input { padding-right: 40px; appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d6a8a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.input--num { max-width: 120px; }
.inputrow { display: flex; gap: 8px; }
.inputrow .input { flex: 1; min-width: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
/* a long button label wraps on a narrow screen instead of pushing the page wider than the screen */
.form-actions .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-top: 9px; padding-bottom: 9px; }
.field audio, .current-file + audio { display: block; width: 100%; max-width: 100%; }
.check { position: relative; display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border: 1.5px solid #a9b6d4; border-radius: 6px; background: #fff; color: transparent; transition: .15s; }
.check input:checked + .check-box { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.check input:focus-visible + .check-box { box-shadow: var(--focus); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pwfield { position: relative; }
.pwfield .input { padding-right: 48px; }
.pwtoggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pwtoggle:hover { background: var(--bg); color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filters .field { margin: 0; min-width: 150px; }
.filters .field--grow { flex: 1; min-width: 200px; }

/* tables */
.tablewrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th { padding: 12px 16px; text-align: left; font-size: .75rem; font-weight: 600; color: var(--muted); background: #f8f9fd; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fafbff; }
.table th.num, .table td.num { text-align: right; }
.table td.actions, .table th.actions { display: table-cell; text-align: right; white-space: nowrap; }
.table td.actions > * + * { margin-left: 6px; }
.table td .actions { justify-content: flex-end; flex-wrap: nowrap; }
.table .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.table .who b { display: block; font-weight: 600; }
.table .who small { display: block; color: var(--muted); font-size: .8125rem; }
.score { font-weight: 700; font-variant-numeric: tabular-nums; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.pager a, .pager span { display: inline-grid; place-items: center; min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .875rem; }
.pager a:hover { background: var(--blue-50); text-decoration: none; }
.pager .is-cur { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.pager .is-off { color: var(--faint); background: transparent; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); }
.empty .icon { display: block; margin: 0 auto 10px; color: var(--faint); }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 10px; }

/* the table turns into a list of cards where it does not fit (assets/js/app.js decides) */
.table.is-cards, .table.is-cards tbody, .table.is-cards tr, .table.is-cards td { display: block; width: 100%; }
.table.is-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.table.is-cards tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table.is-cards tbody tr:last-child { border-bottom: 0; }
.table.is-cards td { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; border: 0; text-align: right; }
.table.is-cards td::before { content: attr(data-label); flex: none; max-width: 45%; color: var(--muted); font-size: .75rem; font-weight: 600; text-align: left; }
.table.is-cards td[data-label=""]::before, .table.is-cards td.is-empty { display: none; }
.table.is-cards td.actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.table.is-cards td.actions > * + * { margin-left: 0; }
.table.is-cards td .who { text-align: left; }
.table.is-cards td .cell { min-width: 0; }
.table.is-cards td.is-long { flex-direction: column; align-items: stretch; gap: 3px; text-align: left; }
.table.is-cards td.is-long::before { max-width: none; }
.table.is-cards tbody tr:hover td { background: none; }

/* tabs */
.tabs { display: flex; gap: 6px; padding: 5px; overflow-x: auto; background: #e9edf7; border-radius: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 38px; padding: 0 18px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 600 .875rem/1 var(--font); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .6); text-decoration: none; }
.tab.is-active { background: #fff; color: var(--blue-700); box-shadow: 0 1px 2px rgba(15, 27, 61, .12); }
a.tab { display: inline-flex; align-items: center; }

/* details */
.more { margin-top: 14px; }
.more summary { cursor: pointer; font-weight: 600; color: var(--blue-600); }
.steps { padding-left: 1.3em; }
.steps li { margin-bottom: .5em; }
.checks { margin: 0 0 16px; padding: 0; list-style: none; }
.checks li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.checks-state { flex: none; min-width: 88px; font-weight: 700; font-size: .8125rem; }
.checks .is-ok .checks-state { color: var(--green-700); }
.checks .is-bad .checks-state { color: var(--red-700); }
.checks .is-warn .checks-state { color: var(--amber-700); }

/* ---------- 4. candidate pages ---------- */
.welcome { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.welcome-title { font-size: 1.875rem; font-weight: 800; letter-spacing: -.03em; }
.welcome-name { color: var(--blue-600); }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.4s ease-in-out 0.6s 2; }
.welcome-sub { margin: 6px 0 0; color: var(--muted); font-size: 1rem; }

.hero {
  position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 12px;
  min-height: 230px; padding: 34px 40px; border-radius: var(--r-xl); color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(520px 260px at 92% 0%, rgba(120, 140, 255, .55), transparent 70%), linear-gradient(120deg, #1741c9 0%, #2e5bf0 52%, #5a63f2 100%);
  box-shadow: 0 24px 48px -26px rgba(37, 84, 232, .75);
}
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255, 255, 255, .16) 1.2px, transparent 1.4px); background-size: 22px 22px; -webkit-mask-image: linear-gradient(100deg, #000 0%, transparent 62%); mask-image: linear-gradient(100deg, #000 0%, transparent 62%); }
.hero h2 { color: #fff; font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; max-width: 18ch; }
.hero p { margin: 10px 0 0; color: rgba(255, 255, 255, .86); max-width: 46ch; }
.hero-levels { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 22px; }
.hero-levels a { display: inline-grid; place-items: center; min-width: 46px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .12); color: #fff; font-weight: 700; font-size: .875rem; transition: background .15s, transform .15s; }
.hero-levels a:hover { background: rgba(255, 255, 255, .26); text-decoration: none; transform: translateY(-1px); }
.hero-art { align-self: stretch; display: flex; align-items: center; justify-content: center; min-height: 160px; }
.hero-art svg { width: 100%; max-width: 360px; height: auto; overflow: visible; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 20px 0 0; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.stat-ic { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 14px; background: var(--blue-100); color: var(--blue-600); }
.stat-ic--green { background: var(--green-100); color: var(--green-600); }
.stat-ic--violet { background: var(--violet-100); color: var(--violet-600); }
.stat-ic--orange { background: var(--orange-100); color: var(--orange-700); }
.stat-ic--red { background: var(--red-100); color: var(--red-600); }
.stat-num { font-size: 1.625rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.stat-note { margin-top: 2px; color: var(--muted); font-size: .75rem; }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding: 26px 22px; }
  .hero-art { display: none; }
  .hero h2 { font-size: 1.5rem; }
  .welcome-title { font-size: 1.5rem; }
}
@media (max-width: 420px) { .stat { padding: 14px; gap: 10px; } .stat-ic { width: 40px; height: 40px; } .stat-num { font-size: 1.35rem; } }

.skills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.skill { display: flex; flex-direction: column; gap: 10px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); color: var(--ink); transition: transform .18s, box-shadow .18s, border-color .18s; }
.skill:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: #cfd8ee; text-decoration: none; }
.skill-top { display: flex; align-items: center; gap: 12px; }
.skill-top .skill-badge { width: 44px; height: 44px; border-radius: 12px; }
.skill h3 { font-size: 1.0625rem; }
.skill-meta { margin: 0; color: var(--muted); font-size: .8125rem; }
.skill-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 2px; font-size: .8125rem; color: var(--muted); }
.skill-foot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.skill-go { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--blue-600); }
.skill--lesen .skill-go { color: var(--teal-700); }
.skill--hoeren .skill-go { color: var(--violet-600); }
.skill--schreiben .skill-go { color: var(--orange-700); }
.skill.is-empty { background: transparent; border-style: dashed; box-shadow: none; }
.skill.is-empty:hover { transform: none; box-shadow: none; }
.prep-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 36px 0 0; }
@media (max-width: 900px) { .skills { grid-template-columns: minmax(0, 1fr); } .skill { flex-direction: row; flex-wrap: wrap; align-items: center; } .skill-top { flex: 1 1 100%; } }

/* resume strip */
.resume { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 20px; padding: 18px 22px; border-radius: var(--r-lg); border: 1px solid #f2dc9b; background: #fffaf0; }
.resume-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #ffe9a8; color: var(--amber-700); }
.resume-main { flex: 1; min-width: 200px; }
.resume-main h3 { margin-bottom: 2px; }
.resume-main p { margin: 0; color: var(--ink-2); font-size: .875rem; }

/* mock tests list */
.testlist { display: grid; gap: 16px; }
.filterbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.skillfilter { display: flex; flex-wrap: wrap; gap: 8px; }
.chipbtn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #cbd4e7; background: #fff; color: var(--ink-2); font: 600 .8125rem/1 var(--font); white-space: nowrap; transition: background .15s, border-color .15s; }
.chipbtn:hover { background: var(--blue-50); border-color: #a9b6d4; text-decoration: none; }
.chipbtn.is-active { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.chipbtn--lesen.is-active { background: var(--teal-700); border-color: var(--teal-700); }
.chipbtn--hoeren.is-active { background: var(--violet-600); border-color: var(--violet-600); }
.chipbtn--schreiben.is-active { background: var(--orange-700); border-color: var(--orange-700); }
.tcard { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.tcard-head { display: flex; gap: 16px; align-items: flex-start; }
.tcard-title { flex: 1; min-width: 0; }
.tcard-title h3 { font-size: 1.125rem; }
.tcard-title p { margin: 4px 0 0; color: var(--muted); font-size: .875rem; max-width: 70ch; }
.tcard-act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.tcard-parts { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.tcard-parts li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 10px; font-size: .8125rem; font-weight: 600; }
.tcard-parts .skill-badge { width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .7); }
.tcard-parts .skill-badge .icon { width: 16px; height: 16px; }
.tcard-parts .is-lesen { background: var(--teal-100); color: var(--teal-700); }
.tcard-parts .is-hoeren { background: var(--violet-100); color: var(--violet-700); }
.tcard-parts .is-schreiben { background: var(--orange-100); color: var(--orange-700); }
.tcard-parts span.muted { font-weight: 500; opacity: .85; }
.tcard-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: .8125rem; }
.tcard-foot b { color: var(--ink); }
.tcard-foot .fact { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 700px) { .tcard-head { flex-wrap: wrap; } .tcard-act { flex-direction: row; align-items: center; width: 100%; } .tcard-act .btn { flex: 1; } }

.facts { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.fact-box { display: flex; align-items: center; gap: 12px; padding: 12px 18px 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); min-width: 150px; }
.fact-box .icon { color: var(--blue-600); }
.fact-box b { display: block; font-size: 1.0625rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.fact-box span { color: var(--muted); font-size: .75rem; }

/* parts of one test */
.parts-list { display: grid; gap: 14px; }
.part { display: flex; gap: 16px; align-items: center; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.part .skill-badge { width: 52px; height: 52px; border-radius: 14px; }
.part-main { flex: 1; min-width: 0; }
.part-main h3 { margin-bottom: 2px; }
.part-main p { margin: 0 0 2px; }
.part-act { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.part.is-running { border-color: #f2dc9b; background: #fffdf6; }
.part.is-done { background: #fbfcff; }
.finish { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 26px; padding: 20px 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.finish p { margin: 0; }
@media (max-width: 640px) { .part { flex-wrap: wrap; } .part-act { flex-direction: row; align-items: center; width: 100%; } .part-act .btn, .part-act form { flex: 1; } .part-act form .btn { width: 100%; } }

/* result page */
.result-hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 32px; }
.result-ring { position: relative; width: 168px; height: 168px; }
.result-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: #e9edf7; }
.ring-fill { fill: none; stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--o); animation: ring-in 1.1s cubic-bezier(.2, .7, .2, 1) both; }
.ring--pass .ring-fill { stroke: var(--green-500); }
.ring--fail .ring-fill { stroke: var(--red-600); }
.ring--wait .ring-fill { stroke: var(--orange-600); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label b { font-size: 2.25rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-label span { margin-top: 4px; color: var(--muted); font-size: .8125rem; font-weight: 600; }
.result-test { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 8px; color: var(--muted); font-size: .875rem; }
.result-verdict { font-size: 2rem; letter-spacing: -.035em; }
.result-verdict small { display: block; margin-top: 4px; font-size: 1rem; font-weight: 500; letter-spacing: -.01em; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.split { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.split-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.split-item .icon { flex: none; }
.split-item b { display: block; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.split-item span { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.split-item--ok .icon { color: var(--green-500); }
.split-item--bad .icon { color: var(--red-600); }
.split-item--skip .icon { color: var(--faint); }
.bar-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; }
.bar-row + .bar-row { border-top: 1px solid var(--line-2); }
.bar-row .bar-name { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: .875rem; min-width: 0; }
.bar-row .bar-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar-name .skill-badge { width: 30px; height: 30px; border-radius: 9px; }
.bar-row .bar-val { min-width: 74px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .875rem; }
.bar-row .bar-val small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; }
.timebar { position: relative; height: 10px; border-radius: 999px; background: #e9edf7; overflow: hidden; }
.timebar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--blue-500); }
@media (max-width: 760px) {
  .result-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 24px 20px; }
  .result-test, .result-actions { justify-content: center; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-row .progress, .bar-row .timebar { grid-column: 1 / -1; grid-row: 2; }
}

/* grade scale */
.scale { margin: 0; padding-top: 36px; }
.scale-bar { position: relative; display: flex; height: 14px; border-radius: 999px; background: #e9edf7; }
.scale-seg { display: block; min-width: 2px; height: 100%; }
.scale-seg:first-child { border-radius: 999px 0 0 999px; }
.scale-seg:nth-last-child(2) { border-radius: 0 999px 999px 0; }
.scale-seg--fail { background: #f3a7aa; }
.scale-seg--sufficient { background: #f5d37b; }
.scale-seg--satisfactory { background: #cfe48f; }
.scale-seg--good { background: #86cf9f; }
.scale-seg--excellent { background: #3fb27a; }
.scale-marker { position: absolute; top: -5px; width: 0; }
.scale-marker::before { content: ""; position: absolute; left: -2px; top: 0; width: 4px; height: 24px; border-radius: 2px; background: var(--ink); }
.scale-flag { position: absolute; left: 0; top: -28px; transform: translateX(-50%); padding: 2px 8px; border-radius: 8px; background: var(--ink); color: #fff; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.scale--prov .scale-marker::before, .scale--prov .scale-flag { background: var(--orange-600); }
.scale-ticks { position: relative; height: 22px; margin-top: 16px; color: var(--muted); font-size: .75rem; font-variant-numeric: tabular-nums; }
.scale-ticks span { position: absolute; transform: translateX(-50%); }
.scale-ticks span:first-child { transform: none; }
.scale-ticks span:last-child { transform: translateX(-100%); }
@media (max-width: 520px) { .scale-ticks .minor { display: none; } }
.scale-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; padding: 0; list-style: none; font-size: .8125rem; color: var(--muted); }
.scale-legend .is-cur { color: var(--ink); font-weight: 700; }
.sw { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 4px; vertical-align: -1px; }
.sw--fail { background: #f3a7aa; } .sw--sufficient { background: #f5d37b; } .sw--satisfactory { background: #cfe48f; } .sw--good { background: #86cf9f; } .sw--excellent { background: #3fb27a; }

/* answer review */
.review { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.review > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; }
.review > summary::-webkit-details-marker { display: none; }
.review > summary:hover { background: #fafbff; }
.review-title { flex: 1; font-weight: 700; }
.review-score { color: var(--muted); font-size: .8125rem; font-weight: 600; }
.review-caret { color: var(--muted); transition: transform .2s; }
.review[open] .review-caret { transform: rotate(180deg); }
.review-body { padding: 4px 20px 20px; border-top: 1px solid var(--line-2); }
.review-passage { margin: 16px 0 8px; padding: 14px 16px; border-radius: var(--r-md); background: #f7f9fe; border: 1px solid var(--line-2); }
.passage-body { white-space: normal; max-width: 75ch; }
.passage-body--clip { max-height: 280px; overflow: auto; }
.transcript { margin-top: 10px; }
.transcript summary { cursor: pointer; font-weight: 600; color: var(--blue-600); }
.rq { margin-top: 16px; padding: 16px; border-radius: var(--r-md); border: 1px solid var(--line); }
.rq.is-right { border-color: #bfe8d0; background: #f6fcf9; }
.rq.is-wrong { border-color: #f5c6c8; background: #fffafa; }
.rq-q { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 10px; font-weight: 600; }
.rq-q > span:nth-child(2) { flex: 1; }
.rq-no { display: inline-grid; place-items: center; flex: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--navy-900); color: #fff; font-size: .8125rem; font-weight: 700; }
.rq-mark { flex: none; }
.is-right .rq-mark { color: var(--green-500); }
.is-wrong .rq-mark { color: var(--red-600); }
.is-skipped .rq-mark { color: var(--faint); }
.rq-opts { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.rq-opts li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line-2); }
.rq-opts li.is-correct { border-color: #8fd3ad; background: #ecfaf2; }
.rq-opts li.is-chosen:not(.is-correct) { border-color: #f0a9ad; background: #fff0f0; }
.rq-text { flex: 1; }
.rq-flag { flex: none; font-size: .75rem; font-weight: 700; color: var(--muted); }
.rq-note { margin: 10px 0 0; color: var(--ink-2); font-size: .875rem; }
.opt-key { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: #edf0f8; color: var(--ink-2); font-weight: 700; font-size: .8125rem; }

/* writing result */
.wr { margin-top: 12px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.wr-head { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 10px; }
.wr-head h3 { flex: 1; min-width: 160px; }
.wr-text { margin: 0; padding: 14px 16px; border-radius: var(--r-md); background: #f7f9fe; border: 1px solid var(--line-2); white-space: pre-wrap; word-wrap: break-word; font: inherit; max-width: 78ch; }
.wr-text--sample { background: #f2fbf6; border-color: #bfe8d0; }
.rq .wr-text { margin-top: 4px; }
.wr-feedback { margin-top: 12px; padding: 14px 16px; border-radius: var(--r-md); background: #fff8ea; border: 1px solid #f4dfae; }
.wr-feedback b { display: block; margin-bottom: 4px; }

.feedback .rate { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; padding: 0; border: 0; }
.rate-opt { position: relative; }
.rate-opt input { position: absolute; opacity: 0; }
.rate-opt span { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; border: 1px solid #cbd4e7; background: #fff; font-weight: 700; cursor: pointer; }
.rate-opt input:checked + span { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.rate-opt input:focus-visible + span { box-shadow: var(--focus); }

/* history table helpers */
.mini-score { display: inline-flex; align-items: center; gap: 10px; min-width: 150px; }
.mini-score .progress { flex: 1; min-width: 60px; }
.mini-score b { min-width: 44px; text-align: right; font-variant-numeric: tabular-nums; }

/* profile & help */
.profile-card { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; padding: 24px; }
.profile-card h2 { font-size: 1.25rem; }
.faq details { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 10px 0 0; color: var(--ink-2); }
.tips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tip { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.tip .skill-badge { margin-bottom: 12px; }
.tip h3 { margin-bottom: 6px; }
.tip p { margin: 0; color: var(--ink-2); font-size: .875rem; }
@media (max-width: 900px) { .tips { grid-template-columns: minmax(0, 1fr); } }

/* ---------- 5. exam screens: the page frame (version 2.3: everything of the exam itself is in exam.css) ---------- */
body.app--focus, body.app--bare { min-height: 100vh; display: flex; flex-direction: column; }
.focus-main { flex: 1; width: 100%; padding: 0 0 40px; }
.app--focus .foot-in { max-width: 1320px; padding-left: 24px; padding-right: 24px; }
.passage-body { line-height: 1.7; } /* also used by the answer review and the staff part page */
@media (max-width: 640px) {
  .focus-main { padding: 0 0 32px; }
  .app--focus .foot-in { padding-left: 14px; padding-right: 14px; }
}

/* ---------- 6. sign-in and home ---------- */
.app--auth { background: var(--navy-950); }
.flagbar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; height: 5px; overflow: hidden; background: linear-gradient(90deg, var(--flag-black) 0 33.34%, var(--flag-red) 33.34% 66.67%, var(--flag-gold) 66.67% 100%); }
.flagbar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-100%); animation: sheen 7s ease-in-out 1.5s infinite; }

.home {
  position: relative; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(400px, .8fr);
  grid-template-areas: "top login" "stage login" "foot login"; grid-template-rows: auto 1fr auto; color: #fff; overflow: hidden; isolation: isolate;
  background: radial-gradient(900px 540px at 8% -10%, #2a479e 0, transparent 62%), radial-gradient(760px 520px at 70% 112%, #1c3a93 0, transparent 60%), linear-gradient(165deg, #0f2150 0%, #0a1535 58%, #070f27 100%);
}
.home::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 25% 35%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 70% at 25% 35%, #000 20%, transparent 75%); }
.umlaut { position: absolute; z-index: -1; font-weight: 800; line-height: 1; color: rgba(255, 255, 255, .06); font-size: clamp(5rem, 11vw, 10rem); letter-spacing: -.05em; pointer-events: none; user-select: none; animation: drift 24s ease-in-out infinite alternate; }
.umlaut--1 { left: 4%; top: 58%; animation-duration: 26s; }
.umlaut--2 { left: 38%; top: 8%; font-size: clamp(4rem, 8vw, 7.5rem); animation-duration: 21s; animation-delay: -6s; }
.umlaut--3 { left: 50%; top: 66%; animation-duration: 29s; animation-delay: -11s; }
.umlaut--4 { left: 47%; top: 38%; font-size: clamp(3rem, 6vw, 5.5rem); animation-duration: 18s; animation-delay: -3s; }
.home-top { grid-area: top; padding: 34px clamp(24px, 4.5vw, 64px) 0; }
.home-brand { display: inline-flex; }
.home-title { margin-top: clamp(22px, 4.5vh, 52px); max-width: 15ch; color: #fff; font-size: clamp(2.3rem, 4.1vw, 3.75rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.03; }
.home-title span { display: block; color: rgba(255, 255, 255, .5); }
.home-lead { max-width: 46ch; margin: 20px 0 0; color: rgba(255, 255, 255, .78); font-size: 1.0625rem; }
.home-skills { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.home-skills li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .07); font-weight: 600; font-size: .875rem; }
.home-skills .skill-badge { width: 26px; height: 26px; border-radius: 50%; }
.home-skills .skill-badge .icon { width: 15px; height: 15px; }
.home-stage { grid-area: stage; position: relative; padding: 18px clamp(24px, 4.5vw, 64px) 14px; }
.cluster { --s: 1; position: relative; width: calc(720px * var(--s)); height: calc(424px * var(--s)); }
.cluster-in { position: absolute; left: 0; top: 0; width: 720px; height: 424px; transform: scale(var(--s)); transform-origin: 0 0; }
.float { position: absolute; padding: 16px 18px; border-radius: 18px; background: #fff; color: var(--ink); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .5) inset; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both, bob 7s ease-in-out 1s infinite alternate; }
.float-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: .75rem; font-weight: 700; color: var(--muted); }
.float-head .skill-badge { width: 24px; height: 24px; border-radius: 7px; }
.float-head .skill-badge .icon { width: 14px; height: 14px; }
.float-head .chip { margin-left: auto; }
.float--lesen { left: 0; top: 0; width: 340px; animation-delay: .15s, 1.1s; }
.float--hoeren { left: 364px; top: 0; width: 356px; animation-delay: .35s, 2.2s; animation-duration: .9s, 8s; }
.float--schreiben { left: 364px; top: 186px; width: 356px; animation-delay: .55s, 3s; animation-duration: .9s, 9s; }
.float--ring { left: 0; top: 312px; width: 340px; display: flex; align-items: center; gap: 16px; animation-delay: .75s, 1.6s; animation-duration: .9s, 6.5s; }
.float--ring .ring-demo { margin: 0; width: 78px; height: 78px; flex: none; }
.float--ring .ring-label b { font-size: 1.25rem; }
.float--ring .ring-text { min-width: 0; }
.float--ring .ring-text b { display: block; margin-bottom: 6px; font-size: .9375rem; letter-spacing: -.02em; }
.float--ring .ring-text small { display: block; margin-top: 6px; color: var(--muted); font-size: .75rem; }
.demo-q { margin: 0 0 10px; font-weight: 600; font-size: .875rem; line-height: 1.4; }
.demo-q b { display: inline-block; min-width: 3.4em; border-bottom: 2px solid var(--blue-500); text-align: center; color: var(--blue-600); }
.demo-fill { font-style: normal; opacity: 0; animation: pickcheck 12s ease-in-out infinite; }
.demo-opts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.demo-opt { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: 10px; font-size: .8125rem; font-weight: 500; }
.demo-opt .opt-key { width: 22px; height: 22px; border-radius: 6px; font-size: .6875rem; }
.demo-opt .icon { margin-left: auto; opacity: 0; color: var(--blue-600); }
.demo-opt.is-target { animation: pick 12s ease-in-out infinite; }
.demo-opt.is-target .opt-key { animation: pickkey 12s ease-in-out infinite; }
.demo-opt.is-target .icon { animation: pickcheck 12s ease-in-out infinite; }
.demo-prog { height: 5px; margin-top: 12px; border-radius: 999px; background: #e9edf7; overflow: hidden; }
.demo-prog i { display: block; height: 100%; width: 7.5%; border-radius: inherit; background: var(--blue-600); animation: demoprog 12s ease-in-out infinite; }
.demo-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 56px; margin: 4px 0 10px; }
.demo-wave i { display: block; width: 4px; height: calc(var(--h) * 1%); border-radius: 3px; background: var(--violet-600); transform-origin: center; animation: eq 1.15s ease-in-out infinite; animation-delay: calc(var(--i) * -.085s); }
.demo-wave i:nth-child(odd) { background: #9b82f3; }
.demo-audio { height: 5px; border-radius: 999px; background: #e7e1fb; overflow: hidden; }
.demo-audio i { display: block; height: 100%; width: 0; background: var(--violet-600); animation: demoaudio 12s linear infinite; }
.demo-plays { display: flex; justify-content: space-between; margin: 8px 0 0; font-size: .75rem; color: var(--muted); }
.demo-mail { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: #f6f8fd; font-size: .75rem; color: var(--muted); }
.demo-mail b { color: var(--ink); }
.demo-text { margin: 0; font-size: .8125rem; line-height: 1.65; }
.type { display: block; width: 0; overflow: hidden; white-space: nowrap; border-right: 2px solid transparent; }
.type--1 { animation: t1 12s steps(12) infinite; }
.type--2 { animation: t2 12s steps(32) infinite; }
.type--3 { animation: t3 12s steps(32) infinite; }
.type--4 { animation: t4 12s steps(25) infinite; }
.demo-count { display: flex; justify-content: space-between; margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--line-2); font-size: .75rem; color: var(--muted); }
.wc { display: inline-block; counter-reset: w var(--w); animation: wc 12s linear infinite; font-weight: 700; color: var(--ink); }
.wc::after { content: counter(w); }
.ring-demo { position: relative; width: 94px; height: 94px; margin: 0 auto 6px; }
.ring-demo svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-demo .ring-fill { stroke: var(--green-500); stroke-dasharray: 251.3; stroke-dashoffset: 251.3; animation: ringloop 12s cubic-bezier(.3, .7, .2, 1) infinite; }
.ring-demo .ring-label b { font-size: 1.5rem; }
.wc--87 { animation-name: wc87; }
.wc--87::after { content: counter(w) "%"; }
.pass-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--green-100); color: var(--green-700); font-size: .75rem; font-weight: 700; opacity: 0; animation: pop 12s ease-in-out infinite; }
.home-foot { grid-area: foot; display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 8px clamp(24px, 4.5vw, 64px) 24px; color: rgba(255, 255, 255, .6); font-size: .8125rem; }
.home-foot .credit strong { color: #fff; }
.home-foot .credit::before { background: rgba(255, 255, 255, .12); }
.home-login { grid-area: login; position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: 56px clamp(24px, 5vw, 72px); background: #fff; color: var(--ink); border-radius: 36px 0 0 36px; box-shadow: -30px 0 80px -40px rgba(0, 0, 0, .6); }
.login-card { width: 100%; max-width: 410px; margin: 0 auto; }
.login-card h2 { font-size: 1.875rem; font-weight: 800; letter-spacing: -.035em; }
.login-card .sub { margin: 8px 0 26px; color: var(--muted); }
.input-ic { position: relative; }
.input-ic > .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.input-ic .input { padding-left: 44px; min-height: 48px; }
.input-ic .pwtoggle { right: 5px; }
.login-card .btn--primary { min-height: 50px; font-size: 1rem; }
.login-note { display: flex; gap: 12px; margin-top: 24px; padding: 14px 16px; border-radius: 12px; background: var(--blue-50); border: 1px solid #d6e1fc; color: var(--ink-2); font-size: .875rem; }
.login-note .icon { flex: none; margin-top: 2px; color: var(--blue-600); }
.login-note p { margin: 0; }
.login-alt { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 26px; font-size: .875rem; color: var(--muted); }
.login-alt a { font-weight: 600; }
.login-hello { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 12px 14px; border-radius: 14px; background: var(--bg); }

@media (min-width: 1061px) and (max-height: 960px) { .cluster { --s: .86; } .home-lead { margin-top: 14px; } .home-skills { margin-top: 18px; } }
@media (min-width: 1061px) and (max-height: 820px) { .cluster { --s: .74; } }
@media (max-width: 1180px) { .cluster { --s: .82; } }
@media (max-width: 1060px) { .cluster { --s: .66; } .home { grid-template-columns: minmax(0, 1fr) minmax(380px, 460px); } }
@media (max-width: 900px) {
  .home { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "login" "stage" "foot"; grid-template-rows: auto; }
  .home-top { padding-top: 28px; }
  .home-title { margin-top: 26px; font-size: clamp(2rem, 8vw, 2.8rem); }
  .home-login { margin: 26px 16px 0; padding: 32px 22px; border-radius: 24px; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
  .home-stage { display: flex; justify-content: center; padding-top: 34px; }
  .cluster { --s: .74; }
}
@media (max-width: 600px) { .home-stage { display: none; } .home-foot { padding-top: 22px; } .home-skills li { padding-right: 12px; } }

.auth-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 40px 16px; overflow: hidden; isolation: isolate; background: radial-gradient(760px 480px at 10% 0%, #2a479e 0, transparent 62%), radial-gradient(640px 460px at 95% 100%, #1c3a93 0, transparent 60%), linear-gradient(165deg, #0f2150 0%, #0a1535 60%, #070f27 100%); }
.auth-wrap::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 46px 46px; -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, #000 20%, transparent 80%); }
.auth-card { width: 100%; max-width: 440px; padding: 36px 34px 30px; border-radius: 24px; background: #fff; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
.auth-card .brand { display: flex; justify-content: center; margin-bottom: 22px; }
.auth-card h1 { font-size: 1.625rem; letter-spacing: -.035em; text-align: center; }
.auth-card .sub { margin: 8px 0 24px; color: var(--muted); text-align: center; }
.auth-tag { display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 14px; padding: 5px 12px; border-radius: 999px; background: var(--blue-50); color: var(--blue-700); font-size: .8125rem; font-weight: 700; }
.auth-top { text-align: center; }
.auth-foot { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; color: var(--muted); font-size: .8125rem; }
.auth-bottom { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; padding: 18px 16px; color: rgba(255, 255, 255, .6); font-size: .8125rem; }
.auth-bottom .credit strong { color: #fff; }
.auth-bottom .credit::before { background: rgba(255, 255, 255, .12); }

/* ---------- 8. print ---------- */
.print-brand { display: none; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  .side, .topbar, .scrim, .foot, .no-print, .page-actions, .result-actions, .skip, .xm-top, .xm-sub, .xm-bottom { display: none !important; }
  .shell-main { margin: 0; }
  .content { max-width: none; padding: 0; }
  .print-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid #000; font-size: 10pt; }
  .sheet, .review, .rq, .wr, .split-item { box-shadow: none; break-inside: avoid; }
  .ring-fill { animation: none; }
  a { color: inherit; }
}

/* ---------- 7. staff area ---------- */
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.dash-grid .span2 { grid-column: span 2; }
.chart-card { padding: 20px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); min-width: 0; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.chart-head h2 { font-size: 1rem; }
.chart-head p { margin: 2px 0 0; color: var(--muted); font-size: .8125rem; }
/* charts (drawn by inc/charts.php; tooltips by assets/js/app.js) */
.cols { --h: 190px; display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: var(--h) auto; column-gap: 8px; container-type: inline-size; }
.cols-y { position: relative; grid-row: 1; grid-column: 1; }
.cols-y span { position: absolute; right: 0; transform: translateY(50%); color: var(--muted); font-size: .75rem; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cols-plot { position: relative; grid-row: 1; grid-column: 2; }
.cols-grid i { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid #e8ecf5; }
.cols-grid i:nth-child(1) { bottom: 0; border-top-color: #c9d1e6; }
.cols-grid i:nth-child(2) { bottom: 25%; }
.cols-grid i:nth-child(3) { bottom: 50%; }
.cols-grid i:nth-child(4) { bottom: 75%; }
.cols-grid i:nth-child(5) { bottom: 100%; }
.cols-ref { position: absolute; left: 0; right: 0; z-index: 2; height: 0; border-top: 1.5px solid var(--ink-2); pointer-events: none; }
.cols-ref span { position: absolute; right: 0; bottom: 3px; padding: 0 6px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: var(--ink-2); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.cols-bars { position: absolute; inset: 0; display: flex; }
.col { flex: 1 1 0; min-width: 0; display: flex; align-items: flex-end; justify-content: center; border-radius: 8px; cursor: default; }
.col:hover { background: rgba(37, 84, 232, .06); }
.col:focus { outline: none; }
.col:focus-visible, .hbar:focus-visible, .seg:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 1px; }
.col-bar { position: relative; display: block; width: min(24px, 64%); background: var(--blue-600); border-radius: 4px 4px 0 0; transition: filter .12s; }
.col:hover .col-bar, .col:focus-visible .col-bar { filter: brightness(1.15); }
.col-bar--alt { background: #8ea3d9; }
.col-val { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: 4px; color: var(--ink); font-size: .75rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cols-x { grid-row: 2; grid-column: 2; display: flex; margin-top: 8px; }
.cols-x span { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; visibility: hidden; }
.cols-x em { font-style: normal; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.cols-x .xn { visibility: visible; }
@container (min-width: 480px) { .cols-x .xn { visibility: hidden; } .cols-x .xw { visibility: visible; } }

.hbars { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hbar { display: grid; grid-template-columns: minmax(84px, 128px) minmax(0, 1fr) 56px; align-items: center; gap: 12px; margin: 0 -8px; padding: 7px 8px; border-radius: 10px; cursor: default; }
.hbar:hover { background: #f6f8fd; }
.hbar:focus { outline: none; }
.hbar-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; font-size: .875rem; }
.hbar-name > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-name .skill-badge { width: 30px; height: 30px; border-radius: 9px; }
.hbar-track { display: block; height: 14px; border-radius: 0 4px 4px 0; background: #edf0f8; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--blue-600); }
.hbar--lesen .hbar-track i { background: var(--teal-600); }
.hbar--hoeren .hbar-track i { background: var(--violet-600); }
.hbar--schreiben .hbar-track i { background: var(--orange-600); }
.hbar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .875rem; }

.stackbar { display: flex; gap: 2px; height: 14px; }
.seg { display: block; min-width: 6px; background: var(--faint); }
.seg:first-child { border-radius: 7px 0 0 7px; }
.seg:last-child { border-radius: 0 7px 7px 0; }
.seg:only-child { border-radius: 7px; }
.seg--pass { background: var(--green-500); }
.seg--fail { background: var(--red-600); }
.seg--wait { background: #f0b429; }
.seg--info { background: var(--blue-600); }
.seg:hover { filter: brightness(1.12); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .8125rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.legend--stack { display: grid; gap: 8px; }
.legend--stack li { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 10px; }
.legend--stack .chip { justify-self: start; }
.legend--stack .muted { text-align: right; font-variant-numeric: tabular-nums; }
.key { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 4px; background: var(--blue-600); }
.key--alt { background: #8ea3d9; }
.key--line { width: 16px; height: 0; border-top: 1.5px solid var(--ink-2); border-radius: 0; background: none; }
.viz-table { margin-top: 12px; }
.viz-table > summary { cursor: pointer; color: var(--blue-600); font-weight: 600; font-size: .8125rem; }
.viz-table .tablewrap { margin-top: 8px; box-shadow: none; }
.viz-tip { position: fixed; z-index: 120; display: grid; gap: 2px; max-width: 260px; padding: 8px 12px; border-radius: 10px; background: var(--navy-900); color: #fff; box-shadow: var(--shadow-2); font-size: .8125rem; line-height: 1.35; pointer-events: none; }
.viz-tip b { font-size: 1rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.viz-tip span { color: #c5d0ee; overflow-wrap: anywhere; }
.viz-tip[hidden] { display: none; }
@media (max-width: 520px) { .cols { --h: 160px; grid-template-columns: 34px minmax(0, 1fr); column-gap: 6px; } .hbar { grid-template-columns: minmax(70px, 100px) minmax(0, 1fr) 48px; gap: 8px; } }
.list-rows { margin: 0; padding: 0; list-style: none; }
.list-rows li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-2); }
.list-rows li:first-child { border-top: 0; }
.list-rows .grow { flex: 1; min-width: 0; }
.list-rows .grow b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-rows .grow small { color: var(--muted); }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dash-grid .span2 { grid-column: 1 / -1; } }
@media (max-width: 760px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } }

.grade-task { margin-top: 16px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.grade-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.grade-head h3 { flex: 1; min-width: 180px; }
.grade-fields { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.grade-fields .field { margin: 0; }
.grade-prompt { margin: 0 0 12px; }
.grade-prompt summary { cursor: pointer; font-weight: 600; color: var(--blue-600); }
.grade-prompt div { margin-top: 8px; padding: 12px 14px; border-radius: var(--r-md); background: #fff8ea; border: 1px solid #f4dfae; }
.words-ok { color: var(--green-700); }
.words-bad { color: var(--red-700); }
@media (max-width: 700px) { .grade-fields { grid-template-columns: minmax(0, 1fr); } }

.creds { display: grid; gap: 10px; padding: 20px; border-radius: var(--r-lg); border: 1px solid #bfe8d0; background: #f3fbf6; }
.creds h2 { font-size: 1.0625rem; color: var(--green-700); }
.cred-row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.cred-row > span:first-child { flex: none; width: 90px; color: var(--muted); font-size: .8125rem; font-weight: 600; }
.cred-row .btn { flex: none; }
.cred-row code { flex: 1; min-width: 0; padding: 0; background: none; font-size: .9375rem; overflow-wrap: anywhere; }
.cred-note { margin: 4px 0 0; color: var(--ink-2); font-size: .8125rem; }
@media (max-width: 560px) { .cred-row { flex-wrap: wrap; } .cred-row > span:first-child { width: 100%; } .cred-row code { flex: 1 1 60%; } }

.item-list { display: grid; gap: 12px; }
.item { display: flex; gap: 14px; align-items: center; padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); }
.item-no { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: #edf0f8; font-weight: 700; font-size: .875rem; }
.item-main { flex: 1; min-width: 0; }
.item-main b { display: block; }
.item-main p { margin: 2px 0 0; color: var(--muted); font-size: .8125rem; }
.item .actions { flex: none; }
@media (max-width: 700px) { .item { flex-wrap: wrap; } .item .actions { width: 100%; } }
.danger-zone { border-color: #f1c2c5; background: #fffafa; }
.current-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 14px; border-radius: 10px; background: var(--bg); font-size: .875rem; }
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--flag-gold); color: #231a00; font-size: .75rem; font-weight: 700; }
.staff-link { color: var(--muted); font-size: .8125rem; }

/* staff area, part 2 */
.stats--two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.dash-grid .span3 { grid-column: 1 / -1; }
.dash-grid--lists { align-items: start; }
.chart-card > .tablewrap { margin: 0 -22px -20px; border: 0; border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: none; background: transparent; }
.chart-card > .tablewrap .table th { background: transparent; }
.filters--card { align-items: flex-end; margin-bottom: 18px; padding: 16px 18px; }
.filters--card .field { margin: 0; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.mail { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td.wrap { min-width: 200px; white-space: normal; overflow-wrap: anywhere; }
.table td .who small { overflow-wrap: anywhere; }
.btn.is-off { opacity: .35; pointer-events: none; }
.text-warn { color: var(--amber-700); font-weight: 600; }
.sect-h { margin: 34px 0 12px; }
.tablewrap + form, .tablewrap + .pager { margin-top: 16px; }

.passage-card { margin-top: 16px; }
.pc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 10px 20px; margin-bottom: 12px; }
.pc-head p { margin: 4px 0 0; }
.pc-head .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.passage-card > p:last-child { margin: 16px 0 0; }
.passage-card audio { display: block; width: 100%; max-width: 520px; margin: 4px 0 12px; }
.group-row th { padding: 10px 16px; text-align: left; font-size: .8125rem; font-weight: 700; color: var(--ink-2); background: #f1f4fb; border-bottom: 1px solid var(--line); }

.forgot { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.forgot p, .forgot ol { color: var(--ink-2); }
.grade-meta { margin: 8px 0 0; color: var(--muted); font-size: .8125rem; }
.grade-prompt--notes div { background: #eef4ff; border-color: #cddbfb; }

.creds { margin-bottom: 20px; }
.creds-top { display: flex; align-items: flex-start; gap: 14px; }
.creds-top h2 { margin-bottom: 2px; }
.creds-ic { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid #bfe8d0; color: var(--green-700); }
.creds-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.btn.is-done { background: var(--green-100); border-color: #bfe8d0; color: var(--green-700); }
.form-narrow { max-width: 780px; }
.account-card { display: grid; gap: 16px; align-content: start; }
.account-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.account-id b { display: block; overflow-wrap: anywhere; }
.account-id small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.acc-facts { margin: 0; }
.acc-facts > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: .875rem; }
.acc-facts dt { color: var(--muted); }
.acc-facts dd { margin: 0; font-weight: 600; text-align: right; }
.rating { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.rating .icon { color: var(--flag-gold); fill: currentColor; }
.auth-wrap { padding-bottom: 76px; }

.content > .notice, .content > .notices { margin-bottom: 18px; }
.score small { font-weight: 500; }
.takeaway { display: flex; align-items: baseline; gap: 12px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.takeaway b { flex: none; color: var(--ink); font-size: 1.625rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.cell-title { display: block; font-weight: 600; }
.cell-sub { display: block; color: var(--muted); font-size: .75rem; white-space: nowrap; }
.grade { margin-top: 36px; }
.result-points { margin: 10px 0 0; }
.grade-none { margin: 6px 0 0; }
.cell-title { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td.num, .table th.num { white-space: nowrap; }
.movers { display: inline-flex; gap: 2px; }
.btn--icon { width: 34px; padding: 0; }
.flip { transform: rotate(180deg); }
.sheet > .h3 { margin-bottom: 14px; }
.table td.actions > .btn, .table td.actions > form, .table td.actions > .movers { vertical-align: middle; }
.table td.actions form.inline { display: inline-block; }
.field > label.check { display: flex; margin-bottom: 0; font-size: .9375rem; font-weight: 600; }
.content > .page-head ~ .page-head { margin-top: 36px; }
/* @@STAFF-MORE@@ */

/* ---------- 9. motion ---------- */
@keyframes wave { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(16deg); } 20% { transform: rotate(-8deg); } 30% { transform: rotate(14deg); } 40% { transform: rotate(-4deg); } 50% { transform: rotate(10deg); } }
@keyframes ring-in { from { stroke-dashoffset: var(--c); } }
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-9px); } }
@keyframes sheen { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(100%); } }
@keyframes drift { from { transform: translate3d(0, 30px, 0) rotate(-5deg); } to { transform: translate3d(40px, -90px, 0) rotate(5deg); } }
@keyframes blinkbg { 50% { opacity: .65; } }
@keyframes eq { 0%, 100% { transform: scaleY(.28); } 50% { transform: scaleY(1); } }
@keyframes blink { 50% { border-right-color: transparent; } }

/* one 12 second loop: a question is answered, a mail is typed, the result appears */
@keyframes pick {
  0%, 18% { background: #fff; border-color: var(--line); }
  22%, 88% { background: var(--blue-50); border-color: var(--blue-600); }
  94%, 100% { background: #fff; border-color: var(--line); }
}
@keyframes pickkey {
  0%, 18% { background: #edf0f8; color: var(--ink-2); }
  22%, 88% { background: var(--blue-600); color: #fff; }
  94%, 100% { background: #edf0f8; color: var(--ink-2); }
}
@keyframes pickcheck { 0%, 18% { opacity: 0; transform: scale(.4); } 24%, 88% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; } }
@keyframes demoprog { 0%, 18% { width: 7.5%; } 24%, 90% { width: 10%; } 100% { width: 7.5%; } }
@keyframes demoaudio { 0% { width: 0; } 70%, 100% { width: 100%; } }
@keyframes t1 { 0%, 26% { width: 0; border-right-color: var(--blue-600); } 31% { width: 100%; border-right-color: var(--blue-600); } 31.2%, 92% { width: 100%; border-right-color: transparent; } 96%, 100% { width: 0; border-right-color: transparent; } }
@keyframes t2 { 0%, 31% { width: 0; border-right-color: var(--blue-600); } 41% { width: 100%; border-right-color: var(--blue-600); } 41.2%, 92% { width: 100%; border-right-color: transparent; } 96%, 100% { width: 0; border-right-color: transparent; } }
@keyframes t3 { 0%, 41% { width: 0; border-right-color: var(--blue-600); } 51% { width: 100%; border-right-color: var(--blue-600); } 51.2%, 92% { width: 100%; border-right-color: transparent; } 96%, 100% { width: 0; border-right-color: transparent; } }
@keyframes t4 { 0%, 51% { width: 0; border-right-color: var(--blue-600); } 63% { width: 100%; border-right-color: var(--blue-600); } 63.2%, 92% { width: 100%; border-right-color: transparent; } 96%, 100% { width: 0; border-right-color: transparent; } }
@property --w { syntax: "<integer>"; initial-value: 0; inherits: false; }
@keyframes wc { 0%, 26% { --w: 0; } 64%, 92% { --w: 17; } 100% { --w: 0; } }
@keyframes wc87 { 0%, 66% { --w: 0; } 82%, 94% { --w: 87; } 100% { --w: 0; } }
@keyframes ringloop { 0%, 66% { stroke-dashoffset: 251.3; } 82%, 94% { stroke-dashoffset: 32.7; } 100% { stroke-dashoffset: 251.3; } }
@keyframes pop { 0%, 78% { opacity: 0; transform: scale(.6); } 84%, 94% { opacity: 1; transform: none; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .wave, .flagbar::after, .umlaut, .float, .auth-card, .ring-fill, .demo-wave i { animation: none !important; }
  /* the demo cards show their finished state */
  .type { animation: none !important; width: 100%; }
  .demo-opt.is-target { animation: none !important; background: var(--blue-50); border-color: var(--blue-600); }
  .demo-opt.is-target .opt-key { animation: none !important; background: var(--blue-600); color: #fff; }
  .demo-opt.is-target .icon { animation: none !important; opacity: 1; }
  .demo-prog i, .demo-audio i, .wc, .ring-demo .ring-fill, .pass-pill { animation: none !important; }
  .demo-prog i { width: 10%; }
  .demo-audio i { width: 70%; }
  .wc { --w: 17; }
  .wc--87 { --w: 87; }
  .demo-fill { animation: none !important; opacity: 1; }
  .ring-demo .ring-fill { stroke-dashoffset: 32.7; }
  .pass-pill { opacity: 1; }
  .demo-wave i { transform: scaleY(.6); }
}
.profile-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
@media (max-width: 700px) { .profile-chips { margin-left: 0; } }

/* form polish */
.form .grid2, .form .grid3 { row-gap: 0; }
.help + .check, .help + label.check { margin-top: 12px; }
input[type=file].input { min-height: 48px; padding: 7px 10px; color: var(--ink-2); cursor: pointer; }
input[type=file].input::file-selector-button { margin-right: 12px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f4f6fc; color: var(--ink); font: inherit; font-size: .8125rem; font-weight: 600; cursor: pointer; }
input[type=file].input:hover::file-selector-button { background: #e9eefb; }
.btn-stack { display: grid; gap: 8px; }
.btn--block { white-space: normal; text-align: center; line-height: 1.25; padding-top: 10px; padding-bottom: 10px; }
.account-card .plain-list li { padding: 4px 0; }
@media (max-width: 640px) {
  .filters .field, .filters .field--grow { flex: 1 1 100%; min-width: 0; }
  .filters .btn { flex: 1 1 auto; }
}
.table.is-cards tbody tr.group-row { padding: 0; border-bottom: 1px solid var(--line); background: #f1f4fb; }
.table.is-cards .group-row th { display: block; width: 100%; }
.account-card > .h3 { margin-bottom: 0; }
.danger-zone .plain-list { margin: 8px 0 14px; }
.old-files { columns: 2; column-gap: 24px; }
@media (max-width: 640px) { .old-files { columns: 1; } }
.danger-zone { margin-top: 24px; }

/* ---------- 10. version 2.1: two-step verification, exam codes, "exam complete" screen ---------- */

/* big code fields (6 digits) */
.input--code { min-height: 56px; padding: 0 12px 0 calc(12px + .38em); text-align: center; font: 700 1.5rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .38em; }
.input--code::placeholder { font-weight: 500; letter-spacing: .38em; }
.input--code-sm { min-height: 48px; padding-left: calc(12px + .16em); font-size: 1.125rem; letter-spacing: .16em; }
.input--code-sm::placeholder { letter-spacing: .16em; }
.input--code-lg { min-height: 68px; padding-left: calc(12px + .5em); font-size: 2rem; letter-spacing: .5em; }
.input--code-lg::placeholder { letter-spacing: .5em; }

/* staff sign-in, second step */
.auth-card--wide { max-width: 580px; }
.tfa-steps { display: grid; gap: 20px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: tfa; }
.tfa-steps > li { position: relative; padding-left: 44px; counter-increment: tfa; color: var(--ink-2); }
.tfa-steps > li::before { content: counter(tfa); position: absolute; left: 0; top: -1px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-600); color: #fff; font-size: .8125rem; font-weight: 700; }
.tfa-steps strong { color: var(--ink); }
.tfa-qrbox { display: flex; align-items: center; gap: 18px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fafbff; }
.tfa-qr { flex: none; width: 176px; height: 176px; padding: 6px; border-radius: 10px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.tfa-qr svg { display: block; width: 100%; height: 100%; }
.tfa-key { display: grid; justify-items: start; gap: 8px; min-width: 0; }
.tfa-key-label { color: var(--muted); font-size: .8125rem; }
.tfa-key code { display: block; max-width: 100%; font-size: .9375rem; letter-spacing: .05em; overflow-wrap: anywhere; }
.tfa-confirm { margin-top: 12px; }
.rc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; padding: 0; list-style: none; }
.rc-grid li { padding: 10px 12px; border: 1px dashed #b3c0e2; border-radius: 10px; background: var(--blue-50); text-align: center; }
.rc-grid code { padding: 0; background: none; color: var(--ink); font-size: 1rem; font-weight: 700; letter-spacing: .08em; }
.rc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
@media (max-width: 520px) {
  .auth-card--wide { padding-left: 22px; padding-right: 22px; }
  .tfa-qrbox { flex-direction: column; align-items: stretch; }
  .tfa-qr { margin: 0 auto; }
  .rc-grid { grid-template-columns: minmax(0, 1fr); }
}

/* exam code: box on the dashboard and test list, and the code page */
.xcode { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin: 0 0 22px; padding: 18px 22px; border: 1px solid #f2dc9b; border-radius: var(--r-lg); background: #fff8e3; color: var(--amber-700); }
.xcode > .icon { flex: none; }
.xcode-main { flex: 1 1 260px; min-width: 0; }
.xcode-main h3 { color: var(--ink); }
.xcode-main p { margin: 2px 0 0; color: var(--ink-2); font-size: .875rem; }
.xcode-form { display: flex; flex: 0 1 360px; gap: 8px; }
.xcode-form .input { flex: 1; min-width: 0; min-height: 50px; font-size: 1.25rem; }
.xcode-form .btn { min-height: 50px; }
.xcode--ok { border-color: #bfe8d0; background: #ecfaf2; color: var(--green-700); }
.xcode-page { max-width: 560px; margin: 0 auto; }
.xcode-sheet { display: grid; justify-items: center; gap: 6px; padding: 34px 30px; text-align: center; }
.xcode-sheet h2 { font-size: 1.5rem; letter-spacing: -.03em; }
.xcode-sheet > p { max-width: 44ch; margin: 0; color: var(--muted); }
.xcode-sheet .notice { width: 100%; text-align: left; }
.xcode-ic { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 8px; border-radius: 20px; background: var(--blue-50); color: var(--blue-600); }
.xcode-sheet--ok .xcode-ic { background: var(--green-100); color: var(--green-700); }
.xcode-big { display: grid; gap: 12px; width: 100%; max-width: 380px; margin: 12px 0 4px; }
@media (max-width: 560px) { .xcode-sheet { padding: 26px 18px; } .xcode-form { flex-basis: 100%; } }

/* "exam complete" screen */
.done-page { display: grid; place-items: center; min-height: calc(100vh - 140px); padding: 28px 16px; }
.done-card { width: 100%; max-width: 660px; padding: 40px 36px 32px; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: var(--shadow-2); text-align: center; }
.done-badge { display: grid; place-items: center; width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 50%; background: var(--green-100); color: var(--green-500); }
.done-badge svg { width: 96px; height: 96px; }
.done-ring { stroke: currentColor; stroke-opacity: .3; stroke-dasharray: 264; stroke-dashoffset: 264; animation: done-draw .9s cubic-bezier(.3, .7, .2, 1) .1s forwards; }
.done-tick { stroke: currentColor; stroke-dasharray: 60; stroke-dashoffset: 60; animation: done-draw .6s cubic-bezier(.3, .7, .2, 1) .7s forwards; }
.done-card h1 { font-size: 2rem; letter-spacing: -.04em; }
.done-text { max-width: 50ch; margin: 14px auto 0; color: var(--ink-2); font-size: 1.0625rem; }
.done-text p { margin: 0 0 .6em; }
.done-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 26px 0 0; }
.done-facts > div { padding: 12px 10px; border-radius: 12px; background: #f5f7fc; }
.done-facts dt { color: var(--muted); font-size: .75rem; font-weight: 600; }
.done-facts dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.done-actions form { display: contents; }
.done-auto { margin: 18px 0 0; color: var(--muted); font-size: .875rem; }
@keyframes done-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 640px) {
  .done-card { padding: 30px 18px 24px; border-radius: 22px; }
  .done-card h1 { font-size: 1.625rem; }
  .done-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .done-actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .done-ring, .done-tick { animation: none !important; stroke-dashoffset: 0; }
}

/* exam desk (staff) */
.desk-opts { margin-bottom: 4px; }
.desk-table th.pick, .desk-table td.pick { width: 44px; padding-right: 0; }
.check--row { display: inline-flex; margin: 0; }
.empty--slim { padding: 16px 20px; }
.empty--slim p { margin: 0; }
.codes-new { margin-bottom: 8px; border-color: #bfe8d0; background: linear-gradient(180deg, #f1faf5, #fff 70%); }
.codes-new-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.codes-new-head h2 { margin-bottom: 4px; }
.codes-new-head p { max-width: 62ch; margin: 0; }
.slips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.slip { display: grid; justify-items: start; gap: 4px; padding: 16px 18px; border: 1.5px dashed #92cfae; border-radius: 14px; background: #fff; break-inside: avoid; }
.slip-name { font-weight: 700; }
.slip-mail { color: var(--muted); font-size: .8125rem; overflow-wrap: anywhere; }
.slip-code { display: flex; gap: .45em; margin: 8px 0 4px; color: var(--ink); font: 800 2.5rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
.slip-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .8125rem; }
.slip-help { color: var(--muted); font-size: .75rem; }
.slip .btn { margin-top: 6px; }
@media print {
  .slips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .slip { border-color: #000; }
  .codes-new { border: 0; background: none; padding: 0; }
}

/* two-step verification page (staff) */
.tfa-status { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.tfa-status h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.tfa-status p { margin: 0; }
.tfa-status-ic { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 16px; background: var(--green-100); color: var(--green-700); }
.sheet + .two-col, .two-col + .sheet { margin-top: 18px; }

/* settings: sections inside the one form */
.form-sect { margin: 30px 0 6px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.done-preview { margin: 4px 0 18px; padding: 14px 16px; border: 1px dashed #b3c0e2; border-radius: 12px; background: var(--blue-50); }
.done-preview b { display: block; margin-bottom: 4px; font-size: 1.0625rem; }
.done-preview p { margin: 0 0 .4em; color: var(--ink-2); }

/* ---------- 11. version 2.2: answer review of the task types (the task screens themselves are in exam.css since version 2.3) ---------- */
/* answer review: the text with the candidate's words in the gaps */
.rv-gaptext { max-width: none; line-height: 2.3; font-size: 1.0625rem; }
.gapfill { display: inline-block; margin: 0 .15em; padding: 0 .55em; border: 1px solid; border-radius: 8px; font-weight: 600; line-height: 1.7; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.gapfill-no { margin-right: .3em; color: var(--muted); font-size: .6875rem; font-weight: 700; }
.gapfill ins { text-decoration: none; }
.gapfill.is-right { border-color: #8fd3ad; background: #ecfaf2; color: var(--green-700); }
.gapfill.is-wrong { border-color: #f0a9ad; background: #fff0f0; color: var(--ink); }
.gapfill.is-wrong del { color: var(--red-700); text-decoration: line-through; text-decoration-thickness: 2px; }
.gapfill.is-wrong ins { color: var(--green-700); font-weight: 700; }
.gapfill.is-skipped { border-style: dashed; border-color: #b3c0e2; background: #f1f4fb; color: var(--muted); }
.gapfill.is-skipped ins { font-style: italic; }
.review-passage--task .chip { vertical-align: middle; }
.review-passage--task .h4 { margin-bottom: 8px; }
@media print {
  /* the review of a part may run over several pages (before, it jumped to a new page and left a gap); single items stay whole, headings stay with what follows */
  .review { break-inside: auto; }
  .block-head, .review > summary, .review-passage > h3 { break-after: avoid; }
  /* two cards side by side on the screen follow each other on paper, so the first page is not left half empty */
  .grid2 { display: block; }
  .grid2 > * { margin-bottom: 14px; }
}

/* ---------- 12. version 2.2: task editor and part page (staff area) ---------- */
.tkinds-box { margin: 0 0 18px; }
.tkinds-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.tkinds-head p { margin: 2px 0 0; max-width: 64ch; }
.tkinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; }
.tkind { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 46px 14px 14px; border: 1.5px solid var(--line); border-radius: var(--r-md); background: #fff; color: var(--ink); transition: border-color .12s, box-shadow .12s, background .12s; }
.tkind:hover { text-decoration: none; border-color: var(--blue-500); background: var(--blue-50); box-shadow: var(--shadow-1); }
.tkind-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--blue-100); color: var(--blue-700); }
.tkind-t { display: grid; gap: 3px; min-width: 0; }
.tkind-t small { color: var(--muted); font-size: .8125rem; line-height: 1.4; }
.tkind-add { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-600); color: #fff; }
.task-card .chip .icon { margin-right: 2px; }

.bk-form { display: grid; gap: 18px; }
.bk-sect > .h3 { margin-bottom: 12px; }
.bk-list { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.bk-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-items: start; }
.bk-row .field { margin: 0; }
.bk-row textarea.input, .bk-item textarea.input[name="item_expl[]"] { min-height: 64px; }
.bk-key { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--navy-900); color: #fff; font-weight: 800; }
.bk-items { display: grid; gap: 14px; margin-bottom: 12px; }
.bk-item { min-width: 0; margin: 0; padding: 14px 16px 6px; border: 1px solid var(--line); border-radius: var(--r-md); background: #fbfcff; }
.bk-item.is-spare { opacity: .72; }
.bk-item > legend { padding: 0 8px; font-weight: 700; }
.bk-item-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 0 18px; align-items: start; }
.bk-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.bk-gapnote { align-self: center; margin: 0 0 14px; }
@media (max-width: 800px) { .bk-item-grid, .bk-opts { grid-template-columns: minmax(0, 1fr); } }
