:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #15141b;
  background: #f6f5f9;
  font-synthesis: none;
  --ink: #15141b;
  --muted: #6d6978;
  --line: #ddd9e7;
  --purple: #6547e8;
  --purple-dark: #5035c9;
  --purple-soft: #eee9ff;
  --green: #087f5b;
  --red: #b42318;
  --shadow: 0 18px 50px rgba(29, 22, 54, 0.08);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 10% -10%, #e9e2ff 0, transparent 34rem), #f6f5f9; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }

.site-header { height: 72px; padding: 0 max(24px, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(221, 217, 231, .8); background: rgba(255, 255, 255, .82); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--purple); }
.header-actions, .button-group, .candidate-topline, .candidate-actions { display: flex; align-items: center; gap: 10px; }

.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 72px 0 96px; }
.hero { max-width: 820px; margin-bottom: 40px; }
.eyebrow { margin: 0 0 10px; color: var(--purple); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(42px, 7vw, 78px); line-height: .98; letter-spacing: -.06em; }
.hero-copy { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: 20px; line-height: 1.55; }
h2, h3, h4, p { line-height: 1.45; }
h2 { margin: 0 0 5px; font-size: 24px; letter-spacing: -.025em; }
h3 { margin: 0 0 4px; }
h4 { margin-bottom: 8px; }

.panel, .metric, .security-note { background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.panel { padding: 28px; margin-top: 22px; }
.centered { max-width: 660px; text-align: center; margin: 80px auto 0; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.metric { padding: 22px; min-height: 138px; display: flex; flex-direction: column; }
.metric-label { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.metric strong { font-size: 22px; }
.metric-detail { margin-top: auto; color: var(--muted); font-size: 13px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); }

.status-pill { display: inline-flex; width: max-content; max-width: 100%; padding: 6px 10px; border-radius: 999px; background: #eeecf2; color: #56515f; font-size: 12px; font-weight: 700; }
.status-pill.success { background: #e1f5ed; color: var(--green); }
.status-pill.warning { background: #fff0c8; color: #875b00; }
.message { margin: 18px 0; padding: 14px 18px; border: 1px solid #c9bdfd; border-radius: 14px; color: #3f2a9e; background: var(--purple-soft); }
.message.error { border-color: #fecaca; color: var(--red); background: #fff1f1; }

.form-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin-top: 18px; }
label { color: var(--muted); font-size: 13px; font-weight: 700; }
input { display: block; width: 100%; margin-top: 7px; padding: 12px 14px; color: var(--ink); background: white; border: 1px solid #cfc9dc; border-radius: 11px; outline: none; }
input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px rgba(101, 71, 232, .12); }
.fine-print { color: var(--muted); font-size: 12px; margin: 16px 0 0; }

.button { border-radius: 11px; border: 1px solid transparent; padding: 10px 14px; font-weight: 750; }
.button-primary { color: white; background: var(--purple); box-shadow: 0 7px 18px rgba(101, 71, 232, .22); }
.button-primary:hover { background: var(--purple-dark); }
.button-secondary { color: var(--purple-dark); border-color: #c9bdfd; background: var(--purple-soft); }
.button-quiet { color: #403b49; border-color: var(--line); background: white; }
.button-danger { color: var(--red); border-color: #fecaca; background: #fff5f5; }

.control-list { margin-top: 20px; border-top: 1px solid var(--line); }
.control-row { display: flex; justify-content: space-between; gap: 22px; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.control-row p { margin: 4px 0 0; color: var(--muted); }
.inline-status { font-size: 13px; font-weight: 650; }

.empty-state { margin-top: 20px; padding: 28px; text-align: center; color: var(--muted); border: 1px dashed #cfc9dc; border-radius: 14px; }
.candidate { margin-top: 20px; padding: 24px; border: 1px solid #cfc9dc; border-radius: 16px; background: #fbfaff; }
.candidate h3 { margin-top: 16px; font-size: 26px; }
.candidate-summary { font-size: 17px; }
.facts { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.participants { padding-left: 18px; }
.participants li { margin: 7px 0; }
details { margin: 20px 0; color: var(--muted); }
summary { color: var(--ink); font-weight: 750; cursor: pointer; }
.candidate-actions { justify-content: flex-end; }

.security-note { padding: 24px; margin-top: 22px; color: var(--muted); }
.security-note h2 { color: var(--ink); font-size: 17px; }
.security-note .button { margin-top: 12px; }

@media (max-width: 760px) {
  .shell { padding-top: 44px; }
  .summary-grid { grid-template-columns: 1fr; }
  .section-heading, .control-row { flex-direction: column; align-items: stretch; }
  .form-row { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .facts dd { margin-bottom: 8px; }
  .candidate-actions { flex-direction: column-reverse; align-items: stretch; }
  .button-group { flex-wrap: wrap; }
}
