/* =====================================================
   Jobs Platform — front-end styles
   Layout and element positions match the original site;
   the surface treatment is rebuilt.
   ===================================================== */

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

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

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.47;
    letter-spacing: -0.01em;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: calc(var(--nav-h) + 14px);
    overflow-x: hidden;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* -----------------------------------------------------
   Layout shell
   ----------------------------------------------------- */

.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px;
}

.container-wide { max-width: 1100px; }

.section { padding: 16px 0; }

/* -----------------------------------------------------
   Navbar — fixed, translucent
   ----------------------------------------------------- */

.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    z-index: 1000;
    display: flex;
    align-items: center;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}

.navbar-inner {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 17px;
    font-weight: 640;
    letter-spacing: -0.02em;
    color: var(--text);
    text-decoration: none;
    margin-right: auto;
    min-width: 0;
}
.navbar-brand:hover { text-decoration: none; opacity: .75; }
.navbar-brand img { height: 28px; width: auto; }

.brand-mark {
    width: 28px; height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    background: linear-gradient(145deg, var(--primary), var(--secondary));
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: block;
    padding: 7px 11px;
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.nav-links a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--primary); background: var(--primary-light); }

/*
 * Narrow screens keep Jobs and Companies, which are the whole navigation.
 * The static pages drop away first — they are all in the footer too.
 */
@media (max-width: 620px) {
    .navbar-inner { gap: 6px; }
    .nav-links { gap: 2px; }
    .nav-links a { padding: 7px 9px; font-size: 13.5px; }
    .nav-links li.nav-page { display: none; }
    .brand-text { max-width: 40vw; }
}

@media (max-width: 400px) {
    .navbar-brand { font-size: 15.5px; gap: 7px; }
    .brand-text { max-width: 30vw; }
    .nav-links a { padding: 7px 7px; font-size: 13px; }
}

.icon-btn {
    width: 34px; height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), transform .08s var(--ease);
}
.icon-btn:hover  { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }

/* -----------------------------------------------------
   Cards — the core repeating unit
   ----------------------------------------------------- */

.card {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    margin-bottom: 12px;
    overflow: hidden;
}

.card-body { padding: 16px; }
.card-tight { padding: 12px 16px; }

.card-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 640;
    letter-spacing: -0.015em;
}

/* -----------------------------------------------------
   Search filters — same positions as the original bar
   ----------------------------------------------------- */

.search-card {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: 14px;
    margin-bottom: 12px;
}

.search-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-sunken);
    border-radius: var(--r-md);
    padding: 0 12px;
    margin-bottom: 10px;
    transition: box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.search-row:focus-within {
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .16), var(--shadow-1);
}

.search-row .search-icon {
    font-size: 15px;
    opacity: .5;
    flex: 0 0 auto;
}

.search-input {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 12px 0;
    font-size: 16px;   /* 16px stops iOS zooming on focus */
    outline: 0;
}
.search-input::placeholder { color: var(--text-muted); }

.filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.filter-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* An odd field left alone on its row stretches across it, so turning a
   filter off never leaves a hole beside the remaining one. */
.filter-grid > .filter-field:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.filter-field { position: relative; }

.filter-select,
.filter-input {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--r-md);
    padding: 10px 30px 10px 12px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
    text-overflow: ellipsis;
}
.filter-input { padding-right: 12px; cursor: text; }

.filter-select:focus,
.filter-input:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14);
}

.filter-field::after {
    content: '';
    position: absolute;
    right: 12px; top: 50%;
    width: 7px; height: 7px;
    margin-top: -5px;
    border-right: 1.8px solid var(--text-muted);
    border-bottom: 1.8px solid var(--text-muted);
    transform: rotate(45deg);
    pointer-events: none;
}
.filter-field.no-caret::after { display: none; }

.filter-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

/* Active filter chips */
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 550;
    text-decoration: none;
}
.chip:hover { text-decoration: none; filter: brightness(.96); }
.chip .x { opacity: .55; font-weight: 600; }

/* Country flags — an image, because Windows draws emoji flags as bare letters */

.flag-img {
    display: inline-block;
    width: 18px;
    height: auto;
    margin-right: 5px;
    border-radius: 2px;
    vertical-align: -2px;
    box-shadow: 0 0 0 1px rgba(var(--text-rgb), .09);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 11px 18px;
    border: 0;
    border-radius: var(--r-md);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: filter var(--dur-fast) var(--ease), transform .08s var(--ease),
                background var(--dur-fast) var(--ease);
}
.btn:hover  { text-decoration: none; }
.btn:active { transform: scale(.975); }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 3px rgba(var(--primary-rgb), .3); }
.btn-primary:hover { filter: brightness(1.07); }

