:root {
  --paper: #f2eee6;
  --ink: #14282a;
  --accent: #397f76;
  --accent-bright: #4f9188;
  --muted: #6f7b78;
  --line: rgba(20, 40, 42, 0.16);
  --soft: #e5e0d6;
  --danger: #b84732;
  --danger-soft: #f4dcd3;
  --success: #397f76;
  --success-soft: #dce9e4;
  --white: #fff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

a { color: inherit; }

.site-header {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand,
.footer-brand a {
  width: fit-content;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.06em;
  text-decoration: none;
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-link span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

main { overflow: hidden; }

.hero {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 40px 0 0;
}

.eyebrow,
.result-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
  gap: 56px;
  align-items: end;
  margin-top: 24px;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(56px, 6.4vw, 96px);
  line-height: 0.87;
  letter-spacing: -0.075em;
  font-weight: 900;
}

h1 em,
h2 em {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}

.hero-copy { padding-bottom: 5px; }

.hero-copy > p {
  max-width: 540px;
  margin: 0 0 22px;
  font-size: clamp(17px, 1.45vw, 21px);
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.search-form label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.search-control input {
  width: 100%;
  min-height: 56px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: rgba(255, 255, 255, 0.36);
  color: var(--ink);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.search-control input::placeholder { color: #87918e; }

.search-control input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 4px rgba(57, 127, 118, 0.12);
}

.search-control input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(184, 71, 50, 0.1);
}

.search-control button {
  min-width: 166px;
  min-height: 56px;
  padding: 0 24px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.search-control button:hover { background: var(--accent-bright); }
.search-control button:active { transform: translateY(1px); }
.search-control button:disabled { cursor: wait; opacity: 0.72; }

.button-arrow {
  font-size: 24px;
  line-height: 1;
}

.field-hint,
.form-message {
  margin: 10px 22px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.form-message { min-height: 17px; color: var(--danger); }
.form-message.success { color: var(--accent); }

.trust-strip {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-strip > div {
  min-height: 76px;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.trust-strip > div + div { border-left: 1px solid var(--line); }

.trust-strip strong {
  font-size: 19px;
  letter-spacing: -0.04em;
}

.trust-strip span { color: var(--muted); font-size: 13px; }

.result-section {
  min-height: 390px;
  margin-top: 0;
  background: var(--ink);
  color: var(--paper);
}

.empty-state,
.company-card {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
}

.empty-state {
  min-height: 390px;
  padding: 58px 0;
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) 1.3fr;
  gap: 80px;
  align-items: center;
}

.empty-number {
  color: rgba(242, 238, 230, 0.09);
  font-size: clamp(130px, 16vw, 230px);
  line-height: 0.7;
  font-weight: 900;
  letter-spacing: -0.1em;
}

.empty-state h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 4.3vw, 60px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.empty-state p {
  max-width: 580px;
  margin: 0;
  color: rgba(242, 238, 230, 0.64);
  font-size: 17px;
  line-height: 1.5;
}

.company-card { padding: 48px 0 62px; }

.result-kicker {
  display: flex;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(242, 238, 230, 0.18);
  color: rgba(242, 238, 230, 0.6);
}

.company-header {
  padding: 30px 0 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 50px;
  align-items: end;
}

.status-badge {
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 11px;
  border: 1px solid rgba(242, 238, 230, 0.24);
  border-radius: 999px;
  color: #a9d9cd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 50%;
  background: #70baaa;
}

.status-badge.inactive { color: #e1a594; }
.status-badge.inactive::before { background: #d66a50; }

.company-header h2 {
  max-width: 1100px;
  margin: 0;
  font-size: clamp(38px, 4.7vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

#company-full-name {
  max-width: 900px;
  margin: 14px 0 0;
  color: rgba(242, 238, 230, 0.55);
  font-size: 14px;
  line-height: 1.45;
}

.registry-date {
  max-width: 180px;
  color: rgba(242, 238, 230, 0.55);
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(242, 238, 230, 0.18);
  border-bottom: 1px solid rgba(242, 238, 230, 0.18);
}

.detail-panel {
  position: relative;
  min-width: 0;
  padding: 28px 34px 32px 0;
}

.detail-panel + .detail-panel {
  padding-right: 0;
  padding-left: 34px;
  border-left: 1px solid rgba(242, 238, 230, 0.18);
}

.panel-number {
  margin-bottom: 28px;
  color: rgba(242, 238, 230, 0.35);
  font-size: 12px;
  font-weight: 800;
}

.detail-panel h3 {
  margin: 0 0 20px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

dl { margin: 0; }

.detail-row {
  padding: 12px 0;
  display: grid;
  grid-template-columns: minmax(130px, 0.38fr) 0.62fr;
  gap: 20px;
  border-top: 1px solid rgba(242, 238, 230, 0.14);
}

.detail-row dt {
  color: rgba(242, 238, 230, 0.52);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.detail-row dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.risk-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
}

.risk-count {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(242, 238, 230, 0.1);
  color: rgba(242, 238, 230, 0.7);
  font-size: 12px;
  white-space: nowrap;
}

.risk-summary {
  margin-bottom: 16px;
  padding: 14px 17px;
  border-radius: 14px;
  background: rgba(112, 186, 170, 0.12);
  color: #b8e0d6;
  font-size: 14px;
  line-height: 1.45;
}

.risk-summary.flagged {
  background: rgba(214, 106, 80, 0.13);
  color: #efbaa9;
}

.risk-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.risk-item {
  padding: 10px 0;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  border-top: 1px solid rgba(242, 238, 230, 0.14);
}

.risk-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #70baaa;
}

.risk-item.flagged .risk-dot { background: #d66a50; }

.risk-label { font-size: 14px; line-height: 1.35; }
.risk-note { display: block; margin-top: 4px; color: rgba(242, 238, 230, 0.48); font-size: 12px; }
.risk-state { color: #91cabc; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.risk-item.flagged .risk-state { color: #e89983; }

.site-footer {
  width: min(1440px, calc(100% - 64px));
  min-height: 150px;
  margin: 0 auto;
  padding: 34px 0;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 0.8fr);
  gap: 60px;
  align-items: start;
}

.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand span { color: var(--muted); font-size: 13px; }

.source-note p { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.source-note p a { color: var(--accent); }
.source-note small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }

[hidden] { display: none !important; }

@media (max-width: 960px) {
  .site-header,
  .hero,
  .empty-state,
  .company-card,
  .site-footer { width: min(100% - 40px, 1440px); }

  .hero-grid { grid-template-columns: 1fr; gap: 42px; }
  .hero-copy { max-width: 650px; }
  .details-grid { grid-template-columns: 1fr; }
  .detail-panel { padding-right: 0; }
  .detail-panel + .detail-panel { padding-left: 0; border-top: 1px solid rgba(242, 238, 230, 0.18); border-left: 0; }
  .panel-number { margin-bottom: 36px; }
}

@media (max-width: 680px) {
  .site-header,
  .hero,
  .empty-state,
  .company-card,
  .site-footer { width: min(100% - 28px, 1440px); }

  .site-header { min-height: 60px; grid-template-columns: 1fr auto; }
  .header-note { display: none; }
  .site-link { font-size: 0; }
  .hero { padding-top: 26px; }
  .hero-grid { margin-top: 18px; gap: 24px; }
  h1 { font-size: clamp(48px, 14.5vw, 68px); }
  .hero-copy > p { margin-bottom: 18px; font-size: 16px; }
  .search-control { grid-template-columns: 1fr; }
  .search-control button { min-width: 100%; }
  .trust-strip { grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
  .trust-strip > div { min-height: 68px; padding: 12px 7px; }
  .trust-strip > div + div { border-left: 1px solid var(--line); }
  .trust-strip strong { font-size: 13px; }
  .trust-strip span { font-size: 10px; }
  .empty-state { min-height: 330px; grid-template-columns: 0.45fr 1fr; gap: 22px; align-content: center; }
  .empty-number { font-size: 90px; }
  .empty-state h2 { font-size: 32px; }
  .empty-state p { font-size: 14px; }
  .company-card { padding: 38px 0 48px; }
  .company-header { grid-template-columns: 1fr; gap: 20px; }
  .registry-date { text-align: left; }
  .detail-panel { padding: 24px 0 28px; }
  .detail-row { grid-template-columns: 1fr; gap: 7px; }
  .risk-item { grid-template-columns: 14px minmax(0, 1fr); }
  .risk-state { grid-column: 2; }
  .site-footer { grid-template-columns: 1fr; gap: 32px; }
}

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