:root {
  color-scheme: dark;
  --ink: #f5f1e8;
  --muted: #a7aaad;
  --paper: #101313;
  --panel: #181c1b;
  --line: #343b38;
  --lime: #c7ff5e;
  --amber: #ffbd59;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgba(199, 255, 94, 0.12), transparent 30rem),
    var(--paper);
}

.shell { width: min(920px, calc(100% - 2rem)); margin: 0 auto; padding: 5rem 0 2rem; }
.hero { max-width: 760px; margin-bottom: 3rem; }
.eyebrow { color: var(--lime); font: 700 0.75rem/1.4 ui-monospace, monospace; letter-spacing: 0.12em; text-transform: uppercase; }
h1 { margin: 0.5rem 0 1rem; font-size: clamp(3rem, 9vw, 6.8rem); line-height: 0.88; letter-spacing: -0.07em; }
h1 span { color: var(--lime); }
.lede { max-width: 620px; color: var(--muted); font-size: 1.15rem; line-height: 1.65; }

.panel { border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.25rem, 4vw, 2rem); background: rgba(24, 28, 27, 0.92); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24); }
.panel + .panel { margin-top: 1.25rem; }
h2, h3 { margin-top: 0; }
.catalog-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.catalog-table th, .catalog-table td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.catalog-table th { color: var(--muted); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.catalog-table code { font-size: 0.82rem; color: var(--lime); }
form, .refs-form { display: grid; grid-template-columns: minmax(150px, 0.35fr) 1fr auto; gap: 1rem; align-items: end; }
.caller-name { color: var(--muted); font-size: 0.85rem; }
.refs-list .location { color: var(--amber); }
.field { min-width: 0; }
label { display: block; margin-bottom: 0.5rem; color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
input, select, button { width: 100%; min-height: 48px; border-radius: 10px; font: inherit; }
input, select { border: 1px solid var(--line); padding: 0 0.85rem; color: var(--ink); background: #0d1010; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
button { width: auto; border: 0; padding: 0 1.1rem; background: var(--lime); color: #101313; font-weight: 800; cursor: pointer; }
button:hover { filter: brightness(0.9); }
.help { margin: 0.5rem 0 0; color: var(--muted); font-size: 0.8rem; }

.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.result-heading h2 { margin-bottom: 0; }
.status { border-radius: 999px; padding: 0.35rem 0.7rem; font: 700 0.7rem/1 ui-monospace, monospace; text-transform: uppercase; }
.status.found { color: var(--lime); background: rgba(199, 255, 94, 0.1); }
.status.refused { color: var(--amber); background: rgba(255, 189, 89, 0.1); }
.answer { margin: 1.5rem 0; white-space: pre-line; line-height: 1.65; }
.citations { padding-left: 1.4rem; }
.citations li { margin-bottom: 1rem; padding-left: 0.4rem; }
.location { color: var(--lime); }
.citation-line { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.copy-location { min-height: 28px; border: 1px solid var(--line); border-radius: 8px; padding: 0 0.55rem; background: transparent; color: var(--muted); font: 700 0.68rem/1 ui-monospace, monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.copy-location:hover { border-color: var(--lime); color: var(--lime); filter: none; }
.copy-location.copied { border-color: var(--lime); color: var(--lime); }
pre { overflow-x: auto; margin: 0.65rem 0 0; border-left: 2px solid var(--line); padding: 0.75rem 1rem; color: #d2d5d3; background: #0d1010; white-space: pre-wrap; }
.refusal-note { border-left: 2px solid var(--amber); padding-left: 1rem; color: var(--muted); }
.request-id { margin: 1.5rem 0 0; color: var(--muted); font-size: 0.78rem; }
footer { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; padding: 2rem 0 0; color: var(--muted); font: 0.72rem/1.4 ui-monospace, monospace; text-transform: uppercase; }

@media (max-width: 760px) {
  .shell { padding-top: 3rem; }
  form, .refs-form { grid-template-columns: 1fr; }
  button { width: 100%; }
  .copy-location { width: auto; }
}

@media (prefers-reduced-motion: no-preference) {
  .panel { animation: enter 380ms ease-out both; }
  .result { animation-delay: 80ms; }
  @keyframes enter { from { opacity: 0; transform: translateY(8px); } }
}
