/* =====================================================================
   HPraketen – designsystem
   Typsnitt: DM Sans (brödtext) + Newsreader (rubriker, ersätter Tiempos Headline)
   ===================================================================== */

/* ============ Tema: ljust (standard) ============ */
:root {
  /* Varumärke */
  --brand: #4B5FCF;
  --brand-dark: #3B4DB5;
  --brand-800: #33429A;
  --brand-light: #8E9CF0;
  --wine: #2B3557;

  /* Pastellfärger */
  --sky: #E4EEFF;
  --mint: #DFF5EC;
  --peach: #FFE9DB;
  --butter: #FFF3CC;
  --rose: #FDE6EE;
  --pink-50: #F8F9FF;
  --pink-100: #ECEFFF;
  --pink-200: #D5DCFD;
  --pink-300: #AEBBF6;

  /* Färgade paneler: yta, textfärg (som R, G, B) och accenttext */
  --on-panel: 38, 48, 79;
  --panel: #E7ECFF;
  --panel-grad: linear-gradient(135deg, #E2ECFF 0%, #E6F5F1 55%, #FFF0E4 100%);
  --panel-tint: rgba(255, 255, 255, .72);
  --panel-accent: #3B4DB5;
  --panel-line: #D3DBF7;

  /* Ytor */
  --bg: #FFFFFF;
  --bg-alt: #F6F8FE;
  --bg-pink: #EEF1FF;
  --surface: #FFFFFF;
  --surface-2: #F2F4FC;
  --surface-3: #E3E7F5;
  --border: #E4E8F4;
  --border-strong: #CBD2E7;
  --btn-muted: #E9EDFA;
  --header-bg: #FFFFFF;
  --footer-bg: #EAF0FF;
  --tile-bg: #E7ECFF;

  /* Text */
  --title: #26304F;
  --text: #4C546B;
  --muted: #626A82;
  --faint: #969EB5;
  --link: #4256C4;

  /* Funktion */
  --accent: var(--brand);
  --accent-ink: #FFFFFF;
  --verbal: #4B5FCF;
  --verbal-soft: #E7ECFF;
  --verbal-edge: #AEBBF6;
  --kvant: #0E7264;
  --kvant-soft: #DFF5EC;
  --kvant-edge: #8FD6C0;
  --good: #157347;
  --good-soft: #E1F6EA;
  --bad: #B3364A;
  --bad-soft: #FDE8EC;
  --warn: #B4530A;
  --select: #4B5FCF;
  --select-soft: #F3F5FF;

  --radius-s: 10px;
  --radius: 14px;
  --radius-l: 22px;
  --shadow: 0 2px 10px -4px rgba(75, 95, 207, .14);
  --shadow-lift: 0 16px 34px -16px rgba(75, 95, 207, .32);
  --font-display: 'Newsreader', 'Tiempos Headline', Georgia, serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --maxw: 1200px;
  --gutter: 16px;
  --tabbar-h: 66px;
  color-scheme: light;
}

/* ============ Tema: mörkt (vinrött) ============ */
:root[data-theme="dark"] {
  --bg: #0F1726;
  --bg-alt: #172033;
  --bg-pink: #172033;
  --surface: #172033;
  --surface-2: #26324A;
  --surface-3: #35435F;
  --border: rgba(255, 255, 255, .10);
  --border-strong: rgba(255, 255, 255, .22);
  --btn-muted: #26324A;
  --header-bg: #0B1220;
  --footer-bg: #0B1220;
  --tile-bg: #26324A;
  --title: #FFFFFF;
  --text: #E5E7EB;
  --muted: #B6BECC;
  --faint: #8E97A8;
  --link: #8FB3F0;
  --verbal: #8FB3F0;
  --verbal-soft: rgba(143, 179, 240, .14);
  --kvant: #CFE0FB;
  --kvant-soft: rgba(207, 224, 251, .10);
  --good: #4ADE80;
  --good-soft: rgba(74, 222, 128, .12);
  --bad: #8FB3F0;
  --bad-soft: rgba(143, 179, 240, .14);
  --select: #CFE0FB;
  --select-soft: rgba(207, 224, 251, .08);
  --on-panel: 255, 255, 255;
  --panel: #26324A;
  --panel-grad: linear-gradient(150deg, #26324A, #172033);
  --panel-tint: rgba(255, 255, 255, .1);
  --panel-accent: #CFE0FB;
  --panel-line: rgba(255, 255, 255, .16);
  --verbal-edge: #8FB3F0;
  --kvant-edge: #CFE0FB;
  --shadow: 0 1px 6px -2px rgba(0, 0, 0, .4);
  --shadow-lift: 0 12px 32px -12px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ============ Bas ============ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

h1, h2 { font-family: var(--font-display); font-weight: 400; color: var(--title); line-height: 1.08; letter-spacing: -.015em; margin: 0 0 .45em; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h1 em, h2 em, .serif em { font-style: italic; }
h3, h4 { font-family: var(--font-body); font-weight: 600; color: var(--title); line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.01em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--link); }
img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
b, strong { color: var(--title); font-weight: 600; }
code { font-size: .88em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.serif { font-family: var(--font-display); }

.skip-link { position: absolute; left: -999px; top: 8px; background: #000; color: #fff; padding: 6px 12px; border-radius: 0 0 8px 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 64px; outline: none; }
@media (min-width: 700px) { :root { --gutter: 32px; } main { padding-top: 40px; padding-bottom: 88px; } }

/* Fullbreda sektioner (färgade band) */
.band { margin-inline: calc(50% - 50vw); padding: 56px max(var(--gutter), calc(50vw - var(--maxw) / 2 + var(--gutter))); }
.band-alt { background: var(--bg-alt); }
.band-pink { background: var(--bg-pink); }
@media (min-width: 700px) { .band { padding-block: 80px; } }

/* ============ Header ============ */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--header-bg); color: rgb(var(--on-panel)); }
.topbar-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: inline-flex; text-decoration: none; color: var(--brand); flex: none; }
.logo-word { height: 48px; width: auto; overflow: visible; }
/* Undertexten ligger i samma SVG som ordmärket, på samma plats som "SEDAN 1992" i originalloggan. */
.logo-tag { fill: #8FB3F0; font-family: var(--font-body); font-size: 12.1px; font-weight: 400; font-variation-settings: 'opsz' 40; }
.main-nav { display: none; gap: 2px; }
.main-nav a { color: rgb(var(--on-panel)); text-decoration: none; padding: 8px 12px; border-radius: var(--radius-s); font-weight: 500; font-size: 1rem; }
.main-nav a:hover { background: var(--panel-tint); }
.main-nav a.active { background: var(--panel-tint); }
@media (min-width: 900px) { .main-nav { display: flex; } }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.streak-pill { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 12px; border-radius: var(--radius-s); background: var(--panel-tint); color: var(--warn); font-weight: 600; font-size: .95rem; }
.streak-pill svg { width: 16px; height: 16px; }
.streak-pill span { color: rgb(var(--on-panel)); }
.streak-pill.cold { color: rgba(var(--on-panel), .82); }
.icon-btn { width: 40px; height: 40px; border-radius: var(--radius-s); border: 0; background: var(--panel-tint); display: grid; place-items: center; cursor: pointer; color: rgb(var(--on-panel)); }
.icon-btn:hover { background: var(--panel-tint); }
.icon-btn svg { width: 18px; height: 18px; }
.account-btn { display: inline-flex; align-items: center; height: 40px; text-decoration: none; padding: 0 16px; border-radius: var(--radius-s); background: var(--brand); color: #fff; font-weight: 600; font-size: .95rem; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.account-btn:hover, .account-btn.active { background: var(--brand-dark); }

/* ============ Tabbar (mobil) ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px -8px rgba(75, 95, 207, .15);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 500; }
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a.active { color: var(--title); font-weight: 600; }
.tabbar a.active svg { color: var(--brand); }
@media (min-width: 900px) { .tabbar { display: none; } }
body.focus-mode .tabbar, body.focus-mode .footer { display: none; }
body.focus-mode { padding-bottom: 0; background: var(--bg-alt); }

/* ============ Footer ============ */
/* Sidfot */
.footer { background: var(--footer-bg); color: rgb(var(--on-panel)); border-radius: 32px 32px 0 0; margin-top: 24px; overflow: hidden; }
@media (min-width: 700px) { .footer { border-radius: 48px 48px 0 0; } }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 64px var(--gutter) 0; }
@media (min-width: 700px) { .footer-inner { padding-top: 104px; } }
.footer a { color: var(--panel-accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.footer a:hover { color: rgb(var(--on-panel)); }
.footer-cols { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 600px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-cols { grid-template-columns: repeat(4, 1fr); gap: 38px; } }
.footer-cols > div { display: grid; gap: 10px; align-content: start; justify-items: start; }
.footer-cols h2 { font-family: var(--font-body); font-size: 1.15rem; font-weight: 500; color: rgb(var(--on-panel)); letter-spacing: 0; margin: 0 0 6px; font-variation-settings: normal; }
.footer-cols a { font-size: 1rem; }
.footer-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--panel-line); }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: .9rem; }
.footer-legal span { color: rgb(var(--on-panel)); }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: rgb(var(--on-panel)); display: grid; place-items: center; width: 28px; height: 28px; text-decoration: none; }
.footer-social a:hover { color: var(--panel-accent); }
.footer-social svg { width: 24px; height: 24px; }
.footer-note { margin: 18px 0 0; font-size: .82rem; color: rgba(var(--on-panel), .82); }
.footer-note a { color: rgba(var(--on-panel), .82); }

/* ============ Knappar & länkar ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border-radius: var(--radius-s); border: 0;
  font-weight: 600; font-size: .97rem; letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: background .15s, transform .1s; min-height: 50px;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: var(--btn-muted); color: var(--title); }
.btn-ghost:hover { background: color-mix(in srgb, var(--btn-muted) 85%, var(--title)); }
.btn-glass { background: var(--panel-tint); color: rgb(var(--on-panel)); }
.btn-glass:hover { background: var(--panel-tint); }
.btn-text { background: none; color: var(--link); padding: 8px 0; min-height: 0; font-weight: 500; letter-spacing: 0; }
.btn-text:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.arrow::after { content: '→'; font-weight: 400; }
.link-arrow { color: var(--link); text-decoration: none; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow::after { content: '→'; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

/* ============ Kort & layout ============ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.band .card { border-color: transparent; }
.card-tight { padding: 18px 20px; }
.card-accent { border-top: 8px solid var(--brand); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
  .grid { gap: 20px; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
.section { margin-top: 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px 20px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.plain-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.page-head { margin-bottom: 32px; }
.page-head p { color: var(--text); max-width: 60ch; font-size: 1.12rem; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; letter-spacing: .03em; }
.tag-verbal { background: var(--verbal-soft); color: var(--verbal); }
.tag-kvant { background: var(--kvant-soft); color: var(--kvant); }
.tag-neutral { background: var(--surface-2); color: var(--muted); }

.checks { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ''; position: absolute; left: 2px; top: .35em; width: 14px; height: 8px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* ============ Hero ============ */
.hero-band {
  margin: -28px calc(50% - 50vw) 0;
  padding: 48px max(var(--gutter), calc(50vw - var(--maxw) / 2 + var(--gutter))) 56px;
  background:
    radial-gradient(620px 380px at 92% 4%, rgba(255, 226, 205, .95), transparent 70%),
    radial-gradient(560px 380px at 62% 108%, rgba(214, 243, 231, .95), transparent 70%),
    var(--sky);
  color: rgb(var(--on-panel));
  border-radius: 0 0 var(--radius-l) var(--radius-l);
  position: relative; overflow: clip;
}
@media (min-width: 700px) { .hero-band { margin-top: -40px; padding-top: 72px; padding-bottom: 80px; border-radius: 0 0 28px 28px; } }
.hero { display: grid; gap: 40px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 960px) { .hero { grid-template-columns: 1.1fr .9fr; } }
.hero h1 { color: rgb(var(--on-panel)); }
.hero-lead { font-size: 1.2rem; color: rgba(var(--on-panel), .88); max-width: 46ch; margin-bottom: 28px; }
.hero-lead strong { color: rgb(var(--on-panel)); font-weight: 700; }
.hero-stat { margin-top: 28px; color: rgba(var(--on-panel), .85); font-size: 1.05rem; }
.hero-stat b { color: var(--panel-accent); font-family: var(--font-display); font-size: 1.7rem; font-weight: 400; margin-right: 4px; }
.hero-stat span + span { margin-left: 18px; }

/* Hero-visual: en riktig provfråga man kan svara på + ett litet poängkort. Alltid ljusa kort på vinröd botten. */
.hero-visual { position: relative; }
.try-card {
  position: relative; background: #fff; color: var(--text); border-radius: 12px; padding: 24px 24px 22px;
  border-top: 8px solid var(--brand); box-shadow: var(--shadow-lift);
  max-width: 460px; margin-right: 12%;
}
.try-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.try-tag { background: var(--verbal-soft); color: var(--verbal); font-weight: 600; font-size: .78rem; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; }
.try-label { font-size: .85rem; font-weight: 500; color: var(--muted); }
.try-label::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #16A34A; margin-right: 7px; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); } }
.try-stem { margin: 0; font-size: .9rem; color: var(--muted); }
.try-word { font-family: var(--font-display); font-style: italic; font-size: 2.3rem; line-height: 1.1; color: var(--title); margin: 2px 0 16px; font-weight: 500; font-variation-settings: 'opsz' 72; letter-spacing: -.02em; }
.try-options { display: grid; gap: 8px; }
.try-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; cursor: pointer;
  padding: 10px 12px; min-height: 48px; border-radius: var(--radius-s); border: 1px solid var(--border); background: #fff;
  color: var(--title); font-size: .98rem; transition: border-color .15s, background .15s, transform .1s;
}
.try-opt:hover:not([disabled]) { border-color: var(--title); background: var(--select-soft); transform: translateX(2px); }
.try-letter { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); font-weight: 600; font-size: .82rem; }
.try-opt[disabled] { cursor: default; }
.try-card.answered .try-opt:not(.is-right):not(.is-wrong) { opacity: .5; }
.try-opt.is-right { border-color: var(--good); background: var(--good-soft); color: var(--good); font-weight: 600; }
.try-opt.is-right .try-letter { background: var(--good); color: #fff; }
.try-opt.is-wrong { border-color: var(--bad); background: var(--bad-soft); }
.try-opt.is-wrong .try-letter { background: var(--bad); color: #fff; }
.try-result:empty { display: none; }
.try-result { margin-top: 14px; animation: pop .3s ease; }
.try-result p { font-size: .92rem; line-height: 1.5; margin: 0 0 12px; }
.try-result b { color: var(--title); }
.try-result .btn { min-height: 44px; padding: 11px 18px; font-size: .92rem; }

.score-card {
  position: relative; z-index: 1; width: 236px; margin: -22px 0 0 auto; display: grid; gap: 6px; text-decoration: none;
  background: #fff; color: var(--text); border-radius: 12px; padding: 18px 18px 16px;
  box-shadow: var(--shadow-lift); transform: rotate(2deg); transition: transform .2s;
}
.score-card:hover { transform: rotate(0) translateY(-3px); }
.score-label { font-size: .82rem; font-weight: 500; color: var(--muted); }
.score-num { font-family: var(--font-display); font-size: 3rem; line-height: .95; color: var(--title); font-weight: 500; font-variation-settings: 'opsz' 72; letter-spacing: -.03em; }
.score-rows { display: grid; gap: 6px; margin: 6px 0 4px; }
.score-row { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }
.score-bar { height: 6px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.score-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.score-bar.kv i { background: var(--kvant); }
.score-link { color: var(--brand); font-weight: 500; font-size: .88rem; }
.score-link::after { content: ' →'; }
@media (max-width: 520px) {
  .try-card { margin-right: 0; }
  .score-card { width: 220px; }
}

/* ============ Dashboard ============ */
.dash { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .dash { grid-template-columns: 1.3fr 1fr 1fr; gap: 20px; } }
.stat-label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 2.3rem; line-height: 1.1; color: var(--title); }
.xpbar { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 12px; }
.xpbar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-light)); border-radius: 999px; transition: width .6s ease; }
.goal { display: flex; align-items: center; gap: 18px; }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; flex: none; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); display: grid; place-items: center; }
.ring::before { content: ''; width: 60px; height: 60px; border-radius: 50%; background: var(--surface); grid-area: 1/1; }
.ring span { grid-area: 1/1; z-index: 1; font-weight: 600; font-size: .9rem; color: var(--title); }

