/* Public job pages (/jobs, /jobs/{id}, compare). Everything is scoped under .jb. */

.candidate-main.candidate-main-jobs:not(.site-shell) {
    max-width: 1440px;
    padding: 20px 24px 64px;
}
.candidate-main.candidate-main-jobs { padding-block: 20px 64px; }

body.jb-has-dock .candidate-main { padding-bottom: 120px; }
body.jb-lock { overflow: hidden; }

.jb {
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: .875rem;
    line-height: 1.45;
}

.jb *, .jb *::before, .jb *::after { box-sizing: border-box; }
.jb a { text-decoration: none; }
.jb h1, .jb h2, .jb h3, .jb p { margin: 0; }
.jb ul { margin: 0; padding: 0; list-style: none; }
.jb [hidden] { display: none !important; }

.jb-apply-dialog {
    width: min(700px, calc(100vw - 32px));
    max-width: 700px;
    max-height: calc(100vh - 32px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    color: var(--color-text);
    background: #fff;
    box-shadow: 0 24px 80px rgba(11, 40, 87, .28);
}
.jb-apply-dialog::backdrop { background: rgba(11, 25, 48, .62); }
.jb-apply-dialog__card { display: flex; max-height: calc(100vh - 32px); flex-direction: column; }
.jb-apply-dialog__head, .jb-apply-dialog__actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; }
.jb-apply-dialog__head { border-bottom: 1px solid var(--color-line); }
.jb-apply-dialog__head h2 { color: var(--color-navy); font-size: 1.15rem; }
.jb-apply-dialog__close { border: 0; background: transparent; color: var(--color-muted); font: inherit; font-size: 1.75rem; line-height: 1; cursor: pointer; }
.jb-apply-dialog__form { display: flex; min-height: 0; flex-direction: column; }
.jb-apply-dialog__body { display: grid; gap: 14px; padding: 20px 22px; overflow-y: auto; }
.jb-apply-dialog__body p { line-height: 1.6; }
.jb-apply-dialog__agree { display: flex; align-items: flex-start; gap: 9px; color: var(--color-navy); font-weight: 600; }
.jb-apply-dialog__agree input { flex: none; margin-top: 3px; accent-color: var(--color-blue); }
.jb-apply-dialog__captcha { display: grid; grid-template-columns: auto auto minmax(100px, 1fr); align-items: center; gap: 10px; }
.jb-apply-dialog__challenge { padding: 8px 12px; border: 1px dashed var(--color-line); border-radius: 8px; background: var(--color-soft); color: var(--color-navy); font: 700 1rem/1.2 monospace; letter-spacing: .18em; }
.jb-apply-dialog__captcha input { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--color-line); border-radius: 8px; font: inherit; }
.jb-apply-dialog__refresh { grid-column: 2 / -1; justify-self: start; color: var(--color-blue); text-decoration: underline; }
.jb-apply-dialog__error { color: var(--color-danger, #b42318); font-weight: 600; }
.jb-apply-dialog__actions { justify-content: flex-end; border-top: 1px solid var(--color-line); }
.jb-apply-dialog__actions .jb-btn { cursor: pointer; }

.jb-i {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}

/* ---------- Buttons & chips ---------- */
.jb-btn .jb-i { width: 16px; height: 16px; }
.jb-btn-done { background: var(--color-success-soft); color: var(--color-success); border-color: #bfe5cc; cursor: default; }
.jb-btn-disabled { background: var(--color-soft); color: var(--color-muted); border-color: var(--color-line); cursor: not-allowed; }
.jb-btn-block { width: 100%; }
.jb-btn.is-on { background: var(--color-gold-soft); border-color: var(--color-gold-line); color: var(--color-gold-text); }

.jb-icon-btn {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-navy);
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.jb-icon-btn:hover { background: var(--color-soft); }
.jb-icon-btn.is-active { background: var(--color-gold); color: var(--color-navy); border-color: var(--color-gold-deep); }
.jb-icon-btn.is-on { color: var(--color-gold-text); }
.jb-save-toggle.is-on .jb-i, .jb-icon-btn.jb-save-toggle.is-on .jb-i { fill: currentColor; }
.jb-compare-toggle.is-on { background: var(--color-gold-soft); }

.jb-chip {
    font-size: .8125rem;
}

.jb-link-btn { border: 0; background: none; padding: 0; color: var(--color-blue); font: inherit; font-size: .8125rem; cursor: pointer; text-decoration: underline; }

/* ---------- Avatars ---------- */
.jb-avatar {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-weight: 700;
    font-size: .9375rem;
    letter-spacing: .02em;
    color: var(--color-navy);
    background: #fff;
    border: 2px solid currentColor;
    box-shadow: 0 0 0 3px #fff inset, 0 0 0 4px rgba(11, 40, 87, .08) inset;
}
.jb-avatar-sm { width: 36px; height: 36px; font-size: .75rem; }
.jb-avatar-lg { width: 52px; height: 52px; font-size: 1.0625rem; }
.jb-avatar-xl { width: 72px; height: 72px; font-size: 1.5rem; }
.jb-tint-0 { color: var(--color-blue); background: var(--color-tint); }
.jb-tint-1 { color: #9a5b00; background: var(--color-warning-soft); }
.jb-tint-2 { color: var(--color-success); background: #e8f6ed; }
.jb-tint-3 { color: #8a2f5a; background: #fbecf3; }
.jb-tint-4 { color: #5b3fa0; background: #f0ecfb; }
.jb-tint-5 { color: #0f6f7a; background: #e4f5f6; }

/* ---------- Hero ---------- */
.jb-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
    align-items: end;
    gap: 24px;
    padding: 8px 8px 0;
    min-height: 150px;
}
.jb-hero-title {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: clamp(1.875rem, 3.6vw, 2.875rem);
    line-height: 1.08;
    letter-spacing: -.01em;
    color: var(--color-navy);
}
.jb-hero-sub { margin-top: 10px; font-size: clamp(.9375rem, 1.4vw, 1.125rem); color: var(--color-muted); }
.jb-hero-art {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: end;
    gap: 12px;
    color: #9fb3cc;
    pointer-events: none;
}
.jb-hero-script {
    align-self: start;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    line-height: 1.15;
    color: var(--color-blue);
    transform: rotate(-8deg);
    max-width: 150px;
}
.jb-skyline { width: 100%; max-width: 330px; height: auto; justify-self: center; color: #8ea6c4; }
.jb-skyline .jb-sun { fill: #f9d77e; stroke: none; opacity: .75; }
.jb-hero-tag {
    align-self: start;
    max-width: 130px;
    font-size: .6875rem;
    font-weight: 500;
    line-height: 1.7;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--color-muted);
}

/* ---------- Search bar ---------- */
.jb-search {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    margin-top: 16px;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}
.jb-search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 14px 0 18px;
    border: 1px solid var(--color-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--color-navy);
    transition: border-color .15s, box-shadow .15s;
}
.jb-search-field:focus-within { border-color: var(--color-blue); box-shadow: 0 0 0 3px rgba(22, 78, 138, .14); }
.jb-search-field > .jb-i { width: 22px; height: 22px; }
.jb-search-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.jb-search-text input {
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    font-size: .9375rem;
    color: var(--color-navy);
    min-width: 0;
}
.jb-search-text input::placeholder { color: var(--color-text); opacity: 1; }
.jb-search-text small { color: var(--color-muted); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-search-select select {
    flex: 1;
    min-width: 0;
    height: 54px;
    border: 0;
    outline: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%230b2857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right center;
    padding-right: 24px;
    font-size: .9375rem;
    color: var(--color-navy);
    appearance: none;
    cursor: pointer;
}
.jb-search-submit { min-height: 56px; padding: 0 28px; }
.jb-search-submit .jb-i { width: 20px; height: 20px; }

/* ---------- Popular ---------- */
.jb-popular { display: flex; align-items: center; gap: 16px; margin: 18px 4px 22px; }
.jb-popular-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--color-navy); white-space: nowrap; }
.jb-popular-label .jb-i { color: var(--color-gold-deep); fill: var(--color-gold); }
.jb-popular-list { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.jb-popular-list::-webkit-scrollbar { display: none; }

/* ---------- Layout ---------- */
.jb-layout { display: grid; grid-template-columns: 276px minmax(0, 1fr); gap: 20px; align-items: start; }

/* ---------- Filters ---------- */
.jb-filters {
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 18px 14px 16px;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
}
.jb-filters-head { display: flex; align-items: center; gap: 8px; padding: 0 6px 14px; margin-bottom: 6px; position: relative; }
.jb-filters-head::after { content: ""; position: absolute; left: 6px; bottom: 4px; width: 28px; height: 3px; border-radius: 3px; background: var(--color-gold); }
.jb-filters-head h2 { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 1.125rem; font-weight: 700; color: var(--color-navy); }
.jb-reset { color: var(--color-blue); font-size: .8125rem; font-weight: 500; }
.jb-reset:hover { text-decoration: underline; }
.jb-filters-close { display: none; }

.jb-group { border-bottom: 1px solid var(--color-line); }
.jb-group summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 6px;
    font-weight: 600;
    font-size: .9375rem;
    color: var(--color-navy);
    cursor: pointer;
    list-style: none;
    border-radius: 8px;
}
.jb-group summary::-webkit-details-marker { display: none; }
.jb-group summary:hover { background: var(--color-surface-alt); }
.jb-group summary > span:first-of-type { flex: 1; }
.jb-caret { transition: transform .2s; color: var(--color-muted); }
.jb-group[open] > summary .jb-caret { transform: rotate(180deg); }
.jb-group[open] > summary { background: #f3f6fb; }
.jb-group-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--color-gold);
    color: var(--color-navy);
    font-size: .6875rem;
    font-weight: 700;
}
.jb-group-body { padding: 8px 6px 14px; }
.jb-group-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 0 10px;
    height: 36px;
    border: 1px solid var(--color-line-strong);
    border-radius: 8px;
    color: var(--color-muted);
}
.jb-group-search .jb-i { width: 15px; height: 15px; }
.jb-group-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: .8125rem; color: var(--color-navy); }
.jb-options { display: grid; gap: 2px; }
.jb-options.is-collapsible:not(.is-expanded):not(.is-searching) > li:nth-child(n+7) { display: none; }
.jb-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 5px 4px;
    border-radius: 6px;
    font-size: .8438rem;
    color: var(--color-text);
    cursor: pointer;
}
.jb-option:hover { background: var(--color-surface-alt); }
.jb-option input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--color-blue); flex: none; cursor: pointer; }
.jb-option-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
a.jb-option-label { color: inherit; text-decoration: none; }
a.jb-option-label:hover { text-decoration: underline; }
.jb-option-count { flex: none; color: var(--color-muted); font-size: .7813rem; white-space: nowrap; }
.jb-more { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0 30px; padding: 0; border: 0; background: none; color: var(--color-blue); font: inherit; font-size: .8125rem; font-weight: 500; cursor: pointer; }
.jb-more .jb-i { width: 14px; height: 14px; }
.jb-more[aria-expanded="true"] .jb-i { transform: rotate(45deg); }

