:root {
  color-scheme: light;
  --ink: #111b35;
  --muted: #667085;
  --line: #dfe4ec;
  --soft: #f4f7fb;
  --paper: #ffffff;
  --blue: #3157d5;
  --blue-dark: #203d9b;
  --mint: #86f7c5;
  --mint-soft: #e6fff4;
  --amber: #f8bd52;
  --amber-soft: #fff7df;
  --red: #d4485f;
  --red-soft: #fff0f2;
  --shadow: 0 18px 55px rgba(17, 27, 53, 0.1);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: #fbfcfe;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(223, 228, 236, 0.8);
  background: rgba(251, 252, 254, 0.9);
  backdrop-filter: blur(18px);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 850; text-decoration: none; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; color: var(--ink); background: var(--mint); }
.pilot-badge { padding: 5px 8px; border-radius: 999px; color: var(--blue-dark); background: #e9edff; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.topbar nav { display: flex; align-items: center; gap: 8px; }
.topbar nav a { padding: 9px 12px; border-radius: 10px; color: #49536a; text-decoration: none; font-size: 14px; font-weight: 650; }
.topbar nav a:hover { background: var(--soft); color: var(--ink); }

.shell { width: min(1120px, calc(100% - 36px)); margin: 0 auto; padding: 54px 0 90px; }
.shell.narrow { width: min(780px, calc(100% - 36px)); }
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  min-height: calc(100vh - 68px);
  grid-template-columns: 1.12fr .88fr;
  align-items: center;
  gap: 70px;
  padding-top: 40px;
  padding-bottom: 70px;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 620px;
  height: 620px;
  top: -170px;
  right: -250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(134,247,197,.55), rgba(49,87,213,.05) 65%, transparent 66%);
}
.eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; color: var(--blue); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(46px, 6.6vw, 82px); line-height: .98; letter-spacing: -.06em; }
h1 em { color: var(--blue); font-style: normal; }
.hero-copy > p { max-width: 650px; margin-bottom: 30px; color: #59637a; font-size: 20px; line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 13px;
  padding: 0 18px;
  color: #fff;
  background: var(--blue);
  font-weight: 760;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); background: var(--blue-dark); box-shadow: 0 10px 24px rgba(49,87,213,.2); }
