/* Mentor – gränssnitt. Inga inline-stilar (CSP); allt styrs via klasser. */

:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f0efeb;
  --text: #17181a;
  --muted: #696b70;
  --faint: #9a9ca1;
  --border: #e4e2dc;
  --accent: #1d6b5a;
  --accent-strong: #15594a;
  --accent-soft: #e3efeb;
  --on-accent: #ffffff;
  --ok: #2f7d52;
  --ok-soft: #e4f2e9;
  --danger: #b42318;
  --danger-soft: #fbe9e7;
  --shadow: 0 1px 2px rgb(20 20 20 / .04), 0 4px 16px rgb(20 20 20 / .05);
  --shadow-lg: 0 2px 4px rgb(20 20 20 / .05), 0 12px 32px rgb(20 20 20 / .08);
  --radius: 14px;
  --radius-sm: 9px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --wrap: 1080px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111213;
    --surface: #1a1b1d;
    --surface-2: #222326;
    --text: #ececec;
    --muted: #a3a5aa;
    --faint: #75777c;
    --border: #2b2c30;
    --accent: #5cc0a6;
    --accent-strong: #79d1ba;
    --accent-soft: #19302a;
    --on-accent: #08130f;
    --ok: #6cc690;
    --ok-soft: #17291f;
    --danger: #ff8b7f;
    --danger-soft: #331b18;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / .3), 0 12px 32px rgb(0 0 0 / .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 16px/1.55 var(--sans); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.75rem, 1.3rem + 2vw, 2.5rem); font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1.05rem; font-weight: 650; }
p { margin: 0 0 1rem; }
.icon { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .5rem; display: block; }

/* Layout */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
main.wrap { flex: 1; padding-top: 2rem; padding-bottom: 4rem; }
.narrow { max-width: 720px; margin-left: auto; margin-right: auto; }

