/* Copyright The OpenTelemetry Authors
   SPDX-License-Identifier: Apache-2.0 */

/* Light is the base; dark redefines only the tokens, so no colour has its
   only definition inside a media query. */
:root {
  --bg: #fbfbfc;
  --surface: #ffffff;
  --surface-2: #f4f5f7;
  --line: #e2e4e9;
  --line-strong: #c8ccd4;
  --ink: #16181d;
  --ink-2: #5b616e;
  --ink-3: #878d99;
  --accent: #4338ca;
  --accent-soft: #eeecfb;

  /* Requirement levels. Ordered by how much an absence means, not by hue
     family, so the legend reads as a scale. Required is purple: red read as
     a failure, and red or teal blur with --good under colour blindness. */
  --required: #8b2fc9;
  --recommended: #1d6fa5;
  --conditional: #7a6a9e;
  --optin: #8a8f9a;

  --good: #1a7f5a;
  --bad: #b4295c;
  --miss: #e7e9ee;
  /* A summary bar has no legend beside it, so a full one in a level colour
     read as a verdict; it stays neutral and the label carries the swatch. */
  --fill-neutral: var(--ink-2);
  /* The "expected, not emitted" finding kind: between a broken rule and a
     name the registry lacks, so neither a level colour nor the plain ink. */
  --warn: #b5730f;

  /* Languages. A separate scale from the requirement levels on purpose: it
     only ever appears on labels — a band, a pill, a group heading — and never
     on a cell, so the two never have to be told apart in the same place. */
  --lang-1: #0f7d8c;
  --lang-2: #b5730f;
  --lang-3: #7c4bb0;
  --lang-4: #a33a6e;
  --lang-5: #3a6ea3;
  --lang-6: #4f7a2b;

  --radius: 6px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1014;
    --surface: #16191f;
    --surface-2: #1d2128;
    --line: #282d36;
    --line-strong: #3a4049;
    --ink: #e7e9ee;
    --ink-2: #a0a6b2;
    --ink-3: #6f7682;
    --accent: #a5a0f5;
    --accent-soft: #23213a;

    --required: #c77dff;
    --recommended: #6fb6e0;
    --conditional: #b0a2d4;
    --optin: #7d838f;

    --good: #4fc294;
    --bad: #f07fa5;
    --miss: #262b33;
    --warn: #e0a95a;

    --lang-1: #52c3d1;
    --lang-2: #e0a95a;
    --lang-3: #b596e6;
    --lang-4: #e58ab5;
    --lang-5: #79aede;
    --lang-6: #a2c96e;
  }
}

* {
  box-sizing: border-box;
}

/* A class that sets `display` outranks the UA rule for `hidden`, and several
   of the controls below are flex rows that start out closed. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover {
  text-decoration-thickness: 2px;
}

code,
.mono {
  font-family: var(--mono);
  font-size: 0.88em;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--surface);
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
}

/* --- masthead ------------------------------------------------------------ */

.masthead {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.masthead-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  min-height: 88px;
  padding: 1rem 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark {
  width: 40px;
  height: 40px;
  padding: 4px;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 11px;
}
.brand-mark circle {
  fill: var(--accent);
  stroke: var(--accent-soft);
  stroke-width: 2px;
}
.brand-copy {
  display: grid;
  gap: 0.2rem;
  line-height: 1.2;
}
.brand-project {
  color: var(--ink-2);
  font-size: 0.7rem;
  font-weight: 550;
  letter-spacing: 0.035em;
}
.brand-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.source-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  padding: 0.65rem 0;
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 550;
  text-decoration: none;
}
.source-link:hover {
  color: var(--accent);
}
.masthead a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 6px;
}

main {
  padding: 1.6rem 1.5rem 4rem;
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 1.5rem 2.5rem;
  color: var(--ink-3);
  font-size: 0.8rem;
}
footer p {
  margin: 0.2rem 0;
}

/* --- shared chrome ------------------------------------------------------- */

h2 {
  font-size: 1.15rem;
  font-weight: 620;
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}
.lede {
  color: var(--ink-2);
  margin: 0 0 1.2rem;
  font-size: 0.9rem;
}
.lede summary {
  cursor: pointer;
}
.lede p {
  margin: 0.5rem 0 0;
  max-width: 86ch;
}

