:root {
    --ink: #17221d;
    --muted: #607068;
    --forest: #12372a;
    --forest-light: #1f5b46;
    --mint: #dff3e9;
    --cream: #f7f5ef;
    --paper: #ffffff;
    --line: #dce4df;
    --danger: #a82424;
    --warning: #8a5a06;
    --success: #18704d;
    --shadow: 0 18px 55px rgba(18, 55, 42, 0.11);
    --radius: 22px;
    color-scheme: light;
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-size: 16px;
    line-height: 1.7;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.page-width {
    width: min(1160px, calc(100% - 40px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    z-index: 100;
    inset-block-start: 10px;
    inset-inline-start: 10px;
    padding: 10px 16px;
    background: var(--paper);
    color: var(--forest);
    border-radius: 8px;
    transform: translateY(-150%);
}

.skip-link:focus {
    transform: translateY(0);
}

.public-header {
    border-bottom: 1px solid rgba(18, 55, 42, 0.1);
    background: rgba(247, 245, 239, 0.94);
}

.header-inner,
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.header-inner {
    min-height: 74px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--forest);
    font-size: 1.08rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 12px 4px 12px 12px;
    background: var(--forest);
    color: var(--paper);
    font-size: 0.8rem;
    letter-spacing: -1px;
}

.brand small {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.header-trust {
    color: var(--muted);
    font-size: 0.88rem;
}

.header-trust span {
    color: #46a77d;
}

.public-footer {
    padding-block: 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.86rem;
}

.job-hero {
    position: relative;
    overflow: hidden;
    padding-block: clamp(68px, 9vw, 120px);
    background:
        radial-gradient(circle at 13% 10%, rgba(141, 206, 176, 0.22), transparent 31%),
        linear-gradient(135deg, #f7f5ef 0%, #eef4ed 100%);
}

.job-hero::after {
    position: absolute;
    inset-block-end: -160px;
    inset-inline-start: -90px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(18, 55, 42, 0.08);
    border-radius: 50%;
    content: "";
}

.job-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(310px, 0.82fr);
    gap: clamp(50px, 8vw, 110px);
    align-items: center;
}

.eyebrow,
.card-kicker {
    margin: 0 0 12px;
    color: var(--forest-light);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

h1,
h2,
h3,
p {
    overflow-wrap: break-word;
}

h1,
h2,
h3 {
    margin-block-start: 0;
    line-height: 1.28;
}

.job-hero h1 {
    max-width: 780px;
    margin-block-end: 20px;
    color: var(--forest);
    font-size: clamp(2.25rem, 5vw, 4.75rem);
    letter-spacing: -0.04em;
}

.hero-summary {
    max-width: 680px;
    margin: 0;
    color: #44564d;
    font-size: clamp(1.05rem, 2vw, 1.27rem);
}

.job-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-block: 28px;
    color: var(--muted);
    font-size: 0.9rem;
}

.job-facts span span {
    margin-inline-end: 4px;
    color: var(--forest-light);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 20px;
    align-items: center;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.primary-button {
    background: var(--forest);
    color: var(--paper);
    box-shadow: 0 10px 24px rgba(18, 55, 42, 0.18);
}

.primary-button:hover {
    background: #0b2b20;
    transform: translateY(-1px);
}

.secondary-button {
    border-color: #b9c8c0;
    background: var(--paper);
    color: var(--forest);
}

.secondary-button:hover {
    border-color: var(--forest);
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(38, 125, 91, 0.34);
    outline-offset: 3px;
}

button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.privacy-note {
    color: var(--muted);
    font-size: 0.86rem;
}

.job-card {
    padding: clamp(28px, 4vw, 42px);
    border: 1px solid rgba(18, 55, 42, 0.12);
    border-radius: 30px 8px 30px 30px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.job-card h2 {
    margin-block-end: 14px;
    color: var(--forest);
    font-size: clamp(1.45rem, 2vw, 1.9rem);
}

.job-card > p:not(.card-kicker) {
    color: var(--muted);
}

.check-list {
    display: grid;
    gap: 12px;
    margin: 25px 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    position: relative;
    padding-inline-start: 29px;
}

.check-list li::before {
    position: absolute;
    inset-inline-start: 0;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    background: var(--mint);
    color: var(--forest);
    content: "✓";
    font-size: 0.75rem;
    font-weight: 900;
}

.job-details-section {
    padding-block: clamp(70px, 10vw, 120px);
    background: var(--paper);
}

.narrow-content {
    width: min(1000px, calc(100% - 40px));
}

.narrow-content > h2 {
    color: var(--forest);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-block-start: 32px;
}

.detail-grid article {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.detail-number {
    color: #8ca298;
    font-size: 0.76rem;
    font-weight: 800;
}

.detail-grid h3 {
    margin: 16px 0 8px;
    color: var(--forest);
}

.detail-grid p,
.bottom-cta p {
    margin: 0;
    color: var(--muted);
}

.bottom-cta {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
    margin-block-start: 52px;
    padding: clamp(26px, 4vw, 42px);
    border-radius: 26px;
    background: var(--forest);
    color: var(--paper);
}

.bottom-cta h2 {
    margin-block-end: 5px;
}

.bottom-cta p {
    color: #c9d8d1;
}

.bottom-cta .primary-button {
    flex: 0 0 auto;
    background: var(--paper);
    color: var(--forest);
}

.apply-page {
    min-height: calc(100vh - 140px);
    padding-block: 26px 70px;
    background:
        radial-gradient(circle at 90% 4%, rgba(193, 225, 207, 0.35), transparent 24%),
        var(--cream);
}

.apply-width {
    width: min(820px, calc(100% - 32px));
}

.apply-back {
    margin-block-end: 22px;
}

.apply-back a {
    color: var(--forest-light);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.apply-heading {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-block-end: 24px;
}

.apply-heading h1 {
    margin: 0;
    color: var(--forest);
    font-size: clamp(1.55rem, 4vw, 2.45rem);
}

.save-indicator {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 0.78rem;
}

.save-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #87958e;
}

.save-indicator[data-state="saving"] .save-dot {
    background: #cc8b1f;
    animation: pulse 1s ease-in-out infinite;
}

.save-indicator[data-state="saved"] .save-dot {
    background: var(--success);
}

.save-indicator[data-state="error"] .save-dot {
    background: var(--danger);
}

@keyframes pulse {
    50% { opacity: 0.35; }
}

.network-banner,
.form-alert {
    margin-block: 16px;
    padding: 13px 16px;
    border: 1px solid #e0ba73;
    border-radius: 12px;
    background: #fff5de;
    color: #674309;
    font-size: 0.9rem;
}

.form-alert[data-kind="error"] {
    border-color: #e2a9a9;
    background: #fff0f0;
    color: #812121;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(var(--progress-count, 4), 1fr);
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.progress-steps li {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 5px;
    color: #809087;
    font-size: 0.74rem;
    text-align: center;
}

.progress-steps li::before {
    position: absolute;
    z-index: 0;
    inset-block-start: 15px;
    inset-inline-start: 50%;
    width: 100%;
    height: 2px;
    background: #d5ded9;
    content: "";
}

.progress-steps li:last-child::before {
    display: none;
}

.progress-steps span {
    z-index: 1;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 2px solid #c9d4ce;
    border-radius: 50%;
    background: var(--cream);
    font-weight: 800;
}

.progress-steps li[aria-current="step"],
.progress-steps li[data-complete="true"] {
    color: var(--forest);
}

.progress-steps li[aria-current="step"] span,
.progress-steps li[data-complete="true"] span {
    border-color: var(--forest);
    background: var(--forest);
    color: var(--paper);
}

.progress-steps li[data-complete="true"]::before {
    background: var(--forest);
}

.application-form,
.submission-success {
    border: 1px solid rgba(18, 55, 42, 0.1);
    border-radius: 26px;
    background: var(--paper);
    box-shadow: 0 14px 44px rgba(18, 55, 42, 0.08);
}

.application-form {
    padding: clamp(22px, 5vw, 46px);
}

.stage-heading {
    margin-block-end: 32px;
}

.stage-heading > span {
    color: var(--forest-light);
    font-size: 0.76rem;
    font-weight: 800;
}

.stage-heading h2 {
    margin: 6px 0 8px;
    color: var(--forest);
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.stage-heading p {
    margin: 0;
    color: var(--muted);
}

.question {
    margin-block-end: 27px;
}

.skill-group-heading {
    margin: 34px 0 17px;
    padding-block-end: 9px;
    border-bottom: 1px solid var(--line);
    color: var(--forest);
    font-size: 1rem;
}

.stage-heading + .skill-group-heading {
    margin-block-start: 0;
}

.question-label,
.choice-fieldset legend {
    display: block;
    margin-block-end: 9px;
    color: #263a31;
    font-size: 0.95rem;
    font-weight: 750;
}

.choice-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.required-mark {
    color: var(--danger);
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    min-height: 51px;
    padding: 12px 14px;
    border: 1px solid #b9c8c0;
    border-radius: 11px;
    background: #fcfdfc;
    color: var(--ink);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

select {
    cursor: pointer;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #789489;
}

input[aria-invalid="true"],
select[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(168, 36, 36, 0.08);
}

.ltr-input {
    direction: ltr;
    text-align: right;
}

.choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.choice-card {
    position: relative;
    display: flex;
    min-height: 50px;
    gap: 10px;
    align-items: center;
    padding: 11px 13px;
    border: 1px solid #c5d0ca;
    border-radius: 11px;
    cursor: pointer;
    background: #fcfdfc;
    font-size: 0.91rem;
}

.choice-card:has(input:checked) {
    border-color: var(--forest-light);
    background: #eff8f3;
    box-shadow: inset 0 0 0 1px var(--forest-light);
}

.choice-card input {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--forest);
}

.field-help,
.field-error {
    margin: 6px 0 0;
    font-size: 0.78rem;
}

.field-help {
    color: var(--muted);
}

.optional-mark {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 500;
}

.resume-upload {
    display: grid;
    gap: 14px;
    margin-block: 34px 8px;
    padding: 20px;
    border: 1px dashed #9bb0a6;
    border-radius: 16px;
    background: #f7faf8;
}

.resume-upload .field-help,
.resume-status {
    margin: 0;
}

.resume-picker {
    display: inline-flex;
    width: fit-content;
    min-height: 48px;
    gap: 9px;
    align-items: center;
    padding: 10px 18px;
    border: 1px solid var(--forest);
    border-radius: 11px;
    cursor: pointer;
    background: var(--paper);
    color: var(--forest);
}

.resume-picker:focus-within {
    outline: 3px solid rgba(38, 125, 91, 0.24);
    outline-offset: 3px;
}

.resume-picker input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.resume-status {
    color: var(--muted);
    font-size: 0.82rem;
}

.resume-upload[data-state="uploading"] .resume-status {
    color: var(--warning);
}

.resume-upload[data-state="saved"] {
    border-style: solid;
    border-color: #8bb9a3;
    background: #f0f8f4;
}

.resume-upload[data-state="saved"] .resume-status {
    color: var(--success);
}

.resume-upload[data-state="error"] {
    border-color: #d99393;
    background: #fff7f7;
}

.resume-upload[data-state="error"] .resume-status {
    color: var(--danger);
}

.field-error {
    color: var(--danger);
}

.review-list {
    display: grid;
    gap: 0;
    margin: 0 0 28px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.review-list > div {
    display: grid;
    grid-template-columns: minmax(150px, 0.72fr) minmax(0, 1.28fr);
    gap: 15px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
}

.review-list > div:last-child {
    border-bottom: 0;
}

.review-list dt {
    color: var(--muted);
    font-size: 0.8rem;
}

.review-list dd {
    margin: 0;
    white-space: pre-wrap;
}

.consent-check {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    background: #f2f6f3;
    cursor: pointer;
    font-size: 0.88rem;
}

.consent-check input {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    margin-block-start: 3px;
    accent-color: var(--forest);
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin-block-start: 35px;
    padding-block-start: 24px;
    border-top: 1px solid var(--line);
}

.form-actions .secondary-button {
    justify-self: start;
}

.form-actions .primary-button {
    justify-self: end;
}

.step-counter {
    color: var(--muted);
    font-size: 0.78rem;
}

.submit-button {
    gap: 10px;
}

.button-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submission-success {
    padding: clamp(32px, 7vw, 64px);
    text-align: center;
}

.submission-success h2 {
    margin-block-end: 10px;
    color: var(--forest);
    font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.submission-success > p:not(.eyebrow) {
    max-width: 550px;
    margin-inline: auto;
    color: var(--muted);
}

.success-icon {
    display: grid;
    width: 65px;
    height: 65px;
    place-items: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: var(--mint);
    color: var(--success);
    font-size: 2rem;
    font-weight: 900;
}

.reference-number {
    display: block;
    width: fit-content;
    margin: 22px auto;
    padding: 10px 18px;
    border: 1px dashed #88a398;
    border-radius: 10px;
    direction: ltr;
    color: var(--forest);
    font-size: 1.15rem;
    letter-spacing: 0.05em;
}

.noscript-alert {
    display: block;
}

@media (max-width: 760px) {
    .page-width,
    .narrow-content {
        width: min(100% - 28px, 680px);
    }

    .header-inner {
        min-height: 64px;
    }

    .header-trust {
        font-size: 0;
    }

    .header-trust span {
        font-size: 0.9rem;
    }

    .job-hero {
        padding-block: 50px 60px;
    }

    .job-hero-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .job-hero-grid {
        gap: 38px;
    }

    .job-hero h1 {
        font-size: clamp(2.2rem, 12vw, 3.5rem);
    }

    .bottom-cta,
    .apply-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .bottom-cta .primary-button {
        width: 100%;
    }

    .apply-page {
        padding-block-start: 18px;
    }

    .apply-width {
        width: min(100% - 20px, 680px);
    }

    .apply-heading {
        display: flex;
    }

    .save-indicator {
        align-self: flex-start;
    }

    .progress-steps strong {
        font-size: 0.65rem;
        line-height: 1.35;
    }

    .application-form {
        border-radius: 18px;
        padding: 22px 17px;
    }

    .choice-grid {
        grid-template-columns: 1fr;
    }

    .review-list > div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .form-actions {
        grid-template-columns: 1fr auto 1fr;
    }

    .form-actions .primary-button,
    .form-actions .secondary-button {
        min-width: 104px;
        padding-inline: 16px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 390px) {
    .progress-steps strong {
        display: none;
    }

    .hero-actions .primary-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