.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: var(--border); }

.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary-light); }

.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: 13.5px; border-radius: var(--r-sm); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* -----------------------------------------------------
   Job card — stacked list, logo left
   ----------------------------------------------------- */

.job-card {
    display: block;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    margin-bottom: 10px;
    padding: 14px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.job-card:hover {
    text-decoration: none;
    box-shadow: var(--shadow-3);
    transform: translateY(-1px);
}
.job-card:active { transform: scale(.994); }

.job-row { display: flex; gap: 12px; align-items: flex-start; }

.logo {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 4px;
    object-fit: contain;
    overflow: hidden;
}
.logo-sm { flex-basis: 40px; width: 40px; height: 40px; border-radius: 10px; }
.logo-lg { flex-basis: 76px; width: 76px; height: 76px; border-radius: 18px; padding: 6px; }

.job-main { flex: 1; min-width: 0; }

.job-title {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 620;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-company {
    font-size: 14px;
    color: var(--primary);
    font-weight: 550;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.job-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* A line or two of the description, when that is switched on */
.job-excerpt {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }

.tag {
    padding: 3px 9px;
    border-radius: var(--r-pill);
    background: var(--surface-sunken);
    font-size: 12px;
    font-weight: 550;
    color: var(--text-secondary);
}
.tag-salary { background: rgba(var(--accent-rgb), .13); color: var(--accent); }
.tag-remote { background: rgba(var(--secondary-rgb), .13); color: var(--secondary); }
.tag-new    { background: rgba(var(--primary-rgb), .13); color: var(--primary); }

/* -----------------------------------------------------
   Company card
   ----------------------------------------------------- */

.company-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    margin-bottom: 10px;
    padding: 14px;
    color: inherit;
    text-decoration: none;
    transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.company-card:hover {
    text-decoration: none;
    box-shadow: var(--shadow-3);
    transform: translateY(-1px);
}

.company-card-info { flex: 1; min-width: 0; }

.company-name {
    font-size: 16px;
    font-weight: 620;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
    color: var(--text);
}

.company-meta { font-size: 13px; color: var(--text-muted); }

.count-badge {
    flex: 0 0 auto;
    padding: 5px 11px;
    border-radius: var(--r-pill);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 640;
}

/* -----------------------------------------------------
   Company header — same visual weight as the search card
   ----------------------------------------------------- */

.company-hero {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: 14px;
    margin-bottom: 12px;
}

.hero-top { display: flex; align-items: center; gap: 13px; }

.company-hero .logo-lg {
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    padding: 4px;
    margin: 0;
}

.hero-id { flex: 1; min-width: 0; }

.company-hero h1 {
    margin: 0 0 2px;
    font-size: 19px;
    font-weight: 660;
    letter-spacing: -0.028em;
    line-height: 1.25;
}

.company-hero .sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.35;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.hero-facts b { color: var(--text); font-weight: 640; }

.hero-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

/* About section */
.about-text {
    font-size: 15px;
    line-height: 1.66;
    color: var(--text-secondary);
}
.about-text p { margin: 0 0 14px; }
.about-text p:last-child { margin-bottom: 0; }

.about-collapsed {
    max-height: 190px;
    overflow: hidden;
    position: relative;
}
.about-collapsed::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 68px;
    background: linear-gradient(to bottom, transparent, var(--surface));
}

/* -----------------------------------------------------
   Job detail
   ----------------------------------------------------- */

.job-hero {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: 20px 18px;
    margin-bottom: 12px;
}

.job-hero h1 {
    margin: 12px 0 6px;
    font-size: 22px;
    font-weight: 680;
    letter-spacing: -0.03em;
    line-height: 1.24;
}

.job-desc {
    font-size: 15px;
    line-height: 1.68;
    color: var(--text-secondary);
    white-space: pre-line;
    word-wrap: break-word;
}

.highlight-block { margin-bottom: 18px; }
.highlight-block:last-child { margin-bottom: 0; }
.highlight-block h3 {
    font-size: 14px;
    font-weight: 640;
    margin: 0 0 8px;
    color: var(--text);
}
.highlight-block ul { margin: 0; padding-left: 19px; }
.highlight-block li {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.apply-bar { z-index: 40; }

/* Floating: sticks to the bottom of the viewport while reading */
.apply-bar.is-floating {
    position: sticky;
    bottom: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    margin: 0 -16px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
}

/* Fixed in place: sits in the flow where it falls on the page */
.apply-bar.is-inline {
    position: static;
    padding: 0;
    margin: 14px 0 4px;
    background: none;
    border: 0;
    backdrop-filter: none;

    /* It occupies real space in the layout, so it must never be shifted —
       moving it would drag the button over the content beneath it. */
    transform: none !important;
    transition: none !important;
}

/* -----------------------------------------------------
   Applicant rank claiming
   ----------------------------------------------------- */

.company-card-wrap {
    position: relative;
    margin-bottom: 10px;
}
.company-card-wrap .company-card { margin-bottom: 0; }

.claim-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0 14px;
    padding: 6px 13px;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg,
                rgba(var(--primary-rgb), .12),
                rgba(var(--secondary-rgb), .12));
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 640;
    letter-spacing: -0.01em;
    text-decoration: none;
    transition: filter var(--dur-fast) var(--ease), transform .08s var(--ease);
}
.claim-chip:hover  { text-decoration: none; filter: brightness(.95); }
.claim-chip:active { transform: scale(.97); }
.claim-chip-mark   { font-size: 12px; line-height: 1; }

/*
 * Chip sitting inside the card. The card itself becomes a container with a
 * full-size overlay link, because an anchor cannot legally contain another
 * anchor — the chip then sits above that overlay.
 */
.company-card-linked { position: relative; }

.company-card-hit {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}
.company-card-hit:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.company-card-linked .logo,
.company-card-linked .company-card-info,
.company-card-linked .count-badge {
    position: relative;
    z-index: 2;
    pointer-events: none;   /* clicks fall through to the overlay link */
}

.claim-chip-inline {
    position: relative;
    z-index: 3;
    pointer-events: auto;   /* except on the button itself */
    margin: 8px 0 0;
    padding: 5px 11px;
    font-size: 12px;
}

/* Opens the claim panel from the company header */

.claim-hero-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    background: linear-gradient(135deg,
                rgba(var(--primary-rgb), .13),
                rgba(var(--secondary-rgb), .13));
    color: var(--primary);
    font-size: 14.5px;
    font-weight: 640;
    letter-spacing: -0.015em;
    cursor: pointer;
    transition: filter var(--dur-fast) var(--ease), transform .08s var(--ease);
}
.claim-hero-btn:hover  { filter: brightness(.96); }
.claim-hero-btn:active { transform: scale(.99); }
.claim-hero-btn.is-open { display: none; }

