:root {
  --bg: #f4f5f8; --card: #fff; --ink: #1b1d22; --mute: #646a75; --line: #e3e6ec; --soft: #f7f8fa;
  --acc: #0b7d72; --acc-soft: #e2f4f1; --acc-ink: #fff;
  --ok: #17803f; --okbg: #e7f6ec; --bad: #b42626; --badbg: #fdecec; --warn: #8a5a00; --warnbg: #fff5d9; --hl: #ffe57a;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 6px 20px rgba(20, 30, 60, .06);
  --radius: 16px;
  --c: var(--acc); --c-soft: var(--acc-soft);
}
.sec-hoeren { --c: #2563eb; --c-soft: #e8efff } .sec-lesen { --c: #0f8a63; --c-soft: #e3f5ee }
.sec-schreiben { --c: #d9681c; --c-soft: #fdf0e5 } .sec-sprechen { --c: #7c4ad8; --c-soft: #f1ebfd }
* { box-sizing: border-box }
[hidden] { display: none !important }
html { color-scheme: light }
body { margin: 0; font: 17px/1.6 Inter, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased }
a { color: var(--acc) }

/* header */
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding: 12px 20px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line) }
.top::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #111 33%, #d52b1e 33% 66%, #f5c400 66%) }
.top .brand { color: var(--ink); font-weight: 800; text-decoration: none; letter-spacing: -.01em }
.top .brand span { color: var(--mute); font-weight: 500 }
.top nav { display: flex; flex-wrap: wrap; gap: 4px }
.top nav a { color: var(--mute); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem }
.top nav a:hover { background: var(--soft); color: var(--ink) } .top nav a.on { background: var(--acc-soft); color: var(--acc) }

main { max-width: 860px; margin: 0 auto; padding: 24px 20px 90px; outline: none } main:focus, main:focus-visible { outline: none }
h1 { font-size: 1.7rem; line-height: 1.25; margin: .3em 0 .4em; letter-spacing: -.02em } h2 { font-size: 1.12rem; margin: .1em 0 } h4 { margin: 1.1em 0 .3em }
.muted { color: var(--mute) } .small { font-size: .9rem } .warn { color: var(--warn) } .ok { color: var(--ok) } .bad { color: var(--bad) }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center } .grow { flex: 1; min-width: 0 }
.crumbs { font-size: .88rem; color: var(--mute) } .crumbs a { color: var(--mute) }

/* home */
.hero { padding: 26px 26px 22px; border-radius: 22px; background: linear-gradient(135deg, #fff 0%, #e6f6f3 55%, #fff4e0 100%); border: 1px solid var(--line); box-shadow: var(--shadow) }
.hero h1 { font-size: 2rem; margin-top: 0 } .hero p { max-width: 60ch; color: var(--mute); margin: 0 0 16px }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; margin: 22px 0 }
.list { display: grid; gap: 14px; margin: 16px 0 }
.tile { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px;
  color: inherit; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s, border-color .15s }
a.tile:hover { transform: translateY(-2px); border-color: var(--c); box-shadow: 0 10px 28px rgba(20, 30, 60, .1) }
.tile.sec { border-top: 4px solid var(--c) }
.sec-head { display: flex; gap: 12px; align-items: center } .sec-head p { margin: 0 }
.sec-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--c-soft); font-size: 1.5rem }
.tile ul { margin: 12px 0 0; padding-left: 0; list-style: none; font-size: .9rem; color: var(--mute) } .tile li { margin: 4px 0 } .tile li b { color: var(--c) }
.meter { margin-top: 16px; display: flex; align-items: center; gap: 12px } .meter small { color: var(--mute); white-space: nowrap; font-size: .8rem }
.meter .track { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden }
.meter .track span { display: block; height: 100%; border-radius: 6px; background: var(--c) }
.sec-title span[aria-hidden] { font-size: 1.4rem }
.tile.teil { padding-left: 76px; border-left: 4px solid var(--c) }
.teil-n { position: absolute; left: 18px; top: 18px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--c-soft); color: var(--c); font-weight: 800 }
.tile.wide h2 { margin-bottom: 4px }

