:root {
  --bg: #fff; --fg: #1c1c1e; --muted: #6b6b70; --line: #e4e4e7; --accent: #2457c5; --card: #fafafa;
  --proposed: #b26b00; --accepted: #1f7a3a; --rejected: #a12b2b; --deprecated: #6b6b70; --superseded: #5a4fb0;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161618; --fg: #ececee; --muted: #a0a0a8; --line: #2e2e33; --accent: #7aa2ff; --card: #1e1e21;
          --proposed: #e0a040; --accepted: #5cc27a; --rejected: #e06c6c; --deprecated: #a0a0a8; --superseded: #a99cff; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { padding: .75rem 1rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.brand { font-weight: 600; color: var(--fg); }
main { max-width: 52rem; margin: 0 auto; padding: 1rem; }

.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filter input, .filter select, .filter button { font: inherit; padding: .45rem .6rem; border: 1px solid var(--line);
  border-radius: .5rem; background: var(--card); color: var(--fg); }
.filter input { flex: 1 1 12rem; }

.adrs { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.adrs a { display: block; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--card); color: var(--fg); }
.adrs a:hover { text-decoration: none; border-color: var(--accent); }
.title { font-weight: 600; margin-top: .2rem; }
.summary { color: var(--muted); font-size: .95rem; }

.meta { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; color: var(--muted); }
.space { font-weight: 600; }
.id { font-variant-numeric: tabular-nums; }
.badge { border: 1px solid currentColor; border-radius: 999px; padding: 0 .5rem; font-size: .78rem; }
.status-proposed { color: var(--proposed); } .status-accepted { color: var(--accepted); }
.status-rejected { color: var(--rejected); } .status-deprecated { color: var(--deprecated); }
.status-superseded { color: var(--superseded); } .status-unknown { color: var(--muted); }
.tags { margin-top: .3rem; }
.tag { display: inline-block; font-size: .78rem; padding: 0 .45rem; margin: 0 .25rem .25rem 0; border-radius: .35rem; background: var(--line); }

.adr h1 { font-size: 1.5rem; line-height: 1.25; margin: .4rem 0; }
.adr header .summary { font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; font-size: .9rem; margin: .8rem 0 1.2rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }

.markdown h2 { font-size: 1.15rem; margin-top: 1.6rem; border-bottom: 1px solid var(--line); padding-bottom: .2rem; }
.markdown code { font-size: .9em; background: var(--line); padding: .05rem .3rem; border-radius: .25rem; }
.markdown pre { overflow-x: auto; background: var(--card); border: 1px solid var(--line); padding: .7rem; border-radius: .5rem; }
.markdown pre code { background: none; padding: 0; }
.markdown table { border-collapse: collapse; display: block; overflow-x: auto; }
.markdown th, .markdown td { border: 1px solid var(--line); padding: .3rem .5rem; }
.markdown details { border: 1px solid var(--line); border-radius: .5rem; padding: .5rem .8rem; }
.missing-link { color: var(--muted); border-bottom: 1px dotted var(--muted); cursor: help; }
.notice { background: var(--card); border-left: 3px solid var(--proposed); padding: .5rem .8rem; }
.empty { color: var(--muted); }
.path { font-family: ui-monospace, monospace; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.top nav { display: flex; gap: .9rem; font-size: .95rem; }
.top nav .primary { font-weight: 600; }
.banner { display: block; padding: .5rem 1rem; background: var(--proposed); color: #fff; font-size: .9rem; }
.banner:hover { text-decoration: none; opacity: .9; }
h2.group { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 1.2rem 0 .5rem; }
.drafts a { border-style: dashed; }
.questions { color: var(--proposed); }
.job-queued, .job-running { color: var(--proposed); } .job-drafted { color: var(--accepted); } .job-failed { color: var(--rejected); }
.stack { display: grid; gap: .8rem; }
.stack label { display: grid; gap: .3rem; font-weight: 500; }
input[type=text], input[type=password], textarea, select { font: inherit; padding: .55rem .65rem; border: 1px solid var(--line);
  border-radius: .5rem; background: var(--card); color: var(--fg); width: 100%; }
textarea { resize: vertical; min-height: 10rem; }
button { font: inherit; padding: .55rem 1rem; border-radius: .5rem; border: 1px solid var(--line); background: var(--card); color: var(--fg); cursor: pointer; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.muted { color: var(--muted); font-weight: normal; }
.hint { color: var(--muted); font-size: .9rem; margin-top: 2rem; }
.ok { background: var(--card); border-left: 3px solid var(--accepted); padding: .5rem .8rem; }
.card { border: 1px solid var(--line); border-radius: .75rem; padding: .3rem 1rem .8rem; margin-bottom: 1rem; background: var(--card); }
.card h2 { font-size: 1.05rem; }
pre.input, pre.log { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); padding: .7rem; border-radius: .5rem; font-size: .88rem; }
.actions { display: grid; gap: .8rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.actions form.inline { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.actions form.inline select { width: auto; }
.check { display: inline-flex; gap: .4rem; align-items: center; font-size: .9rem; margin-right: .5rem; }
button.danger { color: var(--rejected); border-color: var(--rejected); }
.recorder { display: grid; gap: .5rem; padding: .8rem; border: 1px dashed var(--line); border-radius: .75rem; }
.recorder audio, main audio { width: 100%; }
button.record { font-size: 1.05rem; padding: .8rem 1rem; }
button.record.recording { background: var(--rejected); border-color: var(--rejected); color: #fff; }
input[type=file] { font: inherit; }
.narrow { max-width: 22rem; }
form.logout { display: inline; }
form.logout button { padding: 0 .3rem; border: none; background: none; color: var(--muted); font-size: 1rem; }
a.button { display: inline-block; padding: .55rem 1rem; border-radius: .5rem; border: 1px solid var(--line); background: var(--card); color: var(--fg); }
a.button:hover { text-decoration: none; border-color: var(--accent); }
textarea.editor { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88rem; line-height: 1.45; min-height: 60vh; }
.inline { display: flex; gap: 1rem; align-items: center; }
.questions-form textarea { min-height: 3rem; }

.diff { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; border: 1px solid var(--line); border-radius: .5rem; overflow-x: auto; background: var(--card); }
.diff > div { white-space: pre-wrap; padding: 0 .6rem; }
.diff span { display: inline-block; width: 1.2rem; color: var(--muted); user-select: none; }
.diff .del { background: color-mix(in srgb, var(--rejected) 14%, transparent); }
.diff .ins { background: color-mix(in srgb, var(--accepted) 16%, transparent); }
.diff .eq { color: var(--muted); }
.diff-gap { text-align: center; color: var(--muted); border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.proposal-actions { margin-top: 1rem; flex-wrap: wrap; }

.answer-row { display: flex; gap: .4rem; align-items: flex-start; }
.answer-row textarea { flex: 1; }
button.mic { font-size: 1.2rem; padding: .4rem .6rem; }
button.mic.recording, button.recording { background: var(--rejected); border-color: var(--rejected); color: #fff; }
button.big { font-size: 1.1rem; padding: .9rem 1.2rem; }
.dialog-question { font-size: 1.35rem; font-weight: 600; line-height: 1.35; }
.dialog-understood { font-size: 1.1rem; }
.dialog-buttons { display: grid; gap: .6rem; margin-top: 1rem; }
.level { height: .4rem; background: var(--line); border-radius: .2rem; overflow: hidden; }
.level > div { height: 100%; width: 0; background: var(--accepted); transition: width .1s; }

.einordnung { border-left: 4px solid var(--muted); }
.einordnung.is-adr { border-left-color: var(--accepted); }
.einordnung.not-adr { border-left-color: var(--proposed); }
.einordnung p { margin: .3rem 0; }
.not-adr-badge { color: var(--proposed); }
.einordnung-actions { flex-wrap: wrap; gap: .5rem; }
.einordnung-actions select { width: auto; }
