/* Legal Eagle frontend.
   Visual posture: clean, sober, law-firm-appropriate. White cards on a soft
   neutral background, deep-navy primary accent, serif headings to read
   professional, generous spacing.
*/

:root {
  --bg: #f5f5f4;
  --surface: #ffffff;
  --border: #e5e5e3;
  --text: #1a1d29;
  --text-muted: #5f6275;
  --accent: #1e3a5f;          /* deep navy, brand-ish */
  --accent-hover: #284b78;
  --accent-bg: #eaf0f7;
  --ok: #14532d;
  --ok-bg: #dcfce7;
  --warn: #92400e;
  --warn-bg: #fef3c7;
  --danger: #991b1b;
  --danger-bg: #fee2e2;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --font-serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  z-index: 10;
}

.brand { display: flex; align-items: center; gap: 18px; }
.logo { height: 76px; width: auto; display: block; }
.logo-placeholder {
  width: 76px; height: 76px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: 0.5px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--border);
  padding-left: 18px;
}
.brand-text .product {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.cost-meter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-feature-settings: "tnum";
}
.cost-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
#cost-display {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Layout ---------- */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(360px, 460px) 1fr;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
}

/* ---------- Cards (left pane) ---------- */

.left-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;  /* room for scrollbar */
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
}

/* Fatal auth-bootstrap failure (clerk mode): a visible, blocking notice so a
   failed sign-in load can never masquerade as a signed-in but empty app. */
.auth-fatal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.auth-fatal-card {
  background: var(--surface);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-width: 440px;
  box-shadow: var(--shadow);
}
.auth-fatal-card h2 { margin: 0 0 8px; color: var(--danger); }
.auth-fatal-card p { margin: 0 0 14px; }
.auth-fatal-card .detail {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
  margin-bottom: 14px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.card-header h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
}

.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.stretch > * { min-width: 0; }
.grow { flex: 1 1 auto; }
.stack-tight > * + * { margin-top: 8px; }
.mt { margin-top: 12px; }

.muted { color: var(--text-muted); font-size: 12px; }
.hidden { display: none !important; }
/* The HTML `hidden` attribute is the app's primary show/hide toggle (set via
   el.hidden = ... throughout app.js). The UA `[hidden]{display:none}` rule is
   low-priority and gets overridden by any author `display` rule (e.g. .row /
   .sites-footer set display:flex), which silently un-hides elements that set the
   attribute. Make the attribute authoritative so el.hidden works everywhere. */
[hidden] { display: none !important; }

/* Inputs */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.field span {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

input[type=text], input:not([type]), select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 9px;
  width: 100%;
}
textarea { resize: vertical; min-height: 64px; font-family: var(--font-sans); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg);
}

button {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--accent);
  color: white;
  transition: background 0.1s ease;
}
button:hover:not(:disabled) { background: var(--accent-hover); }
button:disabled { opacity: 0.55; cursor: not-allowed; }
button.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
button.ghost:hover:not(:disabled) { background: #ebebeb; }
button.danger { color: var(--danger); border-color: var(--danger); }
button.danger:hover:not(:disabled) { background: var(--danger-bg); }
button.primary { background: var(--accent); color: white; }

details > summary {
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  color: var(--text-muted);
}
details > summary:hover { color: var(--text); }

/* Status / cite summary */

.status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.cite-summary { font-size: 12px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  font-feature-settings: "tnum";
}
.chip.ok    { background: var(--ok-bg);     color: var(--ok); }
.chip.warn  { background: var(--warn-bg);   color: var(--warn); }
.chip.red   { background: var(--danger-bg); color: var(--danger); }
.chip.info  { background: var(--accent-bg); color: var(--accent); }

/* Answer + citations */

.answer {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}
.answer p { margin: 0 0 0.85em 0; }

.citation-ref {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  vertical-align: super;
  margin: 0 1px;
  padding: 1px 6px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
}
.citation-ref.ok    { background: var(--ok-bg);     color: var(--ok);     border-color: rgba(20, 83, 45, 0.2); }
.citation-ref.warn  { background: var(--warn-bg);   color: var(--warn);   border-color: rgba(146, 64, 14, 0.2); }
.citation-ref.red   { background: var(--danger-bg); color: var(--danger); border-color: rgba(153, 27, 27, 0.3); }
.citation-ref:hover { filter: brightness(0.96); }

.citations {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}
.citations li {
  border-left: 3px solid var(--border);
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  cursor: pointer;
  background: #fafaf9;
  border-radius: 0 4px 4px 0;
}
.citations li:hover { background: #f0f0ee; }
.citations li.ok    { border-left-color: var(--ok); }
.citations li.warn  { border-left-color: var(--warn); }
.citations li.red   { border-left-color: var(--danger); }
.citation-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}
.citation-quote {
  margin-top: 3px;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Upload UI ---------- */

.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: #fafaf9;
  padding: 22px 14px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.drop-zone-prompt {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
  pointer-events: none;
}
.drop-zone-prompt strong {
  color: var(--text);
  font-weight: 600;
}

.staged-files {
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
  max-height: 140px;
  overflow-y: auto;
}
.staged-files li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: #fafaf9;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
}
.staged-files .file-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.staged-files .file-name {
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.staged-files .file-size {
  color: var(--text-muted);
  font-size: 11px;
}
.staged-files .remove-file {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-size: 16px;
  padding: 2px 8px;
  cursor: pointer;
}
.staged-files .remove-file:hover { color: var(--danger); }

.upload-progress {
  width: 100%;
  height: 8px;
  margin-top: 8px;
  appearance: none;
}
.upload-progress::-webkit-progress-bar {
  background: var(--border);
  border-radius: 4px;
}
.upload-progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 4px;
}

.advanced > summary { font-size: 11px; }

/* ---------- Right pane (PDF) ---------- */

.right-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

.pdf-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
}
.pdf-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 60%;
}
.pdf-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pdf-nav button { padding: 3px 9px; font-size: 14px; }
#page-info {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  min-width: 70px;
  text-align: center;
}

