/*
 * jobs.it.com site stylesheet (Concept B: Professional SaaS).
 *
 * One static file, served directly by nginx from public/css. No build step.
 * Rules are layered from generic to specific:
 *   1. Tokens   2. Base   3. Layout   4. Components   5. Page sections
 *   6. Legacy hooks used by not-yet-redesigned employer/operator views
 *   7. Responsive overrides
 * Keep raw colour and size values inside the token block only.
 */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    color-scheme: light dark;

    /* Colour: contrast ratios are against --surface unless noted. */
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --text: #0f1729;          /* 17.9:1 */
    --text-2: #344054;        /* 10.5:1 */
    --muted: #5b6577;         /* 5.9:1, 5.4:1 on --bg */
    --border: #e3e6eb;        /* decorative separators */
    --border-strong: #cdd2da; /* decorative card hover */
    --field-border: #7c8699;  /* 3.7:1, form boundaries (WCAG 1.4.11) */
    --accent: #3448d1;        /* 7.0:1; also the link colour */
    --accent-hover: #2a3bb0;
    --accent-ink: #ffffff;    /* 7.0:1 on --accent */
    --accent-soft: #eef0fd;
    --ok: #157347;   --ok-soft: #e8f5ee;
    --warn: #8f5700; --warn-soft: #fdf3e1;
    --bad: #b42318;  --bad-soft: #fdecea;
    --info: #1d4f91; --info-soft: #eaf1fb;
    --neutral-soft: #f0f2f5;
    --focus: #3448d1;
    --shadow-sm: 0 1px 2px rgb(16 24 40 / .05);
    --shadow-lg: 0 10px 28px -12px rgb(16 24 40 / .18);

    /* Typography */
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --fs-xs: .8125rem;
    --fs-sm: .875rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.375rem;
    --fs-2xl: clamp(1.625rem, 1.25rem + 1.4vw, 2.125rem);
    --fs-hero: clamp(2.125rem, 1.35rem + 3.3vw, 3.5rem);

    /* Space */
    --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.25rem;
    --s6: 1.75rem; --s7: 2.5rem; --s8: 4rem; --s9: 5.5rem;

    /* Shape and layout */
    --r-sm: 6px; --r: 10px; --r-lg: 14px; --r-pill: 999px;
    --control-h: 2.75rem;     /* 44px touch target */
    --gutter: 1.25rem;
    --container: 76rem;       /* public pages */
    --container-narrow: 55rem;/* forms, legal, workspace (matches previous 880px) */
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0c111b; --surface: #131a26; --surface-2: #101622;
        --text: #eef1f6; --text-2: #c8cfda; --muted: #96a1b3;
        --border: #232c3b; --border-strong: #34405a; --field-border: #64728e;
        --accent: #8e9cff; --accent-hover: #a7b2ff; --accent-ink: #0c111b; --accent-soft: #1a2142;
        --ok: #6fd3a0; --ok-soft: #0f2a1d; --warn: #f5c06a; --warn-soft: #2d2210;
        --bad: #f6938a; --bad-soft: #2f1512; --info: #9cc3f5; --info-soft: #132238;
        --neutral-soft: #1b2331; --focus: #8e9cff;
        --shadow-sm: none; --shadow-lg: none;
    }
}

/* 2. Base ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 400 var(--fs-md)/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-wrap: anywhere;
}
h1, h2, h3 { color: var(--text); line-height: 1.2; letter-spacing: -.015em; margin: 0 0 var(--s3); }
h1 { font-size: var(--fs-2xl); font-weight: 750; }
h2 { font-size: var(--fs-xl); font-weight: 700; }
h3 { font-size: var(--fs-lg); font-weight: 650; }
p { margin: 0 0 var(--s4); }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus-visible { outline: none; }
strong { font-weight: 650; }
ul, ol { padding-left: 1.25rem; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
    position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.skip-link:focus {
    position: fixed; top: var(--s3); left: var(--s3); z-index: 50; width: auto; height: auto;
    padding: var(--s3) var(--s4); overflow: visible; clip-path: none; white-space: normal;
    background: var(--surface); color: var(--text); border: 2px solid var(--accent); border-radius: var(--r-sm);
}

/* 3. Layout ---------------------------------------------------------------- */
/* The header keeps the brand link as a direct child (tests assert //header/a),
   so it is centred with padding rather than an inner wrapper. */
