:root {
  color-scheme: dark;
  --bg: #131313;
  --surface: #1c1c1c;
  --gold: #d4af37;
  --text: #f5f5f5;
  --muted: #b5b5b0;
  --line: #383835;
  --error: #ffb4a5;
  --display: "Unbounded", sans-serif;
  --sans: "Inter", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { color: var(--bg); background: var(--gold); }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font: 1rem/1.65 var(--sans);
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3, p, dl, dd { margin: 0; }
a { color: inherit; }
a:hover { color: var(--gold); }

button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

.wrap {
  width: min(960px, calc(100% - 64px));
  margin-inline: auto;
}

.header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 80px; display: flex; align-items: center; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  font: 500 .8125rem/1.4 var(--display);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #72602c;
  border-radius: 50%;
  color: var(--gold);
}

main { flex: 1; padding-block: clamp(48px, 8vw, 93px) 76px; }
.intro { margin-bottom: 32px; }

h1, h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(1.625rem, 5.4vw, 3.25rem);
  line-height: 1.22;
}

h1 span { color: var(--gold); white-space: nowrap; }
.intro p { max-width: 54ch; margin-top: 20px; color: var(--muted); }

.panel {
  padding: clamp(19px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.lookup label { display: block; margin-bottom: 8px; font-size: .875rem; font-weight: 600; }
.lookup-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }

.lookup input {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  border: 1px solid #5a5a54;
  border-radius: 9px;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: tabular-nums;
}

.lookup input::placeholder { color: #a3a39c; }
.lookup input[aria-invalid="true"] { border-color: var(--error); }

.lookup button {
  min-height: 54px;
  min-width: 159px;
  padding: 12px 23px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: var(--bg);
  background: var(--gold);
  font-weight: 700;
  cursor: pointer;
}

.lookup button:hover:not(:disabled) { background: #e9c85e; }
.lookup button:disabled { opacity: .72; cursor: progress; }

.hint, .feedback { margin-top: 10px; color: var(--muted); font-size: .875rem; }
.feedback:empty, .risk-list:empty, .full-name:empty { display: none; }
.feedback[data-error="true"], .noscript { color: var(--error); }
.noscript { margin-top: 14px; }

.result { margin-top: 18px; }
.result-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  justify-content: space-between;
  gap: 14px 24px;
}

.result-heading > div { max-width: 100%; }
.registry { margin-bottom: 6px; color: var(--muted); font-size: .875rem; }
.result h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); line-height: 1.35; }
.full-name { margin-top: 7px; color: var(--muted); overflow-wrap: anywhere; }

.status-tag {
  max-width: min(100%, 34ch);
  padding: 5px 11px;
  border: 1px solid #72602c;
  border-radius: 6px;
  color: #e9c85e;
  font-size: .875rem;
  overflow-wrap: anywhere;
}

.status-tag[data-closed="true"] { border-color: #95574c; color: var(--error); }

.details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 28px;
  margin-top: 24px;
  padding-block: 22px;
  border-block: 1px solid var(--line);
}

.result dt { margin-bottom: 3px; color: var(--muted); font-size: .875rem; }
.result dd { white-space: pre-line; overflow-wrap: anywhere; }
.detail-wide { grid-column: 1 / -1; }
.contacts { padding-block: 22px; border-bottom: 1px solid var(--line); }
.contact-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; margin-top: 10px; }
.risks { margin-top: 22px; }
.result h3 { font-size: 1.0625rem; font-weight: 600; }
.risk-list { margin: 8px 0 0; padding: 0; list-style: none; }
.risk-list li {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px 16px;
  padding-block: 10px;
}
.risk-list li + li { border-top: 1px solid var(--line); }
.risk-list small { display: block; color: var(--muted); font-size: .875rem; }
.risk-status { flex-shrink: 0; color: var(--muted); font-size: .875rem; }
.risk-status[data-result="true"] { color: #e9c85e; font-weight: 600; }

.footer { border-top: 1px solid var(--line); }
.footer-inner { display: grid; gap: 6px; padding-block: 22px 23px; }
.footer p { font-size: .875rem; color: var(--muted); }
.footer a { color: var(--gold); text-underline-offset: 3px; }
.footer .disclaimer { font-size: .8125rem; }

@media (max-width: 600px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 64px; }
  main { padding-bottom: 48px; }
  .intro { margin-bottom: 24px; }
  .lookup-row, .details, .contact-details { grid-template-columns: minmax(0, 1fr); }
  .details { gap: 14px; }
}
