:root {
  --ink: #222628;
  --muted: #646b70;
  --faint: #9aa0a4;
  --line: #dfe2e3;
  --soft: #f4f5f5;
  --bg: #fff;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* coverage levels: status palette, always paired with a label */
  --native: #0ca30c;
  --lossy: #fab219;
  --cannot: #ec835a;
  --noroute: #d03b3b;
  --unscanned: #d9dcdd;
  /* sequential blue ramp for invocations and latency */
  --s1: #cde2fb;
  --s2: #9ec5f4;
  --s3: #6da7ec;
  --s4: #3987e5;
  --s5: #256abf;
  --s6: #104281;
  /* cost bands: one ramp per band, tints and a shade of the categorical hue */
  --blue: #2a78d6;
  --orange: #eb6834;
  --aqua: #1baf7a;
}
:root {
  --blue-1: color-mix(in oklab, var(--blue) 32%, white);
  --blue-2: color-mix(in oklab, var(--blue) 48%, white);
  --blue-3: color-mix(in oklab, var(--blue) 64%, white);
  --blue-4: color-mix(in oklab, var(--blue) 82%, white);
  --blue-5: var(--blue);
  --blue-6: color-mix(in oklab, var(--blue) 70%, black);
  --orange-1: color-mix(in oklab, var(--orange) 32%, white);
  --orange-2: color-mix(in oklab, var(--orange) 48%, white);
  --orange-3: color-mix(in oklab, var(--orange) 64%, white);
  --orange-4: color-mix(in oklab, var(--orange) 82%, white);
  --orange-5: var(--orange);
  --orange-6: color-mix(in oklab, var(--orange) 70%, black);
  --aqua-1: color-mix(in oklab, var(--aqua) 32%, white);
  --aqua-2: color-mix(in oklab, var(--aqua) 48%, white);
  --aqua-3: color-mix(in oklab, var(--aqua) 64%, white);
  --aqua-4: color-mix(in oklab, var(--aqua) 82%, white);
  --aqua-5: var(--aqua);
  --aqua-6: color-mix(in oklab, var(--aqua) 70%, black);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font:
    14px/1.55 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
button,
select,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: #335f80;
  text-underline-offset: 3px;
}
:focus-visible {
  outline: 2px solid #28669b;
  outline-offset: 2px;
}
h1 {
  font-size: 26px;
  letter-spacing: -0.6px;
  font-weight: 620;
  margin: 0 0 8px;
  line-height: 1.25;
}
h2 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 6px;
  line-height: 1.3;
}
h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 18px 0 6px;
}
.muted {
  color: var(--muted);
}
.topbar {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 36px;
  padding: 0 32px;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.6px;
}
.brand small {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
}
nav {
  display: flex;
  align-self: stretch;
  gap: 25px;
}
nav button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  padding: 0;
  color: var(--muted);
  font-size: 13px;
}
nav button:hover {
  color: var(--ink);
}
nav button.active {
  border-bottom-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}
.topbar-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}
main {
  padding: 22px 32px 40px;
  max-width: 1500px;
}
.intro p {
  max-width: 820px;
  color: var(--muted);
  margin: 0 0 16px;
}
.banner {
  border: 1px dashed #b88a00;
  background: #fff8e6;
  border-radius: 4px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-size: 13px;
}
footer {
  margin-top: 36px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

/* controls: one row above the chart */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.seg button {
  border: 0;
  background: #fff;
  padding: 4px 11px;
  font-size: 13px;
  color: var(--muted);
}
.seg button + button {
  border-left: 1px solid var(--line);
}
.seg button.on {
  background: var(--ink);
  color: #fff;
}
.ctl-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 6px;
}
.controls input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 9px;
  width: 220px;
  font-size: 13px;
}
.controls label.check {
  font-size: 13px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
details.tags {
  position: relative;
  font-size: 13px;
}
details.tags summary {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 10px;
  list-style: none;
}
details.tags summary::-webkit-details-marker {
  display: none;
}
details.tags .panel {
  position: absolute;
  z-index: 20;
  top: 34px;
  left: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  padding: 10px 12px;
  width: 520px;
  columns: 2;
}
details.tags .grp {
  break-inside: avoid;
  margin-bottom: 8px;
}
details.tags .grp b {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
details.tags label {
  display: block;
}
.clear {
  border: 0;
  background: none;
  color: #335f80;
  font-size: 12px;
  padding: 0;
}

/* legend */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
}
.key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}
.sw {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}
.hatch {
  background: repeating-linear-gradient(
    45deg,
    var(--unscanned) 0 2px,
    #fff 2px 5px
  );
}

