/*
 * Careers site (careers.ctg.us). Hand-written, no build step.
 * Mirrors the company site: deep green ground, one accent green, Gabarito
 * for display, Instrument Sans for text, IBM Plex Mono for small labels.
 */

:root {
    /* Colour */
    --ink: #20251C;
    --ink-2: #2B3525;
    --ink-3: #171B14;
    --accent: #6DA03C;
    --accent-strong: #4F7A28;
    --accent-soft: #A8D878;
    --accent-tint: #EEF4E4;
    --page: #FAFBF7;
    --surface: #FFFFFF;
    --surface-2: #F4F6F0;
    --text: #20251C;
    --muted: #5D635A;
    --on-dark: #FFFFFF;
    --on-dark-muted: rgba(255, 255, 255, 0.7);
    --border: #E1E7D8;
    --border-strong: #C5CFB6;
    --border-dark: rgba(255, 255, 255, 0.12);
    --danger: #B3261E;
    --danger-bg: #FBEDEC;
    --focus-ring: 0 0 0 3px rgba(109, 160, 60, 0.45);

    /* Type */
    --font-display: "Gabarito", "Instrument Sans", system-ui, sans-serif;
    --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

    /* Shape and space */
    --r-sm: 8px;
    --r: 12px;
    --r-lg: 20px;
    --r-pill: 999px;
    --s-1: 8px;
    --s-2: 12px;
    --s-3: 16px;
    --s-4: 24px;
    --s-5: 32px;
    --s-6: 48px;
    --s-7: 64px;
    --s-8: 96px;
    --container: 1120px;
    --measure: 68ch;
    --gutter: clamp(16px, 4vw, 40px);
    --header-h: 60px;
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --fast: 160ms;
}

/* Base ---------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.modal-open {
    overflow: hidden;
}

main {
    flex: 1 0 auto;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--accent-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent);
}

:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 4px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    text-wrap: balance;
}

p {
    margin: 0 0 1em;
}

strong {
    font-weight: 600;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-inline: var(--gutter);
}

.narrow {
    max-width: calc(var(--measure) + 2 * var(--gutter));
}

.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;
}

.skip-link {
    position: absolute;
    left: var(--s-3);
    top: -100px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--r-pill);
    box-shadow: 0 8px 24px rgba(32, 37, 28, 0.2);
}

.skip-link:focus {
    top: var(--s-3);
}

.kicker {
    margin: 0 0 var(--s-3);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-soft);
}

.kicker--dark {
    color: var(--accent-strong);
}

/* Buttons ------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: 1px solid var(--accent);
    border-radius: var(--r-pill);
    background: var(--accent);
    color: var(--on-dark);
    font: 500 15px/1.2 var(--font-body);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.button:hover {
    background: var(--accent-strong);
    border-color: var(--accent-strong);
    color: var(--on-dark);
}

.button:active {
    transform: translateY(1px);
}

.button:disabled {
    cursor: default;
    opacity: 0.7;
}

.button--light {
    background: var(--surface);
    border-color: var(--surface);
    color: var(--ink);
}

.button--light:hover {
    background: var(--accent-tint);
    border-color: var(--accent-tint);
    color: var(--ink);
}

.button--outline-dark {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--ink);
}

.button--outline-dark:hover {
    background: var(--surface);
    border-color: var(--ink);
    color: var(--ink);
}

.button--small {
    padding: 8px 16px;
    font-size: 14px;
}

.button--block {
    width: 100%;
}

.button__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--on-dark);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.button.is-busy .button__spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Header -------------------------------------------------------------- */

.site-header {
    background: var(--ink);
    color: var(--on-dark);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    color: inherit;
    text-decoration: none;
}

.brand__logo {
    height: 30px;
    width: auto;
}

.brand__label {
    padding-left: var(--s-2);
    border-left: 1px solid var(--border-dark);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--s-4);
}

.site-nav__link {
    color: var(--on-dark-muted);
    font-size: 14px;
    text-decoration: none;
}

.site-nav__link:hover {
    color: var(--on-dark);
}

/* Hero ---------------------------------------------------------------- */

.hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(120% 90% at 85% 0%, var(--ink-2) 0%, var(--ink) 55%, var(--ink-3) 100%);
    color: var(--on-dark);
}

.hero__inner {
    position: relative;
    padding-block: var(--s-8) calc(var(--s-8) - var(--s-2));
    max-width: var(--container);
}

.hero__motif {
    position: absolute;
    top: 50%;
    right: -4vw;
    width: min(46vw, 620px);
    aspect-ratio: 1;
    transform: translateY(-50%);
    pointer-events: none;
    animation: appear 1.2s var(--ease) 0.2s both;
}

.hero__title {
    max-width: 14ch;
    margin: 0 0 var(--s-4);
    font-size: clamp(42px, 6.4vw, 76px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.02;
}

.hero__accent {
    color: var(--accent-soft);
}

.hero__lede {
    max-width: 52ch;
    margin: 0 0 var(--s-5);
    font-size: clamp(16px, 1.4vw, 18px);
    line-height: 1.6;
    color: var(--on-dark-muted);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-4);
}

.hero__count {
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-dark-muted);
}

.hero__inner > * {
    animation: rise 0.6s var(--ease) both;
}

.hero__inner > :nth-child(2) {
    animation-delay: 0.06s;
}

.hero__inner > :nth-child(3) {
    animation-delay: 0.12s;
}

.hero__inner > :nth-child(4) {
    animation-delay: 0.18s;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes appear {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Sections ------------------------------------------------------------ */

.section {
    padding-block: var(--s-7);
}

.section--tint {
    background: var(--accent-tint);
}

.section__head {
    max-width: var(--measure);
    margin-bottom: var(--s-5);
}

.section__title {
    display: flex;
    align-items: baseline;
    gap: var(--s-2);
    margin: 0 0 var(--s-2);
    font-size: clamp(26px, 3vw, 34px);
}

.section__count {
    font: 500 14px/1 var(--font-mono);
    letter-spacing: 0;
    color: var(--muted);
}

.notice {
    padding: 10px 0;
    background: #FFF4D6;
    color: #5C4300;
    font-size: 14px;
    text-align: center;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    background: var(--surface);
    font-size: 13px;
    line-height: 1.3;
    color: var(--ink);
    white-space: nowrap;
}

.chip--quiet {
    border-color: transparent;
    background: var(--surface-2);
    color: var(--muted);
}

/* Roles list ---------------------------------------------------------- */

.roles-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3) var(--s-4);
    margin-bottom: var(--s-4);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--border);
}

.roles-head .section__title {
    margin: 0;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--s-1);
}

.filter select {
    appearance: none;
    -webkit-appearance: none;
    max-width: 220px;
    padding: 8px 32px 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2320251C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
    font: 500 14px/1.3 var(--font-body);
    color: var(--ink);
    cursor: pointer;
    text-overflow: ellipsis;
}

.filter select:hover {
    border-color: var(--ink);
}

.js .filters__submit {
    display: none;
}

.filters__clear {
    margin-left: var(--s-1);
    font-size: 14px;
}

.job-group + .job-group {
    margin-top: var(--s-6);
}

.job-group__title {
    display: flex;
    align-items: baseline;
    gap: var(--s-2);
    margin: 0 0 var(--s-1);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.job-group__count {
    color: var(--accent-strong);
}

.job-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.job-list > li + li {
    border-top: 1px solid var(--border);
}

.job-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 24px;
    align-items: center;
    gap: var(--s-4);
    margin-inline: calc(-1 * var(--s-3));
    padding: 18px var(--s-3);
    border-radius: var(--r);
    color: inherit;
    text-decoration: none;
    transition: background-color var(--fast) var(--ease);
}

.job-row:hover,
.job-row:focus-visible {
    background: var(--accent-tint);
    color: inherit;
}

.job-row__main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.job-row__title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

.job-row__meta {
    font-size: 14px;
    color: var(--muted);
}

.job-row__tags {
    display: flex;
    gap: 6px;
}

.job-row__arrow {
    display: flex;
    color: var(--accent-strong);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}

.job-row:hover .job-row__arrow,
.job-row:focus-visible .job-row__arrow {
    opacity: 1;
    transform: none;
}