.claim-hero-mark { font-size: 14px; line-height: 1; }

/* The claim panel itself */

.claim {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    border-top: 3px solid var(--primary);
    padding: 18px;
    margin-bottom: 12px;
    scroll-margin-top: calc(var(--nav-h) + 16px);
}

.claim-head { margin-bottom: 15px; }

.claim-step-label {
    display: inline-block;
    margin-bottom: 7px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 640;
}

.claim-title {
    margin: 0;
    font-size: 17px;
    font-weight: 660;
    letter-spacing: -0.025em;
    line-height: 1.32;
    color: var(--text);
}

.claim-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.claim-field { margin-bottom: 12px; }

.claim-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text);
}

.claim-optional {
    display: block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 1px;
}

.claim-field input {
    width: 100%;
    padding: 11px 13px;
    font-size: 16px;                 /* stops iOS zooming on focus */
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-sunken);
    color: var(--text);
    transition: border-color var(--dur-fast) var(--ease),
                background var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}
.claim-field input:focus {
    outline: 0;
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14);
}

.claim-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

.claim-note {
    margin: 10px 0 0;
    font-size: 12.5px;
    color: var(--text-muted);
    text-align: center;
}
.claim-note.is-error { color: var(--danger); font-weight: 550; }

/* Share step */

.claim-share-heading {
    margin: 0 0 12px;
    font-size: 14.5px;
    font-weight: 550;
    color: var(--text-secondary);
}
.claim-share-heading b { color: var(--text); font-weight: 680; }

.claim-shares { display: flex; flex-direction: column; gap: 8px; }

.claim-share {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-sunken);
    color: var(--text);
    font-size: 14.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease),
                border-color var(--dur-fast) var(--ease),
                transform .08s var(--ease);
}
.claim-share:hover:not(:disabled):not(.is-verified) {
    background: var(--surface);
    border-color: var(--primary);
}
.claim-share:active:not(:disabled) { transform: scale(.99); }
.claim-share:disabled { opacity: .5; cursor: default; }

.claim-share-icon { font-size: 17px; line-height: 1; }
.claim-share-text { flex: 1; }

.claim-share-state {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    min-width: 18px;
    text-align: center;
}