.pdf-wrapper {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  background: #e9e7e3;
  padding: 16px;
}

.pdf-empty {
  margin: auto;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  max-width: 320px;
}

#pdf-canvas {
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
  max-width: 100%;
  height: auto;
}

/* ---------- Footer ---------- */

.footer {
  padding: 8px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
  font-size: 11.5px;
}

/* ---------- Modal: audit-packet password reveal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  padding: 24px;
  max-width: 600px;
  width: calc(100% - 32px);
  font-size: 14px;
}

.modal h2 {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.modal p {
  margin: 8px 0;
  color: var(--text);
}

.modal-label {
  display: block;
  margin-top: 16px;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-copy-row {
  display: flex;
  gap: 8px;
}

.modal-secret {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  background: #faf9f7;
}

.modal-copy {
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  min-width: 72px;
}

.modal-copy:hover {
  filter: brightness(0.95);
}

.modal-foot {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.modal-foot code {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  background: #faf9f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11.5px;
  word-break: break-all;
}

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.modal-ok {
  padding: 8px 18px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

/* ---------- Audit packet "saved" toast ---------- */
/* Replaces the older opposing-counsel-handoff modal. Reframed 2026-05-19:
   the packet is an internal archive, not a transmission protocol. The
   toast confirms the save inline; encryption-password + signing-key
   fingerprint hide behind a "details" disclosure for the rare audit /
   Daubert scenarios. */

.packet-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: 480px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--ok);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.10);
  z-index: 100;
  font-size: 13px;
}

.packet-toast-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}

.packet-toast-check {
  color: var(--ok);
  font-weight: 700;
  font-size: 16px;
}

.packet-toast-main code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--accent-bg);
  padding: 2px 6px;
  border-radius: 3px;
  word-break: break-all;
}

.packet-toast-close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 4px;
}

.packet-toast-close:hover { color: var(--text); }

.packet-toast-paths {
  padding: 0 14px 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.packet-toast-paths code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #faf9f7;
  padding: 1px 5px;
  border-radius: 3px;
  word-break: break-all;
}

.packet-toast-details {
  border-top: 1px solid var(--border);
  padding: 10px 14px 14px;
}

.packet-toast-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  user-select: none;
}

.packet-toast-details summary:hover { color: var(--text); }

.packet-toast-detail-body {
  margin-top: 12px;
}

