:root {
  color-scheme: light;
  --panel: #f7f9fa;
  --canvas: #e7ecef;
  --ink: #15242a;
  --muted: #5f7078;
  --line: #bdc9ce;
  --blue: #255ea8;
  --blue-deep: #173e71;
  --orange: #dc633f;
  --sea: #4c948b;
  --gold: #c99327;
  --violet: #756aa8;
  --danger: #ae3e32;
  --display: "Avenir Next Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --body: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --utility: "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
  --shadow: 0 16px 50px rgb(27 48 56 / 8%);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgb(37 94 168 / 3%) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(rgb(37 94 168 / 3%) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--canvas);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
}

button,
input,
select {
  color: inherit;
  font: inherit;
}

button,
select {
  cursor: pointer;
}

a {
  color: var(--blue-deep);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 20;
  left: 1rem;
  top: 1rem;
  padding: 0.65rem 0.85rem;
  background: var(--ink);
  color: white;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

.masthead,
.view-nav,
main,
footer {
  width: min(1440px, calc(100% - 48px));
  margin-inline: auto;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  border-bottom: 1px solid var(--ink);
}

.brand {
  display: inline-flex;
  gap: 0.85rem;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.brand strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-stretch: condensed;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}

.brand small,
.eyebrow,
.section-title span,
.heading-note,
.date-control,
.filter-panel label,
.signal-meta,
.score-label,
footer,
th {
  font-family: var(--utility);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.brand small {
  color: var(--muted);
}

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  content: "";
  background: var(--line);
}

.brand-mark::before {
  width: 1px;
  height: 100%;
  left: 50%;
}

.brand-mark::after {
  width: 100%;
  height: 1px;
  top: 50%;
}

.brand-mark span {
  position: absolute;
  inset: 8px;
  border-top: 2px solid var(--orange);
  border-radius: 50%;
  transform: rotate(35deg);
}

.masthead-end {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.repo-badges {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.repo-badge {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.32rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--utility);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 120ms ease, background 120ms ease;
}

.repo-badge:hover,
.repo-badge:focus-visible {
  border-color: var(--ink);
  background: var(--panel);
}

.repo-badge-count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.view-nav {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.view-nav button,
.view-nav a {
  min-width: 112px;
  padding: 1rem 1.25rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.view-nav button[aria-current="page"] {
  background: var(--ink);
  color: white;
}

/* Opens a dialog rather than switching views, so it never carries the
   aria-current treatment the view tabs use. */
#rubric-nav {
  color: var(--blue-deep);
}

#rubric-nav::after {
  content: " ⓘ";
}

#rubric-nav:hover {
  background: var(--panel);
}

main {
  min-height: calc(100vh - 210px);
}

.view {
  padding: clamp(2.25rem, 4vw, 3.75rem) 0 6rem;
}

.view-heading {
  display: flex;
  gap: 2rem;
  align-items: end;
  justify-content: space-between;
  margin-bottom: clamp(1.5rem, 2.5vw, 2.25rem);
}

.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--blue);
}

h1,
h2,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.025em;
}

h1 {
  max-width: 800px;
  margin-bottom: 0;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

#today-view {
  padding-top: clamp(1.75rem, 3vw, 2.75rem);
}

.today-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: clamp(1.25rem, 2vw, 1.75rem);
}

h2 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.heading-note {
  max-width: 380px;
  margin-bottom: 0.3rem;
  color: var(--muted);
  line-height: 1.7;
  text-align: right;
}

.date-control,
.filter-panel label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
}

select,
input {
  min-height: 44px;
  padding: 0.55rem 2.25rem 0.55rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background-color: var(--panel);
  color: var(--ink);
  font-family: var(--body);
  font-size: 0.9rem;
  letter-spacing: normal;
  text-transform: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2rem;
  align-items: start;
}

.section-title {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--ink);
}

.section-title h2 {
  margin-bottom: 0;
}

.section-title span {
  color: var(--muted);
}

.record-card {
  border-bottom: 1px solid var(--line);
}

.record-summary {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 170px;
  gap: 1.25rem;
  align-items: start;
  padding: 1.5rem 0;
  cursor: pointer;
  list-style: none;
}

.record-summary::-webkit-details-marker {
  display: none;
}

.record-card[open] {
  background: color-mix(in srgb, var(--panel) 70%, transparent);
}

.record-card[open] .record-summary {
  border-bottom: 1px dashed var(--line);
}