/* grid */
.grid-wrap {
  overflow-x: auto;
  padding-bottom: 6px;
}
table.grid {
  border-collapse: separate;
  border-spacing: 7px 4px;
}
table.grid th {
  font-weight: 500;
  font-size: 12px;
  text-align: left;
  color: var(--ink);
}
table.grid thead th {
  vertical-align: bottom;
  width: 66px;
  min-width: 66px;
  line-height: 1.2;
  padding: 0 2px 4px;
}
table.grid thead th.total,
table.grid td.total-col {
  padding-left: 10px;
}
table.grid th.row {
  white-space: nowrap;
  padding-right: 10px;
  font-weight: 500;
}
table.grid tr.group th {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  padding-top: 10px;
}
.tool-order {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
td.cell {
  padding: 0;
}
.cellbox {
  display: flex;
  gap: 2px;
  height: 42px;
  width: 66px;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  outline-offset: 1px;
}
.cellbox:hover,
.cellbox.sel {
  outline: 2px solid var(--ink);
}
.cellbox.na {
  cursor: default;
  background: var(--soft);
  justify-content: center;
  align-items: center;
  color: var(--faint);
  font-size: 11px;
}
.cellbox.na:hover {
  outline: none;
}
.cellbox.empty {
  background: var(--soft);
}
.cellbox.dim {
  opacity: 0.18;
}
.stripe {
  flex: 1;
  display: flex;
  flex-direction: column-reverse;
  gap: 1px;
  border-radius: 2px;
  overflow: hidden;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  justify-content: flex-start;
}
.stripe.value {
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.stripe.value.none {
  background: var(--soft);
  color: var(--faint);
}
.seg-native {
  background: var(--native);
}
.seg-lossy {
  background: var(--lossy);
}
.seg-cannot-target {
  background: var(--cannot);
}
.seg-no-route {
  background: var(--noroute);
}
.seg-not-scanned {
  background: repeating-linear-gradient(
    45deg,
    var(--unscanned) 0 2px,
    #fff 2px 5px
  );
}
.ntasks {
  position: absolute;
  right: -1px;
  top: -13px;
  font-size: 9px;
  color: var(--faint);
}
td.total-col .cellbox,
tr.total-row .cellbox {
  box-shadow: inset 0 0 0 1px var(--line);
}

/* tooltip */
#tip {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.1);
  padding: 8px 10px;
  font-size: 12px;
  max-width: 340px;
}
#tip b {
  display: block;
  margin-bottom: 4px;
}
#tip table {
  border-collapse: collapse;
}
#tip td {
  padding: 1px 8px 1px 0;
  vertical-align: top;
}

/* drawer */
#drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(620px, 100vw);
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.06);
  overflow-y: auto;
  padding: 22px 26px 40px;
  z-index: 40;
}
#drawer .close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: none;
  font-size: 24px;
  color: var(--muted);
}
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin: 0 0 4px;
}
.outcome {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}
.task {
  border-top: 1px solid var(--line);
  padding: 9px 0;
}
.task > .head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
  cursor: pointer;
}
.task .sentence {
  font-size: 13.5px;
}
.chips {
  display: flex;
  gap: 4px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 7px 0 5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chip .sw {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.tagrow {
  margin-top: 3px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  font-size: 10.5px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 3px;
  padding: 0 5px;
}
.task .body {
  display: none;
  margin-top: 8px;
}
.task.open .body {
  display: block;
}
.toolres {
  margin: 8px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--line);
}
.toolres h4 {
  margin: 0 0 3px;
  font-size: 13px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.route {
  font-family: var(--mono);
  font-size: 12px;
  margin: 4px 0;
}
.route li {
  margin: 1px 0;
}
.route .opt {
  color: var(--muted);
}
.route .ms {
  color: var(--muted);
  font-family: inherit;
}
.flag {
  font-size: 10.5px;
  border: 1px solid #c9b48a;
  color: #6b5320;
  border-radius: 3px;
  padding: 0 5px;
}
.note {
  font-size: 12.5px;
  margin: 3px 0;
}
.ev {
  font-size: 12px;
}

/* list views */
table.list {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
table.list th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  cursor: pointer;
  white-space: nowrap;
}
table.list td {
  border-bottom: 1px solid var(--line);
  padding: 6px 8px;
  vertical-align: top;
}
table.list tr.clickable:hover td {
  background: var(--soft);
  cursor: pointer;
}
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  position: relative;
  height: 14px;
  width: 260px;
  background: var(--soft);
  border-radius: 2px;
}
.bar-range {
  position: absolute;
  top: 6px;
  height: 2px;
  background: var(--faint);
}
.bar-med {
  position: absolute;
  top: 2px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--s4);
  border: 2px solid #fff;
}
.cols {
  display: grid;
  gap: 28px;
  max-width: 900px;
}
.cols code {
  white-space: nowrap;
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 16px;
    gap: 16px;
    flex-wrap: wrap;
  }
  main {
    padding: 16px;
  }
  .controls input[type="search"] {
    width: 100%;
  }
  details.tags .panel {
    width: 90vw;
    columns: 1;
  }
}

.stripe.bands {
  flex-direction: column;
  gap: 1px;
}
.band {
  flex: 1;
  border-radius: 1px;
}
.band.none {
  background: var(--soft);
}
.bandlegend {
  display: grid;
  gap: 4px;
}
.bandlegend > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}
.bandname {
  min-width: 190px;
  color: var(--ink);
  font-weight: 500;
}
/* cell summary: numbers sit under the centered swatch or heading they belong to */
table.sumtable th.num,
table.sumtable td.num {
  text-align: center;
}