.empty {
    padding: var(--s-6) var(--s-4);
    border: 1px dashed var(--border-strong);
    border-radius: var(--r-lg);
    text-align: center;
}

.empty h3 {
    font-size: 22px;
}

.empty p {
    max-width: 48ch;
    margin: 0 auto;
    color: var(--muted);
}

.empty p + p {
    margin-top: var(--s-3);
}

/* How we hire --------------------------------------------------------- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.step {
    padding-top: var(--s-3);
    border-top: 1px solid var(--border-strong);
}

.step__index {
    display: block;
    margin-bottom: var(--s-3);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    color: var(--accent-strong);
}

.step h3 {
    font-size: 20px;
    margin-bottom: 0.4em;
}

.step p {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
}

/* Job page ------------------------------------------------------------ */

.job-head {
    padding-block: var(--s-6) var(--s-5);
    border-bottom: 1px solid var(--border);
    animation: rise 0.5s var(--ease) both;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--s-5);
    font-size: 14px;
    color: var(--muted);
    text-decoration: none;
}

.back::before {
    content: "←";
}

.back:hover {
    color: var(--ink);
}

.job-head__title {
    margin: 0 0 var(--s-1);
    font-size: clamp(30px, 4.4vw, 46px);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.job-head__meta {
    margin: 0 0 var(--s-3);
    font-size: 16px;
    color: var(--muted);
}

.job-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    margin-top: var(--s-5);
}

.share {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.share__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}

.share__link:hover,
.share__link.is-done {
    background: var(--accent-tint);
    color: var(--accent-strong);
}

.share__status {
    margin-left: 4px;
    font-size: 13px;
    color: var(--accent-strong);
}

.share__status:empty {
    display: none;
}

.job-body {
    padding-block: var(--s-6) var(--s-7);
}

.job-summary {
    margin: 0 0 var(--s-6);
    font-size: 20px;
    line-height: 1.5;
    color: var(--ink);
}

.job-section + .job-section {
    margin-top: var(--s-6);
}

.job-section__title {
    margin: 0 0 var(--s-3);
    font-size: 22px;
}

.prose > :first-child {
    margin-top: 0;
}

.prose > :last-child {
    margin-bottom: 0;
}

.prose h2,
.prose h3 {
    margin-top: 1.5em;
    font-size: 18px;
}

.prose ul,
.prose ol {
    margin: 0 0 1em;
    padding-left: 1.3em;
}

.prose li + li {
    margin-top: 0.35em;
}

.prose ul > li::marker {
    color: var(--accent);
}

.prose blockquote {
    margin: 1em 0;
    padding-left: var(--s-3);
    border-left: 2px solid var(--accent);
    color: var(--muted);
}

.job-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    margin-top: var(--s-7);
    padding: var(--s-4) var(--s-5);
    border-radius: var(--r-lg);
    background: var(--accent-tint);
}

.job-end p {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
}

/* Sticky bar on scroll (desktop) and fixed bar (mobile) */

.job-bar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    transform: translateY(-100%);
    background: rgba(250, 251, 247, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: transform 200ms var(--ease);
}

.job-bar.is-visible {
    transform: none;
}

.job-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    height: 56px;
}

.job-bar__title {
    overflow: hidden;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.apply-bar {
    display: none;
}

/* Apply dialog -------------------------------------------------------- */

.modal {
    display: none;
    width: min(680px, calc(100% - 2 * var(--s-3)));
    max-height: calc(100dvh - 2 * var(--s-4));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 24px 64px rgba(23, 27, 20, 0.28);
    opacity: 0;
    transform: translateY(10px) scale(0.985);
    transition:
        opacity 180ms var(--ease),
        transform 180ms var(--ease),
        display 180ms allow-discrete,
        overlay 180ms allow-discrete;
}

.modal[open] {
    display: flex;
    opacity: 1;
    transform: none;
}

.modal::backdrop {
    background: rgba(23, 27, 20, 0);
    transition:
        background-color 180ms var(--ease),
        display 180ms allow-discrete,
        overlay 180ms allow-discrete;
}

.modal[open]::backdrop {
    background: rgba(23, 27, 20, 0.55);
}

@starting-style {
    .modal[open] {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }

    .modal[open]::backdrop {
        background: rgba(23, 27, 20, 0);
    }
}

.modal__frame {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
}

.modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5) var(--s-3);
    border-bottom: 1px solid var(--border);
}