/* ============ Delprovskort  ============ */
.dp-card {
  position: relative; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text);
  background: var(--surface); border-radius: var(--radius); padding: 22px 22px 20px; box-shadow: var(--shadow);
  border: 1px solid var(--border); border-top: 8px solid var(--verbal); transition: box-shadow .2s, transform .2s;
}
.band .dp-card { border-color: transparent; border-top-color: var(--verbal); }
.dp-card.kvant, .band .dp-card.kvant { border-top-color: var(--kvant); }
.dp-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.dp-card:hover .name { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.dp-card .code { font-size: .78rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.dp-card .name { font-weight: 600; font-size: 1.2rem; color: var(--title); line-height: 1.25; }
.dp-card .meta { font-size: .92rem; color: var(--text); margin-top: auto; padding-top: 10px; }
.dp-card .go { color: var(--link); font-weight: 500; font-size: .95rem; margin-top: 10px; }
.dp-card .go::after { content: ' →'; }
.dp-card .mini-bar { height: 4px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin-top: 10px; }
.dp-card .mini-bar span { display: block; height: 100%; background: var(--verbal); border-radius: 4px; }
.dp-card.kvant .mini-bar span { background: var(--kvant); }

/* Ikonrutor (som "Ta ditt nästa steg") */
.feature { display: flex; flex-direction: column; gap: 14px; }
.feature .ico { width: 64px; height: 64px; border-radius: var(--radius-s); flex: none; display: grid; place-items: center; background: var(--tile-bg); color: var(--brand); }
.feature .ico svg { width: 30px; height: 30px; }
.feature h3 { margin: 6px 0 0; font-size: 1.4rem; font-weight: 500; }
.feature p { color: var(--text); margin: 0; }
.feature-row { flex-direction: row; align-items: flex-start; }
.feature-row .ico { width: 44px; height: 44px; font-family: var(--font-display); font-size: 1.4rem; color: #fff; background: var(--brand); }

/* FAQ (som "Vanliga frågor") */
.faq-grid { display: grid; gap: 28px; }
@media (min-width: 900px) { .faq-grid { grid-template-columns: .8fr 1.2fr; gap: 64px; } }
.faq details { border-top: 1px solid var(--border-strong); }
.faq details:last-child { border-bottom: 1px solid var(--border-strong); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; color: var(--title); font-weight: 500; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg) translate(-3px, -3px); transition: transform .2s; flex: none; }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details p { padding-bottom: 20px; margin: 0; }

.split-card { display: grid; border-radius: var(--radius-l); overflow: hidden; background: var(--bg-alt); }
@media (min-width: 900px) { .split-card { grid-template-columns: 1fr 1fr; } }
.split-card > div { padding: 40px 32px; }
@media (min-width: 900px) { .split-card > div { padding: 56px; } }
.split-card .split-visual { background: var(--panel-grad); color: rgb(var(--on-panel)); display: grid; place-items: center; min-height: 260px; position: relative; overflow: hidden; }

.cta-band { margin-top: 56px; border-radius: var(--radius-l); padding: 40px 28px; background: var(--panel); color: rgb(var(--on-panel)); display: grid; gap: 20px; align-items: center; }
.cta-band h2 { color: rgb(var(--on-panel)); margin: 0 0 8px; }
.cta-band p { margin: 0; color: rgba(var(--on-panel), .85); }
@media (min-width: 700px) { .cta-band { grid-template-columns: 1fr auto; padding: 56px; } }

/* ============ Formulär / val ============ */
.field { display: grid; gap: 8px; margin-bottom: 20px; }
.field label, .field .label { font-weight: 600; font-size: .95rem; color: var(--title); }
.input { width: 100%; padding: 12px 14px; border-radius: var(--radius-s); border: 1px solid var(--border-strong); background: var(--surface); min-height: 50px; color: var(--title); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }

.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--border-strong); font-weight: 500; font-size: .95rem; cursor: pointer; user-select: none; min-height: 46px; color: var(--title); }
.chip span:hover { border-color: var(--title); }
.chip input:checked + span { border-color: var(--title); background: var(--title); color: var(--bg); }
.chip.verbal input:checked + span { border-color: var(--verbal); background: var(--verbal); color: #fff; }
.chip.kvant input:checked + span { border-color: var(--kvant); background: var(--kvant); color: var(--bg); }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }
.chip small { font-weight: 400; opacity: .75; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-top: 1px solid var(--border); }
.toggle-row b { font-weight: 600; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; position: absolute; cursor: pointer; z-index: 1; margin: 0; }
.switch span { position: absolute; inset: 0; background: var(--surface-3); border-radius: 999px; transition: .2s; }
.switch span::after { content: ''; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .2s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }

.setup-layout { display: grid; gap: 20px; }
@media (min-width: 900px) { .setup-layout { grid-template-columns: 1.4fr 1fr; align-items: start; } .setup-layout .sticky { position: sticky; top: 96px; } }
.setup-summary { border-top: 8px solid var(--brand); }
.setup-summary .row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.setup-summary .row b { text-align: right; }
.setup-summary .row:last-of-type { border-bottom: 0; }
.field .section-head { align-items: center; margin-bottom: 0; }

/* ============ Quiz ============ */
.quiz-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.quiz-top .icon-btn { background: var(--surface); color: var(--title); border: 1px solid var(--border); }
.quiz-progress { flex: 1; height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.quiz-progress span { display: block; height: 100%; background: var(--brand); border-radius: 999px; transition: width .3s; }
.quiz-count { font-weight: 600; font-size: .92rem; color: var(--title); white-space: nowrap; }
.timer { font-variant-numeric: tabular-nums; font-weight: 600; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--border); font-size: .92rem; color: var(--title); }
.timer.low { color: var(--bad); background: var(--bad-soft); border-color: transparent; }

.quiz-layout { display: grid; gap: 20px; }
@media (min-width: 1000px) { .quiz-layout.has-passage { grid-template-columns: 1.1fr 1fr; align-items: start; } .quiz-layout.has-passage .passage { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; } }
.passage { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.passage p { line-height: 1.75; }
.passage details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.5rem; color: var(--title); }
.passage details summary::-webkit-details-marker { display: none; }
.passage details summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); flex: none; transition: transform .2s; }
.passage details[open] summary::after { transform: rotate(-135deg); }
.passage details[open] summary { margin-bottom: 14px; }
.passage table { width: 100%; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
.passage caption { text-align: left; font-weight: 600; color: var(--title); padding-bottom: 10px; }
.passage th, .passage td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: right; }
.passage th:first-child, .passage td:first-child { text-align: left; }
.passage thead th { color: var(--muted); font-weight: 600; font-size: .82rem; }
.passage tbody tr:nth-child(odd) { background: var(--surface-2); }
.table-wrap { overflow-x: auto; }

.question-card { background: var(--surface); border: 1px solid var(--border); border-top: 8px solid var(--brand); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.question-card .stem { font-size: .95rem; color: var(--muted); margin-bottom: 8px; }
.question-card .prompt { font-size: 1.18rem; font-weight: 500; color: var(--title); margin-bottom: 20px; line-height: 1.5; }
.question-card .prompt.word { font-family: var(--font-display); font-size: 2.4rem; font-weight: 400; font-style: italic; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 12px 16px; border-radius: var(--radius-s); border: 1px solid var(--border-strong);
  background: var(--surface); cursor: pointer; font-size: 1.02rem; min-height: 56px; color: var(--title);
  transition: border-color .12s, background .12s;
}
.option:hover:not([disabled]) { border-color: var(--title); background: var(--select-soft); }
.option .letter { width: 32px; height: 32px; flex: none; border-radius: var(--radius-s); display: grid; place-items: center; font-weight: 600; font-size: .88rem; background: var(--surface-2); color: var(--title); }
.option.selected { border-color: var(--select); background: var(--select-soft); box-shadow: inset 0 0 0 1px var(--select); }
.option.selected .letter { background: var(--select); color: var(--bg); }
.option.correct { border-color: var(--good); background: var(--good-soft); box-shadow: inset 0 0 0 1px var(--good); }
.option.correct .letter { background: var(--good); color: #fff; }
.option.wrong { border-color: var(--bad); background: var(--bad-soft); }
.option.wrong .letter { background: var(--bad); color: #fff; }
.option[disabled] { cursor: default; }

.feedback { margin-top: 18px; padding: 16px 18px; border-radius: var(--radius-s); border-left: 4px solid; animation: pop .25s ease; }
.feedback.good { background: var(--good-soft); border-color: var(--good); }
.feedback.bad { background: var(--bad-soft); border-color: var(--bad); }
.feedback > b { display: block; margin-bottom: 4px; }
.feedback p { margin: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.quiz-nav { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.quiz-nav .spacer { flex: 1; }
.kbd-hint { margin-top: 16px; font-size: .82rem; color: var(--faint); display: none; }
@media (hover: hover) { .kbd-hint { display: block; } }
kbd { font-family: inherit; font-size: .75rem; padding: 1px 6px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--surface-2); }

.dots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.dots button { width: 32px; height: 32px; border-radius: var(--radius-s); border: 1px solid var(--border-strong); background: var(--surface); font-size: .78rem; font-weight: 600; cursor: pointer; color: var(--muted); }
.dots button.answered { background: var(--title); color: var(--bg); border-color: var(--title); }
.dots button.current { box-shadow: 0 0 0 2px var(--brand); }

/* Framsteg, strykning, ledtrådar och paus (Öva) */
.quiz-prog { flex: 1; display: grid; gap: 6px; min-width: 0; }
.quiz-prog .quiz-progress { flex: none; }
.quiz-segs { display: flex; gap: 3px; height: 8px; }
.quiz-segs span { flex: 1; border-radius: 3px; background: var(--surface-3); }
.quiz-segs span.done { background: var(--brand); }
.quiz-segs span.cur { box-shadow: 0 0 0 2px var(--title); }
.quiz-prog-text { font-size: .85rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quiz-prog-text b { color: var(--title); font-weight: 600; }
.quiz-pause { min-height: 40px; padding: 6px 14px; }
.opt-row { display: flex; align-items: stretch; gap: 8px; }
.opt-row .option { flex: 1; min-width: 0; }
.opt-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.strike-btn { flex: none; width: 44px; border: 1px solid transparent; border-radius: var(--radius-s); background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; font-size: 1.05rem; }
.strike-btn svg { width: 20px; height: 20px; }
.strike-btn:hover { color: var(--title); border-color: var(--border); }
.opt-row.struck .option { opacity: .5; }
.opt-row.struck .opt-text { text-decoration: line-through; text-decoration-thickness: 2px; }
.opt-row.struck .strike-btn { color: var(--brand); }
.opt-mark { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: #fff; }
.opt-mark.ok { background: var(--good); }
.opt-mark.no { background: var(--bad); }
.hints { margin-top: 14px; display: grid; gap: 8px; justify-items: start; }
.hint { margin: 0; padding: 10px 14px; border-radius: var(--radius-s); background: var(--surface-2); border-left: 3px solid var(--brand); width: 100%; }
.resume-card { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; padding: 16px 20px; margin-bottom: 20px; border-radius: var(--radius); border: 1px solid var(--border); border-left: 4px solid var(--brand); background: var(--surface); box-shadow: var(--shadow); }
.resume-main { flex: 1 1 320px; }
.resume-main .ova-h { margin-bottom: 4px; }
.resume-main p { margin: 0 0 4px; }
.resume-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.dialog.elim-dialog { max-width: min(620px, calc(100vw - 24px)); }
.elim-dialog .dialog-body { max-height: calc(100dvh - 40px); overflow: auto; }
.elim-body h3 { font-size: 1.05rem; margin: 16px 0 6px; font-family: var(--font-body); font-weight: 600; }
.elim-body ul { padding-left: 20px; margin: 0; display: grid; gap: 4px; }
.elim-demo { padding: 14px; border-radius: var(--radius-s); background: var(--surface-2); }
.elim-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.elim-opt { width: 48px; height: 48px; border-radius: var(--radius-s); border: 1px solid var(--border-strong); background: var(--surface); color: var(--title); font-weight: 700; cursor: pointer; font-size: 1rem; }
.elim-opt[aria-pressed="true"] { opacity: .45; text-decoration: line-through; text-decoration-thickness: 2px; }
.elim-odds { margin: 10px 0 4px; }
.elim-odds b { font-size: 1.4rem; color: var(--brand); font-variant-numeric: tabular-nums; }
.elim-ok { display: flex; gap: 10px; align-items: center; margin-top: 16px; font-weight: 600; cursor: pointer; }
.elim-ok input { width: 18px; height: 18px; accent-color: var(--brand); }
/* Läsbarhet i Öva */
.question-card .prompt { line-height: 1.6; }
.question-card .prompt sup, .question-card .prompt sub, .option sup, .option sub { line-height: 0; font-size: .75em; }
.option { line-height: 1.45; padding-top: 12px; padding-bottom: 12px; }
.feedback p, .feedback li { line-height: 1.6; }
.passage { font-size: 1.03rem; }
.passage p { max-width: 68ch; }
.passage td, .passage th { white-space: nowrap; }
@media (max-width: 699px) {
  .quiz-top { flex-wrap: wrap; gap: 10px; }
  .quiz-prog { order: 3; flex-basis: 100%; }
  .quiz-top .timer { margin-left: auto; }
  .question-card { padding: 18px 16px; }
  .question-card .prompt { font-size: 1.1rem; }
  .question-card .prompt.word { font-size: 2rem; }
  .option { gap: 10px; padding: 10px 12px; font-size: 1rem; }
  .strike-btn { width: 40px; }
  .passage { padding: 18px 16px; }
}

/* ============ Resultat ============ */
.result-hero { text-align: center; padding: 40px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 8px solid var(--brand); box-shadow: var(--shadow); }
.result-hero .score { font-family: var(--font-display); font-size: clamp(4.5rem, 16vw, 7rem); line-height: 1; color: var(--title); letter-spacing: -.03em; }
.result-hero .score small { font-size: .45em; color: var(--muted); font-style: italic; }
.result-hero .msg { font-family: var(--font-display); font-size: 1.7rem; color: var(--title); margin: 10px 0 4px; }
.result-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 20px 0 24px; }
.result-stats .pill { background: var(--surface-2); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .92rem; color: var(--title); }
.result-stats .pill.xp { background: var(--brand); color: #fff; }

.review-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); box-shadow: var(--shadow); }
.review-item summary { cursor: pointer; display: flex; gap: 12px; align-items: center; list-style: none; }
.review-item summary::-webkit-details-marker { display: none; }
.review-item .mark { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.review-item .mark.ok { background: var(--good-soft); color: var(--good); }
.review-item .mark.no { background: var(--bad-soft); color: var(--bad); }
.review-item .mark.skip { background: var(--surface-2); color: var(--muted); }
.review-item .q-short { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--title); }
.review-item .body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.review-item .body .ans { display: grid; gap: 4px; margin-bottom: 12px; }

/* ============ Diagram (statistik) ============ */
.bars { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 48px 1fr 48px; gap: 12px; align-items: center; font-size: .92rem; }
.bar-row .lbl { font-weight: 600; color: var(--title); }
.bar-row .track { height: 12px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-row .track span { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.bar-row.verbal .track span { background: var(--verbal); }
.bar-row.kvant .track span { background: var(--kvant); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--title); }
.bar-row .val.na { color: var(--faint); font-weight: 400; }
.cols { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; align-items: end; height: 130px; padding-top: 8px; border-bottom: 1px solid var(--border); }
.cols .col { position: relative; height: 100%; display: flex; align-items: flex-end; }
.cols .col span { display: block; width: 100%; background: var(--kvant); border-radius: 4px 4px 0 0; opacity: .85; }
.cols .col.today span { background: var(--brand); opacity: 1; }
.cols-axis { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; font-size: .7rem; color: var(--muted); text-align: center; margin-top: 6px; text-transform: uppercase; }
.history-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--border); align-items: center; }
.history-row:hover b { color: var(--brand); }
.history-row:last-child { border-bottom: 0; }

/* ============ Kalkylator ============ */
.calc-grid { display: grid; gap: 20px; }
@media (min-width: 900px) { .calc-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.range-field { margin-bottom: 26px; }
.range-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 12px; }
.range-head .num { width: 80px; text-align: center; padding: 6px 8px; min-height: 44px; font-weight: 600; }
input[type="range"] { width: 100%; accent-color: var(--brand); height: 28px; }
.calc-result { text-align: center; padding: 36px 24px; border-top: 8px solid var(--brand); }
.calc-result .total { font-family: var(--font-display); font-size: clamp(4.5rem, 16vw, 7rem); line-height: 1; color: var(--title); letter-spacing: -.03em; }
.calc-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.calc-split div { background: var(--surface-2); border-radius: var(--radius-s); padding: 14px; }
.calc-split b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
.level-badge { display: inline-block; margin-top: 14px; padding: 4px 14px; border-radius: 999px; font-weight: 500; font-size: .9rem; border: 1px solid var(--title); color: var(--title); }

/* ============ Guider ============ */
.guide-card { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); border-top: 8px solid var(--brand); }
.guide-card:hover h3 { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.guide-card p { margin: 0; }
.guide-card .emoji { width: 52px; height: 52px; border-radius: var(--radius-s); display: grid; place-items: center; font-size: 1.5rem; background: var(--tile-bg); }
.guide-card .go { color: var(--link); font-weight: 500; margin-top: auto; padding-top: 8px; }
.guide-card .go::after { content: ' →'; }
.article { max-width: 70ch; }
.article h2 { margin-top: 1.4em; font-size: 2rem; }
.article p, .article li { font-size: 1.08rem; line-height: 1.75; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1em; }
.article li { margin-bottom: .4em; }
.article li::marker { color: var(--brand); }
.callout { background: var(--bg-pink); border-radius: var(--radius-s); padding: 16px 20px; margin: 1.4em 0; border-left: 4px solid var(--brand); }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--link); text-decoration: none; font-weight: 500; margin-bottom: 20px; }
.back-link:hover { text-decoration: underline; }

/* ============ Konto ============ */
.auth-wrap { max-width: 460px; margin: 0 auto; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: var(--radius-s); padding: 4px; margin-bottom: 20px; }
.tabs button { border: 0; background: none; padding: 10px; border-radius: 4px; font-weight: 600; cursor: pointer; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--title); box-shadow: var(--shadow); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .88rem; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.notice { padding: 16px 18px; border-radius: var(--radius-s); background: var(--surface-2); font-size: .97rem; }
.notice.warn { background: var(--bg-pink); }
.notice.error { background: var(--bad-soft); color: var(--bad); }
.avatar { width: 64px; height: 64px; border-radius: var(--radius-s); background: var(--panel); display: grid; place-items: center; color: var(--brand); font-family: var(--font-display); font-size: 2rem; font-style: italic; }

/* ============ Toast ============ */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--wine); color: #fff; padding: 14px 20px; border-radius: var(--radius-s); font-weight: 500; opacity: 0; pointer-events: none; transition: .25s; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow-lift); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* ============ Konfetti ============ */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .confetti { display: none; }
}

