/* digital rapids' look, taken from digitalrapids.de: near-black ground, gold kicker, heavy
   white headline, magenta pill button, Noto Sans. Fonts are served from here, not from
   Google, so no visitor address goes to a third party. */
@font-face { font-family: 'Noto Sans'; font-weight: 300; font-display: swap; src: url('fonts/noto-sans-300.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans'; font-weight: 600; font-display: swap; src: url('fonts/noto-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Noto Sans'; font-weight: 900; font-display: swap; src: url('fonts/noto-sans-900.woff2') format('woff2'); }

:root {
  --ground: #0b0d12;
  --surface: #151820;
  --line: #2b303b;
  --text: #ffffff;
  --text-2: #c9ccd3;
  --text-3: #9599a3;
  --gold: #c2a56b;
  /* digital rapids' magenta is #f50056; white text on it reaches 4.2:1, on this 4.9:1. */
  --magenta: #e0004e;
  /* Chart pair, validated for colour-blind separation on the dark surface. */
  --own: #f50056;
  --group: #25a9a7;
  --rest: #4a505d;
}

* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0;
  background: linear-gradient(180deg, #0e0f12 0%, #070b18 100%) fixed;
  color: var(--text);
  font: 300 1.0625rem/1.6 'Noto Sans', system-ui, sans-serif;
}
a { color: inherit; text-underline-offset: 0.2em; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
main:focus { outline: none; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.5rem clamp(1rem, 4vw, 3rem);
  background: #111111;
}
.top img { display: block; height: 56px; width: auto; }
.top-title { color: var(--text-2); font-weight: 600; }
.top-right { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 0.5rem 1rem; }
.lang { padding: 0.375rem 1rem; font-size: 0.9375rem; }

main, .sources { max-width: 52rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
main { padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: 3rem; }

.kicker { margin: 0 0 0.5rem; color: var(--gold); font-weight: 900; font-size: 1.125rem; text-transform: uppercase; line-height: 1.2; }
h1, h2, legend, .legend { hyphens: auto; overflow-wrap: break-word; }
h1 { margin: 0 0 1rem; font-weight: 900; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { margin: 0 0 0.75rem; font-weight: 900; font-size: 1.5rem; line-height: 1.2; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.25rem; color: var(--text-2); max-width: 40rem; }
.muted { color: var(--text-3); font-size: 0.9375rem; }

.facts { margin: 1.5rem 0 2rem; padding: 0; list-style: none; display: grid; gap: 0.5rem; }
.facts li { padding-left: 1.5rem; position: relative; }
.facts li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 0.875rem; height: 2px; background: var(--gold); }

button, a.primary { font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 0.75rem 1.75rem; border: 1px solid transparent; text-decoration: none; display: inline-block; }
.primary { background: var(--magenta); color: #fff; }
.primary:hover { background: #c80045; }
.secondary { background: transparent; color: var(--text); border-color: #5a606d; }
.secondary:hover { border-color: var(--text); }
.nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }

.progress { margin-bottom: 2.5rem; }
.progress p { margin: 0 0 0.5rem; color: var(--text-3); font-size: 0.9375rem; }
.track { height: 4px; background: var(--line); border-radius: 2px; }
.fill { height: 100%; background: var(--gold); border-radius: 2px; }

.question, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1.5rem; margin: 0 0 1rem; min-width: 0; }
.card { padding: clamp(1.25rem, 3vw, 2rem); margin-bottom: 1.5rem; }
.card .question { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 1.25rem 0 0; }
/* float takes the legend off the fieldset's border and into the box */
legend { float: left; width: 100%; }
legend + * { clear: both; }
legend, .legend { display: block; padding: 0; font-weight: 600; font-size: 1.1875rem; line-height: 1.35; }
.help { margin: 0; padding-top: 0.375rem; color: var(--text-3); font-size: 0.9375rem; }
.options { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.list .options { flex-direction: column; }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.option span { display: block; padding: 0.625rem 1.125rem; border: 1px solid #5a606d; border-radius: 999px; }
.list .option span { border-radius: 10px; padding-left: 2.75rem; }
.list .option span::before { content: ''; position: absolute; left: 1rem; top: 50%; width: 1rem; height: 1rem; margin-top: -0.5rem; border: 1px solid #8a8f9a; border-radius: 3px; }
.option input:hover + span { border-color: var(--text); }
.option input:checked + span { background: var(--gold); border-color: var(--gold); color: #111; font-weight: 600; }
.list .option input:checked + span::before { background: #111; border-color: #111; box-shadow: inset 0 0 0 3px var(--gold); }
.option input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
select { font: inherit; color: var(--text); background: var(--ground); border: 1px solid #5a606d; border-radius: 10px; padding: 0.625rem 0.875rem; margin-top: 1rem; max-width: 100%; }
.error { margin: 1rem 0 0; color: #ff8fb3; font-weight: 600; }

.result .hero { margin-bottom: 2rem; }
.result .hero h1 { font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem); }

.stack { display: flex; gap: 2px; height: 16px; margin: 1.25rem 0 0.75rem; }
.seg { background: var(--rest); min-width: 2px; border-radius: 2px; }
.seg.own { background: var(--own); }
.levels ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.levels li { display: grid; grid-template-columns: 1rem 1fr auto; gap: 0.625rem; align-items: center; padding: 0.25rem 0; color: var(--text-2); }
.levels li.own { color: var(--text); }
.swatch { width: 0.75rem; height: 0.75rem; border-radius: 2px; background: var(--rest); }
.own .swatch { background: var(--own); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.areas { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; align-items: center; margin-bottom: 1rem; }
.radar { display: block; width: 100%; height: auto; overflow: visible; }
.ring { fill: none; stroke: var(--line); stroke-width: 1; }
.axis-label { fill: var(--text-2); font-size: 13px; font-weight: 600; }
.group-area { fill: none; stroke: var(--group); stroke-width: 2; stroke-linejoin: round; }
.own-area { fill: var(--own); fill-opacity: 0.14; stroke: var(--own); stroke-width: 2; stroke-linejoin: round; }
.group-dot { fill: var(--group); stroke: var(--surface); stroke-width: 2; }
.own-dot { fill: var(--own); stroke: var(--surface); stroke-width: 2; }
.hit { fill: transparent; cursor: default; outline-offset: -4px; }
.keys { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: center; margin: 0.5rem 0 0; padding: 0; color: var(--text-2); font-size: 0.9375rem; font-weight: 300; }
.keys li { display: flex; align-items: center; gap: 0.5rem; }
.rings { margin: 0.5rem 0 0; text-align: center; }
.key { width: 1.25rem; height: 0; border-top: 2px solid; position: relative; }
.key::after { content: ''; position: absolute; left: 50%; top: -1px; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: currentColor; }
.key.own { color: var(--own); }
.key.group { color: var(--group); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
th { text-align: left; font-weight: 600; color: var(--text-3); }
th, td { padding: 0.5rem 0.25rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th.num, td.num { padding-left: 0.75rem; }

.criteria { list-style: none; margin: 0; padding: 0; }
.criteria li { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.criteria li > :last-child { margin-bottom: 0; }
.criteria .name { margin: 0 0 0.375rem; font-weight: 600; font-size: 1.1875rem; }
.criteria .met .name { font-size: 1.0625rem; }
.criteria .met { padding: 0.875rem 0; }
.mark { color: var(--gold); font-weight: 900; }
.share { color: var(--text-2); font-size: 0.9375rem; }
.dots { display: inline-flex; gap: 3px; vertical-align: -1px; margin-right: 0.375rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rest); }
.dot.on { background: var(--group); }

.reading .label { margin: 0 0 0.25rem; color: var(--gold); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; }
.reading ul { margin: 0; padding-left: 1.125rem; }
.reading li { border: 0; padding: 0.125rem 0; }

.contact { border-color: var(--gold); }
.contact .primary { margin-bottom: 1rem; }

.sources { padding-top: 2rem; padding-bottom: 3rem; border-top: 1px solid var(--line); color: var(--text-3); font-size: 0.875rem; }
.sources p { margin-bottom: 0.75rem; }

.tip { position: absolute; z-index: 10; max-width: 18rem; padding: 0.5rem 0.75rem; border-radius: 8px; background: #fff; color: #111; font-size: 0.875rem; line-height: 1.4; font-weight: 600; pointer-events: none; box-shadow: 0 4px 16px rgb(0 0 0 / 0.4); }

@media (max-width: 640px) {
  .areas { grid-template-columns: minmax(0, 1fr); }
  .top-title { display: none; }
  .nav > * { flex: 1 1 auto; text-align: center; }
}

@media print {
  html, body { background: #fff; color: #111; }
  :root { --surface: #fff; --line: #ccc; --text: #111; --text-2: #333; --text-3: #555; --rest: #bbb; }
  .top { background: #111; print-color-adjust: exact; }
  .nav, .contact, #security, .tip, .lang { display: none; }
  .card { break-inside: avoid; }
  a { text-decoration: none; }
}
