/* Schrift: lib/fonts.css (lokal) */
body { margin: 0; font-family: var(--font-sans); background: var(--surface); color: var(--ink); }
.lk-demo { padding: 20px; display: flex; flex-direction: column; gap: 12px; box-sizing: border-box; }
.lk-demo-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

/* Icons */
.lk-icon { display: block; flex-shrink: 0; }

/* Buttons: every control in the action bar is 56px high with a 5px step */
.lk-btn { box-sizing: border-box; height: var(--control-height, 56px); display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border-radius: var(--radius-lg); font-family: var(--font-sans); font-size: 16px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.lk-btn:focus-visible { outline: 3px solid var(--petrol); outline-offset: 5px; }
.lk-btn--primary { width: var(--primary-width, 240px); border: none; font-size: 19px; font-weight: 800; letter-spacing: 0.06em; color: var(--on-fill); background: var(--petrol); box-shadow: var(--step-petrol); }
.lk-btn--primary.lk-tone--teal { background: var(--teal); box-shadow: var(--step-teal); }
.lk-btn--primary.lk-tone--rust { background: var(--rust-deep); box-shadow: var(--step-rust); }
.lk-btn--primary[disabled], .lk-btn--primary[aria-disabled="true"] { background: var(--track); color: var(--ink-subtle); box-shadow: 0 5px 0 var(--line); cursor: not-allowed; }
.lk-btn--secondary, .lk-btn--icon { background: var(--surface); border: 2px solid var(--line); color: var(--ink-muted); box-shadow: var(--step-neutral); }
.lk-btn--icon { width: var(--control-height, 56px); padding: 0; }
.lk-tone--teal.lk-btn--secondary, .lk-tone--teal.lk-btn--icon { border-color: var(--teal-line); color: var(--teal-deep); box-shadow: 0 5px 0 var(--teal-line); }
.lk-tone--rust.lk-btn--secondary, .lk-tone--rust.lk-btn--icon { border-color: var(--rust-line); color: var(--rust-ink); box-shadow: 0 5px 0 var(--rust-line); }

/* Chips and pills */
.lk-chip { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: var(--radius-pill); font-size: 16px; font-weight: 600; }
.lk-chip--done { background: var(--teal-soft); color: var(--teal-deep); }
.lk-chip--active { background: var(--petrol); color: var(--on-fill); font-weight: 700; padding: 0 14px; }
.lk-chip--pending { border: 2px dashed var(--line-strong); color: var(--ink-subtle); font-weight: 400; }
.lk-xp { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--sky-soft); color: var(--petrol-deep); font-size: 18px; font-weight: 700; }

/* Header */
.lk-header { box-sizing: border-box; height: var(--header-height, 84px); padding: 0 var(--space-7); display: flex; align-items: center; gap: 28px; background: var(--surface); }
.lk-header__logo { height: 34px; width: auto; display: block; }
.lk-progress { flex-grow: 1; height: 16px; border-radius: var(--radius-pill); background: var(--track); overflow: hidden; }
.lk-progress__fill { height: 100%; border-radius: var(--radius-pill); background: var(--petrol); box-shadow: inset 0 -4px 0 rgba(0,75,118,0.45); }
.lk-close { width: 44px; height: 44px; border: none; background: transparent; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink-subtle); }

/* Stage: task left, context right, both halves equal */
.lk-stage { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-8); padding: 22px var(--space-7) var(--space-5); }
.lk-stage__task, .lk-stage__aside { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lk-stage__aside { gap: var(--space-4); }
.lk-eyebrow { font-size: 15px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--petrol); }
.lk-title { margin: 0; font-size: 31px; line-height: 1.18; font-weight: 700; color: var(--ink); text-wrap: balance; }
.lk-title em { font-weight: 600; color: var(--petrol-deep); }
.lk-lead { margin: 0; font-size: 19px; line-height: 1.45; color: var(--ink-2); }