.claim-share.is-waiting {
    border-color: var(--warning);
    background: rgba(255, 159, 10, .08);
}
.claim-share.is-waiting .claim-share-state { color: var(--warning); }

.claim-share.is-verified {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb), .1);
    cursor: default;
}
.claim-share.is-verified .claim-share-state { color: var(--accent); }
.claim-share.is-verified .claim-share-text  { color: var(--text-secondary); }

/* Confirmation */

#claimDone { text-align: center; padding: 6px 0; }

.claim-done-mark {
    width: 52px; height: 52px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), .14);
    color: var(--accent);
    font-size: 25px;
    font-weight: 700;
}

.claim-done-text {
    margin: 8px auto 0;
    max-width: 420px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--text-muted);
}

@media (max-width: 480px) {
    .claim-fields { grid-template-columns: 1fr; }
    .claim-title  { font-size: 15.5px; }
    .claim-chip   { font-size: 12px; margin-left: 12px; }
}

/* -----------------------------------------------------
   Job alerts widget
   ----------------------------------------------------- */

.alert-box {
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
    padding: 18px;
    margin: 14px 0 4px;
    border-top: 3px solid var(--primary);
}

.alert-box-text { margin-bottom: 13px; }

.alert-box-text h2 {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 640;
    letter-spacing: -0.02em;
    color: var(--text);
}

.alert-box-text p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.45;
}

.alert-fields { display: flex; gap: 8px; flex-wrap: wrap; }

.alert-input {
    flex: 1 1 160px;
    min-width: 0;
    padding: 11px 13px;
    font-size: 16px;              /* 16px keeps iOS from zooming on focus */
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-sunken);
    color: var(--text);
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}
.alert-input::placeholder { color: var(--text-muted); }
.alert-input:focus {
    outline: 0;
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14);
}

.alert-submit { flex: 0 0 auto; padding-inline: 20px; }

.alert-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert-note {
    margin: 9px 0 0;
    font-size: 12.5px;
    color: var(--text-muted);
}
.alert-note.is-error { color: var(--danger); font-weight: 550; }

.alert-done { display: flex; align-items: center; gap: 12px; }

.alert-done-mark {
    width: 34px; height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), .15);
    color: var(--accent);
    font-size: 16px;
    font-weight: 700;
}

.alert-done b {
    display: block;
    font-size: 14.5px;
    font-weight: 620;
    color: var(--text);
    margin-bottom: 2px;
}
.alert-done span { font-size: 13px; color: var(--text-muted); }

@media (max-width: 560px) {
    .alert-input  { flex: 1 1 100%; }
    .alert-submit { width: 100%; }
}

/* Link from a job through to its company */

.company-jobs-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: var(--r-md);
    background: var(--surface-sunken);
    color: var(--primary);
    font-size: 14px;
    font-weight: 550;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease), transform .08s var(--ease);
}
.company-jobs-link:hover  { background: var(--primary-light); text-decoration: none; }
.company-jobs-link:active { transform: scale(.99); }
.company-jobs-link .chev  { font-size: 18px; opacity: .5; line-height: 1; }

.company-jobs-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: var(--r-pill);
    background: var(--primary);
    color: #fff;
    font-size: 11.5px;
    font-weight: 640;
}

/* -----------------------------------------------------
   Pagination
   ----------------------------------------------------- */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 18px 0 26px;
}

.pagination a,
.pagination span {
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-md);
    background: var(--surface);
    box-shadow: var(--shadow-1);
    color: var(--text);
    font-size: 14px;
    font-weight: 550;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease), transform .08s var(--ease);
}
.pagination a:hover { background: var(--surface-2); text-decoration: none; }
.pagination a:active { transform: scale(.94); }
.pagination .current { background: var(--primary); color: #fff; box-shadow: var(--shadow-2); }
.pagination .disabled { opacity: .35; pointer-events: none; }
.pagination .gap { background: transparent; box-shadow: none; min-width: 20px; }

/* -----------------------------------------------------
   Result header
   ----------------------------------------------------- */

.results-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 2px 10px;
}

.results-count { font-size: 13.5px; color: var(--text-muted); }
.results-count b { color: var(--text); font-weight: 640; }

.sort-select {
    border: 0;
    background: transparent;
    font-size: 13.5px;
    font-weight: 550;
    color: var(--primary);
    cursor: pointer;
    padding: 3px 4px;
    border-radius: var(--r-sm);
}

/* -----------------------------------------------------
   Empty state
   ----------------------------------------------------- */