/* buttons */
.btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 46px; padding: 10px 20px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .04) }
.btn:hover { border-color: #c9cfdb } .btn small { font-weight: 400; font-size: .8rem; opacity: .85 }
.btn.primary { background: var(--acc); border-color: var(--acc); color: var(--acc-ink) } .btn.primary:hover { background: #086a60 }
.btn.danger { color: var(--bad) } .btn:disabled { opacity: .45; cursor: default }
button.link { background: none; border: 0; padding: 6px 0; color: var(--acc); font: inherit; font-size: .92rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px }

/* exercise */
.exercise { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin: 14px 0; box-shadow: var(--shadow) }
.ex-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px }
.ex-head h1 { font-size: 1.4rem }
.q { font-size: 1.22rem; font-weight: 650; margin: 2px 0 14px; line-height: 1.4 }
.actions { margin-top: 16px } .foot { justify-content: space-between; margin-top: 4px }

/* options */
fieldset.opts { border: 0; padding: 0; margin: 14px 0; display: grid; gap: 10px }
fieldset.opts legend { font-weight: 600; margin-bottom: 8px; padding: 0 }
.opt { position: relative; display: flex; gap: 14px; align-items: center; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--card); transition: border-color .12s, background .12s }
.opt:hover { border-color: #b8c3dc; background: var(--soft) }
.opt input { position: absolute; opacity: 0; pointer-events: none }
.opt .letter { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); font-weight: 700; font-size: .9rem; color: var(--mute) }
.opt .letter:empty { display: none }
.opt:has(input:checked) { border-color: var(--acc); background: var(--acc-soft) } .opt:has(input:checked) .letter { background: var(--acc); border-color: var(--acc); color: #fff }
.opt:has(input:focus-visible) { outline: 3px solid var(--acc); outline-offset: 2px }
.opt.ok, .opt.ok:has(input:checked) { border-color: var(--ok); background: var(--okbg); color: var(--ok) }
.opt.bad, .opt.bad:has(input:checked) { border-color: var(--bad); background: var(--badbg); color: var(--bad) }
.opt.bad:has(input:checked) .letter { background: var(--bad); border-color: var(--bad) } .opt.ok .letter { border-color: var(--ok); color: var(--ok) }
.opt:has(input:disabled) { cursor: default }
.opts.rf { grid-template-columns: 1fr 1fr } .opts.rf .opt { justify-content: center; font-weight: 600 } .opts.rf.inline { margin: 16px 0 }
.opts.pics { grid-template-columns: repeat(3, 1fr) } .opt.pic { flex-direction: column; gap: 6px; padding: 16px 8px } .emoji { font-size: 3.4rem; line-height: 1.1 }
.opts.ads { grid-template-columns: 1fr 1fr } .adopt { align-items: flex-start }
@media (max-width: 580px) { .opts.ads { grid-template-columns: 1fr } }
.ad { flex: 1 } .ad-title { font-weight: 800; font-size: 1.05rem } .ad-url { font-size: .82rem; color: var(--acc); margin-bottom: 4px } .ad ul { margin: 6px 0 0; padding-left: 18px; font-size: .95rem }

/* reading */
.letter-card { background: #fffdf7; border: 1px solid #efe7cf; border-radius: 12px; padding: 18px 20px; font-size: 1.05rem; box-shadow: 0 2px 0 #efe7cf }
.place { font-style: italic; color: var(--mute); margin: 0 0 8px; text-align: center }
.sign { border: 3px solid var(--ink); border-radius: 8px; padding: 16px; text-align: center; font-weight: 600; background: #fff; max-width: 460px; margin: 0 auto 12px; box-shadow: 4px 4px 0 rgba(0, 0, 0, .08) }
.sign-title { font-size: 1.2rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px }
mark { background: var(--hl); color: inherit; border-radius: 3px; padding: 0 2px }

/* writing */
.situation { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px }
.form { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fcfcfd } .form-title { font-weight: 800; margin-bottom: 8px; letter-spacing: .01em }
.frow { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line) }
.frow input, .frow select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink) }
.frow input:focus, .frow select:focus, textarea:focus { border-color: var(--acc); outline: 3px solid var(--acc-soft) }
.frow input[readonly][data-given] { border-color: transparent; background: transparent; padding-left: 0; color: var(--mute) }
.frow.blank label::after { content: ' *'; color: var(--acc) } .frow.ok input, .frow.ok select { border-color: var(--ok); background: var(--okbg) } .frow.bad input, .frow.bad select { border-color: var(--bad); background: var(--badbg) }
@media (max-width: 480px) { .frow { grid-template-columns: 1fr; gap: 2px } }
ul.points { padding-left: 20px }

