:root {
  color-scheme: dark;
  --bg: #0b0d0c;
  --panel: #121613;
  --panel-2: #171c18;
  --line: #2d3730;
  --text: #f1f4ef;
  --muted: #adb6ae;
  --accent: #b7ff4a;
  --good: #7ee787;
  --warn: #f2cc60;
  --danger: #ff7b72;
  --radius: 16px;
  font-family: Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(183,255,74,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(183,255,74,.025) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  color: var(--text);
}
a { color: inherit; }
button, input { font: inherit; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 70px; }
.hero { max-width: 840px; }
.brand, .eyebrow, .source-label {
  color: var(--accent);
  font: 700 .75rem/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .13em;
}
.brand { display: inline-block; text-decoration: none; }
.eyebrow { margin: 48px 0 12px; }
h1 { margin: 0 0 28px; font-size: clamp(2.4rem, 7vw, 4.9rem); line-height: 1; letter-spacing: -.055em; }

.lookup { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(18,22,19,.94); }
.lookup > label { display: block; margin-bottom: 9px; font-weight: 750; }
.input-row { display: flex; gap: 10px; }
input {
  min-width: 0;
  flex: 1;
  border: 1px solid #455147;
  border-radius: 11px;
  background: #090b0a;
  color: var(--text);
  padding: 15px 18px;
  direction: ltr;
  text-align: center;
  font: 700 clamp(1.3rem, 4vw, 1.85rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .11em;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
button { border: 0; border-radius: 11px; padding: 0 30px; background: var(--accent); color: #10140d; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
.hint { margin: 9px 0 0; color: var(--muted); font-size: .88rem; }

.status { margin: 24px 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); color: var(--muted); }
.status.error { border-color: rgba(255,123,114,.5); color: var(--danger); }
.results { margin-top: 26px; }
.summary-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 20px;
  align-items: center;
  padding: clamp(20px,4vw,34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #171d18, #101411);
}
.source-label { margin: 0 0 7px; letter-spacing: .07em; }
.summary-card h2 { margin: 0; font-size: clamp(1.65rem,4vw,2.8rem); line-height: 1.08; }
.subtitle { margin: 9px 0 0; color: var(--muted); }
.plate {
  direction: ltr;
  min-width: 196px;
  padding: 14px 18px;
  border: 4px solid #171717;
  border-radius: 8px;
  background: #ffe900;
  color: #080808;
  text-align: center;
  font: 800 clamp(1.3rem,3.5vw,2rem)/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
}
.badges { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.badge { padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .82rem; }
.badge.good { color: var(--good); border-color: rgba(126,231,135,.4); }
.badge.warning { color: var(--warn); border-color: rgba(242,204,96,.45); }
.badge.danger { color: var(--danger); border-color: rgba(255,123,114,.45); }

.reddit-panel { margin-top: 10px; padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.reddit-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.reddit-heading h2 { margin: 0; font-size: 1.15rem; }
.reddit-heading .source-label { margin-bottom: 5px; }
.reddit-heading button { min-height: 44px; white-space: nowrap; }
.reddit-note, .reddit-status { color: var(--muted); font-size: .78rem; line-height: 1.45; }
.reddit-note { max-width: 850px; margin: 12px 0 0; }
.reddit-status { margin: 10px 0 0; }
.reddit-status.error { color: var(--danger); }
.reddit-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.issue-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.issue-card h3 { margin: 0; font-size: .92rem; line-height: 1.3; }
.issue-count { display: block; margin-top: 4px; color: var(--accent); font: .68rem/1.3 ui-monospace, monospace; }
.issue-links { display: grid; gap: 7px; margin: 11px 0 0; padding: 0; list-style: none; }
.issue-links a { color: var(--text); font-size: .76rem; line-height: 1.35; text-decoration-color: #566058; text-underline-offset: 3px; }
.issue-finding { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.issue-meta { display: block; margin-top: 3px; color: var(--accent); font-size: .64rem; }

.sections { display: grid; gap: 10px; margin-top: 10px; }
.data-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.section-header h2 { margin: 0; font-size: 1rem; }
.section-count { color: var(--accent); font: 700 .72rem/1 ui-monospace, monospace; white-space: nowrap; }
.section-body { padding: 12px 14px 14px; }
.section-note { margin: 0 0 14px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.record + .record { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.record-title { margin: 0 0 10px; color: var(--accent); font-size: .8rem; }
.data-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; margin: 0; border: 1px solid var(--line); background: var(--line); }
.data-grid > div { min-width: 0; padding: 9px 10px; background: var(--panel-2); }
dt { color: var(--muted); font-size: .75rem; line-height: 1.3; }
dd { margin: 4px 0 0; overflow-wrap: anywhere; font-size: .89rem; line-height: 1.35; unicode-bidi: plaintext; }
.count-warning-icon { display: inline-block; margin-inline-start: 5px; color: var(--warn); font-size: .72rem; line-height: 1; vertical-align: .08em; unicode-bidi: isolate; }
.boolean-value { display: flex; align-items: center; gap: 6px; unicode-bidi: normal; }
.boolean-icon { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-weight: 900; }
.boolean-value.yes .boolean-icon { background: rgba(126,231,135,.16); color: var(--good); }
.boolean-value.no .boolean-icon { background: rgba(173,182,174,.1); color: var(--muted); }
.boolean-value.unknown .boolean-icon { background: rgba(242,204,96,.12); color: var(--warn); }
.boolean-label { font-weight: 700; }
.raw-value { color: #747d75; font: .66rem/1 ui-monospace, monospace; }
.reconciled-value + .reconciled-value { margin-top: 7px; padding-top: 7px; border-top: 1px dashed #485249; }
.source-agreement { display: block; margin-top: 4px; color: #758077; font: .61rem/1.3 ui-monospace, monospace; overflow-wrap: anywhere; }
.source-conflict { box-shadow: inset 3px 0 0 rgba(242,204,96,.75); }
.source-conflict .source-agreement { color: var(--warn); }
.empty { margin: 0; color: var(--muted); }
.coverage { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: .86rem; line-height: 1.6; }
.source-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.source-links a { color: var(--accent); }

@media (max-width: 820px) {
  .data-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .shell { width: min(100% - 22px, 1180px); padding-top: 20px; }
  .eyebrow { margin-top: 38px; }
  h1 { font-size: clamp(2.25rem, 12vw, 3.4rem); }
  .lookup { padding: 14px; }
  .input-row { flex-direction: column; }
  button { min-height: 51px; }
  .summary-card { grid-template-columns: 1fr; }
  .plate { width: 100%; min-width: 0; }
  .badges { grid-column: auto; }
  .reddit-heading { align-items: stretch; flex-direction: column; }
  .reddit-heading button { width: 100%; }
  .reddit-results { grid-template-columns: 1fr; }
  .data-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .section-header, .section-body { padding-left: 14px; padding-right: 14px; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: transform .15s ease, filter .15s ease; }
  button:hover { transform: translateY(-1px); filter: brightness(1.05); }
}