.empty {
    text-align: center;
    padding: 52px 24px;
    background: var(--surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-2);
}
.empty .glyph { font-size: 40px; margin-bottom: 12px; opacity: .55; }
.empty h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 640;
    letter-spacing: -0.02em;
}
.empty p {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 14.5px;
    max-width: 340px;
    margin-inline: auto;
}

/* -----------------------------------------------------
   Static page content
   ----------------------------------------------------- */

.page-content {
    font-size: 16px;
    line-height: 1.68;
    color: var(--text-secondary);
}
.page-content h1 { font-size: 25px; letter-spacing: -0.03em; }
.page-content h2 {
    font-size: 19px;
    font-weight: 660;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 30px 0 10px;
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
    font-size: 16px;
    font-weight: 640;
    color: var(--text);
    margin: 22px 0 8px;
}
.page-content p  { margin: 0 0 15px; }
.page-content ul, .page-content ol { margin: 0 0 15px; padding-left: 22px; }
.page-content li { margin-bottom: 7px; }
.page-content strong { color: var(--text); font-weight: 620; }
.page-content a { text-decoration: underline; text-underline-offset: 2px; }

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 18px;
    font-size: 14.5px;
}
.page-content th, .page-content td {
    padding: 9px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.page-content th { font-weight: 620; color: var(--text); background: var(--surface-sunken); }

/* -----------------------------------------------------
   Forms
   ----------------------------------------------------- */

.form-group { margin-bottom: 15px; }

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--text);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.form-control:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .14);
}
textarea.form-control { min-height: 120px; resize: vertical; line-height: 1.55; }

.form-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }

/* -----------------------------------------------------
   Alerts
   ----------------------------------------------------- */

.alert {
    padding: 13px 15px;
    border-radius: var(--r-md);
    margin-bottom: 12px;
    font-size: 14.5px;
}
.alert-success { background: rgba(var(--accent-rgb), .13); color: var(--success); }
.alert-error   { background: rgba(255, 59, 48, .12);  color: var(--danger); }
.alert-info    { background: var(--primary-light);    color: var(--primary); }
.alert-warning { background: rgba(255, 159, 10, .14); color: var(--warning); }

/* -----------------------------------------------------
   Ads
   ----------------------------------------------------- */

.ad-slot {
    margin: 12px 0;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--r-md);

    /* Ad networks inject their own markup at whatever size they like.
       These keep it inside the column instead of stretching the page. */
    max-width: 100%;
    box-sizing: border-box;
}

/* Anything the network drops in, however it is sized */
.ad-slot > *,
.ad-slot ins,
.ad-slot iframe,
.ad-slot img,
.ad-slot embed,
.ad-slot object {
    max-width: 100% !important;
    box-sizing: border-box;
}

.ad-slot iframe,
.ad-slot img {
    height: auto;
}

/* AdSense sets an inline width on its <ins>; override it so a responsive
   unit fills the column rather than overflowing it. */
.ad-slot .adsbygoogle {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Wrapper used for the ads that sit outside <main> */
.ad-band { margin-inline: auto; }
.ad-band:empty { display: none; }
.ad-slot:empty { display: none; }

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

.footer {
    margin-top: 32px;
    padding: 28px 0 calc(30px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 14px;
    list-style: none;
    padding: 0;
}
.footer-links a { font-size: 13.5px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--primary); }

.footer-note {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.55;
    max-width: 480px;
    margin: 0 auto;
}

/* Legal notices: quiet, but readable rather than hidden away */
.footer-disclaimers {
    max-width: 620px;
    margin: 18px auto 0;
    padding: 16px 18px;
    border-radius: var(--r-md);
    background: var(--surface-sunken);
    text-align: left;
}

.footer-disclaimer-title {
    margin: 0 0 8px;
    /* Same size as the notice text below it; the weight does the separating */
    font-size: 12.5px;
    font-weight: 640;
    line-height: 1.55;
    letter-spacing: -0.01em;
    color: var(--text-secondary);
}

/* Deliberately identical to .footer-note */
.footer-disclaimers p {
    margin: 0 0 9px;
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--text-muted);
}
.footer-disclaimers p:last-child { margin-bottom: 0; }

.social {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}
.social a {
    width: 36px; height: 36px;
    display: grid;
    place-items: center;
    border-radius: var(--r-pill);
    background: var(--surface);
    box-shadow: var(--shadow-1);
    font-size: 15px;
    transition: transform var(--dur-fast) var(--ease);
}
.social a:hover { transform: translateY(-2px); text-decoration: none; }