.loading,
.empty {
  color: var(--ink-3);
  padding: 2.5rem 0;
  text-align: center;
  font-size: 0.9rem;
}

/* --- controls ------------------------------------------------------------ */

/* The one band that has to stay reachable while a long table scrolls: the
   masthead gives up `sticky` for it, so this can hold `top: 0` without having
   to know how tall a wrapped tagline is. Full-bleed across main's padding, and
   main runs the width of the screen, so nothing shows beside it. Its height
   reaches the table pane as `--controls-h` (`trackBand` in `ui.js`), because
   the filter chips and the extra filters both change it. */
.controls {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: -1.6rem -1.5rem 1rem;
  padding: 0.8rem 1.5rem 0.65rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.controls-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.controls-row h2 {
  margin: 0;
  flex: none;
}
.tagline {
  margin: 0 0 0.8rem;
  color: var(--ink-2);
  font-size: 0.855rem;
}

/* --- signal picker ------------------------------------------------------- */

.picker-wrap {
  position: relative;
  flex: 1 1 18rem;
  min-width: 0;
}
.picker {
  font: inherit;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 34rem;
  padding: 0.38rem 0.6rem;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.picker:hover {
  border-color: var(--accent);
}
.picker-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.picker-key {
  flex: none;
  font: inherit;
  font-size: 0.7rem;
  color: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0 0.25rem;
}
.badge {
  flex: none;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.08rem 0.3rem;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent);
}

.veil {
  position: fixed;
  inset: 0;
  z-index: 8;
}
.palette {
  position: absolute;
  z-index: 9;
  top: calc(100% + 0.3rem);
  left: 0;
  width: min(34rem, calc(100vw - 2rem));
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgb(0 0 0 / 22%);
  overflow: hidden;
}
.palette-query {
  font: inherit;
  font-size: 0.9rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.palette-list {
  max-height: min(24rem, 60vh);
  overflow-y: auto;
  padding: 0.25rem 0;
}
.palette-group {
  margin: 0.35rem 0 0.15rem;
  padding: 0 0.7rem;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}
.palette-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}
/* Pointer and keyboard share one highlight, so arrowing down and hovering
   cannot disagree about which row Enter would take. */
.palette-option[data-active] {
  background: var(--accent-soft);
}
.palette-option[aria-selected="true"] .palette-name {
  font-weight: 600;
}
.palette-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}
.palette-count,
.pill-count {
  flex: none;
  font-size: 0.74rem;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.palette-none {
  margin: 0;
  padding: 1rem 0.7rem;
  color: var(--ink-3);
  font-size: 0.85rem;
  text-align: center;
}

/* --- filters ------------------------------------------------------------- */

.filterbar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.search {
  font: inherit;
  font-size: 0.875rem;
  flex: 1 1 18rem;
  min-width: 9rem;
  padding: 0.34rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  max-width: 60ch;
}
.pills,
.segments {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.segments {
  gap: 0;
}
.pill,
.segment,
.more,
.chip {
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.5rem;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.pill:hover,
.segment:hover,
.more:hover,
.chip:hover {
  color: var(--ink);
  border-color: var(--accent);
}
/* A language keeps its colour from the heatmap's bands, so the pill that
   filters it and the band it filters to are the same thing. */
.pill[aria-pressed="true"] {
  color: var(--pill, var(--accent));
  border-color: var(--pill, var(--accent));
  background: color-mix(
    in srgb,
    var(--pill, var(--accent)) 12%,
    var(--surface)
  );
  font-weight: 600;
}
.segment {
  border-radius: 0;
  border-left-width: 0;
}
.segment:first-child {
  border-left-width: 1px;
  border-radius: 999px 0 0 999px;
}
.segment:last-child {
  border-radius: 0 999px 999px 0;
}
.segment[aria-checked="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent);
  font-weight: 600;
}
/* A left border erased by the neighbour's `border-left-width: 0` has to come
   back when that neighbour is the selected one. */
.segment[aria-checked="true"] + .segment {
  border-left-width: 1px;
  border-left-color: var(--accent);
}
.count {
  color: var(--ink-3);
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.more[aria-expanded="true"] {
  color: var(--accent);
  border-color: var(--accent);
}
.more-drawer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 0.5rem;
}
.more-row {
  font-size: 0.8rem;
  color: var(--ink-2);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.more-row select {
  font: inherit;
  font-size: 0.8rem;
  max-width: 16rem;
  padding: 0.22rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
}

/* Only shown when something is on: a row that is always there is a row nobody
   reads, and what is filtered has to be readable at a glance. */
.chips {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.chips-what {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.chip {
  color: var(--pill, var(--accent));
  border-color: var(--pill, var(--accent));
  background: color-mix(
    in srgb,
    var(--pill, var(--accent)) 10%,
    var(--surface)
  );
}
.chip-clear {
  color: var(--ink-3);
  border-color: var(--line-strong);
  background: none;
  margin-left: 0.25rem;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.87rem;
}
th,
td {
  text-align: left;
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  z-index: 1;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  white-space: nowrap;
}
tbody tr:hover {
  background: var(--surface-2);
}
/* The last row of the table, not of every row group: the heatmap gives each
   requirement level its own <tbody>, and the line before the next level's
   heading has to stay. */
tbody:last-child tr:last-child td {
  border-bottom: none;
}
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ver {
  color: var(--ink-3);
  font-size: 0.8em;
}

.legend {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-2);
  margin: 0.5rem 0 0;
}
.legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 0.3rem;
}

/* --- heatmap ------------------------------------------------------------- */

/* The heatmap is wider than the screen and longer than it, so it scrolls in
   its own pane rather than dragging the page sideways: one scrollbar per axis,
   and the header row parks under the controls band instead of behind it. The
   fallback is a band with one row of filters; `trackBand` replaces it with the
   measured height as soon as the page has one. */
.scroller {
  overflow: auto;
  max-height: max(22rem, calc(100vh - var(--controls-h, 7rem) - 9rem));
  overscroll-behavior-x: contain;
}

.heatmap {
  width: auto;
  font-size: 0.8rem;
  border-collapse: separate;
  border-spacing: 0;
}
.heatmap th.attr {
  position: sticky;
  left: 0;
  background: var(--surface);
  z-index: 2;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  border-right: 1px solid var(--line-strong);
  color: var(--ink);
}
/* The attribute name is the row's label first and a registry link second, so it
   keeps the row's colour and only underlines under the pointer. */
.heatmap th.attr a {
  color: inherit;
  text-decoration: none;
}
.heatmap th.attr a:hover {
  text-decoration: underline;
}
.heatmap thead th.attr {
  z-index: 3;
  background: var(--surface-2);
}
.heatmap thead th.col {
  height: 11.5rem;
  padding: 0.3rem 0;
  vertical-align: bottom;
  background: var(--surface-2);
  text-transform: none;
  letter-spacing: 0;
}
/* Rotated, and two blocks rather than one string: in vertical writing the block
   axis runs across the screen, so the lines sit side by side and the height is
   the longer one rather than their sum. `overflow` is a backstop. */
.heatmap thead th.col > a {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-weight: 400;
  white-space: nowrap;
  max-height: 11rem;
  overflow: hidden;
  margin: 0 auto;
  color: var(--ink);
}
.heatmap thead th.col b {
  display: block;
  font-weight: 400;
  font-size: 0.74rem;
}
.heatmap thead th.col i {
  display: block;
  font-style: normal;
  font-size: 0.68rem;
  color: var(--ink-3);
  margin-right: 0.12rem;
}
/* The one horizontal header: a count column reads as a count column, not as
   another rotated name. */
.heatmap thead th.tally {
  vertical-align: bottom;
  text-align: right;
  white-space: nowrap;
  background: var(--surface-2);
  padding: 0.3rem 0.5rem;
  width: 6rem;
  min-width: 6rem;
}
.heatmap thead tr.band th.band-cell {
  height: 1.5rem;
  padding: 0 0.3rem;
  text-align: center;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line);
}
/* Two header rows, so the second one has to start where the first one ends. */
.heatmap thead th.col,
.heatmap thead th.tally,
.heatmap thead th.attr {
  top: 1.5rem;
}
.heatmap thead tr.band th {
  top: 0;
}
.heatmap td.cell {
  width: 1.9rem;
  min-width: 1.9rem;
  padding: 0;
  text-align: center;
  border-left: 1px solid var(--line);
}
.heatmap td.cell > span {
  display: block;
  width: 100%;
  height: 1.55rem;
  line-height: 1.55rem;
  font-size: 0.7rem;
}
.cell-yes > span {
  background: var(--good);
  color: var(--bg);
}
.cell-no > span {
  background: var(--miss);
  color: var(--ink-3);
}
.heatmap tr.level-head th {
  background: var(--surface-2);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}
.heatmap tr.level-head span {
  position: sticky;
  left: 0;
  display: inline-block;
}
.heatmap tr.level-head i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 0.4rem;
}
.rowcount {
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.note {
  max-width: 86ch;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 0.7rem 0.9rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.855rem;
  margin: 0 0 1.3rem;
  color: var(--ink);
}
.note p {
  margin: 0.25rem 0;
}
.note p:first-child {
  margin-top: 0;
}
.note p:last-child {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .masthead-row {
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
  }
  .masthead nav {
    order: 3;
    flex-basis: 100%;
  }
  .masthead nav a {
    flex: 1;
    text-align: center;
  }
  main {
    padding: 1.2rem 1rem 3rem;
  }
  .controls {
    margin: -1.2rem -1rem 1rem;
    padding: 0.7rem 1rem 0.6rem;
  }
  .picker-key {
    display: none;
  }
  .count {
    margin-left: 0;
  }
  /* Wrapped onto six rows this is most of a phone screen, which is no longer
     worth keeping on top of the table. */
  .controls {
    position: static;
  }
  /* And with the band scrolled away, the pane can have the whole screen. */
  .scroller {
    max-height: max(22rem, calc(100vh - 4rem));
  }
}

.masthead nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.masthead nav a {
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 0.825rem;
  font-weight: 550;
  text-decoration: none;
  color: var(--ink-2);
  white-space: nowrap;
}
.masthead nav a:hover {
  color: var(--ink);
  background: var(--surface);
}
.masthead nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgb(0 0 0 / 5%);
}

.bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 8.5rem;
}
.bar-track {
  flex: 1;
  height: 7px;
  border-radius: 4px;
  background: var(--miss);
  overflow: hidden;
  min-width: 3.5rem;
}
.bar-fill {
  height: 100%;
  border-radius: 4px;
}
.bar-fill.required {
  background: var(--required);
}
.bar-fill.recommended {
  background: var(--recommended);
}
.bar-value {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  color: var(--ink-2);
  min-width: 3.6rem;
}
.bar.na .bar-value {
  color: var(--ink-3);
}

.levels {
  display: flex;
  height: 9px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--miss);
}
.levels > span {
  display: block;
}

