/* CNG brand fonts, served from the Radiant Earth font CDN (never committed here). */
@font-face { font-family: "iA Writer Quattro"; src: url("https://assets.radiant.earth/fonts/iAWriterQuattroS-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "iA Writer Quattro"; src: url("https://assets.radiant.earth/fonts/iAWriterQuattroS-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "iA Writer Quattro"; src: url("https://assets.radiant.earth/fonts/iAWriterQuattroS-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "iA Writer Quattro"; src: url("https://assets.radiant.earth/fonts/iAWriterQuattroS-BoldItalic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Berkeley Mono"; src: url("https://assets.radiant.earth/fonts/BerkeleyMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Berkeley Mono"; src: url("https://assets.radiant.earth/fonts/BerkeleyMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* CNG palette: Bonus Blue #2126F7, Sunshine Yellow #FFD626, Soft White #F2F4F6.
   Site text #2F343B, dark background #1D232B. No pure #000 or #FFF. */
:root {
  --bg: #F2F4F6;
  --fg: #2F343B;
  --muted: #5B636D;
  --line: #D3D8DE;
  --surface: #E7EAEE;
  --accent: #2126F7;
  --accent-hover: #1B1FD4;
  --accent-fg: #F2F4F6;
  --tag-bg: #E1E2FE;
  --tag-fg: #2126F7;
  --focus: #2126F7;
  --highlight: #FFD626;
  --font-body: "iA Writer Quattro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1D232B;
    --fg: #F2F4F6;
    --muted: #A3ABB5;
    --line: #36404B;
    --surface: #262E38;
    --accent: #A5A7FF;
    --accent-hover: #C4C5FF;
    --accent-fg: #F2F4F6;
    --tag-bg: #2A2F6B;
    --tag-fg: #D6D7FF;
    --focus: #FFD626;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.5 var(--font-body);
}
::selection { background: var(--highlight); color: #2F343B; }
.site-header, main, .site-footer { max-width: 960px; margin: 0 auto; padding: 0 16px; }
.site-header { padding-top: 24px; padding-bottom: 4px; border-bottom: 2px solid var(--fg); }
.brand { display: inline-block; line-height: 0; margin-bottom: 14px; }
.brand img { height: 40px; width: auto; }
h1 { font-size: 2.25rem; line-height: 1.1; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.01em; }
.intro { max-width: 65ch; margin: 10px 0 12px; }
.intro p { margin: 0 0 8px; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* filters */
.filters { margin: 16px 0 12px; display: grid; gap: 8px; }
input[type="search"] {
  width: 100%; padding: 10px 12px; font: inherit; color: inherit;
  background: var(--bg); border: 1px solid var(--fg); border-radius: 2px;
}
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-label {
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--muted); min-width: 5.5em;
}
.chip {
  font: inherit; font-size: 0.85rem; color: inherit; cursor: pointer;
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface);
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: #2126F7; color: var(--accent-fg); border-color: #2126F7; }
.picker { position: relative; font-size: 0.9rem; }
.picker summary {
  cursor: pointer; padding: 3px 10px; border: 1px solid var(--line);
  border-radius: 2px; background: var(--surface); list-style-position: inside;
}
.picker[open] summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.picker[open] { flex-basis: 100%; }
.picker input[type="search"] { border-radius: 0; margin-top: -1px; padding: 6px 10px; border-color: var(--line); }
.picker-options {
  max-height: 16rem; overflow-y: auto; border: 1px solid var(--line); border-top: 0;
  padding: 6px 10px; background: var(--bg);
}
.picker-option { display: block; padding: 3px 0; overflow-wrap: anywhere; }
.picker-option input { accent-color: #2126F7; }
.link-button {
  font: inherit; font-size: 0.9rem; background: none; border: 0; padding: 4px;
  color: var(--accent); text-decoration: underline; cursor: pointer;
}
#star-tools button {
  font: inherit; font-size: 0.85rem; padding: 4px 10px; cursor: pointer;
  color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 2px;
}
#star-tools button:disabled { cursor: default; opacity: 0.5; }

/* results */
.status { font-family: var(--font-mono); color: var(--muted); font-size: 0.8rem; margin: 8px 0; }
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--fg); }
.row { border-bottom: 1px solid var(--line); }
.row.withdrawn .row-title { text-decoration: line-through; color: var(--muted); }
.row-head { display: flex; align-items: flex-start; }
.row-toggle {
  flex: 1; min-width: 0; display: grid; grid-template-columns: 7.5em 1fr; gap: 8px;
  text-align: left; font: inherit; color: inherit; background: none; border: 0;
  padding: 10px 4px; cursor: pointer;
}
.row-toggle:hover { background: var(--surface); }
.row-toggle[aria-expanded="true"] { background: var(--surface); }
.row-when {
  font-family: var(--font-mono); font-size: 0.85rem; padding-top: 1px;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.row-when::before { content: "▸ "; }
.row-toggle[aria-expanded="true"] .row-when::before { content: "▾ "; }
.row-main { min-width: 0; overflow-wrap: anywhere; }
.row-title { font-weight: 700; }
.row-tags { display: block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--tag-fg); margin-top: 2px; }
.row-extras { padding: 8px 4px; }
.star-btn {
  font: inherit; font-size: 1.25rem; line-height: 1; color: var(--accent); cursor: pointer;
  background: none; border: 0; padding: 4px 6px; min-width: 2.25rem; min-height: 2.25rem;
}
.badge-moved, .badge-conflict { display: inline-block; margin-top: 2px; color: var(--fg); }
.badge-conflict { border-color: var(--accent); }
.badge {
  display: inline-block; margin-left: 6px; font-family: var(--font-mono); font-size: 0.7rem; padding: 0 6px;
  border-radius: 2px; background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.row-detail {
  padding: 4px 16px 14px calc(7.5em + 12px); background: var(--surface);
  overflow-wrap: anywhere;
}
.row-detail p { margin: 6px 0; }
.detail-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.detail-keywords { font-size: 0.85rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono); font-size: 0.75rem; padding: 2px 8px; border-radius: 999px;
  background: var(--tag-bg); color: var(--tag-fg);
}
.detail-why q { font-style: italic; }
.more {
  display: block; margin: 16px auto; font: inherit; padding: 8px 16px; cursor: pointer;
  border: 1px solid var(--fg); border-radius: 2px; background: none; color: inherit;
}
.more:hover { background: var(--surface); }
.site-footer { font-size: 0.85rem; padding-top: 16px; padding-bottom: 32px; }

@media (max-width: 600px) {
  h1 { font-size: 1.75rem; }
  .row-toggle { grid-template-columns: 1fr; gap: 2px; }
  .row-detail { padding-left: 16px; }
  .filter-label { min-width: 100%; }
}
