/* Elevområdet: oversigt, emner (motoren) og profil. Bygger på temaets tokens i site.css. */

.learn { max-width: 760px; margin: 0 auto; padding: 24px 16px 64px; }
.learn h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.08; }
.learn .loading { color: var(--muted); padding-top: 12px; }

/* ---------- Oversigten (/learn/) ---------- */
.hub-greeting { display: flex; flex-direction: column; gap: 4px; padding: 6px 4px 20px; }
.hub-greeting p { color: var(--muted); }
.personal-card { background: var(--accent-soft); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.personal-kicker { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--accent-strong); }
.personal-title { font-family: var(--font-display); font-size: 23px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.personal-sub { font-size: 15px; color: var(--text-2); }
.personal-card .btn { margin-top: 10px; min-height: 48px; }
.hub-h { font-size: 19px; letter-spacing: -0.01em; padding: 22px 4px 10px; }
.hub-empty { color: var(--muted); padding: 0 4px; }
.topic-list { display: flex; flex-direction: column; gap: 10px; }
.topic-card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); background: var(--bg); transition: border-color .15s ease; }
.topic-card:hover { border-color: var(--accent); color: var(--ink); }
.topic-card .icon-tile { width: 44px; height: 44px; border-radius: 12px; }
.topic-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.topic-title { font-size: 16.5px; font-weight: 700; }
.topic-sub { font-size: 13.5px; color: var(--muted); }
.topic-progress { display: flex; align-items: center; gap: 10px; margin-top: 7px; }
.topic-progress .bar { flex: 1; height: 5px; border-radius: 3px; background: var(--track); overflow: hidden; }
.topic-progress .bar span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.topic-progress .count { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.topic-card.is-done .count { color: var(--accent-strong); font-weight: 700; }
.profile-card { margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius-card); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.profile-card-title { font-family: var(--font-display); font-size: 19px; font-weight: 800; line-height: 1.2; }
.profile-card p { font-size: 14.5px; color: var(--muted); }
.profile-card .topic-progress { margin-top: 0; }
.profile-card .btn { min-height: 48px; border-color: var(--ink); }
.hub-footer { display: flex; justify-content: center; padding-top: 22px; }
.hub-footer a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; }

/* ---------- Instruktioner: engelsk som standard, dansk når eleven vælger det ---------- */
.i-da { display: none; }
.instr-da .i-da { display: inline; }
.instr-da .i-en { display: none; }
.hero-switch { margin: 0; }

/* ---------- Emnesiden ---------- */
.dwl-topic .hero { display: flex; flex-direction: column; gap: 8px; padding: 12px 4px 18px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--muted); }
.title-en { font-size: 16px; color: var(--muted); margin-top: -4px; }
.dwl-topic .lede { font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: none; margin-top: 6px; }
.dwl-topic .personal { font-size: 14.5px; color: var(--text-2); }
.dwl-topic .personal a, .hint a, .fb a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hint { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; font-size: 14.5px; color: var(--ink); }
.legend { font-size: 13.5px; color: var(--muted); }
.voicebar { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.voicedot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); flex: none; }
.voicedot.ok { background: var(--ok); }