.jb-closed-toggle { display: flex; align-items: center; gap: 10px; padding: 14px 10px 4px; font-size: .8438rem; cursor: pointer; }
.jb-closed-toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--color-blue); }
.jb-apply-filters { width: 100%; min-height: 46px; margin-top: 14px; }
.jb-side-note {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    border-radius: 10px;
    background: #eef4fb;
    color: var(--color-text);
    font-size: .7813rem;
    line-height: 1.55;
}
.jb-side-note .jb-i { color: var(--color-blue); width: 20px; height: 20px; }
.jb-side-note.is-warn { background: #fff6e5; }
.jb-side-note.is-warn .jb-i { color: var(--color-gold-text); }
.jb-filters-backdrop { display: none; }

/* ---------- Featured ---------- */
.jb-featured {
    position: relative;
    overflow: hidden;
    padding: 22px 22px 16px;
    border-radius: 16px;
    color: #fff;
    background:
        radial-gradient(1200px 300px at 85% -40%, rgba(255, 255, 255, .18), transparent 60%),
        linear-gradient(135deg, #1e5eab 0%, #174f93 45%, #0f3b73 100%);
    box-shadow: var(--shadow-lg);
}
.jb-featured::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .045) 0 1px, transparent 1px 36px);
    mask-image: linear-gradient(180deg, #000, transparent 70%);
    pointer-events: none;
}
.jb-featured-head { position: relative; display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.jb-featured-head > div:first-child { flex: 1; min-width: 0; }
.jb-kicker { display: flex; align-items: center; gap: 8px; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: #ffd772; }
.jb-kicker .jb-i { width: 16px; height: 16px; fill: var(--color-gold); stroke: var(--color-gold); }
.jb-featured h2 { margin-top: 6px; font-family: var(--font-sans); font-size: clamp(1.375rem, 2.2vw, 1.75rem); font-weight: 700; color: #fff; }
.jb-featured-sub { margin-top: 2px; color: rgba(255, 255, 255, .85); font-size: .9063rem; }
.jb-featured-script {
    align-self: center;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, .35);
    transform: rotate(-8deg);
    max-width: 180px;
}
.jb-carousel-nav { display: flex; align-items: center; gap: 12px; }
.jb-carousel-count { font-weight: 600; font-size: .875rem; min-width: 38px; text-align: center; }
.jb-round-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    color: var(--color-navy);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
    transition: transform .15s, background-color .15s;
}
.jb-round-btn:hover { transform: scale(1.06); }
.jb-round-btn:disabled { opacity: .45; cursor: default; transform: none; }
.jb-round-btn:first-child { background: rgba(255, 255, 255, .2); color: #fff; box-shadow: none; }
.jb-round-btn:first-child:hover { background: rgba(255, 255, 255, .3); }

.jb-featured-track {
    position: relative;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 32px) / 3);
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px;
    margin: -2px;
}
.jb-featured-track::-webkit-scrollbar { display: none; }
.jb-fcard {
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
    border-radius: 10px;
    background: #fff;
    color: var(--color-text);
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35);
}
.jb-fcard-head { display: flex; align-items: flex-start; gap: 12px; }
.jb-fcard-head .jb-card-titles { flex: 1; }
.jb-featured-badge { flex: none; padding: 3px 10px; border-radius: 6px; background: var(--color-gold); color: var(--color-navy); font-size: .75rem; font-weight: 600; }
.jb-fcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; }
.jb-fcard-foot > div { min-width: 0; }
.jb-fcard-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--color-muted); font-size: .7813rem; }
.jb-fcard-sub .jb-i { width: 14px; height: 14px; }
.jb-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.jb-dot { width: 8px; height: 8px; padding: 0; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .45); cursor: pointer; transition: width .2s, background-color .2s; }
.jb-dot.is-active { width: 20px; background: var(--color-gold); }