/* -----------------------------------------------------
   Modal / sheet — iOS bottom sheet on mobile
   ----------------------------------------------------- */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, .35);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur) var(--ease);
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1101;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: var(--shadow-4);
    transform: translateY(100%);
    transition: transform var(--dur) var(--ease-out);
    padding-bottom: env(safe-area-inset-bottom);
}
.sheet.open { transform: translateY(0); }

.sheet-grabber {
    width: 36px; height: 5px;
    margin: 8px auto 4px;
    border-radius: 3px;
    background: var(--border-strong);
    flex: 0 0 auto;
}

.sheet-head {
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--border);
    flex: 0 0 auto;
}
.sheet-head h3 {
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: 640;
    text-align: center;
    letter-spacing: -0.02em;
}

.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 12px; }

.sheet-search {
    width: 100%;
    padding: 11px 14px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-sunken);
}
.sheet-search:focus {
    outline: 0;
    border-color: var(--primary);
    background: var(--surface);
}

.sheet-option {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 13px 18px;
    border: 0;
    background: transparent;
    font-size: 15.5px;
    text-align: left;
    cursor: pointer;
    color: var(--text);
    transition: background var(--dur-fast) var(--ease);
}
.sheet-option:hover  { background: var(--surface-sunken); }
.sheet-option:active { background: var(--surface-2); }
.sheet-option.selected { color: var(--primary); font-weight: 600; }
.sheet-option.selected::after { content: '✓'; margin-left: auto; font-weight: 700; }
.sheet-option .flag { font-size: 20px; line-height: 1; }

/* -----------------------------------------------------
   Utilities
   ----------------------------------------------------- */

.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }
.text-sm     { font-size: 13.5px; }
.mt-0 { margin-top: 0; }    .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 8px; }  .mb-2 { margin-bottom: 8px; }
.mt-3 { margin-top: 12px; } .mb-3 { margin-bottom: 12px; }
.mt-4 { margin-top: 16px; } .mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gap-2 { gap: 8px; }
.hidden { display: none !important; }
.spin { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-sunken) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--r-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }

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

@media (max-width: 480px) {
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .filter-grid-3 { grid-template-columns: 1fr 1fr; }
    .company-hero h1 { font-size: 17.5px; }
    .company-hero .logo-lg { flex-basis: 48px; width: 48px; height: 48px; border-radius: 12px; }
    .job-hero h1 { font-size: 20px; }
    .stat b { font-size: 16px; }
}

@media (min-width: 768px) {
    .container, .navbar-inner { max-width: 720px; }
    .section { padding: 20px 0; }
}

@media (min-width: 1024px) {
    .sheet {
        left: 50%;
        bottom: auto;
        top: 50%;
        width: 440px;
        max-height: 70vh;
        border-radius: var(--r-xl);
        transform: translate(-50%, -45%) scale(.96);
        opacity: 0;
        transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease);
    }
    .sheet.open { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .sheet-grabber { display: none; }
    .sheet-head { padding-top: 16px; }
}