/* ============ Rubriktypsnitt: Newsreader inställt för att likna Tiempos Headline ============ */
/* Vikt 500 + rubrikoptik (opsz 72) + tätare spärrning ger samma tyngd och bredd som originalet. */
h1, h2, .serif, .stat-value, .big-num, .result-hero .score, .result-hero .msg, .calc-result .total,
.calc-split b, .footer-title, .question-card .prompt.word, .passage details summary, .hero-stat b, .avatar {
  font-weight: 500;
  font-variation-settings: 'opsz' 72;
  letter-spacing: -.03em;
}

/* ============ Plus ============ */
.plus-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--radius-s); text-decoration: none; font-weight: 600; font-size: .95rem; color: rgb(var(--on-panel)); border: 1px solid var(--panel-line); white-space: nowrap; }
.plus-btn:hover, .plus-btn.active { background: var(--panel-tint); }
.plus-btn.is-active { border-color: transparent; background: var(--panel-tint); color: var(--panel-accent); }
@media (max-width: 420px) { .plus-btn { padding: 0 10px; } }

.plus-hero { max-width: 760px; margin-bottom: 28px; }
.plus-hero p { font-size: 1.15rem; max-width: 60ch; }
.plans { display: grid; gap: 20px; align-items: stretch; }
@media (min-width: 800px) { .plans { grid-template-columns: 1fr 1.15fr; } }
.plan { display: flex; flex-direction: column; gap: 10px; position: relative; padding: 28px; }
.plan .checks { margin: 8px 0 18px; flex: 1; }
.plan-plus { border: 2px solid var(--brand); border-top-width: 8px; }
.plan-price { color: var(--muted); }
.plan-price span { font-family: var(--font-display); font-size: 2.8rem; color: var(--title); font-weight: 500; font-variation-settings: 'opsz' 72; letter-spacing: -.03em; margin-right: 4px; }
.plan-badge { position: absolute; top: -16px; right: 20px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; }

.paywall { display: grid; gap: 14px 20px; align-items: center; grid-template-columns: auto 1fr; }
.paywall h3 { margin: 0 0 2px; }
.paywall p { margin: 0; }
.paywall .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 760px) { .paywall { grid-template-columns: auto 1fr auto; } .paywall .btn { grid-column: auto; } }
.paywall-lock { width: 52px; height: 52px; border-radius: var(--radius-s); display: grid; place-items: center; background: var(--tile-bg); color: var(--brand); }
.paywall-lock svg { width: 24px; height: 24px; }

/* ============ Gamla prov ============ */
.exam-card .name { display: flex; align-items: center; gap: 8px; }
.exam-card .lock { width: 16px; height: 16px; color: var(--muted); flex: none; }
.exam-card.locked { opacity: .92; }
.exam-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn .lock { width: 16px; height: 16px; }
.pass-card.kvant { border-top-color: var(--kvant); }
.pass-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.pass-card h3 { margin: 0 0 4px; font-size: 1.4rem; }

.sheet-top { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.sheet-top .icon-btn { background: var(--surface); color: var(--title); border: 1px solid var(--border); text-decoration: none; }
.sheet-title { flex: 1; display: grid; line-height: 1.3; }
.sheet-title b { font-size: 1.1rem; }
.sheet-layout { display: grid; gap: 20px; }
@media (min-width: 900px) { .sheet-layout { grid-template-columns: 300px 1fr; align-items: start; } .sheet-side { position: sticky; top: 96px; } }
.sheet-side .btn-block + .btn-block { margin-top: 6px; }
.sheet-progress { margin: 14px 0; padding: 12px; border-radius: var(--radius-s); background: var(--surface-2); text-align: center; color: var(--title); }
.sheet-progress span { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; }
.sheet { display: grid; gap: 16px; }
.sheet-section { margin: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 18px 20px 20px; box-shadow: var(--shadow); min-width: 0; }
.sheet-section legend { padding: 0 6px; display: flex; gap: 8px; align-items: center; font-weight: 600; color: var(--title); flex-wrap: wrap; }
.sheet-section.unavailable { background: var(--surface-2); box-shadow: none; }
.sheet-rows { display: grid; gap: 6px 28px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 640px) { .sheet-rows { grid-template-columns: 1fr 1fr; } }
.sheet-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.qn { width: 28px; font-weight: 600; color: var(--title); font-variant-numeric: tabular-nums; }
.bubble { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--title); font-weight: 600; cursor: pointer; transition: background .12s, border-color .12s, transform .08s; }
.bubble:hover { border-color: var(--title); }
.bubble:active { transform: scale(.94); }
.bubble.on { background: var(--title); border-color: var(--title); color: var(--bg); }

/* Gamla prov: översikt */
.exam-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: end; margin-bottom: 8px; }
.exam-filters > label { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; color: var(--title); min-width: 150px; }
.exam-filters .input { min-height: 46px; padding: 10px 12px; }
.exam-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.exam-card2 { display: grid; gap: 12px; align-content: start; }
.exam-card2 h3 { margin: 2px 0 0; font-size: 1.2rem; }
.exam-card2 h3 a { color: var(--title); text-decoration: none; }
.exam-card2 h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.exam-card2 .btn { justify-self: start; }
.exam-card2.locked { background: var(--surface-2); box-shadow: none; }
.exam-card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.exam-date { font-size: .85rem; color: var(--muted); }
.exam-status, .pass-state { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.st-pagar { background: var(--bg-pink); color: var(--brand); }
.st-klart { background: var(--good-soft); color: var(--good); }
.exam-progress { display: flex; align-items: center; gap: 10px; }
.exam-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.exam-bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }
.exam-last { margin: 0; }
.exam-score { font-weight: 600; color: var(--title); }
.saved-exam-list { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.exam-summary { display: grid; gap: 14px; }
.norm-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .norm-grid { grid-template-columns: 1fr 1fr; } }
.norm-box { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--radius-s); background: var(--surface-2); font-size: .92rem; }
.norm-box b { color: var(--title); }
.norm-box.ok { background: var(--good-soft); }
.norm-box.ok b { font-size: 1.15rem; }
.norm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

/* Gamla prov: inställningar */
.setup-card { max-width: 640px; }
.setup-card fieldset { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.mode-list { display: grid; gap: 10px; }
.mode-opt { display: flex; gap: 12px; align-items: start; padding: 14px 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); cursor: pointer; background: var(--surface); }
.mode-opt:has(input:checked) { border-color: var(--title); box-shadow: inset 0 0 0 1px var(--title); }
.mode-opt input { margin-top: 4px; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.mode-opt span { display: grid; gap: 4px; }
.mode-opt b { color: var(--title); }
.mode-opt small { color: var(--muted); font-size: .88rem; line-height: 1.45; }
.mode-opt small a { color: var(--link); }

/* Gamla prov: provhäfte och svarsblankett */
body.focus-mode main:has(.exam-split) { max-width: 1560px; }
.exam-top { position: sticky; top: 0; z-index: 5; background: var(--bg-alt); padding: 10px 0; margin: -10px 0 10px; }
.exam-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--radius-s); background: var(--surface-2); margin-bottom: 14px; }
.exam-tabs button { flex: 1; border: 0; background: none; padding: 10px; border-radius: 5px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 44px; }
.exam-tabs button[aria-selected="true"] { background: var(--surface); color: var(--title); box-shadow: var(--shadow); }
.exam-split { display: grid; gap: 20px; }
.exam-split[data-show="sheet"] .exam-pdf, .exam-split[data-show="pdf"] .exam-answers { display: none; }
.exam-pdf { height: calc(100dvh - 190px); min-height: 420px; }
@media (min-width: 1000px) {
  .exam-tabs { display: none; }
  .exam-split[data-show] .exam-pdf, .exam-split[data-show] .exam-answers { display: block; }
  .exam-split { grid-template-columns: minmax(0, 1fr) minmax(400px, 520px); align-items: start; }
  .exam-pdf { position: sticky; top: 76px; height: calc(100dvh - 96px); }
  .exam-answers .sheet-rows { grid-template-columns: 1fr; }
}
.exam-tools { margin-bottom: 16px; display: grid; gap: 10px; }
.exam-tools .sheet-progress { margin: 0; }
.exam-tool-btns { gap: 4px 18px; }
.flag-list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.flag-chip { border: 0; background: var(--bg-pink); color: var(--brand); font-weight: 600; border-radius: 999px; padding: 4px 11px; cursor: pointer; font-variant-numeric: tabular-nums; }
.flag-btn { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--faint); cursor: pointer; font-size: 1rem; opacity: .55; }
.flag-btn:hover { opacity: 1; background: var(--surface-2); }
.flag-btn[aria-pressed="true"] { color: var(--brand); opacity: 1; }
.sheet-row.flagged { background: color-mix(in srgb, var(--bg-pink) 60%, transparent); border-radius: 6px; }
.sheet.is-locked .bubble { opacity: .55; cursor: not-allowed; }
.time-up { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--bad-soft); color: var(--bad); font-weight: 600; }

/* PDF-läsaren */
.pv { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.pv:fullscreen { border-radius: 0; border: 0; }
.pv-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.pv-group { display: flex; align-items: center; gap: 4px; }
.pv-btn, .pv-zoom { min-width: 36px; height: 36px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); color: var(--title); font-weight: 600; cursor: pointer; display: inline-grid; place-items: center; text-decoration: none; font-size: 1rem; }
.pv-btn:hover, .pv-zoom:hover { border-color: var(--title); }
.pv-zoom { min-width: 64px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.pv-page { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: var(--muted); padding: 0 4px; }
.pv-page input { width: 52px; height: 36px; text-align: center; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); color: var(--title); font: inherit; }
.pv-pages { flex: 1; overflow: auto; padding: 12px; display: grid; justify-items: center; align-content: start; gap: 12px; outline: none; }
.pv-sheet { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.pv-sheet canvas { display: block; }
.pv-msg { margin: 40px 16px; text-align: center; color: var(--muted); }

/* Gamla prov: resultat */
.rwu { display: grid; gap: 8px; max-width: 460px; margin: 18px auto 20px; }
.rwu-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.rwu-bar i { display: block; height: 100%; }
.rwu .r { --c: var(--good); } .rwu .w { --c: var(--bad); } .rwu .u { --c: var(--faint); }
.rwu-bar i { background: var(--c); }
.rwu-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 16px; font-size: .9rem; }
.rwu-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); margin-right: 6px; vertical-align: -1px; }
.answer-list { display: grid; padding: 6px 16px; }
.ans-row { display: grid; grid-template-columns: 32px 44px 1fr 1fr 24px; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); font-size: .93rem; }
.ans-row:first-child { border-top: 0; }
.ans-row[hidden] { display: none; }
.ans-n { font-weight: 600; color: var(--title); font-variant-numeric: tabular-nums; }
.ans-code { font-size: .8rem; color: var(--muted); font-weight: 600; }
.ans-mark { font-weight: 700; text-align: center; }
.st-ratt .ans-mark { color: var(--good); }
.st-fel .ans-mark, .st-fel .ans-mine b { color: var(--bad); }
.st-obesvarade .ans-mark { color: var(--faint); }
.ans-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
@media (min-width: 700px) { .ans-row { grid-template-columns: 32px 44px 120px 120px 24px 1fr; } .ans-actions { grid-column: auto; } }
.ans-flag { color: var(--brand); font-size: .85rem; margin-left: 4px; }
.btn-mini { border: 1px solid var(--border); background: var(--surface); color: var(--title); border-radius: var(--radius-s); padding: 4px 10px; font-size: .82rem; font-weight: 600; cursor: pointer; min-height: 32px; }
.btn-mini:hover { border-color: var(--title); }
.btn-mini[aria-pressed="true"] { background: var(--title); color: var(--bg); border-color: var(--title); }
.plus-teaser { display: grid; gap: 8px; justify-items: start; background: var(--surface-2); box-shadow: none; }
.plus-teaser h3, .plus-analysis h3 { margin: 0; }
.plus-analysis h4 { margin: 14px 0 8px; font-size: 1rem; }
.report-cats { border: 0; padding: 0; margin: 0 0 16px; display: grid; gap: 6px; }
.report-cat { display: flex; gap: 10px; align-items: center; font-weight: 500 !important; cursor: pointer; }
.report-cat input { accent-color: var(--brand); width: 17px; height: 17px; }
.dialog.report-dialog { max-width: min(480px, calc(100vw - 32px)); }
.report-dialog .field { margin-bottom: 14px; }
.ad-comment { max-width: 320px; white-space: pre-wrap; }
.ad-comment small { display: block; margin-top: 4px; }
.ad-status { min-height: 38px; padding: 6px 8px; width: auto; }

.review-grid-card { margin-bottom: 16px; }
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 10px; }
.rg { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--radius-s); font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface-2); color: var(--title); }
.rg-n { font-weight: 400; color: var(--muted); font-size: .8rem; min-width: 16px; }
.rg.ok { background: var(--good-soft); color: var(--good); }
.rg.no { background: var(--bad-soft); color: var(--bad); }
.rg.no .rg-a { text-decoration: line-through; opacity: .8; }
.rg-r { margin-left: auto; color: var(--good); }
.rg.skip .rg-a { color: var(--muted); }