/* ---------- Results ---------- */
.jb-results { margin-top: 22px; }
.jb-featured + .jb-results { margin-top: 26px; }
.jb-results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.jb-results-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; }
.jb-results-title h2 { font-family: var(--font-sans); font-weight: 700; font-size: clamp(1.25rem, 2vw, 1.5625rem); color: var(--color-navy); }
.jb-results-count { color: var(--color-muted); font-size: .8438rem; }
.jb-results-tools { display: flex; align-items: center; gap: 10px; }
.jb-sort { display: flex; align-items: center; gap: 10px; color: var(--color-muted); font-size: .8438rem; }
.jb-sort select {
    height: 40px;
    min-width: 170px;
    padding: 0 34px 0 14px;
    border: 1px solid var(--color-line-strong);
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%230b2857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--color-navy);
    font-size: .875rem;
    appearance: none;
    cursor: pointer;
}
.jb-view-toggle { display: flex; gap: 6px; }
.jb-view-toggle .jb-icon-btn { width: 40px; height: 40px; border-color: var(--color-line-strong); background: #fff; }
.jb-view-toggle .jb-icon-btn.is-active { background: var(--color-gold); border-color: var(--color-gold-deep); }
.jb-filters-open { display: none; }

.jb-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.jb-active-label { color: var(--color-muted); font-size: .8125rem; margin-right: 2px; }
.jb-active-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 12px;
    border-radius: 999px;
    background: var(--color-tint);
    border: 1px solid #cfe0f3;
    color: var(--color-blue);
    font-size: .7813rem;
    font-weight: 500;
}
.jb-active-chip .jb-i { width: 14px; height: 14px; }
.jb-active-chip:hover { background: #dbe9f8; }

.jb-signin-hint {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--color-gold-soft);
    border: 1px solid #f3dea5;
    font-size: .8125rem;
}
.jb-signin-hint .jb-i { color: var(--color-gold-text); }
.jb-signin-hint a { color: var(--color-blue); font-weight: 600; }
.jb-signin-hint a:hover { text-decoration: underline; }