@media print {
    .navbar, .footer, .apply-bar, .ad-slot, .search-card, .pagination { display: none !important; }
    body { padding-top: 0; background: #fff; }
    .card, .job-card, .company-hero { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================================
   Blog
   ============================================================ */

.page-head { margin: 0 0 20px; }
.page-head h1 { font-size: 28px; font-weight: 680; letter-spacing: -.03em; margin: 0 0 6px; }
.page-intro { color: var(--text-secondary); margin: 0; font-size: 15px; }

.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13.5px; font-weight: 560; color: var(--text-secondary); text-decoration: none;
  transition: background .15s, color .15s;
}
.chip:hover { background: var(--surface-2); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.post-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.post-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.post-cat { font-size: 12px; font-weight: 620; color: var(--primary); }
.post-card h2 { font-size: 17px; font-weight: 640; letter-spacing: -.02em; margin: 0; line-height: 1.35; }
.post-card p { font-size: 14px; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.post-meta { font-size: 12.5px; color: var(--text-muted); margin-top: auto; }

/* ---------- article page ---------- */

.article-layout { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }

@media (min-width: 1024px) {
  .article-layout:not(.no-side) { grid-template-columns: minmax(0, 1fr) 300px; }
  .article-layout.side-left:not(.no-side) { grid-template-columns: 300px minmax(0, 1fr); }
  .article-layout.side-left .article-main { order: 2; }
  .article-layout.side-left .article-side { order: 1; }
}

.article-main { min-width: 0; }

.article-head { margin-bottom: 24px; }
.article-cat {
  display: inline-block; font-size: 12.5px; font-weight: 620;
  color: var(--primary); text-decoration: none; margin-bottom: 10px;
}
.article-head h1 {
  font-size: clamp(26px, 4.5vw, 36px); font-weight: 700;
  letter-spacing: -.035em; line-height: 1.18; margin: 0 0 12px;
}
.article-standfirst { font-size: 17.5px; color: var(--text-secondary); line-height: 1.55; margin: 0 0 14px; }
.article-byline {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 13.5px; color: var(--text-muted);
  padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.article-byline strong { color: var(--text); font-weight: 600; }
.article-context { font-size: 14px; color: var(--text-secondary); margin: 14px 0 0; }

/* Body typography — measured for reading, not for filling the width */
.article-body { font-size: 17px; line-height: 1.72; color: var(--text); }
.article-body > p { margin: 0 0 1.15em; }
.article-body h2 {
  font-size: 23px; font-weight: 660; letter-spacing: -.025em;
  line-height: 1.3; margin: 1.9em 0 .6em;
}
.article-body h3 { font-size: 18.5px; font-weight: 640; margin: 1.5em 0 .5em; }
.article-body ul, .article-body ol { margin: 0 0 1.15em; padding-left: 1.3em; }
.article-body li { margin-bottom: .45em; }
.article-body strong { font-weight: 640; }
.article-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote {
  margin: 1.5em 0; padding: 2px 0 2px 18px;
  border-left: 3px solid var(--primary); color: var(--text-secondary); font-style: italic;
}
.article-body table {
  width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 15px;
  display: block; overflow-x: auto;
}
.article-body th, .article-body td {
  padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left;
}
.article-body th { font-weight: 620; background: var(--surface-2); }

/* SVG diagrams: scale to the column and follow the theme */
.article-figure { margin: 1.8em 0; text-align: center; }
.article-figure svg {
  width: 100%; height: auto; max-width: 100%;
  color: var(--text); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); padding: 14px;
}
.article-figure figcaption {
  font-size: 13.5px; color: var(--text-muted); margin-top: 10px; line-height: 1.5;
}

/* ---------- FAQ ---------- */

.article-faq { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--border); }
.article-faq h2 { font-size: 22px; font-weight: 660; letter-spacing: -.025em; margin: 0 0 14px; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); margin-bottom: 10px; overflow: hidden;
}
.faq-item summary {
  padding: 15px 18px; cursor: pointer; font-weight: 590; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--text-muted); font-size: 19px; line-height: 1; }
.faq-item[open] summary::after { content: '−'; }
.faq-answer { padding: 0 18px 16px; color: var(--text-secondary); line-height: 1.65; font-size: 15px; }

/* ---------- article suggestion widget ---------- */

.article-widget, .article-jobs { margin-top: 36px; }
.widget-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.widget-head h2 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; margin: 0; }
.widget-more { font-size: 13.5px; font-weight: 560; color: var(--primary); text-decoration: none; }

.widget-list { display: grid; gap: 10px; }
.widget-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: background .15s;
}
.widget-item:hover { background: var(--surface-2); }
.widget-icon { font-size: 19px; line-height: 1.3; }
.widget-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.widget-title { font-weight: 590; font-size: 15px; line-height: 1.4; }
.widget-excerpt { font-size: 13.5px; color: var(--text-secondary); line-height: 1.45; }
.widget-meta { font-size: 12.5px; color: var(--text-muted); }

/* ---------- sidebar ---------- */

.article-side { min-width: 0; }
@media (max-width: 1023px) { .article-side { display: none; } }

/*
 * Only the ad sticks, not the whole column.
 *
 * Making the entire sidebar sticky pushed the job list below the fold and, once
 * a lazily loaded ad filled and grew, the ad appeared to jump over the list.
 * The jobs sit in normal flow at the top where they are visible immediately,
 * and the ad follows them and holds position as you read.
 */
.article-side { display: flex; flex-direction: column; gap: 16px; }