.modal__head .kicker {
    margin-bottom: 4px;
}

.modal__title {
    margin: 0;
    font-size: 22px;
}

.modal__close {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin: -6px -8px 0 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.modal__close:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.apply-form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin: 0;
}

.modal__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: var(--s-4) var(--s-5);
    overscroll-behavior: contain;
}

.modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    padding: var(--s-3) var(--s-5);
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.modal__foot-note {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Without JS or without <dialog>, the form sits inline under the job. */
.no-js .modal,
.no-dialog .modal {
    display: block;
    position: static;
    width: 100%;
    max-width: calc(var(--measure) + 2 * var(--gutter));
    max-height: none;
    margin: 0 auto var(--s-7);
    padding-inline: var(--gutter);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    transform: none;
}

.no-js .modal__frame,
.no-dialog .modal__frame {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
}

.no-js .modal__close,
.no-dialog .modal__close {
    display: none;
}

/* Form controls ------------------------------------------------------- */

.form-section {
    margin: 0 0 var(--s-4);
    padding: 0;
    border: 0;
    min-width: 0;
}

.form-section > legend {
    margin-bottom: var(--s-3);
    padding: 0;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-3);
}

.field {
    margin-bottom: var(--s-3);
}

.form-grid .field {
    margin-bottom: 0;
}

.field > label,
.field__choices > legend {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.field__optional {
    font-weight: 400;
    color: var(--muted);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    background: var(--surface);
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus-ring);
}

.field__hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.field__error {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--danger);
}

.field--invalid input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.field--invalid textarea,
.field--invalid .dropzone {
    border-color: var(--danger);
}

.field__choices {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.pills {
    display: inline-flex;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-pill);
    overflow: hidden;
}

.pill {
    position: relative;
}

.pill input {
    position: absolute;
    inset: 0;
    opacity: 0;
    margin: 0;
    cursor: pointer;
}

.pill span {
    display: block;
    min-width: 72px;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: var(--ink);
    transition: background-color var(--fast) var(--ease);
}

.pill + .pill span {
    border-left: 1px solid var(--border-strong);
}

.pill:hover span {
    background: var(--surface-2);
}

.pill input:checked + span {
    background: var(--ink);
    color: var(--on-dark);
}

.pill input:focus-visible + span {
    box-shadow: inset var(--focus-ring);
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: var(--s-2);
    font-size: 14px;
    line-height: 1.5;
    cursor: pointer;
}

.choice input {
    flex: none;
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--accent);
}

.field--consent {
    padding-top: var(--s-3);
    border-top: 1px solid var(--border);
}

/* Drop zone: the native file input fills the box, invisible, so clicks,
   keyboard and drag-and-drop all reach it. */
.dropzone {
    position: relative;
    border: 1px dashed var(--border-strong);
    border-radius: var(--r);
    background: var(--surface-2);
    transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}

.dropzone:hover,
.dropzone.is-over {
    border-color: var(--accent);
    background: var(--accent-tint);
}

.dropzone.has-file {
    border-style: solid;
    border-color: var(--accent);
    background: var(--accent-tint);
}

.dropzone.is-large {
    border-color: var(--danger);
}

.dropzone:focus-within {
    box-shadow: var(--focus-ring);
}

.dropzone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--s-4) var(--s-3);
    text-align: center;
}

.dropzone__icon {
    color: var(--accent-strong);
}

.dropzone__text {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
}

.dropzone__text strong {
    color: var(--accent-strong);
}

.dropzone__file {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    word-break: break-word;
}

.dropzone__file:empty {
    display: none;
}

.has-file .dropzone__text {
    display: none;
}

.field-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-alert {
    margin-bottom: var(--s-4);
    padding: var(--s-2) var(--s-3);
    border-radius: var(--r-sm);
    background: var(--danger-bg);
    color: var(--danger);
    font-size: 14px;
    font-weight: 500;
}

.form-alert p {
    margin: 0;
}

.field--turnstile {
    margin-top: var(--s-4);
}

