:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --ink: #16202e;
  --ink-2: #4a5566;
  --ink-3: #7a8494;
  --line: #e2e6ec;
  --line-2: #eef1f5;
  --accent: #0b5cad;
  --accent-ink: #ffffff;
  --accent-soft: #e8f1fb;
  --good: #137a3a;
  --good-bg: #e6f5eb;
  --bad: #b3261e;
  --bad-bg: #fdecea;
  --muted-bg: #f1f3f6;
  --warn: #8a5a00;
  --warn-bg: #fff6e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; }
.nowrap { white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button { font: inherit; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 7px; background: var(--accent); position: relative;
}
.brand-mark::before {
  content: ""; position: absolute; left: 7px; top: 6px; width: 10px; height: 10px;
  border: 3px solid #fff; border-radius: 50%;
}
.brand-mark::after {
  content: ""; position: absolute; right: 5px; bottom: 5px; width: 8px; height: 3px;
  background: #66d19e; border-radius: 2px; transform: rotate(45deg);
}
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand-by { color: var(--ink-3); font-size: 13px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang button {
  border: 0; background: transparent; padding: 6px 12px; cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 13px;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }

/* ---------- intro ---------- */
.intro { padding: 36px 0 20px; max-width: 760px; }
.intro h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; letter-spacing: -.02em; }
.lead { color: var(--ink-2); font-size: 17px; margin: 0 0 14px; }
.privacy { display: flex; align-items: center; gap: 8px; color: var(--good); font-size: 14px; margin: 0; }
.privacy svg { width: 16px; height: 16px; flex: none; }

/* ---------- upload ---------- */
.upload { padding-bottom: 8px; }
.drop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.drop {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1.5px dashed #c5ccd6; border-radius: var(--radius);
  padding: 20px; cursor: pointer; min-height: 132px; transition: border-color .15s, background .15s;
}
.drop:hover, .drop:focus-visible { border-color: var(--accent); outline: none; }
.drop.dragover { border-color: var(--accent); background: var(--accent-soft); }
.drop.filled { border-style: solid; border-color: var(--line); }
.drop-step {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-weight: 700; display: grid; place-items: center;
}
.drop-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.drop-body strong { font-size: 16px; }
.hint { color: var(--ink-3); font-size: 13.5px; }
.files { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files li {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--muted-bg); border-radius: 7px; padding: 6px 8px 6px 10px; font-size: 14px;
}
.files .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .fsize { color: var(--ink-3); font-size: 12.5px; margin-left: auto; flex: none; }
.files button {
  flex: none; border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 18px; line-height: 1;
  width: 24px; height: 24px; border-radius: 5px;
}
.files button:hover { background: #e3e7ed; color: var(--bad); }

.actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.supported { color: var(--ink-3); font-size: 13px; }
.demo-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--ink-2); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 9px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: #c2c9d3; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); padding: 11px 22px; font-size: 15px; }
.btn.primary:hover { background: #094e93; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.spinner {
  display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite;
}
.btn.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.error {
  margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius);
  background: var(--bad-bg); color: var(--bad); border: 1px solid #f5c2bd; font-size: 14.5px;
}

