/* Public pages for search (made by build/build_pages.py: /sfi-prov/ and the pages under it). Same look as the app
   (css/app.css): Tunnelbana-blue sign panels, flag yellow as the one signal colour, Barlow type (OFL, self-hosted).
   Light only, mobile first, one stylesheet, no third-party requests. */
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(/fonts/barlow-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url(/fonts/barlow-semi-condensed-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
[hidden] { display: none !important; }

:root {
  --paper: #f2f5f8; --card: #ffffff; --ink: #0f1b26; --muted: #52606d; --faint: #6b7884; --line: #d8e0e7;
  --frame: #0f1b26; --soft: #e6edf3; --sign: #005b94; --nav: #003a61; --signal: #fecc02; --signal-ink: #10202e;
  --accent: #006aa7; --accent-deep: #00507f; --accent-soft: #e1eff9; --gold: #f2b705; --gold-soft: #fff1c2;
  --ok: #1d7a4a; --ok-soft: #e2f3e9; --bad: #c4321f; --bad-soft: #fbe3df; --lc: var(--signal); --r: 6px;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  color-scheme: light;
}
.ka { --lc: #1fa45b; } .kb { --lc: #1f6fd6; } .kc { --lc: #f28c1b; } .kd { --lc: #7b4bc4; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--accent-deep); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button, input, textarea { font: inherit; color: inherit; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 30; background: var(--signal); color: var(--signal-ink); padding: 8px 14px; border-radius: var(--r); font-weight: 700; }
.skip:focus { left: 16px; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

/* ---------- header and breadcrumb ---------- */
.top { background: var(--nav); color: #fff; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 700 21px/1 var(--font-head); letter-spacing: -.01em; }
.brand:hover { color: #fff; }
.brand img { width: 34px; height: 34px; border-radius: 8px; flex: none; }
.top-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.top-link { color: #fff; font-weight: 600; text-decoration-color: var(--signal); }
.top-link:hover { color: var(--signal); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 8px; margin: 14px 0 12px; padding: 0; font-size: 14.5px; color: var(--muted); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--faint); }
.crumbs a { color: var(--muted); }

/* ---------- type ---------- */
main { padding-bottom: 32px; }
h1 { font: 700 34px/1.08 var(--font-head); letter-spacing: -.01em; margin: 6px 0 10px; }
h2 { font: 700 26px/1.15 var(--font-head); margin: 44px 0 12px; scroll-margin-top: 16px; }
h3 { font: 700 19px/1.25 var(--font-head); margin: 22px 0 6px; }
p, ul, ol, dl { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
.label { font: 700 12.5px/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.lede { font-size: 18.5px; margin: 0 0 4px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 15px; }
@media (min-width: 620px) { h1 { font-size: 42px; } h2 { font-size: 28px; } }

/* ---------- the station sign (hero) ---------- */
.sign { background: var(--sign); color: #fff; border-radius: var(--r); padding: 22px 20px 30px; position: relative; overflow: hidden; }
.sign::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--lc); }
.sign .label { color: #c6dcee; }
.sign h1 { color: #fff; }
.sign .lede { color: #e8f1f8; }
.sign a:not(.btn) { color: #fff; }
.cta { display: grid; gap: 8px; margin-top: 18px; }
@media (min-width: 620px) { .cta { display: flex; flex-wrap: wrap; align-items: center; } }
.cta-note { margin: 12px 0 0; font-size: 14.5px; color: #d6e5f1; }
.cta-box .cta-note { color: var(--muted); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--r);
  border: 1.5px solid var(--frame); background: var(--card); color: var(--ink); font-weight: 700; text-decoration: none; cursor: pointer; letter-spacing: .01em; text-align: center; }
.btn:hover { background: var(--soft); color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn.big { min-height: 54px; font-size: 18px; padding: 0 24px; }
.sign .btn.primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); }
.sign .btn.primary:hover { background: #fff; border-color: #fff; }
.sign .btn.line { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }
.sign .btn.line:hover { background: rgba(255, 255, 255, .12); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.card > :last-child { margin-bottom: 0; }
.note { background: var(--gold-soft); border-left: 4px solid var(--gold); border-radius: var(--r); padding: 12px 14px; margin: 0 0 14px; font-size: 16px; }
.note.blue { background: var(--accent-soft); border-left-color: var(--accent); }
.note > :last-child { margin-bottom: 0; }
.honest { margin: 14px 0 0; font-size: 15px; color: var(--muted); }
.tiles { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 0 0 14px; padding: 0; list-style: none; }
@media (min-width: 620px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tiles li { margin: 0; }
.tile { display: flex; gap: 12px; align-items: flex-start; height: 100%; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; transition: border-color .12s, transform .12s; }
.tile:hover { border-color: var(--frame); color: var(--ink); transform: translateY(-1px); }
.tile b { display: block; font: 700 19px/1.2 var(--font-head); margin-bottom: 2px; }
.tile span.d { display: block; color: var(--muted); font-size: 15px; line-height: 1.4; }
.lb { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 6px; border-radius: 6px; background: var(--lc); color: #fff; font: 700 18px/1 var(--font-head); flex: none; }
.lb.part { background: var(--sign); }
.lb.sm { min-width: 26px; height: 26px; font-size: 15px; border-radius: 5px; }

/* the four parts, course by course */
.parts { display: grid; gap: 12px; margin: 0 0 14px; }
.part h3 { margin: 0 0 8px; }
.kdl { margin: 0; display: grid; grid-template-columns: 30px 1fr; gap: 8px 10px; align-items: start; }
.kdl dt { margin: 0; }
.kdl dd { margin: 0; font-size: 16px; }
.facts { list-style: none; padding: 0; }
.facts li { padding: 10px 0 10px 30px; border-bottom: 1px solid var(--line); position: relative; margin: 0; }
.facts li:last-child { border-bottom: 0; }
.facts li::before { content: ""; position: absolute; left: 4px; top: 18px; width: 12px; height: 12px; border-radius: 50%; background: var(--sign); box-shadow: 0 0 0 3px var(--accent-soft); }

/* the professor beside a speech bubble */
.prof-says { display: flex; align-items: flex-end; gap: 4px; margin: 22px 0 6px; }
.prof-fig { flex: none; width: 88px; height: 100px; overflow: hidden; }
.prof-fig img { width: 88px; display: block; }
.bubble { position: relative; flex: 1; min-width: 0; background: var(--card); border: 2px solid var(--frame); border-radius: 14px; padding: 12px 14px; margin-bottom: 26px; font-size: 16.5px; }
.bubble::before { content: ""; position: absolute; left: -11px; bottom: 14px; width: 18px; height: 18px; background: var(--card); border-left: 2px solid var(--frame); border-bottom: 2px solid var(--frame); transform: rotate(45deg); }
.bubble > :last-child { margin-bottom: 0; }

/* ---------- practice texts (like the app's mock test) ---------- */
.mock-text { margin: 0 0 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.mock-text figcaption { font: 700 12.5px/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.mock-body { margin: 0; white-space: pre-wrap; font-size: 17px; line-height: 1.55; }
.mock-text.sms { max-width: 440px; border-radius: 18px 18px 18px 4px; background: var(--soft); border-color: var(--soft); }
.mock-text.notice, .mock-text.schedule { border: 2px solid var(--frame); }
.mock-text.schedule .mock-body { font-variant-numeric: tabular-nums; }
.mock-text.letter .mock-body, .mock-text.insandare .mock-body, .mock-text.article .mock-body, .mock-text.email .mock-body { font-family: Georgia, "Times New Roman", serif; }
.mock-body .head { display: block; font-family: var(--font-head); font-weight: 700; font-size: 21px; line-height: 1.2; margin-bottom: 6px; }
.gap { display: inline-block; min-width: 3.2em; border-bottom: 2px solid var(--ink); text-align: center; font-family: var(--font); font-weight: 700; font-size: 15px; }

/* ---------- multiple choice (js/pages/ovning.js marks the answers) ---------- */
.quiz { margin: 0 0 18px; }
.q { border: 1px solid var(--line); background: var(--card); border-radius: var(--r); padding: 14px 14px 10px; margin: 0 0 12px; min-width: 0; }
.q legend { font-weight: 700; font-size: 17.5px; padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.q legend + * { clear: both; }
.qn { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 14px/1 var(--font-head); margin-right: 8px; vertical-align: 2px; }
.opt { display: flex; align-items: flex-start; gap: 10px; min-height: 48px; padding: 11px 12px; margin: 0 0 6px; border: 1.5px solid var(--line); border-radius: var(--r); cursor: pointer; background: var(--card); }
.opt:hover { border-color: var(--frame); }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.opt.is-right { border-color: var(--ok); background: var(--ok-soft); }
.opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.opt.is-right::after { content: "Rätt svar"; margin-left: auto; padding-left: 8px; font-size: 13px; font-weight: 700; color: var(--ok); white-space: nowrap; }
.opt.is-wrong::after { content: "Ditt svar"; margin-left: auto; padding-left: 8px; font-size: 13px; font-weight: 700; color: var(--bad); white-space: nowrap; }
html:lang(en) .opt.is-right::after { content: "Right answer"; }
html:lang(en) .opt.is-wrong::after { content: "Your answer"; }
.q input:disabled { cursor: default; }
.q.done .opt { cursor: default; }
.q.done .opt:hover { border-color: var(--line); }
.q.done .opt.is-right:hover { border-color: var(--ok); }
.q.done .opt.is-wrong:hover { border-color: var(--bad); }
.fb { margin: 4px 0 0; font-weight: 700; min-height: 0; }
.fb:focus { outline: none; }
.q .check { margin: 4px 0 6px; }
.fb:empty { display: none; }
.fb.ok { color: var(--ok); } .fb.bad { color: var(--bad); }
details.facit { margin: 6px 0 4px; font-size: 16px; }
details.facit summary, details.more summary, details.en summary, details.transcript summary { cursor: pointer; font-weight: 700; color: var(--accent-deep); padding: 6px 0; }
details.facit p { margin: 4px 0 6px; }
.quiz-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.score { margin: 0; font-weight: 700; }

/* the conversation, to read once */
details.transcript { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 14px; margin: 0 0 14px; }
details.transcript[open] { padding-bottom: 12px; }
.scene { color: var(--muted); font-style: italic; margin: 6px 0 10px; }
.dialog { list-style: none; padding: 0; margin: 0; }
.dialog li { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); margin: 0; }
.dialog .who { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }

/* writing practice */
.task { border: 2px solid var(--frame); }
.task .bullets { margin: 8px 0 12px; }
.task .bullets li { font-weight: 600; }
.field { width: 100%; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--card); padding: 12px 14px; font-size: 17px; line-height: 1.5; }
.field:focus { outline: none; border-color: var(--frame); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.field { min-height: 190px; resize: vertical; }
.wc { margin: 6px 0 0; font-weight: 700; }
.wc.ok { color: var(--ok); } .wc.short { color: var(--muted); }
.checks { border: 0; padding: 0; margin: 12px 0 0; }
.checks legend { font-weight: 700; padding: 0; margin-bottom: 6px; }
.checks label { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; cursor: pointer; }
.checks input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--ok); }
.model { white-space: pre-wrap; background: var(--soft); border-radius: var(--r); padding: 12px 14px; margin: 6px 0 10px; font-size: 16.5px; }
.prompts { padding-left: 24px; }
.prompts li { margin: 6px 0; font-weight: 600; }
.answers { padding-left: 24px; }
.answers li { margin: 8px 0; }

/* questions and answers, sources */
.faq h3 { margin-top: 20px; }
.sources { font-size: 15px; padding-left: 22px; }
.sources li { margin: 6px 0; }
.sources .src { color: var(--muted); }
.updated { font-size: 15px; color: var(--muted); }
.cta-box { margin-top: 44px; border: 2px solid var(--frame); border-radius: var(--r); background: var(--card); padding: 20px 18px; }
.cta-box h2 { margin-top: 0; }
.cta-box .cta { margin-top: 12px; }

/* ---------- footer ---------- */
.foot { background: var(--nav); color: #d4e1ec; margin-top: 24px; padding: 28px 0 36px; font-size: 15.5px; }
.foot a { color: #fff; text-decoration-color: var(--signal); }
.foot a:hover { color: var(--signal); }
.foot h2 { color: #b9d0e3; font: 700 12.5px/1.2 var(--font); letter-spacing: .14em; text-transform: uppercase; margin: 0 0 8px; }
.foot ul { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 4px 18px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .foot ul { grid-template-columns: 1fr 1fr; } }
.foot li { margin: 0; }
.foot p { margin: 0 0 8px; }