details > summary {
  cursor: pointer;
  font-size: 0.87rem;
  padding: 0.2rem 0;
}
details[open] > summary {
  margin-bottom: 0.4rem;
}
.heatmap thead th.col > a {
  color: inherit;
  text-decoration: none;
}
.heatmap thead th.col > a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* --- target detail ------------------------------------------------------- */

.target-detail {
  overflow-wrap: anywhere;
}
.target-detail > section {
  margin: 0 0 1.8rem;
}
.target-detail h3,
.directory h3 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.target-detail h3 .n,
.directory h3 .n {
  color: var(--ink-3);
  font-size: 0.82rem;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.target-detail .note {
  margin-bottom: 0.8rem;
}

.crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-3);
  margin: 0 0 0.35rem;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.1rem;
  margin: 0.3rem 0 1.4rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.meta > * {
  min-width: 0;
}
.meta b {
  font-weight: 500;
  color: var(--ink-3);
  margin-right: 0.3rem;
}

/* The verdict is the sentence a reader came for, so it leads; the tiles are
   the numbers it was made from. */
.verdict {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  margin: 0 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.verdict p {
  margin: 0;
}
.verdict-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--bg);
  background: var(--bad);
}
.verdict-mark.good {
  background: var(--good);
}
.verdict-lead {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.verdict .verdict-sub {
  margin-top: 0.2rem;
  color: var(--ink-2);
  font-size: 0.85rem;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.7rem;
}
.tile {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tile-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
}
.tile .bar .bar-fill {
  background: var(--fill-neutral);
}
.tile-label .dot {
  margin-right: 0.35rem;
}
.tile-big {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.tile-big small {
  font-size: 0.9rem;
  font-weight: 450;
  color: var(--ink-3);
}
.tile-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.7rem;
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-2);
}