/* Topbar */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.logo:hover { color: var(--text); }
.logo .mark { width: 28px; height: 28px; color: var(--accent); }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a, .nav button { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .7rem; border-radius: 8px; color: var(--muted); font: inherit; font-size: .925rem; font-weight: 550; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--text); }
.nav a.avatar, .avatar { width: 32px; padding: 0; justify-content: center; color: var(--accent); height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: .85rem; font-weight: 700; margin-left: .35rem; }
@media (max-width: 560px) { .nav .label { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .15s, transform .05s, box-shadow .15s; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-block { width: 100%; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1rem; }

/* Forms */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .875rem; font-weight: 600; }
.input, select.input { width: 100%; font: inherit; padding: .7rem .85rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Alerts */
.alert { display: flex; gap: .6rem; align-items: flex-start; padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; font-size: .95rem; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 1.5rem; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.section { margin-top: 2.75rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }

/* Kursfärger */
.c-teal   { --c1: #1d6b5a; --c2: #2f8f78; }
.c-slate  { --c1: #24272c; --c2: #4a5059; }
.c-amber  { --c1: #a35a14; --c2: #d08a2e; }
.c-indigo { --c1: #2f3a8f; --c2: #5563c9; }
.c-rose   { --c1: #8f2f4b; --c2: #c45b78; }

.cover { position: relative; overflow: hidden; color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.cover .cover-mark { position: absolute; right: -18px; bottom: -28px; width: 150px; height: 150px; opacity: .14; color: #fff; }

/* Kurskort */
.course-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; color: var(--text); }
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: var(--text); }
.course-card .cover { height: 120px; padding: 1.1rem 1.25rem; display: flex; align-items: flex-end; }
.course-card .cover h3 { color: #fff; font-family: var(--serif); font-size: 1.45rem; font-weight: 600; margin: 0; }
.course-card .body { padding: 1.1rem 1.25rem 1.25rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.course-card .body p { margin: 0; color: var(--muted); font-size: .925rem; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; color: var(--muted); font-size: .85rem; }
.meta span { display: inline-flex; align-items: center; gap: .3rem; }

/* Fortsätt-kortet */
.hero-card { display: grid; grid-template-columns: 1fr; overflow: hidden; }
.hero-card .cover { padding: 1.5rem 1.75rem; min-height: 140px; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; }
.hero-card .cover .eyebrow { color: rgb(255 255 255 / .75); }
.hero-card .cover h2 { color: #fff; font-family: var(--serif); font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); font-weight: 600; margin: 0; }
.hero-card .body { padding: 1.5rem 1.75rem; display: flex; flex-direction: column; gap: 1rem; justify-content: center; }
.hero-card .next { font-size: 1.05rem; font-weight: 600; }
@media (min-width: 760px) { .hero-card { grid-template-columns: 1.1fr 1fr; } .hero-card .cover { min-height: 230px; } }

/* Framsteg */
progress.bar { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: block; }
progress.bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 99px; }
progress.bar::-webkit-progress-value { background: var(--accent); border-radius: 99px; }
progress.bar::-moz-progress-bar { background: var(--accent); border-radius: 99px; }
.progress-row { display: flex; align-items: center; gap: .75rem; font-size: .85rem; color: var(--muted); }
.progress-row progress { flex: 1; }

/* Sidhuvud för kurs och modul */
.page-head { margin-bottom: 2rem; }
.page-head .lead { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .85rem; color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.course-banner { border-radius: var(--radius); padding: 2rem 1.75rem; margin-bottom: 2rem; box-shadow: var(--shadow); }
.course-banner h1 { color: #fff; margin-bottom: .5rem; }
.course-banner p { color: rgb(255 255 255 / .85); max-width: 60ch; margin: 0; }
.course-banner .meta { color: rgb(255 255 255 / .8); margin-top: 1rem; }
.course-banner .actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.course-banner .next-up { color: rgb(255 255 255 / .8); font-size: .9rem; margin-top: 1.25rem; }
.course-banner .next-up strong { color: #fff; font-weight: 600; }
.course-banner .progress-row { color: rgb(255 255 255 / .8); flex: 1 1 260px; max-width: 360px; }
.course-banner progress.bar { background: rgb(255 255 255 / .12); min-width: 120px; }
.course-banner progress.bar::-webkit-progress-bar { background: rgb(255 255 255 / .12); }
.course-banner progress.bar::-webkit-progress-value { background: #fff; }
.course-banner progress.bar::-moz-progress-bar { background: #fff; }
.btn-light { background: #fff; color: #17181a; }
.btn-light:hover { background: #f1f1f1; color: #17181a; }

/* Termin och moduler */
.semester { margin-bottom: 2.25rem; }
.semester-head { display: flex; align-items: baseline; gap: .75rem; margin-bottom: .75rem; }
.semester-head .num { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.row { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); color: var(--text); }
.list > li:first-child > .row { border-top: 0; }
a.row:hover { background: var(--surface-2); color: var(--text); }
.row .title { font-weight: 600; }
.row .grow { flex: 1; min-width: 0; }
.row .sub { font-size: .85rem; color: var(--muted); margin-top: .1rem; }
.row .chev { color: var(--faint); }
.row.locked { color: var(--faint); }
.row.locked .title { font-weight: 550; }
.row.empty { color: var(--muted); font-size: .925rem; }
.status { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: .8rem; font-weight: 700; }
.status.open { background: var(--accent-soft); color: var(--accent); }
.status.done { background: var(--ok); color: #fff; }
.status.locked { background: var(--surface-2); color: var(--faint); }
progress.bar.mini { width: 72px; flex: none; }
@media (max-width: 560px) { progress.bar.mini { display: none; } }

/* Modulsida */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); font-size: .825rem; color: var(--muted); font-weight: 550; }
.chip.done { background: var(--ok-soft); border-color: transparent; color: var(--ok); }
.chip.open { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.locked { background: var(--surface-2); }
.two-col { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.checklist li { display: flex; gap: .65rem; align-items: flex-start; }
.checklist .icon { color: var(--accent); margin-top: .15rem; }
.checklist .done .icon { color: var(--ok); }
.checklist .todo .icon { color: var(--faint); }
.resource { display: flex; gap: .85rem; align-items: flex-start; padding: .9rem 0; border-top: 1px solid var(--border); }
h3 + .resource, h4 + .resource { border-top: 0; padding-top: .25rem; }
.res-group { font-size: .75rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 1.5rem 0 .5rem; }
h3 + .res-group { margin-top: .75rem; }
.further { margin-top: 3rem; }
.resource .kind { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.resource .title { font-weight: 600; color: var(--text); }
.resource a.title:hover { color: var(--accent); }
.resource .note { font-size: .875rem; color: var(--muted); margin-top: .15rem; }
.side { display: grid; gap: 1.5rem; }
.locked-box { text-align: center; padding: 3rem 1.5rem; }
.locked-box .icon { width: 40px; height: 40px; color: var(--faint); margin-bottom: 1rem; }

/* Lektion */
.lesson-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.steps { display: flex; gap: 4px; margin: 0 0 2.25rem; }
.steps a, .steps span { flex: 1; height: 4px; border-radius: 99px; background: var(--border); }
.steps .done { background: var(--ok); }
.steps .current { background: var(--accent); }
.prose { font-size: 1.075rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h1 { margin-bottom: 1.5rem; }
.prose h2 { font-size: 1.4rem; margin: 2.5rem 0 .75rem; }
.prose h3 { font-size: 1.15rem; margin: 2rem 0 .5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15rem; }
.prose li { margin: .3rem 0; }
.prose strong { font-weight: 650; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; line-height: 1.5; display: block; overflow-x: auto; }
.prose thead th { text-align: left; font-weight: 650; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--border); padding: .6rem .8rem; }
.prose td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose blockquote { margin: 1.75rem 0; padding: 1.1rem 1.35rem; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 1.05rem; }
.prose blockquote p:last-child { margin: 0; }
.prose code { font-size: .9em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.lesson-actions { position: sticky; bottom: 0; margin-top: 3rem; padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.lesson-actions .prev { color: var(--muted); font-weight: 550; display: inline-flex; align-items: center; gap: .35rem; }
.lesson-actions .prev:hover { color: var(--text); }
.lesson-actions form { margin: 0; }
.done-note { display: inline-flex; align-items: center; gap: .4rem; color: var(--ok); font-weight: 600; font-size: .9rem; }

/* Inloggning */
.auth { min-height: calc(100vh - 61px); display: grid; grid-template-columns: 1fr; }
.auth-art { display: none; }
.auth-form { display: flex; align-items: flex-start; justify-content: center; padding: 3.5rem 1.25rem; }
@media (min-width: 900px) { .auth-form { align-items: center; } }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { margin-bottom: .35rem; }
.auth-card .lead { color: var(--muted); margin-bottom: 2rem; }
@media (min-width: 900px) {
  .auth { grid-template-columns: 1.05fr 1fr; }
  .auth-art { display: flex; flex-direction: column; justify-content: flex-end; padding: 3rem; position: relative; overflow: hidden; background: linear-gradient(150deg, #15191b, #24302d 55%, #1d6b5a); color: #fff; }
  .auth-art .big-mark { position: absolute; width: 520px; height: 520px; right: -140px; top: -120px; opacity: .1; color: #fff; }
  .auth-art blockquote { margin: 0; font-family: var(--serif); font-size: 1.9rem; line-height: 1.3; max-width: 26ch; letter-spacing: -.01em; }
  .auth-art cite { display: block; margin-top: 1rem; font-style: normal; font-size: .9rem; opacity: .7; }
}
body.auth-page main.wrap { max-width: none; padding: 0; }

/* Tabeller (admin) */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 650; padding: .85rem 1.25rem; border-bottom: 1px solid var(--border); }
.table td { padding: .9rem 1.25rem; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: .15rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 650; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; font-weight: 600; font-size: .9rem; }
.empty-state { text-align: center; padding: 3rem 1.5rem; color: var(--muted); }

footer.foot { border-top: 1px solid var(--border); color: var(--faint); font-size: .8rem; }
footer.foot .wrap { padding-top: 1.25rem; padding-bottom: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.card form.approve { margin-top: 1.25rem; }

/* Repetition på startsidan */
.review-cta { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; margin-bottom: 1.5rem; color: var(--text); }
.review-cta:hover { color: var(--text); box-shadow: var(--shadow-lg); }
.review-cta .title { font-weight: 650; }
.review-cta .sub { color: var(--muted); font-size: .875rem; }
.review-cta .grow { flex: 1; }
@media (max-width: 480px) { .review-cta .btn { padding: .6rem .8rem; } }
.section-note { margin-top: .9rem; }
.section-note .icon { margin-right: .35rem; }

/* Quiz */
.quiz { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.question { border: 1px solid var(--border); margin: 0; }
.q-num { font-size: .75rem; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; display: flex; align-items: center; gap: .35rem; }
.q-prompt { font-size: 1.075rem; font-weight: 550; margin-bottom: 1rem; }
.q-prompt p { margin: 0; }
.q-image { display: block; max-width: 100%; border-radius: var(--radius-sm); margin: 0 0 1rem; }
.options { display: grid; gap: .55rem; }
.option { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.option:hover { background: var(--surface-2); }
.option input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); flex: none; margin: 0; }
.option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.answer-field { display: flex; align-items: center; gap: .6rem; max-width: 280px; }
.answer-field .unit { color: var(--muted); font-weight: 550; }
.quiz-start form { margin-top: 1rem; }
.result-head { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; margin-bottom: 1.25rem; }
.result-head h1 { font-size: 1.6rem; margin-bottom: .25rem; }
.result-head p { margin: 0; }
.score { font-family: var(--serif); font-size: 3.2rem; font-weight: 600; line-height: 1; letter-spacing: -.03em; }
.score span { font-size: 1.4rem; color: var(--muted); margin-left: .1rem; }
.result-head.pass .score { color: var(--ok); }
.result-head.fail .score { color: var(--danger); }
.actions-row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-end; }
@media (max-width: 560px) { .actions-row { flex-direction: column-reverse; } .actions-row .btn, .actions-row form { width: 100%; } }
.review-q { margin-bottom: 1rem; border-left: 3px solid var(--border); }
.review-q.ok { border-left-color: var(--ok); }
.review-q.ok .q-num { color: var(--ok); }
.review-q.wrong { border-left-color: var(--danger); }
.review-q.wrong .q-num { color: var(--danger); }
.explain { background: var(--surface-2); border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: .95rem; margin-top: .75rem; }
.explain p:last-child { margin: 0; }
.seeing .explain { margin-bottom: 1.25rem; }

/* Repetition och seendeträning */
.review .card { overflow: hidden; }
.flashcard .front { min-height: 180px; display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 1rem; }
.flashcard .front img { max-width: 100%; border-radius: var(--radius-sm); }
.fc-text { font-size: 1.3rem; font-family: var(--serif); line-height: 1.4; }
.back .fc-text { font-family: var(--sans); font-size: 1.05rem; text-align: left; }
.reveal summary { list-style: none; border-radius: 0; }
.reveal summary::-webkit-details-marker { display: none; }
.reveal[open] summary { display: none; }
.back { border-top: 1px solid var(--border); }
.rate-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.rate { padding: .75rem .25rem; font-size: .9rem; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.rate.again { color: var(--danger); }
.rate.good { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.seeing img { display: block; width: 100%; height: auto; background: #000; }
.choice-grid { display: grid; gap: .55rem; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.verdict { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: 1.15rem; margin-bottom: .5rem; }
.verdict.ok { color: var(--ok); }
.verdict.wrong { color: var(--danger); }
.done-state .icon.big { width: 48px; height: 48px; color: var(--ok); margin-bottom: 1rem; }

/* Inlämning */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 2rem 1rem; margin: 1rem 0; border: 2px dashed var(--border); border-radius: var(--radius); cursor: pointer; color: var(--muted); text-align: center; }
.dropzone:hover { border-color: var(--accent); color: var(--accent); }
.dropzone input { max-width: 100%; font-size: .85rem; color: var(--muted); }
.icon.big { width: 40px; height: 40px; }
.submit-form, .sub-list { display: grid; gap: 1.25rem; margin-top: 1.5rem; }
.sub-image { overflow: hidden; margin-bottom: 1.25rem; }
.submit-form .sub-image { margin-bottom: 0; }
.sub-image img { display: block; width: 100%; height: auto; background: #111; }
.exif { display: flex; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 .9rem; }
.exif span { font-size: .78rem; font-weight: 600; padding: .2rem .55rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-variant-numeric: tabular-nums; }
textarea.input { resize: vertical; line-height: 1.5; }
.field span { font-size: .875rem; font-weight: 600; }
.assessing { padding: 3rem 1.5rem; }
.spinner { width: 42px; height: 42px; margin: 0 auto 1.25rem; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.verdict-card { margin-top: 1.25rem; border-left: 4px solid var(--border); }
.verdict-card.pass { border-left-color: var(--ok); }
.verdict-card.pass .q-num { color: var(--ok); }
.verdict-card.fail { border-left-color: var(--danger); }
.verdict-card.fail .q-num { color: var(--danger); }
.verdict-card .summary { font-family: var(--serif); font-size: 1.2rem; line-height: 1.5; margin: 0; }
.key-point { display: flex; gap: 1rem; margin-bottom: 1rem; }
.key-point h3 { margin-bottom: .35rem; }
.key-point p { margin: 0; }
.kp-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-weight: 700; }
.next-step { background: var(--accent-soft); border-color: transparent; }
.next-step .q-num { color: var(--accent); }
.next-step p { margin: 0; font-weight: 550; }
.domains td { vertical-align: top; }
.domains td.title { font-weight: 600; white-space: nowrap; }
.level { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.level.bra { background: var(--ok-soft); color: var(--ok); }
.level.otillräckligt { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 560px) { .domains tr { display: grid; grid-template-columns: 1fr auto; } .domains td:last-child { grid-column: 1 / -1; padding-top: 0; } }
.decision h2 { margin-bottom: .35rem; }
.decision .actions-row { margin-top: 1rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Portfolio */
.portfolio-entry { margin-bottom: 1.25rem; overflow: hidden; }
.pf-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; color: var(--text); }
.pf-head:hover { background: var(--surface-2); color: var(--text); }
.pf-head .title { font-weight: 650; }
.pf-strip { display: flex; gap: 4px; overflow-x: auto; padding: 0 1.25rem 1.25rem; scroll-snap-type: x mandatory; }
.pf-strip img { height: 120px; width: auto; border-radius: 6px; scroll-snap-align: start; display: block; }

/* Admin */
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); color: #fff; }
.user-actions summary { list-style: none; cursor: pointer; }
.user-actions summary::-webkit-details-marker { display: none; }
.user-actions-body { display: grid; gap: 1rem; padding: 1rem 0 .25rem; min-width: 240px; }
.user-actions-body .field { margin-bottom: .5rem; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 0 0 1.25rem; }
label.check input { margin-top: .25rem; accent-color: var(--accent); }
