/*
 * iCut — Grundstil. Statische Datei (kein Build auf dem Server, kein Node bei green.ch).
 * CSP: style-src 'self' + Nonce → keine style="…"-Attribute in den Views, alles hier.
 */
:root {
    color-scheme: light;
    --ink: #1c1c1a;
    --muted: #6b6762;
    --line: #e7e5e4;
    --bg: #F3E9D6; /* Creme aus dem iCut-Logo */
    --card: #ffffff;
    --accent: #9B1B1E;      /* Rot aus dem iCut-Logo */
    --accent-dark: #7f1518;
    --accent-soft: #f6e4e3;
    --ok: #166534;
    --ok-soft: #dcfce7;
    --warn: #854d0e;
    --warn-soft: #fef9c3;
    --bad: #b91c1c;
    --bad-soft: #fef2f2;
}

/* Schriften (OFL, selbst gehostet — CSP font-src 'self'; Entscheid 16.10.2026):
 * Source Sans 3 SemiBold für Überschriften und Kennzahlen, Source Serif 4 (variabel)
 * für Fragen, Antworten und Erklärungen. Teilmengen latin, latin-ext, greek (α, β in Items);
 * der Browser lädt nur, was die Seite braucht. Übriger Text: Systemschrift. */
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/sourcesans3-600-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/sourcesans3-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/sourcesans3-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/sourceserif4-italic-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/sourceserif4-italic-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap; src: url("../fonts/sourceserif4-italic-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/sourceserif4-normal-greek.woff2") format("woff2"); unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/sourceserif4-normal-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("../fonts/sourceserif4-normal-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* Neuladen der Home-Bildschirm-App: unsichtbar, bis die Scroll-Position wieder stimmt (icut.js). */
html.is-restoring body { visibility: hidden; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; }
a { color: var(--accent); }
h1 { font-family: "Source Sans 3", system-ui, sans-serif; font-weight: 600; font-size: 28px; line-height: 1.15; margin: 0 0 16px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 4px; }
h2 { font-size: 16px; margin: 0 0 12px; }

/* ---------- Kopfzeile ---------- */
.topbar { background: var(--bg); border-bottom: 1px solid #e2d6bf; padding: 10px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { display: block; height: 36px; width: auto; }
.env-badge { background: #fbbf24; color: #422006; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; letter-spacing: .05em; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.menu-toggle { display: none; cursor: pointer; border: 1px solid #d6d3d1; border-radius: 8px; width: 40px; height: 36px; align-items: center; justify-content: center; font-size: 19px; margin-left: auto; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.nav a { color: #57534e; text-decoration: none; font-size: 14px; padding: 7px 11px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { background: #f1f0ee; color: var(--accent); }
.nav a.active { background: var(--accent); color: #fff; }
.nav-spacer { flex: 1; }
.nav-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 600; text-align: center; }
.nav a.active .nav-count { background: #fff; }
form.inline { display: inline; margin: 0; }

@media (max-width: 760px) {
    .menu-toggle { display: inline-flex; }
    .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 2px; }
    .nav-toggle:checked ~ .nav { display: flex; }
    .nav a { padding: 11px 12px; font-size: 15px; }
    .nav-spacer { display: none; }
}

/* ---------- Inhalt ---------- */
.container { max-width: 960px; margin: 24px auto; padding: 0 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 16px; }
.card-narrow { max-width: 520px; margin-left: auto; margin-right: auto; }
.card-note { background: #fbf7ef; }

/* Abo-Auswahl auf «Mein Zugang» */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.plan { border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.plan h3 { margin: 0; font-size: 17px; }
.plan p { margin: 0; }
.plan .btn { margin-top: auto; align-self: flex-start; }
.plan-price { font-family: "Source Sans 3", system-ui, sans-serif; font-weight: 600; font-size: 26px; }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.center { text-align: center; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--muted); font-size: 14px; }
.facts dd { margin: 0; }
.chip { display: inline-flex; align-items: center; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin: 0 4px 4px 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; white-space: nowrap; }
.badge-on { background: var(--ok-soft); color: var(--ok); }
.badge-wait { background: var(--warn-soft); color: var(--warn); }
.badge-off { background: var(--bad-soft); color: var(--bad); }

/* ---------- Formulare (iOS-sicher, Nomos-Muster) ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #57534e; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number] { width: 100%; padding: 10px 12px; border: 1px solid #d6d3d1; border-radius: 9px; font-size: 16px; background: #fff; color: var(--ink); -webkit-appearance: none; appearance: none; }
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155, 27, 30, .15); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.err { color: var(--bad); font-size: 13px; margin-top: 4px; }
/* Honeypot im Registrierformular: aus dem Bild geschoben statt display:none, das Bots oft erkennen. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }
@media (max-width: 520px) { .row { flex-direction: column; gap: 0; } }

.btn { display: inline-block; padding: 10px 16px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font-size: 15px; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--accent-dark); }
.btn-ghost:hover, .btn-danger:hover { background: #fbf7ef; }
.btn-block { width: 100%; text-align: center; }
.btn-outline { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-lg { padding: 13px 22px; font-size: 16px; font-weight: 600; }
.btn-ghost { background: transparent; color: #57534e; border: 1px solid #d6d3d1; }
.btn-sm { padding: 5px 10px; font-size: 13px; }

.flash { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; border-radius: 9px; padding: 10px 14px; margin-bottom: 16px; font-size: 14px; }
.flash-error { background: var(--bad-soft); color: #991b1b; border-color: #fecaca; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #f0efed; font-size: 14px; vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }

/* ---------- Gast-Seiten: Emailschild im Sterilgang als Hintergrund ----------
 * Hochformat (Standard, Handy): Schild oben, Karte darunter.
 * Querformat ab 700 px: Schild links, Karte rechts — das Schild ist das Logo,
 * deshalb liegt in der Karte kein zweites Logo. Bilder aus dem Design-System «iCut». */
body.guest { min-height: 100vh; background: #1c1e1d; }
.guest-bg { position: fixed; inset: 0; z-index: 0; background: #1c1e1d url("../images/login-hoch.jpg") left top / cover no-repeat; }
.guest-wrap { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: calc(max(31.5vh, 56vw) + 20px) 16px 24px; }
.guest-card { width: 100%; max-width: 400px; margin: 0 auto; border: 0; border-radius: 16px; padding: 26px 24px 22px; box-shadow: 0 18px 40px rgba(15, 15, 15, .35); }
.guest-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.guest-card h1 { margin-bottom: 18px; }
.links { text-align: center; margin: 16px 0 0; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
@media (orientation: landscape) and (min-width: 700px) {
    .guest-bg { background-image: url("../images/login-quer.jpg"); background-position: left center; }
    .guest-wrap { flex-direction: row; align-items: stretch; justify-content: flex-end; padding: 24px clamp(24px, 5vw, 72px); }
    .guest-card { max-width: 360px; margin: auto 0; }
}
/* Unter 1200 px schmaler und näher am Rand, damit die Karte das Schild nicht berührt (geprüft 1024×768). */
@media (orientation: landscape) and (min-width: 700px) and (max-width: 1199px) { .guest-wrap { padding-right: 24px; } .guest-card { max-width: 340px; } }
@media (orientation: landscape) and (min-width: 1200px) { .guest-card { max-width: 400px; } }

/* ---------- 2FA ---------- */
.qr { width: 200px; height: 200px; margin: 18px auto; }
.secret { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; word-break: break-all; background: #faf7f5; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }

/* ---------- Pagination (resources/views/partials/pagination.blade.php) ---------- */
.pagination { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; }
.pagination button, .pagination .disabled { display: inline-block; padding: 6px 12px; border: 1px solid #d6d3d1; border-radius: 8px; font-size: 14px; font-family: inherit; line-height: inherit; background: none; color: var(--accent); cursor: pointer; }
.pagination .disabled { color: #a8a29e; cursor: default; }

/* ---------- Admin ---------- */
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.head-row h1, .head-row h2 { margin: 0; }
.crumb { margin: 0 0 6px; font-size: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input { flex: 2; min-width: 180px; }
.filters select { flex: 1; min-width: 140px; }
select, input[type=search] { width: 100%; padding: 9px 10px; border: 1px solid #d6d3d1; border-radius: 9px; font-size: 16px; background: #fff; color: var(--ink); }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
legend { font-size: 13px; color: #57534e; margin-bottom: 6px; }
fieldset .check { margin: 4px 0; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.head-row .actions { margin-top: 0; }
.btn-danger { background: transparent; color: var(--bad); border: 1px solid #fecaca; }
.btn[disabled] { opacity: .6; cursor: default; }
.nowrap { white-space: nowrap; }
.cut { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; word-break: break-word; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.health { list-style: none; padding: 0; margin: 0 0 12px; }
.health li { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f0efed; flex-wrap: wrap; }
.health .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.health-ok .dot { background: #16a34a; }
.health-warn .dot { background: #eab308; }
.health-bad .dot { background: #dc2626; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 8px 16px 24px; }
.foot-links { display: block; margin-top: 4px; }
.foot a, .legal-links a { color: var(--muted); }
.legal-links { text-align: center; font-size: 12px; margin: 14px 0 0; }
.check-terms { align-items: flex-start; }
.check-terms input { margin-top: 3px; flex: none; }
.legal { max-width: 760px; margin-left: auto; margin-right: auto; }
.legal h2 { font-size: 17px; margin: 22px 0 8px; }
.legal p, .legal li { font-family: "Source Serif 4", Georgia, serif; font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal-logo { display: block; width: 160px; max-width: 50%; height: auto; margin: 4px 0 8px; }
@media (orientation: landscape) { .legal-logo { margin-left: auto; } }
.legal .legal-meta { color: var(--muted); font-size: 13px; font-family: inherit; }

/* ---------- Fragen ---------- */
.stem, .options, .kprime td, .explanation p { font-family: "Source Serif 4", Georgia, serif; }
.stem { font-size: 17px; line-height: 1.55; }
.item-view .stem { white-space: pre-line; font-size: 17px; margin: 0 0 14px; }
.options { list-style: none; padding: 0; margin: 0 0 14px; }
.options li { display: flex; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; }
.options li.correct { border-color: #86efac; background: var(--ok-soft); }
.opt-letter { font-weight: 600; color: var(--muted); min-width: 18px; }
.kprime td:first-child { width: 28px; }
.explanation { background: #fafaf9; border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; }
.explanation p { margin: 4px 0 0; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 6px 0; border-bottom: 1px solid #f0efed; }
.review-entry { padding: 10px 0; border-bottom: 1px solid #f0efed; }
.review-entry p { margin: 6px 0 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.short { color: var(--bad); font-weight: 600; }
tr.subtotal td { font-weight: 600; border-top: 2px solid var(--line); }
meter { width: 140px; height: 12px; }

/* ---------- Review ---------- */
textarea { width: 100%; padding: 10px 12px; border: 1px solid #d6d3d1; border-radius: 9px; font-size: 16px; font-family: inherit; background: #fff; color: var(--ink); resize: vertical; }
textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(155, 27, 30, .15); }
meter.wide { width: 100%; height: 10px; margin-bottom: 14px; }

/* ---------- Frage bearbeiten ---------- */
.answer-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.answer-row textarea { flex: 1; }
.answer-row .check { margin: 8px 0 0; }
.answer-row .tf { display: flex; flex-direction: column; gap: 2px; min-width: 90px; }
.answer-row .tf .check { margin: 0; }
@media (max-width: 520px) { .answer-row { flex-wrap: wrap; } .answer-row .tf { flex-direction: row; gap: 12px; } }

/* ---------- Lernen ---------- */
.play-head { padding: 14px 18px; position: sticky; top: 0; z-index: 5; }
.play-head .head-row { margin-bottom: 8px; }
progress { width: 100%; height: 10px; accent-color: var(--accent); }
.play-body { display: flex; gap: 16px; align-items: flex-start; }
.qnav { display: grid; grid-template-columns: repeat(5, 36px); gap: 6px; flex: none; position: sticky; top: 90px; }
.qpane { flex: 1; min-width: 0; }
.qbtn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid #d6d3d1; background: #fff; color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; position: relative; }
.q-correct { background: #16a34a; border-color: #16a34a; color: #fff; }
.q-wrong { background: #dc2626; border-color: #dc2626; color: #fff; }
.q-partial { background: #eab308; border-color: #eab308; color: #422006; }
.q-current { outline: 3px solid #1c1c1a; outline-offset: 1px; }
.q-flag::after { content: "★"; position: absolute; top: -9px; right: -7px; font-size: 13px; line-height: 1; color: #f05b26; text-shadow: 0 0 2px #fff, 0 0 2px #fff; }
.options.pick label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; cursor: pointer; }
.options.pick label:has(input:checked) { border-color: #1c1c1a; background: #fbf7ef; }
.options.pick input { margin-top: 3px; }
.options.pick .opt-text { flex: 1; }
.options.pick label.crossed { cursor: default; background: #fafaf9; }
.options.pick label.crossed .opt-text, .options.pick label.crossed .opt-letter { color: var(--muted); text-decoration: line-through; }
.xoff { flex: none; width: 24px; height: 24px; margin-top: 1px; padding: 0; border: 1.5px solid #57534e; border-radius: 50%; background: #fff; color: #57534e; font-size: 16px; line-height: 20px; text-align: center; cursor: pointer; }
.xoff-on { background: #1c1c1a; border-color: #1c1c1a; color: #fff; }
.star-btn { padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: #57534e; font-size: 14px; cursor: pointer; }
.star-btn.star-on { border-color: #f05b26; color: #c2410c; background: #fff4ee; }
.seg { display: inline-flex; border: 1px solid #1c1c1a; border-radius: 999px; overflow: hidden; }
.seg-btn { padding: 7px 18px; border: 0; background: #fff; color: #1c1c1a; font-size: 15px; cursor: pointer; }
.seg-btn + .seg-btn { border-left: 1px solid #1c1c1a; }
.seg-btn.seg-on { background: #1c1c1a; color: #fff; }
.options li.chosen-wrong { border-color: #fca5a5; background: var(--bad-soft); }
.kprime input[type=radio] { width: 18px; height: 18px; }
tr.row-right td { background: var(--ok-soft); }
tr.row-wrong td { background: var(--bad-soft); }
.result-banner { border-radius: 9px; padding: 10px 14px; margin-bottom: 12px; font-weight: 600; }
.rb-correct { background: var(--ok-soft); color: var(--ok); }
.rb-partial { background: var(--warn-soft); color: var(--warn); }
.rb-wrong { background: var(--bad-soft); color: var(--bad); }
.play-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid #f0efed; flex-wrap: wrap; }
.score-big { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.score-num { font-size: 40px; font-weight: 700; color: var(--ink); }
details.result-item { border-bottom: 1px solid #f0efed; padding: 8px 0; }
details.result-item summary { display: flex; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
details.result-item summary::-webkit-details-marker { display: none; }
details.result-item .qbtn { cursor: pointer; flex: none; }
@media (max-width: 760px) {
    .play-body { flex-direction: column; }
    .qnav { position: static; display: flex; overflow-x: auto; width: 100%; padding: 5px 5px 6px; }
    .qbtn { flex: none; }
}

/* ---------- Dashboard ---------- */
.dash-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 20px; }
.dash-hero h1 { font-size: 34px; margin: 0 0 8px; }
.dash-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; }
.dash-actions { display: flex; gap: 8px; flex-wrap: nowrap; }
.dash-actions .btn { white-space: nowrap; }
.access-line { color: var(--muted); font-size: 13px; }
.access-soon { color: var(--warn); font-weight: 600; }
.open-package { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.open-package > div { display: flex; flex-direction: column; gap: 2px; }
.section-title { margin: 8px 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.tiles .card { margin-bottom: 0; }
.tile { display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none; }
a.tile:hover { border-color: #c8c2b8; }
.tile-label { font-weight: 600; font-size: 14px; }
@media (max-width: 600px) {
    .tiles-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .tiles-kpi .card { padding: 12px; }
    .tiles-kpi .kpi { font-size: 24px; }
    .tiles-kpi .tile-label { font-size: 12px; font-weight: 500; }
    .tiles-kpi .muted { display: none; }
    .dash-hero h1 { font-size: 30px; }
    .dash-actions { width: 100%; }
    .dash-actions .btn-lg { flex: 1; padding: 12px 10px; font-size: 15px; text-align: center; }
}
.kpi { font-family: "Source Sans 3", system-ui, sans-serif; font-weight: 600; font-size: 34px; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.dash-grid .card, .dash-side .card { margin-bottom: 16px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: minmax(0, 1fr); } .dash-side { order: -1; } }
.bar { display: block; position: relative; height: 10px; border-radius: 5px; background: #efe7d8; overflow: hidden; margin-top: 4px; }
.bar-fill { display: block; height: 100%; border-radius: 5px; }
.bar-marked::after { content: ""; position: absolute; top: 0; bottom: 0; left: 60%; width: 2px; background: #1c1c1a; opacity: .35; }
.lvl-neutral { background: #57534e; }
.lvl-ok { background: #6cc395; } /* Pastellgrün (Wunsch Michael 23.10.2026), wie .ring-ok */
.lvl-warn { background: #ea8a0c; } /* Orange (Entscheid 23.10.2026, vorher Gelb) */
.lvl-bad { background: #dc2626; }
.lvl-few { background: #c8c2b8; }
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px; grid-template-areas: "label val" "bar bar" "n n"; column-gap: 8px; }
.bar-label { grid-area: label; font-size: 14px; }
.bar-row .bar { grid-area: bar; }
.bar-val { grid-area: val; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.bar-n { grid-area: n; font-size: 12px; }
.bar-row.few .bar-label, .bar-row.few .bar-val { color: #a8a29e; }
@media (min-width: 600px) {
    .bars { gap: 8px; }
    .bar-row { grid-template-columns: minmax(0, 1.3fr) 64px minmax(0, 1fr) 48px; grid-template-areas: "label n bar val"; align-items: center; }
    .bar-row .bar { margin-top: 0; }
    .bar-n { text-align: right; }
}
.weak { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0efed; }
.weak:last-child { border-bottom: 0; }
.weak-text { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
ul.recent li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
ul.recent li .muted { grid-column: 1; }
.recent-pct { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps { margin: 0 0 12px; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.steps li { padding-left: 4px; }
.steps strong { display: block; }
.card-dark { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: #1c1e1d; border-color: #1c1e1d; color: #F2EFE6; }
.card-dark h2 { font-family: "Source Sans 3", system-ui, sans-serif; font-weight: 600; font-size: 20px; margin-bottom: 6px; }
.card-dark p { margin: 0; color: #d6d1c4; font-size: 14px; }
.discipline-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; margin-bottom: 10px; }
.w-0 { width: 0%; }
.w-5 { width: 5%; }
.w-10 { width: 10%; }
.w-15 { width: 15%; }
.w-20 { width: 20%; }
.w-25 { width: 25%; }
.w-30 { width: 30%; }
.w-35 { width: 35%; }
.w-40 { width: 40%; }
.w-45 { width: 45%; }
.w-50 { width: 50%; }
.w-55 { width: 55%; }
.w-60 { width: 60%; }
.w-65 { width: 65%; }
.w-70 { width: 70%; }
.w-75 { width: 75%; }
.w-80 { width: 80%; }
.w-85 { width: 85%; }
.w-90 { width: 90%; }
.w-95 { width: 95%; }
.w-100 { width: 100%; }

/* ---------- Meldungen / Pilot ---------- */
.flag-box { margin-top: 14px; }
.flag-form { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #fafaf9; }
.card-pilot { border-color: #fde68a; background: #fffbeb; }

/* ---------- Examen ---------- */
.q-answered { background: #334155; border-color: #334155; color: #fff; }
.countdown { font-variant-numeric: tabular-nums; font-size: 18px; }
.time-warn { color: #b45309; }
.time-crit { color: var(--bad); }

/* ---------- Gutscheine ---------- */
pre.codes { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; white-space: pre-wrap; }
input[type=date] { width: 100%; padding: 9px 10px; border: 1px solid #d6d3d1; border-radius: 9px; font-size: 16px; background: #fff; min-height: 44px; }

/* ---------- Admin: Lernenden-Übersicht (Dashboard) ---------- */
.learner-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 4px 0 16px; }
.learner-kpis .tile { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fbf7ef; }
.learner-kpis .kpi { font-size: 26px; }
@media (max-width: 600px) { .learner-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
table.learners td { vertical-align: middle; }
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.presence::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c8c2b8; flex: none; }
.presence-on { color: var(--ok); font-weight: 600; }
.presence-on::before { background: #16a34a; }
.rate { font-weight: 600; }
.rate-ok { color: var(--ok); }
.rate-warn { color: var(--warn); }
.rate-bad { color: var(--bad); }
.learners td:first-child a { white-space: nowrap; }
.card-danger { border-color: #fecaca; }

/* Einklappbare Karte (Dashboard «Leistung je Disziplin») */
details.card-collapsible summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; list-style: none; }
details.card-collapsible summary::-webkit-details-marker { display: none; }
details.card-collapsible summary h2 { margin: 0; }
details.card-collapsible summary::after { content: "▸"; color: var(--muted); font-size: 18px; transition: transform .15s ease; }
details.card-collapsible[open] summary::after { transform: rotate(90deg); }
details.card-collapsible[open] summary { margin-bottom: 10px; }

/* ---------- Prüfungsbereitschaft (Dashboard Lernende, App\Support\Readiness) ----------
 * Ring wird in icut.js als SVG gezeichnet (270°, data-ring*). Farben nur über Klassen,
 * damit die CSP (keine Inline-Styles) hält. Strich der Disziplin-Balken: .mark-40 … .mark-90. */
.ready { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; }
.ready-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ready-text p { margin: 0; }
.ready-state { font-family: "Source Sans 3", system-ui, sans-serif; font-weight: 600; font-size: 22px; line-height: 1.2; }
.ready-ok .ready-state { color: #2e8b57; }
.ready-warn .ready-state { color: #b45309; }
.ready-bad .ready-state { color: #b91c1c; }
.ready-few .ready-state { color: var(--muted); }
.ring { position: relative; width: 180px; aspect-ratio: 200 / 182; max-width: 100%; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring-center { position: absolute; left: 0; right: 0; top: 37%; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ring-num { font-family: "Source Sans 3", system-ui, sans-serif; font-weight: 600; font-size: 34px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ring-cut { font-size: 12px; color: var(--muted); }
.ring-track { fill: none; stroke: #efe7d8; stroke-width: 16; stroke-linecap: round; }
.ring-val { fill: none; stroke-width: 16; stroke-linecap: round; }
.ring-band { fill: none; stroke-width: 8; }
.ring-tick { stroke: var(--ink); stroke-width: 2.5; }
.ring-ok { stroke: #6cc395; }
.ring-warn { stroke: #ea8a0c; }
.ring-bad { stroke: #dc2626; }
.ring-few { stroke: #c8c2b8; }
@media (max-width: 600px) {
    .ready { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 12px; }
    .ring { width: 160px; }
}
.mark-40::after { left: 40%; }
.mark-41::after { left: 41%; }
.mark-42::after { left: 42%; }
.mark-43::after { left: 43%; }
.mark-44::after { left: 44%; }
.mark-45::after { left: 45%; }
.mark-46::after { left: 46%; }
.mark-47::after { left: 47%; }
.mark-48::after { left: 48%; }
.mark-49::after { left: 49%; }
.mark-50::after { left: 50%; }
.mark-51::after { left: 51%; }
.mark-52::after { left: 52%; }
.mark-53::after { left: 53%; }
.mark-54::after { left: 54%; }
.mark-55::after { left: 55%; }
.mark-56::after { left: 56%; }
.mark-57::after { left: 57%; }
.mark-58::after { left: 58%; }
.mark-59::after { left: 59%; }
.mark-60::after { left: 60%; }
.mark-61::after { left: 61%; }
.mark-62::after { left: 62%; }
.mark-63::after { left: 63%; }
.mark-64::after { left: 64%; }
.mark-65::after { left: 65%; }
.mark-66::after { left: 66%; }
.mark-67::after { left: 67%; }
.mark-68::after { left: 68%; }
.mark-69::after { left: 69%; }
.mark-70::after { left: 70%; }
.mark-71::after { left: 71%; }
.mark-72::after { left: 72%; }
.mark-73::after { left: 73%; }
.mark-74::after { left: 74%; }
.mark-75::after { left: 75%; }
.mark-76::after { left: 76%; }
.mark-77::after { left: 77%; }
.mark-78::after { left: 78%; }
.mark-79::after { left: 79%; }
.mark-80::after { left: 80%; }
.mark-81::after { left: 81%; }
.mark-82::after { left: 82%; }
.mark-83::after { left: 83%; }
.mark-84::after { left: 84%; }
.mark-85::after { left: 85%; }
.mark-86::after { left: 86%; }
.mark-87::after { left: 87%; }
.mark-88::after { left: 88%; }
.mark-89::after { left: 89%; }
.mark-90::after { left: 90%; }

/* ---------- Gäste in der Kopfzeile (Rechtstexte) ---------- */
.topbar-login { margin-left: auto; }

/* ---------- Umzugshinweis (partials/moved.blade.php, nur auf Staging) ---------- */
.moved { background: var(--accent-soft); border: 1px solid #e6c3c2; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.moved h2 { margin: 0 0 6px; }
.moved p { margin: 0 0 10px; font-size: 14px; }