/* ---------- Job cards ---------- */
.jb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.jb-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 16px;
    transition: box-shadow .2s, border-color .2s, transform .2s;
}
.jb-card:hover { border-color: #c9d7ea; box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.jb-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; }
.jb-card-flags { display: flex; align-items: center; gap: 2px; }
.jb-match {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px 4px 8px;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    background: var(--color-success-soft);
    color: var(--color-success);
}
.jb-match .jb-i { width: 17px; height: 17px; fill: currentColor; stroke: #fff; }
.jb-match.is-mid { background: var(--color-warning-soft); color: var(--color-gold-text); }
.jb-match.is-low { background: var(--color-soft); color: var(--color-muted); }
.jb-type-pill { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: var(--color-tint); color: var(--color-blue); font-size: .7813rem; font-weight: 600; }
.jb-type-pill.is-soft { background: var(--color-soft); color: var(--color-text); font-weight: 500; }
.jb-new { padding: 2px 8px; margin-right: 4px; border-radius: 6px; background: #e3eefb; color: var(--color-blue); font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.jb-card-head { display: flex; align-items: center; gap: 12px; }
.jb-card-titles { min-width: 0; }
.jb-card-title { font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--color-navy); }
.jb-card-title a { color: inherit; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jb-card-title a:hover { color: var(--color-blue); text-decoration: underline; text-underline-offset: 3px; }
.jb-card-org { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: var(--color-muted); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jb-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.jb-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 10px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    font-size: .7813rem;
    color: var(--color-text);
    white-space: nowrap;
}
.jb-meta .jb-i { width: 14px; height: 14px; color: var(--color-muted); }
.jb-trunc { overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.jb-card-facts { display: grid; gap: 4px; }
.jb-salary { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9375rem; color: var(--color-navy); }
.jb-salary .jb-i { width: 16px; height: 16px; }
.jb-salary.is-muted { font-weight: 500; color: var(--color-muted); font-size: .8438rem; }
.jb-salary-lg { font-size: 1.0625rem; }
.jb-deadline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .8125rem; color: var(--color-danger); }
.jb-deadline .jb-i { width: 15px; height: 15px; }
.jb-deadline.is-closed { color: var(--color-muted); }
.jb-deadline-tag { padding: 1px 8px; border-radius: 999px; background: var(--color-danger-soft); font-size: .7188rem; font-weight: 600; }
.jb-deadline.is-closed .jb-deadline-tag { background: var(--color-soft); }
.jb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
.jb-actions .jb-btn, .jb-apply-form .jb-btn { width: 100%; }
.jb-apply-form { margin: 0; }

/* List view */
.jb-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.jb-grid.is-list .jb-card {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, .9fr) 260px;
    grid-template-areas: "head meta facts actions" "top meta facts actions";
    align-items: center;
    column-gap: 20px;
    row-gap: 6px;
}
.jb-grid.is-list .jb-card-head { grid-area: head; }
.jb-grid.is-list .jb-card-top { grid-area: top; justify-content: flex-start; min-height: 0; }
.jb-grid.is-list .jb-meta { grid-area: meta; }
.jb-grid.is-list .jb-card-facts { grid-area: facts; }
.jb-grid.is-list .jb-actions { grid-area: actions; margin: 0; }

/* Empty + pager */
.jb-empty {
    display: grid;
    justify-items: center;
    gap: 10px;
}
.jb-empty > .jb-i { width: 40px; height: 40px; color: var(--color-line-strong); }
.jb-empty h3 { font-size: 1.125rem; color: var(--color-navy); }
.jb-empty p { color: var(--color-muted); max-width: 420px; }
.jb-empty .jb-btn { margin-top: 4px; }

.jb-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.jb-pager-info { color: var(--color-muted); font-size: .8125rem; }
.jb-pager-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.jb-page {
    display: inline-grid;
    place-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--color-line-strong);
    background: #fff;
    color: var(--color-navy);
    font-weight: 500;
}
a.jb-page:hover { border-color: var(--color-blue); color: var(--color-blue); }
.jb-page.is-current { background: var(--color-navy); border-color: var(--color-navy); color: #fff; }
.jb-page-gap { color: var(--color-muted); padding: 0 2px; }

/* ---------- Dock (compare + recent) ---------- */
.jb-dock {
    position: fixed;
    left: 50%;
    bottom: 12px;
    z-index: 40;
    display: flex;
    gap: 12px;
    width: min(1392px, calc(100% - 24px));
    transform: translateX(-50%);
    pointer-events: none;
}
.jb-dock-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid var(--color-line);
    border-radius: 12px;
    box-shadow: 0 10px 30px -10px rgba(15, 31, 56, .35);
    pointer-events: auto;
}
.jb-dock-compare { flex: 1; min-width: 0; }
.jb-dock-recent { flex: none; }
.jb-dock-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    font-size: .9375rem;
    color: var(--color-navy);
    white-space: nowrap;
    cursor: pointer;
}
.jb-dock-title > .jb-i:first-child { width: 22px; height: 22px; color: var(--color-gold-text); }
.jb-dock-recent .jb-dock-title > .jb-i:first-child { color: var(--color-blue); }
.jb-dock-title .jb-caret { transform: rotate(180deg); }
.jb-dock.is-collapsed .jb-dock-title .jb-caret { transform: none; }
.jb-dock.is-collapsed .jb-dock-body { display: none; }
.jb-dock-body { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.jb-compare-slots { display: flex; gap: 10px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.jb-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 1 190px;
    min-width: 130px;
    height: 38px;
    padding: 0 6px 0 12px;
    border: 1px solid var(--color-line-strong);
    border-radius: 8px;
    font-size: .7813rem;
}
.jb-slot-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-navy); }
.jb-slot-title:hover { color: var(--color-blue); }
.jb-slot-remove { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--color-muted); cursor: pointer; }
.jb-slot-remove:hover { background: var(--color-soft); color: var(--color-danger); }
.jb-slot-remove .jb-i { width: 15px; height: 15px; }
.jb-slot-empty { border-style: dashed; color: var(--color-muted); font-style: italic; }
.jb-slot-empty .jb-i { width: 15px; height: 15px; }
.jb-compare-now { flex: none; min-width: 160px; }
.jb-recent-list { display: flex; align-items: center; gap: 8px; }
.jb-recent-item { display: block; border-radius: 50%; transition: transform .15s; }
.jb-recent-item:hover { transform: translateY(-2px); }
.jb-recent-more { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--color-soft); color: var(--color-text); font-size: .75rem; font-weight: 600; }