/* audio + recorder */
.player { display: flex; gap: 16px; align-items: center; margin: 12px 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--soft); border: 1px solid var(--line) }
.play, .rec { min-width: 136px; min-height: 58px; border-radius: 30px; border: 0; background: var(--acc); color: var(--acc-ink); font: inherit; font-size: 1.05rem; font-weight: 700; cursor: pointer; box-shadow: 0 4px 12px rgba(11, 125, 114, .28) }
.play:hover:not(:disabled) { background: #086a60 } .play:disabled, .rec:disabled { opacity: .4; cursor: default; box-shadow: none }
.rec { background: #d33a3a; box-shadow: 0 4px 12px rgba(211, 58, 58, .28) } .rec.on { animation: pulse 1.2s infinite }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(211, 58, 58, .18) } }
@media (prefers-reduced-motion: reduce) { .rec.on { animation: none; outline: 4px solid rgba(211, 58, 58, .5) } }
progress { width: 100%; height: 8px; accent-color: var(--acc) }
.allow { font-size: .85rem; color: var(--mute); margin: 2px 0 0 }
.unavailable { padding: 14px; border-radius: 12px; background: var(--warnbg); color: var(--warn); display: grid; gap: 8px }
.recorder { margin-top: 14px; padding: 14px 16px; border: 1.5px dashed #cdd3df; border-radius: 14px; display: grid; gap: 8px; background: #fcfcfd } .recorder audio { max-width: 100% } .recorder p:empty { display: none } .recorder p { margin: 0 }

/* speaking cards */
.card { background: #fff; border: 3px solid var(--ink); border-radius: 6px; padding: 14px 18px; font-size: 1.3rem; font-weight: 700; display: grid; text-align: center; min-width: 160px; box-shadow: 4px 4px 0 rgba(0, 0, 0, .08) }
.card.t2 { width: min(320px, 100%); margin: 0 auto 12px; padding: 0; overflow: hidden }
.t2-theme { font-size: 1rem; font-weight: 500; padding: 8px 12px; border-bottom: 3px solid var(--ink); text-align: left }
.t2-word { font-size: 1.8rem; font-weight: 800; padding: 26px 12px }
.card.picture { width: 170px; height: 170px; place-items: center; margin: 0 auto 12px; padding: 0; font-size: 5.5rem; border-radius: 22px }
.card.picture.prohibited span { position: relative; display: grid; place-items: center; width: 130px; height: 130px; font-size: 4rem; border-radius: 50%; border: 11px solid #d52b1e }
.card.picture.prohibited span::after { content: ''; position: absolute; width: 11px; height: 130px; background: #d52b1e; transform: rotate(-45deg) }
.card.info { font-size: 1.15rem; margin-bottom: 8px }
.card.keywords { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; font-size: 1.05rem; margin-bottom: 8px }
.card.keywords .on { color: var(--acc); text-decoration: underline; text-underline-offset: 4px }

/* feedback */
.feedback:not(:empty) { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); outline: none }
.verdict { font-weight: 600; padding: 12px 14px; border-radius: 12px; background: var(--warnbg); color: var(--warn) }
.verdict.fully { background: var(--okbg); color: var(--ok) } .verdict.not { background: var(--badbg); color: var(--bad) }
.transcript { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 6px 16px 10px; margin: 12px 0 }
.spk { display: inline-block; min-width: 96px; color: var(--mute); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em }
.en { color: var(--mute); font-size: .95rem }
.qfb { padding-left: 20px } .qfb li { margin: 10px 0 } .qfb li.ok b:first-child { color: var(--ok) } .qfb li.bad b:first-child { color: var(--bad) }
ul.points li.addressed b { color: var(--ok) } ul.points li.partly b { color: var(--warn) } ul.points li.missing b { color: var(--bad) }
blockquote { margin: 6px 0; padding: 10px 14px; border-left: 4px solid var(--line); background: var(--soft); border-radius: 0 10px 10px 0 }
blockquote.corrected { border-left-color: var(--ok); background: var(--okbg) }
.notice, .asr { background: var(--warnbg); color: var(--warn); padding: 10px 14px; border-radius: 10px; font-size: .92rem }
.tip { font-size: .95rem } .hint { background: var(--acc-soft); padding: 10px 14px; border-radius: 10px; margin-top: 12px }
.sample { background: var(--okbg); padding: 6px 14px; border-radius: 10px }
.timer { font-variant-numeric: tabular-nums; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--acc-soft); color: var(--acc) }
.timer.warn { background: var(--warnbg); color: var(--warn) } .setprog { margin-bottom: 6px }

/* tables & lists */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px }
table { border-collapse: collapse; width: 100%; font-size: .9rem; margin: 0 }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top } th { background: var(--soft); font-weight: 600; color: var(--mute); font-size: .82rem }
tr:last-child td { border-bottom: 0 }
.score table, .about-table { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden }
.review { padding-left: 20px } .review details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 10px 0; box-shadow: var(--shadow) }
.review summary { cursor: pointer; font-weight: 500 } .history li { margin: 8px 0 }
.status { margin-top: 30px; padding-top: 6px; border-top: 1px solid var(--line) }
section > h2 { margin-top: 24px }

/* Fit in Deutsch 1 */
fieldset.qset { margin: 18px 0 } .opts.qset.pics .opt.pic { padding: 14px 8px 12px } .pic-text { font-size: .92rem; text-align: center }
.ad-big { position: relative; border: 2px solid var(--ink); border-radius: 14px; padding: 18px 20px 14px; background: #fffef8; box-shadow: 5px 5px 0 rgba(0, 0, 0, .07); margin-bottom: 6px }
.ad-big .ad-title { font-size: 1.3rem; margin-bottom: 6px; padding-right: 64px } .ad-big p { margin: 4px 0 }
.ad-img { position: absolute; right: 16px; top: 12px; font-size: 2.8rem }
.ad-big .ad-url { margin-top: 10px; font-weight: 600 }
.profile .ad-title { margin-bottom: 6px } .profile p { margin: 0 }
.mail { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 0 18px 8px; box-shadow: var(--shadow); margin: 10px 0 14px }
.mail-head { margin: 0 -18px 10px; padding: 10px 18px; background: var(--soft); border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; font-size: .9rem; color: var(--mute); font-weight: 600 }
.card.picture { position: relative }
.card.picture .mark { position: absolute; right: -14px; top: -14px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1.7rem; font-weight: 900; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2) }
.card.picture .mark.x { background: #e4572e } .card.picture .mark.q { background: #2563eb }

/* classroom */
.who { margin-left: auto; color: var(--mute) } .who b { color: var(--ink) } .who .link { padding: 0 }
.join form { margin-top: 8px } .join input { flex: 1; min-width: 200px }
input[type=text], input[type=password], input:not([type]) { font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink) }
main.wide { max-width: 1180px }
.narrow { max-width: 460px } .stack { display: grid; gap: 6px } .stack label { font-weight: 600; font-size: .92rem; margin-top: 6px } .stack .btn { margin-top: 10px; justify-self: start }
select { font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink) }
button.link.bad { color: var(--bad) }
.sub h3 { margin: 0; font-size: 1.05rem } .sub audio { width: 100%; margin: 8px 0 } .sub details { margin: 6px 0 }

