:root {
    --ink: #173b37;
    --ink-soft: #42625e;
    --gold: #b9953f;
    --gold-deep: #987321;
    --cream: #f7f1e3;
    --paper: #fffdf8;
    --line: #ded3ba;
    --danger: #b63b3b;
    --success: #257054;
    color-scheme: light;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; scrollbar-width: thin; scrollbar-color: #b9953f #eee7d8; }
html::-webkit-scrollbar { width: 11px; }
html::-webkit-scrollbar-track { background: #eee7d8; }
html::-webkit-scrollbar-thumb { border: 3px solid #eee7d8; border-radius: 999px; background: linear-gradient(#c7a552, #8e6d25); }

body {
    margin: 0;
    min-width: 320px;
    max-width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 5%, rgba(185, 149, 63, .13), transparent 28rem),
        linear-gradient(180deg, #faf6ec 0, #f4edde 100%);
    color: var(--ink);
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
    line-height: 1.7;
}

button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(185,149,63,.38); outline-offset: 3px; }

.page-shell { width: min(1220px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 64px; height: 64px; object-fit: contain; }
.brand span { display: grid; line-height: 1.25; }
.brand strong { font-size: 18px; }
.brand small { color: var(--gold-deep); font-weight: 700; }
.header-tag { padding: 8px 15px; border: 1px solid rgba(185,149,63,.42); border-radius: 999px; color: var(--gold-deep); background: rgba(255,255,255,.55); font-size: 13px; font-weight: 800; }

.hero {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    padding: clamp(36px, 6vw, 70px);
    border-radius: 30px;
    background: linear-gradient(125deg, #153b36 0%, #214e47 64%, #2b5a52 100%);
    color: white;
    box-shadow: 0 24px 70px rgba(23, 59, 55, .18);
}

.hero::before, .hero::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.hero::before { width: 440px; height: 440px; inset: -220px auto auto -120px; }
.hero::after { width: 260px; height: 260px; inset: auto -90px -150px auto; }
.hero-copy { position: relative; z-index: 2; max-width: 710px; }
.eyebrow, .section-kicker { display: block; margin-bottom: 8px; color: #d8bc70; font-size: 13px; font-weight: 900; letter-spacing: .04em; }
.hero h1 { max-width: 650px; margin: 0; font-size: clamp(36px, 5.4vw, 68px); line-height: 1.2; letter-spacing: -.04em; }
.hero p { max-width: 620px; margin: 20px 0 25px; color: #d8e6e3; font-size: clamp(16px, 2vw, 19px); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-points span { padding: 8px 12px; border: 1px solid rgba(255,255,255,.17); border-radius: 9px; background: rgba(255,255,255,.07); font-size: 12px; font-weight: 700; }
.hero-guide { position: absolute; z-index: 2; inset: 50% auto auto 55px; width: min(285px, 30%); display: grid; gap: 10px; padding: 20px; border: 1px solid rgba(216,188,112,.25); border-radius: 20px; background: rgba(8,37,33,.38); backdrop-filter: blur(8px); transform: translateY(-50%); }
.hero-guide strong { color: #e7cf8d; font-size: 13px; }
.hero-guide span { display: flex; align-items: center; gap: 9px; color: #e4eeec; font-size: 12px; }
.hero-guide b { width: 25px; height: 25px; display: grid; flex: 0 0 25px; place-items: center; border-radius: 8px; background: rgba(216,188,112,.18); color: #efd990; }

.application-layout { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(0, 1.5fr); gap: 26px; align-items: start; margin: 30px 0 50px; }
.vacancies, .form-panel { border: 1px solid rgba(160,130,61,.22); border-radius: 24px; background: rgba(255,253,248,.9); box-shadow: 0 15px 45px rgba(68,52,20,.07); }
.vacancies { position: sticky; top: 20px; padding: 28px; }
.vacancies h2, .form-heading h2 { margin: 0; color: var(--ink); font-size: 26px; line-height: 1.35; }
.vacancy-card { position: relative; display: grid; grid-template-columns: 42px 1fr; gap: 14px; margin-top: 22px; padding: 21px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.vacancy-card::after { content: ""; position: absolute; inset: 0 0 0 auto; width: 4px; background: var(--gold); }
.vacancy-number { color: var(--gold); font-family: Georgia, serif; font-size: 24px; font-weight: 700; }
.vacancy-card h3 { margin: 3px 0 7px; font-size: 17px; }
.vacancy-card p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.vacancy-audience { padding: 4px 8px; border-radius: 6px; background: var(--cream); color: var(--gold-deep); font-size: 11px; font-weight: 900; }
.requirements-note { margin-top: 22px; padding: 18px; border-radius: 15px; background: var(--ink); color: #fff; }
.requirements-note strong { color: #e2c87f; }
.requirements-note p { margin: 5px 0 0; color: #d7e2e0; font-size: 13px; }

.form-panel { padding: clamp(24px, 4vw, 44px); }
.form-heading { margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.form-heading p { margin: 6px 0 0; color: #6c7774; font-size: 13px; }
.form-progress { position: relative; height: 35px; margin-top: 18px; overflow: hidden; border: 1px solid #ded3ba; border-radius: 999px; background: #f4efe3; }
.form-progress span { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, #d3b35d, #b58c31); transition: width .25s ease; }
.form-progress strong { position: relative; z-index: 1; height: 100%; display: grid; place-items: center; color: #173b37; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-section-heading { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; margin: 14px 0 0; padding: 14px 16px; border-radius: 14px; background: linear-gradient(135deg, #f6f0e1, #fbf8ef); }
.form-section-heading > span { width: 34px; height: 34px; display: grid; flex: 0 0 34px; place-items: center; border-radius: 10px; background: var(--ink); color: #fff; font-weight: 900; }
.form-section-heading div { display: grid; }
.form-section-heading strong { color: var(--ink); font-size: 14px; }
.form-section-heading small { color: #71807c; font-size: 11px; }
.license-score-field { max-width: 360px; margin: -6px 0 24px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field > span, .license-choice legend { color: #284944; font-size: 13px; font-weight: 800; }
.field b, .license-choice b, .consent b, .upload-card b { color: var(--danger); }
.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid #d8cfbd;
    border-radius: 11px;
    background: #fff;
    color: #243c38;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input, .field select { height: 49px; padding: 0 13px; }
.field textarea { min-height: 130px; padding: 12px 13px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(185,149,63,.12); }
.field input:disabled { cursor: not-allowed; background: #f0ede5; color: #7b8582; }
.field input.is-invalid, .field select.is-invalid, .field textarea.is-invalid { border-color: var(--danger); background: #fffafa; }
.field-hint { color: #77827f; font-size: 11px; }
.field-error { min-height: 17px; color: var(--danger); font-size: 11px; }

.license-choice { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 20px; padding: 0; border: 0; }
.license-choice legend { width: 100%; margin-bottom: 6px; }
.license-choice label { cursor: pointer; }
.license-choice label span { display: inline-flex; min-width: 145px; padding: 11px 15px; align-items: center; justify-content: center; border: 1px solid #d8cfbd; border-radius: 10px; background: #fff; font-size: 13px; font-weight: 700; transition: .18s ease; }
.license-choice input { position: absolute; opacity: 0; }
.license-choice input:focus-visible + span { outline: 3px solid rgba(185,149,63,.25); }
.license-choice input:checked + span { border-color: var(--gold); background: #fbf5e5; color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold); }

.uploads-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.upload-card { position: relative; min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 18px; border: 1px dashed #baa771; border-radius: 15px; background: #fbf8ef; text-align: center; cursor: pointer; transition: .18s ease; }
.upload-card:hover, .upload-card:focus-within { border-color: var(--gold-deep); background: #f8f0dc; transform: translateY(-2px); }
.upload-card input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--ink); color: #fff; font-family: Georgia, serif; font-size: 13px; font-weight: 900; }
.license-icon { background: var(--gold-deep); font-size: 21px; }
.upload-card strong { font-size: 14px; }
.upload-card small { color: #7a817f; font-size: 11px; }
.file-name { max-width: 100%; overflow: hidden; color: var(--success); font-size: 11px; font-style: normal; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.is-hidden { display: none; }

.consent { display: flex; gap: 10px; align-items: flex-start; margin: 23px 0; color: #536560; font-size: 12px; cursor: pointer; }
.consent input { width: 17px; height: 17px; margin-top: 3px; accent-color: var(--ink); }
.privacy-note { display: flex; gap: 10px; align-items: center; margin: -8px 0 20px; padding: 12px 14px; border: 1px solid #cfe0da; border-radius: 11px; background: #f3faf7; color: #47625c; font-size: 11px; }
.privacy-note strong { flex: 0 0 auto; color: #1f5a49; }
.form-message { display: none; margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; font-size: 13px; font-weight: 700; }
.form-message.error { display: block; background: #fff0f0; color: #9e3030; }
.form-message.success { display: block; background: #eaf7f1; color: #176046; }
.submit-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border: 0; border-radius: 12px; background: linear-gradient(135deg, var(--ink), #285a52); color: white; font-weight: 900; cursor: pointer; box-shadow: 0 12px 24px rgba(23,59,55,.18); transition: transform .18s ease, box-shadow .18s ease; }
.submit-button:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(23,59,55,.24); }
.submit-button:disabled { cursor: wait; opacity: .7; transform: none; }
.trap-field { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
footer { margin-top: 10px; padding: 24px 0 35px; border-top: 1px solid rgba(160,130,61,.2); color: #60736e; text-align: center; font-size: 12px; font-weight: 700; }
.secure-document-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.secure-document-card { width: min(100%,620px); padding: clamp(24px,5vw,48px); border: 1px solid rgba(185,151,58,.35); border-radius: 28px; background: rgba(255,255,255,.96); box-shadow: 0 28px 75px rgba(18,53,47,.15); text-align: center; }
.secure-document-card > img { width: 92px; height: 92px; object-fit: contain; }
.secure-document-card h1 { color: var(--green); margin: 10px 0 20px; }
.secure-document-card form { display: grid; gap: 18px; }
.secure-document-card h2 { padding: 13px; border-radius: 14px; color: var(--gold-dark); background: var(--gold-soft); }
.secure-request-state { margin: 15px 0; padding: 14px; border-radius: 12px; background: #edf5f1; color: var(--green); }
.secure-request-state.error { background: #fff0f0; color: #a02727; }
.secure-request-state.success { background: #e7f8ec; color: #13753b; }

@media (max-width: 900px) {
    .hero-guide { position: relative; inset: auto; width: 100%; margin-top: 25px; transform: none; }
    .application-layout { grid-template-columns: 1fr; }
    .vacancies { position: static; }
}

@media (max-width: 620px) {
    .page-shell { width: min(100% - 20px, 1220px); }
    .site-header { min-height: 84px; }
    .brand img { width: 52px; height: 52px; }
    .brand strong { font-size: 14px; }
    .header-tag { padding: 6px 10px; font-size: 11px; }
    .hero { min-height: 360px; padding: 34px 23px; border-radius: 22px; }
    .hero h1 { font-size: 38px; }
    .hero-points { gap: 7px; }
    .application-layout { margin-top: 18px; gap: 18px; }
    .vacancies, .form-panel { padding: 22px 17px; border-radius: 18px; }
    .form-grid, .uploads-grid { grid-template-columns: 1fr; }
    .field-wide { grid-column: auto; }
    .form-section-heading { grid-column: auto; }
    .vacancy-card { grid-template-columns: 34px 1fr; padding: 17px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
