/* Look an tillnovotny.de angelehnt: Korpus Grotesk, helles Grau, schwarze Pillen-Buttons, Blau als Akzent.
   Die Schrift wird von tillnovotny.de geladen (greift dort bzw. sobald der Server CORS erlaubt), sonst Fallback. */
@font-face { font-family: 'Korpus Grotesk'; font-weight: 400; font-display: swap;
  src: local('Korpus Grotesk'), url('https://tillnovotny.de/wp-content/uploads/2022/03/KorpusGrotesk-A.woff2') format('woff2'); }
@font-face { font-family: 'Korpus Grotesk'; font-weight: 600; font-display: swap;
  src: local('Korpus Grotesk SemiBold'), url('https://tillnovotny.de/wp-content/uploads/2022/03/KorpusGrotesk-D.woff2') format('woff2'); }

:root {
  --bg: #f9f9f9;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #69727d;
  --line: #e3e3e3;
  --accent: #5a80ef;
  --accent-ink: #3a5fd0;
  --accent-2: #eaf0fe;
  --btn-bg: #000000;
  --btn-fg: #ffffff;
  --inferred: #e3eefc;
  --estimated: #fdf1d8;
  --ok: #217a4b;
  --warn: #a35a00;
  --shadow: 0 2px 4px rgba(0, 0, 0, .08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121212;
    --surface: #1c1c1c;
    --text: #f2f2f0;
    --muted: #a0a8b2;
    --line: #333333;
    --accent: #7f9cf5;
    --accent-ink: #9db3f8;
    --accent-2: #1f2a4a;
    --btn-bg: #f2f2f0;
    --btn-fg: #000000;
    --inferred: #1f3150;
    --estimated: #46381b;
    --ok: #5cc98d;
    --warn: #e7a54b;
    --shadow: 0 2px 4px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --bg: #121212; --surface: #1c1c1c; --text: #f2f2f0; --muted: #a0a8b2; --line: #333333;
  --accent: #7f9cf5; --accent-ink: #9db3f8; --accent-2: #1f2a4a; --btn-bg: #f2f2f0; --btn-fg: #000000;
  --inferred: #1f3150; --estimated: #46381b; --ok: #5cc98d; --warn: #e7a54b; --shadow: 0 2px 4px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 "Korpus Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  accent-color: var(--accent);
}
strong, b, th { font-weight: 600; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }
.top { position: relative; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); padding: 18px 0 14px; margin-bottom: 24px;
  background-image: radial-gradient(ellipse 90px 70px at 100% 100%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 75%),
                    radial-gradient(ellipse 60px 50px at 0 100%, color-mix(in srgb, var(--accent) 20%, transparent), transparent 75%); }
