:root { --bg:#fff; --fg:#1a1a1a; --muted:#6b6b6b; --line:#e3e3e3; --accent:#0b62d6; --ok:#1a7f37; --warn:#9a6700; --bad:#c62828; }
@media (prefers-color-scheme: dark) { :root { --bg:#161616; --fg:#eaeaea; --muted:#9a9a9a; --line:#333; --accent:#6aa9ff; --ok:#4cc26b; --warn:#e3b341; --bad:#ff6b6b; } }
* { box-sizing: border-box; }
body { margin:0; font:15px/1.45 -apple-system, system-ui, sans-serif; background:var(--bg); color:var(--fg); }
header { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; padding:10px 16px; border-bottom:1px solid var(--line); }
nav { display:flex; gap:14px; flex:1; }
nav a { color:var(--muted); text-decoration:none; } nav a.on { color:var(--fg); font-weight:600; }
main { padding:16px; }
a { color:var(--accent); }
button, select, input { font:inherit; }
#ext-status { color:var(--muted); font-size:13px; }
.ok { color:var(--ok); } .bad { color:var(--bad); } .muted { color:var(--muted); }
/* tables and forms shared by dashboard pages */
.filters { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.filters input[type=search] { flex:1 1 220px; min-width:0; }
.scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
table.grid { border-collapse:collapse; width:100%; }
.grid th, .grid td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
.grid th { font-weight:600; white-space:nowrap; }
.grid th[data-k] { cursor:pointer; user-select:none; }
.grid th.asc::after { content:" ▲"; font-size:10px; } .grid th.desc::after { content:" ▼"; font-size:10px; }
.grid td select { max-width:11em; }
input, select, textarea, button { padding:4px 6px; }
@media (max-width: 640px) { header { flex-wrap:wrap; gap:8px; } main { padding:10px; } .grid th, .grid td { padding:6px 5px; font-size:14px; } }
h1 { font-size:22px; margin:0 0 4px; } h2 { font-size:17px; margin:24px 0 8px; }
label.block { display:block; } label.block textarea { display:block; width:100%; margin-top:4px; }
.desc { white-space:pre-wrap; overflow-wrap:anywhere; max-width:75ch; }
/* formatted description (sanitised description_html: p br ul ol li b strong i em u h4 only) */
.desc.html { white-space:normal; }
.tabs { display:flex; flex-wrap:wrap; gap:6px; margin:0 0 12px; }
.tabs .tab { border:1px solid var(--line, #ccc); background:transparent; border-radius:14px; padding:4px 12px; min-height:32px; cursor:pointer; }
.tabs .tab.on { background:var(--fg, #222); color:var(--bg, #fff); border-color:var(--fg, #222); }
.desc.html h4 { font-size:15px; margin:18px 0 6px; } .desc.html p { margin:0 0 10px; }
.desc.html ul, .desc.html ol { margin:0 0 10px; padding-left:22px; } .desc.html li { margin-bottom:4px; } .desc.html li p { margin:0; }
.desc.html > :first-child { margin-top:0; }
.merges li { margin-bottom:6px; }
.card { border:1px solid var(--line); border-radius:8px; padding:10px 14px; margin-bottom:12px; max-width:760px; }
.card h2 { margin:4px 0 8px; }
.badge { font-size:12px; font-weight:600; padding:2px 8px; border-radius:10px; vertical-align:middle; border:1px solid currentColor; }
.badge.healthy { color:var(--ok); } .badge.unhealthy { color:var(--bad); } .badge.unknown { color:var(--muted); }
.kv { display:grid; grid-template-columns:max-content 1fr; gap:4px 14px; margin:0 0 8px; } .kv dt { color:var(--muted); } .kv dd { margin:0; }
.errs { margin:4px 0; padding-left:18px; color:var(--bad); font-size:13px; }
.runs { padding-left:18px; font-size:14px; } .runs li { margin-bottom:4px; }
summary { cursor:pointer; color:var(--accent); }
@media (max-width: 640px) { .kv { grid-template-columns:1fr; } .kv dd { margin-bottom:6px; } }
/* language fit: can I apply without strong German? */
.badge.fit-ok { color:var(--ok); } .badge.fit-check { color:var(--warn); } .badge.fit-no { color:var(--bad); }
.badge[class*=fit-] { display:inline-block; white-space:nowrap; background:color-mix(in srgb, currentColor 12%, transparent); }
.grid .lang .badge { max-width:12em; overflow:hidden; text-overflow:ellipsis; vertical-align:top; } /* an unknown long note must not widen the column */
.badge.narrow { display:none; }
.row { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; }
@media (max-width: 640px) { .grid .lang { display:none; } .badge.narrow { display:table; margin-top:4px; white-space:normal; } }
/* jobs table: filters button, active-filter chips, filters side sheet */
[hidden] { display:none !important; }
.tag { font-size:11px; font-weight:600; color:var(--muted); border:1px solid var(--line); border-radius:8px; padding:0 6px; white-space:nowrap; vertical-align:middle; }
.tag.changed { color:var(--warn); border-color:currentColor; }
#open-filters .num { display:inline-block; min-width:1.5em; padding:0 5px; border-radius:9px; background:var(--accent); color:var(--bg); font-size:12px; font-weight:600; text-align:center; }
html:has(dialog.sheet[open]) { overflow:hidden; }
dialog.sheet { margin:0 0 0 auto; padding:0; border:0; border-left:1px solid var(--line); width:min(380px, 100vw); max-width:100vw; height:100%; max-height:100%; background:var(--bg); color:var(--fg); }
dialog.sheet[open] { animation:sheet-in .18s ease-out; }
dialog.sheet::backdrop { background:rgba(0,0,0,.4); }
@keyframes sheet-in { from { transform:translateX(100%); } }
@media (prefers-reduced-motion: reduce) { dialog.sheet[open] { animation:none; } }
.sheet-in { display:flex; flex-direction:column; height:100%; }
.sheet-head { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; border-bottom:1px solid var(--line); }
.sheet-head h2 { margin:0; } .sheet-head button { min-width:36px; min-height:36px; }
.sheet-body { flex:1; overflow-y:auto; padding:6px 16px 16px; }
.sheet-body fieldset { border:0; padding:0; margin:14px 0 0; min-width:0; }
.sheet-body legend, .sheet-body .field > label { font-weight:600; padding:0; margin-bottom:4px; display:block; }
.sheet-body .field { margin-top:14px; }
.sheet-body input[type=text], .sheet-body select { width:100%; padding:7px 8px; }
.checks label { display:block; padding:5px 0; font-weight:400; }
.hint { font-size:13px; margin:4px 0 0; }
.sheet-foot { border-top:1px solid var(--line); padding:8px 16px 14px; } .sheet-foot .hint { min-height:1.4em; margin:0 0 6px; }
.sheet-foot button { padding:7px 10px; }
@media (max-width: 640px) { dialog.sheet { width:100vw; border-left:0; } }
/* knowledge base (/kb): note list left, note right; on phones the list collapses above the note */
.kb { display:grid; grid-template-columns:240px minmax(0, 1fr); gap:24px; align-items:start; }
.kb-nav > summary { display:none; }
.kb-nav nav { display:block; } /* the header's `nav` flex rule must not apply to the note list */
.kb-nav, .kb-nav li { min-width:0; overflow-wrap:anywhere; }
.kb-nav h2 { font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:16px 0 4px; }
.kb-nav ul { list-style:none; margin:0; padding:0; } .kb-nav li { padding:3px 0; }
.kb-nav li a { text-decoration:none; } .kb-nav li a.on { font-weight:600; color:var(--fg); }
.kb-nav details.kb-group { margin-top:16px; } .kb-upd { font-size:12px; }
.kb-new button { padding:5px 8px; }
.kb-note { min-width:0; max-width:820px; }
.kb-head { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; justify-content:space-between; }
.kb-head button { padding:5px 12px; }
.kb-meta { font-size:14px; margin:8px 0 12px; }
.kb-text { display:block; width:100%; min-height:65vh; font:13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; background:var(--bg); color:var(--fg); border:1px solid var(--line); border-radius:6px; padding:10px; }
.md { overflow-wrap:anywhere; }
.md h1 { font-size:22px; margin:8px 0 8px; } .md h2 { font-size:18px; margin:22px 0 6px; } .md h3, .md h4, .md h5, .md h6 { font-size:15px; margin:16px 0 4px; }
.md p { margin:0 0 10px; } .md ul, .md ol { margin:0 0 10px; padding-left:22px; } .md li { margin-bottom:3px; }
.md em { color:var(--muted); }
.md code { font:13px ui-monospace, Menlo, monospace; background:color-mix(in srgb, var(--fg) 8%, transparent); padding:0 4px; border-radius:4px; }
.md hr { border:0; border-top:1px solid var(--line); margin:16px 0; }
.md table { border-collapse:collapse; margin:0 0 12px; display:block; overflow-x:auto; max-width:100%; }
.md th, .md td { border:1px solid var(--line); padding:5px 8px; text-align:left; vertical-align:top; }
@media (max-width: 640px) {
  .kb { grid-template-columns:minmax(0, 1fr); gap:10px; }
  .kb-nav { border:1px solid var(--line); border-radius:8px; padding:8px 12px; }
  .kb-nav > summary { display:list-item; font-weight:600; }
  .kb-head h1 { font-size:19px; }
  .kb-text { min-height:55vh; font-size:16px; }
}
/* screener: score cell, strong matches, score breakdown on the job page */
.grid td.num, .grid th.num { text-align:right; white-space:nowrap; }
.score { display:inline-block; min-width:2.2em; text-align:center; font-weight:700; font-size:13px; padding:1px 6px; border-radius:9px; border:1px solid currentColor; }
.score-strong { color:var(--ok); background:color-mix(in srgb, var(--ok) 14%, transparent); }
.score-possible { color:var(--warn); }
.score-low { color:var(--muted); border-color:var(--line); }
.small { font-size:12px; }
tr.strong td { background:color-mix(in srgb, var(--ok) 7%, transparent); }
.screen-box { border:1px solid var(--line); border-radius:8px; padding:10px 12px; max-width:75ch; margin:12px 0; }
.screen-box .crit { display:grid; grid-template-columns:minmax(0, 1fr) auto auto; gap:2px 12px; margin:8px 0; font-size:14px; }
.screen-box .crit .w { color:var(--muted); }
.screen-box ul { margin:4px 0 8px; padding-left:20px; }
.screen-box .fb button[aria-pressed=true] { font-weight:700; outline:2px solid var(--accent); }
.notice { border:1px solid var(--warn); color:var(--warn); border-radius:8px; padding:6px 10px; margin:0 0 12px; }
/* application box */
textarea.draft { width:100%; font:13px/1.4 ui-monospace, Menlo, monospace; margin-top:6px; }
.screen-box details { margin:8px 0; } .screen-box summary { cursor:pointer; color:var(--accent); }
.md { overflow-wrap:anywhere; } .md h2 { font-size:15px; margin:12px 0 4px; }
