:root {
  --ink: #232323;
  --muted: #6f756d;
  --paper: #fbfaf6;
  --surface: #ffffff;
  --line: #e5e0d7;
  --accent: #9fb944;
  --accent-dark: #718727;
  --warm: #f0c463;
  --danger: #c9563e;
  --shadow: 0 24px 70px rgba(41, 42, 34, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(159, 185, 68, 0.12), transparent 32%),
    linear-gradient(25deg, rgba(240, 196, 99, 0.15), transparent 36%),
    var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 28px;
}

.hero {
  min-height: 520px;
  padding: 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(90deg, rgba(159, 185, 68, 0.12) 0 1px, transparent 1px 72px);
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--accent);
  font-size: 24px;
  font-weight: 800;
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  align-items: end;
  gap: 42px;
  min-height: 390px;
}

.eyebrow,
.section-label {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 690px;
  margin-bottom: 22px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}

.search-panel {
  padding: 26px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.93);
}

.search-panel label {
  display: block;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid #d7d1c5;
  border-radius: 0;
  color: var(--ink);
  background: #fff;
  outline: none;
}

input:focus {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 3px rgba(159, 185, 68, 0.2);
}

button {
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-hint,
.muted {
  color: var(--muted);
}

.form-hint {
  margin: 12px 0 0;
  font-size: 13px;
}

.status-line {
  min-height: 28px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.status-line.error {
  color: var(--danger);
}

.result {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.company-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

h2 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.08;
}

.company-head .muted {
  margin-bottom: 0;
  line-height: 1.45;
}

.status-badge {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid rgba(113, 135, 39, 0.28);
  color: var(--accent-dark);
  background: rgba(159, 185, 68, 0.12);
  font-size: 14px;
  font-weight: 800;
}

.status-badge.closed {
  border-color: rgba(201, 86, 62, 0.28);
  color: var(--danger);
  background: rgba(201, 86, 62, 0.1);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 24px;
  background: var(--line);
  border: 1px solid var(--line);
}

.summary-grid article {
  min-height: 132px;
  padding: 18px;
  background: #fff;
}

.summary-grid span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.summary-grid strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.35;
}

.risk-block {
  margin-top: 28px;
}

.block-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.block-title p {
  margin-bottom: 0;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.risk-item {
  min-height: 74px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fff;
}

.risk-item b {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

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

.risk-item.bad {
  border-color: rgba(201, 86, 62, 0.36);
  background: rgba(201, 86, 62, 0.07);
}

.risk-item.good {
  border-color: rgba(159, 185, 68, 0.34);
  background: rgba(159, 185, 68, 0.08);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin-top: 18px;
  border: 1px dashed #cfc8ba;
  color: var(--muted);
  text-align: center;
}

.empty-line {
  width: min(300px, 65vw);
  height: 8px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--accent), var(--warm));
}

.site-footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a {
  color: var(--ink);
  font-weight: 800;
}

.site-footer small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
}

.is-hidden {
  display: none;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 22px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 42px;
  }

  h1 {
    font-size: 42px;
  }

  .summary-grid,
  .risk-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .hero,
  .result {
    padding: 18px;
  }

  .input-row,
  .summary-grid,
  .risk-grid {
    grid-template-columns: 1fr;
  }

  .company-head,
  .block-title {
    display: block;
  }

  .status-badge {
    display: inline-block;
    margin-top: 16px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 26px;
  }

  .lead {
    font-size: 17px;
  }

  button {
    width: 100%;
  }
}