.top .wrap { position: relative; }
h1 { margin: 6px 0 0; font-size: 2.1rem; font-weight: 400; line-height: 1.15; }
.brandbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
a.wordmark { color: var(--text); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .95rem; text-decoration: none; }
a.brand { display: inline-block; border: 1px solid var(--text); border-radius: 999px; padding: 5px 14px; color: var(--text); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
a.brand:hover { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
a.brand-foot { display: inline-block; background: var(--btn-bg); color: var(--btn-fg); border-radius: 999px; padding: 10px 22px; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
a.brand-foot:hover { background: var(--accent); color: #fff; }
.sub { margin: 6px 0 14px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; flex-wrap: wrap; counter-reset: s; }
.steps li { counter-increment: s; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); }
.steps li::before { content: counter(s) ". "; }
.steps li.active { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
.steps li.done { color: var(--text); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin-bottom: 16px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
@media (max-width: 600px) { .choice { grid-template-columns: 1fr; } }
.opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-2); }
.opt small { color: var(--muted); }
.field { display: block; margin: 12px 0; font-weight: 600; font-size: .9rem; }
.field input { font-family: inherit; }
.field input { display: block; width: 100%; max-width: 420px; margin-top: 4px; font-weight: 400; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; font-size: .9rem; }

input[type=text], input[type=number], textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 12px;
}
input:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
textarea { width: 100%; resize: vertical; }

button {
  font: inherit; cursor: pointer; border-radius: 999px; padding: 9px 20px;
  border: 1px solid var(--text); background: var(--surface); color: var(--text);
  font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
button:hover { border-color: var(--accent); color: var(--accent-ink); }
button.primary { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-fg); }
button.primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
button:disabled { opacity: .5; cursor: default; }
button.link, label.link { background: none; border: 0; color: var(--text); padding: 4px 8px; font-size: .78rem; font-weight: 400; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
button.link:hover, label.link:hover { color: var(--accent-ink); background: none; }
.actions { display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; margin-top: 16px; }

.items { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin-top: 12px; }
@media (max-width: 600px) { .items { grid-template-columns: 1fr; } }
.item-row { display: flex; align-items: center; gap: 8px; }
.item-row .ltr { width: 22px; font-weight: 600; color: var(--accent-ink); text-align: right; }
.item-row input { flex: 1; min-width: 0; }
.paste { margin: 8px 0; }
.paste summary { cursor: pointer; color: var(--accent-ink); font-size: .9rem; }
.paste textarea { margin: 8px 0; }

.progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.q-title { text-align: center; margin: 16px 0 4px; font-size: 1.3rem; }
.duel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: stretch; margin: 16px 0; }
.duel .vs { align-self: center; color: var(--muted); font-weight: 700; }
.pick {
  padding: 22px 12px; font-size: 1.1rem; border-width: 2px; border-radius: 14px; min-height: 90px; text-transform: none; letter-spacing: 0; font-weight: 400;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; word-break: break-word;
}
.pick .ltr { font-weight: 600; color: var(--accent-ink); font-size: .95rem; }
.pick:hover { background: var(--accent-2); color: var(--text); }
.pick kbd { font-size: .75rem; color: var(--muted); }
.gduel { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.gcol { display: flex; flex-direction: column; gap: 8px; }
.gitem { flex: 1; min-height: 84px; border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px; text-align: center; font-size: 1.1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; word-break: break-word; }
.gitem .ltr { font-weight: 600; color: var(--accent-ink); font-size: .95rem; }
.gbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gpick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 4px; border-width: 2px; border-radius: 16px; font-size: .95rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.gpick:hover { background: var(--accent-2); color: var(--text); }
.gpick kbd { font-size: .75rem; color: var(--muted); }
.gpick.s3 { border-color: var(--accent); font-weight: 600; }
.gpick.s2 { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.gpick.s1 { border-color: var(--line); }
@media (max-width: 520px) { .gduel { grid-template-columns: 1fr; } .gpick { font-size: .85rem; } }
.vote { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 14px 10px; text-align: center; word-break: break-word; }
.vote .ltr { font-weight: 600; color: var(--accent-ink); }
.vote input { width: 100px; text-align: center; font-size: 1.2rem; }
.hint { text-align: center; font-size: .875rem; color: var(--muted); }
.err { color: var(--warn); text-align: center; font-size: .9rem; min-height: 1.3em; }
.center { text-align: center; }
@media (max-width: 520px) {
  .duel { grid-template-columns: 1fr; }
  .duel .vs { text-align: center; }
}

.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.result-head .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.checkbox { margin-top: 12px; font-size: .9rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.checkbox .kpi { background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.checkbox .kpi b { display: block; font-size: 1.4rem; font-weight: 400; }
.checkbox .kpi b.mode { font-size: 1rem; }
#scale svg .lbg { fill: var(--surface); }
.checkbox .status { grid-column: 1 / -1; font-weight: 600; }
.status.ok { color: var(--ok); } .status.warn { color: var(--warn); }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; font-size: .875rem; }
.rank { width: 100%; }
.rank th, .rank td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.rank td.num, .rank th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank td.kw { white-space: normal; min-width: 120px; }
.rank .bar { height: 12px; background: var(--accent); border-radius: 2px; }
.rank td.barcell { width: 35%; min-width: 120px; }
.matrix th, .matrix td { border: 1px solid var(--line); padding: 4px 6px; text-align: center; font-variant-numeric: tabular-nums; min-width: 30px; }
.matrix th.rowh { text-align: left; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.matrix td.diag { background: var(--line); }
.matrix td.inferred { background: var(--inferred); }
.matrix td.estimated { background: var(--estimated); }
.matrix td.sum { font-weight: 700; }
.swatch { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--line); vertical-align: -2px; margin: 0 4px 0 10px; }
#scale svg text { fill: var(--text); font-size: 12px; font-family: inherit; }
#scale svg .axis { stroke: var(--muted); }
#scale svg .tick { fill: var(--muted); font-size: 11px; }
#scale svg .lead { stroke: var(--line); }
#scale svg .dot { fill: var(--accent); }
#scale svg .gap { fill: var(--muted); font-size: 10px; }

.foot { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; padding: 8px 0 40px; }
.foot a.brand-foot { margin-right: 12px; }