/* phones */
@media (max-width: 600px) {
  body { font-size: 16px }
  main { padding: 14px 14px 72px }
  .top { padding: 8px 12px; gap: 2px 12px }
  .top nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; margin: 0 -4px; scrollbar-width: none; -webkit-overflow-scrolling: touch }
  .top nav::-webkit-scrollbar { display: none }
  .top nav a { padding: 5px 10px; white-space: nowrap; flex: none }
  .top .who { position: absolute; right: 12px; top: 10px; font-size: .82rem }
  h1 { font-size: 1.4rem } .hero { padding: 20px 18px } .hero h1 { font-size: 1.55rem }
  .exercise { padding: 16px 14px }
  .player { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px }
  .play, .rec { width: 100%; min-height: 54px }
  .actions .btn { flex: 1 }
  .tile.teil { padding-left: 64px } .teil-n { left: 14px }
  .card.picture { width: 140px; height: 140px; font-size: 4.5rem }
}

.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin: 2px 0 6px }
.badge.auto { background: var(--soft); color: var(--mute); border: 1px solid var(--line) } .badge.review { background: var(--warnbg); color: var(--warn) }
.sub.auto { opacity: .9 }

.fb-link { text-decoration: none; font-weight: 600; margin-right: 6px } .fb-link.unread { color: #fff; background: #e4572e; padding: 2px 10px; border-radius: 999px }
.fb.new { border-color: #e4572e } blockquote.teacher { border-left-color: var(--acc); background: var(--acc-soft) }
.review-box { display: grid; gap: 8px; padding: 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; margin: 8px 0 } .review-box textarea { width: 100% }
.badge.done { background: var(--okbg); color: var(--ok) }
.filters input[type=search] { flex: 1; min-width: 180px; font: inherit; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px }
.filters select, .review-box select { font: inherit; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff }
.list.compact { gap: 6px } .pager { justify-content: center; margin: 12px 0 }
.subrow { background: var(--card); border: 1px solid var(--line); border-radius: 10px }
.subrow > summary { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 10px 14px; cursor: pointer; list-style: none }
.subrow > summary::-webkit-details-marker { display: none } .subrow[open] > summary { border-bottom: 1px solid var(--line) }
.subrow .who { flex: 1; min-width: 150px } .subrow > .tile { border: 0; box-shadow: none; margin: 0 }
.st { min-width: 92px; text-align: center; font-size: .8rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--soft) }
.st.review { background: var(--warnbg); color: var(--warn) } .st.done, .st.ok { background: var(--okbg); color: var(--ok) } .st.bad { background: var(--badbg); color: var(--bad) }
.task-line { margin: 4px 0; font-size: .92rem } .prompt { background: var(--soft); border-radius: 10px; padding: 10px 12px }