.side-ad {
  position: sticky;
  top: calc(var(--nav-h, 64px) + 16px);
  /* Space reserved up front, so filling the slot never shifts the page */
  min-height: 250px;
}
.side-block { padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.side-block h3 { font-size: 14px; font-weight: 640; margin: 0 0 12px; letter-spacing: -.01em; }
.side-job { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.side-job:last-of-type { border-bottom: 0; }
.side-job-title { display: block; font-size: 14px; font-weight: 570; line-height: 1.4; }
.side-job-meta { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.side-more { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 560; color: var(--primary); text-decoration: none; }

/* A deferred ad has no height until it fills, so hold the space to keep the
   page from jumping as the reader scrolls past. */
.ad-slot.ad-lazy { min-height: 100px; }
.ad-slot.ad-lazy.ad-article_sidebar { min-height: 250px; }
@media (max-width: 640px) { .ad-slot.ad-lazy { min-height: 90px; } }

/* Role and sub-role navigation cards */
.role-grid-wrap { margin-top: 36px; }
.role-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.role-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.role-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.role-name { font-weight: 600; font-size: 15.5px; line-height: 1.35; }
.role-desc { font-size: 13.5px; color: var(--text-secondary); line-height: 1.45; }
.role-meta { font-size: 12.5px; color: var(--text-muted); margin-top: auto; }

/* Listings pulled from an outside feed */
.feed-heading { font-size: 17px; font-weight: 640; margin: 26px 0 12px; }
.feed-list { display: grid; gap: 8px; }
.feed-job {
  display: flex; flex-direction: column; gap: 3px;
  padding: 13px 15px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px dashed var(--border);
  text-decoration: none; color: inherit;
}
.feed-job:hover { background: var(--surface-2); }
.feed-job-title { font-weight: 570; font-size: 14.5px; line-height: 1.4; }
.feed-job-meta { font-size: 12.5px; color: var(--text-muted); }
.feed-note { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; }

/* The salary card that starts the flow, on company pages */
.salary-card {
  padding: 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border); margin-bottom: 18px;
}
.salary-card h2 { font-size: 17px; font-weight: 650; margin: 0 0 4px; letter-spacing: -.02em; }
.salary-card p { font-size: 13.5px; color: var(--text-secondary); margin: 0 0 14px; }
.salary-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.salary-option {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--surface-2); border: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: border-color .15s, transform .15s;
}
.salary-option:hover { border-color: var(--primary); transform: translateY(-1px); }
.salary-figure { font-size: 17px; font-weight: 680; letter-spacing: -.02em; }
.salary-label { font-size: 13px; color: var(--text-secondary); }
.salary-source { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; line-height: 1.45; }

/* Link from a pay section into that role's open jobs */
.role-cta { margin: 1.2em 0 1.8em; }
.role-cta-link {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: var(--r-pill);
  background: var(--primary); color: #fff;
  font-size: 14.5px; font-weight: 600; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
/* .article-body a sets a colour and wins on specificity, so say it again louder
   or the label ends up the same colour as the button */
.article-body .role-cta-link,
.article-body .role-cta-link:hover,
.role-cta-link { color: #fff; text-decoration: none; }
.role-cta-link:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); }
.role-cta-count {
  background: rgba(255,255,255,.22); border-radius: var(--r-pill);
  padding: 1px 9px; font-size: 12.5px; font-weight: 650;
}
.admin-note {
  max-width: 720px; margin: 20px auto; padding: 14px 16px;
  border-radius: var(--r-lg); border: 1px dashed var(--border);
  background: var(--surface-2); color: var(--text-secondary);
  font-size: 14px; line-height: 1.6;
}
.admin-note code { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

/* Role chooser: the way on, directly under the top ad */
.role-chooser { margin: 20px 0 28px; }
.chooser-heading { font-size: 18px; font-weight: 650; letter-spacing: -.02em; margin: 0 0 12px; }

.chooser-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .chooser-grid { grid-template-columns: minmax(0, 1fr); } }

.chooser-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.chooser-btn:hover {
  border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-2);
}
/* min-width:0 lets a long role name wrap instead of forcing the row wider than
   the card, which pushed the count badge outside the border */
.chooser-name {
  flex: 1 1 auto; min-width: 0;
  font-weight: 590; font-size: 15px; line-height: 1.35;
  overflow-wrap: anywhere;
}
.chooser-count {
  flex: 0 0 auto; white-space: nowrap;
  font-size: 12.5px; font-weight: 620; color: var(--primary);
  background: rgba(var(--primary-rgb), .1); border-radius: var(--r-pill); padding: 3px 10px;
}
.chooser-btn-quiet .chooser-count { color: var(--text-muted); background: var(--surface-2); }

.chooser-more { margin-top: 12px; }
.chooser-more summary {
  cursor: pointer; font-size: 14px; font-weight: 560; color: var(--primary);
  padding: 8px 0; list-style: none;
}
.chooser-more summary::-webkit-details-marker { display: none; }
.chooser-more summary::after { content: ' ▾'; }
.chooser-more[open] summary::after { content: ' ▴'; }
.chooser-more .chooser-grid { margin-top: 8px; }

/* The article's own links stay, for anyone reading down the page */
.article-body .chooser-btn { color: inherit; text-decoration: none; }
