:root {
  --navy: #101b36;
  --navy-soft: #1a2949;
  --ink: #232a38;
  --muted: #777d88;
  --paper: #f8f7f4;
  --card: #ffffff;
  --line: #e7e3dc;
  --gold: #a77c4e;
  --gold-pale: #f4eee6;
  --green: #28724b;
  --green-pale: #edf5ef;
  --red: #a84b45;
  --red-pale: #fbefed;
  --shadow: 0 16px 42px rgba(27, 35, 52, 0.07);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }

.topbar {
  min-height: 74px;
  padding: 0 max(28px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 700; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: #e3bd8c; background: var(--navy); border-radius: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .03em;
}
.topbar-label, .eyebrow, .detail-label { letter-spacing: .11em; font-size: 10px; font-weight: 700; }
.topbar-label { color: #8a8379; }

.page-shell { width: min(100% - 48px, 900px); margin: 0 auto; }
.intro { padding: 64px 0 27px; }
.eyebrow { margin: 0; color: var(--gold); }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--gold); }
h1 { margin: 17px 0 12px; color: var(--navy); font-size: clamp(36px, 5vw, 54px); line-height: 1.08; letter-spacing: -.035em; }
h1 span { color: var(--gold); }
.intro-copy { max-width: 570px; color: #687080; font-size: 16px; }

.search-card, .result { border: 1px solid rgba(16, 27, 54, .07); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.search-card { padding: 24px; }
label { display: block; margin-bottom: 10px; color: var(--navy); font-size: 13px; font-weight: 700; }
.search-row { display: flex; gap: 12px; }
.input-wrap { min-width: 0; flex: 1; display: flex; align-items: center; gap: 11px; padding: 0 14px; border: 1px solid #dcdfe4; border-radius: 8px; background: #fff; transition: border .18s, box-shadow .18s; }
.input-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(167, 124, 78, .12); }
.input-wrap svg { width: 21px; height: 21px; flex: none; color: #969ba4; }
.input-wrap input { width: 100%; height: 48px; min-width: 0; border: 0; outline: 0; color: var(--navy); background: transparent; font-size: 15px; }
.input-wrap input::placeholder { color: #a6aab2; }
button[type="submit"] { min-width: 190px; padding: 0 20px; border: 0; border-radius: 8px; color: #fff; background: var(--navy); font-size: 13px; font-weight: 700; cursor: pointer; transition: background .18s, transform .18s; }
button[type="submit"]:hover { background: var(--navy-soft); transform: translateY(-1px); }
button[type="submit"]:focus-visible, a:focus-visible { outline: 3px solid rgba(167, 124, 78, .42); outline-offset: 3px; }
button[type="submit"]:disabled { opacity: .76; cursor: wait; transform: none; }
.input-hint { margin: 8px 0 0; color: #858b96; font-size: 12px; }
.spinner { display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.45); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.status-message { margin: 18px 0 0; padding: 13px 16px; border-radius: 8px; font-size: 13px; }
.status-info, .status-loading { color: var(--navy); background: #edf1f6; }
.status-error { color: #8d332d; background: var(--red-pale); border: 1px solid #f1d9d5; }
.result { margin-top: 22px; padding: 26px; }
.result-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.result-heading h2 { max-width: 620px; margin: 9px 0 3px; color: var(--navy); font-size: clamp(21px, 3vw, 28px); line-height: 1.25; overflow-wrap: anywhere; }
.company-short-name { color: var(--muted); font-size: 13px; }
.status-pill { flex: none; margin-top: 2px; padding: 6px 11px; border-radius: 99px; color: var(--navy); background: #eff0f2; font-size: 11px; font-weight: 700; }
.status-pill.is-active { color: var(--green); background: var(--green-pale); }
.status-pill.is-other { color: #855c28; background: var(--gold-pale); }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 20px 0 22px; }
.detail-card { min-height: 86px; padding: 15px 16px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; border: 1px solid #ece9e3; border-radius: 9px; background: #fffefa; }
.detail-wide { grid-column: 1 / -1; }
.detail-label { color: #89867e; }
.detail-card strong { color: var(--navy); font-size: 14px; overflow-wrap: anywhere; }
.detail-card .number-value { font-variant-numeric: tabular-nums; letter-spacing: .025em; }
.detail-sub { color: var(--muted); font-size: 12px; }
.risk-section { padding-top: 21px; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-heading h3 { margin: 5px 0 0; color: var(--navy); font-size: 19px; }
.section-note { color: #8a8f98; font-size: 11px; }
.risk-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; list-style: none; }
.risk-item { min-height: 47px; padding: 10px 12px; display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; align-items: center; border-radius: 7px; font-size: 12px; }
.risk-clear { color: #385b46; background: #f0f6f1; }
.risk-flagged { color: #843e37; background: #fbf0ee; }
.risk-icon { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.8); font-size: 11px; font-weight: 700; }
.risk-item strong { font-size: 10px; font-weight: 700; white-space: nowrap; }
.risk-empty { grid-column: 1 / -1; padding: 13px; color: #777d88; background: #f6f5f2; border-radius: 7px; font-size: 12px; }
.result-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 17px; color: #898f99; font-size: 11px; }
.footer { padding: 37px 0 25px; text-align: center; }
.source { margin: 0; color: #6d7380; font-size: 12px; }
.source a { color: var(--navy); font-weight: 700; text-decoration: underline; text-decoration-color: #c5a783; text-underline-offset: 3px; }
.disclaimer { max-width: 680px; margin: 6px auto 0; color: #989ca4; font-size: 10px; }
.footer-mark { margin: 19px 0 0; color: #99958d; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.footer-mark span { color: var(--gold); }

[hidden] { display: none !important; }
@media (max-width: 600px) {
  .topbar { min-height: 64px; padding: 0 18px; }
  .topbar-label { display: none; }
  .page-shell { width: calc(100% - 36px); }
  .intro { padding-top: 45px; }
  .intro-copy { font-size: 14px; }
  .search-card { padding: 18px; }
  .search-row { flex-direction: column; }
  button[type="submit"] { min-height: 48px; }
  .result { padding: 19px; }
  .result-heading { flex-direction: column; }
  .risk-list { grid-template-columns: 1fr; }
  .result-meta { flex-direction: column; gap: 4px; }
}
