/* Deutsch Wortschatz - edit freely: the build never overwrites this file
   (unless run with --reset-css). Colours are defined as variables below. */
:root {
  --bg: #f7f6f2; --surface: #ffffff; --surface-2: #f0eee8; --text: #1f2328; --muted: #6a6f76;
  --border: #e2dfd7; --accent: #b4492f; --accent-soft: #f6e3dd;
  --der: #2563c9; --die: #c2334d; --das: #23894f;
  --lvl-essential: #23894f; --lvl-important: #b7791f; --lvl-advanced: #7c4dbd;
  --err: #c2334d; --ok: #23894f; --mark: #fff1a8;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: Georgia, "Iowan Old Style", serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c; --surface: #1f2228; --surface-2: #272b32; --text: #e7e9ec; --muted: #9aa1aa;
    --border: #333841; --accent: #e07a5f; --accent-soft: #3a2a25;
    --der: #6ea3f5; --die: #f07a8f; --das: #5fcf8b;
    --lvl-essential: #5fcf8b; --lvl-important: #e3b04b; --lvl-advanced: #b28cf0;
    --err: #f07a8f; --ok: #5fcf8b; --mark: #5a4d12;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { line-height: 1.25; }
h1 { font-family: var(--font-serif); font-size: 2rem; margin: 1.5rem 0 .25rem; }
h2 { font-size: 1.3rem; margin: 2.2rem 0 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--border); }
mark { background: var(--mark); color: inherit; padding: 0 .1em; border-radius: 3px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); }
.brand span { color: var(--accent); margin-left: .15em; }
.site-header nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.site-header nav a { padding: .35rem .7rem; border-radius: 999px; color: var(--muted); }
.site-header nav a.active, .site-header nav a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }
.site-footer { color: var(--muted); font-size: .85rem; padding: 2rem 0; }

.subtitle { color: var(--muted); margin: 0; font-style: italic; }
.desc { max-width: 70ch; }
.stats { color: var(--muted); }
.meta { color: var(--muted); font-size: .85rem; margin-bottom: .5rem; }
.empty { color: var(--muted); font-style: italic; }
.crumbs { margin: 1rem 0 0; font-size: .9rem; }
.toc { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.toc a { background: var(--surface); border: 1px solid var(--border); padding: .3rem .75rem; border-radius: 999px; font-size: .9rem; }

.badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: .12rem .5rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); margin-right: .25rem; white-space: nowrap; }
.badge.lvl.essential { color: var(--lvl-essential); background: color-mix(in srgb, var(--lvl-essential) 14%, transparent); }
.badge.lvl.important { color: var(--lvl-important); background: color-mix(in srgb, var(--lvl-important) 14%, transparent); }
.badge.lvl.advanced { color: var(--lvl-advanced); background: color-mix(in srgb, var(--lvl-advanced) 14%, transparent); }
.badge.err { color: var(--err); background: color-mix(in srgb, var(--err) 12%, transparent); }
.badge.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }

.hero { padding: 1rem 0; }
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.topic-card { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); color: var(--text); transition: transform .1s, border-color .1s; }
.topic-card:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.topic-card h3 { margin: 0; font-family: var(--font-serif); font-size: 1.25rem; }
.due { background: var(--accent-soft); border-radius: var(--radius); padding: .5rem 1.1rem 1rem; }
.due h2 { border: 0; margin-top: .5rem; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem;
  position: sticky; top: 56px; background: var(--bg); padding: .5rem 0; z-index: 4; }
.filters input, .filters select { font: inherit; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text); }
.filters input { flex: 1 1 200px; }
.filters .count { color: var(--muted); font-size: .85rem; margin-left: auto; }
.alphabet { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0; }
.alphabet a { width: 2rem; text-align: center; padding: .2rem 0; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.letter { font-family: var(--font-serif); color: var(--accent); }

.word-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.word-list .letter { grid-column: 1 / -1; margin: 1rem 0 0; }
.word { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); }
.word.g-der { border-left-color: var(--der); }
.word.g-die { border-left-color: var(--die); }
.word.g-das { border-left-color: var(--das); }
.word.pos-verb { border-left-color: var(--accent); }
.word header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; flex-wrap: wrap; }
.word h3 { margin: 0; font-size: 1.25rem; font-family: var(--font-serif); font-weight: 600; }
.article { font-weight: 700; font-family: var(--font); font-size: .95rem; }
.article.der { color: var(--der); } .article.die { color: var(--die); } .article.das { color: var(--das); }
.sep { color: var(--accent); font-weight: 400; margin: 0 .05em; }
.translation { margin: .2rem 0 .6rem; color: var(--muted); font-style: italic; }
.grammar { display: grid; grid-template-columns: max-content 1fr; gap: .15rem .8rem; margin: 0 0 .6rem; font-size: .9rem; }
.grammar dt { color: var(--muted); }
.grammar dd { margin: 0; font-weight: 500; }
.examples, .sentences { list-style: none; margin: 0; padding: 0; }
.examples li { border-top: 1px dashed var(--border); padding: .45rem 0 .2rem; }
.de { display: block; }
.tr { display: block; color: var(--muted); font-size: .88rem; font-style: italic; }
.notes { font-size: .85rem; background: var(--surface-2); padding: .4rem .6rem; border-radius: 6px; margin: .6rem 0 0; }
.topics { font-size: .8rem; margin: .5rem 0 0; } .topics a { margin-right: .5rem; }

.sentences li { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .55rem .8rem; margin-bottom: .5rem; }
.sentences .ref { font-size: .78rem; }
.text-block, .dialogue, .err-cat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.2rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.text-block h3, .dialogue h3 { margin: 0 0 .2rem; font-family: var(--font-serif); }
.text-block .de { font-size: 1.05rem; line-height: 1.75; max-width: 75ch; }
details summary { cursor: pointer; color: var(--accent); margin-top: .5rem; }
.turns { padding-left: 0; list-style: none; margin: 0; }
.turns li { display: grid; grid-template-columns: 6rem 1fr; column-gap: .8rem; padding: .35rem 0; border-top: 1px dashed var(--border); }
.turns li b { grid-row: span 2; color: var(--accent); }
.turns.show-tr-off .tr { display: none; }
button { font: inherit; cursor: pointer; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 8px; padding: .35rem .8rem; margin-top: .6rem; }
button:hover { border-color: var(--accent); color: var(--accent); }

.notebooklm .steps { padding-left: 1.2rem; }
.prompt-box { position: relative; }
.prompt-box pre { white-space: pre-wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; font-size: .88rem; line-height: 1.5; }
.prompt-box .copy { position: absolute; top: .2rem; right: .6rem; }

.err-cat header { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.err-cat h3 { margin: 0; }
.err-examples { list-style: none; padding: 0; margin: 0; }
.err-examples li { padding: .4rem 0; border-top: 1px dashed var(--border); }
.wrong { color: var(--err); text-decoration: line-through; }
.right { color: var(--ok); font-weight: 600; }
.expl { display: block; color: var(--muted); font-size: .85rem; }
.sessions { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sessions th, .sessions td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.sessions { display: block; overflow-x: auto; }

@media (max-width: 600px) {
  h1 { font-size: 1.6rem; }
  .word-list { grid-template-columns: 1fr; }
  .turns li { grid-template-columns: 1fr; } .turns li b { grid-row: auto; }
  .filters { top: 0; position: static; }
}
@media print {
  .site-header, .filters, .toc, button, .alphabet { display: none !important; }
  .word, .text-block, .dialogue { break-inside: avoid; box-shadow: none; }
  .turns.show-tr-off .tr { display: block; }
}