.spinner { width: 36px; height: 36px; margin: 24px auto; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mini-sheet { background: #fff; border-radius: 12px; padding: 18px 20px; display: grid; gap: 10px; box-shadow: var(--shadow-lift); transform: rotate(-3deg); }
.mini-row { display: flex; align-items: center; gap: 8px; }
.mini-row span { width: 18px; color: var(--muted); font-weight: 600; font-size: .85rem; }
.mini-row i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: var(--title); }
.mini-row i.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ============ Öva: snabbstart, delprov, anpassat pass ============ */
.ova-head { margin-bottom: 28px; }
.ova-h { font-family: var(--font-body); font-size: 1.15rem; font-weight: 600; letter-spacing: 0; margin: 0 0 14px; color: var(--title); font-variation-settings: normal; }

.quick-grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .quick-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; } }
.quick-card {
  display: grid; gap: 4px; align-content: start; text-align: left; cursor: pointer;
  padding: 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow); color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; min-height: 150px;
}
.quick-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.quick-card:active { transform: translateY(0); }
.quick-ico { width: 42px; height: 42px; border-radius: var(--radius-s); display: grid; place-items: center; background: var(--tile-bg); color: var(--brand); font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; font-family: var(--font-display); font-style: italic; }
.quick-title { font-weight: 600; color: var(--title); font-size: 1.08rem; }
.quick-desc { font-size: .88rem; color: var(--muted); line-height: 1.35; }
.quick-meta { margin-top: auto; padding-top: 10px; font-size: .82rem; font-weight: 600; color: var(--link); }
.quick-card.mix { background: var(--brand); border-color: var(--brand); color: rgba(255, 255, 255, .85); }
.quick-card.mix .quick-title, .quick-card.mix .quick-meta { color: #fff; }
.quick-card.mix .quick-desc { color: rgba(255, 255, 255, .8); }
.quick-card.mix .quick-ico { background: rgba(255, 255, 255, .18); color: #fff; }
.quick-card.wrong { border-color: var(--brand); border-style: dashed; }

.dp-tiles { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (min-width: 700px) { .dp-tiles { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
.dp-tile {
  display: grid; gap: 6px; text-align: left; cursor: pointer; padding: 16px; border-radius: var(--radius);
  border: 1px solid var(--border); border-top: 6px solid var(--verbal); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.dp-tile.kvant { border-top-color: var(--kvant); }
.dp-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.dp-tile:hover .dp-go { transform: translateX(3px); color: var(--brand); }
.dp-tile-top { display: flex; justify-content: space-between; align-items: center; }
.dp-code { font-weight: 700; letter-spacing: .04em; color: var(--title); font-size: 1.05rem; }
.dp-go { color: var(--faint); transition: transform .15s, color .15s; }
.dp-name { font-size: .9rem; color: var(--muted); line-height: 1.3; min-height: 2.6em; }
.dp-bar { height: 5px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.dp-bar i { display: block; height: 100%; background: var(--verbal); border-radius: 999px; }
.dp-tile.kvant .dp-bar i { background: var(--kvant); }
.dp-stat { font-size: .8rem; color: var(--muted); }

.custom { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.custom summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; }
.custom summary::-webkit-details-marker { display: none; }
.custom summary > span { display: grid; gap: 2px; }
.custom summary b { color: var(--title); font-size: 1.05rem; }
.custom summary::after { content: ''; width: 9px; height: 9px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .2s; flex: none; margin-right: 4px; }
.custom[open] summary::after { transform: rotate(-135deg); }
.custom-form { padding: 4px 20px 20px; border-top: 1px solid var(--border); }
.custom-form fieldset { border: 0; padding: 0; margin: 16px 0 0; }
.custom-form legend { margin-bottom: 8px; }
.pick-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
@media (max-width: 520px) { .pick-row { grid-template-columns: 1fr auto; } .pick-row .chip-group { grid-column: 1 / -1; order: 3; } }
.pick-label { font-size: .9rem; color: var(--muted); }
.custom-foot { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.custom-sum b { color: var(--title); }

/* Kryssrutor som tydliga "chips": vald = tonad bakgrund + bock */
.chip span { background: var(--surface); border: 1.5px solid var(--border-strong); color: var(--title); padding: 8px 14px; min-height: 42px; }
.chip input:checked + span,
.chip.verbal input:checked + span,
.chip.kvant input:checked + span { background: var(--select-soft); border-color: var(--title); color: var(--title); }
.chip.verbal input:checked + span { border-color: var(--verbal); background: var(--verbal-soft); }
.chip.kvant input:checked + span { border-color: var(--kvant); background: var(--kvant-soft); }
.chip input:checked + span::before { content: '✓'; font-weight: 700; margin-right: 2px; }

/* Segmenterad kontroll */
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-2); border-radius: var(--radius-s); padding: 4px; gap: 4px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 16px; border-radius: 5px; font-weight: 500; color: var(--muted); cursor: pointer; min-height: 38px; }
.seg input:checked + span { background: var(--surface); color: var(--title); box-shadow: var(--shadow); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ============ Dialog ============ */
.dialog { border: 0; padding: 0; border-radius: 14px; max-width: min(420px, calc(100vw - 32px)); width: 100%; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lift); }
.dialog::backdrop { background: rgba(15, 23, 38, .55); backdrop-filter: blur(2px); }
.dialog[open] { animation: pop .2s ease; }
.dialog-body { padding: 24px; }
.dialog h2 { font-size: 1.6rem; margin: 0 0 8px; }
.dialog p { margin: 0 0 4px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 85%, #000); }

/* ============ Fast knappfält längst ned (mobil) ============ */
.sticky-bar { display: none; }
@media (max-width: 899px) {
  .hide-mobile { display: none !important; }
  .sticky-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 20px -10px rgba(75, 95, 207, .25);
  }
  .sticky-bar .btn { min-height: 46px; }
  .sticky-info { color: var(--muted); font-size: .92rem; }
  .sticky-info b { color: var(--title); font-size: 1.1rem; }
  body:has(.sticky-bar) main { padding-bottom: 110px; }
}
@media (max-width: 699px) {
  .quick-grid { grid-template-columns: 1fr; gap: 10px; }
  .quick-card { grid-template-columns: 42px 1fr; column-gap: 14px; row-gap: 2px; min-height: 0; padding: 14px 16px; align-items: center; }
  .quick-ico { grid-row: 1 / span 3; margin: 0; }
  .quick-meta { padding-top: 4px; }
}
.account-btn.is-loading { min-width: 96px; background: var(--panel-tint); }

/* ============ Nedräkning till provet ============ */
.countdown { display: grid; grid-template-columns: auto 1fr; gap: 14px 20px; align-items: center; margin-top: 28px; padding: 18px 22px; border-radius: var(--radius); background: var(--bg-pink); }
.countdown .btn { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 760px) { .countdown { grid-template-columns: auto 1fr auto; } .countdown .btn { grid-column: auto; } }
.cd-num { display: grid; justify-items: center; line-height: 1; padding-right: 20px; border-right: 1px solid color-mix(in srgb, var(--title) 15%, transparent); }
.cd-num b { font-family: var(--font-display); font-size: 2.6rem; font-weight: 500; color: var(--brand); font-variation-settings: 'opsz' 72; }
.cd-num span { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.cd-text { display: grid; gap: 2px; }
.cd-text b { color: var(--title); }
.cd-text span { color: var(--text); font-size: .95rem; }

/* ============ Helt provpass ============ */
.pp-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .pp-grid { grid-template-columns: 1fr 1fr; gap: 16px; } }
.pp-card {
  display: grid; gap: 8px; text-align: left; cursor: pointer; padding: 20px; border-radius: var(--radius);
  background: var(--panel); color: rgba(var(--on-panel), .82); border: 0; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden;
}
.pp-card::after { content: '→'; position: absolute; right: 20px; bottom: 18px; color: var(--panel-accent); font-size: 1.2rem; transition: transform .15s; }
.pp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.pp-card:hover::after { transform: translateX(4px); }
.pp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pp-card .tag { background: var(--panel-tint); color: rgb(var(--on-panel)); }
.pp-time { font-size: .85rem; font-weight: 600; color: var(--panel-accent); }
.pp-title { font-family: var(--font-display); font-size: 1.6rem; color: rgb(var(--on-panel)); line-height: 1.15; font-weight: 500; font-variation-settings: 'opsz' 72; letter-spacing: -.02em; }
.pp-plan { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-plan span { font-size: .8rem; padding: 3px 8px; border-radius: 6px; background: var(--panel-tint); color: rgba(var(--on-panel), .85); }
.pp-plan b { color: rgb(var(--on-panel)); }
.pp-meta { font-size: .85rem; padding-right: 30px; }
:root[data-theme="dark"] .pp-card { background: var(--surface-2); }

/* ============ Mobilanpassning: smala skärmar ============ */
/* Rutnät får aldrig bli bredare än skärmen, och långa ord får brytas. */
.grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dp-tiles, .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 699px) { .quick-grid { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 700px) { .grid-4, .dp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
h1, h2, h3, .dp-card .name, .dp-name, .quick-title, .pp-title, .q-short, .prompt { overflow-wrap: break-word; hyphens: auto; }
main, .card, .question-card, .passage, .sheet-section { min-width: 0; }

@media (max-width: 420px) {
  :root { --gutter: 14px; }
  .topbar-inner { gap: 8px; padding: 8px var(--gutter); min-height: 60px; }
  .logo-word { height: 36px; }
  .topbar-actions { gap: 6px; }
  .plus-btn, .account-btn { height: 38px; padding: 0 10px; font-size: .88rem; }
  .account-btn { max-width: 92px; }
  .icon-btn { width: 38px; height: 38px; }
  h1 { font-size: 2.15rem; }
  h2 { font-size: 1.75rem; }
  .hero-lead { font-size: 1.05rem; }
  .btn { padding: 13px 18px; }
  .btn-row > .btn { flex: 1 1 auto; }
  .dp-card { padding: 16px 14px 14px; }
  .dp-card .name { font-size: 1.02rem; }
  .dp-tile { padding: 14px 12px; }
  .card { padding: 18px; }
  .question-card, .passage { padding: 18px 16px; }
  .question-card .prompt.word { font-size: 2rem; }
  .option { padding: 10px 12px; gap: 10px; }
  .result-hero { padding: 28px 16px; }
  .countdown { padding: 16px; gap: 12px 14px; }
  .cd-num { padding-right: 14px; }
  .cd-num b { font-size: 2.1rem; }
  .bar-row { grid-template-columns: 40px minmax(0, 1fr) 44px; gap: 8px; }
  .calc-split b { font-size: 1.6rem; }
  .sheet-section { padding: 14px 12px 16px; }
  .bubble { width: 36px; height: 36px; }
  .sheet-row { gap: 6px; }
  .review-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); }
  .footer-cols { gap: 24px; }
  .plan { padding: 22px 18px; }
}
@media (max-width: 350px) {
  .hero-stat span + span { margin-left: 10px; }
  .bubble { width: 32px; height: 32px; font-size: .85rem; }
  .quiz-top { gap: 8px; }
  .timer { padding: 6px 8px; }
}

/* Mobil: hoppa mellan läsförståelsetext och fråga */
.jump-pill { display: none; }
@media (max-width: 999px) {
  .jump-pill {
    display: inline-flex; align-items: center; position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 46;
    padding: 12px 18px; border-radius: 999px; border: 0; background: var(--panel); color: rgb(var(--on-panel)); font-weight: 600; font-size: .95rem;
    box-shadow: 0 10px 24px -8px rgba(75, 95, 207, .55); cursor: pointer;
  }
  :root[data-theme="dark"] .jump-pill { background: var(--brand); }
  .quiz-layout.has-passage + .jump-pill ~ * { }
  .question-card, .passage { scroll-margin-top: 84px; }
}

/* ============ Startsida: säljande hero och sektioner ============ */
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 14px; border-radius: 999px; background: var(--panel-tint); color: var(--panel-accent); font-size: .88rem; font-weight: 500; }
.hero-kicker::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(31, 95, 214, .3); }
.btn-lg { padding: 17px 28px; font-size: 1.05rem; min-height: 56px; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 20px 0 0; color: rgba(var(--on-panel), .85); font-size: .95rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust li::before { content: ''; width: 12px; height: 7px; border-left: 2px solid var(--pink-300); border-bottom: 2px solid var(--pink-300); transform: rotate(-45deg) translateY(-2px); }

/* Mindre provfråge- och poängruta i heron */
.try-card { max-width: 400px; padding: 18px 20px 16px; border-top-width: 6px; }
.try-head { margin-bottom: 10px; }
.try-word { font-size: 1.85rem; margin: 0 0 12px; }
.try-options { gap: 6px; }
.try-opt { min-height: 40px; padding: 7px 10px; font-size: .92rem; gap: 10px; }
.try-letter { width: 24px; height: 24px; font-size: .75rem; }
.score-card { width: 196px; padding: 14px 16px 12px; gap: 4px; margin-top: -26px; }
.score-num { font-size: 2.4rem; }
.score-row { grid-template-columns: 42px 1fr; font-size: .74rem; }
.score-link { font-size: .82rem; }
@media (min-width: 960px) { .hero-visual { max-width: 440px; justify-self: end; width: 100%; } }

/* Så höjer du poängen */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.steps li { position: relative; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; }
.steps h3 { margin: 4px 0 0; font-size: 1.25rem; }
.steps p { margin: 0 0 6px; }
.step-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; }

/* Bevis i siffror */
.proof { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--radius-l); background: var(--panel); color: rgba(var(--on-panel), .82); overflow: hidden; }
@media (min-width: 800px) { .proof { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.proof > div { padding: 24px 20px; display: grid; gap: 4px; border-right: 1px solid var(--panel-line); border-bottom: 1px solid var(--panel-line); }
.proof b { font-family: var(--font-display); font-weight: 500; font-variation-settings: 'opsz' 72; font-size: 2.6rem; line-height: 1; color: rgb(var(--on-panel)); letter-spacing: -.03em; }
.proof span { font-size: .9rem; }
:root[data-theme="dark"] .proof { background: var(--surface-2); }

/* Prisjämförelse på startsidan */
.home-plans { max-width: 860px; margin: 0 auto; }
@media (max-width: 420px) {
  .try-word { font-size: 1.6rem; }
  .proof b { font-size: 2.1rem; }
  .proof > div { padding: 18px 16px; }
  .steps li { padding: 20px 18px; }
  .btn-lg { padding: 15px 22px; }
}
.cd-actions { display: flex; flex-wrap: wrap; gap: 10px; grid-column: 1 / -1; }
@media (min-width: 760px) { .cd-actions { grid-column: auto; justify-content: flex-end; } }
.plan-free { font-weight: 600; color: var(--muted); margin: 4px 0 2px; }

/* "Allt ingår – helt gratis" på startsidan */
.free-all { display: grid; gap: 24px 48px; padding: 32px 28px; border-radius: var(--radius-l); background: var(--bg-pink); align-items: center; }
@media (min-width: 860px) { .free-all { grid-template-columns: 1fr 1fr; padding: 48px; } }
.free-all-head h2 { margin-bottom: 10px; }
.free-all-head p { font-size: 1.08rem; margin-bottom: 20px; }
.free-all-list { margin: 0; gap: 14px; }
.free-all-list li { font-size: 1.05rem; color: var(--title); font-weight: 500; }

/* ============ Öva v2: tydligare val, rekommendation och fast knappfält ============ */
.ova-head { margin-bottom: 24px; }
.ova-head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin-bottom: .3em; }
.ova-head p { margin: 0; max-width: 60ch; }
.section-sm { margin-top: 40px; }
.ova-h-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin-bottom: 14px; }
.ova-h-row .ova-h { margin: 0; }

/* Snabbstart: alltid jämna rader (3 kort) */
@media (min-width: 700px) { .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .quick-card { min-height: 0; } }

/* Rekommenderat för dig */
.ova-next {
  display: grid; gap: 20px; padding: 24px; border-radius: var(--radius-l, 24px); margin-bottom: 8px;
  background: var(--panel-grad); color: rgba(var(--on-panel), .85);
  box-shadow: var(--shadow);
}
@media (min-width: 860px) { .ova-next { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; padding: 32px; gap: 32px; } }
.ova-next-kicker { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--panel-accent); margin-bottom: 8px; }
.ova-next-title { color: rgb(var(--on-panel)); font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 6px; }
.ova-next-code { display: inline-block; font-family: var(--font-body); font-size: .5em; font-weight: 700; letter-spacing: .06em; vertical-align: middle; padding: 4px 9px; border-radius: 8px; background: var(--brand); color: #fff; margin-right: 6px; position: relative; top: -.15em; }
.ova-next-why { margin: 0 0 18px; color: rgba(var(--on-panel), .82); }
.ova-next-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ova-next-alt { background: var(--panel-tint); color: rgb(var(--on-panel)); }
.ova-next-alt:hover { background: var(--panel-tint); }
@media (max-width: 480px) { .ova-next { padding: 20px 18px; } .ova-next-actions .btn { flex: 1 1 100%; } }
.ova-progress { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; margin: 0; padding: 18px; border-radius: var(--radius); background: var(--panel-tint); }
.ova-progress div { display: grid; gap: 2px; min-width: 0; }
.ova-progress-wide { grid-column: 1 / -1; }
.ova-progress dt { font-size: .8rem; color: rgba(var(--on-panel), .82); }
.ova-progress dd { margin: 0; font-family: var(--font-display); font-size: 1.7rem; color: rgb(var(--on-panel)); line-height: 1.1; font-variation-settings: 'opsz' 72; }
.ova-progress dd small { font-family: var(--font-body); font-size: .9rem; color: rgba(var(--on-panel), .82); }
.ova-progress-bar { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--panel-tint); overflow: hidden; }
.ova-progress-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

/* Delprov grupperade per del */
.dp-group + .dp-group { margin-top: 18px; }
.dp-group-h { display: flex; align-items: center; gap: 8px; font-family: var(--font-body); font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; font-variation-settings: normal; }
.dp-group-h::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--verbal); }
.dp-group-h.kvant::before { background: var(--kvant); }

/* Frågevy: hopfälld text på mobil */
.passage-toggle { display: none; }
@media (max-width: 999px) {
  .passage.is-collapsed { padding: 14px 18px; }
  .passage.is-collapsed summary { font-size: 1.15rem; }
  .passage .passage-toggle { display: inline-flex; margin-left: auto; font-family: var(--font-body); font-size: .85rem; font-weight: 600; color: var(--link); white-space: nowrap; }
  .passage .passage-toggle::before { content: 'Visa texten'; }
  .passage details[open] .passage-toggle::before { content: 'Dölj'; }
  .passage-title { min-width: 0; }

  /* Fast knappfält längst ned i frågekortet */
  .quiz-nav {
    position: sticky; bottom: 0; z-index: 5; margin: 20px -24px 0; padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .quiz-nav .spacer { display: none; }
  .quiz-nav .btn { flex: 1 1 0; min-height: 50px; }
  .feedback { scroll-margin-bottom: 96px; }
  .jump-pill { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) { .quiz-nav { margin-inline: -16px; padding-inline: 16px; } }
.jump-pill[hidden] { display: none !important; }

/* Inloggning: rubriken på en rad, ingen avstavning */
.auth-wrap .page-head h1 { font-size: clamp(1.9rem, 7.5vw, 2.8rem); hyphens: none; text-wrap: balance; }

/* Logga */
.logo-word { height: 56px; }
.topbar-inner { min-height: 80px; }
@media (max-width: 899px) {
  .logo-word { height: 46px; }
  .topbar-inner { min-height: 64px; padding-top: 9px; padding-bottom: 9px; }
}

/* =====================================================================
   Guider: faktaruta, nedräkning, tidslinje, packlista, studieplan
   ===================================================================== */
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
@media (min-width: 640px) { .fact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.fact-grid div { background: var(--bg-pink); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.fact-grid b { font-family: var(--font-display); font-weight: 500; font-size: 2.2rem; line-height: 1; color: var(--title); }
.fact-grid span { font-size: .9rem; color: var(--text); }

.countdown-card { display: grid; gap: 18px; background: var(--panel); color: rgb(var(--on-panel)); border-radius: var(--radius-l); padding: 22px; margin: 18px 0; }
@media (min-width: 760px) { .countdown-card { grid-template-columns: 1.4fr 1fr; align-items: center; padding: 28px; } }
.countdown-card .plain-label { color: var(--panel-accent); }
.cd-date { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; margin: 10px 0 14px; text-transform: none; }
.cd-date::first-letter { text-transform: uppercase; }
.cd-clock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cd-clock div { background: var(--panel-tint); border-radius: var(--radius); padding: 10px 4px; text-align: center; }
.cd-clock b { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 6vw, 2.2rem); line-height: 1; font-variant-numeric: tabular-nums; }
.cd-clock span { font-size: .75rem; color: var(--panel-accent); }
.cd-side { display: grid; gap: 10px; }
.cd-side > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--panel-line); padding-bottom: 8px; }
.cd-side .muted { color: var(--panel-accent); }
.cd-status { margin: 0; color: var(--panel-accent); }
.cd-status.open { color: rgb(var(--on-panel)); font-weight: 600; }

.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); margin-bottom: 14px; }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--brand); }
.tl-dot.break { background: var(--pink-300); } .tl-dot.lunch { background: var(--panel); } .tl-dot.info { background: var(--border-strong); }
.tl-list { list-style: none; padding: 0 0 0 22px; margin: 0 0 12px; position: relative; }
.tl-list::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-list::after { content: ''; position: absolute; left: 6px; top: 6px; width: 2px; height: 0; background: var(--brand); transition: height 2.4s cubic-bezier(.4,0,.2,1); }
.tl-list.in::after { height: calc(100% - 12px); }
.tl-item { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; padding: 8px 0; opacity: 0; transform: translateX(-8px); transition: opacity .4s ease, transform .4s ease; transition-delay: calc(var(--i) * 140ms); }
.tl-list.in .tl-item { opacity: 1; transform: none; }
.tl-item::before { content: ''; position: absolute; left: -21px; top: 13px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); }
.tl-item.pass::before { background: var(--brand); border-color: var(--brand); }
.tl-item.break::before { border-color: var(--pink-300); background: var(--pink-100); }
.tl-item.lunch::before { background: var(--panel); border-color: var(--wine); }
.tl-item time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--title); font-size: .92rem; padding-top: 2px; }
.tl-body { display: flex; flex-direction: column; }
.tl-item.pass .tl-body b { color: var(--brand); }
.tl-bar { grid-column: 2; height: 6px; border-radius: 999px; width: 0; background: var(--border-strong); transition: width .6s ease; transition-delay: calc(var(--i) * 140ms + .2s); }
.tl-list.in .tl-bar { width: calc(var(--len) / 55 * 100%); max-width: 100%; }
.tl-item.pass .tl-bar { background: var(--brand); } .tl-item.break .tl-bar { background: var(--pink-300); } .tl-item.lunch .tl-bar { background: var(--panel); }
@media (prefers-reduced-motion: reduce) { .tl-item, .tl-bar, .tl-list::after { transition: none; } }