.jb-toast {
    position: fixed;
    left: 50%;
    bottom: 96px;
    z-index: 60;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--color-navy);
    color: #fff;
    font-size: .8438rem;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .45);
    opacity: 0;
    transform: translate(-50%, 10px);
    transition: opacity .2s, transform .2s;
    pointer-events: none;
}
.jb-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Details page ---------- */
.jb-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--color-muted); font-size: .8125rem; }
.jb-crumb a { color: var(--color-blue); }
.jb-crumb a:hover { text-decoration: underline; }
.jb-crumb [aria-current] { color: var(--color-navy); font-weight: 600; }

/* Job detail (/jobs/{id}). Rendered inside the public layout for guests and inside the job-seeker
   portal (with its sidebar) when signed in, so the layout follows the width of .jd, not the viewport. */
.jd { --jd-top: 16px; }
/* The container sits on an inner wrapper: containment would make it the containing block of the fixed apply bar and dock. */
.jd-wrap { container: jd / inline-size; }
.jd-crumb { justify-content: space-between; gap: 8px 16px; }
.jd-crumb-trail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.jd-crumb-trail [aria-current] { overflow-wrap: anywhere; }
.jd-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.jd-back .jb-i { width: 16px; height: 16px; }

.jd-hero { position: relative; border-radius: 18px; background: var(--color-surface); border: 1px solid var(--color-line); box-shadow: var(--shadow-sm); overflow: hidden; }
.jd-hero-head {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    padding: 26px 26px 24px;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0, rgba(247, 197, 60, .28) 0, rgba(247, 197, 60, 0) 34%),
        radial-gradient(circle at 78% 130%, rgba(95, 180, 255, .22) 0, rgba(95, 180, 255, 0) 42%),
        linear-gradient(120deg, var(--color-navy) 0%, var(--color-blue) 100%);
    color: #fff;
}
.jd-hero-head::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 240px; height: 240px; border: 2px solid rgba(247, 197, 60, .35); border-radius: 50%; pointer-events: none; }
.jd-logo { width: 64px; height: 64px; border-radius: 16px; font-size: 1.25rem; box-shadow: 0 0 0 4px rgba(255, 255, 255, .14); }
.jd-hero-titles { min-width: 0; overflow-wrap: anywhere; }
.jd-hero h1 { margin: 10px 0 0; color: #fff; font-size: clamp(1.625rem, 3.2cqw, 2.375rem); font-weight: 700; line-height: 1.18; letter-spacing: -.015em; }
.jd-org { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; color: rgba(255, 255, 255, .86); font-size: .875rem; }
.jd-org strong { color: #fff; font-weight: 600; }
.jd-org-name { display: inline-flex; align-items: center; gap: 6px; }
.jd-org .jb-i { width: 16px; height: 16px; color: var(--color-gold-bright); }
.jd-dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.jd-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.jd-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-size: .8125rem; font-weight: 500; }
.jd-badge .jb-i { width: 14px; height: 14px; }
.jd-badge.is-new { background: var(--color-gold-bright); border-color: transparent; color: var(--color-navy); font-weight: 600; }
.jd-badge.is-applied { background: var(--color-success-soft); border-color: transparent; color: var(--color-success); font-weight: 600; }
.jd-badge.is-soon { background: var(--color-danger-soft); border-color: transparent; color: var(--color-danger); font-weight: 600; }
.jd-badge.is-closed { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .8); }
.jd-hero-tools { position: relative; z-index: 1; display: flex; gap: 8px; }
.jd-icon-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; font: inherit; font-size: .875rem; font-weight: 500; cursor: pointer; transition: background-color .15s, border-color .15s; }
.jd-icon-btn:hover { background: rgba(255, 255, 255, .2); }
.jd-icon-btn .jb-i { width: 17px; height: 17px; }
.jd-icon-btn.is-on { background: var(--color-gold-bright); border-color: transparent; color: var(--color-navy); }
.jd-icon-btn.is-on .jb-i { fill: currentColor; }

