:root {
  color-scheme: dark;
  --bg: #121116;
  --panel: #1a1920;
  --stroke: #3e3945;
  --text: #f8f5f2;
  --muted: #c3bbca;
  --amber: #ffbb49;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.shell { width: min(1120px, calc(100% - clamp(24px, 8vw, 112px))); margin-inline: auto; padding-bottom: 42px; }
.top, .section-head, .actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.top { padding: 16px 0; border-bottom: 1px solid var(--stroke); }
.top strong { color: var(--amber); }
.top a { color: var(--muted); font-size: .86rem; text-underline-offset: .18em; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); align-items: center; gap: 24px; padding: clamp(20px, 4vw, 42px) 0; }
.hero img { display: block; width: 100%; height: auto; max-height: 200px; object-fit: contain; }
h1 { font-size: clamp(2.3rem, 6vw, 4.6rem); letter-spacing: -.06em; line-height: 1.02; }
.hero p { max-width: 43ch; margin-top: 10px; color: var(--muted); }
h2 { font-size: clamp(1.2rem, 3vw, 1.65rem); letter-spacing: -.025em; }
h3 { font-size: 1.02rem; }
.panel { padding: clamp(14px, 2.8vw, 24px); margin-bottom: 16px; border: 1px solid var(--stroke); border-radius: 17px; background: var(--panel); }
form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; margin: 12px 0 8px; }
label { display: grid; gap: 5px; font-size: .88rem; font-weight: 650; }
select, button { min-height: 43px; padding: 7px 12px; border-radius: 9px; font: inherit; }
select { width: 100%; min-width: 0; border: 1px solid var(--stroke); background: var(--bg); color: var(--text); }
button { border: 1px solid transparent; cursor: pointer; font-weight: 650; }
button:disabled { opacity: .58; cursor: default; }
.primary { background: var(--amber); color: #211606; }
.primary:not(:disabled):hover { background: #ffd17e; }
.secondary { border-color: var(--stroke); background: transparent; color: var(--text); }
.secondary:not(:disabled):hover { border-color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.note { color: var(--muted); font-size: .87rem; }
.section-head { margin-bottom: 10px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .88rem; }
th, td { border-bottom: 1px solid var(--stroke); padding: 9px 7px; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
td input { accent-color: var(--amber); width: 19px; height: 19px; cursor: pointer; }
td small { display: block; color: var(--muted); }
.badge { display: inline-block; font-size: .76rem; border-radius: 999px; padding: 4px 8px; }
.high, .confirmed { background: #173932; color: #b2edda; }
.medium, .candidate { background: #513919; color: #ffe1a5; }
.low, .rejected { background: #392e43; color: #e1cce9; }
.actions { justify-content: flex-start; margin-top: 14px; }
.contacts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 243px), 1fr)); }
.contact { min-width: 0; padding: 12px; border: 1px solid var(--stroke); border-radius: 11px; }
.contact ul { padding: 0; margin: 10px 0 0; list-style: none; }
.contact li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 4px 8px; padding: 5px 0; font-size: .88rem; }
.contact li span:first-child { overflow-wrap: anywhere; }
.contact li small { color: var(--muted); grid-column: 1 / -1; }
#export-status:not(:empty) { margin-bottom: 10px; }
@media (max-width: 690px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .hero img { max-height: 150px; }
  form { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  form button { justify-self: start; }
  .score { display: none; }
  th, td { padding-inline: 4px; }
}
