:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --ink: #1f2b25;
  --muted: #66736b;
  --line: #dfe4de;
  --accent: #296a4b;
  --accent-strong: #1f563d;
  --gold: #b9832f;
  --danger: #a43b34;
  --ok: #2f7b56;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 24px;
}

.search-panel,
.state-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(31, 43, 37, 0.08);
}

.search-panel {
  padding: 26px;
  align-self: start;
  position: sticky;
  top: 20px;
}

.mark {
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
}

.mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: 0;
}

.lead,
.hint,
.empty-state,
.full-name,
.meta-note {
  color: var(--muted);
}

.lead {
  margin-bottom: 26px;
  font-size: 16px;
  line-height: 1.5;
}

.search-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

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

input,
button {
  height: 48px;
  border-radius: 8px;
  font: inherit;
}

input {
  min-width: 0;
  border: 1px solid #cbd5ce;
  padding: 0 14px;
  color: var(--ink);
}

input:focus {
  outline: 3px solid rgba(41, 106, 75, 0.16);
  border-color: var(--accent);
}

button {
  border: 0;
  padding: 0 18px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

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

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

.hint {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 13px;
}

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

.state-panel {
  min-height: 420px;
  padding: 24px;
}

.empty-state {
  height: 100%;
  min-height: 360px;
  border: 1px dashed #cbd5ce;
  border-radius: 8px;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 24px;
}

.empty-title {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
}

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

h2 {
  margin-bottom: 8px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

.full-name {
  margin-bottom: 0;
  line-height: 1.45;
}

.status-pill {
  flex: 0 0 auto;
  max-width: 220px;
  border: 1px solid rgba(47, 123, 86, 0.35);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--ok);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.status-pill.closed {
  border-color: rgba(164, 59, 52, 0.35);
  color: var(--danger);
}

.risk-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.risk-tag {
  border-radius: 999px;
  padding: 7px 10px;
  background: #eef6f1;
  color: var(--ok);
  font-size: 13px;
  font-weight: 700;
}

.risk-tag.danger {
  background: #faeeee;
  color: var(--danger);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}

.summary-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.summary-grid span,
dt {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.summary-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.details {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}

h3 {
  margin-bottom: 12px;
  font-size: 18px;
  letter-spacing: 0;
}

dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px 18px;
  margin: 0;
}

dd {
  margin: 0;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.person-list {
  display: grid;
  gap: 10px;
}

.person-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
}

.person-card strong,
.person-card span {
  display: block;
}

.person-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.meta-note {
  margin-top: 20px;
  font-size: 13px;
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 20px 0;
  }

  .search-panel {
    position: static;
  }

  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
  }

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

  h1 {
    font-size: 26px;
  }

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

  .result-header {
    display: block;
  }

  .status-pill {
    display: inline-block;
    margin-top: 14px;
  }
}
