/* QSHIFT interface. Tokens first; components after. No external fonts or scripts. */
:root {
  --bg: #f6f5fa; --surface: #ffffff; --sunken: #efedf6; --ink: #15122e; --muted: #5c5876; --line: #dedbea;
  --violet: #5b3de8; --violet-soft: #ebe7ff; --mint: #09654c; --mint-soft: #dcf7ee; --amber: #8f5b00; --amber-soft: #fbefd5;
  --rose: #b3263b; --rose-soft: #fbe3e7; --slate: #5c5876; --slate-soft: #e9e7f1; --focus: #6c4df6;
  --green: #0b7a4b; --green-soft: #def5e8; --amber-icon: #b87400; --glyph: #ffffff; --glow-a: rgba(108, 77, 246, .13); --glow-b: rgba(37, 217, 168, .15);
  --sans: "Inter", "Segoe UI Variable Text", "SF Pro Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100e22; --surface: #191634; --sunken: #141130; --ink: #eceaf7; --muted: #a8a4c2; --line: #302b54;
    --violet: #a796ff; --violet-soft: #2a2358; --mint: #25d9a8; --mint-soft: #0f3a34; --amber: #f0b13a; --amber-soft: #3c2f12;
    --rose: #ff8c9c; --rose-soft: #47192a; --slate: #a8a4c2; --slate-soft: #2a2648; --focus: #a796ff;
    --green: #3ddc97; --green-soft: #0f3a2a; --amber-icon: #f0b13a; --glyph: #15122e; --glow-a: rgba(124, 100, 255, .22); --glow-b: rgba(37, 217, 168, .11);
  }
}
:root[data-theme="dark"] {
  --bg: #100e22; --surface: #191634; --sunken: #141130; --ink: #eceaf7; --muted: #a8a4c2; --line: #302b54;
  --violet: #a796ff; --violet-soft: #2a2358; --mint: #25d9a8; --mint-soft: #0f3a34; --amber: #f0b13a; --amber-soft: #3c2f12;
  --rose: #ff8c9c; --rose-soft: #47192a; --slate: #a8a4c2; --slate-soft: #2a2648; --focus: #a796ff;
    --green: #3ddc97; --green-soft: #0f3a2a; --amber-icon: #f0b13a; --glyph: #15122e; --glow-a: rgba(124, 100, 255, .22); --glow-b: rgba(37, 217, 168, .11);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
/* Background: two soft glows drifting slowly. Transform-only, behind everything,
   switched off for people who ask for reduced motion. */
body::before, body::after { content: ""; position: fixed; z-index: -1; pointer-events: none; border-radius: 50%; will-change: transform; }
body::before { width: 62vmax; height: 62vmax; left: -20vmax; top: -24vmax; background: radial-gradient(closest-side, var(--glow-a), transparent 72%); animation: drift-a 46s ease-in-out infinite alternate; }
body::after { width: 54vmax; height: 54vmax; right: -18vmax; bottom: -22vmax; background: radial-gradient(closest-side, var(--glow-b), transparent 72%); animation: drift-b 58s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate3d(16vmax, 11vmax, 0) scale(1.16); } }
@keyframes drift-b { to { transform: translate3d(-13vmax, -10vmax, 0) scale(1.1); } }
a { color: var(--violet); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 680; letter-spacing: -0.03em; }
h2 { font-size: 19px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
p { margin: 0 0 .75em; max-width: 72ch; }
p, li, dd, summary { overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: .92em; word-break: break-all; }
.mono.nowrap { white-space: nowrap; word-break: normal; }
.grid2 > *, .page > *, .cols > * { min-width: 0; }
.field input[type="text"], .field select { width: 100%; max-width: 100%; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }
.noscript { padding: 24px; }

#banner:not(:empty) { background: var(--amber-soft); color: var(--amber); border-bottom: 1px solid var(--line); padding: 8px 20px; font-size: 13px; font-weight: 600; }

.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 18px; padding: 12px 24px; max-width: 960px; margin: 0 auto; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 720; letter-spacing: .04em; font-size: 17px; }
.brand svg { width: 26px; height: 26px; }
.brand .ring { fill: var(--violet); } .brand .tail { fill: var(--mint); }
nav.modules { display: flex; gap: 2px; flex-wrap: wrap; }
nav.modules a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: var(--r); font-size: 15px; font-weight: 600; }
nav.modules a:hover { color: var(--ink); background: var(--sunken); }
nav.modules a[aria-current="page"] { color: var(--ink); background: var(--violet-soft); }
.top-tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 7px 11px; gap: 6px; font-weight: 600; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button svg { width: 16px; height: 16px; fill: currentColor; }
.seg button[aria-pressed="true"] { background: var(--violet-soft); color: var(--ink); }
.seg button:hover { color: var(--ink); }
@media (max-width: 1000px) { .seg button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } .seg button { padding: 9px 12px; } }