.jd-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.jd-facts > div { display: grid; gap: 6px; align-content: start; min-width: 0; padding: 16px 22px; }
.jd-facts > div + div { border-left: 1px solid var(--color-line); }
.jd-facts dt { display: flex; align-items: center; gap: 10px; color: var(--color-muted); font-size: .8125rem; }
.jd-facts dd { margin: 0 0 0 44px; color: var(--color-navy); font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.jd-fact-ico, .jd-h-ico, .jd-check-ico { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--color-tint); color: var(--color-blue); }
.jd-fact-ico .jb-i, .jd-h-ico .jb-i, .jd-check-ico .jb-i { width: 17px; height: 17px; }
.jd-facts > div:first-child .jd-fact-ico { background: var(--color-gold-soft); color: var(--color-gold-text); }

.jd-tabs { position: sticky; top: var(--jd-top); z-index: 5; transition: top .28s ease; display: flex; gap: 4px; margin-top: 16px; padding: 5px; border: 1px solid var(--color-line); border-radius: 12px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow-sm); overflow-x: auto; scrollbar-width: none; }
.jd-tabs::-webkit-scrollbar { display: none; }
.jd-tabs a { flex: none; padding: 9px 16px; border-radius: 8px; color: var(--color-muted); font-size: .875rem; font-weight: 600; white-space: nowrap; transition: background-color .15s, color .15s; }
.jd-tabs a:hover { background: var(--color-soft); color: var(--color-navy); }
.jd-tabs a.is-active { background: var(--color-navy); color: #fff; }

.jd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 18px; align-items: start; }
.jd-main { display: grid; gap: 18px; min-width: 0; }
.jd-side { position: sticky; top: calc(var(--jd-top) + 66px); transition: top .28s ease; display: grid; gap: 16px; min-width: 0; }
.jd-card { padding: 22px 24px; border: 1px solid var(--color-line); border-radius: var(--radius-xl); background: var(--color-surface); box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--jd-top) + 72px); }
.jd-card h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; color: var(--color-navy); font-size: 1.125rem; font-weight: 700; }
.jd-card .jd-sub { margin: 18px 0 10px; color: var(--color-navy); font-size: .9375rem; font-weight: 600; }
.jd-card .jd-lead { margin: 0 0 12px; color: var(--color-muted); font-size: .875rem; }

/* Employer text: bold "Job Summary:" lines read as sub-heads, lists get gold ticks. */
.jb-prose.jd-prose { font-size: .9375rem; line-height: 1.75; }
.jb-prose.jd-prose > :last-child { margin-bottom: 0; }
.jb-prose.jd-prose strong, .jd-prose b { color: var(--color-navy); font-weight: 600; }
.jb-prose.jd-prose ul { display: grid; gap: 8px; margin: 6px 0 14px; padding-left: 0; list-style: none; }
.jb-prose.jd-prose ul > li { position: relative; padding-left: 28px; }
.jb-prose.jd-prose ul > li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--color-gold-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a5a00' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.jd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.jd-chips li { padding: 6px 14px; border-radius: 999px; background: var(--color-tint); color: var(--color-blue); font-size: .8125rem; font-weight: 500; }

.jd-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.jd-checks li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--color-line); border-radius: 12px; background: var(--color-surface-alt); }
.jd-checks li.is-wide { grid-column: 1 / -1; }
.jd-checks small, .jd-deadline small { display: block; color: var(--color-muted); font-size: .8125rem; }
.jd-checks strong { display: block; margin-top: 2px; color: var(--color-navy); font-size: .9375rem; font-weight: 600; overflow-wrap: anywhere; }

.jd-steps { display: grid; }
.jd-steps li { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; padding-bottom: 20px; }
.jd-steps li:last-child { padding-bottom: 0; }
.jd-steps li:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 44px; bottom: 4px; width: 2px; background: var(--color-line); }
.jd-step-no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-tint); color: var(--color-blue); font-weight: 700; }
.jd-steps li:first-child .jd-step-no { background: var(--color-navy); color: #fff; }
.jd-steps li.is-done .jd-step-no { background: var(--color-success); color: #fff; }
.jd-steps strong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; color: var(--color-navy); font-size: .9375rem; font-weight: 600; }
.jd-steps p { display: flex; align-items: flex-start; gap: 6px; margin: 4px 0 0; color: var(--color-muted); font-size: .875rem; }
.jd-steps p .jb-i { width: 15px; height: 15px; margin-top: 3px; flex: none; color: var(--color-blue); }
.jd-step-tag { padding: 2px 10px; border-radius: 999px; background: var(--color-gold-soft); color: var(--color-gold-text); font-size: .75rem; font-style: normal; font-weight: 600; }

.jd-doclist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.jd-doclist li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px dashed var(--color-line-strong); border-radius: 10px; color: var(--color-navy); font-size: .875rem; }
.jd-doclist .jb-i { width: 16px; height: 16px; flex: none; color: var(--color-success); }
.jd-notice { display: inline-flex; align-items: center; gap: 12px; margin-top: 14px; color: var(--color-blue); font-weight: 600; }
.jd-notice:hover span:last-child { text-decoration: underline; }

.jd-faq { display: grid; gap: 10px; }
.jd-faq details { border: 1px solid var(--color-line); border-radius: 12px; background: var(--color-surface); }
.jd-faq details[open] { background: var(--color-surface-alt); }
.jd-faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: var(--color-navy); font-weight: 600; cursor: pointer; list-style: none; }
.jd-faq summary::-webkit-details-marker { display: none; }
.jd-faq summary .jb-i { width: 16px; height: 16px; flex: none; color: var(--color-muted); transition: transform .2s; }
.jd-faq details[open] summary .jb-i { transform: rotate(180deg); }
.jd-faq details p { margin: 0; padding: 0 16px 14px; color: var(--color-text); font-size: .875rem; }