.site-header {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4);
    min-height: 4rem;
    padding: var(--s2) max(var(--gutter), calc((100% - var(--container)) / 2));
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.brand {
    display: inline-flex; align-items: center; gap: .55rem; flex-shrink: 0;
    color: var(--text); text-decoration: none; font-weight: 700; font-size: var(--fs-lg); letter-spacing: -.02em;
}
.brand:hover { color: var(--text); }
.brand-mark {
    display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 7px;
    background: var(--text); color: var(--surface);
    font: 700 .8rem/1 ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
.brand-it { color: var(--accent); }
.site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--s1); margin-left: auto; font-size: var(--fs-sm); }
.site-nav a:not(.btn) {
    color: var(--text-2); text-decoration: none; font-weight: 550;
    padding: .55rem .75rem; border-radius: var(--r-sm);
}
.site-nav a:not(.btn):hover { background: var(--neutral-soft); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--neutral-soft); color: var(--text); }
.site-nav .btn { margin-left: var(--s2); }

.site-main { flex: 1 0 auto; width: 100%; }
.site-main.is-narrow, .site-main.is-wide {
    width: min(100% - 2 * var(--gutter), var(--container-narrow));
    margin-inline: auto;
    padding-block: var(--s7) var(--s8);
}
.site-main.is-wide { width: min(100% - 2 * var(--gutter), var(--container)); }
.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }

.site-footer {
    margin-top: var(--s8);
    padding: var(--s7) max(var(--gutter), calc((100% - var(--container)) / 2)) var(--s6);
    background: var(--surface);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: var(--fs-sm);
}
.site-main.is-full + .site-footer { margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: var(--s6); }
.footer-about p { margin: var(--s3) 0 0; max-width: 24rem; }
.footer-col h2 {
    font-size: var(--fs-xs); font-weight: 650; text-transform: uppercase; letter-spacing: .07em;
    color: var(--text-2); margin: 0 0 var(--s3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer-col a, .footer-about .brand + p a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); text-decoration: underline; }
.footer-legal { margin: var(--s6) 0 0; padding-top: var(--s4); border-top: 1px solid var(--border); font-size: var(--fs-xs); }

/* 4. Components ------------------------------------------------------------ */
/* Buttons */
.btn, .button {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    min-height: var(--control-h); padding: .6rem 1.1rem;
    border: 1px solid var(--accent); border-radius: var(--r-sm);
    background: var(--accent); color: var(--accent-ink);
    font: 600 var(--fs-sm)/1.2 var(--font); text-decoration: none; text-align: center;
    max-width: 100%; overflow-wrap: break-word;
    cursor: pointer; box-shadow: var(--shadow-sm);
}
.btn:hover, .button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--field-border); }
.btn-secondary:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-2); }
.btn-sm { min-height: 2.25rem; padding: .4rem .85rem; }

/* Form controls (shared by every page, including employer/operator forms) */
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea {
    width: 100%; max-width: 100%; min-height: var(--control-h);
    padding: .55rem .75rem;
    border: 1px solid var(--field-border); border-radius: var(--r-sm);
    background: var(--surface); color: var(--text);
    font: inherit; font-size: var(--fs-md);
    box-shadow: var(--shadow-sm);
}
textarea { min-height: 8rem; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--focus); }
input[type="checkbox"], input[type="radio"] { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
label { font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); }
button:not(.btn):not(.button) {
    min-height: var(--control-h); padding: .55rem 1rem;
    border: 1px solid var(--accent); border-radius: var(--r-sm);
    background: var(--accent); color: var(--accent-ink);
    font: 600 var(--fs-sm)/1.2 var(--font); cursor: pointer;
}
button:not(.btn):not(.button):hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Cards and surfaces */
.card {
    position: relative;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
    padding: var(--s5); margin: 0 0 var(--s3); box-shadow: var(--shadow-sm);
}
.meta { color: var(--muted); font-size: var(--fs-sm); }
.eyebrow {
    margin: 0 0 var(--s3); color: var(--muted); font-size: var(--fs-xs);
    font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}

