:root {
  color-scheme: dark;
  --bg: #071b2d;
  --ink: #edf5f8;
  --muted: #b7cbd7;
  --gold: #efcf83;
  --cyan: #92e3ed;
  --line: #345269;
  --panel: #102d43;
  font: 16px/1.6 "Segoe UI", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 86% 9%, #193c52, transparent 34rem), var(--bg); color: var(--ink); }
a { color: var(--cyan); text-underline-offset: .24em; }
a:hover { color: var(--gold); }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.skip { position: absolute; z-index: 1; background: var(--bg); padding: 12px; transform: translateY(-120%); }
.skip:focus { transform: none; }
.wrap { width: min(100% - 64px, 1232px); margin-inline: auto; }
.mast { border-bottom: 1px solid #7998a940; }
.mast-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; }
.mast img { display: block; object-fit: contain; object-position: left center; }
.mast nav, .scenarios, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 23px; }
.mast nav a { text-decoration: none; font-weight: 650; color: var(--ink); }
.hero { padding: clamp(42px, 6vw, 88px) 0 46px; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: .76rem; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 10px; }
h1, h2, h3 { margin: 0; line-height: 1.12; color: var(--ink); }
h1 { font-size: clamp(2.35rem, 6.7vw, 6.4rem); letter-spacing: -.065em; font-weight: 680; }
h1 em { font-style: normal; color: var(--gold); }
h2 { font-size: clamp(1.7rem, 4vw, 3.2rem); letter-spacing: -.044em; }
h3 { font-size: clamp(1.18rem, 2.5vw, 1.8rem); letter-spacing: -.023em; }
p { color: var(--muted); margin: 10px 0 18px; }
.intro { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 57ch; margin: 19px 0 26px; }
.form { max-width: 740px; }
.form label { display: block; margin-bottom: 7px; font-weight: 650; }
.form-row { display: flex; gap: 10px; }
input { width: 100%; min-width: 0; background: #061827; color: var(--ink); padding: 12px 16px; border: 1px solid #5f7c8e; border-radius: 8px; }
button, .actions a { cursor: pointer; border: 1px solid var(--gold); border-radius: 8px; padding: 11px 16px; color: #0c2130; background: var(--gold); font-weight: 730; text-decoration: none; white-space: nowrap; }
button:hover { background: #ffe6aa; }
button span { margin-left: .5em; }
small { color: var(--muted); }
.form small { display: block; margin-top: 8px; }
#error { color: #ffd1cf; }
.scenarios { margin-top: 22px; gap: 8px; }
.scenarios a { color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 6px; font-size: .82rem; text-decoration: none; }
.scenarios a[aria-current], .scenarios a:hover { color: var(--gold); border-color: var(--gold); }
.section { border-top: 1px solid var(--line); padding: 28px 0 44px; }
.section-head { display: flex; justify-content: space-between; margin-bottom: 22px; }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.card { border: 1px solid var(--line); border-radius: 13px; padding: clamp(16px, 2.8vw, 30px); background: var(--panel); }
.report-card { border-color: #9c895a; }
.statuses { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.statuses div { display: grid; grid-template-rows: auto 1fr; gap: 6px; padding: 8px 0; border-top: 1px solid var(--line); }
.statuses dt { font-size: .76rem; line-height: 1.25; color: var(--muted); overflow-wrap: anywhere; }
.statuses dd { grid-row: 1; margin: 0; font-size: 1.4rem; font-weight: 740; background: none; padding: 0; }
.state { padding: 1px 8px; border-radius: 5px; background: #061827; font-size: .8rem; white-space: normal; }
.state.ok { color: #9be7bf; }
.state.weak { color: #f3d288; }
.state.missing { color: #ffc0bc; }
.state.unknown { color: #adcce6; }
.state.na { color: #c9cdd5; }
.big-score { display: block; color: var(--gold); font-size: clamp(2rem, 5vw, 4rem); font-weight: 710; line-height: 1; letter-spacing: -.055em; }
.meter { height: 7px; background: #061827; border-radius: 20px; margin-top: 12px; overflow: hidden; }
.fill { display: block; width: 0; height: 100%; background: var(--cyan); border-radius: inherit; transition: width 350ms ease; }
.jump { font-weight: 680; }
.rules, .group-list, .sources { padding: 0; list-style: none; margin: 21px 0 0; }
.rules li, .sources li { border-top: 1px solid var(--line); padding: 14px 0; overflow-wrap: anywhere; }
.rules p, .sources p { margin: 5px 0; }
.rule-title, .sources li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.sources p, .sources small { flex: 0 0 100%; margin: 0; }
.actions { margin-top: 25px; gap: 8px; }
.actions a { background: none; color: var(--gold); }
.actions a:hover { background: #0b2740; }
.overview { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.overview p:last-child { grid-column: 1 / -1; margin: 0; }
.report-hero h1 { font-size: clamp(2.3rem, 6vw, 5rem); }
.group-list li { display: grid; grid-template-columns: 1.1fr .8fr .9fr 1fr; gap: 10px; align-items: baseline; border-top: 1px solid var(--line); padding: 12px 0; }
.group-list h3 { font-size: 1.08rem; }
.group-list span { color: var(--muted); }
.group-list b { color: var(--ink); }
.facts > div { display: grid; grid-template-columns: 1fr 2fr; border-top: 1px solid var(--line); padding: 8px 0; gap: 8px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.facts small { margin-left: 6px; }
.report li { margin-bottom: 4px; }
.footer { padding: 16px 0 24px; color: var(--muted); border-top: 1px solid var(--line); font-size: .84rem; }
@media (max-width: 880px) { .wrap { width: calc(100% - 40px); } }
@media (max-width: 660px) {
  .mast-inner { min-height: 66px; gap: 10px; }
  .mast img { width: 122px; height: auto; }
  .mast nav { gap: 4px 14px; justify-content: flex-end; font-size: .85rem; }
  .pair, .facts > div, .form-row { display: grid; grid-template-columns: minmax(0, 1fr); }
  .group-list li { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-list h3, .group-list small { grid-column: 1 / -1; }
  .section { padding-bottom: 31px; }
}
@media (max-width: 470px) { .statuses { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print {
  :root { color-scheme: light; --bg: #fff; --ink: #11253a; --muted: #314b60; --gold: #79550b; --cyan: #154e64; --line: #baccd7; --panel: #f3f6f7; font-size: 10pt; line-height: 1.4; }
  body { background: #fff; }
  .mast { background: #071b2d; print-color-adjust: exact; }
  .wrap { width: 100%; }
  .mast-inner { min-height: 48px; padding-inline: 8px; }
  .actions, .mast nav, .skip { display: none; }
  .hero { padding-block: 14px; }
  .report-hero h1 { font-size: 30pt; }
  .report-hero br { display: none; }
  .report-hero h1 em::before { content: " "; }
  .intro, p { margin: 6px 0; }
  h2 { font-size: 18pt; }
  .section { padding: 11px 0; }
  .overview { padding: 11px; gap: 9px; margin-top: 9px; }
  .big-score { font-size: 26pt; }
  .meter, .rules, .group-list, .sources, .facts { margin-top: 7px; }
  .group-list li, .rules li, .sources li, .facts > div { padding: 5px 0; }
  .group-list h3 { font-size: 10pt; }
  .report li, .rules p, .sources p { margin: 0; }
  .footer { padding: 7px 0; }
  .state { background: #f3f6f7; color: #1c344b !important; }
  .group-list li, .rules li, .sources li, .facts > div { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
}


.profile { display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.profile li { padding: 16px 18px; background: var(--panel, #102e44); border: 1px solid var(--border, #34566d); border-radius: 12px; }
.profile pre, .knowledge-text { margin: 10px 0 6px; padding: 12px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: rgb(7 27 45 / .6); border-radius: 8px; user-select: all; }
.profile .copy-field { margin-left: auto; padding: 6px 14px; font-size: .85rem; }
.profile .rule-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media print {
  .copy-field, #copy-profile { display: none; }
  .profile li { break-inside: avoid; }
  .profile pre, .knowledge-text { color: #142c40; background: #e8eff4; }
}
.profile-warning { margin: 8px 0 0; padding: 10px 12px; color: #fff3cf; background: rgb(239 207 131 / .12); border: 1px solid var(--gold, #efcf83); border-radius: 8px; }