.packet-toast-detail-body p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.packet-toast-detail-body label {
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
  font-weight: 600;
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.packet-toast-verify {
  margin-top: 14px;
  font-size: 11.5px;
}

.packet-toast-verify code {
  display: block;
  margin-top: 4px;
  padding: 6px 8px;
  background: #faf9f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  word-break: break-all;
}

/* ===================================================================== */
/* T5.5 — Exhaustive query UI (mode toggle, term chips, events, banner)   */
/* Pinned to the existing token system; no new colors introduced.        */
/* ===================================================================== */

/* D-UI-1 / D-UI-5 — segmented mode toggle (real radio group). */
.segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.seg-option {
  position: relative;
  display: inline-flex;
}
.seg-option:not(:last-child) {
  border-right: 1px solid var(--border);
}
/* Hide the native radio but keep it in the a11y/tab tree. */
.seg-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.seg-option span {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
  transition: background 0.12s, color 0.12s;
}
.seg-option input:checked + span {
  background: var(--accent);
  color: #fff;
}
.seg-option input:focus-visible + span {
  box-shadow: inset 0 0 0 2px var(--accent-bg);
}
.mode-helper {
  margin: 8px 0 10px 0;
  min-height: 14px;
}

/* Mode key: explains analytic (cheaper, default) vs exhaustive (complete, pricier)
   so a non-technical operator chooses consciously. Reuses existing tokens. */
.mode-key {
  margin: 0 0 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent-bg);
  font-size: 12px;
  color: var(--text-muted);
}
.mode-key-row + .mode-key-row { margin-top: 8px; }
.mode-key dt {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.mode-key dd {
  margin: 0;
  line-height: 1.45;
}
.mode-key-tag {
  display: inline-block;
  font-weight: 500;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 4px;
  vertical-align: middle;
}
.mode-key-tag.default { background: var(--surface); color: var(--accent); border: 1px solid var(--accent); }
.mode-key-tag.exhaustive { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn); }

/* Editable term chips (E14 / D-UI-5). Removable, distinct from status .chip. */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.chips-label {
  font-size: 12px;
}
.chips-container {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}
.term-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: var(--accent-bg);
  color: var(--accent);          /* #1e3a5f on #eaf0f7 → contrast ~8:1 */
  font-size: 12px;
  font-weight: 600;
}
.term-chip .chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: none;
  border-radius: 3px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.term-chip .chip-remove:hover:not(:disabled),
.term-chip .chip-remove:focus-visible {
  background: rgba(30, 58, 95, 0.14);
}
.add-term {
  width: 110px;
  padding: 3px 8px;
  font-size: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.add-term:focus {
  border-style: solid;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg);
}

/* E13 — consequence banner. Muted by default; amber when incomplete. */
.consequence-banner {
  margin: 0 0 12px 0;
  padding: 8px 12px;
  border-radius: var(--radius);
  background: var(--accent-bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.5;
}
.consequence-banner.incomplete {
  background: var(--warn-bg);
  border-color: #e7c97a;
  color: var(--warn);
}

/* E5 — documented-events timeline. */
.events-section {
  margin-top: 16px;
}
.events-heading {
  margin: 0 0 8px 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.events-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.event-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 6px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.event-row:last-child {
  border-bottom: 1px solid var(--border);
}
.event-row:hover,
.event-row:focus-visible {
  background: var(--accent-bg);
  outline: none;
}
.event-date {
  flex: 0 0 auto;
  min-width: 84px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.event-desc {
  flex: 1 1 auto;
  font-size: 13.5px;
  line-height: 1.45;
}
.event-page {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

/* D-UI-4 — diagnostic empty state (not "no items found"). */
.events-empty {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: #faf9f7;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}
.events-empty strong {
  display: block;
  margin-bottom: 4px;
}
.events-empty ul {
  margin: 6px 0 0 0;
  padding-left: 18px;
  color: var(--text-muted);
}

/* P3.1 — Tier 1 matched-sites (deterministic citation floor). Mirrors the
   events timeline + consequence-banner look; reuses existing tokens. */
.sites-section {
  margin-top: 16px;
}
.sites-heading {
  margin: 0 0 2px 0;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.sites-subhead {
  margin: 0 0 8px 0;
}
.sites-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 6px;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.site-row:last-child {
  border-bottom: 1px solid var(--border);
}
.site-row:hover,
.site-row:focus-visible {
  background: var(--accent-bg);
  outline: none;
}
.site-page {
  flex: 0 0 auto;
  min-width: 56px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.site-bates {
  flex: 0 0 auto;
  min-width: 96px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.site-status {
  flex: 0 0 auto;
  min-width: 64px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.site-excerpt {
  flex: 1 1 auto;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}
.sites-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.sites-footer .muted {
  font-size: 12px;
}
#sites-more-btn {
  font-size: 12px;
  padding: 4px 12px;
}
#sites-notice {
  margin: 0 0 10px 0;
}