.jd-apply { display: grid; gap: 14px; border-top: 4px solid var(--color-gold); }
.jd-apply form { margin: 0; }
.jd-apply .jb-btn { min-height: 48px; }
.jd-deadline { display: grid; gap: 10px; }
.jd-deadline-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.jd-deadline-row > span:nth-child(2) { flex: 1; min-width: 0; }
.jd-deadline strong { color: var(--color-navy); font-size: 1rem; white-space: nowrap; }
.jd-deadline em { padding: 3px 10px; border-radius: 999px; background: var(--color-tint); color: var(--color-blue); font-size: .8125rem; font-style: normal; font-weight: 600; white-space: nowrap; }
.jd-deadline.is-soon em, .jd-deadline.is-soon .jd-check-ico { background: var(--color-danger-soft); color: var(--color-danger); }
.jd-deadline.is-closed em { background: var(--color-soft); color: var(--color-muted); }
.jd-meter { display: block; height: 6px; border-radius: 999px; background: var(--color-soft); overflow: hidden; }
.jd-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-gold-bright), var(--color-gold)); }
.jd-deadline.is-soon .jd-meter > span { background: var(--color-danger); }
.jd-link { display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: var(--color-blue); font-size: .875rem; font-weight: 600; }
.jd-link .jb-i { width: 15px; height: 15px; }
.jd-link:hover { text-decoration: underline; }
.jd-new-here { margin: 0; color: var(--color-muted); font-size: .875rem; text-align: center; }
.jd-new-here a { color: var(--color-blue); font-weight: 600; }
.jd-new-here a:hover { text-decoration: underline; }

.jd-match { --ring: var(--color-success); display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--color-success-soft); color: var(--color-text); font-size: .8125rem; line-height: 1.45; }
.jd-match strong { display: block; color: var(--color-navy); font-size: .875rem; }
.jd-match.is-mid { --ring: var(--color-gold-deep); background: var(--color-warning-soft); }
.jd-match.is-low, .jd-match.is-quiet { --ring: var(--color-blue); background: var(--color-soft); }
a.jd-match:hover { box-shadow: inset 0 0 0 1px var(--color-line-strong); }
.jd-ring { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: conic-gradient(var(--ring) calc(var(--p) * 1%), rgba(11, 40, 87, .1) 0); }
.jd-ring b { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--color-surface); color: var(--color-navy); font-size: .8125rem; font-weight: 700; }

.jd-summary { display: grid; margin: 0; }
.jd-summary > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--color-line-soft); font-size: .875rem; }
.jd-summary dt { color: var(--color-muted); }
.jd-summary dd { margin: 0; min-width: 0; color: var(--color-navy); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.jd-share h3 { margin: 0; color: var(--color-navy); font-size: 1rem; font-weight: 700; }
.jd-share > p { margin: 4px 0 14px; color: var(--color-muted); font-size: .875rem; }
.jd-share-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jd-share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; border: 1px solid var(--color-line-strong); border-radius: 10px; background: var(--color-surface); color: var(--color-navy); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.jd-share-btn:hover { border-color: var(--color-blue); color: var(--color-blue); }
.jd-share-btn svg { width: 18px; height: 18px; flex: none; }
.jd-share-btn.is-wa { color: #128c4b; }
.jd-share-btn.is-wa:hover { border-color: #128c4b; background: #effaf3; color: #0e7a40; }
.jd-share .jd-side-links { display: grid; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--color-line-soft); }
.jd-side-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--color-blue); font-size: .875rem; font-weight: 500; }
.jd-side-links a:hover { text-decoration: underline; }
.jd-side-links .jb-i { width: 16px; height: 16px; }

/* Apply bar: fixed to the bottom while the apply card is scrolled away (narrow columns). */
.jd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--color-surface); border-top: 1px solid var(--color-line); box-shadow: 0 -10px 30px -18px rgba(15, 31, 56, .45); }
.jd-bar[hidden] { display: none; }
.jd-bar-text { display: grid; flex: 1; min-width: 0; }
.jd-bar-text strong { overflow: hidden; color: var(--color-navy); font-size: .9375rem; text-overflow: ellipsis; white-space: nowrap; }
.jd-bar-text span { color: var(--color-muted); font-size: .8125rem; }
.jd-bar-text span.is-soon { color: var(--color-danger); font-weight: 600; }
.jd-bar-action { flex: none; }
.jd-bar-action form { margin: 0; }
.jd-bar-action .jb-btn { width: auto; min-height: 44px; padding-inline: 20px; }
body.jd-has-bar .jb-dock { display: none; }

