/* RefHub — MarkSpec token overrides on Pico CSS classless */

:root {
  /* Typography */
  --pico-font-family: "IBM Plex Sans", "Segoe UI", "Helvetica Neue",
    "DejaVu Sans", sans-serif;
  --pico-font-family-monospace: "IBM Plex Mono", "Cascadia Mono", "SF Mono",
    "DejaVu Sans Mono", monospace;
  --pico-font-size: 100%;
  --pico-line-height: 1.6;
  --pico-font-weight: 400;

  /* Colors — MarkSpec document palette */
  --pico-color: #1a1a1a;
  --pico-h1-color: #1a1a1a;
  --pico-h2-color: #1a1a1a;
  --pico-h3-color: #1a1a1a;
  --pico-muted-color: #6b6b6b;
  --pico-primary: #0072b2;
  --pico-primary-hover: #005580;
  --pico-primary-focus: rgba(0, 114, 178, 0.15);
  --pico-secondary: #6b6b6b;
  --pico-code-background-color: #f5f5f5;
  --pico-muted-border-color: #d4d4d4;
  --pico-background-color: #ffffff;
  --pico-card-background-color: #ffffff;
  --pico-card-border-color: #d4d4d4;

  /* Spacing — tighter than Pico defaults */
  --pico-block-spacing-vertical: 1rem;
  --pico-block-spacing-horizontal: 1.25rem;
}

/* Headings */
h1 { font-weight: 600; }
h2 { font-weight: 600; }
h3 { font-weight: 600; }

/* Lead text (landing page) */
.lead {
  font-size: 1.1rem;
  color: var(--pico-muted-color);
  margin-bottom: 1.5rem;
}

/* GitHub icon in nav */
header nav svg {
  vertical-align: -0.15em;
  opacity: 0.6;
  transition: opacity 0.15s;
}
header nav a:hover svg { opacity: 1; }

/* Breadcrumb nav */
nav[aria-label="breadcrumb"] ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  padding: 0;
  margin: 0 0 1.5rem 0;
  font-size: 0.875rem;
  color: var(--pico-muted-color);
}
nav[aria-label="breadcrumb"] li + li::before {
  content: "›";
  margin-right: 0.25rem;
}

/* Stats line */
.stats {
  color: var(--pico-muted-color);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Domain card grid */
.grid-domains {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.domain-card {
  margin: 0;
  padding: 0;
}
.domain-card a {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  transition: border-color 0.15s;
}
.domain-card a:hover {
  border-color: var(--pico-primary);
}
.domain-card hgroup {
  margin-bottom: 0.5rem;
}
.domain-card hgroup h3 {
  margin: 0;
  font-size: 1rem;
}
.domain-card hgroup p {
  margin: 0;
}
.domain-card > a > p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--pico-muted-color);
  line-height: 1.4;
}

/* Filter bar */
.filter-bar {
  margin-bottom: 1rem;
}
.filter-bar input[type="search"] {
  margin-bottom: 0;
}

/* Search results dropdown */
.search-results {
  border: 1px solid var(--pico-muted-border-color);
  border-radius: 0.375rem;
  max-height: 24rem;
  overflow-y: auto;
  margin-bottom: 1rem;
  background: var(--pico-background-color);
}
.search-results a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--pico-muted-border-color);
  font-size: 0.875rem;
}
.search-results a:last-child { border-bottom: none; }
.search-results a:hover,
.search-results a[aria-selected="true"] {
  background: var(--pico-code-background-color);
}
.search-results .sr-id {
  font-family: var(--pico-font-family-monospace);
  font-size: 0.8rem;
  white-space: nowrap;
  color: var(--pico-primary);
}
.search-results .sr-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-results .sr-domain {
  font-size: 0.75rem;
  color: var(--pico-muted-color);
  white-space: nowrap;
}

/* Badges */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 0.125rem 0.5rem;
  border-radius: 1rem;
  white-space: nowrap;
}
.badge-standard {
  background: rgba(0, 114, 178, 0.1);
  color: #005580;
}
.badge-regulation {
  background: rgba(179, 89, 0, 0.1);
  color: #b35900;
}
.badge-publication {
  background: rgba(45, 125, 45, 0.1);
  color: #2d7d2d;
}

/* Table — domain pages */
table { font-size: 0.875rem; }
table code { font-size: 0.8rem; }
.section-row td {
  background: var(--pico-code-background-color);
  border-bottom: 2px solid var(--pico-muted-border-color);
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}
tr.superseded td { opacity: 0.6; }
tr.superseded td:first-child code { text-decoration: line-through; }

/* Entry page */
article hgroup h1 code {
  font-size: 1.75rem;
}
dl dt {
  font-weight: 500;
  color: var(--pico-muted-color);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}
dl dd {
  margin-left: 0;
  margin-top: 0.125rem;
}
dl dd kbd {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  background: #e8e8e8;
  border: 1px solid #c0c0c0;
  border-radius: 0.25rem;
  font-family: var(--pico-font-family);
  color: #1a1a1a;
}