.button.secondary { border: 1px solid var(--line); color: var(--ink); background: #fff; box-shadow: none; }
.button.secondary:hover { background: var(--soft); }
.button.ghost { min-height: 38px; padding: 0 12px; color: var(--blue); background: transparent; }
.button.ghost:hover { box-shadow: none; background: #edf1ff; }
.button.danger { background: var(--red); }
.button.small { min-height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }

.pass-preview { position: relative; padding: 30px; border: 1px solid rgba(223,228,236,.9); border-radius: 30px; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.pass-preview::after { content: ""; position: absolute; z-index: -1; inset: 14px -14px -14px 14px; border-radius: 30px; background: var(--mint); opacity: .55; }
.pass-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.pass-top h3 { margin: 6px 0 4px; font-size: 25px; letter-spacing: -.03em; }
.muted { color: var(--muted); }
.micro { color: var(--muted); font-size: 12px; line-height: 1.45; }
.verified-chip, .status-chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 10px; color: #08734a; background: var(--mint-soft); font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-chip.pending { color: #875a00; background: var(--amber-soft); }
.status-chip.neutral { color: #536075; background: var(--soft); }
.stage-list { display: grid; gap: 10px; margin-top: 20px; }
.stage-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; }
.stage-check { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; color: #08734a; background: var(--mint-soft); font-size: 13px; font-weight: 900; }
.stage-row b { display: block; font-size: 14px; }
.stage-row small { color: var(--muted); }
.pass-foot { display: flex; justify-content: space-between; gap: 16px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: -56px; padding-bottom: 70px; }
.step-card { min-height: 170px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.step-card span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--blue); background: #edf1ff; font-weight: 850; }
.step-card h3 { margin: 28px 0 8px; font-size: 18px; }
.step-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.52; }

.constitution { max-width: 980px; }
.constitution-hero { max-width: 850px; padding: 38px 0 58px; }
.constitution-hero h1 { margin-bottom: 26px; font-size: clamp(46px, 6.4vw, 76px); }
.constitution-hero p { max-width: 770px; margin: 0; color: #59637a; font-size: 20px; line-height: 1.6; }
.principles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.principle-card { min-height: 245px; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; }
.principle-card > span { color: var(--blue); font-size: 13px; font-weight: 850; letter-spacing: .08em; }
.principle-card h2 { margin: 38px 0 12px; font-size: 23px; line-height: 1.15; letter-spacing: -.035em; }
.principle-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.58; }
.constitution-close { margin-top: 14px; border-radius: 28px; padding: 42px; color: #fff; background: var(--ink); }
.constitution-close .micro { color: var(--mint); font-weight: 800; letter-spacing: .08em; }
.constitution-close h2 { max-width: 760px; margin: 18px 0 12px; font-size: clamp(28px, 4vw, 42px); line-height: 1.1; letter-spacing: -.04em; }
.constitution-close p { margin: 0; color: #c7d0e3; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 30px; }
.page-head h1 { margin: 8px 0 0; font-size: clamp(36px, 5vw, 58px); }
.page-head p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.55; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: #fff; box-shadow: 0 8px 28px rgba(17,27,53,.04); }
.panel + .panel { margin-top: 16px; }
.panel-title { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-title h2, .panel-title h3 { margin: 0; letter-spacing: -.025em; }
.panel-title p { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #354057; font-size: 13px; font-weight: 750; }
.field input, .field textarea, .field select, .input {
  width: 100%;
  min-height: 45px;
  border: 1px solid #ced5e1;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  outline: none;
  background: #fff;
  transition: border .15s, box-shadow .15s;
}
.field textarea { min-height: 100px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(49,87,213,.12); }
.help { color: var(--muted); font-size: 12px; line-height: 1.45; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.check-card { display: flex; align-items: center; gap: 10px; min-height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.check-card:has(input:checked) { border-color: var(--blue); background: #f1f4ff; }
.check-card input { accent-color: var(--blue); }
.custom-stage-field { margin-top: 12px; }
.custom-stage-field[hidden] { display: none; }
.dropzone { display: grid; min-height: 116px; place-items: center; border: 1.5px dashed #bdc7d8; border-radius: 14px; padding: 20px; color: var(--muted); background: #fafcff; text-align: center; cursor: pointer; }
.dropzone:hover { border-color: var(--blue); background: #f5f7ff; }
.evidence-map-row { display: grid; grid-template-columns: minmax(0, 1fr) 230px; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; background: #fff; }

.candidate-layout, .admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.sticky { position: sticky; top: 88px; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding-bottom: 20px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 18px; top: 32px; bottom: 0; width: 1px; background: var(--line); }
.timeline-dot { display: grid; z-index: 1; width: 36px; height: 36px; place-items: center; border-radius: 12px; color: var(--blue); background: #edf1ff; font-size: 13px; font-weight: 900; }
.timeline-body { padding: 7px 0 0; }
.timeline-body b { display: block; }
.timeline-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.tag { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 8px; color: #536075; background: var(--soft); font-size: 11px; font-weight: 750; }
.tag.reviewed, .tag.participant_confirmed, .tag.company_verified { color: #08734a; background: var(--mint-soft); }
.tag.candidate_claimed { color: #875a00; background: var(--amber-soft); }
.card-list { display: grid; gap: 11px; }
.share-card, .offer-card, .admin-pass, .inbox-card { border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: #fff; }
.share-card-head, .offer-card-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.share-card h4, .offer-card h4, .inbox-card h4 { margin: 0 0 5px; }
.share-card p, .offer-card p, .inbox-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.empty { padding: 28px; border: 1px dashed #c9d1df; border-radius: 15px; color: var(--muted); background: #fafcff; text-align: center; }
.notice { display: flex; gap: 12px; margin-bottom: 16px; border-radius: 15px; padding: 15px 16px; color: #5d4805; background: var(--amber-soft); font-size: 14px; line-height: 1.45; }
.notice.success { color: #075c3d; background: var(--mint-soft); }
.notice.error { color: #912d40; background: var(--red-soft); }
.notice strong { display: block; margin-bottom: 2px; }

.pass-switcher-panel .panel-title { align-items: center; margin-bottom: 12px; }
.pass-switcher { display: grid; gap: 7px; }
.pass-switcher-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 11px 12px;
  color: inherit;
  background: var(--soft);
  text-decoration: none;
  transition: border-color .15s, background .15s, transform .15s;
}
.pass-switcher-item:hover { border-color: #c7d1ea; background: #f0f3fa; transform: translateY(-1px); }
.pass-switcher-item.active { border-color: var(--blue); background: #edf1ff; box-shadow: inset 3px 0 0 var(--blue); }
.pass-switcher-main { min-width: 0; }
.pass-switcher-main b, .pass-switcher-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pass-switcher-main b { margin-bottom: 4px; font-size: 13px; }
.pass-switcher-main small { color: var(--muted); font-size: 11px; }
.status-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.status-dot.published { background: #1aae76; box-shadow: 0 0 0 3px var(--mint-soft); }
.verification-status { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; border-radius: 14px; padding: 14px 15px; background: var(--soft); }
.verification-status p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.verification-preview { border: 1px solid var(--line); border-radius: 15px; padding: 16px; background: #fafcff; }
.verification-preview > b { display: block; margin: 7px 0 4px; }
.verification-preview > p { margin: 0; color: var(--muted); font-size: 13px; }
.verification-preview > .micro { margin-top: 12px; font-size: 11px; }
.brief-pass-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.brief-pass-option { display: flex; min-width: 0; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: #fff; cursor: pointer; }
.brief-pass-option:has(input:checked) { border-color: var(--blue); background: #f1f4ff; }
.brief-pass-option input { flex: 0 0 auto; accent-color: var(--blue); }
.brief-pass-option span { min-width: 0; }
.brief-pass-option b, .brief-pass-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brief-pass-option b { margin-bottom: 4px; font-size: 13px; }
.brief-pass-option small { color: var(--muted); font-size: 11px; }
.brief-stage-list { display: grid; gap: 11px; }
.brief-stage { border: 1px solid var(--line); border-radius: 16px; padding: 17px; background: #fff; }
.brief-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.brief-stage-head h3 { margin: 0; font-size: 17px; }
.brief-sources { display: grid; gap: 7px; }
.brief-source { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 11px; padding: 10px 11px; background: var(--soft); }
.brief-source b, .brief-source span { display: block; }
.brief-source b { margin-bottom: 3px; font-size: 13px; }
.brief-source div > span { color: var(--muted); font-size: 11px; }
.brief-processes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.share-message { margin-top: 14px; border-radius: 13px; background: var(--soft); }
.share-message summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; font-size: 12px; font-weight: 800; cursor: pointer; list-style: none; }
.share-message summary::-webkit-details-marker { display: none; }
.share-message-toggle { color: var(--blue); font-size: 11px; font-weight: 750; }
.share-message[open] .share-message-toggle { font-size: 0; }
.share-message[open] .share-message-toggle::after { content: "Скрыть"; font-size: 11px; }
.share-message-body { border-top: 1px solid var(--line); padding: 0 14px 13px; }
.share-message p { margin: 12px 0 5px; color: #49536a; font-size: 13px; line-height: 1.55; }
.offer-decision-box { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.offer-decision-box > p { margin: 0; color: var(--ink); }
.contact-to-share { display: grid; gap: 4px; margin-top: 12px; border-radius: 12px; padding: 12px 13px; background: var(--soft); }
.contact-to-share b { font-size: 14px; }
.recruiter-stats { grid-template-columns: repeat(4, 1fr); }
.inbox-card .timeline-meta { margin: 11px 0; }
.inbox-card > p + p { margin-top: 5px; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 18px; }
.stat { padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stat strong { display: block; margin-bottom: 5px; font-size: 28px; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 12px; }
.admin-pass { margin-bottom: 12px; }
.admin-pass summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 15px; cursor: pointer; list-style: none; }
.admin-pass summary::-webkit-details-marker { display: none; }
.admin-pass summary h3 { margin: 0 0 5px; font-size: 17px; }
.admin-pass summary p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-content { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.admin-stage { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 10px; align-items: center; padding: 9px 0; }
.evidence-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px 130px auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-size: 13px; }
.admin-key { max-width: 520px; margin: 10vh auto 0; }

.employer-shell { width: min(820px, calc(100% - 30px)); margin: 0 auto; padding: 48px 0 90px; }
.employer-pass { overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: #fff; box-shadow: var(--shadow); }
.employer-hero { padding: 32px; color: #fff; background: var(--ink); }
.employer-hero .eyebrow { color: var(--mint); }
.employer-hero h1 { margin: 8px 0 12px; font-size: clamp(35px, 7vw, 58px); }
.employer-hero p { margin: 0; color: #c7d0e3; }
.employer-body { padding: 30px; }
.trust-box { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 0; }
.trust-item { padding: 15px; border-radius: 14px; background: var(--soft); }
.trust-item b { display: block; margin-bottom: 5px; font-size: 13px; }
.trust-item span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.fast-track-box { margin-top: 24px; border-radius: 18px; padding: 22px; background: #eef2ff; }
.fast-track-box h2 { margin-bottom: 8px; }
.fast-track-box > p { color: var(--muted); line-height: 1.5; }
.code-row { display: flex; gap: 8px; margin-top: 14px; }
.code-row input { flex: 1; }

.toast { position: fixed; z-index: 100; right: 20px; bottom: 20px; max-width: 360px; border-radius: 14px; padding: 14px 16px; color: #fff; background: var(--ink); box-shadow: var(--shadow); animation: toast-in .2s ease; }
.toast.error { background: var(--red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.loader { display: grid; min-height: 42vh; place-items: center; color: var(--muted); }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; }
  .pass-preview { max-width: 620px; }
  .steps { margin-top: 0; }
  .candidate-layout, .admin-layout { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .recruiter-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .topbar { min-height: 60px; padding: 0 14px; }
  .topbar nav a:first-child { display: none; }
  .pilot-badge { display: none; }
  .shell { width: min(100% - 24px, 1120px); padding-top: 34px; }
  .hero { gap: 42px; padding-top: 54px; }
  h1 { font-size: 48px; }
  .hero-copy > p { font-size: 17px; }
  .steps, .grid-2, .grid-3, .checkbox-grid, .trust-box, .brief-pass-grid, .brief-processes, .principles-grid { grid-template-columns: 1fr; }
  .page-head { display: block; }
  .page-head p { margin-top: 12px; }
  .panel, .employer-body, .employer-hero { padding: 20px; }
  .pass-preview { padding: 21px; }
  .pass-top, .pass-foot { display: block; }
  .verified-chip { margin-top: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .admin-stage, .evidence-row { grid-template-columns: 1fr; }
  .evidence-map-row { grid-template-columns: 1fr; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .constitution-hero { padding-top: 16px; }
  .principle-card { min-height: 0; }
  .constitution-close { padding: 28px 24px; }
}
