:root {
  color-scheme: dark;
  --ink: #f4f1e8;
  --muted: #aaa99f;
  --dim: #74756f;
  --night: #0b0d0c;
  --panel: rgba(21, 24, 22, 0.9);
  --panel-strong: #171a18;
  --line: rgba(244, 241, 232, 0.12);
  --line-strong: rgba(244, 241, 232, 0.24);
  --acid: #c7ff4a;
  --acid-dark: #92c923;
  --sky: #6ed6ff;
  --danger: #ff7d6e;
  --radius: 18px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--night);
  background-size: 44px 44px;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.is-hidden { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(100px);
  opacity: .09;
  pointer-events: none;
}
.ambient-one { background: var(--acid); top: -260px; right: -130px; }
.ambient-two { background: var(--sky); bottom: -330px; left: -250px; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 88px;
  margin: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}
.verification-banner {
  width: min(1050px, calc(100% - 40px));
  margin: 16px auto 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(245, 194, 107, .35);
  border-radius: 10px;
  background: rgba(245, 194, 107, .07);
  color: #decba9;
  font-size: 12px;
}
.verification-banner div { display: grid; gap: 2px; }
.verification-banner .secondary-button { flex: 0 0 auto; color: var(--ink); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: .13em;
}
.brand > span:last-child span { color: var(--acid); }
.brand-mark { position: relative; width: 28px; height: 28px; display: grid; place-items: center; }
.brand-mark i { position: absolute; border: 1px solid var(--acid); border-radius: 50%; }
.brand-mark i:nth-child(1) { width: 28px; height: 28px; opacity: .35; }
.brand-mark i:nth-child(2) { width: 16px; height: 16px; opacity: .7; }
.brand-mark i:nth-child(3) { width: 5px; height: 5px; background: var(--acid); box-shadow: 0 0 14px var(--acid); }
.local-badge {
  margin-left: auto;
  color: var(--dim);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .15em;
}
.local-badge span { display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 9px var(--acid); }
.telegram-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}
.telegram-button svg { width: 16px; fill: var(--sky); }
.telegram-button:disabled { opacity: .35; cursor: not-allowed; }

main { width: min(1050px, calc(100% - 40px)); margin: 0 auto 100px; }
.hero { padding: 92px 0 68px; text-align: center; }
.eyebrow, .kicker {
  margin: 0 0 13px;
  color: var(--acid);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .19em;
}
.hero h1 {
  max-width: 900px;
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.048em;
}
.hero h1 em { color: var(--acid); font-weight: 400; }
.hero-copy { max-width: 655px; margin: 28px auto 0; color: var(--muted); font-size: 16px; }
.trust-row { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px; color: var(--dim); font-size: 11px; }
.trust-row span::before { content: "✓"; color: var(--acid); margin-right: 7px; font-weight: 800; }

.stepper { display: grid; grid-template-columns: auto 1fr auto 1fr auto 1fr auto; align-items: center; margin: 0 auto 32px; max-width: 790px; }
.stepper.three-steps { grid-template-columns: auto 1fr auto 1fr auto; max-width: 640px; }
.stepper > i { height: 1px; background: var(--line); }
.step {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dim);
  cursor: pointer;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .09em;
}
.step b { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-family: ui-monospace, monospace; font-size: 9px; }
.step.is-active, .step.is-complete { color: var(--ink); }
.step.is-active b { border-color: var(--acid); color: #0b0d0c; background: var(--acid); box-shadow: 0 0 25px rgba(199,255,74,.18); }
.step.is-complete b { border-color: rgba(199,255,74,.5); color: var(--acid); }
.step:disabled { cursor: default; }

.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(31, 35, 32, .94), rgba(15, 17, 16, .96));
  box-shadow: var(--shadow);
  animation: panel-in .42s ease both;
}
@keyframes panel-in { from { transform: translateY(10px); opacity: 0; } }
.panel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(120deg, rgba(255,255,255,.035), transparent 30%); }
.panel > * { position: relative; z-index: 1; }
.panel-index { position: absolute; right: 28px; top: -34px; color: rgba(255,255,255,.025); font-family: Georgia, serif; font-size: 160px; line-height: 1; z-index: 0; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.panel h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(30px, 5vw, 46px); font-weight: 400; letter-spacing: -.035em; }
.provider-chip { margin-top: 12px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--dim); font-family: ui-monospace, monospace; font-size: 8px; letter-spacing: .12em; }
.panel-intro { max-width: 680px; margin: 16px 0 34px; color: var(--muted); font-size: 14px; }

