:root {
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(30, 41, 59, 0.9);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(34, 197, 94, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #22c55e;
  --brand-dark: #16a34a;
  --brand-ink: #052e16;
  --danger: #fb7185;
  --warning: #facc15;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at top right, rgba(20, 83, 45, 0.42), transparent 38rem),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(16px);
}

.topbar__inner {
  width: min(1180px, calc(100% - 32px));
  height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.28);
}

.brand__mark svg {
  width: 23px;
  height: 23px;
  fill: white;
}

.brand__text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand__text span {
  color: var(--brand);
}

.topbar__link,
.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  padding: 0 20px;
  color: white;
  background: var(--brand);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.button:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.topbar__link {
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.topbar__link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 50px;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  max-width: 840px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 0.98;
  font-weight: 800;
}

h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
}

h3 {
  font-size: 24px;
  line-height: 1.2;
}

.lead {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 19px;
  line-height: 1.65;
}

.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.search-card,
.company-card,
.panel,
.info-card,
.state {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.search-card {
  padding: 22px;
}

.search-card label {
  display: block;
  margin-bottom: 9px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 700;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.58);
  outline: none;
}

input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.state {
  padding: 20px;
  color: var(--soft);
  background: rgba(255, 255, 255, 0.06);
}

.state--empty {
  color: var(--muted);
}

.state--error {
  border-color: rgba(251, 113, 133, 0.42);
  color: #fecdd3;
}

.result {
  display: grid;
  gap: 18px;
}

.company-card {
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.14), transparent 38%),
    var(--panel);
}

.company-card__top,
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.status-pill {
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--brand-ink);
  background: var(--brand);
  font-weight: 800;
  white-space: nowrap;
}

.status-pill--warning {
  color: #422006;
  background: var(--warning);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.info-card {
  min-height: 135px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  background: rgba(30, 41, 59, 0.72);
}

.info-card__label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.info-card strong {
  color: var(--text);
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.panel {
  padding: 24px;
}

.leader-box,
.address {
  margin-top: 16px;
  color: var(--soft);
  line-height: 1.6;
}

.leader-box strong {
  display: block;
  color: var(--text);
  font-size: 22px;
  line-height: 1.25;
}

.leader-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag,
.risk-card__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
}

.tag {
  color: var(--brand-ink);
  background: var(--brand);
}

.tag--risk,
.risk-card--bad .risk-card__badge {
  color: white;
  background: var(--danger);
}

.risks-panel {
  background: rgba(15, 23, 42, 0.86);
}

.request-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.risk-card {
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(30, 41, 59, 0.72);
}

.risk-card--ok {
  border-color: rgba(34, 197, 94, 0.28);
}

.risk-card--bad {
  border-color: rgba(251, 113, 133, 0.45);
}

.risk-card__badge {
  color: var(--brand-ink);
  background: var(--brand);
}

.risk-card h4 {
  margin: 16px 0 8px;
  font-size: 17px;
}

.risk-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 38px;
  color: var(--muted);
  font-size: 13px;
}

.footer a {
  color: var(--brand);
}

.footer small {
  display: block;
  margin-top: 6px;
  color: rgba(148, 163, 184, 0.72);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .intro,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .info-grid,
  .risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar__inner,
  .page,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .topbar__inner {
    height: 68px;
  }

  .brand__text {
    font-size: 18px;
  }

  .topbar__link {
    display: none;
  }

  .page {
    padding-top: 34px;
  }

  .search-row,
  .info-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }

  .company-card__top,
  .section-head {
    display: grid;
  }

  .search-card,
  .company-card,
  .panel {
    padding: 18px;
  }
}
