:root {
  color-scheme: light;
  --ink: #17231e;
  --muted: #64736c;
  --surface: #ffffff;
  --canvas: #f3f6f4;
  --line: #dbe3df;
  --brand: #173b2e;
  --accent: #d7f04b;
  --danger: #a2372b;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.topbar { min-height: 72px; padding: 12px max(20px, env(safe-area-inset-left)); background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--brand); color: var(--accent); font-weight: 850; letter-spacing: -.04em; }
.brand strong, .brand small { display: block; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 12px; }
.user-chip { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; background: #fafcfb; font-size: 13px; }

.shell { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 72px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 20px 0 28px; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 680px; margin-bottom: 10px; font-size: clamp(34px, 6vw, 62px); line-height: .98; letter-spacing: -.055em; }
h2 { margin-bottom: 0; font-size: clamp(25px, 4vw, 36px); letter-spacing: -.035em; }
h3 { font-size: 19px; }
.eyebrow { margin-bottom: 8px; color: #3f6555; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-copy { max-width: 610px; margin-bottom: 0; color: var(--muted); font-size: 17px; line-height: 1.55; }

.tabs { display: flex; gap: 7px; overflow-x: auto; padding: 5px; margin-bottom: 26px; background: #e8edea; border-radius: 16px; }
.tab { flex: 1; min-width: max-content; padding: 10px 16px; border: 0; border-radius: 12px; color: #53625b; background: transparent; font-weight: 700; }
.tab.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px #19241f16; }
.view { display: none; }
.view.active { display: block; }
.section-heading { margin-bottom: 18px; display: flex; justify-content: space-between; gap: 18px; align-items: end; }

.button { border: 0; border-radius: 12px; min-height: 44px; padding: 10px 16px; font-weight: 800; }
.button.primary { color: white; background: var(--brand); }
.button.secondary { color: var(--brand); background: var(--surface); border: 1px solid var(--line); }
.button.link { min-height: 38px; padding: 8px 12px; color: var(--brand); background: #edf2ef; }
.button.danger { color: var(--danger); background: #fbece9; }
.button:disabled { opacity: .55; cursor: wait; }

.vacancy-list { display: grid; gap: 12px; }
.vacancy-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 7px 24px #1a2a2210; }
.vacancy-card.rejected { opacity: .72; border-style: dashed; }
.vacancy-top { display: flex; justify-content: space-between; gap: 16px; }
.vacancy-title { margin-bottom: 5px; font-size: 21px; letter-spacing: -.025em; }
.vacancy-meta { color: var(--muted); line-height: 1.45; }
.score { flex: 0 0 auto; width: 62px; height: 62px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); background: var(--accent); font-weight: 900; font-size: 17px; }
.score.low { background: #e7ece9; }
.facts { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.fact { padding: 6px 9px; border-radius: 999px; background: #f0f4f2; color: #486056; font-size: 12px; font-weight: 700; }
.reasons { margin: 0 0 16px; padding-left: 20px; color: #495b53; line-height: 1.5; }
.vacancy-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-select { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; background: white; padding: 7px 10px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { min-height: 130px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.metric strong { display: block; margin-bottom: 17px; font-size: 38px; letter-spacing: -.05em; }
.metric span { color: var(--muted); font-weight: 700; }

.form-card { max-width: 760px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 17px; }
.form-card.compact { margin-top: 16px; }
.resume-card { margin-bottom: 16px; }
.muted { color: var(--muted); line-height: 1.5; }
.analysis-card { max-width: 760px; margin-bottom: 16px; padding: 22px; border: 1px solid #b8cb65; border-radius: var(--radius); background: #fbfde9; }
.analysis-card h3 { margin-bottom: 0; }
.compact-heading { align-items: center; }
.status-pill { padding: 6px 9px; border-radius: 999px; color: #405229; background: #e7f0b8; font-size: 12px; font-weight: 800; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.analysis-fact { padding: 12px; border-radius: 12px; background: #fff; border: 1px solid #e2e8c4; }
.analysis-fact strong, .analysis-fact span { display: block; }
.analysis-fact span { margin-top: 5px; color: var(--muted); line-height: 1.4; }
.form-card label { display: grid; gap: 7px; font-weight: 750; }
.form-card small { color: var(--muted); font-weight: 450; line-height: 1.4; }
.form-card input, .form-card textarea, .form-card select { width: 100%; border: 1px solid #cbd6d1; border-radius: 11px; padding: 11px 12px; color: var(--ink); background: #fff; }
.form-card input:focus, .form-card textarea:focus, .form-card select:focus { outline: 3px solid #d7f04b66; border-color: var(--brand); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; }
.form-card .check { display: inline-flex; grid-template-columns: auto 1fr; align-items: center; margin-right: 18px; font-weight: 550; }
.form-card .check input { width: auto; }

.source-list { display: grid; gap: 8px; }
.source-row { padding: 14px 16px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); display: flex; justify-content: space-between; gap: 15px; }
.source-row small { color: var(--muted); }
.toggle { display: inline-flex; gap: 7px; align-items: center; color: var(--muted); font-size: 13px; }
.empty, .login-panel { padding: 34px; border: 1px dashed #bccac3; border-radius: var(--radius); text-align: center; background: var(--surface); }
.empty strong, .empty span { display: block; }
.empty span { margin-top: 7px; color: var(--muted); }
.login-panel { max-width: 650px; margin: 10vh auto 0; }
.login-panel h1 { margin-inline: auto; font-size: clamp(32px, 5vw, 52px); }
.login-panel p:last-child { color: var(--muted); line-height: 1.6; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 20; max-width: min(430px, calc(100% - 36px)); padding: 13px 16px; border-radius: 12px; color: white; background: var(--brand); box-shadow: 0 10px 36px #1118; }

@media (max-width: 720px) {
  .shell { width: min(100% - 22px, 1080px); padding-top: 18px; }
  .hero { align-items: start; }
  .hero .button { padding-inline: 12px; }
  .section-heading { align-items: start; flex-direction: column; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .analysis-grid { grid-template-columns: 1fr; }
  .vacancy-card { padding: 17px; }
  .vacancy-top { align-items: start; }
  .score { width: 54px; height: 54px; }
}