/* Badges: workplace arrangement only (known values) plus neutral facts */
.badge {
    display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: var(--r-sm);
    font-size: var(--fs-xs); font-weight: 650; line-height: 1.5;
    background: var(--neutral-soft); color: var(--text-2);
}
.badge.remote { background: var(--ok-soft); color: var(--ok); }
.badge.hybrid { background: var(--warn-soft); color: var(--warn); }
.badge.on-site { background: var(--accent-soft); color: var(--accent); }

/* Alerts */
.alert {
    display: flex; gap: var(--s3); align-items: flex-start;
    padding: var(--s3) var(--s4); border-radius: var(--r-sm);
    border: 1px solid transparent; font-size: var(--fs-sm); line-height: 1.5;
}
.alert p { margin: 0; }
.alert-info { background: var(--info-soft); color: var(--text-2); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-info strong { color: var(--info); }
[role="status"]:not(.alert), [role="alert"]:not(.alert) {
    padding: var(--s3) var(--s4); border-radius: var(--r-sm); background: var(--info-soft); color: var(--text);
}
[role="alert"]:not(.alert) { background: var(--bad-soft); }

/* Empty states. The class must remain exactly "empty" (tested). */
.empty {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
    padding: var(--s7) var(--s6); text-align: center; color: var(--text-2);
}
.empty h2 { font-size: var(--fs-xl); margin-bottom: var(--s2); }
.empty p { max-width: 34rem; margin-inline: auto; }
.empty p:last-child { margin-bottom: 0; }

/* Pagination (vendor/pagination/tailwind.blade.php) */
.pagination { margin-top: var(--s5); }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); }
.pager-btn {
    display: inline-flex; align-items: center; min-height: 2.5rem; padding: .45rem .9rem;
    border: 1px solid var(--field-border); border-radius: var(--r-sm); background: var(--surface);
    color: var(--text); font-size: var(--fs-sm); font-weight: 600; text-decoration: none;
}
a.pager-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pager-btn.is-disabled { color: var(--muted); border-color: var(--border); background: transparent; }
.pager-summary { flex: 1 1 auto; text-align: center; color: var(--muted); font-size: var(--fs-sm); }

/* Job card (public listings and homepage) */
.job-list { display: grid; gap: var(--s3); }
.job-card {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s5);
    margin: 0; padding: var(--s5);
}
.job-card:hover { border-color: var(--border-strong); }
.job-card-title { font-size: var(--fs-lg); font-weight: 650; margin: 0; letter-spacing: -.01em; }
.job-card-title a { color: var(--text); text-decoration: none; }
/* Whole card is clickable through the single title link (one link per card). */
.job-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.job-card-title a:hover { text-decoration: underline; }
.job-card-title a:focus-visible { outline: none; }
.job-card-title a:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.job-card-company { margin: .2rem 0 .65rem; color: var(--text-2); font-size: var(--fs-sm); }
.job-facts { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.job-fact {
    display: inline-flex; align-items: center; padding: .15rem .55rem; border-radius: var(--r-sm);
    border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 600; color: var(--text-2);
}
.job-card-side { text-align: right; font-size: var(--fs-sm); color: var(--muted); }
.job-card-salary { margin: 0 0 .2rem; font-weight: 650; color: var(--text); font-variant-numeric: tabular-nums; }
.job-card-date { margin: 0; }

/* Section heading row */
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s3); margin-bottom: var(--s5); }
.section-head h2 { margin: 0; }
.section-head p { margin: .35rem 0 0; color: var(--muted); font-size: var(--fs-sm); }

