:root {
  color-scheme: dark;
  --background: oklch(0.16 0.012 265);
  --surface: oklch(0.195 0.013 265);
  --surface-soft: oklch(0.18 0.012 265);
  --foreground: oklch(0.96 0.005 265);
  --muted: oklch(0.79 0.01 265);
  --border: oklch(0.31 0.012 265);
  --accent: oklch(0.8 0.07 82);
  --accent-ink: oklch(0.17 0.015 265);
  --danger: oklch(0.68 0.16 28);
  --success: oklch(0.73 0.12 150);
  --radius: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 72% 12%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 27rem),
    var(--background);
  color: var(--foreground);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

button, input { font: inherit; }
a { color: inherit; }

.site-header {
  min-height: 86px;
  padding: 18px clamp(22px, 5vw, 72px);
  border-bottom: 1px solid color-mix(in oklab, var(--border) 65%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: var(--radius); display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-family: "Playfair Display", serif; font-size: 24px; font-weight: 600;
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 14px; font-weight: 600; letter-spacing: 0.02em; }
.brand small, .header-note { color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

main { max-width: 1400px; margin: 0 auto; padding: 0 clamp(22px, 5vw, 72px); }

.hero {
  min-height: 590px;
  padding: clamp(64px, 9vw, 118px) 0 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(530px, 0.9fr);
  align-items: center;
  gap: clamp(40px, 5vw, 78px);
}

.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.24em; }
h1, h2, h3 { margin: 0; font-family: "Playfair Display", serif; font-weight: 500; letter-spacing: -0.025em; }
h1 { max-width: 740px; font-size: clamp(46px, 6vw, 76px); line-height: 1.08; }
h1 em { color: var(--accent); font-weight: 500; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.15; }
h3 { font-size: clamp(28px, 3vw, 38px); line-height: 1.18; }
.lead { max-width: 640px; margin: 28px 0 0; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); }

.search-panel {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
  border-radius: 16px;
  background: color-mix(in oklab, var(--surface) 72%, transparent);
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.22);
}

label { display: block; margin-bottom: 12px; font-size: 13px; font-weight: 600; }
.search-row { display: grid; grid-template-columns: minmax(270px, 1fr) auto; gap: 10px; }
.search-row button { padding-inline: 18px; gap: 14px; }
input {
  width: 100%; min-width: 0; height: 54px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--radius); outline: none;
  background: var(--background); color: var(--foreground); font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder { color: color-mix(in oklab, var(--muted) 62%, transparent); }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 15%, transparent); }
button {
  height: 54px; padding: 0 20px; border: 1px solid var(--accent); border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center; gap: 18px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}
button:hover { transform: translateY(-1px); filter: brightness(1.04); }
button:disabled { opacity: 0.62; cursor: wait; transform: none; }
.form-meta { min-height: 24px; margin-top: 10px; display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 11px; }
.api-state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--muted); }
.api-state.ready::before { background: var(--success); }
.api-state.missing::before { background: var(--danger); }
.form-message { min-height: 1.7em; margin: 8px 0 0; color: color-mix(in oklab, var(--danger) 88%, white); font-size: 13px; }