.tabswrap { position: sticky; top: 60px; z-index: 20; background: var(--bg); display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px -16px 0; padding: 0 12px; }
.admin-bar .tabswrap { top: 92px; }
nav.tabs { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; scroll-behavior: smooth; padding: 0 4px; }
nav.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 48px; background: none; border: 0; border-bottom: 2.5px solid transparent; margin-bottom: -1px; padding: 0 2px; font: 600 15px/1 var(--font-body); color: var(--muted); cursor: pointer; }
.tab[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
.tab:hover { color: var(--ink); }
.tabarrow { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tabarrow[disabled] { opacity: .3; cursor: default; }
.tabarrow[hidden] { display: none; }

.pane { padding-top: 20px; }
.pane > h2 { font-size: 24px; margin: 0 4px 6px; }
.pane h3 { font-size: 18px; margin: 24px 4px 10px; }
.pane .sub { color: var(--text-2); font-size: 15.5px; margin: 0 4px 16px; text-wrap: pretty; }
.note { background: var(--bg-soft); border-radius: 14px; padding: 14px 16px; font-size: 15px; color: var(--text-2); margin-top: 20px; }
.note b { color: var(--ink); }
.counter { font-size: 13px; font-weight: 600; color: var(--muted); }

.toolrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; }
.btn.playall { gap: 8px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: var(--radius-btn); overflow: hidden; }
.seg button { border: 0; background: var(--bg); color: var(--muted); min-height: 41px; padding: 0 12px; font: 600 14px/1 var(--font-body); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.switchrow { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0 0 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; background: none; border: 0; padding: 0; font: 600 14px/1 var(--font-body); color: var(--ink); cursor: pointer; }
.switch .track { width: 36px; height: 22px; border-radius: 11px; background: var(--line); padding: 3px; display: flex; transition: background-color .15s ease; }
.switch .knob { width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch[aria-checked="true"] .track { background: var(--accent); }
.switch[aria-checked="true"] .knob { transform: translateX(14px); }

/* Samtalen */
.chat { display: flex; flex-direction: column; gap: 14px; }
.line { display: flex; flex-direction: column; gap: 4px; max-width: 88%; }
.line.other { align-self: flex-start; }
.line.me { align-self: flex-end; }
.line.mono { align-self: stretch; max-width: 100%; flex-direction: row; align-items: flex-start; gap: 10px; }
.speaker { font-size: 12px; font-weight: 600; color: var(--muted); padding-left: 4px; }
.lnum { width: 26px; flex: none; padding-top: 12px; text-align: right; font-size: 13px; font-weight: 700; color: var(--muted); }
.bubble { display: flex; gap: 10px; align-items: flex-start; padding: 12px 10px 12px 16px; border-radius: 18px 18px 18px 6px; background: var(--bubble); }
.line.me .bubble { background: var(--accent-soft); border-radius: 18px 18px 6px 18px; }
.line.mono .bubble { flex: 1; border-radius: 16px; background: var(--bubble); }
.btext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.btext .da, .flash .front, .simline, .s-da { hyphens: manual; overflow-wrap: break-word; }
.dwl-topic h1 { hyphens: auto; overflow-wrap: break-word; }
.bubble .da { font-size: 17px; font-weight: 600; line-height: 1.38; }
.bubble .en { font-size: 14.5px; color: var(--muted); }
.pron { display: block; font-size: 13px; font-weight: 600; color: var(--accent-strong); }
.pron.matched { display: none !important; }
.show-pron .pron.matched { display: block !important; }
.playbtn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; background: var(--bg); color: var(--accent-strong); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.playbtn:hover { background: var(--accent); color: #fff; }
.hiddenline .bubble .da, .hiddenline .bubble .en, .hiddenline .bubble .pron { filter: blur(7px); cursor: pointer; user-select: none; }
.hide-en .chat .bubble .en, .hide-en .simen, .hide-en .suggest .s-en, .hide-en .dlg-fill .txt .en:not(:only-of-type) { display: none; }

/* Ord med udtale og bøjning */
.pw { border-bottom: 2px dotted var(--accent); cursor: help; }
.pw:hover, .pw:focus-visible { background: var(--accent-soft); outline: none; }
.cw { border-bottom: 2px dotted var(--ok); cursor: help; }
.nw { border-bottom: 2px dotted var(--muted); cursor: help; }
.cw:hover, .cw:focus-visible, .nw:hover, .nw:focus-visible { background: var(--bg-soft); outline: none; }
.tt { position: absolute; z-index: 60; max-width: 290px; background: var(--ink); color: var(--bg); padding: 10px 13px; border-radius: 12px; font-size: 14px; line-height: 1.4; box-shadow: 0 8px 24px rgba(35, 24, 19, .25); pointer-events: none; }
.tt-head { font-family: var(--font-display); font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.tt-row { display: flex; justify-content: space-between; gap: 14px; padding: 2px 0; opacity: .75; }
.tt-row.cur { opacity: 1; }
.tt-row span { font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.tt-row b { color: #ffc4ad; }
.tt-note { border-top: 1px solid rgba(255, 255, 255, .25); margin-top: 6px; padding-top: 6px; font-size: 13.5px; }
.tt-note b { color: #ffc4ad; }

/* Kort, simulator, flashcards */
.card { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 18px; background: var(--bg); }
.simcard { display: flex; flex-direction: column; gap: 6px; }
.simtag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); margin-bottom: 6px; }
.simline { font-family: var(--font-display); font-weight: 700; font-size: clamp(20px, 4.4vw, 24px); line-height: 1.3; letter-spacing: -0.01em; }
.simen { color: var(--muted); }
.suggest { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.s-da { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; }
.s-da .playbtn { background: var(--bg-soft); }
.s-en { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.flash { border: 1px solid var(--line); border-radius: 16px; padding: 16px; min-height: 120px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; cursor: pointer; background: var(--bg); }
.flash:hover { border-color: var(--accent); }
.flash .tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--accent-strong); }
.flash .front { font-weight: 700; font-size: 17px; }
.flash .back { color: var(--muted); font-size: 14.5px; }
.flash[data-flipped="false"] .back { visibility: hidden; }
.flash .playbtn { background: var(--bg-soft); }

/* Ordforråd */
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 28px; }
.vwrap { overflow-x: auto; }
.vtable { width: 100%; border-collapse: collapse; }
.vtable td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.vtable td:first-child { font-weight: 600; }
.vtable td:nth-child(2) { color: var(--muted); font-size: 15px; }
.vtable td:last-child { width: 48px; text-align: right; }
.vtable .pron { font-size: 12px; }
.vtable .playbtn { width: 40px; height: 40px; background: var(--bg-soft); }

/* Priser og telefonnumre */
.bignum { font-family: var(--font-display); font-weight: 800; font-size: 56px; text-align: center; margin: 8px 0; font-variant-numeric: tabular-nums; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.choices .btn { min-height: 52px; font-size: 16px; }
.btn.right { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.btn.wrong { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.score { text-align: center; margin-top: 12px; color: var(--muted); }
.writebox { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.writebox .exin { flex: 1; min-width: 200px; max-width: none; }

/* Opgaver */
.exnav { position: sticky; top: 109px; z-index: 15; background: var(--bg); display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-bar .exnav { top: 141px; }
.expill { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: 700 14px/1 var(--font-body); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.expill.done { background: var(--accent-soft); border-color: var(--accent-soft); color: var(--accent-strong); }
.expill.current { background: var(--accent); border-color: var(--accent); color: #fff; }
.ex h3 { margin-top: 0; }
.gapline { margin: 12px 0; line-height: 2.2; }
select.gap, input.exin, textarea.exta { font: inherit; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 10px; }
select.gap { padding: 6px 8px; min-height: 42px; max-width: 100%; }
input.exin { padding: 9px 12px; min-height: 46px; width: 100%; max-width: 360px; }
input.exin.short { display: inline-block; width: 150px; margin: 0 6px; }
textarea.exta { width: 100%; min-height: 140px; padding: 12px; line-height: 1.5; }
select.gap:focus, input.exin:focus, textarea.exta:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 1px var(--accent); }
select.gap.ok, input.exin.ok { border-color: var(--ok); background: var(--ok-soft); }
select.gap.bad, input.exin.bad { border-color: var(--bad); background: var(--bad-soft); }
.ans { font-size: 14px; font-weight: 700; color: var(--ok); margin-right: 6px; }
.gapline .playbtn { width: 38px; height: 38px; vertical-align: middle; margin-right: 6px; background: var(--accent-soft); }
.exscore { font-size: 14px; font-weight: 600; color: var(--muted); }
.exrow { margin: 12px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.exrow .prompt { margin: 0 0 10px; }
.dict-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.dict-top .playbtn { background: var(--accent-soft); }
.facit { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ok); font-weight: 600; margin-top: 10px; }
.facit .playbtn { background: var(--ok-soft); color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.chip { min-height: 42px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 14px; font: 600 15px/1 var(--font-body); cursor: pointer; }
.chip:disabled { opacity: .3; cursor: default; }
.chipline { min-height: 54px; border: 1.5px dashed var(--line); border-radius: 12px; padding: 6px 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.chipline.ok { border-color: var(--ok); background: var(--ok-soft); }
.chipline.bad { border-color: var(--bad); background: var(--bad-soft); }
.fb { border-radius: 12px; padding: 10px 14px; margin-top: 10px; font-size: 15px; }
.fb.ok { background: var(--ok-soft); color: var(--ok); }
.fb.warn { background: var(--bad-soft); color: var(--bad); }
.fb .playbtn { width: 36px; height: 36px; vertical-align: middle; margin-left: 8px; background: var(--bg); }
.dlg-fill .exrow { display: flex; gap: 10px; align-items: flex-start; }
.dlg-fill .who { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--bubble); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.dlg-fill .who.me { background: var(--accent); color: #fff; }
.dlg-fill .txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dlg-fill .da { font-weight: 600; }
.dlg-fill .en { color: var(--muted); font-size: 14.5px; }
.dlg-fill .exin { max-width: none; }
.dlg-fill .btn { align-self: flex-start; }
.savenote { font-size: 13px; color: var(--muted); margin-top: 8px; }
.exfooter { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 20px 0 8px; }
.exprogress { font-size: 13px; font-weight: 600; color: var(--muted); }

.savestatus { position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; transition: opacity .2s ease, transform .2s ease; z-index: 80; }
.savestatus.show { opacity: 1; transform: translate(-50%, 0); }
.savestatus.bad { background: var(--bad); }

/* ---------- Login (/login/) ---------- */
.login-page { max-width: 460px; padding-top: 48px; }
.login-card { border: 1px solid var(--line); border-radius: var(--radius-card); padding: 28px 24px; background: var(--bg); display: flex; flex-direction: column; gap: 12px; }
.login-card h1 { font-size: 32px; }
.login-intro { color: var(--text-2); }
.login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.login-form .exin { max-width: none; width: 100%; }
.remember { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.remember input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.login-form .btn { min-height: 52px; font-size: 16px; }
.login-help { font-size: 15px; }
.login-help a { font-weight: 600; }
.login-footer { text-align: center; font-size: 15px; color: var(--muted); margin-top: 22px; }
.login-footer a { font-weight: 700; }
.login-card .fb p + p { margin-top: 6px; }
.login-card .fb a { font-weight: 700; }
.consent { align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text-2); padding-top: 4px; }
.consent input { margin-top: 1px; flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.welcome { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 18px; }
.welcome p { color: var(--text-2); }
.welcome a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Profil ---------- */
.profile-page h1 { padding: 6px 4px 12px; }
.dwl-profile > .sub { color: var(--text-2); margin: 0 4px 14px; }
.dwl-profile > .hint { margin-bottom: 8px; }
.pform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.pform-h { grid-column: 1 / -1; font-size: 18px; letter-spacing: -0.01em; margin-top: 18px; padding: 0 2px; }
.pfield { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pfield .blabel { font-size: 14px; font-weight: 600; }
.pfield .exin, .pfield select.gap { max-width: none; width: 100%; min-height: 46px; }
.pfield .phint { font-size: 12.5px; color: var(--muted); }
.pfield-wide { grid-column: 1 / -1; }
.bdayrow { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.bdayrow select.gap { width: 100%; min-height: 46px; }
.ymrow { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; }
.ymrow select.gap { width: 100%; min-height: 46px; }
.ympreview span { color: var(--ink); font-weight: 600; }
.tagwrap { position: relative; }
.tagbox { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 46px; padding: 5px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--bg); cursor: text; }
.tagbox:focus-within { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.tagchips { display: contents; }
.tagchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--accent-soft); font-size: 15px; }
.tagchip-da { font-weight: 600; }
.tagchip-en { font-size: 13px; color: var(--text-2); }
.tagx { width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--accent-strong); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tagx:hover { background: var(--accent); color: #fff; }
.tag-input { flex: 1; min-width: 180px; border: 0; outline: none; background: transparent; font: inherit; color: var(--ink); min-height: 34px; padding: 0 4px; }
.tagmenu { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30; list-style: none; margin: 0; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-soft); max-height: 300px; overflow-y: auto; }
.tagopt { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.tagopt:hover, .tagopt.active { background: var(--accent-soft); }
.tagopt-da { font-weight: 600; }
.tagopt-en { font-size: 13.5px; color: var(--muted); }
.tagopt.custom { justify-content: flex-start; gap: 0; font-weight: 600; color: var(--accent-strong); }
.formactions { margin-top: 22px; }
.formactions .btn { min-height: 50px; padding-inline: 26px; }
.account { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.account h2 { font-size: 20px; }
.account p { color: var(--text-2); }

@media (max-width: 560px) {
	.pform { grid-template-columns: minmax(0, 1fr); }
	.line { max-width: 94%; }
	.choices { grid-template-columns: 1fr 1fr; }
	input.exin.short { width: 120px; }
	.exfooter .btn { padding-inline: 14px; }
}