/* Answer options */
.lk-options { display: flex; flex-direction: column; gap: var(--space-3); margin-top: 6px; }
.lk-option { box-sizing: border-box; width: 100%; display: flex; gap: 16px; align-items: flex-start; text-align: left; padding: 14px 18px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: var(--radius-lg); font-family: var(--font-sans); font-size: 18px; line-height: 1.45; color: var(--ink); cursor: pointer; }
.lk-option__key { box-sizing: border-box; flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 2px solid var(--line-strong); color: var(--ink-muted); font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.lk-option--multi .lk-option__key { border-radius: 7px; }
.lk-option__text { padding-top: 2px; }
.lk-option--selected { background: var(--petrol-soft); border-color: var(--petrol); }
.lk-option--selected .lk-option__key { background: var(--petrol); border-color: var(--petrol); color: var(--on-fill); }
.lk-option--correct { background: var(--teal-soft); border-color: var(--teal); cursor: default; }
.lk-option--correct .lk-option__key { background: var(--teal); border-color: var(--teal); color: var(--on-fill); }
.lk-option--wrong { background: var(--rust-soft); border-color: var(--rust); cursor: default; }
.lk-option--wrong .lk-option__key { background: var(--rust-deep); border-color: var(--rust-deep); color: var(--on-fill); }
.lk-option--dimmed { border-color: #edf1f3; color: var(--ink-subtle); cursor: default; }
.lk-option--dimmed .lk-option__key { border-color: var(--line); color: var(--ink-subtle); }
.lk-option:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; }

/* Context panels */
.lk-panel { border-radius: var(--radius-xl); background: var(--surface-sunken); overflow: hidden; }
.lk-panel__head { box-sizing: border-box; height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.lk-panel__label { font-size: 14.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); }
.lk-panel__meta { font-size: 14.5px; color: var(--ink-muted); }
.lk-panel__body { padding: 12px 18px 16px; font-size: 16px; line-height: 1.4; color: var(--ink-2); }
.lk-panel--emphasis { background: var(--surface); border: 2px solid var(--petrol-deep); }
.lk-panel--emphasis .lk-panel__head { background: var(--petrol-deep); border-bottom: none; }
.lk-panel--emphasis .lk-panel__label { color: var(--on-fill); }
.lk-panel--emphasis .lk-panel__meta { color: var(--sky-soft); }
.lk-badge { font-size: 14px; font-weight: 700; padding: 2px 10px; border-radius: 12px; }
.lk-badge--rust { color: var(--rust-ink); background: var(--rust-soft); border: 1.5px solid var(--rust); }
.lk-badge--teal { color: var(--on-fill); background: var(--teal); }

/* Prompt fields inside a panel */
.lk-fields { display: flex; flex-direction: column; gap: 10px; }
.lk-field { display: flex; gap: 12px; min-width: 0; }
.lk-field__label { width: 118px; flex-shrink: 0; display: flex; flex-direction: column; gap: 4px; font-weight: 700; color: var(--ink-muted); }
.lk-field__text { min-width: 0; color: var(--ink-muted); }
.lk-field--filled .lk-field__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-field--empty { align-items: center; padding: 10px 12px; margin: 0 -12px; border: 2px dashed var(--petrol); border-radius: 10px; background: var(--surface); }
.lk-field--empty .lk-field__label, .lk-field--empty .lk-field__text { color: var(--petrol-deep); }
.lk-field--new { padding: 10px 12px; margin: 0 -12px; border-radius: 10px; background: var(--teal-soft); }
.lk-field--new .lk-field__label { color: var(--teal-deep); }
.lk-field--new .lk-field__text { color: var(--ink); }
.lk-field--wrong { padding: 10px 12px; margin: 0 -12px; border: 2px dashed var(--rust); border-radius: 10px; background: var(--rust-soft); }
.lk-field--wrong .lk-field__label { color: var(--rust-ink); }
.lk-field--wrong .lk-field__text { color: var(--ink); }
.lk-field--locked .lk-field__label, .lk-field--locked .lk-field__text { color: var(--ink-subtle); }
.lk-field__note { align-self: flex-start; font-size: 13px; font-weight: 700; padding: 1px 8px; border-radius: 9px; }
.lk-field--new .lk-field__note { color: var(--on-fill); background: var(--teal); }
.lk-field--wrong .lk-field__note { color: var(--rust-ink); padding: 0; font-size: 14px; font-weight: 600; }

/* AI answer rows */
.lk-rows { display: grid; grid-template-columns: 64px minmax(0, 1fr); row-gap: 3px; font-size: 16.5px; line-height: 1.45; color: var(--ink-2); }
.lk-rows__time { color: var(--ink-muted); }
.lk-mark { background: var(--sky-soft); padding: 0 4px; border-radius: 3px; }
.lk-sum { padding-top: 4px; font-weight: 700; }
.lk-sum s { font-weight: 400; color: var(--ink-subtle); margin-left: 6px; }
.lk-ai-note { font-size: 14.5px; color: var(--ink-muted); }

/* Action bar: same height in every state; the primary control always last, always 240px */
.lk-bar { box-sizing: border-box; height: var(--bar-height, 112px); padding: 0 var(--space-7); display: flex; align-items: center; gap: 16px; border-top: 3px solid var(--track); background: var(--surface); }
.lk-bar__spacer { flex-grow: 1; }
.lk-bar__msg { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lk-bar__title { font-size: 25px; font-weight: 800; }
.lk-bar__text { font-size: 18px; line-height: 1.4; color: var(--ink); }
.lk-bar--correct { background: var(--teal-soft); border-top-color: var(--teal); }
.lk-bar--correct .lk-bar__title { color: var(--teal-deep); }
.lk-bar--wrong { background: var(--rust-soft); border-top-color: var(--rust); }
.lk-bar--wrong .lk-bar__title { color: var(--rust-ink); }

/* Video */
.lk-video { position: relative; border-radius: var(--radius-xl); overflow: hidden; background: #0e1a21; aspect-ratio: 16 / 9; }
.lk-video__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lk-video__sub { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); max-width: 80%; padding: 6px 12px; border-radius: 6px; background: rgba(14,26,33,0.82); color: #ffffff; font-size: 18px; line-height: 1.35; text-align: center; }
.lk-video__controls { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: rgba(14,26,33,0.72); color: #ffffff; font-size: 15px; }
.lk-video__track { flex-grow: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,0.3); overflow: hidden; }
.lk-video__fill { height: 100%; background: var(--sky); }
.lk-video__play { width: 36px; height: 36px; border: none; border-radius: 50%; background: #ffffff; color: var(--petrol-deep); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lk-video__label { position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 12px; background: rgba(14,26,33,0.72); color: #ffffff; font-size: 14px; }

/* Sorting: cards and slots */
.lk-card { box-sizing: border-box; display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: var(--radius-lg); font-size: 17px; line-height: 1.4; color: var(--ink); cursor: grab; }
.lk-card__grip { flex-shrink: 0; color: var(--line-strong); padding-top: 2px; }
.lk-card--active { border-color: var(--petrol); background: var(--petrol-soft); }
.lk-card--placed { cursor: default; border-bottom-width: 2px; }
.lk-card--correct { border-color: var(--teal); background: var(--teal-soft); border-bottom-width: 2px; }
.lk-card--wrong { border-color: var(--rust); background: var(--rust-soft); border-bottom-width: 2px; }
.lk-slot { box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; min-height: 64px; padding: 10px 12px; border: 2px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-sunken); }
.lk-slot__label { font-size: 15px; font-weight: 700; color: var(--ink-muted); }
.lk-slot--target { border-color: var(--petrol); background: var(--petrol-soft); }
.lk-slot--target .lk-slot__label { color: var(--petrol-deep); }

/* Markable text for Fehler finden */
.lk-marktext { font-size: 19px; line-height: 1.8; color: var(--ink); }
.lk-sentence { padding: 3px 4px; border-radius: 6px; cursor: pointer; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.lk-sentence:hover { background: var(--petrol-soft); }
.lk-sentence--marked { background: var(--petrol-soft); box-shadow: inset 0 -3px 0 var(--petrol); }
.lk-sentence--correct { background: var(--teal-soft); box-shadow: inset 0 -3px 0 var(--teal); }
.lk-sentence--wrong { background: var(--rust-soft); box-shadow: inset 0 -3px 0 var(--rust); }

/* Key card for Merksatz */
.lk-keycard { position: relative; box-sizing: border-box; padding: 28px 30px 26px; border-radius: var(--radius-xl); background: var(--petrol-deep); color: var(--on-fill); }
.lk-keycard__label { font-size: 14.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sky); }
.lk-keycard__text { margin: 10px 0 0; font-size: 27px; line-height: 1.3; font-weight: 600; }
.lk-keycard__foot { margin-top: 18px; display: flex; align-items: center; gap: 8px; font-size: 15.5px; color: var(--sky-soft); }
