:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --text: #16202a;
  --muted: #66717d;
  --line: #dfe4e8;
  --accent: #173f63;
  --accent-2: #0d6b55;
  --warn: #8a5b00;
  --warn-bg: #fff7df;
  --ok-bg: #eaf7f1;
  --shadow: 0 10px 30px rgba(24, 39, 52, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.topbar {
  background: linear-gradient(135deg, #0f2f4c, #173f63 65%, #1d567a);
  color: white;
  padding: 36px 0;
}
.brand-row { display: flex; gap: 24px; justify-content: space-between; align-items: center; }
.eyebrow { font-size: 12px; letter-spacing: .18em; font-weight: 800; opacity: .78; }
h1 { margin: 6px 0 6px; font-size: clamp(28px, 4vw, 42px); line-height: 1.06; }
.subtitle { margin: 0; opacity: .82; }
.badge { border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 9px 14px; white-space: nowrap; font-size: 13px; }
.main-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 20px; margin-top: 24px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 22px; }
.panel h2 { margin: 0 0 18px; font-size: 20px; }
.field-grid { display: grid; gap: 14px; margin-bottom: 14px; }
.field-grid.two { grid-template-columns: 1fr 2fr; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }
label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select {
  width: 100%; border: 1px solid #cfd6dc; background: white; color: var(--text);
  padding: 11px 12px; border-radius: 10px; font: inherit; outline: none;
}
input:focus, select:focus { border-color: #7398b8; box-shadow: 0 0 0 3px rgba(23,63,99,.08); }
.primary { border: 0; background: var(--accent); color: white; padding: 12px 20px; border-radius: 10px; font-weight: 800; cursor: pointer; }
.primary:hover { filter: brightness(1.06); }
.hint { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.info-panel p { color: var(--muted); line-height: 1.55; font-size: 14px; }
.info-panel strong { color: var(--text); }
#status { margin-top: 20px; }
.status { border-radius: 12px; padding: 13px 16px; border: 1px solid var(--line); background: white; }
.status.loading { color: var(--accent); }
.status.error { color: #8d1e1e; background: #fff0f0; border-color: #f1c7c7; }
.results { display: grid; gap: 16px; margin-top: 18px; margin-bottom: 30px; }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 18px; box-shadow: 0 6px 20px rgba(24,39,52,.05); }
.card h3 { margin: 0 0 12px; font-size: 17px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 14px; }
.kv div:nth-child(odd) { color: var(--muted); font-weight: 700; }
.kv div:nth-child(even) { overflow-wrap: anywhere; }
.tag { display: inline-block; border-radius: 999px; padding: 3px 8px; font-size: 12px; background: #eef2f5; margin: 2px 4px 2px 0; }
.tag.ok { background: var(--ok-bg); color: var(--accent-2); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.warning-list { margin: 0; padding-left: 20px; color: #654b0b; }
.warning-list li { margin: 7px 0; line-height: 1.45; }
pre { background: #101820; color: #dbe5ee; border-radius: 12px; padding: 14px; overflow: auto; font-size: 12px; line-height: 1.45; }
.footer { color: var(--muted); font-size: 12px; padding: 16px 0 30px; }
@media (max-width: 850px) {
  .main-grid, .result-grid, .field-grid.two, .field-grid.three { grid-template-columns: 1fr; }
  .brand-row { align-items: flex-start; flex-direction: column; }
  .kv { grid-template-columns: 1fr; gap: 3px; }
  .kv div:nth-child(even) { margin-bottom: 8px; }
}