.result { padding: 78px 0 96px; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.result-heading { margin-bottom: 34px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.muted { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.status-badge { padding: 8px 13px; border: 1px solid color-mix(in oklab, var(--success) 52%, var(--border)); border-radius: 999px; color: var(--success); font-size: 12px; white-space: nowrap; }
.status-badge.inactive { border-color: color-mix(in oklab, var(--danger) 52%, var(--border)); color: color-mix(in oklab, var(--danger) 88%, white); }

.summary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.base-grid { grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr); }
.info-card {
  min-height: 230px; padding: 28px; position: relative; overflow: hidden;
  border: 1px solid color-mix(in oklab, var(--border) 55%, transparent); border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in oklab, var(--accent) 3%, transparent), transparent 45%),
    color-mix(in oklab, var(--surface-soft) 76%, transparent);
  box-shadow: 0 18px 50px rgb(0 0 0 / 0.12);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease, background-color 0.24s ease;
}
.info-card::before { content: ""; position: absolute; inset: 0 auto auto 0; width: 74px; height: 1px; background: var(--accent); }
.info-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--accent) 28%, var(--border));
  background-color: color-mix(in oklab, var(--surface) 95%, var(--accent));
  box-shadow: 0 22px 56px rgb(0 0 0 / 0.17), 0 0 0 1px color-mix(in oklab, var(--accent) 5%, transparent);
}
.card-topline { margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.card-topline .card-label { margin-bottom: 0; }
.card-index { color: color-mix(in oklab, var(--muted) 60%, transparent); font-family: "Playfair Display", serif; font-size: 18px; }
.card-label { margin: 0 0 22px; color: var(--accent); font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.details-list { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 36px; }
.details-list div { min-width: 0; }
.details-list .wide-detail { grid-column: 1 / -1; }
.details-list dt { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.details-list dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.metric { display: flex; align-items: baseline; gap: 10px; }
.metric strong, .metric:not(:has(strong)) { font-family: "Playfair Display", serif; font-size: 40px; line-height: 1; font-weight: 500; }
.metric span { color: var(--muted); font-size: 12px; }
.metric-note { min-height: 1.5em; margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.risk-list { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.risk-list li { padding-left: 16px; position: relative; color: var(--muted); font-size: 13px; }
.risk-list li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--danger); }
.risk-list.clear li::before { background: var(--success); }
.records-list { display: grid; gap: 10px; }
.record { padding-top: 10px; border-top: 1px solid color-mix(in oklab, var(--border) 45%, transparent); font-size: 12px; }
.record-row { display: flex; justify-content: space-between; gap: 12px; }
.record a { color: var(--foreground); text-underline-offset: 3px; }
.record .record-meta { color: var(--muted); }
.empty { color: var(--muted); font-size: 13px; }
.result-meta { margin: 18px 0 0; color: var(--muted); font-size: 11px; }

.registry-section { margin-top: 54px; }
.section-heading { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.registry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.registry-card { min-height: 270px; }
.disclosure-button {
  width: 100%; height: 44px; margin-top: 24px; padding: 0 14px 0 16px;
  border-color: color-mix(in oklab, var(--accent) 45%, var(--border));
  justify-content: space-between; background: transparent; color: var(--accent); font-size: 12px; font-weight: 500;
}
.disclosure-button:hover { background: color-mix(in oklab, var(--accent) 7%, transparent); }
.disclosure-button:disabled { opacity: 0.45; cursor: default; }
.disclosure-icon { font-size: 19px; font-weight: 400; line-height: 1; }
.records-panel { margin-top: 22px; padding-top: 8px; border-top: 1px solid color-mix(in oklab, var(--border) 55%, transparent); }
[hidden] { display: none !important; }

footer {
  padding: 34px clamp(22px, 5vw, 72px) 42px;
  border-top: 1px solid color-mix(in oklab, var(--border) 55%, transparent);
  text-align: center;
}
footer p { margin: 0; font-size: 13px; }
footer a { color: var(--accent); text-underline-offset: 3px; }
.disclaimer { margin-top: 7px; color: var(--muted); font-size: 10px; }

@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 72px; }
  .search-panel { width: min(100%, 680px); }
}

@media (max-width: 900px) {
  .base-grid { grid-template-columns: 1fr; }
  .registry-section { margin-top: 42px; }
}

@media (max-width: 640px) {
  .site-header { min-height: 72px; }
  .header-note { display: none; }
  .hero { padding: 56px 0 68px; gap: 38px; }
  .search-row { grid-template-columns: 1fr; }
  button { width: 100%; }
  .form-meta { flex-direction: column; gap: 2px; }
  .result { padding: 58px 0 72px; }
  .result-heading { flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr; }
  .details-list { grid-template-columns: 1fr; }
  .details-list .wide-detail { grid-column: auto; }
  .info-card { padding: 22px; }
  .card-topline { align-items: flex-start; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .registry-grid { grid-template-columns: 1fr; }
  .registry-card { min-height: 250px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