.form-stack { display: grid; gap: 13px; }
.field-label, fieldset legend { color: var(--ink); font-size: 11px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
input, select, textarea {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(5, 7, 6, .62);
  color: var(--ink);
  padding: 0 15px;
  transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 150px; padding: 13px 15px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #5e615d; }
input:focus, select:focus, textarea:focus { border-color: rgba(199,255,74,.55); box-shadow: 0 0 0 3px rgba(199,255,74,.07); }
.secret-field { position: relative; }
.secret-field input { padding-right: 72px; }
.secret-field button { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--acid); font-size: 9px; font-weight: 800; letter-spacing: .1em; cursor: pointer; }
.primary-button, .secondary-button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  transition: transform .18s, filter .18s, opacity .18s;
}
.primary-button { width: min(100%, 420px); margin-top: 8px; background: var(--acid); color: #0b0d0c; }
.primary-button i { font-size: 19px; font-style: normal; }
.primary-button:hover, .secondary-button:hover { transform: translateY(-1px); filter: brightness(1.07); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.model-form { display: grid; gap: 13px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.select-wrap { position: relative; }
.select-wrap::after { content: "⌄"; position: absolute; right: 17px; top: 14px; color: var(--acid); pointer-events: none; }
select { appearance: none; padding-right: 45px; }
.telegram-setup-card { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 32px; padding: 20px; border: 1px solid rgba(74,185,255,.25); border-radius: 10px; background: rgba(74,185,255,.035); }
.telegram-setup-card .kicker { margin-bottom: 7px; color: var(--sky); }
.telegram-setup-card h3 { margin: 0; font-family: Georgia, serif; font-size: 21px; font-weight: 400; }
.telegram-setup-card p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.telegram-setup-card .secondary-button { color: var(--ink); }

.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dropzone { min-height: 150px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px dashed var(--line-strong); border-radius: 11px; background: rgba(5,7,6,.35); text-align: center; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.has-file { border-color: var(--acid); background: rgba(199,255,74,.035); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone b { font-family: Georgia, serif; font-size: 19px; font-weight: 400; }
.dropzone small { color: var(--dim); font-size: 10px; }
.upload-icon { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--acid); }
.link-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px; }
.link-grid label { display: grid; gap: 8px; }
.wide-button { width: 100%; margin-top: 28px; }

.profile-preview { margin-top: 38px; padding-top: 34px; border-top: 1px solid var(--line); }
.preview-top { display: flex; align-items: center; gap: 18px; }
.profile-monogram { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; border-radius: 50%; background: var(--acid); color: var(--night); font-family: Georgia, serif; font-size: 20px; }
.profile-preview h3 { margin: 0; font-family: Georgia, serif; font-size: 26px; font-weight: 400; }
.profile-preview .preview-top p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.profile-summary { max-width: 800px; margin: 22px 0; color: #cfcec5; }
.skill-list { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-list span { padding: 6px 10px; border: 1px solid rgba(199,255,74,.24); border-radius: 999px; color: #dcf8a2; background: rgba(199,255,74,.045); font-size: 10px; }
.profile-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 24px 0; background: var(--line); border: 1px solid var(--line); }
.profile-facts div { padding: 14px; background: var(--panel-strong); }
.profile-facts small { display: block; color: var(--dim); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.profile-facts b { display: block; margin-top: 4px; font-size: 12px; font-weight: 650; }
.inline-warning { margin: 18px 0; padding: 12px 14px; border-left: 2px solid #f5c26b; background: rgba(245,194,107,.06); color: #decba9; font-size: 11px; }

.preferences-form { display: grid; gap: 25px; }
fieldset { margin: 0; padding: 0; border: 0; }
fieldset p { margin: 5px 0 12px; color: var(--dim); font-size: 11px; }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.multi-choice { grid-template-columns: repeat(4, 1fr); }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { min-height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: rgba(5,7,6,.42); color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.choice input:checked + span { border-color: var(--acid); color: var(--night); background: var(--acid); }

.results-heading { align-items: center; }
.search-progress { display: flex; align-items: center; gap: 22px; padding: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 26px; }
.progress-orbit { width: 72px; height: 72px; flex: 0 0 72px; display: flex; align-items: baseline; justify-content: center; padding-top: 22px; border: 1px solid rgba(199,255,74,.32); border-radius: 50%; color: var(--acid); box-shadow: inset 0 0 22px rgba(199,255,74,.05); }
.progress-orbit span { font-family: Georgia, serif; font-size: 25px; line-height: 1; }
.progress-orbit small { font-size: 9px; }
.progress-copy { flex: 1; min-width: 0; }
.progress-copy h3 { margin: 0 0 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #deddd5; font-size: 13px; font-weight: 550; }
.progress-track { height: 3px; overflow: hidden; background: rgba(255,255,255,.07); }
.progress-track i { display: block; width: 0; height: 100%; background: var(--acid); box-shadow: 0 0 12px var(--acid); transition: width .35s ease; }
.research-log { max-height: 120px; overflow: auto; padding: 13px 0; color: var(--dim); font-family: ui-monospace, monospace; font-size: 9px; }
.research-log p { margin: 5px 0; }
.research-log p::before { content: "> "; color: var(--acid-dark); }
.result-summary { margin: 28px 0 14px; display: flex; align-items: baseline; justify-content: space-between; }
.result-summary b { font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.result-summary span { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.jobs { display: grid; gap: 12px; }
.job-card { padding: 24px; border: 1px solid var(--line); border-radius: 10px; background: rgba(6,8,7,.42); transition: border-color .2s, transform .2s; }
.job-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.job-top { display: grid; grid-template-columns: 70px 1fr auto; gap: 17px; align-items: start; }
.match-score { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(199,255,74,.35); border-radius: 50%; color: var(--acid); font-family: Georgia, serif; font-size: 20px; }
.match-score small { display: block; margin-top: -18px; color: var(--dim); font-family: ui-sans-serif, system-ui; font-size: 7px; letter-spacing: .08em; }
.job-title h3 { margin: 1px 0 4px; font-family: Georgia, serif; font-size: 23px; font-weight: 400; line-height: 1.15; }
.job-title p { margin: 0; color: var(--muted); font-size: 12px; }
.job-title p span { color: var(--dim); }
.job-link { min-height: 38px; padding: 0 13px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(199,255,74,.25); border-radius: 6px; color: var(--acid); text-decoration: none; font-size: 10px; font-weight: 800; }
.job-description { margin: 19px 0 14px; color: #c2c1b9; font-size: 12px; line-height: 1.7; white-space: pre-line; }
.job-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.job-tags span { padding: 5px 8px; border-radius: 4px; background: rgba(255,255,255,.05); color: var(--muted); font-size: 9px; }
.match-reason { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 10px; }

.drawer { position: fixed; inset: 0; z-index: 20; visibility: hidden; pointer-events: none; }
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,.7); opacity: 0; transition: opacity .25s; }
.drawer.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; width: min(460px, 100%); height: 100%; overflow: auto; padding: 60px 42px; background: #151816; border-left: 1px solid var(--line); transform: translateX(100%); transition: transform .28s ease; }
.drawer.is-open .drawer-panel { transform: translateX(0); }
.drawer-close { position: absolute; right: 24px; top: 20px; border: 0; background: transparent; color: var(--muted); font-size: 28px; cursor: pointer; }
.telegram-mark { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 28px; border-radius: 50%; background: var(--sky); }
.telegram-mark svg { width: 27px; fill: #10202a; }
.drawer h2 { margin: 0; font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.drawer h2 + p { color: var(--muted); font-size: 13px; }
.setup-steps { margin: 28px 0; padding: 0; list-style: none; counter-reset: setup; }
.setup-steps li { position: relative; padding: 0 0 18px 36px; color: #c7c6bd; font-size: 12px; counter-increment: setup; }
.setup-steps li::before { content: counter(setup); position: absolute; left: 0; top: -3px; width: 23px; height: 23px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--acid); font-family: ui-monospace, monospace; font-size: 8px; }
code { padding: 2px 4px; border-radius: 3px; background: rgba(255,255,255,.07); color: var(--acid); }
.telegram-connected { margin-top: 28px; padding: 20px; border: 1px solid rgba(199,255,74,.25); border-radius: 9px; background: rgba(199,255,74,.035); }
.telegram-connected b { color: var(--acid); }
.telegram-connected p { color: var(--muted); font-size: 12px; }
.telegram-error { margin: 0 0 18px; padding: 12px 14px; border: 1px solid rgba(255,125,110,.4); border-radius: 6px; background: rgba(255,125,110,.06); color: #ffd1ca; font-size: 12px; line-height: 1.5; }
.telegram-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.telegram-actions .secondary-button { flex: 1 1 130px; }
.secondary-button:disabled { opacity: .55; cursor: wait; transform: none; }

.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; max-width: min(520px, calc(100% - 32px)); transform: translate(-50%, 20px); padding: 12px 17px; border: 1px solid var(--line-strong); border-radius: 7px; background: #212522; color: var(--ink); box-shadow: var(--shadow); opacity: 0; pointer-events: none; font-size: 12px; transition: opacity .2s, transform .2s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { border-color: rgba(255,125,110,.45); color: #ffd1ca; }

@media (max-width: 760px) {
  .site-header { height: 72px; width: min(100% - 28px, 1180px); }
  .verification-banner { width: min(100% - 28px, 1050px); align-items: stretch; flex-direction: column; }
  .local-badge { display: none; }
  .telegram-button { margin-left: auto; }
  main { width: min(100% - 24px, 1050px); }
  .hero { padding: 62px 0 48px; }
  .hero h1 br { display: none; }
  .stepper { grid-template-columns: repeat(4, 1fr); }
  .stepper.three-steps { grid-template-columns: repeat(3, 1fr); }
  .stepper > i { display: none; }
  .step { padding: 5px; justify-content: center; }
  .step span { display: none; }
  .panel-heading { display: block; }
  .provider-chip { display: inline-block; }
  .upload-grid, .link-grid, .profile-facts { grid-template-columns: 1fr; }
  .choice-row, .multi-choice { grid-template-columns: 1fr 1fr; }
  .job-top { grid-template-columns: 55px 1fr; }
  .match-score { width: 50px; height: 50px; font-size: 17px; }
  .job-link { grid-column: 1 / -1; justify-content: center; }
  .drawer-panel { padding: 60px 25px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Auth & Credits */
.header-right { display: flex; align-items: center; gap: 10px; }
.credit-badge {
  font-size: 13px; color: var(--acid); border: 1px solid var(--acid-dark);
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}
.credit-badge b { font-size: 15px; }
.user-email { font-size: 13px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-button { background: none; border: none; color: var(--acid); cursor: pointer; font-size: 14px; text-decoration: underline; padding: 0; }

.auth-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.7); backdrop-filter: blur(6px);
}
.auth-modal {
  position: relative; background: var(--panel-strong); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px 36px; width: min(400px, 90vw);
  box-shadow: var(--shadow);
}
.auth-modal h2 { margin: 6px 0 18px; font-size: 22px; }
.auth-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; }
.auth-switch { margin-top: 16px; font-size: 14px; color: var(--muted); text-align: center; }
.auth-note { margin-top: 12px; font-size: 12px; color: var(--dim); text-align: center; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }
.form-stack label { display: flex; flex-direction: column; gap: 5px; }
.form-stack input {
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 14px; color: var(--ink); font-size: 15px; outline: none; transition: border-color .2s;
}
.form-stack input:focus { border-color: var(--acid-dark); }