.search { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.search input[type="text"] { flex: 1 1 320px; min-width: 0; }
input[type="text"], select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 11px; }
input[type="text"].addr, textarea.mono { font-family: var(--mono); font-size: 13.5px; }
textarea { width: 100%; min-height: 150px; resize: vertical; }
select { padding-right: 28px; }
label { font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
button, .btn { font: inherit; font-weight: 620; font-size: 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 13px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
button:hover, .btn:hover { border-color: var(--muted); }
button.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button.primary:hover { opacity: .9; }
button.quiet { border-color: transparent; background: transparent; padding: 4px 8px; color: var(--violet); }
button[disabled] { opacity: .5; cursor: not-allowed; }

.page { max-width: 960px; margin: 0 auto; padding: 32px 24px 72px; }
.hero { padding: 40px 0 16px; max-width: 760px; }
.hero p.lede { font-size: 19px; color: var(--muted); max-width: 58ch; margin: 14px 0 24px; }
.hero .search input[type="text"] { padding: 13px 14px; font-size: 15px; }
.hero .search button { padding: 12px 18px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 26px; align-items: start; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
section.block { margin: 32px 0 0; }
section.block > h2 { margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
section.block > h2 .count { font-size: 13px; font-weight: 500; color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.panel.flat { background: transparent; }
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 12.5px; font-weight: 620; color: var(--muted); background: var(--sunken); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.selectable { cursor: pointer; }
tbody tr.selectable:hover, tbody tr[aria-selected="true"] { background: var(--violet-soft); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 620; padding: 2px 9px 2px 6px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip .ring { fill: currentColor; opacity: .45; } .chip .tail { fill: currentColor; }
.chip.classical { color: var(--amber); background: var(--amber-soft); }
.chip.unknown, .chip.na { color: var(--slate); background: var(--slate-soft); }
.chip.unknown .tail { opacity: 0; }
.chip.mixed { color: var(--violet); background: var(--violet-soft); }
.chip.pq { color: var(--mint); background: var(--mint-soft); }
.chip.pq .ring { opacity: 1; }
.sev { font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.sev::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: currentColor; }
.sev.high { color: var(--rose); } .sev.attention { color: var(--amber); } .sev.notice { color: var(--violet); } .sev.info { color: var(--muted); }
.state { font-size: 12.5px; font-weight: 620; padding: 2px 8px; border-radius: 4px; background: var(--slate-soft); color: var(--slate); white-space: nowrap; }
.state.ok { background: var(--mint-soft); color: var(--mint); } .state.warn { background: var(--amber-soft); color: var(--amber); } .state.bad { background: var(--rose-soft); color: var(--rose); }

.report-head { display: grid; gap: 10px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.report-head .kind { font-size: 13px; font-weight: 620; color: var(--muted); }
.report-head .target { font-family: var(--mono); font-size: clamp(15px, 2.2vw, 21px); font-weight: 600; word-break: break-all; letter-spacing: -0.01em; }
.report-head .summary { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.report-head .summary p { margin: 0; flex: 1 1 320px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.meta b { color: var(--ink); font-weight: 600; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.drawer { position: sticky; top: 74px; max-height: calc(100vh - 96px); overflow: auto; }
.drawer h3 { margin-bottom: 8px; }
.drawer dl { margin: 12px 0 0; display: grid; gap: 10px; }
.drawer dt { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.drawer dd { margin: 2px 0 0; font-size: 13.5px; }
.drawer ul { margin: 2px 0 0; padding-left: 18px; }
.ev { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; font-size: 12.5px; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0; }
.tree ul { margin-left: 11px; padding-left: 16px; border-left: 1px solid var(--line); }
.tree li { padding: 5px 0 0; font-size: 13.5px; }
.tree .role { color: var(--muted); font-size: 12.5px; }
.callout { border-left: 3px solid var(--violet); background: var(--violet-soft); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; font-size: 14px; }
.callout.warn { border-color: var(--amber); background: var(--amber-soft); }
.callout.bad { border-color: var(--rose); background: var(--rose-soft); }
.callout p:last-child { margin-bottom: 0; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 20px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--mint); border: 2px solid var(--bg); }
.timeline li.target::before { background: var(--bg); border-color: var(--violet); }
.timeline time { font-size: 12.5px; font-weight: 650; color: var(--muted); display: block; }
.metric { font-size: 22px; font-weight: 680; letter-spacing: -0.02em; }
.metric.na { color: var(--muted); font-size: 17px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.checks li:last-child { border-bottom: 0; }
pre { background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; overflow-x: auto; font: 12.5px/1.5 var(--mono); margin: 0 0 12px; }
.examples { margin: 12px 0 0; font-size: 14px; max-width: none; }
.hero .hint { max-width: none; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 16px 14px 58px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 15px; width: 28px; height: 28px; border-radius: 50%; background: var(--violet-soft); color: var(--violet); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.steps p { margin: 5px 0 0; }
.qa { border-bottom: 1px solid var(--line); padding: 11px 0; }
.qa summary { font-weight: 620; cursor: pointer; }
.qa div { padding: 8px 0 2px; color: var(--muted); }
.qa p { margin: 0; }
.inshort { margin-top: 16px; border-left: 3px solid var(--violet); }
.inshort h2 { font-size: 15px; margin-bottom: 6px; }
.inshort ul { margin: 0; padding-left: 18px; }
.inshort li { margin: 3px 0; }
.prose > .block > p { font-size: 16px; }
.empty { color: var(--muted); padding: 14px; font-size: 14px; }

/* status symbols: colour + shape + a word, never colour alone */
.status-icon { width: 24px; height: 24px; flex: none; }
.status-icon .shape { fill: var(--slate); }
.status-icon .glyph { fill: none; stroke: var(--glyph); stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.status-icon.ok .shape { fill: var(--green); }
.status-icon.look .shape { fill: var(--amber-icon); }
.status-icon.danger .shape { fill: var(--rose); }

/* the plain answer */
.plain { max-width: none; }
.checking { display: flex; gap: 16px; align-items: center; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.checking .status-icon { width: 40px; height: 40px; animation: pulse 1.6s ease-in-out infinite; }
.checking p { margin: 2px 0 0; }
@keyframes pulse { 50% { opacity: .45; } }
.who { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; min-height: 40px; }
.who-kind { font-weight: 700; font-size: 14px; background: var(--violet-soft); color: var(--violet); padding: 3px 10px; border-radius: 999px; }
.who-addr { font-size: 15px; color: var(--muted); word-break: normal; }
.verdict { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 20px; align-items: center; padding: 24px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); }
.verdict .status-icon { width: 56px; height: 56px; }
.verdict h1 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.02em; }
.verdict p { margin: 8px 0 0; font-size: 17px; max-width: 60ch; }
.verdict .verdict-word { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: var(--muted); }
.verdict.ok { border-color: var(--green); background: var(--green-soft); } .verdict.ok .verdict-word { color: var(--green); }
.verdict.look { border-color: var(--amber-icon); background: var(--amber-soft); } .verdict.look .verdict-word { color: var(--amber); }
.verdict.danger { border-color: var(--rose); background: var(--rose-soft); } .verdict.danger .verdict-word { color: var(--rose); }
.answers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .answers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .answers { grid-template-columns: minmax(0, 1fr); } .verdict { grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding: 18px; } .verdict .status-icon { width: 40px; height: 40px; } }
/* Each tile spans three shared rows (question, answer, detail), so the answers in a row
   sit on one line however the questions wrap, with no reserved blank space. */
.answer { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; align-content: start; }
.answer .q { font-size: 14px; line-height: 1.35; font-weight: 600; color: var(--muted); }
.answer .a { display: flex; align-items: center; gap: 8px; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; margin: 8px 0; min-height: 26px; }
.answer p { margin: 0; font-size: 14px; color: var(--muted); }
.notes, .facts, .todo { list-style: none; margin: 0; padding: 0; }
.notes li, .facts li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.facts li { grid-template-columns: 24px minmax(0, 1fr); }
.notes li > div, .facts li > div { min-width: 0; }
.notes.tokens { margin-top: 12px; }
@media (max-width: 560px) { .notes li { grid-template-columns: 24px minmax(0, 1fr); } .notes li > button, .notes li > .btn { grid-column: 2; justify-self: start; } }
.readline { margin-top: 16px; }
.readline button.quiet { min-height: 0; padding: 0; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.notes strong, .facts strong { font-size: 16px; }
.notes p, .facts p { margin: 4px 0 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.notes li.danger { border-color: var(--rose); }
.notes button { flex: none; white-space: nowrap; }
.goodsigns { margin-top: 14px; } .goodsigns summary { cursor: pointer; font-weight: 600; padding: 6px 0 10px; }
.holds { font-size: 18px; font-weight: 650; }
.todo li { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; }
.todo .status-icon { width: 20px; height: 20px; margin-top: 2px; }
.tech { margin-top: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 18px; }
.tech > summary { cursor: pointer; padding: 15px 0; }
.tech[open] { padding-bottom: 18px; }
.tech .grid2 { grid-template-columns: minmax(0, 1fr); }
.tech .drawer { position: static; max-height: none; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
button, .btn, select, input[type="text"] { min-height: 40px; }
.hero .search button { min-width: 110px; justify-content: center; }
.loading { color: var(--muted); padding: 30px 0; }
.foot { max-width: 960px; margin: 0 auto; padding: 24px 24px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.foot p { max-width: 90ch; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 980px) {
  .grid2 { grid-template-columns: 1fr; }
  .drawer { position: static; max-height: none; }
  .top { position: static; }
  .top-row { gap: 8px 12px; }
  .top-row nav.modules { order: 3; flex-basis: 100%; margin: 0 -12px; }
  .top-tools { margin-left: auto; }
  .seg button { padding: 9px 10px; }
}
@media (max-width: 560px) {
  .page { padding: 20px 16px 48px; }
  .top-row { padding: 10px 16px; }
  .foot { padding: 24px 16px 40px; }
  .hero { padding-top: 22px; }
  th, td { padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 8px; }
label.check input { margin-top: 2px; }

/* tools */
.cellstat { display: inline-flex; align-items: center; gap: 8px; }
.cellstat .status-icon { width: 20px; height: 20px; }
table.compare th[scope="row"] { text-align: left; font-weight: 600; white-space: nowrap; vertical-align: top; }
table.compare td { vertical-align: top; min-width: 150px; }
ul.tight { margin: 0; padding-left: 18px; } ul.tight li { margin: 2px 0; }
textarea.addr { width: 100%; font: 14px/1.5 var(--mono); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); resize: vertical; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--slate-soft); color: var(--slate); }
.panel.flat { border-style: dashed; }