.pack { margin: 14px 0; }
.pack-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pack-head b { white-space: nowrap; color: var(--title); }
.pack-progress { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.pack-progress span { display: block; height: 100%; background: var(--good); border-radius: 999px; transition: width .3s ease; }
.pack-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 700px) { .pack-list { grid-template-columns: 1fr 1fr; } }
.pack-list label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--surface); position: relative; height: 100%; }
.pack-list label:hover { border-color: var(--border-strong); }
.pack-list label.on { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 40%, transparent); }
.pack-list input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pack-list input:focus-visible + .pack-box { outline: 2px solid var(--brand); outline-offset: 2px; }
.pack-box { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; margin-top: 1px; }
.pack-list label.on .pack-box { background: var(--good); border-color: var(--good); }
.pack-list label.on .pack-box::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.pack-list label > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.pack-list label > span:last-child b { color: var(--title); font-weight: 600; }
.pack-list label.on b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--good) 60%, transparent); }
.pack-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }

.plan-builder { margin: 18px 0; }
.plan-form { display: grid; gap: 14px; }
.plan-form .field { margin: 0; border: 0; padding: 0; }
.plan-weeks { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.plan-weeks .input { width: 90px; }
.plan-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0 8px; }
.plan-summary div { background: var(--bg-pink); border-radius: var(--radius); padding: 12px; text-align: center; }
.plan-summary b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.9rem; line-height: 1.1; color: var(--title); }
.plan-summary span { font-size: .85rem; }
.plan-weeks-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.plan-week { border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 12px 16px; background: var(--surface); }
.plan-week.kartlagg { border-left-color: var(--pink-300); } .plan-week.tempo { border-left-color: var(--wine); } .plan-week.ladda { border-left-color: var(--good); }
.plan-week-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plan-week-head b { color: var(--title); }
.plan-week ul { margin: 8px 0 0; padding-left: 18px; }
.plan-week li { margin: 3px 0; }

.guide-card-alt { background: var(--bg-pink); border-color: transparent; }

/* ============ Poängräknare ============ */
.calc-how ol { margin: 6px 0 8px; padding-left: 18px; }
.calc-formula { margin: 14px 0 0; font-variant-numeric: tabular-nums; color: var(--text); }
.calc-formula b { color: var(--title); }
.calc-links { justify-content: center; margin-top: 12px; }
.calc-levels { width: 100%; border-collapse: collapse; }
.calc-levels th, .calc-levels td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.calc-levels th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.calc-levels tr:last-child td { border-bottom: 0; }
#exam.input { appearance: auto; }

/* ============ Delprov ============ */
.dp-card-lg { gap: 4px; }
.dp-card-lg .meta { margin-top: 0; padding-top: 4px; }
.dp-facts { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); margin: 8px 0 6px; }
.dp-card-lg .dp-bar { margin: 6px 0 4px; }
.dp-card-lg.kvant .dp-bar i { background: var(--kvant); }
.dp-stats { margin-top: 8px; }
.dp-detail { display: grid; gap: 28px; }
@media (min-width: 900px) { .dp-detail { grid-template-columns: 1fr 1fr; gap: 48px; } }
.dp-detail h2 { font-size: 1.7rem; }
.dp-steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dp-steps li { counter-increment: s; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; }
.dp-steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--panel); color: rgb(var(--on-panel)); display: grid; place-items: center; font-weight: 600; font-size: .9rem; }
.dp-traps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dp-traps li { background: var(--bad-soft); border-left: 4px solid var(--brand); padding: 10px 14px; border-radius: var(--radius-s); }
.dp-traps.tips li { background: var(--surface-2); border-left-color: var(--wine); }
.dp-formulas { padding-left: 18px; margin: 0; }
.dp-formulas li { margin: 6px 0; }
.dp-fixed { margin-top: 14px; }
.dp-fixed ol { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.dp-fixed b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--title); margin-right: 8px; font-size: .85rem; }
.dp-sample { max-width: 760px; }
.dp-passage { margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.dp-passage summary { cursor: pointer; font-weight: 600; color: var(--title); }
.dp-sample .prompt { margin-bottom: 14px; }
.article .countdown-card b, .countdown-card b { color: rgb(var(--on-panel)); }
.article .countdown-card p { color: var(--panel-accent); }
.article .tl-list { padding: 0 0 0 22px; margin: 0 0 12px; }
.article .pack-list, .article .plan-weeks-list { padding: 0; }
.article .tl-item, .article .pack-list li, .article .plan-weeks-list > li { margin: 0; font-size: 1rem; line-height: 1.5; }
.article .plan-week ul { padding-left: 18px; margin: 8px 0 0; }
.article .plan-week li { font-size: 1rem; margin: 3px 0; }
.pack-list .tag { align-self: flex-start; font-size: .72rem; padding: 2px 8px; margin: 2px 0; }

/* AI-studieplan */
.ai-card { margin-top: 14px; display: grid; gap: 10px; border: 1px solid var(--border); background: linear-gradient(135deg, var(--bg-pink), var(--surface) 60%); }
.ai-card p { margin: 0; }
.ai-card textarea.input { min-height: 70px; resize: vertical; font: inherit; }
.ai-card .btn-row { align-items: center; gap: 12px; margin: 0; }
.ai-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ai-head b { color: var(--title); }
.tag-ai { background: var(--brand); color: #fff; }
.plan-toggle { display: inline-flex; background: var(--surface-2); border-radius: var(--radius-s); padding: 4px; gap: 4px; margin: 18px 0 4px; flex-wrap: wrap; }
.plan-toggle button { border: 0; background: transparent; padding: 8px 16px; border-radius: 5px; font: inherit; font-weight: 500; color: var(--muted); cursor: pointer; min-height: 38px; }
.plan-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--title); box-shadow: var(--shadow); font-weight: 600; }
.ai-plan { margin-top: 14px; }
.ai-summary { font-size: 1.1rem; color: var(--title); margin: 0 0 6px; }
.plan-week.ai { border-left-color: var(--brand); }
.ai-go { white-space: nowrap; font-weight: 600; }

/* ============ Studieplan: fria val och total studietid ============ */
.field-hint { display: block; margin-top: 6px; font-size: .85rem; color: var(--muted); }
.field-hint.warn { color: var(--bad); }
.stepper { display: inline-flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.stepper .input { width: 64px; border: 0; border-radius: 0; text-align: center; -moz-appearance: textfield; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.plan-weeks .stepper .input { width: 64px; }
.step-btn { width: 44px; border: 0; background: var(--surface-2); color: var(--title); font-size: 1.25rem; font-weight: 600; cursor: pointer; }
.step-btn:hover { background: var(--surface-3); }
.step-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.plan-min { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.plan-custom { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .95rem; }
.plan-custom .input { width: 84px; text-align: center; }
.seg-days span { min-width: 40px; padding-left: 0; padding-right: 0; text-align: center; }
.plan-total { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--bg-pink); color: var(--text); font-size: .95rem; }
.plan-total b { color: var(--title); }
.plan-note { margin: 14px 0 0; padding: 12px 16px; border-left: 4px solid var(--brand); background: var(--bg-pink); border-radius: var(--radius-s); font-size: .95rem; }
.plan-daytip { margin: 10px 0 0; font-weight: 500; color: var(--title); }
.plan-summary b { font-size: clamp(1.25rem, 4.5vw, 1.9rem); }
@media (max-width: 420px) {
  .seg-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
  .seg-days span { min-width: 0; padding: 8px 0; }
  .plan-min .seg { width: 100%; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .plan-min .seg span { padding: 8px 0; text-align: center; }
}

/* ============ Studieplan: dag för dag ============ */
.plan-phases { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 4px; font-size: .9rem; }
.plan-phase { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--title); }
.plan-phase b { font-weight: 600; }
.plan-phase.kartlagg { background: color-mix(in srgb, var(--pink-300) 35%, transparent); }
.plan-phase.tempo { background: color-mix(in srgb, var(--wine) 14%, transparent); }
.plan-phase.ladda { background: var(--good-soft); }
.plan-arrow { color: var(--faint); }
.plan-week > details > summary { cursor: pointer; list-style: none; }
.plan-week > details > summary::-webkit-details-marker { display: none; }
.plan-week > details > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(45deg); transition: transform .2s; flex: none; }
.plan-week > details[open] > summary::after { transform: rotate(-135deg); }
.plan-week-sum { margin: 8px 0 0; color: var(--text); font-size: .95rem; }
.article .plan-week .plan-days, .plan-week .plan-days { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.article .plan-week .plan-day, .plan-week .plan-day { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.plan-day.light { background: var(--good-soft); }
.plan-day-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.plan-day-head b { color: var(--title); }
.article .plan-week .plan-blocks, .plan-week .plan-blocks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.article .plan-week .plan-block, .plan-week .plan-block { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; margin: 0; font-size: .95rem; line-height: 1.45; }
.pb-min { font-weight: 600; color: var(--title); font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: 1px; }
.pb-what { display: grid; gap: 2px; min-width: 0; }
.pb-what > b, .pb-what > a { font-weight: 600; color: var(--title); overflow-wrap: break-word; }
.pb-what > a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.pb-what > a::after { content: ' →'; }
.pb-what > span { color: var(--muted); font-size: .9rem; }
.plan-block.review .pb-min, .plan-block.repeat .pb-min { color: var(--muted); }
.plan-block.timed .pb-min::after { content: ' ⏱'; }
.plan-block.exam { padding: 8px 10px; margin: 0 -10px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--wine) 8%, transparent); }
@media (max-width: 420px) {
  .article .plan-week .plan-block, .plan-week .plan-block { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; }
  .plan-week { padding: 12px; }
  .plan-week .plan-day { padding: 10px; }
}

/* ============ Studieplan: översikt och en vecka i taget ============ */
.plan-status { display: grid; gap: 4px; margin: 0 0 14px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.plan-status b { color: var(--title); }
.plan-status span { font-size: .95rem; }
.plan-status.prelim { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); background: var(--bg-pink); }
.plan-status.prelim .btn { justify-self: start; margin-top: 6px; }
.plan-status.personal { border-left: 4px solid var(--good); }
.pw-overview { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.pw-overview-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.pw-overview-head b { color: var(--title); }
.pw-overview-head .plan-phases { margin: 0; font-size: .8rem; }
.pw-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.pw-chip { height: 40px; border-radius: var(--radius-s); border: 1px solid var(--border); border-bottom: 4px solid var(--brand); background: var(--surface-2); color: var(--title); font: inherit; font-size: .9rem; cursor: pointer; padding: 0; }
.pw-chip.kartlagg { border-bottom-color: var(--pink-300); }
.pw-chip.tempo { border-bottom-color: var(--wine); }
.pw-chip.ladda { border-bottom-color: var(--good); }
.pw-chip:hover { border-color: var(--border-strong); }
.pw-chip.active { background: var(--title); color: var(--bg); border-color: var(--title); }
.pw-chip:focus-visible, .pw-nav:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.pw-panel { margin-top: 14px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); scroll-margin-top: 90px; }
.pw-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 10px; align-items: center; }
.pw-title { display: grid; gap: 4px; text-align: center; }
.pw-title b { color: var(--title); font-size: 1.1rem; }
.pw-title b .muted { font-weight: 400; }
.pw-meta { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.pw-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--title); font-size: 1.1rem; cursor: pointer; }
.pw-nav:disabled { opacity: .35; cursor: default; }
.pw-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.pw-panel .plan-days { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.pw-panel .plan-day { margin: 0; padding: 10px 12px; border-radius: var(--radius-s); background: var(--surface-2); }
.pw-panel .plan-blocks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pw-panel .plan-block { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; margin: 0; font-size: .95rem; line-height: 1.45; }
.article .pw-panel .plan-days, .article .pw-panel .plan-blocks { padding: 0; }
.article .pw-panel li { margin: 0; }
.alloc { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.alloc summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; padding: 14px 16px; }
.alloc summary::-webkit-details-marker { display: none; }
.alloc summary b { color: var(--title); }
.alloc-body { padding: 0 16px 14px; display: grid; gap: 12px; }
.alloc-group { display: grid; gap: 6px; }
.alloc-part { font-size: .8rem; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.alloc-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 40px; gap: 4px 10px; align-items: center; font-size: .92rem; }
.alloc-code { font-weight: 700; color: var(--title); text-decoration: none; }
.alloc-bar { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.alloc-bar i { display: block; height: 100%; background: var(--verbal); border-radius: 999px; }
.alloc-row.kvant .alloc-bar i { background: var(--kvant); }
.alloc-pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--title); }
.alloc-why { grid-column: 2 / -1; font-size: .82rem; color: var(--muted); margin-top: -2px; }
@media (max-width: 420px) {
  .pw-panel { padding: 12px; }
  .pw-panel .plan-block { grid-template-columns: 50px minmax(0, 1fr); gap: 8px; }
  .pw-chips { grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); }
  .pw-chip { height: 36px; }
}
.pw-chip b, .article .pw-chip b { color: inherit; font-weight: 600; }

/* ============ Startsidan: konto → skräddarsydd studieplan ============ */
.plan-cta { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 16px; max-width: 520px; border-radius: var(--radius); background: var(--panel-tint); border: 1px solid var(--panel-line); color: rgba(var(--on-panel), .85); text-decoration: none; font-size: .92rem; line-height: 1.4; transition: background .15s; }
.plan-cta:hover { background: var(--panel-tint); }
.plan-cta b { display: block; color: rgb(var(--on-panel)); font-size: 1rem; }
.plan-cta b::after { content: ' →'; color: var(--panel-accent); }
.plan-cta-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1rem; }
.how-grid { display: grid; gap: 20px; }
@media (min-width: 1000px) { .how-grid { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } .how-grid .steps { grid-template-columns: 1fr; gap: 12px; } }
@media (min-width: 1000px) { .how-steps li { grid-template-columns: 48px minmax(0, 1fr); column-gap: 16px; padding: 18px 20px; } .how-steps li > :not(.step-n) { grid-column: 2; } .how-steps .step-n { grid-row: 1 / span 3; } }
.how-steps .step-n { font-size: 1rem; letter-spacing: .02em; }
.how-done { color: var(--good); font-weight: 600; font-size: .95rem; }
.plan-mock { display: grid; gap: 10px; padding: 20px; border-radius: var(--radius-l, 16px); background: var(--panel); color: rgba(var(--on-panel), .82); text-decoration: none; box-shadow: var(--shadow-lift); transform: rotate(-1.5deg); transition: transform .2s; }
.plan-mock:hover { transform: rotate(0); }
.pm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--panel-line); }
.pm-head b { font-family: var(--font-display); font-weight: 500; font-size: 1.35rem; color: rgb(var(--on-panel)); }
.pm-head span { font-size: .8rem; color: var(--panel-accent); }
.pm-day { display: flex; justify-content: space-between; font-size: .85rem; }
.pm-day b { color: rgb(var(--on-panel)); }
.pm-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--panel-tint); font-size: .85rem; line-height: 1.35; }
.pm-row i { font-style: normal; font-weight: 600; color: var(--panel-accent); }
.pm-row b { display: block; color: rgb(var(--on-panel)); font-size: .95rem; }
.pm-foot { font-size: .75rem; color: rgba(var(--on-panel), .82); text-align: center; }
@media (max-width: 999px) { .plan-mock { transform: none; max-width: 420px; } }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; }
.card-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }

