:root {
  color-scheme: light;
  --paper: #f6f7f8;
  --sheet: #ffffff;
  --ink: #1d1f23;
  --muted: #737780;
  --rule: #e6e8eb;
  --soft: #f1f2f4;
  --main: #2563eb;
  --rot: #93a4bd;
  --norm: #c8ccd2;
  --fade: #c6a974;
  --up: #d14343;
  --down: #27845e;
  --warn: #a56a00;
  --sidebar: #fbfbfc;
  --control: #ffffff;
  --row-hover: #fafbfc;
  --accent-soft: #e9efff;
  --accent-ink: #1748b4;
  --danger-soft: #fff7f7;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100vh; }
aside {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  padding: 24px 16px; background: var(--sidebar); border-right: 1px solid var(--rule);
}
.brand { margin: 0 8px 28px; }
.brand b { display: block; font-size: 15px; font-weight: 650; letter-spacing: -.01em; }
.brand span { display: none; }
nav { display: grid; gap: 2px; }
nav button {
  width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); text-align: left; cursor: pointer;
  font-size: 13px; transition: background-color .12s ease, color .12s ease;
}
nav button:hover { background: var(--soft); color: var(--ink); }
nav button.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
nav button[data-view="flags"] { margin-top: 16px; border-top: 1px solid var(--rule); border-radius: 0 0 6px 6px; padding-top: 16px; }
.navhead { display: none; }
:focus-visible { outline: 2px solid var(--main); outline-offset: 2px; }
.workspace { min-width: 0; background: var(--sheet); }
.top {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  min-height: 56px; padding: 10px 40px; background: color-mix(in srgb, var(--sheet) 92%, transparent); border-bottom: 1px solid var(--rule); backdrop-filter: blur(12px);
}
.top h1 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.top p { display: none; }
.top .meta { display: flex; align-items: center; gap: 10px; }
.sample { color: var(--warn); border: 1px solid #e2c98c; border-radius: 5px; padding: 2px 7px; font-size: 11px; white-space: nowrap; }
.top select { width: auto; min-width: 104px; padding: 5px 24px 5px 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--control); color: var(--muted); font-size: 12px; }
main { width: min(1180px, 100%); padding: 36px 40px 72px; }
.card { margin: 0 0 42px; }
.card.error { color: var(--up); }
h2 { margin: 0 0 14px; font-size: 19px; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; }
h3 { margin: 0 0 5px; font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 8px; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pill, .state, .tier {
  display: inline-flex; align-items: center; min-height: 22px; padding: 2px 7px;
  border: 1px solid var(--rule); border-radius: 999px; color: var(--muted); font-size: 11px; line-height: 1.2; white-space: nowrap;
}
.state.live { color: var(--down); border-color: #a9d4c1; background: #f3fbf7; }
.state.partial, .state.sample { color: var(--warn); border-color: #e3cd96; background: #fffaf0; }
.state.blocked { color: var(--up); border-color: #e6b0b0; background: var(--danger-soft); }
.tier.none { color: var(--down); border-color: #a9d4c1; }
.tier.yellow { color: #8c7420; border-color: #ddca86; }
.tier.orange { color: #a35e1e; border-color: #e0b07d; }
.tier.red { color: var(--up); border-color: #e6b0b0; }
.up { color: var(--up); } .down { color: var(--down); }
.ok { color: var(--down); } .warn { color: var(--warn); } .error { color: var(--up); }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin: 6px 0; } ul.plain li.muted { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th { padding: 0 12px 9px 0; border-bottom: 1px solid var(--ink); color: var(--muted); text-align: left; font-size: 11px; font-weight: 500; white-space: nowrap; }
td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
tbody tr:hover td { background: var(--row-hover); }
td.num, th.num { text-align: right; }
tr.dim td { color: var(--muted); }
.tk { font-weight: 650; letter-spacing: .01em; }
.sub { display: block; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.scroll { overflow-x: auto; }
details.ev { margin-top: 6px; }
details.ev summary, details.why summary { width: fit-content; cursor: pointer; color: var(--muted); font-size: 12px; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details.ev summary::before, details.why summary::before { content: "+ "; }
details[open].ev summary::before, details[open].why summary::before { content: "− "; }
details.ev .box { max-width: 64em; margin: 8px 0 2px; border-left: 2px solid var(--rule); padding: 2px 0 2px 12px; font-size: 12px; line-height: 1.7; }
details.ev .box > div { margin-bottom: 7px; } details.ev .hit b::before { content: "● "; color: var(--ink); } details.ev .miss { color: var(--muted); } details.ev .miss b::before { content: "○ "; }
form.stack { display: grid; gap: 13px; max-width: 640px; }
label.f { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
input, textarea, select { width: 100%; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 7px; background: var(--control); color: var(--ink); font-size: 14px; }
input::placeholder, textarea::placeholder { color: #a3a7ae; }
input:focus, textarea:focus, select:focus { border-color: #7fa1ed; outline: 3px solid #e9efff; }
button.go { justify-self: start; padding: 8px 14px; border: 1px solid var(--ink); border-radius: 7px; background: var(--ink); color: #fff; cursor: pointer; font-size: 13px; font-weight: 600; white-space: nowrap; }
button.go:hover { background: #34373d; } button.go.quiet { border-color: var(--rule); background: var(--control); color: var(--ink); }
button.linkish { padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
button.linkish:hover { text-decoration-color: var(--ink); } button.linkish.tk { font-weight: 650; }
button:disabled { opacity: .55; cursor: wait; }
a { color: #1748b4; text-underline-offset: 3px; }
.lead { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; padding-bottom: 24px; border-bottom: 1px solid var(--ink); margin-bottom: 38px; }
.lead .date, .lead .lede, .lead .pill { display: none; }
.lead h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.trio { display: grid; grid-template-columns: repeat(3, auto); margin: 0; }
.trio div { padding: 0 18px; border-left: 1px solid var(--rule); }
.trio dt { color: var(--muted); font-size: 11px; } .trio dd { margin: 2px 0 0; font-size: 18px; font-weight: 650; white-space: nowrap; } .trio dd small { margin-left: 4px; color: var(--muted); font-size: 12px; font-weight: 400; }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px; }
.dot.L0 { background: var(--down); } .dot.L1 { background: #d9c27a; } .dot.L2 { background: #c98a3e; } .dot.L3 { background: var(--up); }
.alarm { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding: 11px 14px; border: 1px solid #e6b0b0; border-radius: 8px; background: var(--danger-soft); color: var(--up); }
.alarm button { padding: 6px 12px; border: 0; border-radius: 6px; background: var(--up); color: #fff; cursor: pointer; font: inherit; }
.sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 5px; flex-wrap: wrap; }
.sec-head h2 { margin: 0; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; }
.legend i { display: inline-block; width: 9px; height: 9px; margin-right: 4px; border-radius: 2px; vertical-align: -1px; }
.ribbon { display: grid; grid-template-columns: 96px minmax(0, 1fr) 220px; column-gap: 16px; margin-top: 16px; }
.ribbon .r { display: contents; } .rname { align-self: center; padding: 6px 0; cursor: pointer; font-weight: 650; } .rname.on { text-decoration: underline; text-underline-offset: 4px; } .rname .sub { font-weight: 400; }
.bars { position: relative; display: flex; align-items: flex-end; gap: 1px; height: 44px; margin: 6px 0; border-bottom: 1px solid var(--rule); }
.bars b { display: block; flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; } .bars b:hover { outline: 1px solid var(--ink); } .bars b.after { opacity: .25; }
.bars b.mainline { background: var(--main); } .bars b.rotation { background: var(--rot); } .bars b.normal { background: var(--norm); } .bars b.fading { background: var(--fade); } .bars b.insufficient_data { background: var(--soft); } .bars .today { position: absolute; top: -6px; bottom: -6px; width: 0; border-right: 1px dashed var(--ink); }
.rnow { align-self: center; display: grid; grid-template-columns: 44px 1fr 72px; gap: 8px; align-items: baseline; font-size: 13px; } .st { font-weight: 650; } .st.mainline { color: var(--main); } .st.rotation { color: #4f6688; } .st.normal { color: var(--muted); } .st.fading { color: var(--warn); } .axis { grid-column: 2; display: flex; justify-content: space-between; margin-top: 2px; color: var(--muted); font-size: 10px; }
.tip { position: fixed; z-index: 9; pointer-events: none; padding: 6px 9px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; opacity: 0; white-space: nowrap; }
.strength { display: flex; align-items: center; gap: 8px; white-space: nowrap; } .strength s { position: relative; display: block; width: 56px; height: 4px; background: var(--rule); text-decoration: none; } .strength s i { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.tag { display: block; color: var(--muted); font-size: 11px; } .tag.hot { color: var(--main); font-weight: 650; } .tag.bad { color: var(--warn); }
.dec { position: relative; width: 150px; height: 14px; margin-top: 4px; } .dec::before { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; border-left: 1px solid var(--ink); } .dec i { position: absolute; top: 3px; height: 8px; } .dec i.m { background: #a3aaa5; } .dec i.b { background: var(--rot); } .dec i.a.pos { background: var(--up); } .dec i.a.neg { background: var(--down); }
.lower, .split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 40px; }
.qa { padding: 12px 0; border-top: 1px solid var(--rule); } .qa .q { margin: 0; color: var(--muted); font-size: 12px; } .qa .a { margin: 2px 0 0; font-size: 15px; font-weight: 650; } .qa details { margin-top: 2px; }
.checks { margin-top: 32px; } .check { display: grid; grid-template-columns: 14px 1fr; gap: 6px; padding: 8px 0; border-top: 1px solid var(--rule); font-size: 13px; } .check i { display: block; color: var(--muted); font-size: 12px; font-style: normal; } .check .c { width: 8px; height: 8px; margin-top: 7px; border: 1px solid var(--muted); border-radius: 50%; } .check.hit .c { border-color: var(--ink); background: var(--ink); }
.foot { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.pagehead { margin-bottom: 30px; } .pagehead h2 { margin: 0; font-size: 28px; } .pagehead p { display: none; }
.big { font-size: 34px; line-height: 1.1; font-weight: 650; letter-spacing: -.03em; }
.ladder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; max-width: 520px; margin: 8px 0 20px; } .ladder span { padding: 8px 10px; background: var(--soft); color: var(--muted); font-size: 12px; } .ladder span.on { color: #fff; font-weight: 650; } .ladder span.on.L0 { background: var(--down); } .ladder span.on.L1 { background: #b79a3a; } .ladder span.on.L2 { background: #c47a2c; } .ladder span.on.L3 { background: var(--up); }
.reasons .check { grid-template-columns: 14px 56px 1fr; } .choice { display: flex; gap: 12px; margin: 8px 0; }
.tl { display: flex; gap: 1px; margin: 12px 0 4px; } .tl i { flex: 1; height: 18px; background: var(--soft); } .tl i.yellow { background: #d9c27a; } .tl i.orange { background: #c98a3e; } .tl i.red { background: var(--up); }
.setup-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 32px; } .step-number { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.source-summary { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); } .source-summary > div { display: grid; gap: 4px; padding: 18px 0; }
.empty-copy { max-width: 52em; padding: 18px 0; color: var(--muted); } .setup-grid { margin-top: 28px; } .setup-editor { margin: 18px 0; } .setup-editor summary { cursor: pointer; margin-bottom: 14px; }
.check-label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; } .check-label input { width: auto; margin-top: 5px; }
.company-search { display: grid; grid-template-columns: 160px minmax(160px, 320px) auto; gap: 12px; align-items: end; margin-bottom: 16px; } .company-search [role=status] { grid-column: 1 / -1; }
.research-note { padding: 22px 0; border-top: 1px solid var(--rule); } .note-text { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
blockquote { margin: 12px 0; padding-left: 12px; border-left: 2px solid var(--rule); }
@media (max-width: 1100px) { .lower, .split { grid-template-columns: 1fr; gap: 0; } .lead { grid-template-columns: 1fr; } .trio div:first-child { padding-left: 0; border-left: 0; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  aside { position: static; height: auto; padding: 14px 16px 6px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .brand { margin: 0 4px 10px; } nav { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; } nav button { width: auto; min-height: 30px; padding: 5px 9px; } nav button.active { border-radius: 6px; } nav button[data-view="flags"] { margin-top: 0; border-top: 0; padding-top: 5px; }
  .workspace { border-left: 0; } .top { padding: 10px 16px; } main { padding: 28px 16px 52px; }
  .lead h2 { font-size: 24px; } .grid, .two { grid-template-columns: 1fr; gap: 12px; } .ribbon { grid-template-columns: 72px minmax(0, 1fr); } .rnow { grid-column: 1 / -1; margin-bottom: 8px; grid-template-columns: 44px 1fr 1fr; } .hide-sm { display: none; }
  .company-search { grid-template-columns: 1fr; } .setup-steps { grid-template-columns: 1fr; gap: 18px; } .source-summary { gap: 12px; } .source-summary .big { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }


.theme-toggle {
  display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--rule); border-radius: 7px; background: var(--control); color: var(--muted);
  cursor: pointer; font-size: 15px; line-height: 1;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.theme-toggle:hover { color: var(--ink); background: var(--soft); }

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111214;
  --sheet: #18191c;
  --ink: #f1f3f5;
  --muted: #9ca1aa;
  --rule: #2b2e34;
  --soft: #22252a;
  --main: #78a8ff;
  --rot: #7f91ae;
  --norm: #606671;
  --fade: #ad915f;
  --up: #ff8585;
  --down: #70d2a5;
  --warn: #e7bd68;
  --sidebar: #151619;
  --control: #202227;
  --row-hover: #202227;
  --accent-soft: #1f3154;
  --accent-ink: #b6ceff;
  --danger-soft: #321f22;
}
:root[data-theme="dark"] .state.live { background: #162a24; border-color: #2b624d; }
:root[data-theme="dark"] .state.partial,
:root[data-theme="dark"] .state.sample { background: #302818; border-color: #69552b; }
:root[data-theme="dark"] .state.blocked { border-color: #6f393d; }
:root[data-theme="dark"] .tier.none { border-color: #2b624d; }
:root[data-theme="dark"] .tier.yellow { border-color: #695d2d; }
:root[data-theme="dark"] .tier.orange { border-color: #79532c; }
:root[data-theme="dark"] .tier.red { border-color: #6f393d; }
:root[data-theme="dark"] .alarm { border-color: #6f393d; }
:root[data-theme="dark"] input::placeholder,
:root[data-theme="dark"] textarea::placeholder { color: #717781; }

.progress-track { width: min(560px, 100%); height: 8px; margin: 14px 0 8px; overflow: hidden; border-radius: 999px; background: var(--soft); border: 1px solid var(--rule); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--main); transition: width .25s ease; }
