/* ============================================================
   css/pages/exams.css — the simulator's public pages: the catalogue (/exams), one exam's page (/exam/<slug>),
   the result page, the history (/my-exams) and the history block inside the student dashboard.
   Rows and timelines instead of a grid of square cards; light and dark follow the site theme tokens.
   ============================================================ */

.page-exams .xc-hero { padding: 120px 20px 18px; max-width: 1040px; margin: 0 auto; }
/* a framed glass card like the header, text on one side and the placement rings on the other */
.xc-hero-card {
    position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center; gap: 24px;
    padding: 36px 44px; border-radius: 28px; border: 1px solid var(--neutral-border); border-top-color: var(--glass-border-highlight, var(--neutral-border));
    background: radial-gradient(circle at 100% 0%, rgba(140, 31, 47, 0.12), transparent 46%), radial-gradient(circle at 0% 100%, rgba(26, 54, 93, 0.1), transparent 50%), var(--header-glass-bg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 18px 44px -20px rgba(26, 54, 93, 0.28);
}
.xc-hero-text { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: start; }
.xc-hero-text h1 { margin: 0; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.5; color: var(--primary-navy); }
.xc-hero-text p { margin: 0; max-width: 560px; font-size: 14.5px; line-height: 2; color: var(--ink-soft); }
.xc-hero-visual { position: relative; height: 210px; }
.placement-rings { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(140, 31, 47, 0.28); }
[data-theme="dark"] .placement-rings { color: rgba(248, 250, 252, 0.22); }
.placement-emblem { position: absolute; top: 50%; left: 50%; width: 100px; height: 100px; display: grid; place-items: center; border-radius: 30px; transform: translate(-50%, -50%) rotate(-6deg); background: linear-gradient(135deg, var(--grad-btn-start, #8c1f2f), var(--grad-btn-end, #5d0d18)); color: #fff; box-shadow: 0 22px 44px -16px rgba(140, 31, 47, 0.55); transition: transform 0.5s ease; }
.placement-emblem svg { width: 50px; height: 50px; }
.xc-hero-card:hover .placement-emblem { transform: translate(-50%, -50%) rotate(2deg) scale(1.05); }
.placement-chip { position: absolute; padding: 7px 14px; border-radius: 999px; background: var(--color-surface); border: 1px solid var(--neutral-border); font-size: 12.5px; font-weight: 700; color: var(--primary-navy); white-space: nowrap; font-family: 'Inter', var(--font-body); box-shadow: 0 8px 20px -12px rgba(15, 23, 42, 0.3); }
.placement-chip--a { top: 8%; right: 6%; } .placement-chip--b { bottom: 12%; left: 0; } .placement-chip--c { bottom: 6%; right: 10%; }
.xc-points { list-style: none; margin: 4px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.xc-points li { padding: 5px 14px; border-radius: 999px; background: var(--accent-soft-bg); color: var(--accent-gold); font-size: 12.5px; font-weight: 800; }
.xc-section, .xi-section { max-width: 1040px; margin: 0 auto; padding: 8px 20px 70px; }
.page-exams .xi-section { padding-top: 120px; }
.xc-resume-box { margin-bottom: 18px; padding: 16px 18px; border-radius: 18px; background: linear-gradient(135deg, rgba(140, 31, 47, 0.1), rgba(184, 150, 74, 0.14)); border: 1px solid var(--neutral-border); }
.xc-resume-box h2 { margin: 0 0 10px; font-size: 16px; color: var(--primary-navy); }
.xc-resume { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--color-surface); margin-top: 6px; text-decoration: none; color: inherit; }
.xc-resume b { flex: 1; color: var(--primary-navy); } .xc-resume span { font-size: 12px; color: var(--ink-soft); } .xc-resume em { font-style: normal; color: var(--accent-gold); font-weight: 800; }
.xc-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.xc-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--neutral-soft-bg); gap: 2px; flex-wrap: wrap; }
.xc-tab { border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; font: inherit; font-size: 13.5px; font-weight: 800; color: var(--ink-soft); cursor: pointer; }
.xc-tab { transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.xc-tab:hover:not(.is-on) { color: var(--primary-navy); background: var(--color-surface); }
.xc-tab.is-on { background: linear-gradient(135deg, var(--grad-btn-start, #8c1f2f), var(--grad-btn-end, #5d0d18)); color: #fff; box-shadow: 0 8px 18px -8px rgba(140, 31, 47, 0.6); }
.xc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.xc-chip { border: 1.5px solid var(--neutral-border); background: transparent; padding: 5px 14px; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); cursor: pointer; }
.xc-chip.is-on { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--grad-btn-start, #8c1f2f), var(--grad-btn-end, #5d0d18)); }
.xc-note { margin: 0 0 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.9; } .xc-note span { color: var(--accent-gold); font-weight: 700; } .xc-note:empty { display: none; }
.xc-list { display: flex; flex-direction: column; gap: 12px; }
.xc-row { display: flex; align-items: center; gap: 20px; padding: 18px 22px; border: 1px solid var(--neutral-border); border-radius: 20px; background: var(--color-surface); text-decoration: none; color: inherit; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; }
.xc-row:hover { border-color: var(--accent-gold); transform: translateY(-2px); box-shadow: 0 16px 34px -22px rgba(93, 13, 24, 0.5); }
.xc-lvl { flex: none; width: 74px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 0; border-radius: 16px; background: linear-gradient(135deg, #5d0d18, #8c1f2f); color: #fff; }
.xc-lvl b { font-size: 26px; font-weight: 800; line-height: 1; } .xc-lvl small { font-size: 10px; opacity: 0.85; text-align: center; padding: 0 4px; }
.xc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.xc-main h3 { margin: 0; font-size: 17px; color: var(--primary-navy); } .xc-main p { margin: 0; font-size: 13px; color: var(--ink-soft); }
.xc-timeline { display: flex; gap: 3px; height: 30px; border-radius: 10px; overflow: hidden; }
.xc-seg { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 10px; min-width: 0; color: #fff; font-size: 11px; background: #8c1f2f; overflow: hidden; white-space: nowrap; }
.xc-seg em { font-style: normal; opacity: 0.8; }
.kind-HOEREN { background: #1f6f8c; } .kind-SPRACHBAUSTEINE { background: #8a6d1f; } .kind-SCHREIBEN { background: #3f7a3a; }
.xc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 8px; background: #8c1f2f; }
.xc-meta { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); }
.xc-meta li + li::before { content: '·'; margin-inline-end: 16px; opacity: 0.5; }
.xc-go { flex: none; font-size: 28px; color: var(--accent-gold); }
.xc-empty { text-align: center; padding: 56px 20px; border: 1.5px dashed var(--neutral-border); border-radius: 20px; color: var(--ink-soft); }
.xc-empty h3, .xc-empty h1 { color: var(--primary-navy); margin: 0 0 8px; }
.xc-foot { margin-top: 26px; font-size: 12.5px; color: var(--ink-soft); line-height: 2; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- one exam ---------- */
.xi-head { text-align: center; margin-bottom: 22px; }
.xi-head h1 { margin: 10px 0 6px; font-size: clamp(24px, 4vw, 34px); color: var(--primary-navy); }
.xi-head .xc-meta { justify-content: center; }
.xi-badge { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--accent-soft-bg); color: var(--accent-gold); font-weight: 800; font-size: 12.5px; }
.xi-sum { color: var(--ink-soft); margin: 0 0 10px; }
.xi-note, .xi-official, .xi-preview { padding: 10px 16px; border-radius: 12px; background: var(--accent-soft-bg); color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.xi-preview { background: rgba(178, 106, 0, 0.12); color: #b26a00; font-weight: 700; text-align: center; }
.xi-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; margin-top: 18px; align-items: start; }
.xi-col h2 { font-size: 16px; margin: 18px 0 10px; color: var(--primary-navy); } .xi-col h2:first-child { margin-top: 0; }
.xi-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.xi-table th, .xi-table td { padding: 10px 12px; text-align: start; border-bottom: 1px solid var(--neutral-border); }
.xi-table thead th { color: var(--ink-soft); font-size: 12px; background: var(--neutral-soft-bg); }
.xi-table small { color: var(--ink-soft); font-weight: 400; }
.xi-pass { margin: 10px 0 0; font-size: 13px; color: var(--accent-gold); font-weight: 800; }
.xi-rules, .xi-desc { font-size: 14px; line-height: 2; color: var(--ink-soft); } .xi-rules p, .xi-desc p { margin: 0 0 0.6em; }
.xi-start { position: sticky; top: 100px; padding: 20px; border: 1px solid var(--neutral-border); border-radius: 20px; background: var(--color-surface); }
.xi-modes { display: flex; flex-direction: column; gap: 8px; }
.xi-mode { display: flex; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--neutral-border); border-radius: 14px; cursor: pointer; align-items: flex-start; }
.xi-mode:has(input:checked) { border-color: var(--accent-gold); background: var(--accent-soft-bg); }
.xi-mode input { margin-top: 5px; accent-color: #8c1f2f; }
.xi-mode b { display: block; color: var(--primary-navy); font-size: 14px; } .xi-mode small { color: var(--ink-soft); font-size: 12px; line-height: 1.8; display: block; }
.xi-checklist { margin: 14px 0; padding-inline-start: 18px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.9; }
.xi-warn { padding: 10px 12px; border-radius: 12px; background: rgba(178, 106, 0, 0.12); color: #b26a00; font-size: 12.5px; font-weight: 700; line-height: 1.8; }
.xi-go { width: 100%; height: 50px; }
.xi-error { margin: 8px 0 0; padding: 9px 12px; border-radius: 12px; background: var(--color-error-bg); color: var(--color-error); font-size: 13px; font-weight: 700; }
.xi-error[hidden] { display: none; }
.xi-board { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.xi-board li { display: flex; gap: 12px; padding: 8px 14px; border-radius: 12px; background: var(--neutral-soft-bg); align-items: center; } .xi-board span { flex: 1; } .xi-board em { font-style: normal; font-weight: 800; color: var(--accent-gold); }

/* ---------- result ---------- */
.xr-card { padding: 22px; border: 1px solid var(--neutral-border); border-radius: 20px; background: var(--color-surface); margin-bottom: 16px; }
.xr-card h2 { margin: 0 0 12px; font-size: 16px; color: var(--primary-navy); }
.xr-claim { max-width: 640px; margin-inline: auto; text-align: center; } .xr-claim h1 { margin: 10px 0; color: var(--primary-navy); }
.xr-form { display: flex; flex-direction: column; gap: 14px; text-align: start; }
.xr-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--primary-navy); } .xr-form label small { font-weight: 400; color: var(--ink-soft); }
.xr-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.xr-code { display: flex; gap: 10px; align-items: flex-end; } .xr-code label { flex: 1; }
.xr-consent { flex-direction: row !important; align-items: center; font-weight: 500 !important; font-size: 12.5px !important; color: var(--ink-soft) !important; }
.xr-head { text-align: center; margin-bottom: 18px; } .xr-head h1 { margin: 8px 0; font-size: clamp(22px, 3.6vw, 30px); color: var(--primary-navy); } .xr-head p { color: var(--ink-soft); font-size: 13.5px; }
.xp-pill { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; background: var(--neutral-soft-bg); color: var(--ink-soft); }
.xp-pill.tone-ok { background: rgba(46, 125, 50, 0.14); color: #2e7d32; } .xp-pill.tone-wait { background: rgba(184, 150, 74, 0.2); color: #8a6d1f; } .xp-pill.tone-warn { background: rgba(178, 106, 0, 0.14); color: #b26a00; }
.xr-hero { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 24px 28px; border-radius: 22px; margin-bottom: 14px; }
.xr-hero.tone-ok { background: linear-gradient(135deg, rgba(46, 125, 50, 0.14), rgba(184, 150, 74, 0.12)); } .xr-hero.tone-bad { background: rgba(179, 38, 30, 0.1); } .xr-hero.tone-wait { background: rgba(184, 150, 74, 0.16); }
.xr-big { display: flex; flex-direction: column; } .xr-big small { font-size: 12.5px; color: var(--ink-soft); } .xr-big b { font-size: 58px; line-height: 1.2; color: var(--primary-navy); } .xr-big span { color: var(--ink-soft); font-size: 14px; }
.xr-verdict { display: flex; flex-direction: column; gap: 4px; max-width: 420px; } .xr-verdict b { font-size: 26px; color: var(--primary-navy); } .xr-verdict span { font-size: 13px; color: var(--ink-soft); line-height: 1.9; }
.xr-pending { padding: 12px 16px; border-radius: 14px; background: var(--accent-soft-bg); color: var(--ink-soft); font-size: 13.5px; line-height: 1.9; }
.xr-wait { color: #b26a00; font-style: normal; font-weight: 700; }
.xr-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; } .xr-grid > .xr-card { margin: 0 0 16px; }
.xr-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; } .xr-tags li { padding: 6px 14px; border-radius: 999px; font-size: 13px; background: var(--neutral-soft-bg); } .xr-tags.good li { background: rgba(46, 125, 50, 0.12); } .xr-tags.bad li { background: rgba(179, 38, 30, 0.1); } .xr-tags b { margin-inline-start: 6px; }
.xr-fb { padding: 12px 0; border-top: 1px dashed var(--neutral-border); } .xr-fb:first-of-type { border-top: 0; } .xr-q { margin: 0 0 8px; font-weight: 700; line-height: 1.9; color: var(--primary-navy); }
.xr-fb-text { white-space: pre-wrap; line-height: 2; font-size: 14px; } .xr-fb-score small { color: var(--ink-soft); }
.xr-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; } .xr-actions a { display: inline-flex; align-items: center; text-decoration: none; }
.xr-filter { display: flex; gap: 8px; margin: 10px 0; }
.xr-review { padding: 14px 16px; border: 1px solid var(--neutral-border); border-inline-start: 5px solid var(--neutral-border); border-radius: 14px; margin-bottom: 10px; background: var(--color-surface); }
.xr-review.is-correct { border-inline-start-color: #2e7d32; } .xr-review.is-wrong { border-inline-start-color: #b3261e; } .xr-review.is-partial, .xr-review.is-blank { border-inline-start-color: #b26a00; }
.xr-review header { display: flex; gap: 10px; align-items: baseline; } .xr-badge { font-weight: 800; font-size: 12.5px; } .xr-review small { color: var(--ink-soft); }
.xr-review dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 6px 0; font-size: 13.5px; } .xr-review dt { color: var(--ink-soft); } .xr-review dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.xr-why { margin: 8px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft-bg); font-size: 13.5px; line-height: 1.9; }
.xr-radar { width: 100%; max-width: 320px; display: block; margin: 0 auto; }
.xr-grid-line, .xr-radar .xr-grid { fill: none; stroke: var(--neutral-border); stroke-width: 1; }
.xr-radar .xr-shape { fill: rgba(140, 31, 47, 0.22); stroke: #8c1f2f; stroke-width: 2; } .xr-radar .xr-dot { fill: #8c1f2f; }
.xr-radar .xr-label { font-size: 11px; font-weight: 800; fill: var(--primary-navy); } .xr-radar .xr-val { font-size: 10px; fill: var(--accent-gold); font-weight: 800; }
.xr-bars { display: flex; flex-direction: column; gap: 10px; } .xr-bar { display: grid; grid-template-columns: 110px 1fr 54px; gap: 10px; align-items: center; font-size: 13px; }
.xr-bar i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #8c1f2f calc(var(--w)), var(--neutral-border) calc(var(--w))); display: block; }

/* ---------- history ---------- */
.xh-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.xh-stats div { padding: 14px 16px; border-radius: 16px; background: var(--neutral-soft-bg); display: flex; flex-direction: column; } .xh-stats b { font-size: 24px; color: var(--primary-navy); } .xh-stats span { font-size: 12px; color: var(--ink-soft); }
.xh-block { margin-bottom: 18px; } .xh-block h3 { font-size: 15px; margin: 0 0 8px; color: var(--primary-navy); }
.xh-row { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 12px 16px; margin-bottom: 8px; border: 1px solid var(--neutral-border); border-radius: 14px; background: var(--color-surface); text-decoration: none; color: inherit; }
.xh-row:hover { border-color: var(--accent-gold); } .xh-row.is-live { background: rgba(184, 150, 74, 0.12); }
.xh-row b { display: block; color: var(--primary-navy); font-size: 14px; } .xh-row small { color: var(--ink-soft); font-size: 12px; } .xh-row em { font-style: normal; color: var(--accent-gold); font-weight: 800; }
.xh-end { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; } .xh-end i { font-style: normal; font-size: 12px; font-weight: 800; } .xh-end .ok { color: #2e7d32; } .xh-end .bad { color: #b3261e; }
.xh-radar { max-width: 340px; } .xh-links { margin-top: 14px; }
.xh-links a { display: inline-flex; text-decoration: none; }

@media (max-width: 820px) {
    .page-exams .xc-hero { padding-top: 108px; }
    .xc-hero-card { grid-template-columns: minmax(0, 1fr); padding: 26px 22px; } .xc-hero-visual { display: none; }
    .xc-row { flex-wrap: wrap; padding: 16px; gap: 14px; } .xc-lvl { width: 62px; } .xc-go { display: none; }
    .xi-grid, .xr-grid { grid-template-columns: minmax(0, 1fr); } .xi-start { position: static; }
    .xr-two { grid-template-columns: minmax(0, 1fr); }
    .xh-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xr-big b { font-size: 46px; } .xr-hero { padding: 18px; }
    .xc-seg b { display: none; }
    .xc-meta li + li::before { display: none; }
}

/* ---------- an exam as a time line ---------- */
.xt { list-style: none; margin: 4px 0 6px; padding: 0 0 22px; display: flex; gap: 6px; position: relative; }
.xt::before { content: ''; position: absolute; inset-inline: 0; bottom: 6px; height: 2px; background: var(--neutral-border); border-radius: 2px; }
.xt-seg { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 14px 8px 12px; border-radius: 18px; text-align: center; color: #fff; background: #8c1f2f; box-shadow: 0 14px 26px -18px rgba(0, 0, 0, 0.6); }
.xt-seg.kind-HOEREN { background: linear-gradient(160deg, #2a8fb0, #1f6f8c); } .xt-seg.kind-LESEN { background: linear-gradient(160deg, #a52a3c, #7a1626); }
.xt-seg.kind-SPRACHBAUSTEINE { background: linear-gradient(160deg, #b08a2a, #8a6d1f); } .xt-seg.kind-SCHREIBEN { background: linear-gradient(160deg, #4f9448, #3f7a3a); }
.xt-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.2); }
.xt-icon svg { width: 21px; height: 21px; }
.xt-seg b { font-size: 15px; font-family: 'Inter', var(--font-body); } .xt-seg small { font-size: 11px; opacity: 0.85; }
.xt-time { margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); font-size: 12px; font-weight: 800; }
.xt-pts { font-size: 11px; opacity: 0.85; }
.xt-tick, .xt-end i { position: absolute; bottom: -22px; inset-inline-start: -4px; font-style: normal; font-size: 11px; color: var(--ink-soft); font-weight: 700; }
.xt-tick::before { content: ''; position: absolute; inset-inline-start: 4px; bottom: 14px; width: 2px; height: 8px; background: var(--neutral-border); }
.xt-end { position: relative; width: 0; } .xt-end i { inset-inline-start: -2px; }
@media (max-width: 640px) {
    .xt { flex-direction: column; padding: 0 0 0 0; } .xt::before, .xt-tick, .xt-end { display: none; }
    .xt-seg { flex: none !important; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; text-align: start; padding: 10px 14px; gap: 8px; } .xt-time { margin: 0; }
}

.xi-login { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 0; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft-bg); color: var(--ink-soft); font-size: 13px; line-height: 1.9; }
.xi-login b { color: var(--primary-navy); font-size: 14px; }
.xi-login-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.xi-login-actions a { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; text-decoration: none; font-size: 13px; }