/* ============ Resultatsidan ============ */
.res-facts { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 0; margin: 10px 0 6px; color: var(--muted); font-size: .95rem; }
.res-facts b { color: var(--title); font-variant-numeric: tabular-nums; }
.res-facts .ok b { color: var(--good); }
.res-facts .no b { color: var(--bad); }
.res-note { margin: 0 0 8px; }
.next-step { margin-top: 20px; padding: 22px 24px; border-radius: var(--radius); background: var(--panel); color: rgba(var(--on-panel), .85); box-shadow: var(--shadow); }
.next-step .plain-label { color: var(--panel-accent); }
.next-step h2 { color: rgb(var(--on-panel)); font-size: clamp(1.5rem, 4vw, 2rem); margin: 10px 0 6px; }
.next-step p { margin: 0 0 14px; max-width: 60ch; }
.next-step .btn-row { align-items: center; }
.ns-then { font-size: .9rem; color: rgba(var(--on-panel), .82); }
.ns-then a { color: var(--panel-accent); }
.res-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.res-split > div { padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-align: center; }
.res-split b { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 500; color: var(--title); }
.res-split span { font-size: .85rem; color: var(--muted); }
.res-split p { grid-column: 1 / -1; margin: 0; }
.bar-row.topic { grid-template-columns: minmax(0, 11em) minmax(0, 1fr) 48px; }
.bar-row.topic .lbl { font-weight: 500; font-size: .85rem; color: var(--muted); }
.rv-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rv-filter { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--title); font: inherit; font-size: .9rem; cursor: pointer; }
.rv-filter span { color: var(--muted); font-variant-numeric: tabular-nums; }
.rv-filter.on { background: var(--title); color: var(--bg); border-color: var(--title); }
.rv-filter.on span { color: inherit; opacity: .8; }
.rv-seen { margin-left: auto; flex: none; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.review-item[hidden] { display: none; }
.rv-passage { margin: 0 0 10px; }
.rv-passage summary { cursor: pointer; color: var(--link); font-size: .92rem; font-weight: 500; }
.rv-passage .table-wrap { margin-top: 8px; padding: 12px; border-radius: var(--radius-s); background: var(--surface-2); font-size: .92rem; max-height: 50vh; overflow: auto; }
.rv-prompt { margin: 6px 0 10px; font-weight: 500; color: var(--title); }
.rv-options { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.rv-options li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); border: 1px solid var(--border); font-size: .95rem; }
.rv-options .letter { width: 26px; height: 26px; flex: none; border-radius: 6px; display: grid; place-items: center; font-weight: 600; font-size: .8rem; background: var(--surface-2); }
.rv-options em { margin-left: auto; font-style: normal; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.rv-options li.right { border-color: var(--good); background: var(--good-soft); }
.rv-options li.right em { color: var(--good); }
.rv-options li.chosen { border-color: var(--bad); background: var(--bad-soft); }
.rv-options li.chosen em { color: var(--bad); }
.rv-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }

/* Bokmärke "Repetera senare" */
.save-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: .82rem; cursor: pointer; }
.save-btn svg { width: 15px; height: 15px; }
.save-btn:hover { border-color: var(--border-strong); color: var(--title); }
.save-btn.on { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); background: var(--bg-pink); }
@media (max-width: 420px) { .question-card .save-btn span { display: none; } .question-card .save-btn { padding: 6px 8px; } }

/* Fördjupning i förklaringen */
.why-wrong { margin: 8px 0 0 !important; font-size: .95rem; }
.why-wrong b { display: inline; }
.steps-more { margin-top: 10px; }
.steps-more summary { cursor: pointer; color: var(--link); font-weight: 600; font-size: .92rem; }
.steps-more ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.fast-way { margin: 8px 0 0 !important; font-size: .92rem; }
.fast-way b { display: inline; }

/* Repetition på Öva */
.rep-card { display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brand); box-shadow: var(--shadow); }
.rep-card .ova-h { margin-bottom: 4px; }
.rep-card p { margin: 0; }
.rep-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (min-width: 800px) { .rep-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.rv-list { grid-template-columns: minmax(0, 1fr); }
.rv-list .review-item, .rv-list .body { min-width: 0; }
.rv-options li > span:not(.letter) { min-width: 0; overflow-wrap: anywhere; }

/* ============ Startsidan: säljande sektioner ============ */
.trust-bar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 24px; border-radius: var(--radius); overflow: hidden; background: var(--border); border: 1px solid var(--border); }
@media (min-width: 760px) { .trust-bar { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.trust-bar > div { display: grid; gap: 2px; padding: 16px 18px; background: var(--surface); text-align: center; }
.trust-bar b { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 3.5vw, 1.9rem); color: var(--brand); font-variation-settings: 'opsz' 72; line-height: 1.1; }
.trust-bar span { font-size: .88rem; color: var(--muted); }
.feat-grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .feat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .feat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feat { display: grid; gap: 6px; align-content: start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.feat:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.feat-ico { width: 40px; height: 40px; border-radius: var(--radius-s); display: grid; place-items: center; background: var(--panel); color: var(--panel-accent); font-size: 1.1rem; margin-bottom: 4px; }
.feat b { color: var(--title); font-size: 1.08rem; }
.feat > span:last-child { font-size: .95rem; color: var(--muted); }
.dream { display: grid; gap: 22px; align-items: center; padding: 28px; border-radius: var(--radius-l, 16px); background: var(--bg-pink); }
@media (min-width: 860px) { .dream { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); padding: 40px; } }
.dream h2 { margin-bottom: 10px; }
.dream p { margin: 0 0 16px; font-size: 1.05rem; }
.dream-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.dream-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--surface); }
.dream-list span { color: var(--title); font-weight: 600; }
.dream-list b { font-weight: 500; color: var(--muted); font-size: .92rem; }
.voice-grid { display: grid; gap: 14px; }
@media (min-width: 800px) { .voice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.voice { margin: 0; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 12px; }
.voice blockquote { margin: 0; font-size: 1rem; color: var(--text); }
.voice figcaption { display: grid; }
.voice figcaption b { color: var(--title); }
.voice figcaption span { color: var(--brand); font-size: .9rem; font-weight: 600; }
/* Exempelcitat (testperiod) */
.sample-badge { display: inline-block; margin-bottom: 8px; padding: 3px 10px; border-radius: 999px; background: var(--panel); color: rgb(var(--on-panel)); font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sample-note { margin: -8px 0 14px; color: var(--muted); font-size: .9rem; }
.voice.sample { border-style: dashed; }
.voice blockquote::before { content: '”'; display: block; font-family: var(--font-display); font-size: 2.6rem; line-height: .6; color: var(--brand); margin-bottom: 6px; }
.voice figcaption { display: flex; align-items: center; gap: 10px; }
.voice figcaption > span:last-child { display: grid; }
.voice-avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--panel-accent); font-family: var(--font-display); font-size: 1rem; }
.voice-result { color: var(--brand); font-size: .9rem; font-weight: 600; }
.voice figcaption .voice-avatar { color: var(--panel-accent); font-size: 1rem; font-weight: 500; }
.voice figcaption > span:last-child { color: inherit; font-size: inherit; font-weight: inherit; }
.voice figcaption .voice-result { color: var(--brand); font-size: .9rem; font-weight: 600; }

/* ============ Nivåtestet ============ */
.gauge { width: 100%; max-width: 240px; height: auto; display: block; margin: 0 auto; }
.gauge .g-track { fill: none; stroke: var(--surface-3); stroke-width: 14; stroke-linecap: round; }
.gauge .g-range { fill: none; stroke: var(--brand); stroke-width: 14; stroke-linecap: round; }
.gauge .g-dot { fill: #fff; stroke: var(--brand); stroke-width: 4; }
.gauge .g-val { font-family: var(--font-display); font-size: 25px; font-weight: 500; fill: var(--title); }
.gauge .g-lbl { font-size: 9.5px; font-weight: 600; letter-spacing: .12em; fill: var(--muted); }
.gauge .g-end { font-size: 11px; font-weight: 600; fill: var(--title); }
.level-card { display: grid; gap: 20px; align-items: center; padding: 28px; border-radius: var(--radius-l, 16px); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
@media (min-width: 860px) { .level-card { grid-template-columns: minmax(0, 1fr) 260px; padding: 36px 40px; } }
.level-card h2 { margin: 10px 0; }
.level-card p { margin: 0 0 18px; max-width: 60ch; font-size: 1.05rem; }
.level-card .btn-row { align-items: center; gap: 12px 20px; }
.level-card-gauge { text-align: center; }
.level-card-meta { display: block; margin-top: 4px; font-size: .85rem; color: var(--muted); }
.level-how-list { list-style: none; counter-reset: lv; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.level-how-list li { counter-increment: lv; display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.level-how-list li::before { content: counter(lv); grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 600; }
.level-how-list b { color: var(--title); }
.level-how-list span { color: var(--muted); font-size: .95rem; }
.level-res { display: grid; gap: 18px; align-items: center; margin-top: 20px; padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); border-top: 6px solid var(--brand); box-shadow: var(--shadow); }
@media (min-width: 860px) { .level-res { grid-template-columns: minmax(0, 1fr) 240px; padding: 30px; } }
.level-res h2 { margin: 10px 0 12px; font-size: clamp(1.6rem, 4.5vw, 2.3rem); }
.level-parts { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.level-parts li { display: flex; gap: 8px; padding: 8px 12px; border-radius: var(--radius-s); background: var(--surface-2); font-size: .95rem; }
.level-parts b { color: var(--title); }
.level-res > .level-res-main > p { color: var(--muted); max-width: 62ch; }
.level-next { display: grid; gap: 4px; margin-top: 14px; padding: 16px; border-radius: var(--radius); background: var(--bg-pink); }
.level-next b { color: var(--title); font-size: 1.1rem; }
.level-next .btn-row { margin-top: 10px; }
.level-res-gauge { order: -1; }
@media (min-width: 860px) { .level-res-gauge { order: 0; } }

/* ============ Nivåtestet: val av test, tips, historik ============ */
.lv-intro h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 10px 0; }
.lv-variants { display: grid; gap: 14px; }
@media (min-width: 760px) { .lv-variants { grid-template-columns: 1.15fr 1fr; } }
.lv-variant { position: relative; display: grid; gap: 8px; align-content: start; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.lv-variant:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.lv-variant.rec { border: 2px solid var(--brand); }
.lv-variant > b { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; color: var(--title); }
.lv-badge { justify-self: start; padding: 3px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .04em; }
.lv-facts { display: flex; flex-wrap: wrap; gap: 6px; }
.lv-facts span { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: .85rem; font-weight: 600; color: var(--title); }
.lv-desc { color: var(--muted); font-size: .95rem; }
.lv-variant .btn { justify-self: start; margin-top: 6px; pointer-events: none; }
.lv-tips .checks { margin: 0; }
.lv-history { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.lv-history a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); }
.lv-history a:hover { border-color: var(--border-strong); }
.lv-history b { color: var(--brand); font-variant-numeric: tabular-nums; }
.level-prev { margin: 0 0 10px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--text) !important; }
.level-prev b { color: var(--title); }

/* ============ Plus: lås, prissida ============ */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lock-ico { width: 13px; height: 13px; flex: none; }
.plus-badge { display: inline-flex; align-items: center; gap: 4px; justify-self: start; padding: 3px 9px; border-radius: 999px; background: var(--panel); color: rgb(var(--on-panel)); font-size: .75rem; font-weight: 700; }
.plus-strip { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; margin-bottom: 18px; padding: 12px 16px; border-radius: var(--radius-s); background: var(--bg-pink); color: var(--text); text-decoration: none; font-size: .95rem; }
.plus-strip b { color: var(--title); }
.plus-strip-go { color: var(--link); font-weight: 600; }
.plus-strip-go::after { content: ' →'; }
.paywall { display: grid; gap: 14px; margin-top: 14px; padding: 24px; border-radius: var(--radius); background: var(--bg-pink); text-align: center; justify-items: center; }
.paywall-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); color: var(--panel-accent); }
.paywall-ico .lock-ico { width: 20px; height: 20px; }
.paywall h3 { margin: 0 0 4px; color: var(--title); font-size: 1.25rem; }
.paywall p { margin: 0; max-width: 52ch; }
.paywall-cta { display: grid; gap: 6px; justify-items: center; }
.paywall-cta span { font-size: .85rem; color: var(--muted); }
.pw-chip.locked { color: var(--muted); opacity: .8; }
.pw-chip b { display: inline-grid; place-items: center; }
.pp-time { display: inline-flex; align-items: center; gap: 8px; }
.pp-card .plus-badge { background: var(--brand); }
.exam-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.exam-card.locked .go { color: var(--muted); }
.plus-hero { display: grid; gap: 20px; align-items: center; padding: 36px 28px; border-radius: var(--radius-l, 16px); color: rgba(var(--on-panel), .88); background: var(--panel-grad); }
@media (min-width: 800px) { .plus-hero { grid-template-columns: minmax(0, 1fr) 200px; padding: 52px 48px; } }
.plus-hero h1 { color: rgb(var(--on-panel)); font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
.plus-hero h1 em { color: var(--panel-accent); }
.plus-small, .plus-have { margin: 12px 0 0; font-size: .92rem; color: rgba(var(--on-panel), .82); }
.plus-have { margin: 0 0 14px; font-size: 1.05rem; }
.plus-have b { color: rgb(var(--on-panel)); }
.plus-price { display: grid; justify-items: center; align-content: center; width: 170px; height: 170px; justify-self: center; border-radius: 50%; background: var(--brand); color: #fff; }
.plus-price b { font-family: var(--font-display); font-weight: 500; font-size: 4rem; line-height: 1; }
.cmp-card { padding: 6px 4px; overflow-x: auto; }
.cmp { width: 100%; border-collapse: collapse; }
.cmp th, .cmp td { padding: 11px 12px; border-bottom: 1px solid var(--border); text-align: center; font-size: .95rem; }
.cmp tbody tr:last-child th, .cmp tbody tr:last-child td { border-bottom: 0; }
.cmp thead th { font-weight: 700; color: var(--title); }
.cmp tbody th { text-align: left; font-weight: 500; color: var(--title); }
.cmp td b { font-weight: 600; color: var(--title); }
.cmp .cmp-plus { background: var(--bg-pink); }
.cmp thead .cmp-plus { color: var(--brand); border-radius: 8px 8px 0 0; }
.cmp-yes { color: var(--good); font-weight: 800; }
.cmp-no { color: var(--faint); }
@media (max-width: 480px) { .cmp th, .cmp td { padding: 9px 6px; font-size: .85rem; } }
.pricing { display: grid; gap: 22px; align-items: center; }
@media (min-width: 900px) { .pricing { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 36px; } }
.pricing h2 { margin: 10px 0; }
.pricing p { margin: 0 0 16px; font-size: 1.05rem; }

/* ============ Administration ============ */
.ad { display: grid; gap: 18px; }
.ad-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 24px; }
.ad-top h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 6px 0 0; }
.ad-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; border-radius: var(--radius-s); background: var(--surface-2); max-width: 100%; }
.ad-tabs a { padding: 8px 14px; border-radius: 6px; color: var(--muted); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.ad-tabs a.on { background: var(--surface); color: var(--title); box-shadow: var(--shadow); }
.ad-note { padding: 10px 14px; border-radius: var(--radius-s); background: var(--bg-pink); font-size: .92rem; margin-bottom: 14px; }
.ad-error { display: grid; gap: 6px; justify-items: start; padding: 16px; border-radius: var(--radius-s); background: var(--bad-soft); margin-bottom: 14px; }
.ad-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
@media (min-width: 900px) { .ad-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ad-kpi { display: grid; gap: 2px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); text-decoration: none; color: var(--text); min-width: 0; }
a.ad-kpi:hover { border-color: var(--border-strong); }
.ad-kpi span { font-size: .85rem; color: var(--muted); }
.ad-kpi b { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.2rem); color: var(--title); line-height: 1.15; }
.ad-kpi small { font-size: .8rem; color: var(--muted); }
.ad-grid { display: grid; gap: 14px; }
@media (min-width: 860px) { .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-wide { grid-column: 1 / -1; } }
.ad-card { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); min-width: 0; }
.ad-card h2 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; margin: 0 0 12px; color: var(--title); font-variation-settings: normal; }
.ad-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.ad-empty { color: var(--muted); margin: 0; font-size: .95rem; }
.ad-empty.big { padding: 36px 12px; text-align: center; }
.ad-sub { margin: 10px 0 0; color: var(--muted); font-size: .88rem; }
.ad-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.ad-line:first-of-type { border-top: 0; }
.ad-line-main { display: grid; min-width: 0; flex: 1; }
.ad-line-main b, .ad-who b { color: var(--title); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-line-main small, .ad-who small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-av { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); color: var(--panel-accent); font-weight: 600; font-size: .9rem; }
.ad-av.big { width: 56px; height: 56px; font-size: 1.4rem; }
.ad-badge { display: inline-block; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 600; white-space: nowrap; font-family: var(--font-body); vertical-align: middle; }
.ad-badge.good { background: var(--good-soft); color: var(--good); }
.ad-badge.bad { background: var(--bad-soft); color: var(--bad); }
.ad-badge.warn { background: var(--bg-pink); color: var(--brand); }
.ad-badge.info { background: var(--panel); color: rgb(var(--on-panel)); }
.ad-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; height: 120px; align-items: end; }
.ad-bars div { position: relative; height: 100%; display: flex; align-items: end; }
.ad-bars i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--brand); }
.ad-bars b { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: .72rem; color: var(--title); mix-blend-mode: normal; }
.ad-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ad-search { flex: 1 1 220px; }
.ad-sort { flex: 0 1 190px; width: auto; }
.ad-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ad-chips button { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--title); font: inherit; font-size: .86rem; cursor: pointer; }
.ad-chips button span { color: var(--muted); }
.ad-chips button.on { background: var(--title); border-color: var(--title); color: var(--bg); }
.ad-chips button.on span { color: inherit; opacity: .8; }
.ad-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ad-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.ad-table th { padding: 10px 14px; text-align: left; font-size: .78rem; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ad-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.ad-table tr:last-child td { border-bottom: 0; }
.ad-table:not(.plain) tbody tr { cursor: pointer; }
.ad-table:not(.plain) tbody tr:hover, .ad-table tbody tr:focus-visible { background: var(--surface-2); outline: none; }
.ad-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-who > span:last-child { display: grid; min-width: 0; max-width: 300px; }
.ad-act { text-align: right; }
.ad-link { border: 0; background: none; padding: 0 0 0 10px; color: var(--link); font: inherit; text-decoration: underline; cursor: pointer; }
.ad-pager { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--muted); }
.ad-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 10px 0 14px; }
.ad-hero-main { flex: 1 1 240px; min-width: 0; }
.ad-hero-main h2 { font-size: 1.3rem; margin: 0 0 2px; overflow-wrap: anywhere; }
.ad-hero-main p { margin: 0; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.ad-hero-act { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-dl { margin: 0 0 12px; display: grid; gap: 8px; }
.ad-dl div { display: flex; justify-content: space-between; gap: 12px; }
.ad-dl dt { color: var(--muted); font-size: .9rem; }
.ad-dl dd { margin: 0; color: var(--title); font-weight: 500; text-align: right; }
.ad-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.ad-mini b { display: block; font-family: var(--font-display); font-weight: 500; font-size: 1.7rem; color: var(--title); }
.ad-mini span { font-size: .82rem; color: var(--muted); }
.ad-log { display: grid; gap: 1px; padding: 8px 0; border-top: 1px solid var(--border); }
.ad-log:first-of-type { border-top: 0; }
.ad-log b { color: var(--title); font-weight: 600; font-size: .93rem; }
.ad-log small { color: var(--muted); }
.ad-danger .danger { color: var(--bad); }
.ad-form { display: grid; gap: 12px; }
.ad-form label { display: grid; gap: 4px; font-size: .9rem; font-weight: 500; color: var(--title); }
.ad-form select { padding: 10px; border-radius: var(--radius-s); border: 1px solid var(--border-strong); background: var(--surface); color: var(--title); font: inherit; }
@media (max-width: 640px) { .hide-sm { display: none; } .ad-who > span:last-child { max-width: 190px; } .ad-table th, .ad-table td { padding: 9px 10px; } }
.ad { grid-template-columns: minmax(0, 1fr); }
.ad > *, #ad-body { min-width: 0; }
.ad-top > * { min-width: 0; }
@media (max-width: 640px) {
  .ad-sort { flex: 1 1 140px; }
  .ad-tools .btn { flex: 1 1 140px; }
  .ad-who > span:last-child { max-width: 150px; }
  .ad-table .ad-av { display: none; }
  .ad-hero-act .btn { flex: 1 1 auto; }
}

/* ============ Neutral logga och sidfot ============ */
.logo { align-items: center; gap: 10px; color: rgb(var(--on-panel)); }
.logo-mark { width: 32px; height: 32px; flex: none; }
.logo-text { font-family: var(--font-body); font-size: 1.18rem; font-weight: 600; letter-spacing: -.01em; }
.topbar-inner { min-height: 68px; }
.footer { border-radius: 0; margin-top: 40px; }
@media (min-width: 700px) { .footer { border-radius: 0; } .footer-inner { padding-top: 56px; } }
.footer-inner { padding-top: 44px; padding-bottom: 36px; }
@media (min-width: 900px) { .footer-cols { grid-template-columns: repeat(3, minmax(0, 220px)); } }
.footer a { color: var(--panel-accent); }
.footer-note { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--panel-line); }
.hero h1 { hyphens: none; text-wrap: balance; }

/* ============ Nöjd-garanti ============ */
.guarantee { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; padding: 20px; border: 1px solid var(--pink-200); border-radius: var(--radius-l); background: var(--bg-pink); }
.guarantee-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; }
.guarantee h2 { margin: 0 0 6px; font-size: clamp(1.35rem, 3vw, 1.7rem); }
.guarantee p { margin: 0 0 6px; }
.guarantee p:last-child { margin-bottom: 0; }
.guarantee h2 { hyphens: none; text-wrap: balance; }