@container jd (max-width: 1040px) {
    .jd-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; }
    .jd-card { padding: 20px; }
    .jd-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jd-facts > div:nth-child(3) { border-left: 0; }
    .jd-facts > div:nth-child(n+3) { border-top: 1px solid var(--color-line); }
}
@container jd (max-width: 860px) {
    .jd-hero-head { grid-template-columns: auto minmax(0, 1fr); }
    .jd-hero-tools { grid-column: 1 / -1; }
}
@container jd (max-width: 720px) {
    .jd-layout { grid-template-columns: minmax(0, 1fr); }
    .jd-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@container jd (max-width: 620px) {
    .jd-crumb-trail { display: none; }
    .jd-hero-head { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 20px 18px; }
    .jd-logo { width: 52px; height: 52px; font-size: 1.0625rem; }
    .jd-org { flex-direction: column; align-items: flex-start; gap: 4px; }
    .jd-org .jd-dot { display: none; }
    .jd-hero-tools .jd-icon-btn { flex: 1; justify-content: center; }
    .jd-facts > div { padding: 14px 16px; }
    .jd-facts dd { margin-left: 0; font-size: .9375rem; }
    .jd-side { grid-template-columns: minmax(0, 1fr); }
    .jd-card { padding: 18px 16px; }
    .jd-checks { grid-template-columns: minmax(0, 1fr); }
}
@container jd (max-width: 300px) {
    .jd-facts { grid-template-columns: minmax(0, 1fr); }
    .jd-facts > div + div { border-left: 0; border-top: 1px solid var(--color-line); }
}

.jb-prose { color: var(--color-text); line-height: 1.7; overflow-wrap: anywhere; }
.jb-prose p, .jb-prose ul, .jb-prose ol { margin: 0 0 10px; }
.jb-prose ul, .jb-prose ol { padding-left: 20px; list-style: revert; }
.jb-prose table { border-collapse: collapse; max-width: 100%; }
.jb-prose td, .jb-prose th { border: 1px solid var(--color-line); padding: 6px 8px; }
.jb-more-list summary { cursor: pointer; list-style: none; }
.jb-more-list summary::-webkit-details-marker { display: none; }
.jb-more-list summary span { color: var(--color-blue); font-weight: 600; white-space: nowrap; }
.jb-more-list[open] summary span { display: none; }
.jb-muted { color: var(--color-muted); }

/* ---------- Compare page ---------- */
.jb-page-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-family: var(--font-sans); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2rem); color: var(--color-navy); }
.jb-page-title .jb-i { width: 28px; height: 28px; color: var(--color-gold-text); }
.jb-compare-scroll { overflow-x: auto; background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.jb-compare-table { width: 100%; min-width: calc(200px + var(--cols) * 220px); border-collapse: collapse; table-layout: fixed; }
.jb-compare-table th, .jb-compare-table td { padding: 14px 16px; border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: top; font-size: .8438rem; }
.jb-compare-table thead th { vertical-align: top; background: var(--color-surface-alt); }
.jb-compare-table thead th > * { display: block; }
.jb-compare-table thead .jb-avatar { display: grid; margin-bottom: 10px; }
.jb-compare-table thead .jb-card-title { font-size: .9375rem; }
.jb-compare-table thead .jb-card-org { margin: 2px 0 8px; white-space: normal; }
.jb-compare-table tbody th { width: 200px; color: var(--color-muted); font-weight: 500; white-space: nowrap; }
.jb-compare-table tbody th .jb-i { width: 15px; height: 15px; margin-right: 8px; color: var(--color-blue); }
.jb-compare-table tbody td { color: var(--color-navy); font-weight: 500; }
.jb-compare-table tbody tr:nth-child(even) td, .jb-compare-table tbody tr:nth-child(even) th { background: #fbfcfe; }
.jb-compare-table tr:last-child > * { border-bottom: 0; }
.jb-compare-table colgroup, .jb-compare-table thead td { width: 200px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .jb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .jb-featured-track { grid-auto-columns: calc((100% - 16px) / 2); }
    .jb-grid.is-list .jb-card { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 220px; grid-template-areas: "head meta actions" "top facts actions"; }
    .jb-featured-script { display: none; }
}

@media (max-width: 1080px) {
    .jb-hero { grid-template-columns: minmax(0, 1fr); }
    .jb-hero-art { display: none; }
    .jb-search { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .jb-search-keyword { grid-column: 1 / -1; }
    .jb-search-submit { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    .candidate-main.candidate-main-jobs { padding: 12px 16px 48px; }
    .jb-layout { grid-template-columns: minmax(0, 1fr); }
    .jb-filters {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 70;
        width: min(340px, 88vw);
        max-height: none;
        border-radius: 0 16px 16px 0;
        transform: translateX(-105%);
        transition: transform .25s ease;
        visibility: hidden;
    }
    .jb-filters.is-open { transform: none; visibility: visible; }
    .jb-filters-close { display: inline-grid; }
    .jb-filters-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(11, 22, 40, .45); }
    .jb-filters-open { display: inline-flex; }
    .jb-grid.is-list .jb-card { display: flex; }
    .jb-view-toggle { display: none; }
    .jb-dock-recent { display: none; }
}

@media (max-width: 640px) {
    .jb-search { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
    .jb-search-field { min-height: 52px; }
    .jb-search-text small { display: none; }
    .jb-popular { flex-direction: column; align-items: flex-start; gap: 8px; margin: 14px 0 16px; }
    .jb-popular-list { max-width: 100%; }
    .jb-grid { grid-template-columns: minmax(0, 1fr); }
    .jb-featured { padding: 18px 14px 14px; }
    .jb-featured-head { flex-wrap: wrap; }
    .jb-featured-track { grid-auto-columns: 88%; gap: 12px; }
    .jb-fcard-foot { flex-direction: column; align-items: stretch; }
    .jb-results-tools { width: 100%; }
    .jb-sort { flex: 1; }
    .jb-sort > span { display: none; }
    .jb-sort select { width: 100%; min-width: 0; }
    .jb-dock { bottom: 8px; }
    .jb-dock-panel { flex-wrap: wrap; }
    .jb-dock-body { flex-basis: 100%; }
    .jb-compare-now { min-width: 0; }
    .jb-slot { flex-basis: 150px; }
    .jb-pager { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
    .jb *, .jb *::before, .jb *::after { transition: none !important; scroll-behavior: auto !important; }
}