/* 5. Page sections --------------------------------------------------------- */
/* Homepage */
.home-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding-block: var(--s8) var(--s7); }
.home-hero .alert { margin-bottom: var(--s6); max-width: 54rem; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: .5rem; margin: 0 0 var(--s4);
    padding: .3rem .8rem; border: 1px solid var(--border); border-radius: var(--r-pill);
    background: var(--surface-2); color: var(--text-2); font-size: var(--fs-xs); font-weight: 650;
}
.hero-title { font-size: var(--fs-hero); font-weight: 760; letter-spacing: -.035em; line-height: 1.05; max-width: 17ch; margin-bottom: var(--s4); }
.hero-title span { color: var(--accent); }
.hero-lede { font-size: var(--fs-lg); color: var(--text-2); max-width: 42rem; margin-bottom: var(--s6); }
.hero-search {
    display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: var(--s2) var(--s3);
    align-items: end; max-width: 54rem;
    padding: var(--s3) var(--s4) var(--s4); background: var(--surface);
    border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
}
.hero-search .form-field { display: grid; gap: .3rem; min-width: 0; }
.hero-search label { font-size: var(--fs-xs); }
.hero-links { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s4); font-size: var(--fs-sm); color: var(--muted); }
.tag {
    display: inline-flex; align-items: center; min-height: 2.25rem; padding: .3rem .8rem;
    border: 1px solid var(--border-strong); border-radius: var(--r-pill); background: var(--surface);
    color: var(--text-2); font-size: var(--fs-sm); font-weight: 550; text-decoration: none;
}
.tag:hover { border-color: var(--text-2); color: var(--text); text-decoration: none; }
.hero-note { margin: var(--s3) 0 0; font-size: var(--fs-xs); color: var(--muted); }

.home-section { padding-top: var(--s8); }
.home-section:last-child { padding-bottom: var(--s8); }

.board-empty { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); padding: 0; overflow: hidden; margin: 0; }
.board-empty-main { padding: var(--s7); }
.board-empty-main h3 { font-size: var(--fs-xl); }
.board-empty-main p { color: var(--text-2); max-width: 34rem; }
.board-empty-side { padding: var(--s7); background: var(--surface-2); border-left: 1px solid var(--border); }
.board-empty-side h3 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: var(--s3); }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); font-size: var(--fs-sm); color: var(--text-2); }
.checklist li { display: grid; grid-template-columns: 1.25rem minmax(0, 1fr); gap: .5rem; }
.checklist li::before { content: "\2713"; color: var(--ok); font-weight: 700; }
.button-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); counter-reset: step; }
.steps .card { margin: 0; padding: var(--s6); counter-increment: step; }
.steps .card::before {
    content: "0" counter(step); display: inline-block; margin-bottom: var(--s4);
    padding: .3rem .5rem; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--accent);
    font: 700 var(--fs-xs)/1 ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
}
.steps h3 { margin-bottom: var(--s2); }
.steps p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.duo .card { margin: 0; padding: var(--s7); }
.duo p { color: var(--text-2); }

/* Job search page */
.page-head { margin-bottom: var(--s5); }
.page-head h1 { margin-bottom: var(--s2); }
.page-head p { margin: 0; color: var(--muted); }

/* The filter form keeps every label/control as a direct child (tested contract),
   so the layout is done with named grid areas instead of wrapper elements. */
.filter-form {
    display: grid; gap: .35rem var(--s3); align-items: end;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, .9fr) auto;
    grid-template-areas:
        "lq ll lw le reset"
        "q  l  w  e  submit";
    margin: 0 0 var(--s3); padding: var(--s4) var(--s5) var(--s5);
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm);
}
.filter-form > label { font-size: var(--fs-xs); }
.filter-form > label[for="q"] { grid-area: lq; }
.filter-form > label[for="location"] { grid-area: ll; }
.filter-form > label[for="workplace_type"] { grid-area: lw; }
.filter-form > label[for="employment_type"] { grid-area: le; }
.filter-form > #q { grid-area: q; }
.filter-form > #location { grid-area: l; }
.filter-form > #workplace_type { grid-area: w; }
.filter-form > #employment_type { grid-area: e; }
.filter-form > button { grid-area: submit; }
.filter-form > .filter-reset { grid-area: reset; justify-self: end; font-size: var(--fs-sm); padding-block: .1rem; }

.filter-note { margin: 0 0 var(--s5); font-size: var(--fs-xs); color: var(--muted); }
.active-filters { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin: 0 0 var(--s4); padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--muted); }
.active-filters a.tag::after { content: "\00d7"; margin-left: .4rem; color: var(--muted); font-weight: 700; }
.results-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s3); font-size: var(--fs-sm); color: var(--muted); }
.results-head p { margin: 0; }
.results-count { font-weight: 650; color: var(--text); }