/* ---------- results ---------- */
.results { margin-top: 28px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.eyebrow { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; color: var(--ink-3); font-weight: 700; }
.result-head h2 { margin: 2px 0 2px; font-size: 22px; letter-spacing: -.01em; }
.meta { color: var(--ink-2); font-size: 14px; }
.export { display: flex; gap: 8px; flex-wrap: wrap; }

.warn-box {
  background: var(--warn-bg); color: var(--warn); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
  font-size: 14px; border: 1px solid #f3dea6;
}
.warn-box ul { margin: 4px 0 0; padding-left: 18px; }

.cards { display: flex; flex-direction: column; gap: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.group-title {
  margin: 0 0 8px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700;
}
.group-title span { background: var(--muted-bg); border-radius: 999px; padding: 0 7px; margin-left: 4px; color: var(--ink-2); }
.card-group.incomplete .group-title { color: var(--bad); }
.card.is-incomplete { background: #fcfcfd; }
.card.is-incomplete .card-total { color: var(--ink-3); }
.card.is-excluded { opacity: .7; box-shadow: none; border-style: dashed; }
.card.is-excluded .card-total { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.card-note { margin: 0; font-size: 13px; line-height: 1.4; }
.card-note.incomplete { color: var(--bad); }
.card-note.excluded { color: var(--ink-2); }
.card-sub.estimate { color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 6px; }
.btn.small { padding: 5px 10px; font-size: 13px; align-self: flex-start; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.card.best { border-color: var(--good); box-shadow: 0 0 0 1px var(--good), var(--shadow); }
.card-top { display: flex; align-items: center; gap: 10px; }
.rank {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--muted-bg); color: var(--ink-2); font-weight: 700; font-size: 14px;
}
.card.best .rank { background: var(--good); color: #fff; }
.card-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-file { color: var(--ink-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-total { font-size: 22px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.card-sub { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.status { display: inline-flex; align-self: flex-start; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.status.ok { background: var(--good-bg); color: var(--good); }
.status.incomplete { background: var(--bad-bg); color: var(--bad); }
.card details { font-size: 13px; color: var(--warn); }
.card details summary { cursor: pointer; }
.card details ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }

.callout {
  margin-top: 12px; background: var(--accent-soft); border: 1px solid #cfe1f5; color: #0b3d73;
  border-radius: var(--radius); padding: 12px 16px; font-size: 14.5px;
}
.callout strong { font-variant-numeric: tabular-nums; }

/* ---------- severity pills (cards, check) ---------- */
.pills { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sev-pill {
  border: 0; font: inherit; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; line-height: 1.4;
}
button.sev-pill { cursor: pointer; }
button.sev-pill:hover { filter: brightness(.96); text-decoration: underline; }
.sev-pill.high { background: var(--bad-bg); color: var(--bad); }
.sev-pill.medium { background: var(--warn-bg); color: var(--warn); }
.sev-pill.info { background: var(--muted-bg); color: var(--ink-2); }
.sev-pill.none { background: var(--good-bg); color: var(--good); }
.card-sub.corrected { color: var(--ink-2); }
.card-sub.corrected .diff { color: var(--bad); font-weight: 600; }

/* ---------- bid check ---------- */
.bidcheck { margin-top: 26px; }
.check-head h3 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.check-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.check-head p { margin: 4px 0 12px; color: var(--ink-2); font-size: 14px; max-width: 820px; }
#check-list { display: flex; flex-direction: column; gap: 10px; }
.check-block {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px 16px; scroll-margin-top: 16px;
}
.check-block { border-left: 4px solid var(--good); }
.check-block.status-high { border-left-color: var(--bad); }
.check-block.status-medium { border-left-color: #e0b04a; }
.check-block header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.check-block header .cb-name { font-size: 15.5px; }
.status-badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.status-badge.high { background: var(--bad-bg); color: var(--bad); }
.status-badge.medium { background: var(--warn-bg); color: var(--warn); }
.status-badge.ok { background: var(--good-bg); color: var(--good); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 4px 6px 4px 10px; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
}
.cat-chip:hover { border-color: #c2c9d3; }
.cat-chip .count {
  min-width: 22px; text-align: center; border-radius: 999px; font-weight: 700; font-size: 12px; padding: 1px 6px;
  background: var(--muted-bg); color: var(--ink-2);
}
.cat-chip.high .count { background: var(--bad-bg); color: var(--bad); }
.cat-chip.medium .count { background: var(--warn-bg); color: var(--warn); }
.cat-chip.all { padding: 4px 10px; color: var(--ink-2); }
.cat-chip.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
.top-issue { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
.top-issue .label { font-weight: 700; color: var(--ink); }
.cat-section { margin-top: 10px; }
.cat-section h4 { margin: 0; font-size: 13.5px; }
.cat-section h4 .action { font-weight: 400; color: var(--ink-3); }
.check-block .rank { width: 24px; height: 24px; font-size: 13px; }
.findings { list-style: none; margin: 10px 0 0; padding: 0; }
.finding {
  display: grid; grid-template-columns: 74px 96px 1fr auto; gap: 10px; align-items: baseline;
  padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 14px;
}
.finding .sev-dot {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 4px;
  padding: 1px 6px; justify-self: start;
}
.finding.high .sev-dot { background: var(--bad-bg); color: var(--bad); }
.finding.medium .sev-dot { background: var(--warn-bg); color: var(--warn); }
.finding.info .sev-dot { background: var(--muted-bg); color: var(--ink-2); }
.finding .f-pos { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.finding .pos-link {
  border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline;
  text-decoration-color: #b9d1ea; text-underline-offset: 2px;
}
.finding .pos-link:hover { text-decoration-color: var(--accent); }
.finding .f-pos { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.pos-more, .link-btn {
  border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--accent); cursor: pointer;
  font-family: var(--font); text-decoration: underline; text-underline-offset: 2px;
}
.link-btn { font-size: 13px; }
.finding .whole { font-family: var(--font); font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.finding .f-text { color: var(--ink); min-width: 0; }
.finding .f-amount { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink-2); font-weight: 600; text-align: right; }
.check-block details { margin-top: 8px; font-size: 13.5px; }
.check-block details summary { cursor: pointer; color: var(--ink-2); }
.check-block details.tech ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-3); font-size: 13px; }
.check-block details.more .findings { margin-top: 4px; }

@keyframes flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 3px transparent; } }
.check-block.flash { animation: flash 1.6s ease-out; }
.cmp tr.flash td { animation: rowflash 2s ease-out; }
@keyframes rowflash { from { background: #fff3c4; } to { background: inherit; } }

.toolbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 22px 0 10px; }
.toolbar input[type="search"] {
  flex: 1 1 260px; max-width: 360px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px;
  font: inherit; background: var(--surface);
}
.check { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.select { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--ink-2); }
.select select {
  font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--ink); max-width: 240px;
}
.table-meta { font-size: 13px; color: var(--ink-3); margin: 0 0 6px; }
.legend { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.chip.cheapest { background: var(--good-bg); color: var(--good); }
.chip.missing { background: var(--bad-bg); color: var(--bad); }
.chip.declined { background: var(--muted-bg); color: var(--ink-2); }
.chip.suspicious { background: var(--warn-bg); color: var(--warn); }
.chip.flagged { background: var(--surface); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad); }

/* ---------- comparison table ---------- */
.table-wrap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: auto; max-height: 72vh; box-shadow: var(--shadow);
}
table.cmp { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 14px; }
.cmp th, .cmp td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; text-align: left; }
.cmp thead th {
  position: sticky; top: 0; z-index: 3; background: #fafbfc; border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); font-weight: 700; white-space: nowrap;
}
.cmp .sticky { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.cmp thead .sticky { z-index: 4; background: #fafbfc; }
.cmp .col-pos { font-family: var(--mono); font-size: 13px; white-space: nowrap; width: 116px; min-width: 116px; max-width: 116px; }
.cmp thead .col-pos { font-family: var(--font); font-size: 12.5px; }
.cmp .col-text { min-width: 260px; width: 280px; max-width: 280px; }
.cmp .col-text.sticky { left: 116px; box-shadow: inset -1px 0 0 var(--line); }
.cmp td.col-text[data-open-detail] { cursor: pointer; }
.cmp .pos-open {
  border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer;
  text-decoration: underline; text-decoration-color: #b9d1ea; text-underline-offset: 2px;
}
.cmp .pos-open:hover { text-decoration-color: var(--accent); }
.cmp .col-qty { min-width: 84px; }
.cmp tr.active td.sticky, .cmp tr.active td { background: #eef5fd; }
.cmp tr.active td.cell.cheapest { background: #dcefe3; }
.cmp .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cmp th.bidder { text-align: right; min-width: 150px; max-width: 220px; white-space: normal; }
.cmp th.bidder .rank-mini {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted-bg); font-size: 11px; margin-right: 4px;
}
.cmp th.bidder.best .rank-mini { background: var(--good); color: #fff; }
.cmp tr.section td { background: #f7f9fb; color: var(--ink-2); font-weight: 700; font-size: 13px; }
.cmp tr.section td.sec-label { position: sticky; left: 0; z-index: 2; white-space: nowrap; }
.cmp tr.out td { color: var(--ink-3); }
.cmp tr.out .col-text .stext { font-style: italic; }
.cmp .type-tag {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--ink-2); background: var(--muted-bg); border-radius: 4px; padding: 1px 5px; margin-left: 6px; vertical-align: 1px;
}
.cmp td.cell { text-align: right; font-variant-numeric: tabular-nums; min-width: 150px; }
.cmp td.cell .up { font-weight: 600; }
.cmp td.cell .tot { color: var(--ink-3); font-size: 12.5px; }
.cmp td.cell .delta { font-size: 12px; color: var(--ink-3); }
.cmp td.cell.cheapest { background: var(--good-bg); }
.cmp td.cell.cheapest .up { color: var(--good); }
.cmp td.cell.cheapest .delta { color: var(--good); font-weight: 600; }
.cmp td.cell.missing { background: var(--bad-bg); color: var(--bad); font-weight: 600; }
.cmp td.cell.declined { background: var(--muted-bg); color: var(--ink-2); }
.cmp td.cell.dropped { color: var(--ink-3); }
.cmp td.cell.suspicious { background: var(--warn-bg); }
.cmp td.cell.suspicious .up { color: var(--warn); text-decoration: underline wavy #d9a441; text-underline-offset: 3px; }
.cmp td.cell.suspicious .delta { color: var(--warn); font-weight: 600; }
.cmp td.cell .tot s { color: var(--ink-3); }
.cmp td.cell .tot .checked { color: var(--bad); font-weight: 600; }
.cmp td.cell.excluded { opacity: .5; }
.cmp th.bidder.excluded { color: var(--ink-3); } /* no opacity: the sticky header must stay opaque */
.cmp th.bidder.excluded em { font-weight: 400; }
.cmp td.cell { position: relative; }
.cmp td.cell.flag-high { box-shadow: inset 0 0 0 2px var(--bad); }
.cmp td.cell.flag-medium { box-shadow: inset 0 0 0 2px #e0b04a; }
.cmp td.cell .flag {
  position: absolute; left: 6px; top: 7px; width: 18px; height: 18px; border-radius: 50%; border: 0; padding: 0;
  font: 700 12px/18px var(--font); text-align: center; cursor: pointer; color: #fff;
}
.cmp td.cell .flag.high { background: var(--bad); }
.cmp td.cell .flag.medium { background: #c98a0b; }
.cmp td.cell .flag.info { background: #8e98a8; }
.cmp td.cell .detail {
  margin-top: 4px; text-align: left; font-size: 12px; color: var(--ink-2); white-space: normal; line-height: 1.35;
}
.cmp td.cell .detail span { display: block; }
.cmp td.cell .detail .comment::before { content: "💬 "; }
.cmp td.cell .detail .product::before { content: "▸ "; color: var(--ink-3); }
.hide-details .cmp td.cell .detail { display: none; }
.cmp td.spread { color: var(--ink-2); }
.cmp td.spread.high { color: var(--bad); font-weight: 600; }
.cmp tr:hover td:not(.cell) { background: #fbfcfd; }
.empty { padding: 28px; text-align: center; color: var(--ink-3); }

.footnote { color: var(--ink-3); font-size: 12.5px; margin: 10px 0 0; }
.footer { color: var(--ink-3); font-size: 13px; padding: 36px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; }
.footer a { color: var(--ink-2); }

@media (max-width: 760px) {
  .drop-grid { grid-template-columns: 1fr; }
  .finding { grid-template-columns: auto 1fr; }
  .finding .f-text { grid-column: 1 / -1; }
  .finding .f-amount { grid-column: 1 / -1; text-align: left; }
  .check-block header .pills { margin-left: 0; }
  .intro h1 { font-size: 24px; }
  .legend { margin-left: 0; }
  .cmp .col-text { min-width: 180px; }
}

/* ---------- position detail panel ---------- */
.detail-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 20;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(16, 24, 40, .12);
  display: flex; flex-direction: column;
}
.detail-panel[hidden] { display: none; }
.d-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc;
}
.d-nav { display: flex; align-items: center; gap: 6px; }
.d-step, .d-close {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  cursor: pointer; font-size: 18px; line-height: 1; color: var(--ink-2);
}
.d-step:disabled { opacity: .35; cursor: default; }
.d-close { border-color: transparent; font-size: 22px; }
.d-close:hover, .d-step:not(:disabled):hover { border-color: #c2c9d3; color: var(--ink); }
.d-of { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.d-body { overflow-y: auto; padding: 14px 18px 28px; }
.d-pos { display: flex; align-items: center; gap: 4px; }
.d-num { font-family: var(--mono); font-size: 14px; font-weight: 700; }
.d-section { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.d-body h3 { margin: 6px 0 4px; font-size: 17px; line-height: 1.3; }
.d-meta { font-size: 13px; color: var(--ink-2); }
.d-body h4 { margin: 16px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.d-long { white-space: pre-wrap; font-size: 14px; line-height: 1.5; background: var(--muted-bg); border-radius: 8px; padding: 10px 12px; }
.d-muted { color: var(--ink-3); font-size: 13.5px; margin: 0; }
.d-sup { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-top: 10px; }
.d-sup.cheapest { border-color: var(--good); }
.d-sup.excluded { opacity: .6; border-style: dashed; }
.d-sup header { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.d-sup .rank-mini {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: var(--muted-bg); font-size: 11.5px; font-weight: 700; color: var(--ink-2);
}
.d-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 6px; font-variant-numeric: tabular-nums; font-size: 14px; }
.d-price small, .d-facts small { color: var(--ink-3); font-size: 12px; margin-right: 3px; }
.d-price s { color: var(--ink-3); }
.d-tag { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--muted-bg); color: var(--ink-2); }
.d-tag.cheapest { background: var(--good-bg); color: var(--good); }
.d-tag.suspicious { background: var(--warn-bg); color: var(--warn); }
.d-tag.missing { background: var(--bad-bg); color: var(--bad); }
.d-facts, .d-notes { list-style: none; margin: 8px 0 0; padding: 0; font-size: 13.5px; }
.d-facts li { padding: 3px 0; }
.d-facts small { display: inline-block; min-width: 110px; }
.d-comment { background: #f6f8fb; border-radius: 6px; padding: 6px 8px !important; margin-top: 4px; }
.d-notes li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-top: 1px solid var(--line-2); }
.finding-mini .sev-dot {
  flex: none; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 4px; padding: 1px 5px;
}
.finding-mini.high .sev-dot { background: var(--bad-bg); color: var(--bad); }
.finding-mini.medium .sev-dot { background: var(--warn-bg); color: var(--warn); }
.finding-mini.info .sev-dot { background: var(--muted-bg); color: var(--ink-2); }

@media (min-width: 1100px) {
  /* the panel sits beside the results instead of over them */
  body.detail-open main.wrap,
  body.detail-open .topbar .wrap,
  body.detail-open .footer .wrap { margin-right: 470px; margin-left: 20px; max-width: none; }
}
@media (max-width: 760px) {
  .cmp .col-text.sticky { position: static; box-shadow: none; }
  .cmp .col-text { min-width: 180px; width: auto; max-width: none; }
  .cat-chips { margin-left: 0; }
  .select select { max-width: 200px; }
}

/* ---------- Impressum / Datenschutz ---------- */
.legal { max-width: 760px; padding-top: 32px; padding-bottom: 12px; }
.legal h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.01em; }
.legal h2 { font-size: 16px; margin: 24px 0 6px; }
.legal p { margin: 0 0 10px; color: var(--ink); line-height: 1.6; }
.legal .legal-en { color: var(--ink-3); font-size: 14px; }
.legal .legal-date { color: var(--ink-3); font-size: 13.5px; margin-top: 24px; }
.legal a { color: var(--accent); }
.card-id { min-width: 0; }

/* ---------- access codes ---------- */
.access-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
.access-row a { color: var(--accent); }
.access-row .access-ok { color: var(--good); font-weight: 600; }
.access-panel {
  margin-top: 12px; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.access-panel .access-text { margin: 4px 0 10px; font-size: 14px; color: var(--ink-2); }
.access-inputs { display: flex; gap: 8px; flex-wrap: wrap; }
.access-inputs input {
  flex: 1 1 220px; font: 15px/1.2 var(--mono); letter-spacing: .04em; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; text-transform: uppercase;
}
.access-msg { margin: 8px 0 0; color: var(--bad); font-size: 13.5px; min-height: 1em; }
.access-request { margin: 4px 0 0; font-size: 13.5px; color: var(--ink-3); }
.access-request a { color: var(--accent); }

/* split award: a theoretical lower bound, deliberately quieter than the results */
.callout.theoretical { background: var(--muted-bg); border-color: var(--line); color: var(--ink-2); font-size: 13.5px; }
.callout.theoretical strong { color: var(--ink); }
.callout-label {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}

/* ---------- about Quorvia and prices (start page, hidden while results are shown) ---------- */
.info { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.info[hidden] { display: none; }
.info h2 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.01em; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.info-block p { margin: 0 0 8px; color: var(--ink-2); }
.info-block a { color: var(--accent); }
.info-list { margin: 0; padding: 0; list-style: none; color: var(--ink-2); }
.info-list li { position: relative; padding: 2px 0 2px 22px; }
.info-list li::before {
  content: ""; position: absolute; left: 3px; top: 8px; width: 9px; height: 5px;
  border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg);
}
.pricing { margin-top: 36px; }
.pricing-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.pricing-head h2 { margin: 0; }
.price-badge {
  font-size: 12px; font-weight: 600; color: var(--accent); background: var(--accent-soft);
  padding: 2px 10px; border-radius: 999px;
}
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan-name { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.plan-price { font-size: 26px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 8px; font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.plan-text { margin: 0; color: var(--ink-2); font-size: 14px; }
.pricing-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
a.btn { text-decoration: none; }
.pricing-note { color: var(--ink-3); font-size: 13.5px; }
.pricing-note a { color: var(--accent); }

@media (max-width: 860px) {
  .info-grid, .plans { grid-template-columns: 1fr; gap: 20px; }
  .plans { gap: 12px; }
  .info { margin-top: 32px; padding-top: 24px; }
}
