@font-face{font-family:"Open Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url(/static/fonts/open-sans-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Open Sans";font-style:normal;font-weight:400 700;font-display:swap;src:url(/static/fonts/open-sans-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root {
  color-scheme: light;
  --page: #f9f9f7;
  --surface: #fcfcfb;
  --raised: #ffffff;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #706e69;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --line: rgba(11, 11, 11, 0.1);
  --wash: rgba(11, 11, 11, 0.045);
  --series-1: #2a78d6;
  --series-1-wash: rgba(42, 120, 214, 0.1);
  --series-2: #eb6834;
  --good: #006300;
  --bad: #b42f2f;
  --critical: #d03b3b;
  --warning: #fab219;
  --info: #2a78d6;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --raised: #222220;
    --ink: #f0efec;
    --ink-2: #c3c2b7;
    --muted: #9a988f;
    --grid: #2c2c2a;
    --axis: #383835;
    --line: rgba(255, 255, 255, 0.1);
    --wash: rgba(255, 255, 255, 0.055);
    --series-1: #3987e5;
    --series-1-wash: rgba(57, 135, 229, 0.12);
    --series-2: #d95926;
    --good: #0ca30c;
    --bad: #e66767;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --surface: #1a1a19;
  --raised: #222220;
  --ink: #f0efec;
  --ink-2: #c3c2b7;
  --muted: #9a988f;
  --grid: #2c2c2a;
  --axis: #383835;
  --line: rgba(255, 255, 255, 0.1);
  --wash: rgba(255, 255, 255, 0.055);
  --series-1: #3987e5;
  --series-1-wash: rgba(57, 135, 229, 0.12);
  --series-2: #d95926;
  --good: #0ca30c;
  --bad: #e66767;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 14px/1.5 "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---- sign in ---- */
body.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.login-card h1 { font-size: 22px; }
.login-card p.muted { margin: 0 0 20px; }
.login-card label { display: block; font-weight: 600; margin-bottom: 6px; }
.login-card input { width: 100%; padding: 9px 11px; border: 1px solid var(--axis); border-radius: 6px; background: var(--raised); }
.login-card button { margin-top: 16px; width: 100%; padding: 9px; border: 0; border-radius: 6px; background: var(--ink); color: var(--page); font-weight: 600; cursor: pointer; }
.login-error { color: var(--bad); margin: 10px 0 0; }

/* ---- frame ---- */
.top { position: sticky; top: 0; z-index: 5; background: var(--page); border-bottom: 1px solid var(--line); }
.top-inner { max-width: 1240px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; height: 52px; }
.brand { font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand span { font-weight: 400; color: var(--muted); }
nav.tabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
nav.tabs a { text-decoration: none; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); white-space: nowrap; }
nav.tabs a:hover { background: var(--wash); }
nav.tabs a[aria-current="page"] { color: var(--ink); background: var(--wash); font-weight: 600; }
.signout button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 6px; }
.signout button:hover { background: var(--wash); color: var(--ink); }

main#view { max-width: 1240px; margin: 0 auto; padding: 20px 24px 64px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; padding: 2px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 4px 11px; border-radius: 5px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--page); font-weight: 600; }
.filters input[type="search"], .filters select { padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); min-width: 220px; }
.updated { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.loading { opacity: 0.55; transition: opacity 0.15s; }

.view-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.view-title h1 { font-size: 22px; }
.view-lede { color: var(--ink-2); margin: 0 0 18px; max-width: 760px; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; min-width: 0; }
.card h2 { font-size: 14px; margin-bottom: 2px; }
.card .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 16px; }
.grid > .card { margin-top: 0; }

/* ---- stat tiles ---- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.tile .label { color: var(--ink-2); font-size: 13px; }
.tile .value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin-top: 2px; }
.tile .delta { font-size: 12.5px; color: var(--muted); }
.tile .delta.up-good, .tile .delta.down-good { color: var(--good); }
.tile .delta.up-bad, .tile .delta.down-bad { color: var(--bad); }

/* ---- attention list ---- */
.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.attention li:first-child { border-top: 0; padding-top: 2px; }
.attention .icon { width: 18px; height: 18px; margin-top: 1px; }
.attention .t { font-weight: 600; }
.attention .d { color: var(--ink-2); overflow-wrap: anywhere; }
.attention .c { color: var(--muted); white-space: nowrap; font-size: 12.5px; text-align: right; }
.attention a.go { text-decoration: none; }
.attention a.go:hover .t { text-decoration: underline; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

/* ---- charts ---- */
.chart { position: relative; }
.chart svg { display: block; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .crosshair { stroke: var(--axis); stroke-width: 1; }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .bar { fill: var(--series-1); }
.chart .bar.hover, .chart .bar:focus { fill-opacity: 0.8; outline: none; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 0 0 8px; }
.legend .key { display: inline-block; width: 14px; height: 2px; border-radius: 1px; vertical-align: middle; margin-right: 6px; }
.tooltip { position: fixed; z-index: 20; pointer-events: none; background: var(--raised); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14); padding: 8px 10px; font-size: 12.5px; min-width: 120px; }
.tooltip .tt-title { color: var(--muted); margin-bottom: 4px; }
.tooltip .tt-row { display: flex; align-items: center; gap: 8px; }
.tooltip .tt-row b { font-variant-numeric: tabular-nums; }
.tooltip .tt-row .key { width: 12px; height: 2px; border-radius: 1px; }

/* horizontal bar list: label, bar, value */
.hbars { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
.hbars .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.hbars .track { height: 12px; position: relative; }
.hbars .fill { height: 12px; background: var(--series-1); border-radius: 0 4px 4px 0; min-width: 2px; }
.hbars .row:hover .fill { opacity: 0.8; }
.hbars .val { font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; font-size: 12.5px; }
.hbars .row { display: contents; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: 12px; padding: 6px 10px; border-bottom: 1px solid var(--axis); white-space: nowrap; }
td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th.num, td.num { text-align: right; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--wash); }
td .tag, .tag { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); white-space: nowrap; }
.tag.licensed { border-color: var(--good); color: var(--good); }
.tag.trial-ended, .tag.not-covered { border-color: var(--bad); color: var(--bad); }
.tag.software { border-color: var(--warning); }
.trunc { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.btn:hover { background: var(--wash); }
.btn:disabled { opacity: 0.4; cursor: default; }

/* ---- detail ---- */
.back { display: inline-block; margin-bottom: 12px; color: var(--ink-2); text-decoration: none; }
.back:hover { color: var(--ink); }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
pre.report { background: var(--page); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; max-height: 520px; font: 12px/1.5 var(--mono); white-space: pre; margin: 0; }
.error-box { border: 1px solid var(--bad); color: var(--bad); border-radius: 8px; padding: 12px 14px; }

@media (max-width: 640px) {
  .top-inner { padding: 0 16px; gap: 12px; }
  .brand span { display: none; }
  main#view { padding: 16px 16px 48px; }
  .filters input[type="search"], .filters select { min-width: 0; flex: 1; }
  .updated { width: 100%; margin-left: 0; }
  .hbars { grid-template-columns: minmax(0, 1fr) 80px auto; }
}