/* ============ Logga: HPraketen ============ */
.logo-mark { width: 34px; height: 34px; }
.logo-text { font-size: 1.24rem; font-weight: 500; letter-spacing: -.02em; color: var(--panel-accent); }
.logo-text b { font-weight: 700; color: rgb(var(--on-panel)); }

/* ============ Större logga ============ */
.logo { gap: 12px; }
.logo-mark { width: 44px; height: 44px; }
.logo-text { font-size: 1.62rem; }
.topbar-inner { min-height: 78px; }
@media (max-width: 1040px) { .logo-mark { width: 38px; height: 38px; } .logo-text { font-size: 1.36rem; } .logo { gap: 9px; } }
@media (max-width: 899px) { .topbar-inner { min-height: 66px; } }
@media (max-width: 360px) { .logo-mark { width: 34px; height: 34px; } .logo-text { font-size: 1.22rem; } }

/* ============ Enklare startsida ============ */
.hero h1 { max-width: 12ch; }
.hero-lead { max-width: 38ch; }
.pricing-head { max-width: 680px; margin-bottom: 24px; }
.price-cards { display: grid; gap: 16px; }
@media (min-width: 760px) { .price-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lift); }
.price-card h3, .price-card p, .price-card ul { margin: 0; }
.price-num { font-family: var(--font-display); font-size: 2.3rem; line-height: 1.05; color: var(--title); }
.price-num span { font-family: var(--font-body); font-size: 1rem; color: var(--muted); }
.price-card .btn { margin-top: auto; }
.price-note { color: var(--muted); font-size: .9rem; }
.price-card .price-num { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 2.8rem); line-height: 1.05; color: var(--title); }
.price-card .price-num span { font-family: var(--font-body); font-size: 1rem; color: var(--muted); }
.price-card .price-note { color: var(--muted); font-size: .9rem; }

/* Inloggad: utloggning, medlemsstatus och hälsning */
/* Inloggad: Logga ut ligger där Logga in annars ligger, med samma utseende. Namnet leder till Konto. */
.logout-btn { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border-radius: var(--radius-s); border: 0; background: var(--brand); color: #fff; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; }
.logout-btn:hover { background: var(--brand-dark); }
.logout-btn[hidden] { display: none; }
body.is-member .account-btn { background: transparent; box-shadow: inset 0 0 0 1px var(--panel-line); }
body.is-member .account-btn:hover, body.is-member .account-btn.active { background: var(--panel-tint); }
@media (max-width: 1240px) {
  body.is-member .logo-text { display: none; }
  body.is-member .account-btn { display: inline-block; max-width: 104px; line-height: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.is-member .main-nav a { padding: 8px 8px; white-space: nowrap; font-size: .94rem; }
  body.is-member .plus-btn, body.is-member .account-btn, .logout-btn { padding: 0 9px; font-size: .86rem; }
}
@media (max-width: 420px) {
  .logout-btn { height: 38px; }
  body.is-member .account-btn { line-height: 38px; max-width: 78px; }
}
.member-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 20px; padding: 10px 14px; border-radius: var(--radius-s); background: var(--panel-tint); color: rgba(var(--on-panel), .88); font-size: .92rem; }
.member-chip b { color: rgb(var(--on-panel)); }
.member-chip.is-plus b { color: var(--panel-accent); }
.member-chip.is-warn { background: rgba(224, 32, 45, .28); }
.member-chip a { color: rgb(var(--on-panel)); font-weight: 600; margin-left: auto; }
.hero-nudge { display: inline-block; margin-top: 12px; color: rgb(var(--on-panel)); font-weight: 600; font-size: .95rem; }

/* Kontosidan */
.member-pill { display: inline-flex; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--surface-2); color: var(--title); }
.member-pill.is-plus { background: var(--brand); color: #fff; }
.account-section { margin-top: 14px; }
.account-section h2 { margin: 0 0 14px; font-size: 1.25rem; }
.account-section details { border-top: 1px solid var(--border-strong); padding: 12px 0 0; margin-top: 14px; }
.account-section summary { cursor: pointer; font-weight: 600; color: var(--title); }
.account-section details form { margin-top: 14px; }
.bg-list { margin: 0 0 14px; padding: 0; list-style: none; display: grid; gap: 4px; }

/* Startfrågor */
.wz { max-width: 620px; }
.wz .card h1 { margin: 6px 0 8px; }
.wz-progress { display: flex; gap: 6px; margin-bottom: 14px; }
.wz-progress span { flex: 1; height: 5px; border-radius: 999px; background: var(--border-strong); }
.wz-progress span.on { background: var(--brand); }
.wz-field { border: 0; padding: 0; margin: 0 0 20px; }
.wz-field legend { font-weight: 600; color: var(--title); margin-bottom: 8px; padding: 0; }
.wz-choice { display: grid; gap: 8px; }
.wz-choice label { position: relative; cursor: pointer; }
.wz-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.wz-choice span { display: block; padding: 12px 16px; border: 1.5px solid var(--border-strong); border-radius: var(--radius-s); font-weight: 600; color: var(--title); }
.wz-choice input:checked + span { border-color: var(--brand); background: var(--select-soft); }
.wz-choice input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 3px; }
.wz-short { max-width: 150px; }
.wz-h { font-size: 1.05rem; margin: 0 0 10px; }
.wz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.wz-grid h3 { font-size: .9rem; margin: 0 0 8px; color: var(--muted); }
.wz-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: .9rem; }
.wz-score { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.wz-score .input { width: 62px; padding: 7px 8px; text-align: center; }
.wz-actions { margin-top: 8px; }
@media (max-width: 560px) { .wz-grid { grid-template-columns: minmax(0, 1fr); } }

/* Bekräfta e-post */
.verify .card { padding-block: 34px; }
.verify-ico { width: 58px; height: 58px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--select-soft); color: var(--brand); font-size: 1.7rem; }
.verify h1 { margin: 0 0 12px; font-size: clamp(1.8rem, 6vw, 2.3rem); }
.verify b { overflow-wrap: anywhere; }
.verify-actions { justify-content: center; margin: 20px 0 12px; }
.verify-other { margin: 14px 0 0; }

/* AI-chatten */
.chat-fab {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); z-index: 44;
  display: inline-flex; align-items: center; gap: 9px; height: 54px; padding: 0 20px 0 16px; border: 2px solid #fff; border-radius: 999px;
  background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: 1rem; white-space: nowrap;
  box-shadow: 0 12px 28px -8px rgba(75, 95, 207, .6); cursor: pointer; transition: background .15s, transform .15s;
}
.chat-fab svg { width: 24px; height: 24px; flex: none; }
.chat-fab:hover { background: var(--brand-dark); transform: translateY(-1px); }
.chat-fab:focus-visible, .chat-panel button:focus-visible, .chat-panel a:focus-visible, .chat-log:focus-visible { outline: 3px solid var(--brand-light); outline-offset: 2px; }
.chat-fab[hidden], body.chat-open .chat-fab, body.focus-mode .chat-fab { display: none; }
.chat-panel {
  position: fixed; right: 16px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); z-index: 60;
  display: flex; flex-direction: column; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - var(--tabbar-h) - 90px));
  overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); box-shadow: var(--shadow-lift);
}
.chat-panel[hidden], body.focus-mode .chat-panel { display: none; }
.chat-panel:focus { outline: none; }
.chat-head { display: flex; align-items: center; gap: 8px; flex: none; padding: 12px 10px 12px 16px; background: var(--header-bg); color: rgb(var(--on-panel)); }
.chat-head-text { flex: 1; min-width: 0; }
.chat-head h2 { margin: 0; color: rgb(var(--on-panel)); font-size: 1.4rem; line-height: 1.15; }
.chat-head p { margin: 0; color: rgba(var(--on-panel), .82); font-size: .78rem; }
.chat-clear, .chat-close { border: 0; background: transparent; color: rgb(var(--on-panel)); cursor: pointer; border-radius: var(--radius-s); }
.chat-clear { min-height: 40px; padding: 0 8px; color: rgba(var(--on-panel), .85); font-size: .82rem; text-decoration: underline; text-underline-offset: 3px; }
.chat-clear[hidden] { display: none; }
.chat-close { flex: none; width: 40px; height: 40px; font-size: 1rem; }
.chat-clear:hover, .chat-close:hover { background: var(--panel-tint); }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; font-size: .95rem; line-height: 1.5; }
.chat-thread, .chat-tail { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chat-thread:not(:empty) + .chat-tail:not(:empty) { margin-top: 10px; }
.chat-msg { display: flex; min-width: 0; }
.chat-msg.is-user { justify-content: flex-end; }
.chat-bubble { max-width: 88%; min-width: 0; padding: 9px 13px; border-radius: 14px; overflow-wrap: anywhere; }
.is-bot .chat-bubble { background: var(--surface-2); color: var(--text); border-bottom-left-radius: 4px; }
.is-user .chat-bubble { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.chat-bubble p { margin: 0 0 .6em; }
.chat-bubble ul { margin: 0 0 .6em; padding-left: 1.15em; }
.chat-bubble li + li { margin-top: .2em; }
.chat-bubble > :last-child { margin-bottom: 0; }
.chat-cut, .chat-left { color: var(--muted); font-size: .8rem; }
.chat-cut { margin: .5em 0 0 !important; }
.chat-left { margin: 0; text-align: center; }
.chat-hello { margin: 0 0 4px; color: var(--title); font-family: var(--font-display); font-size: 1.6rem; line-height: 1.15; }
.chat-welcome > p:not(.chat-hello) { margin: 0 0 14px; }
.chat-quick { display: grid; gap: 8px; }
.chat-quick button { min-height: 44px; padding: 8px 13px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--title); font-size: .92rem; font-weight: 500; text-align: left; cursor: pointer; }
.chat-quick button:hover { border-color: var(--brand); background: var(--pink-100); }
.chat-typing { display: inline-flex; align-items: center; gap: 5px; min-height: 40px; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: chat-dot 1.1s infinite ease-in-out; }
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 60%, 100% { transform: none; opacity: .55; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-error { padding: 10px 13px; border-radius: var(--radius); background: var(--bad-soft); color: var(--bad); font-size: .9rem; }
.chat-error p { margin: 0; }
.chat-retry { min-height: 40px; margin-top: 8px; padding: 0 14px; border: 1px solid currentColor; border-radius: var(--radius-s); background: var(--surface); color: var(--bad); font-weight: 600; cursor: pointer; }
.chat-foot { flex: none; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.chat-form { display: flex; align-items: flex-end; gap: 8px; }
.chat-form textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 120px; padding: 10px 12px; resize: none; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--title); font: inherit; font-size: 16px; line-height: 1.35;
}
.chat-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.chat-send { display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: var(--brand); color: #fff; cursor: pointer; }
.chat-send svg { width: 22px; height: 22px; }
.chat-send:disabled { background: var(--btn-muted); color: var(--muted); cursor: default; }
.chat-count { margin: 4px 0 0; color: var(--muted); font-size: .75rem; text-align: right; }
.chat-count[hidden] { display: none; }
.chat-note { margin: 7px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.35; text-align: center; }
@media (min-width: 900px) {
  .chat-fab, .chat-panel { right: 24px; bottom: 24px; }
  .chat-panel { height: min(640px, calc(100dvh - 100px)); }
}
@media (max-width: 640px) {
  .chat-panel { inset: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .chat-head { padding-top: calc(12px + env(safe-area-inset-top)); }
  html.chat-lock, html.chat-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .chat-fab { transition: none; }
  .chat-typing span { animation: none; }
}

/* Telefon och surfplatta: större tryckytor och en chattknapp som inte är i vägen */
.tabbar a { font-size: .75rem; }
@media (max-width: 1180px), (hover: none) {
  .footer-cols > div { gap: 0; }
  .footer-cols h2 { margin-bottom: 4px; }
  .footer-cols a, .footer-legal a { display: inline-flex; align-items: center; min-height: 42px; }
  .link-arrow, .back-link { display: inline-flex; align-items: center; min-height: 42px; }
  .btn-text { min-width: 44px; justify-content: center; }
  .alloc-code { display: inline-flex; align-items: center; min-height: 40px; }
  .pb-what > a, .member-chip a { display: inline-flex; align-items: center; min-height: 42px; }
  .save-btn { min-height: 42px; min-width: 42px; }
  main summary, .account-section summary { min-height: 42px; align-items: center; }
  .account-section summary { display: flex; }
  input[type="range"] { height: 42px; }
  .pw-chip { min-height: 42px; }
}
@media (max-width: 640px) {
  .chat-fab { height: 46px; gap: 7px; padding: 0 15px 0 12px; font-size: .92rem; }
  .chat-fab svg { width: 20px; height: 20px; }
  .chat-fab.hide-on-phone { display: none; }
  body:has(input:not([type="range"]):focus, textarea:focus, select:focus) .chat-fab { display: none; }
}

/* Antagningspoäng */
.ap-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.ap-form .field:last-child { margin-bottom: 0; }
.ap-form select.input { appearance: auto; }
.ap-side:empty { display: none; }
.ap-answer { padding: 24px; border-radius: var(--radius); background: var(--title); color: rgba(var(--on-panel), .86); }
.ap-kicker { color: rgb(var(--on-panel)); font-weight: 600; }
.ap-big { margin: 6px 0 8px; color: rgb(var(--on-panel)); font-family: var(--font-display); font-size: clamp(2.7rem, 9vw, 4rem); line-height: 1.05; }
.ap-answer p { margin: 0; }
.ap-answer .ap-mine { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--panel-line); }
.ap-answer b { color: rgb(var(--on-panel)); }
.ap-h { margin: 26px 0 12px; font-size: 1.3rem; }
.ap-list { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.ap-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); }
.ap-row-main { display: grid; gap: 2px; min-width: 0; }
.ap-row-main b { color: var(--title); }
.ap-row-main span { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.ap-row-main small { color: var(--muted); font-size: .8rem; }
.ap-row-score { flex: none; color: var(--title); font-family: var(--font-display); font-size: 1.55rem; }
.ap-row-score.is-text { max-width: 76px; color: var(--muted); font-family: inherit; font-size: .82rem; font-weight: 600; line-height: 1.2; text-align: right; }
.ap-cta { margin-top: 18px; }
.ap-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); }
.ap-table { width: 100%; border-collapse: collapse; }
.ap-table th, .ap-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.ap-table tr:last-child th, .ap-table tr:last-child td { border-bottom: 0; }
.ap-table tbody th { font-weight: 500; }
.ap-table td { font-weight: 600; white-space: nowrap; }
.ap-notes { margin-top: 34px; }
.calc-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 20px; }
.calc-link p { margin: 0; }
@media (min-width: 860px) {
  .ap-layout { grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 28px; }
  .ap-form { position: sticky; top: 92px; }
}