.cf-turnstile {
    max-width: 100%;
}

.dev-note {
    margin: var(--s-3) 0 0;
    padding: 8px 12px;
    border-radius: var(--r-sm);
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--muted);
}

/* Thank-you and error pages ------------------------------------------- */

.page-head {
    padding-block: var(--s-8) var(--s-5);
    animation: rise 0.5s var(--ease) both;
}

.page-head__title {
    margin: 0 0 var(--s-2);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-head__lede {
    margin: 0;
    font-size: 18px;
    color: var(--muted);
}

.page-body {
    padding-bottom: var(--s-8);
}

.timeline {
    margin: 0 0 var(--s-5);
    padding: 0;
    list-style: none;
    counter-reset: timeline;
}

.timeline li {
    position: relative;
    padding: var(--s-3) 0 var(--s-3) 48px;
    border-top: 1px solid var(--border);
    counter-increment: timeline;
}

.timeline li::before {
    content: counter(timeline, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: calc(var(--s-3) + 4px);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--accent-strong);
}

/* Footer -------------------------------------------------------------- */

.site-footer {
    position: relative;
    overflow: hidden;
    background: var(--ink);
    color: var(--on-dark-muted);
    font-size: 14px;
}

.site-footer a {
    color: var(--on-dark);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--accent-soft);
}

.site-footer__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--s-5);
    padding-block: var(--s-6) var(--s-5);
}

.site-footer__brand img {
    height: 30px;
    width: auto;
    margin-bottom: var(--s-3);
}

.site-footer__brand p {
    margin: 0;
}

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
}

.site-footer__mark {
    margin: 0;
    padding-inline: var(--gutter);
    font-family: var(--font-display);
    font-size: clamp(56px, 11vw, 150px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.9;
    white-space: nowrap;
    color: rgba(109, 160, 60, 0.12);
    user-select: none;
    pointer-events: none;
}

.site-footer__bar {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--s-2);
    padding-block: var(--s-3);
    border-top: 1px solid var(--border-dark);
    font-size: 12px;
}

.site-footer__bar p {
    margin: 0;
}

/* Responsive ---------------------------------------------------------- */

@media (max-width: 899px) {
    .steps {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--s-4);
    }
}

@media (max-width: 719px) {
    :root {
        --header-h: 56px;
    }

    .brand__logo {
        height: 26px;
    }

    .brand__label,
    .site-nav__link {
        display: none;
    }

    .hero__inner {
        padding-block: var(--s-7) var(--s-6);
    }

    .hero__motif {
        top: auto;
        bottom: -18vw;
        right: -24vw;
        width: 80vw;
        transform: none;
        opacity: 0.6;
    }

    .roles-head {
        align-items: stretch;
        flex-direction: column;
    }

    .filter {
        flex: 1 1 auto;
    }

    .filter select {
        width: 100%;
        max-width: none;
    }

    .job-row {
        grid-template-columns: minmax(0, 1fr) 20px;
        gap: var(--s-3);
        padding: var(--s-3) var(--s-3);
    }

    .job-row__tags {
        grid-column: 1;
        margin-top: 6px;
    }

    .job-row__arrow {
        grid-column: 2;
        grid-row: 1 / span 2;
        opacity: 1;
        transform: none;
    }

    .job-head {
        padding-top: var(--s-5);
    }

    .job-head__actions .button {
        display: none;
    }

    .job-bar {
        display: none;
    }

    .job-end {
        flex-direction: column;
        align-items: flex-start;
    }

    .has-apply-bar main {
        padding-bottom: 80px;
    }

    .apply-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 40;
        padding: 12px var(--gutter);
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        background: rgba(250, 251, 247, 0.92);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid var(--border);
    }

    .modal {
        width: 100%;
        max-width: none;
        max-height: 100dvh;
        height: 100dvh;
        margin: 0;
        border-radius: 0;
    }

    .modal__head,
    .modal__body,
    .modal__foot {
        padding-inline: var(--s-3);
    }

    .modal__foot {
        flex-direction: column-reverse;
        align-items: stretch;
        padding-bottom: calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
    }

    .modal__foot-note {
        text-align: center;
    }

    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}