/* Job detail */
.description { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; line-height: 1.7; max-width: 46rem; color: var(--text-2); }
.job-back { display: inline-block; margin-bottom: var(--s4); font-size: var(--fs-sm); }
.job-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); gap: var(--s6); align-items: start; }
.job-head { margin-bottom: var(--s5); }
.job-head h1 { margin-bottom: var(--s2); }
.job-company { margin: 0 0 var(--s3); font-size: var(--fs-md); font-weight: 600; color: var(--text-2); }
.job-facts { display: flex; flex-wrap: wrap; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.job-body { padding: var(--s5) var(--s6); }
.job-body h2 { font-size: var(--fs-lg); margin-bottom: var(--s3); }
.job-dates { margin: var(--s5) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.job-aside { position: sticky; top: var(--s5); display: grid; gap: var(--s4); }
.job-aside .card { padding: var(--s5); }
.job-aside h2 { font-size: var(--fs-md); margin-bottom: var(--s3); }
.job-salary { margin: 0 0 var(--s3); font-size: var(--fs-md); font-weight: 650; color: var(--text); }
.job-apply { display: flex; width: 100%; justify-content: center; }
.job-note { margin: var(--s2) 0 0; font-size: var(--fs-xs); color: var(--muted); }
.job-safety { border-left: 3px solid var(--warn); background: var(--warn-soft); }
.job-safety p { margin: 0; font-size: var(--fs-sm); color: var(--text-2); }

/* Employer workspace */
.workspace-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); padding: var(--s3) var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); }
.workspace-bar.operator-nav { margin-bottom: var(--s4); }
.workspace-title { font-size: var(--fs-sm); font-weight: 650; color: var(--text); }
.workspace-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.workspace-notice { margin: 0 0 var(--s5); padding: var(--s3) var(--s4); font-size: var(--fs-sm); color: var(--text-2); background: var(--info-soft); border-left: 3px solid var(--info); border-radius: var(--r-sm); }
.workspace-panel { padding: var(--s5) var(--s6); }
.workspace-panel > h1:first-child { margin-top: 0; }
.status-badge { display: inline-block; padding: .15rem .6rem; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 650; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.status-badge.is-draft { background: var(--surface-2); color: var(--text-2); }
.status-badge.is-submitted { background: var(--info-soft); color: var(--info); border-color: transparent; }
.status-badge.is-accepted { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.status-badge.is-rejected { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.submission-card { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s2) var(--s4); align-items: baseline; }
.submission-card h2 { margin: 0; font-size: var(--fs-md); }
.submission-card p { margin: 0; }
.fact-list { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: var(--s2) var(--s5); margin: var(--s5) 0; }
.fact-list dt { font-weight: 600; color: var(--text-2); }
.fact-list dd { margin: 0; overflow-wrap: anywhere; }

/* Workspace navigation: quiet tab-like links, current page highlighted */
.workspace-links a, .operator-nav.is-operator > a {
    display: inline-flex; align-items: center; min-height: 2.25rem; padding: .35rem .7rem;
    border-radius: var(--r-sm); color: var(--text-2); font-weight: 550; text-decoration: none;
}
.workspace-links a:hover, .operator-nav.is-operator > a:hover { background: var(--neutral-soft); color: var(--text); }
.workspace-links a[aria-current="page"], .operator-nav.is-operator > a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.workspace-bar.is-operator { justify-content: flex-start; gap: var(--s1) var(--s2); }
.workspace-bar.is-operator > form { margin-left: auto; }
/* Forms inside a workspace panel keep a readable line length */
.workspace-panel .operator-form { max-width: 42rem; }
/* Signed-out employer pages (sign in, registration, password reset): compact column */
.site-main.is-auth { width: min(100% - 2 * var(--gutter), 32rem); margin-inline: auto; padding-block: var(--s7) var(--s8); }
.site-main.is-auth .workspace-bar { justify-content: center; }
.site-main.is-auth .workspace-title { display: none; }
.site-main.is-auth .workspace-links { justify-content: center; }
.site-main.is-auth .operator-form button { width: 100%; }
.job-back-row { margin: var(--s5) 0 0; }

.job-source { margin: var(--s1) 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* Operator dashboard status tiles */
.stat-tiles { list-style: none; padding: 0; margin: var(--s3) 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.stat-tiles a { display: block; padding: var(--s4); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface-2); color: var(--text); font-size: var(--fs-lg); font-weight: 650; text-decoration: none; }
.stat-tiles a:hover { border-color: var(--border-strong); background: var(--neutral-soft); }
/* Salary fieldset: amounts side by side, currency and period side by side */
.operator-form fieldset:has(#salary_min) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s4);
    grid-template-areas: "lmin lmax" "min max" "lcur lper" "cur per" "help help";
}
.operator-form fieldset:has(#salary_min) > label[for="salary_min"] { grid-area: lmin; }
.operator-form fieldset:has(#salary_min) > label[for="salary_max"] { grid-area: lmax; }
.operator-form fieldset:has(#salary_min) > label[for="salary_currency"] { grid-area: lcur; }
.operator-form fieldset:has(#salary_min) > label[for="salary_period"] { grid-area: lper; }
.operator-form fieldset:has(#salary_min) > #salary_min { grid-area: min; }
.operator-form fieldset:has(#salary_min) > #salary_max { grid-area: max; }
.operator-form fieldset:has(#salary_min) > #salary_currency { grid-area: cur; }
.operator-form fieldset:has(#salary_min) > #salary_period { grid-area: per; }
.operator-form fieldset:has(#salary_min) > :not(legend):not(label):not(input):not(select) { grid-area: help; }
@media (max-width: 420px) {
    .stat-tiles { grid-template-columns: minmax(0, 1fr); }
    .operator-form fieldset:has(#salary_min) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "lmin" "min" "lmax" "max" "lcur" "cur" "lper" "per" "help"; }
}

/* 6. Legacy hooks: employer and operator views -------------------------------- */
.operator-nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-bottom: var(--s4); }
.operator-nav form { margin: 0; }
/* Secondary (outline) treatment for the workspace sign-out buttons. The extra
   :not() selectors match the specificity of the generic button rule above. */
.operator-nav button:not(.btn):not(.button) { min-height: 2.25rem; padding: .35rem .85rem; background: var(--surface); color: var(--text); border-color: var(--field-border); }
.operator-nav button:not(.btn):not(.button):hover { background: var(--surface-2); color: var(--text); border-color: var(--text-2); }
.operator-form { margin: var(--s4) 0; }
.operator-form > label, .operator-form fieldset > label { display: block; margin: var(--s4) 0 var(--s1); }
.operator-form fieldset { min-width: 0; margin: var(--s4) 0; padding: var(--s3) var(--s4) var(--s4); border: 1px solid var(--border); border-radius: var(--r-sm); }
.operator-form fieldset > label:has(input[type="checkbox"]) { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.operator-form button { margin-top: var(--s4); }

/* 7. Responsive ------------------------------------------------------------ */
@media (max-width: 1000px) {
    .filter-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas:
            "lq lq" "q q"
            "ll ll" "l l"
            "lw le" "w e"
            "submit reset";
        row-gap: .35rem;
    }
    .filter-form > #location, .filter-form > #q { margin-bottom: var(--s2); }
    .filter-form > button { margin-top: var(--s2); }
    .filter-form > .filter-reset { align-self: center; justify-self: center; margin-top: var(--s2); }
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    :root { --gutter: 1rem; }
    .site-nav .nav-secondary { display: none; }
    .site-nav .btn { margin-left: 0; }
    .site-main.is-narrow, .site-main.is-wide, .site-main.is-auth { padding-block: var(--s6) var(--s7); }
    .home-hero { padding-block: var(--s6); }
    .hero-lede { font-size: var(--fs-md); margin-bottom: var(--s5); }
    .hero-search { grid-template-columns: minmax(0, 1fr); padding: var(--s3); }
    .hero-search .btn { width: 100%; }
    .home-section { padding-top: var(--s7); }
    .board-empty { grid-template-columns: minmax(0, 1fr); }
    .board-empty-main, .board-empty-side { padding: var(--s5); }
    .board-empty-side { border-left: 0; border-top: 1px solid var(--border); }
    .steps, .duo { grid-template-columns: minmax(0, 1fr); }
    .steps .card, .duo .card { padding: var(--s5); }
    /* Compact mobile search: two columns, labels kept visible, 44px controls. */
    .filter-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: "lq ll" "q l" "lw le" "w e" "submit reset";
        gap: .25rem var(--s2); padding: var(--s3);
    }
    .filter-form > #location, .filter-form > #q { margin-bottom: var(--s1); }
    .filter-form > select { padding-left: .6rem; padding-right: 1.9rem; text-overflow: ellipsis; }
    .filter-form > button { margin-top: var(--s1); }
    .filter-form > .filter-reset { margin-top: var(--s1); }
    .filter-note { margin-bottom: var(--s4); }
    .job-detail { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
    .job-aside { position: static; order: -1; }
    .job-body, .workspace-panel { padding: var(--s4); }
    .fact-list { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .fact-list dd { margin-bottom: var(--s3); }
    .page-head { margin-bottom: var(--s4); }
    .page-head p { display: none; }
    .job-card { grid-template-columns: minmax(0, 1fr); padding: var(--s4); }
    .job-card-side { text-align: left; display: flex; flex-wrap: wrap; gap: .25rem var(--s3); }
    .empty { padding: var(--s6) var(--s4); }
    .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
    .pager { justify-content: center; }
    .pager-summary { order: -1; flex-basis: 100%; }
}
@media (max-width: 420px) {
    /* Controls stay at 16px: smaller text makes iOS Safari zoom on focus. */
    .filter-form > label { font-size: .75rem; }
}
@media (max-width: 380px) {
    .site-header { gap: var(--s2); }
    .brand { font-size: var(--fs-md); }
    .site-nav a:not(.btn) { padding-inline: .5rem; }
    .site-nav .btn { padding-inline: .65rem; }
}

/* Dashboard tables (RC5) */
.data-table { width: 100%; border-collapse: collapse; margin: var(--s2, 1rem) 0; font-size: var(--fs-sm, .9rem); }
.data-table caption { text-align: left; font-weight: 600; padding-bottom: .5rem; }
.data-table th, .data-table td { text-align: left; padding: .5rem .5rem; border-bottom: 1px solid var(--border, #ddd); vertical-align: top; }
.data-table td { font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .data-table:not(.is-stackable) { display: block; overflow-x: auto; }
  .data-table.is-stackable caption { display: block; width: 100%; }
  .data-table.is-stackable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table.is-stackable, .data-table.is-stackable tbody, .data-table.is-stackable tr, .data-table.is-stackable th, .data-table.is-stackable td { display: block; width: 100%; }
  .data-table.is-stackable tr { padding: .5rem 0; border-bottom: 1px solid var(--border, #ddd); }
  .data-table.is-stackable th, .data-table.is-stackable td { border: 0; padding: .2rem 0; }
  .data-table.is-stackable td { display: flex; justify-content: space-between; gap: 1rem; }
  .data-table.is-stackable td::before { content: attr(data-label); color: var(--muted); }
}

/* Job seeker account (RC6) */
/* Outranks the generic button:not(.btn):not(.button) rule (specificity 0,2,1). */
button.button-link:not(.btn):not(.button) { min-height: 0; width: auto; margin: 0; background: none; border: 0; border-radius: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font: inherit; font-size: var(--fs-sm); font-weight: 500; }
button.button-link:not(.btn):not(.button):hover, button.button-link:not(.btn):not(.button):focus-visible { background: none; border: 0; color: var(--accent-hover); text-decoration-thickness: 2px; }
.inline-form { display: inline; margin-left: .5rem; }
.button.is-danger { background: #b42318; border-color: #b42318; color: #fff; }
.button.is-danger:hover, .button.is-danger:focus-visible { background: #912018; }
.account-delete-heading { margin-top: var(--s4, 2rem); }
[data-saved-jobs] .submission-card { padding: var(--s2, .75rem) 0; border-bottom: 1px solid var(--border); }
[data-saved-jobs] .submission-card:last-of-type { border-bottom: 0; }
[data-saved-jobs] .submission-card h3 { margin: 0 0 .25rem; }