/* Antagningspoäng på startsidan */
.ap-home { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: center; }
.ap-home-text h2 { margin: 10px 0 12px; }
.ap-home-text p { max-width: 46ch; margin: 0 0 20px; }
.ap-home-list { display: grid; padding: 8px 20px 14px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: 0 16px 34px -26px rgba(75, 95, 207, .5); }
.ap-home-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; color: var(--muted); font-size: .84rem; font-weight: 600; }
.ap-home-list a { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; border-top: 1px solid var(--border); color: var(--title); font-weight: 500; text-decoration: none; }
.ap-home-list a:hover span { color: var(--brand); }
.ap-home-list a b { flex: none; font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; }
.ap-home-list small { padding-top: 10px; border-top: 1px solid var(--border); color: var(--muted); font-size: .8rem; }
@media (min-width: 860px) { .ap-home { grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 48px; } }
.ap-related { margin: 14px 0 0; color: var(--muted); }
.custom-short { flex-basis: 100%; margin: 0 0 6px; padding: 10px 12px; border-radius: var(--radius-s); background: var(--bg-pink); font-size: .92rem; }
fieldset[disabled] .seg, fieldset[disabled] .chip-group { opacity: .55; }
.rep-list { margin-top: 8px; font-size: .92rem; }
.rep-list summary { cursor: pointer; color: var(--link); font-weight: 500; }
.rep-list ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.rep-list li { display: flex; gap: 8px; align-items: baseline; }
.res-plus { display: grid; gap: 8px; }
.res-plus-list { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.res-sub-h { font-size: 1rem; font-family: var(--font-body); font-weight: 600; margin: 8px 0 4px; }
.paused-note { color: var(--brand); }
.rv-foot-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* Admin: kvalitet */
.qa-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.qa-kpis > div { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); }
.qa-kpis b { font-size: 1.4rem; color: var(--title); font-variant-numeric: tabular-nums; }
.qa-kpis span { font-size: .82rem; color: var(--muted); }
.qa-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.qa-bar small { flex-basis: 100%; }
.qa-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-filters { flex-wrap: wrap; }
.qa-filters .input { width: auto; min-height: 42px; padding: 8px 10px; }
.qa-table tr[data-id] { cursor: pointer; }
.qa-prompt { display: block; color: var(--muted); max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dialog.qa-dialog { max-width: min(860px, calc(100vw - 24px)); }
.qa-dialog .dialog-body { max-height: calc(100dvh - 40px); overflow: auto; }
.qa-dialog h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 18px 0 6px; }
.qa-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.qa-head h2 { font-size: 1.4rem; }
.qa-x { background: var(--surface-2) !important; color: var(--title) !important; }
.qa-q { padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); }
.qa-prompt-full { font-weight: 500; color: var(--title); margin-bottom: 8px; }
.qa-issues { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: .92rem; }
.qa-ai { padding: 12px 14px; border-radius: var(--radius-s); border: 1px dashed var(--border-strong); }
.qa-edit { display: grid; gap: 8px; }
.qa-edit label { display: grid; gap: 4px; }
.qa-subs { display: flex; flex-wrap: wrap; gap: 4px 14px; border: 1px solid var(--border); border-radius: var(--radius-s); padding: 8px 12px; }
.qa-subs label { display: flex; gap: 6px; align-items: center; font-size: .9rem; }
.qa-versions { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .88rem; }
.qa-versions li { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.qa-passage { margin-bottom: 10px; }
.bad-text { color: var(--bad); }
/* Morfem och lästips */
.morph-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin: 14px 0; }
.morph-card { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-s); background: var(--surface); }
.morph-card b { font-size: 1.1rem; color: var(--title); }
.morph-card small { color: var(--muted); }
.morph-all summary { cursor: pointer; color: var(--link); font-weight: 500; }
.morph-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .93rem; }
.morph-table th, .morph-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.morph-table td small { display: block; color: var(--muted); }
.morph h3, .reading-tips h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 600; margin: 16px 0 8px; }
.reading-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.reading-list li { display: grid; gap: 2px; }
.reading-list span { color: var(--muted); font-size: .92rem; }
.dp-extra { margin: 10px 0 0; }

/* Lucka i MEK: ett sammanhängande streck, inte separata understreck. */
.blank { display: inline-block; width: 4.5em; height: 1em; border-bottom: 2px solid currentColor; vertical-align: baseline; margin: 0 .15em; opacity: .75; }
.chip .chip-n { font-size: .8em; opacity: .6; margin-left: 2px; font-variant-numeric: tabular-nums; }
.chip.empty { opacity: .45; }
.chip.empty span { cursor: not-allowed; }

/* Textstöd för svaret i LÄS och ELF (visas först efter svar). */
mark.evidence { background: color-mix(in srgb, #F5C542 38%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.evidence-jump { margin-top: 8px; }

/* Min studieplan */
.myplan-today { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 24px; }
.myplan-today .stat-value { font-size: 1.7rem; }
.myplan-body { max-width: none; }

/* =====================================================================
   Ljust och avskalat: pastellytor, färre ramar och skuggor
   ===================================================================== */
.topbar { border-bottom: 1px solid var(--border); }
.main-nav a:hover { background: var(--surface-2); }
.main-nav a.active { background: var(--verbal-soft); color: var(--brand-dark); }
.logo-text { color: var(--title); }
.logo-text b { margin-right: .07em; color: var(--brand); } /* tydlig gräns mellan HP och raketen, men fortfarande ett ord */
.plus-btn { color: var(--title); border-color: var(--border-strong); }
.plus-btn:hover, .plus-btn.active, .plus-btn.is-active { background: var(--butter); color: var(--title); }
body.is-member .account-btn { color: var(--title); }
body.is-member .account-btn:hover, body.is-member .account-btn.active { background: var(--surface-2); }
.account-btn.is-loading { background: var(--surface-2); }
.streak-pill, .icon-btn { background: var(--surface-2); }
.footer { border-top: 0; }

/* Kort: en ren yta utan tjock färgkant */
.card, .dp-card, .question-card, .passage, .result-hero, .review-item, .steps li, .ap-home-list { box-shadow: none; }
.card-accent, .question-card, .result-hero, .try-card { border-top-width: 1px; border-top-color: var(--border); }
.try-card { border: 0; border-radius: var(--radius-l); }
.dp-card, .dp-tile, .pass-card { border-top-width: 4px; border-top-color: var(--verbal-edge); }
.band .dp-card { border-top-color: var(--verbal-edge); }
.dp-card.kvant, .band .dp-card.kvant, .dp-tile.kvant, .pass-card.kvant { border-top-color: var(--kvant-edge); }
.price-card.featured { border: 1px solid var(--verbal-edge); background: var(--bg-pink); box-shadow: none; }
.tag-ai, .sample-badge, .plus-badge, .ad-badge.info, .pp-card .plus-badge { background: var(--butter); color: #6B4A00; }
.avatar, .ad-av, .voice-avatar, .feat-ico, .paywall-ico { color: var(--brand-dark); }
.dp-steps li::before { color: var(--brand-dark); }
.jump-pill { background: var(--brand); color: #fff; }
.btn { border-radius: 999px; }
.btn-glass, .ova-next-alt { background: #fff; color: var(--title); box-shadow: inset 0 0 0 1px var(--panel-line); }
.btn-glass:hover, .ova-next-alt:hover { background: var(--surface-2); }
.countdown-card, .cta-band { background: var(--panel-grad); }
.quick-card.mix { background: var(--panel-grad); border-color: transparent; }
.quick-card.mix, .quick-card.mix .quick-desc { color: var(--text); }
.quick-card.mix .quick-title, .quick-card.mix .quick-meta { color: var(--title); }
.quick-card.mix .quick-ico { background: #fff; color: var(--brand); }
.ap-answer { background: var(--panel-grad); color: rgb(var(--on-panel)); }
.tl-dot.lunch, .tl-item.lunch::before, .tl-item.lunch .tl-bar { background: var(--kvant-edge); border-color: var(--kvant-edge); }
.plan-week.tempo, .pw-chip.tempo { border-color: var(--border); }
.plan-week.tempo { border-left-color: var(--kvant-edge); }
.pw-chip.tempo { border-bottom-color: var(--kvant-edge); }
.member-chip.is-warn { background: var(--bad-soft); }
.hero-nudge { color: var(--brand-dark); }
.hero-note { margin: 16px 0 0; color: rgba(var(--on-panel), .82); font-size: .95rem; }

/* Startsidans tre steg: bara text och en pastellfärgad siffra */
.how-steps li { border: 0; padding: 24px; background: var(--sky); }
.how-steps li:nth-child(2) { background: var(--mint); }
.how-steps li:nth-child(3) { background: var(--peach); }
.how-steps .step-n, .how-steps li .step-n { background: #fff; color: var(--title); font-size: 1.2rem; }
@media (min-width: 1000px) {
  .how-steps li { display: grid; grid-template-columns: 1fr; padding: 28px; }
  .how-steps li > :not(.step-n) { grid-column: auto; }
  .how-steps .step-n { grid-row: auto; }
}

/* Meny med övriga sidor */
.menu-btn { display: none; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--surface-2); color: var(--title); font-weight: 600; font-size: .95rem; cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--verbal-soft); color: var(--brand-dark); }
@media (min-width: 900px) { .menu-btn { display: inline-flex; } }
.tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font: inherit; font-size: .75rem; font-weight: 500; cursor: pointer; }
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.active, .tabbar button[aria-expanded="true"] { color: var(--title); font-weight: 600; }
.tabbar button.active svg, .tabbar button[aria-expanded="true"] svg { color: var(--brand); }
.site-menu {
  position: fixed; z-index: 50; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
  display: grid; gap: 2px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-l);
  background: var(--surface); box-shadow: 0 20px 50px -16px rgba(75, 95, 207, .35); animation: menu-in .16s ease-out;
  max-height: calc(100dvh - var(--tabbar-h) - 100px); overflow: auto;
}
.site-menu[hidden] { display: none; }
.site-menu a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--radius); color: var(--title); font-weight: 500; text-decoration: none; }
.site-menu a:hover, .site-menu a[aria-current] { background: var(--verbal-soft); }
.site-menu i { font-style: normal; width: 24px; text-align: center; }
@media (min-width: 900px) {
  .site-menu { left: auto; right: max(var(--gutter), calc(50vw - var(--maxw) / 2 + var(--gutter))); bottom: auto; top: 86px; width: 270px; max-height: calc(100dvh - 110px); }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(6px); } }

/* =====================================================================
   Raketen
   ===================================================================== */
.rocket { overflow: visible; }
.rocket-flame { transform-origin: 32px 60px; animation: flame .5s ease-in-out infinite alternate; }
@keyframes flame { from { transform: scaleY(.75); } to { transform: scaleY(1.08); } }
.pal { display: flex; align-items: center; gap: 14px; margin: 0 0 14px 12px; }
.pal-rocket { flex: none; width: 58px; animation: float 3.4s ease-in-out infinite; }
.pal-rocket .rocket { width: 58px; height: auto; transform: rotate(12deg); }
@keyframes float { 50% { transform: translateY(-8px); } }
.pal-bubble { position: relative; padding: 9px 16px; border-radius: 18px; background: #fff; color: var(--title); font-weight: 600; font-size: .95rem; }
.pal-bubble::before { content: ''; position: absolute; left: -5px; top: 50%; width: 12px; height: 12px; background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 3px; }
.pal.is-cheer .pal-rocket { animation: cheer .9s ease-in-out 2; }
.pal.is-oops .pal-rocket { animation: wobble .5s ease-in-out 2; }
@keyframes cheer { 40% { transform: translateY(-26px) rotate(-8deg); } 70% { transform: translateY(-8px) rotate(6deg); } }
@keyframes wobble { 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
.cta-rocket { width: 64px; height: auto; transform: rotate(14deg); }
@media (min-width: 700px) { .cta-band { grid-template-columns: auto 1fr auto; gap: 32px; } .cta-rocket { width: 84px; } }
.lost-rocket { width: 92px; height: auto; margin-bottom: 24px; transform: rotate(142deg); }

/* Raketbanan i övningspass */
.rocket-track { position: relative; height: 10px; margin: 16px 34px 10px 14px; border-radius: 999px; background: var(--surface-3); }
.rocket-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8FD6C0, #AEBBF6); transition: width .7s cubic-bezier(.3, 1.2, .5, 1); }
.rocket-ship { position: absolute; top: 50%; width: 30px; margin: -20px 0 0 -12px; transition: left .7s cubic-bezier(.3, 1.2, .5, 1); }
.rocket-ship .rocket { width: 30px; height: 40px; transform: rotate(90deg); }
.rocket-goal { position: absolute; right: -32px; top: 50%; transform: translateY(-50%); font-size: 1.2rem; line-height: 1; }
.result-rocket { width: 74px; height: auto; margin: 0 auto 10px; animation: float 3.4s ease-in-out infinite; }
.result-stats .pill.altitude { background: var(--butter); color: #6B4A00; }

/* Enklare förklaring efter fel svar */
.easy { margin-top: 14px; display: grid; gap: 10px; }
.easy-out:empty { display: none; }
.easy-text { padding: 14px 16px; border-radius: var(--radius); background: var(--butter); color: var(--title); }
.easy-text.easy-five { background: var(--sky); }
.easy-actions [hidden] { display: none; }
.easy-actions:not(:has(> :not([hidden]))) { display: none; }
.easy-text p { margin: 6px 0 8px; white-space: pre-line; overflow-wrap: anywhere; }
.easy-text small { color: var(--text); }
.easy-wait { margin: 0; color: var(--text); }
.easy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.easy-actions .btn { min-height: 44px; padding: 10px 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--border-strong); }

/* Min studieplan: senaste provet */
.exam-card-plan { display: grid; gap: 16px; align-items: center; margin-bottom: 20px; padding: 24px; border-radius: var(--radius-l); background: var(--mint); }
.exam-card-plan h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.exam-card-plan p { margin: 0; max-width: 56ch; }
.ep-facts { display: flex; align-items: end; gap: 16px; margin: 0 0 10px; color: var(--title); }
.ep-facts span { display: grid; }
.ep-facts b { font-family: var(--font-display); font-size: 2rem; font-weight: 500; line-height: 1.1; }
.ep-facts i { font-style: normal; font-size: 1.5rem; line-height: 1.5; }
@media (min-width: 700px) { .exam-card-plan { grid-template-columns: 1fr auto; padding: 28px; } }

/* Startsidan: drömmen */
.dream-band { display: grid; gap: 24px; align-items: center; margin-top: 40px; padding: 32px 24px; border-radius: var(--radius-l); background: linear-gradient(120deg, var(--rose), var(--butter)); }
.dream-band h2 { text-wrap: balance; }
.dream-band p { max-width: 50ch; margin-bottom: 20px; font-size: 1.1rem; }
.dream-band .dream-note { margin: 14px 0 0; font-size: .88rem; }
.dream-path { position: relative; width: 100%; max-width: 400px; aspect-ratio: 400 / 250; margin: 0 auto; color: var(--verbal-edge); }
.dream-line { width: 100%; height: 100%; overflow: visible; }
.dp-label { position: absolute; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--title); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.dp-1 { left: 11%; bottom: 0; } .dp-2 { left: 53%; top: 52%; } .dp-3 { right: 20%; top: 3%; }
.dream-rocket { position: absolute; right: 1%; top: -8%; animation: float 3.4s ease-in-out infinite; }
.dream-rocket .rocket { width: 62px; height: auto; transform: rotate(32deg); }
@media (min-width: 860px) { .dream-band { grid-template-columns: 1.1fr .9fr; gap: 48px; padding: 56px; } }

/* Läsbarhet */
.plus-price { background: #fff; color: var(--title); }
.dp-go, .cmp-no, .kbd-hint, .kbd-hint kbd { color: var(--muted); }

/* Val om besöksstatistik (cookies) */
.consent { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px); display: grid; gap: 14px; max-width: 760px; margin: 0 auto; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); box-shadow: 0 20px 50px -16px rgba(75, 95, 207, .35); }
.consent h2 { margin: 0 0 4px; font-size: 1.3rem; outline: none; }
.consent p { margin: 0; font-size: .95rem; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent-actions .btn { padding: 10px 16px; min-height: 46px; white-space: nowrap; }
@media (max-width: 380px) { .consent-actions { grid-template-columns: 1fr; } }
@media (min-width: 900px) { .consent { bottom: 20px; grid-template-columns: 1fr auto; align-items: center; } }
body.focus-mode .consent { display: none; } /* stör aldrig ett pågående pass eller prov */
body.consent-open .chat-fab { display: none; }
.footer-priv { display: flex; gap: 20px; margin: 28px 0 0; }
.footer-priv button { padding: 0; border: 0; background: none; color: var(--panel-accent); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* Startsidan: tid till nästa prov */
.exam-count { margin-top: 24px; padding: 22px 24px; border-radius: var(--radius-l); background: var(--butter); color: var(--title); }
.exam-count h2 { margin: 0 0 8px; font-family: var(--font-body); font-size: 1.05rem; font-weight: 400; letter-spacing: 0; line-height: 1.3; font-variation-settings: normal; }
.exam-count p { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 28px; margin: 0; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.ec-time { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ec-time b { font-weight: 700; white-space: nowrap; }
.exam-count time { white-space: nowrap; }
@media (min-width: 700px) { .exam-count { padding: 28px 56px; } .exam-count p { font-size: 1.4rem; } }
@media (max-width: 420px) { .exam-count { padding: 18px 20px; } .exam-count p { font-size: 1.08rem; } .ec-time { gap: 4px 12px; } }
.hero-note b { color: var(--title); }
