/* Doppler Vendor Watch. Tokens follow the Pulse and Radar report (reference/pulse-radar-mockup-peptidology.html). */
:root {
  color-scheme: light;
  --bg: #f3f4f7; --surface: #ffffff; --sunk: #eceef3; --ink: #161a24; --muted: #5a6272; --faint: #898f9c;
  --line: #dde0e8; --grid: #e8eaef; --axis: #c3c7d1;
  --accent: #c4006b; --accent-ink: #9c0055; --accent-soft: #fbe6f1;
  --good: #11704a; --good-soft: #e2f3eb; --warn: #8a5a00; --warn-soft: #fbf0d9;
  --bad: #a3302f; --bad-soft: #f9e3e2; --info: #2b5a86; --info-soft: #e4edf6;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s-other: #b4b9c4; --band: rgba(42, 120, 214, 0.10);
  --st-good: #0ca30c; --st-warn: #fab219; --st-crit: #d03b3b;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #10131a; --surface: #171b24; --sunk: #1d2230; --ink: #e7eaf1; --muted: #9aa2b3; --faint: #7d8596;
    --line: #2a303d; --grid: #232836; --axis: #3a4150;
    --accent: #ff5aa8; --accent-ink: #ff8cc2; --accent-soft: #3a1628;
    --good: #5cc79a; --good-soft: #15302a; --warn: #e3b65b; --warn-soft: #342914;
    --bad: #ef8b8a; --bad-soft: #3a1c1e; --info: #86b6e3; --info-soft: #18283a;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s-other: #4a5263; --band: rgba(57, 135, 229, 0.14);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10131a; --surface: #171b24; --sunk: #1d2230; --ink: #e7eaf1; --muted: #9aa2b3; --faint: #7d8596;
  --line: #2a303d; --grid: #232836; --axis: #3a4150;
  --accent: #ff5aa8; --accent-ink: #ff8cc2; --accent-soft: #3a1628;
  --good: #5cc79a; --good-soft: #15302a; --warn: #e3b65b; --warn-soft: #342914;
  --bad: #ef8b8a; --bad-soft: #3a1c1e; --info: #86b6e3; --info-soft: #18283a;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s-other: #4a5263; --band: rgba(57, 135, 229, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a.link, .link { color: var(--accent-ink); cursor: pointer; }
a.link:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 24px; height: 24px; }
.brand small { font-weight: 500; color: var(--muted); }
.nav { display: flex; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.nav a { padding: 6px 11px; border-radius: 8px; color: var(--muted); white-space: nowrap; font-weight: 500; }
.nav a:hover { background: var(--sunk); color: var(--ink); }
.nav a.on { background: var(--accent-soft); color: var(--accent-ink); }
.subnav { max-width: 1240px; margin: 0 auto; padding: 0 16px 8px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.subnav a { padding: 4px 10px; border-radius: 7px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.subnav a:hover { background: var(--sunk); color: var(--ink); }
.subnav a.on { background: var(--sunk); color: var(--ink); font-weight: 600; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.btn:hover { background: var(--sunk); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.ghost { border-color: transparent; background: transparent; }

/* page */
main { max-width: 1240px; margin: 0 auto; padding: 20px 16px 60px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.head h1 { font-size: 24px; line-height: 1.2; margin: 0; letter-spacing: -0.015em; }
.head .sub { color: var(--muted); margin-top: 3px; }
.stamp { font-size: 13px; color: var(--muted); white-space: nowrap; }
.stamp b { color: var(--ink); font-weight: 600; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--accent-ink); }

.banner { display: flex; gap: 10px; align-items: flex-start; background: var(--info-soft); color: var(--ink);
  border-radius: var(--radius); padding: 11px 14px; margin-bottom: 16px; font-size: 14px; }
.banner .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--info); margin-top: 7px; flex: none; }
.banner.warn { background: var(--warn-soft); }
.banner.warn .dot { background: var(--warn); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.filters label { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 5px 11px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--sunk); color: var(--ink); font-weight: 600; }
select, input[type=search], input[type=text], input[type=password] { border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 6px 10px; min-width: 0; }
input[type=search] { width: 220px; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g32 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; }
.card h2 { font-size: 15px; margin: 0 0 2px; letter-spacing: -0.005em; }
.card .note { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 14px; }
.grid > .card, .grid > div > .card:first-child { margin-top: 0; }
.card.flush { padding: 0; }
.card.flush h2, .card.flush .note { padding: 0 16px; }
.card.flush h2 { padding-top: 16px; }

.tile .label { font-size: 13px; color: var(--muted); }
.tile .value { font-size: 28px; font-weight: 650; letter-spacing: -0.02em; line-height: 1.2; margin-top: 2px; }
.tile .delta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.tile .delta.up { color: var(--good); }
.tile .delta.down { color: var(--bad); }
.tile svg { display: block; margin-top: 6px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px;
  border-radius: 999px; white-space: nowrap; line-height: 1.5; }
.chip i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.chip.high { background: var(--bad-soft); color: var(--bad); }
.chip.high i { background: var(--st-crit); }
.chip.medium { background: var(--warn-soft); color: var(--warn); }
.chip.medium i { background: var(--st-warn); }
.chip.low { background: var(--sunk); color: var(--muted); }
.chip.low i { background: var(--faint); }
.chip.ok { background: var(--good-soft); color: var(--good); }
.chip.ok i { background: var(--st-good); }
.chip.flag { background: var(--sunk); color: var(--muted); font-weight: 500; }
.tag { font-size: 12px; color: var(--muted); background: var(--sunk); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }

/* feed */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--line); }
.feed li:first-child { border-top: 0; }
.feed .what { min-width: 0; }
.feed .what .t { font-weight: 600; overflow-wrap: anywhere; }
.feed .what .s { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.feed .when { font-size: 12px; color: var(--muted); white-space: nowrap; text-align: right; }
.feed .when b { display: block; color: var(--ink); font-weight: 600; font-size: 13px; }

/* tables */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tablebar { display: flex; justify-content: flex-end; padding: 8px 16px 0; }
.card:not(.flush) .tablebar { padding: 0 0 8px; }
.btn.csv { font-size: 12px; padding: 4px 10px; color: var(--muted); }
.btn.csv:hover { color: var(--ink); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px;
  border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
table.t th.sort { cursor: pointer; }
table.t th.sort:hover { color: var(--ink); }
table.t th.num { text-align: right; }
table.t th .ar { opacity: 0.35; margin-left: 3px; }
table.t th.on .ar { opacity: 1; color: var(--accent-ink); }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: var(--sunk); }
table.t td.name { max-width: 340px; min-width: 120px; overflow-wrap: anywhere; }
table.t td .sub { font-size: 12px; color: var(--muted); }
.tabletools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tabletools .count { font-size: 13px; color: var(--muted); margin-left: auto; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 10px 16px; font-size: 13px; color: var(--muted); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 3px; }

/* charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--faint); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.chart .endlabel { fill: var(--ink); font-size: 12px; font-weight: 600; font-family: var(--sans); }
.chart .xhair { stroke: var(--axis); stroke-width: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .key { width: 14px; height: 2px; border-radius: 1px; display: inline-block; }
.legend .key.box { height: 10px; width: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--axis); }
.legend .key.dot { width: 8px; height: 8px; border-radius: 50%; }
.tip { position: absolute; pointer-events: none; z-index: 30; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 10px; font-size: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12); min-width: 120px; max-width: 260px; }
.tip .d { color: var(--muted); margin-bottom: 3px; }
.tip .r { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.tip .r b { font-variant-numeric: tabular-nums; }
.tip .r .n { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.tip .k { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.thin { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; padding: 20px; }
.thin b { color: var(--ink); font-size: 22px; font-weight: 650; }
.bars .row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 54px; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.bars .track { height: 14px; position: relative; }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
.bars .row:hover .fill { filter: brightness(1.12); }
.stock { display: flex; gap: 2px; flex-wrap: wrap; }
.stock span { width: 14px; height: 22px; border-radius: 3px; background: var(--sunk); }
.stock span.in { background: var(--st-good); }
.stock span.out { background: var(--st-crit); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.loading { opacity: 0.55; transition: opacity 0.15s; }
.err { background: var(--bad-soft); color: var(--bad); border-radius: var(--radius); padding: 12px 14px; }
footer { max-width: 1240px; margin: 0 auto; padding: 0 16px 30px; font-size: 12px; color: var(--faint); }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.login h1 { font-size: 20px; margin: 12px 0 2px; }
.login p { color: var(--muted); margin: 0 0 18px; font-size: 14px; }
.login label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.login input { width: 100%; padding: 9px 11px; }
.login .btn { width: 100%; margin-top: 18px; padding: 10px; }
.login .msg { margin-top: 14px; font-size: 14px; color: var(--bad); min-height: 1.4em; }

@media (max-width: 1180px) {
  .nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 900px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g32, .g2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .top-in { gap: 10px; }
  .who .name { display: none; }
  .nav { order: 3; flex-basis: 100%; }
  .tile .value { font-size: 22px; }
  .head h1 { font-size: 20px; }
  .bars .row { grid-template-columns: 90px minmax(0, 1fr) 46px; }
  input[type=search] { width: 100%; }
  table.t td.name { max-width: 200px; }
  .hide-sm { display: none; }
}
