/* German tab (public/german.js). Only the app's colour tokens (style.css), so it follows the synthwave theme. */
.german h3 { margin: 0 0 8px; font-size: 16px; }
.german .small { font-size: 12px; }
.german .error { color: var(--danger); margin: 8px 0; }
.de-hero { display: flex; align-items: center; justify-content: space-between; margin: 4px 2px 12px; }
.de-title { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.de-title b { font-family: var(--display); letter-spacing: .5px; }
.de-flag { font-size: 28px; }
.de-streak { display: flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 999px; background: var(--chip); border: 1px solid var(--line); }
.de-streak b { font-family: var(--mono); font-size: 20px; color: var(--warn); }
.de-streak span { color: var(--muted); font-size: 13px; }
.de-cta { border-color: var(--accent); box-shadow: var(--box-glow); }
.de-today .de-plan { display: grid; gap: 6px; margin: 4px 0 12px; font-size: 14px; }
.de-today.done { border-color: var(--ok); }
.de-exam .de-overall { margin: 0 0 10px; }
.de-bar { margin: 10px 0; font-size: 14px; }
.de-bar .muted { font-size: 12px; text-align: right; }
.de-track { position: relative; height: 8px; border-radius: 5px; background: var(--chip); margin-top: 5px; overflow: visible; }
.de-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--sw-magenta), var(--sw-cyan)); transition: width .3s; }
.de-mark { position: absolute; top: -3px; width: 2px; height: 14px; background: var(--warn); border-radius: 1px; }
.de-skills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.de-skills a { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px; background: var(--chip); color: var(--text); text-decoration: none; font-size: 14px; }
.de-level { display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; background: var(--chip); color: var(--muted); border: 1px solid var(--line); }
.de-level.B1, .de-level.above-B1 { color: var(--ok); border-color: var(--ok); }
.de-level.A2 { color: var(--warn); border-color: var(--warn); }
.de-level.below-A2 { color: var(--danger); border-color: var(--danger); }
.de-level.big { font-size: 20px; padding: 4px 14px; font-family: var(--display); }
.de-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.de-section { display: flex; flex-direction: column; gap: 3px; padding: 12px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; min-height: 86px; }
.de-section .muted { font-size: 12px; }
.de-icon { font-size: 22px; }
@media (hover: hover) { .de-section:hover, .de-unit:hover { border-color: var(--accent); } }
.de-cal { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; }
.de-day { aspect-ratio: 1; border-radius: 3px; background: var(--chip); }
.de-day.l1 { background: #4a2559; } .de-day.l2 { background: var(--sw-blue); } .de-day.l3 { background: var(--sw-magenta); box-shadow: 0 0 6px rgba(255, 79, 216, .5); }
.de-day.today { outline: 1px solid var(--sw-cyan); }
.de-foot { justify-content: space-between; }

/* units and lists */
.de-unit { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; margin: 0 -10px; border-radius: 10px; border: 1px solid transparent; color: var(--text); text-decoration: none; font-size: 14px; }
.de-unit.next { background: var(--chip); border-color: var(--line); }
.de-unit .chip { margin-left: 6px; }
.de-ustate { width: 22px; flex: none; text-align: center; color: var(--accent); font-weight: 700; }
.de-unit-head { margin-bottom: 8px; }
.de-unit-head h3 { margin: 6px 0 2px; font-size: 18px; }
.de-de { font-style: normal; color: var(--sw-bcyan); }
.de-prose p { margin: 8px 0; line-height: 1.5; }
.de-prose ul { margin: 6px 0; padding-left: 20px; line-height: 1.5; }
.de-prose b { color: var(--sw-byellow); }
.de-table-wrap { overflow-x: auto; margin: 10px 0; }
.de-table { border-collapse: collapse; font-size: 14px; min-width: 60%; }
.de-table th, .de-table td { border: 1px solid var(--line); padding: 5px 9px; text-align: left; }
.de-table th { color: var(--muted); font-weight: 600; background: var(--chip); }
.de-examples { display: grid; gap: 8px; margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--sw-cyan); background: var(--card); border-radius: 0 10px 10px 0; }
.de-ex .muted { font-size: 13px; }
.de-tip { margin: 10px 0 14px; padding: 10px 12px; border-radius: 10px; background: var(--chip); font-size: 14px; display: flex; gap: 6px; }
.de-tip .de-prose p { margin: 0; }

