:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --primary: #123b73;
  --primary-2: #1d5fa7;
  --border: #d9e1ec;
  --green: #16803c;
  --yellow: #af7500;
  --red: #b42318;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary-2); text-decoration: none; }
.topbar { height: 68px; padding: 0 28px; background: #fff; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 800; color: var(--primary); font-size: 20px; }
.brand span { font-weight: 500; color: var(--muted); }
nav { display: flex; gap: 18px; }
.container { max-width: 1120px; margin: 0 auto; padding: 28px 20px 60px; }
.hero { display: grid; grid-template-columns: 1.4fr .8fr; gap: 22px; align-items: stretch; margin-bottom: 22px; }
.hero h1, h1 { font-size: 38px; line-height: 1.1; margin: 10px 0 12px; color: var(--primary); }
h2 { margin-top: 0; color: var(--primary); }
.lead { font-size: 18px; line-height: 1.6; color: #344054; max-width: 760px; }
.lead-small { font-size: 17px; line-height: 1.55; }
.badge { display: inline-flex; padding: 6px 10px; border-radius: 999px; background: #eaf2ff; color: var(--primary); font-size: 13px; font-weight: 700; }
.card, .hero-card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: 0 8px 30px rgba(21, 45, 80, .06); }
.hero-card { font-size: 16px; }
.narrow { max-width: 640px; margin: 30px auto; }
.form label { display: flex; flex-direction: column; gap: 7px; font-weight: 700; }
.form input { width: 100%; padding: 12px 13px; border: 1px solid var(--border); border-radius: 12px; font-size: 15px; background: #fff; }
.form small { color: var(--muted); font-weight: 400; line-height: 1.35; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.consents { margin: 18px 0; display: grid; gap: 10px; color: #344054; }
.consents label { flex-direction: row; font-weight: 500; }
.consents input { width: auto; }
.button { border: 0; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; background: var(--primary); color: white; border-radius: 12px; font-weight: 800; cursor: pointer; font-size: 15px; }
.button.secondary { background: #eef2f7; color: var(--primary); }
.alert { padding: 14px 16px; border-radius: 14px; margin: 16px 0; }
.alert.error { background: #fff1f0; color: var(--red); border: 1px solid #ffc9c2; }
.mock-sms { padding: 18px; background: #f8fafc; border: 1px dashed var(--border); border-radius: 14px; margin: 18px 0; }
dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px; }
dt { color: var(--muted); }
dd { margin: 0; font-weight: 700; }
.result-head { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 24px; display: flex; justify-content: space-between; align-items: center; }
.result-head h1 { margin-bottom: 4px; }
.segment { font-size: 28px; font-weight: 900; padding: 16px 20px; border-radius: 18px; background: #eef2f7; }
.result-head.зеленый .segment { background: #dcfae6; color: var(--green); }
.result-head.желтый .segment { background: #fff4d6; color: var(--yellow); }
.result-head.красный .segment { background: #ffe4e0; color: var(--red); }
.metric { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 18px; }
.metric span { display: block; color: var(--muted); margin-bottom: 8px; }
.metric strong { font-size: 24px; color: var(--primary); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ok { color: var(--green); font-weight: 800; }
pre { white-space: pre-wrap; word-break: break-word; background: #0b1220; color: #d1e7ff; padding: 16px; border-radius: 14px; overflow: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; }
.row-between { display: flex; justify-content: space-between; align-items: center; }
@media (max-width: 760px) {
  .hero, .grid, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .topbar { height: auto; padding: 14px 18px; flex-direction: column; gap: 10px; align-items: flex-start; }
  .hero h1, h1 { font-size: 30px; }
  .result-head { flex-direction: column; align-items: flex-start; gap: 12px; }
}
.report-matrix th, .report-matrix td { min-width: 150px; }
.report-matrix th:nth-child(4), .report-matrix td:nth-child(4),
.report-matrix th:nth-child(5), .report-matrix td:nth-child(5) { min-width: 240px; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eef2f7; color: var(--primary); font-size: 12px; font-weight: 800; }
.status-available, .status-completed { background: #dcfae6; color: var(--green); }
.status-manual-review, .status-partial { background: #fff4d6; color: var(--yellow); }
.status-failed, .status-unavailable { background: #ffe4e0; color: var(--red); }
.status-not-requested { background: #eef2f7; color: var(--muted); }
.compact-list p { margin: 0 0 6px; }
.kv-list { grid-template-columns: minmax(120px, .8fr) minmax(140px, 1fr); gap: 6px 10px; margin: 0; font-size: 13px; }
.kv-list dt { overflow-wrap: anywhere; }
.kv-list dd { font-weight: 600; overflow-wrap: anywhere; }
code { background: #eef2f7; border-radius: 6px; padding: 2px 5px; }
