:root {
  --ink: #171719;
  --muted: #67676d;
  --primary: #ed2d45;
  --primary-dark: #c91f36;
  --accent: #fff0f2;
  --surface: #ffffff;
  --canvas: #f7f7f8;
  --line: #e3e3e6;
  --danger: #bd1f34;
  --warning: #9a6413;
  --shadow: 0 18px 50px rgba(15, 15, 18, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: "DM Sans", sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.topbar { position: sticky; top: 0; z-index: 20; min-height: 76px; padding: 0 clamp(20px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 32px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand img { width: 148px; display: block; }
.main-nav { display: flex; align-items: center; gap: 8px; }
.main-nav a { padding: 10px 13px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.main-nav a:hover, .main-nav a.is-active { color: var(--primary); background: var(--accent); }
.main-nav .nav-cta { color: #fff; background: var(--primary); padding-inline: 20px; }
.main-nav .nav-cta:hover { color: #fff; background: var(--primary-dark); }
.main-nav .nav-quiet { color: var(--primary); }
.menu-button { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.menu-button span { display: block; height: 2px; margin: 4px 0; background: var(--ink); }

.page { width: min(1160px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 72px; }
.page-narrow { width: min(760px, calc(100% - 40px)); }
.eyebrow { margin: 0 0 10px; color: var(--primary); font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: Manrope, sans-serif; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.45rem, 3vw, 2.1rem); letter-spacing: -.025em; }
.lead { max-width: 680px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.section-heading { margin-bottom: 26px; }
.section-heading.compact { display: flex; justify-content: space-between; align-items: end; gap: 24px; }

.hero { overflow: hidden; position: relative; padding: clamp(42px, 7vw, 78px); border: 1px solid var(--line); border-radius: 30px; color: var(--ink); background: linear-gradient(125deg, #fff 0%, #fff 62%, #fff2f4 100%); box-shadow: var(--shadow); }
.hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -210px; border: 70px solid rgba(237,45,69,.08); border-radius: 50%; }
.hero h1 { max-width: 760px; margin-bottom: 18px; }
.hero p { max-width: 650px; color: var(--muted); font-size: 1.12rem; }
.hero .eyebrow { color: var(--primary); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.button { cursor: pointer; display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 1px solid transparent; border-radius: 11px; color: #fff; background: var(--primary); font-weight: 700; transition: .18s ease; }
.button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.button:disabled { opacity: .6; cursor: wait; transform: none; }
.button-secondary { color: var(--ink); background: #fff; border-color: #d7d7db; }
.button-secondary:hover { color: var(--primary); background: var(--accent); border-color: #f2b8c0; }
.button-light { color: #fff; background: var(--primary); }
.button-light:hover { background: var(--primary-dark); }
.button-outline-light { color: var(--ink); border-color: #cfcfd4; background: #fff; }
.button-outline-light:hover { color: var(--primary); border-color: var(--primary); background: var(--accent); }
.button-danger { background: var(--danger); }
.text-link { color: var(--primary); font-weight: 700; }

.filters { display: grid; grid-template-columns: 1.4fr 1fr 1fr .7fr auto; gap: 12px; margin: 34px 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { display: grid; gap: 7px; }
.field label { color: #29292d; font-size: .88rem; font-weight: 700; }
.field label.optional { font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fff; border: 1px solid #cfcfd4; border-radius: 10px; outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(237,45,69,.12); }
.field small { color: var(--muted); }
.field-error { color: var(--danger); font-size: .82rem; font-weight: 600; }
.field-full { grid-column: 1 / -1; }

.jobs-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.job-card, .card { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(15,15,18,.05); }
.job-card { display: flex; flex-direction: column; min-height: 260px; }
.job-card:hover { border-color: #f1aeba; transform: translateY(-2px); transition: .2s ease; }
.job-card h2 { margin-bottom: 10px; font-size: 1.35rem; }
.job-card p { color: var(--muted); }
.job-card .button { margin-top: auto; align-self: flex-start; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 24px; }
.tag { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; color: #4a4a50; background: #f2f2f4; font-size: .82rem; font-weight: 700; }
.empty-state { grid-column: 1 / -1; padding: 55px 24px; text-align: center; background: #fff; border: 1px dashed #c9c9ce; border-radius: var(--radius); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 28px; }
.detail-content, .detail-aside { padding: clamp(24px, 4vw, 42px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.detail-content section + section { padding-top: 25px; margin-top: 25px; border-top: 1px solid var(--line); }
.detail-content .rich-text { color: #45454b; white-space: pre-line; }
.detail-aside { position: sticky; top: 102px; padding: 24px; }
.detail-aside .button { width: 100%; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: #fff; }
.auth-story { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(34px, 6vw, 80px); color: var(--ink); background: linear-gradient(145deg, #fff 0%, #fff2f4 100%); }
.auth-story::before, .auth-story::after { content: ""; position: absolute; border-radius: 50%; background: rgba(237,45,69,.07); }
.auth-story::before { width: 480px; height: 480px; right: -230px; top: -160px; }
.auth-story::after { width: 280px; height: 280px; left: -140px; bottom: 15%; }
.auth-logo { position: relative; z-index: 1; width: 170px; }
.auth-copy { position: relative; z-index: 1; max-width: 600px; }
.auth-copy h1 { margin-bottom: 18px; }
.auth-copy p { color: var(--muted); font-size: 1.08rem; }
.auth-panel { display: grid; place-items: center; padding: 38px clamp(24px, 7vw, 86px); }
.auth-box { width: min(440px, 100%); }
.auth-box h2 { margin-bottom: 8px; }
.auth-box > p { margin-top: 0; color: var(--muted); }
.auth-box form { display: grid; gap: 16px; margin-top: 30px; }
.auth-links { display: flex; justify-content: space-between; gap: 18px; margin-top: 22px; font-size: .92rem; }
.auth-shell-centered { min-height: 100vh; display: grid; grid-template-columns: 1fr; place-items: center; padding: 36px 20px; background: radial-gradient(circle at 50% -10%, #fff0f2 0, transparent 38%), var(--canvas); }
.auth-shell-centered .auth-panel { width: 100%; min-height: auto; padding: 0; }
.auth-shell-centered .auth-box { width: min(470px, 100%); padding: clamp(28px, 5vw, 44px); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.auth-brand { display: flex; justify-content: center; margin-bottom: 34px; }
.auth-brand img { width: min(220px, 72%); height: auto; }
.auth-shell-centered .auth-box > .eyebrow, .auth-shell-centered .auth-box > h1, .auth-shell-centered .auth-box > p { text-align: center; }
.auth-shell-centered .auth-box > h1 { margin-bottom: 8px; font-size: clamp(1.8rem, 5vw, 2.35rem); }
.auth-shell-centered .auth-box form .button { width: 100%; margin-top: 4px; }
.auth-divider { height: 1px; margin: 28px 0 20px; background: var(--line); }
.auth-jobs { display: flex; justify-content: center; }

.form-card { padding: clamp(24px, 4vw, 42px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-section + .form-section { padding-top: 34px; margin-top: 34px; border-top: 1px solid var(--line); }
.form-section-header { margin-bottom: 22px; }
.form-section-header h2 { margin-bottom: 5px; font-size: 1.35rem; }
.form-section-header p { margin: 0; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.form-grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.checkbox { display: flex; gap: 11px; align-items: flex-start; color: #3f3f44; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 30px; }

.pcd-field { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fafafa; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.toggle-row > div { display: grid; gap: 4px; }
.optional-label { color: #29292d; font-size: .88rem; font-weight: 500; }
.switch-control { cursor: pointer; display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.switch-control input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 50px; height: 28px; border-radius: 999px; background: #c8c8cd; transition: .2s ease; }
.switch-thumb { position: absolute; width: 22px; height: 22px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.22); transition: .2s ease; }
.switch-control input:checked + .switch-track { background: var(--primary); }
.switch-control input:checked + .switch-track .switch-thumb { transform: translateX(22px); }
.switch-control input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(237,45,69,.18); }
.switch-status { min-width: 30px; color: var(--ink); font-size: .88rem; font-weight: 700; }
.pcd-details { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.pcd-details[hidden] { display: none; }

.languages-field { gap: 12px; }
.language-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.language-controls .button { min-height: 48px; }
.language-table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.language-table { width: 100%; border-collapse: collapse; }
.language-table th, .language-table td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--line); }
.language-table th { color: var(--muted); background: #f7f7f8; font-size: .82rem; font-weight: 700; }
.language-table th:last-child, .language-table td:last-child { width: 120px; text-align: right; }
.language-table tbody tr:last-child td { border-bottom: 0; }
.button-remove { min-height: 36px; padding: 7px 13px; color: var(--primary); background: var(--accent); border-color: #f3c0c7; font-size: .78rem; text-transform: uppercase; }
.button-remove:hover { color: #fff; background: var(--primary); }
.language-empty { margin: 0; padding: 20px; color: var(--muted); text-align: center; }

.question-list { display: grid; gap: 14px; }
.question-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.question-card h2 { margin-bottom: 5px; font-size: 1.12rem; }
.question-card p { margin: 0; color: var(--muted); }
.questionnaire { display: grid; gap: 18px; }
.question { padding: clamp(22px, 4vw, 34px); background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.question-number { color: var(--primary); font-size: .8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.question h2 { margin: 9px 0 18px; font-family: "DM Sans", sans-serif; font-size: 1.05rem; line-height: 1.55; }
.question h2 p { margin: 0; }
.consents { display: grid; gap: 14px; padding: 24px; background: #f7f7f8; border: 1px solid var(--line); border-radius: 14px; }

.alert { padding: 13px 15px; border-radius: 10px; color: #29292d; background: #f3f3f5; border: 1px solid #d9d9dd; }
.alert-error { color: #7a2730; background: #fff0f1; border-color: #f0c8cc; }
.alert-warning { color: #6d4a12; background: #fff7e7; border-color: #edd9a6; }
.back-link { display: inline-flex; margin-bottom: 24px; color: var(--primary); font-weight: 700; }
.site-footer { min-height: 130px; padding: 35px clamp(20px,5vw,72px); display: flex; align-items: center; justify-content: space-between; gap: 28px; color: #6d6d73; border-top: 1px solid var(--line); background: #fff; }
.site-footer div { display: grid; }
.site-footer strong { color: var(--ink); }
.success-mark { display: grid; place-items: center; width: 68px; height: 68px; margin-bottom: 22px; border-radius: 50%; color: #fff; background: var(--primary); font-size: 2rem; }

@media (max-width: 900px) {
  .menu-button { display: block; }
  .main-nav { display: none; position: absolute; top: 68px; left: 16px; right: 16px; padding: 12px; flex-direction: column; align-items: stretch; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
  .main-nav.is-open { display: flex; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .button { align-self: end; }
  .detail-layout, .auth-shell { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .auth-story { min-height: 360px; }
  .auth-panel { min-height: 620px; }
  .auth-shell-centered .auth-panel { min-height: auto; }
}

@media (max-width: 650px) {
  .page { width: min(100% - 28px, 1160px); padding-top: 32px; }
  .topbar { min-height: 68px; padding-inline: 16px; }
  .brand img { width: 128px; }
  .hero { padding: 34px 24px; border-radius: 22px; }
  .jobs-grid, .filters, .form-grid, .form-grid.three { grid-template-columns: 1fr; }
  .language-controls { grid-template-columns: 1fr; }
  .language-controls .button { width: 100%; }
  .toggle-row { align-items: flex-start; flex-direction: column; }
  .section-heading.compact, .question-card, .site-footer { align-items: flex-start; flex-direction: column; }
  .question-card .button { width: 100%; }
  .auth-links { flex-direction: column; }
  .form-actions { align-items: stretch; flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
}
