/* ClearTrust Indexes. One light theme: white surfaces, strong ink, a dark navigation rail. */
:root {
  --ink: #0d1321; --ink-2: #3d4657; --ink-3: #5f6a7d; --line: #d9dee7; --line-2: #eceff4; --surface: #ffffff; --page: #f6f7f9;
  --navy: #14213d; --navy-2: #1d2d50; --accent: #1f5fc4; --accent-ink: #184f95;
  --clean: #0ca30c; --low: #fab219; --medium: #ec835a; --high: #d03b3b;
  --good: #0b7a0b; --bad: #b42323;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--ink); background: var(--page); font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
h2 { font-size: 15px; font-weight: 700; }
h3 { font-size: 13px; font-weight: 700; margin: 16px 0 8px; }
code { font: 12px var(--mono); background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
.mono { font-family: var(--mono); }
h1.mono { font-size: 21px; word-break: break-all; }
.quiet { color: var(--ink-3); }
.good { color: var(--good); } .bad { color: var(--bad); }
.strong { font-weight: 700; }

.shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: #c9d2e3; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 15px; padding: 2px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 700; }
.brand.dark { color: var(--ink); padding: 0 0 18px; }
.mark { width: 22px; height: 22px; border-radius: 5px; background: linear-gradient(90deg, #fff 0 18%, transparent 18% 41%, #fff 41% 59%, transparent 59% 82%, #3987e5 82%) no-repeat 4px 100% / 14px 60%, var(--navy-2); border: 1px solid #33456d; flex: none; }
.brand.dark .mark { background-color: var(--navy); }
.navgroup { margin-bottom: 14px; }
.navhead { font-size: 11px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: #8494b3; padding: 0 8px 5px; }
.side nav a { display: block; color: #d5dceb; padding: 5px 8px; border-radius: 6px; font-weight: 500; }
.side nav a:hover { background: var(--navy-2); text-decoration: none; color: #fff; }
.side nav a.on { background: #fff; color: var(--navy); font-weight: 700; }
.out { margin-top: auto; padding: 8px; }
.out button { background: none; border: 1px solid #3a4b73; color: #d5dceb; border-radius: 6px; padding: 5px 10px; font: inherit; cursor: pointer; width: 100%; }
.out button:hover { border-color: #fff; color: #fff; }

.main { min-width: 0; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.picks { display: flex; gap: 14px; flex-wrap: wrap; }
.pick { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink-2); font-size: 13px; }
select, input[type="search"], input[type="text"], input[type="password"] { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid #aeb7c6; border-radius: 8px; padding: 6px 9px; min-height: 34px; }
select:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.names { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.switch { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #aeb7c6; background: var(--surface); border-radius: 999px; padding: 3px 12px 3px 4px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; min-height: 30px; }
.switch .knob { width: 20px; height: 20px; border-radius: 50%; background: #8e99ab; }
.switch.on { background: var(--navy); border-color: var(--navy); color: #fff; padding: 3px 4px 3px 12px; flex-direction: row-reverse; }
.switch.on .knob { background: #fff; }
.namesbar, .partial { padding: 7px 28px; font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--line); }
.namesbar { background: var(--navy); color: #fff; }
.partial { background: #fff6dd; color: #5c4300; }

main { padding: 24px 28px 64px; max-width: 1180px; }
main.wide { max-width: 1480px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 5px; }
.h-sub { font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 6px; }
.lede { color: var(--ink-2); margin-top: 7px; max-width: 78ch; font-size: 14.5px; }
.crumb { margin-bottom: 10px; font-weight: 600; }
.crumb a::before { content: "‹ "; }
.actions, .cardacts { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid #aeb7c6; background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 13px; font: inherit; font-weight: 600; cursor: pointer; min-height: 34px; white-space: nowrap; }
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: #0b1530; }
.btn.small { padding: 3px 9px; min-height: 26px; font-size: 12.5px; border-radius: 6px; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile, .card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.tile { padding: 14px 16px; }
.tile-l { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tile-v { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2px; }
.tile-v .of { font-size: 15px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.tile-s { font-size: 12.5px; color: var(--ink-3); min-height: 18px; }
.delta { font-weight: 700; } .delta.good { color: var(--good); } .delta.bad { color: var(--bad); } .delta.flat { color: var(--ink-2); }
.card { padding: 16px 18px; margin-bottom: 14px; min-width: 0; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sub { color: var(--ink-3); font-size: 13px; margin: 3px 0 10px; }
.card > h2 + .tablewrap, .card > h2 + table, .card > h2 + .bigbar, .card > h2 + svg, .card > h2 + ul, .card > h2 + dl, .card > h2 + p { margin-top: 10px; }
.more { margin-top: 10px; font-weight: 600; font-size: 13px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.cols > .card { margin-bottom: 14px; }
.dimcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.toplist { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.toplist li { counter-increment: n; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 52px; gap: 8px; align-items: baseline; padding: 5px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.toplist li::before { content: counter(n); color: var(--ink-3); font-size: 12px; }
.toplist li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.toplist li.quiet { display: block; } .toplist li.quiet::before { content: none; }
.toplist .num { text-align: right; }

.bigbar .riskbar { width: 100%; height: 22px; display: block; }
.riskbar, .magbar { display: block; }
.r-clean { fill: var(--clean); background: var(--clean); } .r-low { fill: var(--low); background: var(--low); } .r-medium { fill: var(--medium); background: var(--medium); } .r-high { fill: var(--high); background: var(--high); }
.magbar .track { fill: var(--line-2); } .magbar .fill { fill: #2a78d6; }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0 0; padding: 0; }
.legend li { display: flex; align-items: baseline; gap: 7px; }
.legend .sw { width: 11px; height: 11px; border-radius: 3px; align-self: center; }
.legend .lg-l { color: var(--ink-2); font-weight: 600; } .legend b { font-size: 16px; } .legend .lg-n { color: var(--ink-3); font-size: 12.5px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line-2); stroke-width: 1; } .chart .tick { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .line { fill: none; stroke: #2a78d6; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: #2a78d6; stroke: var(--surface); stroke-width: 2; } .chart .dot.on { fill: var(--navy); }
.chart .pt { fill: var(--ink); font-size: 11.5px; font-weight: 700; font-family: var(--font); } .chart .hit { fill: transparent; cursor: default; }
.findings { margin: 10px 0 0; padding-left: 18px; } .findings li { margin-bottom: 7px; max-width: 86ch; }

.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.card .tablewrap { border-radius: 8px; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; }
table.data th { text-align: left; font-weight: 700; color: var(--ink-2); font-size: 12px; padding: 8px 8px; border-bottom: 1px solid var(--line); background: #f9fafb; white-space: nowrap; vertical-align: bottom; }
table.data td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #f6f8fc; }
table.data .num, table.data .nowrap { white-space: nowrap; }
table.data .num { text-align: right; }
table.data td.val { font-weight: 600; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data.tight th, table.data.tight td { padding-left: 6px; padding-right: 6px; }
table.data.tight { border: 0; }
table.data tr.cur td { background: #eef4fd; font-weight: 600; } table.data tr.off td { color: var(--ink-3); }
.th-sub { display: block; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }
.who { display: inline-block; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.lvl { font-weight: 600; white-space: nowrap; } .lvl::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; background: var(--high); }
.l-low::before { background: var(--low); } .l-medium::before { background: var(--medium); } .l-high::before { background: var(--high); }
table.heat td.heat-1 { background: #e6f0fd; } table.heat td.heat-2 { background: #cde2fb; } table.heat td.heat-3 { background: #9ec5f4; } table.heat td.heat-4 { background: #5598e7; color: #fff; } table.heat td.heat-5 { background: #184f95; color: #fff; }
table.heat tbody tr:hover td[class*="heat-"] { filter: brightness(0.96); }

.cover { display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 9px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
.cover b { color: var(--ink); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs a { padding: 8px 14px; font-weight: 600; color: var(--ink-2); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; } .tabs a.on { color: var(--ink); border-bottom-color: var(--navy); }
.filters { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.filters label { display: flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink-2); font-size: 13px; }
.filters .grow { flex: 1 1 220px; } .filters .grow input { flex: 1; min-width: 120px; }
.none, .empty { background: var(--surface); border: 1px dashed #aeb7c6; border-radius: 10px; padding: 22px; color: var(--ink-2); }
.empty h1 { margin-bottom: 8px; } .empty p { margin-bottom: 12px; }
.note { color: var(--ink-2); font-size: 13px; margin-top: 12px; max-width: 90ch; }
.flash { background: #eef4fd; border: 1px solid #b7d3f6; border-radius: 8px; padding: 9px 13px; margin-bottom: 14px; font-weight: 600; }
.toc { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-bottom: 14px; }
.toc a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.toc a:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
section[id] { scroll-margin-top: 70px; }
.method { margin: 0; } .method dt { font-weight: 700; margin-top: 12px; } .method dt:first-child { margin-top: 0; } .method dd { margin: 2px 0 0; color: var(--ink-2); max-width: 90ch; }
.collect fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.collect legend { font-weight: 700; font-size: 12.5px; padding: 0 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.collect > .check { margin: 0 16px 0 0; }
progress { width: 100%; height: 10px; margin-top: 8px; accent-color: var(--navy); }
.st { font-weight: 600; font-size: 12px; } .st-failed { color: var(--bad); } .st-empty { color: var(--ink-3); } .st-running { color: var(--accent); }
.mapform { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px 16px; align-items: center; }
.mapform label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.mapform label .mono { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mapform select { min-height: 30px; padding: 3px 7px; }

#tip { position: fixed; z-index: 20; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; padding: 6px 9px; border-radius: 6px; pointer-events: none; max-width: 340px; box-shadow: 0 4px 14px rgba(13, 19, 33, 0.25); }
.copied { border-color: var(--good) !important; color: var(--good) !important; }

body.signin { display: grid; place-items: center; min-height: 100vh; }
.signbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 28px; width: min(360px, 92vw); display: grid; gap: 14px; }
.signbox label { display: grid; gap: 6px; font-weight: 600; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 4px 14px; padding: 12px 16px; }
  .side nav { display: flex; flex-wrap: wrap; gap: 4px 14px; } .navgroup { margin: 0; } .navhead { display: none; }
  .side nav a { display: inline-block; padding: 4px 8px; } .brand { padding-bottom: 6px; width: 100%; } .out { margin: 0; padding: 0; } .out button { width: auto; }
  .bar { padding: 10px 16px; position: static; } main { padding: 18px 16px 48px; } .namesbar, .partial { padding: 7px 16px; }
  .cols { grid-template-columns: 1fr; }
}
@media print { .side, .bar, .actions, .cardacts, .toc, .filters { display: none !important; } .shell { display: block; } body { background: #fff; } .card, .tile { break-inside: avoid; } }