.record-detail {
  margin: 0 190px 0 79px;
  padding: 1.25rem 0 1.75rem;
}

.record-detail > h3 {
  margin-top: 1.5rem;
}

.record-detail .detail-summary {
  white-space: pre-line;
}

.section-note,
.trend-message {
  color: var(--muted);
  font-size: 0.85rem;
}

.section-note {
  margin: 0.8rem 0 0;
}

.attention-card {
  background: color-mix(in srgb, #e9dfff 28%, transparent);
}

.attention-activity {
  display: grid;
  gap: 0.25rem;
  color: #51477f;
  font-family: var(--utility);
  font-size: 0.68rem;
  text-align: right;
  text-transform: uppercase;
}

.signal-rank {
  color: var(--orange);
  font-family: var(--utility);
  font-size: 0.78rem;
}

.record-card h3 {
  overflow-wrap: anywhere;
  margin: 0.2rem 0 0.55rem;
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 1.05;
}

.record-heading p {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.signal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.8rem;
  color: var(--blue-deep);
}

.pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.pill {
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pill-source {
  border-color: var(--ink);
  color: var(--ink);
  font-weight: 600;
}

.pill-event {
  border-color: var(--blue);
  color: var(--blue-deep);
}

.pill-watchlist {
  border-color: var(--gold);
  background: rgb(201 147 39 / 12%);
  color: #7d5c14;
  font-weight: 700;
}

/* The one line saying why a tracked artifact matters, ahead of upstream prose. */
.signal-tldr {
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.signal-why {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-style: italic;
}

/* Marked as an absence, not styled like real description text. */
.signal-nodesc {
  color: var(--muted);
  font-style: italic;
  opacity: 0.75;
}

.score {
  align-self: center;
  justify-self: end;
  width: 170px;
}

.score-value {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  width: 100%;
  font-family: var(--display);
}

.score-value strong {
  font-size: 2.15rem;
  line-height: 1;
}

.score-value span {
  justify-self: end;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.65rem;
}

.score-track {
  width: 100%;
  height: 6px;
  margin-top: 0.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  background: transparent;
}

.score-track span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.score-label {
  margin-top: 0.3rem;
  color: var(--muted);
}

/* The label is a button, but it keeps the label's typography: the affordance
   is the info mark and the underline on hover, not a boxed control competing
   with the score it annotates. */
.score-explain {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.score-explain:hover span:first-child,
.rubric-link:hover span:first-child {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.score-explain:hover .info-mark,
.rubric-link:hover .info-mark {
  border-color: var(--blue);
  background: var(--blue);
  color: white;
}

.info-mark {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue-deep);
  font-family: var(--display);
  font-size: 0.62rem;
  line-height: 1;
  text-transform: none;
}

.rubric-link {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin: -1rem 0 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  font-family: var(--utility);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.rubric-title {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}

.rubric-formula {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--blue);
  background: white;
  color: var(--ink);
  font-family: var(--utility);
  font-size: 0.78rem;
}

.rubric-worked {
  margin: 1.25rem 0 0;
  padding: 1rem;
  border: 1px solid var(--line);
  background: white;
}

.rubric-worked strong {
  font-family: var(--utility);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rubric-worked p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.75rem;
}

.rubric-component {
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--line);
}

.rubric-component:first-of-type {
  border-top: 1px solid var(--ink);
  margin-top: 2rem;
}

.rubric-component-head {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  justify-content: space-between;
}

.rubric-component h3 {
  margin: 0;
}

.rubric-weight {
  flex: none;
  color: var(--blue-deep);
  font-family: var(--utility);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rubric-component p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.rubric-bands {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.72rem;
  line-height: 1.8;
}

.rubric-contribution {
  margin-top: 0.7rem !important;
  color: var(--ink) !important;
  font-family: var(--utility);
  font-size: 0.72rem !important;
}

.rubric-limits {
  margin: 2rem 0;
  padding: 1.2rem;
  border-left: 3px solid var(--orange);
  background: #fbf0ec;
}

.rubric-limits h3 {
  margin: 0 0 0.6rem;
  font-family: var(--utility);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rubric-limits ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

/* Fetch plumbing is secondary to the results beside it, so it scrolls away
   with the rest of the page rather than sticking to the viewport. Pinning it
   would give the least important panel the one position that never yields. */
.health-panel {
  align-self: start;
  padding: 0.9rem 1.4rem;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.health-panel summary {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  justify-content: space-between;
  cursor: pointer;
}

.health-panel-title {
  font-family: var(--display);
  font-size: 1rem;
  font-stretch: condensed;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.health-panel-status {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.health-panel-status.has-failure {
  color: var(--danger);
}

.health-panel details[open] summary {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.health-panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.health-panel li {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  gap: 0.3rem 0.65rem;
  align-items: center;
  min-height: 52px;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  align-content: center;
}

.health-panel li:last-child {
  border-bottom: 0;
}

.health-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.health-dot.ok {
  background: var(--sea);
}

.health-name {
  font-weight: 600;
}

.health-count {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.68rem;
}

.health-detail {
  grid-column: 2 / -1;
  overflow: hidden;
  margin: 0;
  color: var(--danger);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.trend-panel,
.domain-panel,
.ledger,
.filter-panel {
  border: 1px solid var(--ink);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.trend-panel,
.domain-panel,
.ledger {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.domain-panel {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.domain-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 1rem;
}

.domain-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  background: var(--canvas);
}

.domain-card.is-up {
  border-top-color: var(--sea);
}

.domain-card.is-down {
  border-top-color: var(--orange);
}

.domain-head {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.domain-head h3 {
  margin: 0;
  font-family: var(--utility);
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.domain-count {
  margin: 0.35rem 0 0.65rem;
  font-family: var(--display);
  font-size: 2.4rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.domain-stats {
  display: grid;
  gap: 0.15rem 0.75rem;
  grid-template-columns: 1fr auto;
  margin: 0;
}

.domain-stats dt {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.domain-stats dd {
  margin: 0;
  font-family: var(--utility);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  justify-content: flex-end;
}

.legend-item {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.63rem;
  text-transform: uppercase;
}

.legend-swatch {
  width: 8px;
  height: 8px;
  background: var(--swatch);
}

.attention-swatch,
.attention-volume {
  background: #756aa8;
}

.trend-message {
  margin: 1.25rem 0 0;
  padding: 0.9rem 1rem;
  border-left: 3px solid var(--orange);
  background: var(--paper);
}

.trend-chart {
  display: flex;
  gap: clamp(0.4rem, 1.5vw, 1.2rem);
  align-items: end;
  min-height: 330px;
  padding: 2rem 0 0;
  overflow-x: auto;
}

.day-column {
  display: grid;
  flex: 1 0 44px;
  gap: 0.6rem;
  min-width: 44px;
  border: 0;
  background: transparent;
}

.bar-stack {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  height: 260px;
  border-bottom: 1px solid var(--ink);
}

.series-bars {
  display: flex;
  gap: 5px;
  align-items: end;
  justify-content: center;
  height: 260px;
  border-bottom: 1px solid var(--ink);
}

.series-bars .bar-stack {
  width: min(22px, 60%);
  border-bottom: 0;
}

.attention-volume {
  width: min(10px, 30%);
  min-height: 2px;
  transition: filter 180ms ease;
}

.bar-segment {
  min-height: 2px;
  background: var(--bar-color);
  transition: filter 180ms ease;
}

.day-column:hover .bar-segment {
  filter: saturate(1.35) brightness(0.93);
}

.day-label {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.6rem;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.ledger {
  margin-top: 2rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
}

th,
td {
  padding: 1rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
}

td {
  font-size: 0.88rem;
}

td a {
  font-weight: 600;
}

.filter-panel {
  display: grid;
  grid-template-columns: 2fr repeat(6, minmax(105px, 1fr)) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 3rem;
  padding: 1.25rem;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
}

.clear-button {
  min-height: 44px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--ink);
  background: transparent;
  font-family: var(--utility);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.clear-button:hover {
  background: var(--ink);
  color: white;
}

.attention-badge {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.15rem 0.35rem;
  background: #e9dfff;
  color: #51477f;
}

.empty-state {
  padding: 4rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.map-summary {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.5rem;
  align-items: start;
}

.map-canvas {
  max-height: 720px;
  overflow: auto;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
}

.map-canvas svg {
  display: block;
  min-width: 900px;
}

.map-edge {
  stroke: #9baab1;
  stroke-opacity: 0.38;
  stroke-width: 1;
}

.map-column-label {
  fill: var(--muted);
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.map-node {
  cursor: pointer;
}

.map-node circle {
  fill: var(--panel);
  stroke: var(--blue-deep);
  stroke-width: 1.5;
}

.map-node-artifact circle {
  fill: #fff7ee;
  stroke: var(--orange);
}

.map-node-topic circle {
  fill: #e5f2ef;
  stroke: var(--sea);
}

.map-node-organization circle {
  fill: #f1eafa;
  stroke: #756aa8;
}

.map-node text {
  fill: var(--ink);
  font-family: var(--utility);
  font-size: 11px;
}

.map-node:focus circle,
.map-node:hover circle {
  stroke-width: 4;
}

.map-detail {
  position: sticky;
  top: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--ink);
  background: var(--panel);
}

.map-detail h2 {
  overflow-wrap: anywhere;
}

.map-detail dl {
  display: grid;
  gap: 0.75rem;
}

.map-detail dt {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.65rem;
  text-transform: uppercase;
}

.map-detail dd {
  margin: 0.15rem 0 0;
}

.map-detail .primary-link {
  display: inline-block;
  margin-top: 1rem;
}

dialog {
  width: min(680px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  padding: clamp(1.5rem, 5vw, 3rem);
  overflow-y: auto;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 25px 90px rgb(15 29 35 / 35%);
}

dialog::backdrop {
  background: rgb(21 36 42 / 65%);
  backdrop-filter: blur(3px);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 1.5rem;
}

.detail-source {
  margin-bottom: 0.7rem;
  color: var(--blue);
  font-family: var(--utility);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.detail-title {
  padding-right: 2rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.detail-summary {
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin: 2rem 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.detail-grid div {
  padding: 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-grid dt {
  color: var(--muted);
  font-family: var(--utility);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.detail-grid dd {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.45rem;
}

.rationale-list {
  color: var(--muted);
}

.attention-notice {
  margin-top: 1.5rem;
  padding: 1rem;
  border-left: 3px solid #756aa8;
  background: #f1edfa;
}

.attention-notice strong {
  color: #51477f;
  font-family: var(--utility);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.attention-notice p,
.discovery-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.supporting-signals {
  margin: 1.8rem 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.supporting-signals ul {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.supporting-signals li {
  display: grid;
  gap: 0.15rem;
}

.supporting-signals a {
  color: var(--blue-deep);
  font-family: var(--utility);
  font-size: 0.75rem;
}

.supporting-signals span {
  color: var(--muted);
  font-size: 0.8rem;
}

.discovery-note {
  margin: 1.5rem 0;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.primary-link {
  display: inline-block;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: white;
  font-family: var(--utility);
  font-size: 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
}

.secondary-link {
  display: inline-block;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--utility);
  font-size: 0.7rem;
  text-decoration: none;
  text-transform: uppercase;
}

.error-state {
  max-width: 720px;
  padding: 7rem 0;
}

.error-state h1 {
  margin-bottom: 2rem;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 1.5rem 0 3rem;
  border-top: 1px solid var(--ink);
  color: var(--muted);
}

@media (max-width: 1050px) {
  .filter-panel {
    grid-template-columns: repeat(3, 1fr);
  }

  .search-field {
    grid-column: span 2;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .health-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .masthead,
  .view-nav,
  main,
  footer {
    width: min(100% - 28px, 1440px);
  }

  .masthead {
    min-height: 76px;
  }

  /* Keep the badges reachable on narrow screens, but drop the word so the
     icon and count still fit beside the wordmark. */
  .repo-badge-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .repo-badge {
    padding-inline: 0.5rem;
  }

  .view-nav {
    overflow-x: auto;
  }

  .view-nav button,
  .view-nav a {
    min-width: 92px;
    padding-inline: 0.8rem;
  }

  .view-nav a {
    margin-left: 0;
  }

  .view {
    padding-top: 2rem;
  }

  .view-heading {
    display: grid;
    align-items: start;
  }

  .heading-note {
    text-align: left;
  }

  h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: clamp(1.7rem, 7vw, 2.3rem);
  }

  .record-summary {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .record-summary .score,
  .record-summary .attention-activity {
    grid-column: 2;
    justify-self: start;
    max-width: 180px;
    text-align: left;
  }

  .record-detail {
    margin: 0 0 0 51px;
    padding-right: 1rem;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-detail {
    position: static;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .search-field {
    grid-column: auto;
  }

  footer {
    display: grid;
  }
}

@media (max-width: 470px) {
  .brand strong {
    font-size: 1.2rem;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