.fix-group {
  margin: 0 0 1.3rem;
}
.section-note {
  max-width: 80ch;
  margin: -0.2rem 0 0.6rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.fixes {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.fixes > li {
  display: grid;
  grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.3rem 1.2rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.fixes > li:last-child {
  border-bottom: 0;
}
.fixes .what {
  font-family: var(--mono);
  font-size: 0.8rem;
}
.fixes .what a {
  color: var(--ink);
  text-decoration: none;
}
.fixes .what a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.fixes .what small {
  display: block;
  font-family: var(--sans);
  font-size: 0.74rem;
  color: var(--ink-3);
}
.fixes .why {
  min-width: 0;
  font-size: 0.82rem;
  color: var(--ink-2);
}
.reported {
  color: var(--ink-3);
}
.where {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.3rem;
}
.where :is(code, button) {
  padding: 0.05rem 0.35rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-2);
}
/* Only a chip that names a signal in the table below is a control. */
.where button {
  cursor: pointer;
  color: var(--accent);
  border-color: var(--line-strong);
}
.where button:hover {
  border-color: var(--accent);
}
.where-fold > summary {
  font-size: 0.78rem;
  padding: 0;
  margin-top: 0.3rem;
}
.more-rows {
  margin-top: 0.4rem;
  padding: 0.2rem 0.7rem;
  font: inherit;
  font-size: 0.78rem;
  color: var(--ink-2);
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
.more-rows:hover {
  color: var(--ink);
  border-color: var(--accent);
}

/* The tables scroll inside their own frame, so a phone keeps the page still
   and only the table moves. */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.signal-table td.kind {
  color: var(--ink-3);
  font-size: 0.8rem;
  white-space: nowrap;
}
.signal-table .levels {
  min-width: 6rem;
}
.signal-table tr[data-signal] {
  scroll-margin-top: calc(var(--controls-h, 5rem) + 1rem);
}
.row-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  font-size: 0.8rem;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: 0;
}
.row-toggle::before {
  content: "▸";
  font-family: var(--sans);
  color: var(--ink-3);
  transition: transform 0.15s;
}
.row-toggle[aria-expanded="true"]::before {
  transform: rotate(90deg);
}
.count-badge {
  display: inline-block;
  min-width: 1.6rem;
  padding: 0.02rem 0.4rem;
  border-radius: 999px;
  text-align: center;
  font-size: 0.76rem;
  background: var(--surface-2);
  color: var(--ink-2);
}
.count-badge.hot {
  background: color-mix(in srgb, var(--bad) 14%, var(--surface));
  color: var(--bad);
  font-weight: 600;
}
tbody tr.signal-detail,
tbody tr.signal-detail:hover {
  background: var(--surface-2);
}
tr.signal-detail > td {
  padding: 0.8rem 1rem 1rem;
}
.attr-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem 1.6rem;
}
.attr-column h4,
.signal-findings h4 {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}
.attr-column .ver {
  margin: 0;
}
.attr-list {
  display: grid;
  gap: 0.12rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--mono);
  font-size: 0.76rem;
}
.attr-list li {
  display: flex;
  align-items: center;
  min-width: 0;
}
.attr-list a {
  color: var(--ink);
  text-decoration: none;
}
.attr-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.attr-list.missing :is(a, code) {
  color: var(--ink-2);
}
.dot {
  flex: none;
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.35rem;
  border-radius: 2px;
}
.signal-findings {
  margin-top: 1rem;
}
.compare {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.8rem;
}

.attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.attrs code {
  padding: 0.1rem 0.38rem;
  border-radius: 4px;
  background: var(--surface-2);
  font-size: 0.78rem;
}
.entity-table td {
  vertical-align: top;
}

@media (max-width: 720px) {
  .fixes > li {
    grid-template-columns: minmax(0, 1fr);
  }
  .verdict {
    padding: 0.85rem 0.9rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .row-toggle::before {
    transition: none;
  }
}

.directory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.2rem 1.5rem;
  margin-top: 1rem;
}
.directory ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.directory li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0;
  font-size: 0.9rem;
}