/* the exercise runner */
.de-progress { height: 4px; border-radius: 2px; background: var(--chip); margin: 4px 0 12px; overflow: hidden; }
.de-progress div { height: 100%; background: var(--accent); transition: width .3s; }
.de-q { font-size: 18px; line-height: 1.45; margin: 10px 0 14px; }
.de-gap { display: inline-block; min-width: 3em; border-bottom: 2px solid var(--accent); color: var(--accent); text-align: center; }
.de-opts { display: grid; gap: 8px; }
.de-opts.row-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.de-opt { text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 16px; display: flex; gap: 8px; align-items: baseline; }
.de-opt.small { padding: 8px 14px; min-width: 44px; justify-content: center; font-weight: 600; }
.de-opt.sel { border-color: var(--sw-cyan); box-shadow: var(--glow-cyan); }
.de-opt.right { border-color: var(--ok); background: rgba(78, 230, 176, .14); }
.de-opt.wrong { border-color: var(--danger); background: rgba(255, 53, 96, .14); }
.de-letter { color: var(--muted); font-weight: 700; min-width: 1.2em; }
.de-input { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--code); color: var(--text); font-size: 17px; font-family: inherit; }
.de-input:focus { outline: none; border-color: var(--sw-cyan); }
.de-select { padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--code); color: var(--text); font-size: 15px; }
.de-line { min-height: 54px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.de-bank { display: flex; flex-wrap: wrap; gap: 6px; }
.de-tok { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--chip); color: var(--text); font-size: 16px; }
.de-tok.in { border-color: var(--sw-cyan); }
.de-tok.used { opacity: .25; }
.de-fb { min-height: 8px; margin: 12px 0; }
.de-verdict { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.de-verdict.ok { color: var(--ok); } .de-verdict.no { color: var(--danger); }
.de-why { color: var(--muted); font-size: 14px; line-height: 1.45; margin-top: 4px; }
.de-actions { position: sticky; bottom: 10px; margin-top: 8px; }
.de-result { text-align: center; }
.de-result .btn { margin-top: 10px; }
.de-big { font-family: var(--display); font-size: 40px; font-weight: 800; color: var(--accent); text-shadow: var(--glow-pink); margin: 6px 0; }
.de-wrong { text-align: left; border-top: 1px solid var(--line); padding: 8px 0; font-size: 14px; }
.de-more { display: grid; gap: 8px; margin-top: 10px; }
.de-more .btn { text-decoration: none; text-align: center; }
.de-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.de-stepchip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.de-stepchip.cur { color: var(--accent-text); background: var(--accent); font-weight: 700; }
.de-stepchip.done { color: var(--ok); }

/* word cards */
.de-card { margin: 10px 0 14px; padding: 26px 16px; min-height: 210px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--box-glow); text-align: center; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.de-word { font-size: 26px; font-weight: 700; display: flex; justify-content: center; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.de-headword { color: var(--text); }
.de-art { font-size: 13px; }
.de-art.der::before { content: "der"; } .de-art.die::before { content: "die"; } .de-art.das::before { content: "das"; }
.de-art.der, .de-word:has(.de-art.der) .de-headword { color: var(--sw-bcyan); }
.de-art.die, .de-word:has(.de-art.die) .de-headword { color: var(--sw-bmagenta); }
.de-art.das, .de-word:has(.de-art.das) .de-headword { color: var(--sw-bgreen); }
.de-art.der::before, .de-art.die::before, .de-art.das::before { display: none; }
.de-back { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.de-en { font-size: 19px; color: var(--sw-byellow); margin-bottom: 8px; }
.de-exsent { font-size: 15px; line-height: 1.4; }
.de-grades { display: flex; gap: 8px; }
.de-grades .btn { flex: 1; padding: 13px 4px; }
.de-say { display: inline-flex; align-items: baseline; gap: 4px; }
.de-speak { border: 0; background: none; font-size: 15px; padding: 2px 4px; opacity: .7; }
.chip.new { color: var(--accent); } .chip.learning { color: var(--warn); } .chip.learned { color: var(--sw-bcyan); } .chip.solid { color: var(--ok); }
.de-levels { display: grid; gap: 4px; margin-bottom: 8px; font-size: 14px; }
.de-levels div { display: flex; gap: 10px; }
.de-wordlist { margin-top: 10px; }
.de-wrow { display: flex; gap: 6px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.de-wrow > div { flex: 1; min-width: 0; }
.german .row .de-input { flex: 1; }

/* Hören / Lesen */
.de-task { margin-top: 6px; }
.de-situation { margin: 10px 0; color: var(--muted); font-size: 14px; }
.de-player { display: flex; gap: 10px; align-items: center; margin: 10px 0 14px; }
.de-play { flex: none; min-width: 104px; }
.de-ptrack { flex: 1; } .de-ptrack .muted { font-size: 12px; }
.de-doc { margin: 10px 0 14px; padding: 12px; border-radius: 10px; background: var(--code); border: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.de-doc h4 { margin: 0 0 6px; }
.de-doc.de-letter { font-family: Georgia, serif; }
.de-dir { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.de-ads { display: grid; gap: 8px; margin: 10px 0 14px; }
.de-ad { padding: 10px; border-radius: 10px; background: var(--code); border: 1px solid var(--line); font-size: 14px; display: grid; gap: 3px; }
.de-ad .de-letter { color: var(--accent); }
.de-statements { display: grid; gap: 6px; margin: 10px 0; font-size: 14px; }
.de-statements div { display: flex; gap: 8px; }
.de-item { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.de-item .de-q { font-size: 16px; margin: 4px 0 8px; }
.de-after { margin-top: 12px; }
.de-after details { margin-top: 8px; }
.de-transcript p { margin: 6px 0; font-size: 14px; line-height: 1.45; }
.de-parthead { margin: 18px 4px 4px; color: var(--sw-bcyan); }
.de-clock.late { color: var(--danger); }
.de-mockhead { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.de-resrow { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); text-align: left; }
.de-resrow.small { font-size: 13px; padding: 4px 0 4px 12px; }
.de-resrow a { color: var(--link); }

/* writing, speaking, feedback */
.de-prompt p { line-height: 1.45; }
.de-points { margin: 6px 0; padding-left: 20px; line-height: 1.6; }
.de-write { width: 100%; min-height: 240px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--code); color: var(--text); font-size: 16px; line-height: 1.5; font-family: inherit; resize: vertical; }
.de-write:focus { outline: none; border-color: var(--sw-cyan); }
.german .btn.big + .btn.big, .german .row + .btn.big { margin-top: 10px; }
.de-photo { margin: 10px 0; }
.de-photo img { width: 100%; border-radius: 12px; }
.de-photo-text { padding: 18px 14px; border-radius: 12px; background: var(--code); border: 1px dashed var(--line); font-size: 15px; line-height: 1.5; }
.de-partner { min-height: 0; }
.de-bubble { margin: 8px 0; padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: var(--chip); border: 1px solid var(--line); font-size: 16px; line-height: 1.45; }
.de-recstate { display: flex; align-items: center; gap: 8px; justify-content: center; margin: 12px 0; font-variant-numeric: tabular-nums; color: var(--muted); }
.de-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 10px var(--danger); animation: de-pulse 1s infinite; }
@keyframes de-pulse { 50% { opacity: .35; } }
.de-reccontrols { display: grid; gap: 10px; }
.de-reccontrols audio { width: 100%; }
.de-reccontrols .row .btn { flex: 1; }
.de-mine { white-space: pre-wrap; line-height: 1.5; font-size: 15px; }
.de-waiting { display: flex; gap: 14px; align-items: center; }
.de-spinner { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 3px solid var(--chip); border-top-color: var(--accent); animation: de-spin 1s linear infinite; }
@keyframes de-spin { to { transform: rotate(360deg); } }
.de-grade p { line-height: 1.45; }
.de-criteria { display: grid; gap: 10px; margin: 10px 0; }
.de-crit .de-track { margin: 4px 0; }
.de-point { display: flex; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.de-mistake { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.de-mistake .muted { font-size: 13px; margin-top: 2px; }
.de-wrongtext { color: var(--sw-bred); }
.de-righttext { color: var(--ok); }
.german details > summary { cursor: pointer; color: var(--link); padding: 4px 0; }
.german details.card > summary { color: var(--text); font-weight: 600; }
.de-label { display: grid; gap: 6px; margin: 10px 0; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .de-dot, .de-spinner { animation: none; } }
