/* ============================================================================
   Jobfyt — design system
   Adapted from the Honda.AIM.Web.Shared patterns (token-driven CSS variables,
   Bootstrap 5.3 base, compact sticky grid, filter bar) but rebuilt with
   Jobfyt's own indigo brand. Loaded after Bootstrap so these win.
   ============================================================================ */

:root {
    /* ── Brand: indigo / electric blue ───────────────────────────────────── */
    --jr-primary:        #4f46e5;   /* indigo-600 */
    --jr-primary-600:    #4338ca;   /* hover/active */
    --jr-primary-700:    #3730a3;
    --jr-primary-tint:   #eef2ff;   /* indigo-50  — chip / hover surfaces */
    --jr-primary-tint-2: #e0e7ff;   /* indigo-100 */
    --jr-accent:         #06b6d4;   /* cyan-500   — secondary accent */

    /* ── Ink + surfaces (slate) ──────────────────────────────────────────── */
    --jr-ink:        #0f172a;   /* slate-900 — headings */
    --jr-body:       #334155;   /* slate-700 — body text */
    --jr-muted:      #64748b;   /* slate-500 — secondary text */
    --jr-faint:      #94a3b8;   /* slate-400 */
    --jr-surface:    #f8fafc;   /* slate-50  — page background */
    --jr-card:       #ffffff;
    --jr-line:       #e2e8f0;   /* slate-200 — borders/gridlines */
    --jr-line-soft:  #eef2f6;
    --jr-hover:      #f1f5f9;   /* slate-100 — row hover */

    /* ── Semantic ────────────────────────────────────────────────────────── */
    --jr-good:    #16a34a;   /* green-600 */
    --jr-good-bg: #dcfce7;
    --jr-mid:     #d97706;   /* amber-600 */
    --jr-mid-bg:  #fef3c7;
    --jr-low:     #64748b;
    --jr-low-bg:  #f1f5f9;
    --jr-danger:  #dc2626;

    /* ── Shape / elevation ───────────────────────────────────────────────── */
    --jr-radius:    10px;
    --jr-radius-sm: 7px;
    --jr-shadow:    0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
    --jr-shadow-md: 0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.06);

    /* Bootstrap variable overrides so .btn-primary, links, focus rings match */
    --bs-primary: var(--jr-primary);
    --bs-link-color: var(--jr-primary);
    --bs-link-hover-color: var(--jr-primary-700);
    --bs-border-radius: var(--jr-radius-sm);
}

html, body {
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--jr-surface);
    color: var(--jr-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

/* Fluid, responsive headings (clamp pattern borrowed from AIM typography.scss) */
h1, .h1 {
    font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
    font-weight: 700;
    color: var(--jr-ink);
    letter-spacing: -0.02em;
    margin: 0;
}

/* ============================================================================
   App shell
   ============================================================================ */
.app { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 1030;
    background: var(--jr-ink);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,.06), var(--jr-shadow);
}
.topbar-inner {
    max-width: 1320px; margin: 0 auto;
    display: flex; align-items: center; gap: 1rem;
    padding: .35rem clamp(1rem, 4vw, 2rem); min-height: 58px;
}

.brand {
    display: inline-flex; align-items: center; gap: .55rem;
    font-weight: 700; font-size: 1.0625rem; color: #fff;
    letter-spacing: -0.01em; white-space: nowrap;
}
.brand:hover { color: #fff; text-decoration: none; }
.brand .radar {
    width: 26px; height: 26px; border-radius: 50%;
    background:
        radial-gradient(circle at center, transparent 38%, rgba(79,70,229,.0) 39%),
        conic-gradient(from 0deg, rgba(99,102,241,0) 0deg, var(--jr-primary) 300deg, var(--jr-accent) 360deg);
    position: relative; flex: 0 0 auto;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.brand .radar::after {
    content: ""; position: absolute; inset: 0; margin: auto;
    width: 5px; height: 5px; border-radius: 50%; background: var(--jr-accent);
    box-shadow: 0 0 6px var(--jr-accent);
}

.nav {
    display: flex; align-items: center; gap: .1rem; flex: 1 1 auto;
    flex-wrap: wrap; min-width: 0;
}
.nav .nav-link {
    color: rgba(255,255,255,.72);
    font-size: .86rem; font-weight: 500;
    padding: .4rem .6rem; border-radius: 7px; white-space: nowrap;
    transition: background-color .12s ease, color .12s ease;
}
.nav .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav .nav-link.active { color: #fff; background: var(--jr-primary); }

/* Hamburger button — hidden on desktop, shown on mobile */
.nav-burger {
    display: none; margin-left: auto;
    background: none; border: none; color: #fff; font-size: 1.4rem;
    padding: .25rem .5rem; cursor: pointer; line-height: 1;
}

/* Mobile: collapse the nav behind a hamburger */
@media (max-width: 860px) {
    .nav-burger { display: inline-flex; align-items: center; }
    .topbar-inner { flex-wrap: wrap; }
    .nav {
        display: none; order: 3; flex: 1 0 100%;
        flex-direction: column; align-items: stretch; gap: .15rem;
        padding: .5rem 0 .25rem; margin-top: .35rem;
        border-top: 1px solid rgba(255,255,255,.08);
    }
    .nav.open { display: flex; }
    .nav .nav-link { padding: .7rem .75rem; font-size: .95rem; border-radius: 8px; }
    /* keep the account control beside the brand on the top row */
    .nav-account { margin-left: auto; }
}

.content {
    flex: 1; width: 100%;
    max-width: 1320px; margin: 0 auto;
    padding: clamp(1.1rem, 3vw, 2rem) clamp(1rem, 4vw, 2rem) 3rem;
}

/* ============================================================================
   Page header + stats
   ============================================================================ */
.page-head {
    display: flex; align-items: flex-start; justify-content: space-between;
    flex-wrap: wrap; gap: 1rem 1.5rem; margin-bottom: 1.25rem;
}
.page-head .sub { color: var(--jr-muted); margin: .2rem 0 0; font-size: .92rem; }

.stats { display: flex; gap: .65rem; flex-wrap: wrap; }
.stat {
    background: var(--jr-card); border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius); padding: .6rem 1rem; min-width: 92px;
    box-shadow: var(--jr-shadow); display: flex; flex-direction: column;
}
.stat .num { font-size: 1.5rem; font-weight: 700; color: var(--jr-ink); line-height: 1.1; }
.stat .lbl { font-size: .72rem; color: var(--jr-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: .15rem; }

/* ============================================================================
   Filter / toolbar
   ============================================================================ */
.toolbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: .6rem .75rem;
    background: var(--jr-card); border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius); padding: .7rem .85rem;
    box-shadow: var(--jr-shadow); margin-bottom: 1rem;
}
.toolbar .search {
    flex: 1 1 240px; min-width: 0;
    border: 1px solid var(--jr-line); border-radius: 8px;
    padding: .5rem .8rem .5rem 2.2rem; font-size: .9rem; color: var(--jr-ink);
    background: var(--jr-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E") no-repeat .7rem center;
}
.toolbar .search:focus { outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint); }
.toolbar select {
    border: 1px solid var(--jr-line); border-radius: 8px;
    padding: .5rem .65rem; font-size: .88rem; color: var(--jr-ink); background: var(--jr-card);
}
.toolbar select:focus { outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint); }
.toolbar .chk {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .85rem; color: var(--jr-body); cursor: pointer; user-select: none;
}
.toolbar .chk input { accent-color: var(--jr-primary); width: 15px; height: 15px; }
.toolbar .count {
    margin-left: auto; font-size: .78rem; color: var(--jr-muted);
    background: var(--jr-primary-tint); border: 1px solid var(--jr-primary-tint-2);
    color: var(--jr-primary-700); padding: .2rem .6rem; border-radius: 999px; white-space: nowrap;
}

/* ============================================================================
   Data grid (Board) — compact sticky table, frozen first column on wide,
   collapses to cards on narrow. (Honda.AIM sr-grid pattern, responsive.)
   ============================================================================ */
.grid-card {
    background: var(--jr-card); border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius); box-shadow: var(--jr-shadow); overflow: hidden;
}
.grid-scroll { width: 100%; overflow: auto; }

table.jobs {
    width: 100%; border-collapse: separate; border-spacing: 0;
    font-size: .86rem; color: var(--jr-body);
}
table.jobs thead th {
    position: sticky; top: 0; z-index: 4;
    background: #f1f5f9; color: var(--jr-muted);
    font-weight: 600; font-size: .73rem; text-transform: uppercase; letter-spacing: .04em;
    text-align: left; padding: .6rem .8rem; white-space: nowrap;
    border-bottom: 1px solid var(--jr-line);
}
table.jobs thead th.sortable { cursor: pointer; user-select: none; }
table.jobs thead th.sortable:hover { background: #e7edf4; color: var(--jr-ink); }
table.jobs tbody td {
    padding: .6rem .8rem; vertical-align: middle;
    border-bottom: 1px solid var(--jr-line-soft);
}
table.jobs tbody tr:hover td { background: var(--jr-hover); }
table.jobs tbody tr.open td { background: var(--jr-primary-tint); }
table.jobs tbody tr.detail-row:hover td { background: var(--jr-primary-tint); }

td.role a { font-weight: 600; color: var(--jr-ink); }
td.role a:hover { color: var(--jr-primary); }
td.role .src {
    display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
    font-size: .72rem; color: var(--jr-faint); margin-top: .15rem;
}
/* Whether the row has a job description on file. */
.jd-tag {
    display: inline-flex; align-items: center; gap: .25rem;
    font-size: .68rem; font-weight: 700; letter-spacing: .02em;
    padding: .08rem .42rem; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.jd-tag .bi { font-size: .8rem; }
.jd-tag.has { color: var(--jr-good); background: #ecfdf5; border-color: #a7f3d0; }
.jd-tag.none { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.muted { color: var(--jr-muted); }
.small { font-size: .78rem; }

/* Fit score badge */
.fit {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 34px; height: 26px; padding: 0 .4rem;
    border-radius: 7px; font-weight: 700; font-size: .82rem; font-variant-numeric: tabular-nums;
}
.fit-hi  { background: var(--jr-good-bg); color: var(--jr-good); }
.fit-mid { background: var(--jr-mid-bg);  color: var(--jr-mid); }
.fit-lo  { background: var(--jr-low-bg);  color: var(--jr-low); }

/* Job-type pill */
.pill {
    display: inline-block; padding: .15rem .55rem; border-radius: 999px;
    font-size: .72rem; font-weight: 600; text-transform: capitalize;
    background: var(--jr-low-bg); color: var(--jr-muted); border: 1px solid var(--jr-line);
}
.pill-permanent { background: var(--jr-primary-tint); color: var(--jr-primary-700); border-color: var(--jr-primary-tint-2); }
.pill-contract  { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }

/* Inline status select inside grid */
.status-sel, .card-move {
    border: 1px solid var(--jr-line); border-radius: 7px;
    padding: .3rem .5rem; font-size: .82rem; color: var(--jr-ink); background: var(--jr-card);
    max-width: 100%;
}
.status-sel:focus, .card-move:focus { outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint); }

.link {
    background: none; border: 1px solid var(--jr-line); color: var(--jr-primary);
    border-radius: 7px; padding: .25rem .6rem; font-size: .8rem; font-weight: 600; cursor: pointer;
}
.link:hover { background: var(--jr-primary-tint); border-color: var(--jr-primary-tint-2); }

/* ── Expanded detail row: a "why it fits" blurb + two side-by-side cards ──── */
.detail { padding: .5rem .25rem 1rem; }
.detail .why { color: var(--jr-body); margin: 0 0 1rem; max-width: 80ch; line-height: 1.55; font-size: .9rem; }

/* Collapsed full job description in the detail panel. */
.jd-details { margin: 0 0 1rem; max-width: 80ch; }
.jd-details > summary {
    cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--jr-primary);
    user-select: none; list-style: revert; width: fit-content;
}
.jd-details > summary:hover { color: var(--jr-primary-700); }
.jd-text {
    margin: .55rem 0 0; padding: .75rem .9rem; max-height: 320px; overflow: auto;
    background: var(--jr-surface); border: 1px solid var(--jr-line); border-radius: var(--jr-radius-sm);
    color: var(--jr-body); font-family: inherit; font-size: .82rem; line-height: 1.5;
    white-space: pre-wrap; word-wrap: break-word;
}

/* Editable "Job details & description" card. */
.jd-edit { margin-bottom: 1rem; }
.jd-fields > summary {
    cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--jr-primary);
    user-select: none; list-style: revert; width: fit-content; margin-top: .25rem;
}
.jd-fields > summary:hover { color: var(--jr-primary-700); }
.jd-field-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .85rem; margin-top: .65rem;
}
.jd-field-wide { grid-column: 1 / -1; }
@media (max-width: 700px) { .jd-field-grid { grid-template-columns: 1fr; } }

.detail-grid {
    display: grid; gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
}
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-card {
    background: var(--jr-card); border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius); padding: 1rem 1.1rem; box-shadow: var(--jr-shadow);
    display: flex; flex-direction: column; gap: .75rem;
}
.detail-card-title {
    display: flex; align-items: center; gap: .45rem; margin: 0;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    color: var(--jr-muted);
}
.detail-card-title .bi { color: var(--jr-primary); font-size: .9rem; }

/* Shared field styling: a label above a full-width control, each on its own line. */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-label { font-size: .75rem; font-weight: 600; color: var(--jr-body); }
.field textarea, .field-select {
    width: 100%; border: 1px solid var(--jr-line); border-radius: 8px;
    padding: .55rem .7rem; font-size: .88rem; color: var(--jr-ink);
    background: var(--jr-card); font-family: inherit;
}
.field textarea { resize: vertical; min-height: 3.2rem; line-height: 1.45; }
.field textarea:focus, .field-select:focus {
    outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint);
}

/* Custom-styled select with a chevron (native arrow removed). */
.select-wrap { position: relative; }
.select-wrap::after {
    content: ""; position: absolute; right: .8rem; top: 50%; width: .5rem; height: .5rem;
    border-right: 2px solid var(--jr-muted); border-bottom: 2px solid var(--jr-muted);
    transform: translateY(-65%) rotate(45deg); pointer-events: none;
}
.field-select { appearance: none; -webkit-appearance: none; padding-right: 2rem; cursor: pointer; }

.detail-actions { display: flex; align-items: center; gap: .65rem; }
.saved { color: var(--jr-good); font-size: .82rem; font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }

/* ── Responsive: table → cards on narrow screens (the chosen behavior) ──── */
@media (max-width: 820px) {
    table.jobs thead { display: none; }
    table.jobs, table.jobs tbody, table.jobs tr, table.jobs td { display: block; width: 100%; }
    table.jobs tbody tr {
        border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
        margin: 0 .6rem .7rem; box-shadow: var(--jr-shadow); overflow: hidden;
        background: var(--jr-card);
    }
    .grid-card { border: none; box-shadow: none; background: transparent; }
    .grid-scroll { padding-top: .6rem; }
    table.jobs tbody td {
        display: flex; justify-content: space-between; align-items: center; gap: 1rem;
        border-bottom: 1px solid var(--jr-line-soft); padding: .55rem .9rem; text-align: right;
    }
    table.jobs tbody td:last-child { border-bottom: none; }
    /* Label each cell using the data-label attribute set in markup */
    table.jobs tbody td::before {
        content: attr(data-label);
        font-size: .72rem; font-weight: 600; color: var(--jr-muted);
        text-transform: uppercase; letter-spacing: .04em; text-align: left; white-space: nowrap;
    }
    table.jobs tbody td.role { text-align: left; }
    table.jobs tbody td.role::before { align-self: flex-start; }
    .detail-row td { display: block; }
    .detail-row td::before { display: none; }
    table.jobs tbody tr.open { outline: 2px solid var(--jr-primary-tint-2); }
}

/* ============================================================================
   Pipeline (kanban board) — responsive columns
   ============================================================================ */
.board {
    display: grid; gap: .9rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
@media (max-width: 1200px) { .board { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 760px)  { .board { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px)  { .board { grid-template-columns: 1fr; } }

.col { display: flex; flex-direction: column; min-width: 0; }
.col-head {
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em;
    color: var(--jr-ink); padding: .5rem .7rem; border-radius: var(--jr-radius) var(--jr-radius) 0 0;
    background: var(--jr-card); border: 1px solid var(--jr-line); border-bottom: 2px solid var(--jr-primary);
}
.col-head .col-n {
    background: var(--jr-primary-tint); color: var(--jr-primary-700);
    border-radius: 999px; padding: .05rem .5rem; font-size: .75rem; font-weight: 700;
}
/* per-status accent on the column header underline */
.col-head.st-new       { border-bottom-color: var(--jr-faint); }
.col-head.st-interested{ border-bottom-color: var(--jr-accent); }
.col-head.st-applied   { border-bottom-color: var(--jr-primary); }
.col-head.st-screen    { border-bottom-color: #8b5cf6; }
.col-head.st-interview { border-bottom-color: var(--jr-mid); }
.col-head.st-offer     { border-bottom-color: var(--jr-good); }

.col-body {
    background: var(--jr-surface);
    border: 1px solid var(--jr-line); border-top: none;
    border-radius: 0 0 var(--jr-radius) var(--jr-radius);
    padding: .55rem; display: flex; flex-direction: column; gap: .55rem;
    min-height: 80px; flex: 1;
}
.card {
    background: var(--jr-card); border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius-sm); padding: .65rem; box-shadow: var(--jr-shadow);
    display: flex; flex-direction: column; gap: .4rem;
}
.card:hover { box-shadow: var(--jr-shadow-md); border-color: var(--jr-primary-tint-2); }
.card[draggable="true"] { cursor: grab; }
.card.dragging { opacity: .45; cursor: grabbing; }
.card-grip { color: var(--jr-faint); cursor: grab; display: inline-flex; align-items: center; flex: 0 0 auto; }
.card:hover .card-grip { color: var(--jr-muted); }
/* Column highlights as a drop target while a card is dragged over it. */
.col-body.drop-target { background: var(--jr-primary-tint); border-color: var(--jr-primary); border-style: dashed; }
.card-top { display: flex; align-items: flex-start; gap: .5rem; }
.card-top .fit { flex: 0 0 auto; }   /* fixed bits don't shrink; the title takes the rest */
.card-title {
    font-weight: 600; color: var(--jr-ink); font-size: .85rem; line-height: 1.25;
    /* min-width:0 lets the title shrink inside the flex row; wrap long titles + break on
       slash-separated runs (e.g. "Senior/Staff/Principal…") so they never bleed past the card. */
    flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; word-break: break-word;
}
.card-title:hover { color: var(--jr-primary); }
.card-co { font-size: .8rem; color: var(--jr-body); }
.card-comp { font-size: .75rem; color: var(--jr-muted); }
.card-move { width: 100%; font-size: .78rem; }

/* ============================================================================
   Home / landing
   ============================================================================ */
.hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(900px 320px at 85% -10%, rgba(6,182,212,.20), transparent 60%),
        radial-gradient(700px 300px at 10% 110%, rgba(79,70,229,.28), transparent 60%),
        linear-gradient(135deg, #111827 0%, #1e1b4b 60%, #312e81 100%);
    color: #fff; border-radius: var(--jr-radius);
    padding: clamp(1.6rem, 4vw, 2.8rem); box-shadow: var(--jr-shadow-md);
    margin-bottom: 1.5rem;
}
.hero h1 { color: #fff; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); }
.hero .tag {
    display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: #c7d2fe; background: rgba(99,102,241,.25);
    border: 1px solid rgba(165,180,252,.35); padding: .25rem .7rem; border-radius: 999px; margin-bottom: .9rem;
}
.hero p { color: rgba(255,255,255,.82); max-width: 60ch; margin: .6rem 0 0; line-height: 1.6; }
.hero .cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.4rem; }
.btn-jr {
    display: inline-flex; align-items: center; gap: .45rem;
    font-weight: 600; font-size: .9rem; padding: .6rem 1.1rem; border-radius: 9px;
    border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .08s ease, background .12s ease;
}
.btn-jr:hover { text-decoration: none; transform: translateY(-1px); }
.btn-jr.primary { background: var(--jr-primary); color: #fff; }
.btn-jr.primary:hover { background: var(--jr-primary-600); color: #fff; }
.btn-jr.ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-jr.ghost:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-jr.outline { background: var(--jr-card); color: var(--jr-primary); border-color: var(--jr-line); }
.btn-jr.outline:hover { background: var(--jr-primary-tint); }
.btn-jr.success { background: var(--jr-good); color: #fff; }
.btn-jr.success:hover { background: #15803d; color: #fff; }
.btn-jr.danger-outline { background: var(--jr-card); color: var(--jr-danger); border-color: #fecaca; }
.btn-jr.danger-outline:hover { background: #fef2f2; }

.tiles {
    display: grid; gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-bottom: 1.5rem;
}
.tile {
    background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    padding: 1.1rem 1.2rem; box-shadow: var(--jr-shadow); text-decoration: none; color: inherit;
    display: flex; flex-direction: column; gap: .5rem; transition: box-shadow .12s ease, transform .08s ease, border-color .12s ease;
}
.tile:hover { box-shadow: var(--jr-shadow-md); transform: translateY(-2px); border-color: var(--jr-primary-tint-2); text-decoration: none; color: inherit; }
.tile .ic {
    width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--jr-primary-tint); color: var(--jr-primary-700); font-size: 1.2rem;
}
.tile h3 { font-size: 1rem; font-weight: 700; color: var(--jr-ink); margin: 0; }
.tile .big { font-size: 2rem; font-weight: 800; color: var(--jr-ink); line-height: 1; }
.tile p { font-size: .85rem; color: var(--jr-muted); margin: 0; }
.tile .go { font-size: .82rem; font-weight: 600; color: var(--jr-primary); margin-top: auto; }

.section-title { font-size: 1.05rem; font-weight: 700; color: var(--jr-ink); margin: 0 0 .8rem; }
.section-sub { font-size: .82rem; color: var(--jr-muted); margin: -.55rem 0 .8rem; }
.section-sub .star, .star { color: #d97706; }
.default-badge {
    font-size: .7rem; font-weight: 700; color: #b45309; background: #fef3c7;
    border: 1px solid #fde68a; border-radius: 999px; padding: .1rem .5rem; white-space: nowrap;
}

/* ============================================================================
   Resumes area
   ============================================================================ */
.upload-card {
    background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    box-shadow: var(--jr-shadow); padding: 1.2rem; margin-bottom: 1.5rem;
}
.dropzone {
    border: 2px dashed var(--jr-line); border-radius: var(--jr-radius); background: var(--jr-surface);
    padding: 1.6rem; text-align: center; color: var(--jr-muted); transition: border-color .12s ease, background .12s ease;
}
.dropzone:hover { border-color: var(--jr-primary); background: var(--jr-primary-tint); }
.dropzone .bi { font-size: 1.8rem; color: var(--jr-primary); }
.dropzone .hint { font-size: .8rem; color: var(--jr-faint); margin-top: .3rem; }

/* My Background import dropzone: the file input overlays the whole zone so a click anywhere or a
   drag-and-drop both trigger it. */
.import-drop { position: relative; cursor: pointer; margin-top: .4rem; }
.import-drop.dragover { border-color: var(--jr-primary); background: var(--jr-primary-tint); }
.import-drop .dz-main { font-weight: 600; color: var(--jr-body); margin-top: .4rem; }
.import-drop .dz-link { color: var(--jr-primary); text-decoration: underline; }
.import-drop .dz-input {
    position: absolute; inset: 0; width: 100%; height: 100%;
    opacity: 0; cursor: pointer;
}
.upload-row { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; margin-top: 1rem; }
.upload-row label { display: flex; flex-direction: column; font-size: .75rem; font-weight: 600; color: var(--jr-muted); gap: .25rem; }
.upload-row input[type=text] {
    border: 1px solid var(--jr-line); border-radius: 7px; padding: .45rem .6rem; font-size: .88rem; color: var(--jr-ink); min-width: 220px;
}
.upload-row input:focus { outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint); }
.upload-msg { font-size: .85rem; font-weight: 600; }
.upload-msg.ok { color: var(--jr-good); }
.upload-msg.err { color: var(--jr-danger); }

/* Segmented Resume / Source material selector on the upload card. */
.kind-toggle { display: inline-flex; border: 1px solid var(--jr-line); border-radius: 7px; overflow: hidden; }
.kind-opt {
    display: inline-flex; align-items: center; gap: .35rem; border: none; background: var(--jr-card);
    color: var(--jr-body); padding: .45rem .7rem; font-size: .82rem; font-weight: 600; cursor: pointer;
}
.kind-opt + .kind-opt { border-left: 1px solid var(--jr-line); }
.kind-opt:hover { background: var(--jr-hover); color: var(--jr-ink); }
.kind-opt.active { background: var(--jr-primary); color: #fff; }

/* Tag-bubble input ("Not interested in — quick tags"). */
.tag-input {
    display: flex; flex-wrap: wrap; align-items: center; gap: .4rem;
    border: 1px solid var(--jr-line); border-radius: 8px; background: var(--jr-card);
    padding: .4rem .5rem; min-height: 2.4rem; cursor: text;
}
.tag-input:focus-within { border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint); }
.tag-bubble {
    display: inline-flex; align-items: center; gap: .3rem;
    background: var(--jr-primary-tint); color: var(--jr-primary-700);
    border: 1px solid var(--jr-primary-tint-2); border-radius: 999px;
    padding: .18rem .25rem .18rem .6rem; font-size: .82rem; font-weight: 600; white-space: nowrap;
}
.tag-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.05rem; height: 1.05rem; border: none; border-radius: 999px; cursor: pointer;
    background: transparent; color: var(--jr-primary-700); font-size: 1rem; line-height: 1; padding: 0;
}
.tag-x:hover { background: var(--jr-primary); color: #fff; }
.tag-entry {
    flex: 1 1 8rem; min-width: 8rem; border: none; outline: none; background: transparent;
    font-size: .9rem; color: var(--jr-ink); padding: .2rem .1rem;
}

.doc-icon {
    width: 34px; height: 34px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.05rem; background: var(--jr-primary-tint); color: var(--jr-primary-700); flex: 0 0 auto;
}
.doc-icon.pdf { background: #fee2e2; color: #b91c1c; }
.doc-icon.doc { background: #dbeafe; color: #1d4ed8; }
.btn-icon {
    display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--jr-line); background: var(--jr-card);
    color: var(--jr-body); border-radius: 7px; padding: .35rem .65rem; font-size: .82rem; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn-icon:hover { background: var(--jr-hover); color: var(--jr-ink); text-decoration: none; }
.btn-icon.danger { color: var(--jr-danger); }
.btn-icon.danger:hover { background: #fef2f2; border-color: #fecaca; }
.empty-state { text-align: center; color: var(--jr-muted); padding: 2.5rem 1rem; }
.empty-state .bi { font-size: 2rem; color: var(--jr-faint); display: block; margin-bottom: .5rem; }

/* ============================================================================
   Tailor card (Board detail row)
   ============================================================================ */
.tailor-btn { align-self: flex-start; }
.tailor-btn[disabled] { opacity: .75; cursor: progress; }
.field-hint { font-size: .78rem; color: var(--jr-muted); margin: 0; line-height: 1.4; }
.field-hint strong { color: var(--jr-body); }
.tailor-err {
    font-size: .82rem; color: var(--jr-danger);
    background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: .5rem .7rem;
}
.doc-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.doc-chip {
    display: inline-flex; align-items: center; gap: .5rem;
    background: var(--jr-surface); border: 1px solid var(--jr-line);
    color: var(--jr-ink); border-radius: 8px; padding: .5rem .75rem;
    font-size: .83rem; font-weight: 600; text-decoration: none; transition: border-color .12s, background .12s;
}
.doc-chip .bi:first-child { color: #1d4ed8; font-size: 1rem; }
.doc-chip:hover { background: var(--jr-primary-tint); border-color: var(--jr-primary-tint-2); color: var(--jr-primary-700); text-decoration: none; }
.doc-chip .dl { margin-left: .15rem; opacity: .6; }
.doc-chip:hover .dl { opacity: 1; }

/* Smaller primary button used inside the cards. */
.btn-jr.sm { padding: .45rem .9rem; font-size: .85rem; align-self: flex-start; }

/* Compact download links shown in the Board's Resume column. */
.col-docs { display: flex; flex-direction: column; gap: .25rem; }
.col-doc {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .8rem; font-weight: 600; color: var(--jr-primary); text-decoration: none; white-space: nowrap;
}
.col-doc .bi { color: #1d4ed8; }
.col-doc:hover { color: var(--jr-primary-700); text-decoration: underline; }

/* ============================================================================
   My Background — per-section view/edit
   ============================================================================ */
.import-card { background: var(--jr-primary-tint); border-color: var(--jr-primary-tint-2); }
.import-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: .6rem; }

/* Two-column layout: sticky section nav + content. */
.bg-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.bg-nav {
    position: sticky; top: 1rem; align-self: start;
    display: flex; flex-direction: column; gap: .15rem;
    background: var(--jr-card); border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius); box-shadow: var(--jr-shadow); padding: .5rem;
}
.bg-nav-link {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%;
    padding: .5rem .65rem; border-radius: 8px; text-decoration: none; text-align: left;
    color: var(--jr-body); font-size: .9rem; font-weight: 600;
    border: none; background: none; cursor: pointer; font-family: inherit;
}
.bg-nav-link span { display: inline-flex; align-items: center; gap: .5rem; }
.bg-nav-link .bi { color: var(--jr-primary); }
.bg-nav-link:hover { background: var(--jr-hover); color: var(--jr-ink); text-decoration: none; }
.bg-nav-link.is-empty { color: var(--jr-faint); }
.bg-nav-link.is-empty .bi { color: var(--jr-faint); }
.bg-nav-count {
    background: var(--jr-primary-tint); color: var(--jr-primary-700); border: 1px solid var(--jr-primary-tint-2);
    border-radius: 999px; padding: 0 .45rem; font-size: .72rem; font-weight: 700; min-width: 1.4rem; text-align: center;
}
.bg-nav-on { color: var(--jr-good) !important; }
.bg-content { min-width: 0; }

/* Clear separation between sections; offset anchor jumps below any sticky header. */
.bg-section { margin-bottom: 16px; scroll-margin-top: 1rem; }

/* Section header: title left, Edit button right. */
.bg-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bg-section-head .detail-card-title { margin: 0; }
.bg-edit { white-space: nowrap; }

/* Read-only display. */
.bg-prose { color: var(--jr-body); line-height: 1.6; margin: .6rem 0 0; white-space: pre-wrap; }
.bg-empty { color: var(--jr-faint); font-style: italic; margin: .6rem 0 0; }
.bg-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.bg-tag {
    background: var(--jr-primary-tint); color: var(--jr-primary-700); border: 1px solid var(--jr-primary-tint-2);
    border-radius: 999px; padding: .2rem .6rem; font-size: .82rem; font-weight: 600;
}
.bg-item { padding: .6rem 0; border-top: 1px solid var(--jr-line); }
.bg-item:first-of-type { border-top: none; }
.bg-item-title { font-weight: 700; color: var(--jr-ink); }
.bg-item-meta { font-size: .82rem; color: var(--jr-muted); margin-top: .15rem; }
.bg-item-body { font-size: .88rem; color: var(--jr-body); margin-top: .25rem; }
.bg-project { padding: .9rem 0; border-top: 1px solid var(--jr-line); }
.bg-project:first-of-type { border-top: none; }
.bg-project-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.bg-project-head .bg-item-title { flex: 1 1 auto; }
.bg-project-para { color: var(--jr-body); line-height: 1.55; margin: .5rem 0 0; }
.bg-bullets { margin-top: .55rem; }
.bg-bullets-label { font-size: .78rem; font-weight: 700; color: var(--jr-muted); text-transform: uppercase; letter-spacing: .03em; }
.bg-bullets ul { margin: .25rem 0 0; padding-left: 1.2rem; }
.bg-bullets li { color: var(--jr-body); line-height: 1.5; margin-bottom: .2rem; }

/* Edit mode. */
.bg-row {
    display: flex; align-items: flex-start; gap: .6rem;
    border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    background: var(--jr-surface); padding: 1rem; margin-bottom: .8rem;
}
.edit-grid {
    flex: 1 1 auto; display: grid; gap: .8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.edit-grid .field { min-width: 0; }
.edit-grid .edit-wide { grid-column: 1 / -1; }   /* full width within the row */

/* Project edit card: actions bar on top, then every field stacked full-width. */
.bg-edit-card {
    border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    background: var(--jr-surface); padding: 1rem; margin-bottom: .8rem;
}
.bg-edit-actions-top {
    margin: 0 0 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--jr-line);
}
.edit-stack { display: flex; flex-direction: column; gap: .9rem; }
.edit-stack .field { width: 100%; }
.big-edit {
    width: 100%; min-height: 5rem; resize: vertical; line-height: 1.5;
    font-size: .92rem; padding: .6rem .7rem;
}
.bg-remove {
    flex: 0 0 auto; border: 1px solid var(--jr-line); background: var(--jr-card);
    color: var(--jr-danger); border-radius: 7px; padding: .4rem .55rem; cursor: pointer; line-height: 1;
}
.bg-remove:hover { background: #fef2f2; border-color: #fecaca; }
.bg-edit-actions { margin-top: 1rem; display: flex; align-items: center; gap: .6rem; }
.bullet-hint { font-weight: 400; color: var(--jr-faint); font-size: .72rem; }

@media (max-width: 720px) {
    .edit-grid { grid-template-columns: 1fr; }
    .bg-layout { grid-template-columns: 1fr; }
    .bg-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .bg-nav-link { flex: 1 1 auto; }
}

/* "Added" column — relative discovered date; the newest sweep is highlighted. */
.added-cell { white-space: nowrap; font-size: .8rem; }
.added-new {
    display: inline-flex; align-items: center; gap: .3rem;
    color: var(--jr-good); font-weight: 700;
}
.added-new .bi { font-size: .85rem; }

/* Resume-column inline tailor button + states. */
.col-tailoring {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .8rem; font-weight: 600; color: var(--jr-muted); white-space: nowrap;
}
.col-tailor-err { color: var(--jr-danger); margin-left: .35rem; }

/* Toolbar action button: keep it grouped with the filters (don't let the
   right-pinned count pill shove it around). */
.toolbar .btn-jr.sm.toolbar-action { align-self: center; }
.toolbar .btn-jr[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* JD-fetch result banner under the toolbar. */
.fetch-summary {
    background: var(--jr-primary-tint); border: 1px solid var(--jr-primary-tint-2);
    color: var(--jr-primary-700); border-radius: var(--jr-radius);
    padding: .6rem .85rem; font-size: .85rem; line-height: 1.45; margin-bottom: 1rem;
}

.spin {
    display: inline-block; width: 13px; height: 13px; vertical-align: -1px;
    border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
    animation: jr-spin .7s linear infinite;
}
@keyframes jr-spin { to { transform: rotate(360deg); } }

/* ============================================================================
   Misc Bootstrap-ish bits kept from the template
   ============================================================================ */
.btn-primary { color: #fff; background-color: var(--jr-primary); border-color: var(--jr-primary); }
.btn-primary:hover { background-color: var(--jr-primary-600); border-color: var(--jr-primary-600); }

.blazor-error-boundary {
    background: var(--jr-danger);
    padding: 1rem 1rem 1rem 1rem; color: white; border-radius: var(--jr-radius);
}
.blazor-error-boundary::after { content: "An error has occurred."; }

#blazor-error-ui {
    color-scheme: light only; background: #fff8e1;
    bottom: 0; box-shadow: 0 -1px 4px rgba(0,0,0,.18); box-sizing: border-box;
    display: none; left: 0; padding: .7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .9rem; top: .55rem; }

/* ── Discovery / Profile / Providers forms ─────────────────────────────── */
/* Text + number inputs inside a .field match the textarea/select styling. Use a broad
   .field input selector (excluding checkbox/radio) so inputs with no explicit type="text"
   attribute are styled too — otherwise they fall back to the browser default (wrong font,
   fixed width). */
.field input:not([type=checkbox]):not([type=radio]) {
    width: 100%; border: 1px solid var(--jr-line); border-radius: 8px;
    padding: .55rem .7rem; font-size: .88rem; color: var(--jr-ink);
    background: var(--jr-card); font-family: inherit;
}
.field input:not([type=checkbox]):not([type=radio]):focus {
    outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint);
}

/* Single-column variant of the detail grid (forms that stack one card). */
/* Single-column form pages (Profile) fill the content width like every other page —
   no artificial narrow cap, so the app width is consistent across pages. */
.detail-grid.single { grid-template-columns: minmax(0, 1fr); }

/* Two fields side by side (e.g. fit threshold + lookback days). */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .two-col { grid-template-columns: 1fr; } }

/* Profile page intro callout — encourages writing a real profile. */
.profile-intro {
    display: flex; gap: .7rem; align-items: flex-start;
    background: var(--jr-primary-tint); border: 1px solid var(--jr-primary-tint-2);
    border-radius: var(--jr-radius); padding: .8rem 1rem; margin-bottom: 1.25rem;
    font-size: .88rem; color: var(--jr-body); line-height: 1.5;
}
.profile-intro .bi { color: var(--jr-primary); font-size: 1.1rem; margin-top: .1rem; flex: 0 0 auto; }
.profile-intro strong { color: var(--jr-ink); }

/* Inline enabled toggle on the Providers cards. */
.chk-line { display: inline-flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--jr-body); cursor: pointer; }
.chk-line input { accent-color: var(--jr-primary); width: 16px; height: 16px; }

/* Live discovery progress log. */
.run-log {
    background: var(--jr-bg, #f8fafc); border: 1px solid var(--jr-line); border-radius: 8px;
    padding: .7rem .85rem; max-height: 320px; overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem;
    color: var(--jr-body); display: flex; flex-direction: column; gap: .2rem;
}
.run-log-line { white-space: pre-wrap; word-break: break-word; }
.run-log-line.muted { color: var(--jr-muted); display: inline-flex; align-items: center; gap: .4rem; }
.pill-running   { background: var(--jr-primary-tint); color: var(--jr-primary-700); }
.pill-completed { background: #ecfdf5; color: #047857; }
.pill-failed    { background: #fef2f2; color: #b91c1c; }

/* Discovery: consistent 20px spacing between the page's cards/sections. */
.discovery > * { margin-bottom: 20px; }
.discovery > *:last-child { margin-bottom: 0; }
/* "Recent runs" heading: 20px clear of the card above, tight to its own table below. */
.discovery .section-title { margin-top: 20px; margin-bottom: .8rem; }

/* Provider frequency setting + last-scanned (Providers page). */
.freq-field .freq-row { display: flex; align-items: center; gap: .5rem; }
.freq-field input[type=number] { width: 6rem; }
.last-scan { display: inline-flex; align-items: center; gap: .35rem; }

/* Discovery pre-run throttle notice + 'scan anyway' checkboxes. */
.throttle-card { border-color: #fde68a; background: #fffbeb; }
.throttle-head { font-size: .92rem; font-weight: 700; color: #b45309; display: flex; align-items: center; gap: .4rem; }
.throttle-list { display: flex; flex-direction: column; gap: .4rem; }
.throttle-item { color: var(--jr-body); font-size: .88rem; }

/* Provider credit balance line (Providers page). */
.credits-line {
    display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
    font-size: .85rem; color: var(--jr-body);
    background: var(--jr-surface); border: 1px solid var(--jr-line); border-radius: 8px; padding: .5rem .7rem;
}
.credits-line .bi { color: var(--jr-primary); }
.credits-line strong { color: var(--jr-ink); }
.credits-line.credits-low { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.credits-line.credits-low .bi { color: #d97706; }
.credits-warn { color: #b45309; font-weight: 600; }

/* ── Customer Providers page: compact source rows + toggle ─────────────── */
.src-group { max-width: 760px; margin-bottom: 28px; }
.src-group-head { margin-bottom: 12px; }
.src-group-head .section-title { margin: 0 0 .15rem; display: flex; align-items: center; gap: .5rem; }
.src-group-head .muted { margin: 0; }
.src-included {
    font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--jr-good); background: var(--jr-good-bg); padding: .15rem .5rem; border-radius: 999px;
}
.src-pro-badge {
    font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: #fff; background: var(--jr-primary); padding: .15rem .5rem; border-radius: 999px;
}
.src-pro-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.src-pro-head .btn-jr { flex: 0 0 auto; }
.src-list { display: flex; flex-direction: column; gap: .5rem; }
.src-row {
    display: flex; align-items: center; gap: .85rem; padding: .7rem .9rem;
    background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    box-shadow: var(--jr-shadow); transition: border-color .12s ease, box-shadow .12s ease;
}
.src-row:hover { border-color: var(--jr-primary-tint-2); }
.src-row.locked { opacity: .65; }
.src-icon {
    flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px;
    background: var(--jr-primary-tint); color: var(--jr-primary); font-size: 1rem;
}
.src-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .12rem; }
.src-name { font-size: .95rem; font-weight: 700; color: var(--jr-ink); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.src-desc { font-size: .82rem; color: var(--jr-body); line-height: 1.35; }
.src-note { display: flex; align-items: center; gap: .3rem; margin-top: .1rem; }
.src-saved { color: var(--jr-good); font-size: .75rem; font-weight: 600; display: inline-flex; align-items: center; gap: .2rem; }

/* Toggle switch */
.src-switch { flex: 0 0 auto; position: relative; display: inline-block; width: 42px; height: 24px; }
.src-switch input { opacity: 0; width: 0; height: 0; }
.src-slider {
    position: absolute; inset: 0; cursor: pointer; background: var(--jr-line); border-radius: 999px;
    transition: background .15s ease;
}
.src-slider::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%; transition: transform .15s ease; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.src-switch input:checked + .src-slider { background: var(--jr-primary); }
.src-switch input:checked + .src-slider::before { transform: translateX(18px); }
.src-switch input:disabled + .src-slider { cursor: not-allowed; opacity: .6; }

/* Admin provider key status pill */
.provider-status { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .12rem .45rem; border-radius: 999px; }
.provider-status.ok { color: var(--jr-good); background: var(--jr-good-bg); }
.provider-status.missing { color: #b45309; background: #fffbeb; }

/* Providers searched — chip block at the top of the run card. */
.providers-block { padding-bottom: .85rem; border-bottom: 1px solid var(--jr-line); }
.providers-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--jr-muted); margin-bottom: .5rem; }
.providers-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.provider-chip {
    display: inline-flex; align-items: center; gap: .35rem;
    border: 1px solid var(--jr-line); border-radius: 999px; padding: .25rem .65rem;
    font-size: .82rem; color: var(--jr-body); background: var(--jr-card);
}
.provider-chip strong { color: var(--jr-ink); }
.provider-chip em { font-style: normal; color: var(--jr-faint); }
.provider-fetched { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.provider-fetched strong { color: #047857; }
.provider-fetched .bi { color: var(--jr-good); }
.provider-skipped { color: var(--jr-muted); }
.provider-failed { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* End-of-run summary card. */
.run-summary-card { gap: 1rem; }
.run-stats { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.run-stat { display: flex; flex-direction: column; }
.run-stat .num { font-size: 1.2rem; font-weight: 800; color: var(--jr-ink); line-height: 1; }
.run-stat .lbl { font-size: .72rem; color: var(--jr-muted); margin-top: .2rem; }
.runs-more { padding: .8rem; border-top: 1px solid var(--jr-line); text-align: center; }

/* Discovery: single live status row + progress bar (replaces the stacked log). */
.run-status-card { padding: .9rem 1.1rem; }
.run-status { display: flex; align-items: center; gap: .6rem; font-size: .88rem; color: var(--jr-ink); }
.run-status-text strong { font-weight: 700; }
.run-status-done { color: var(--jr-good); }
.run-progress {
    margin-top: .7rem; height: 7px; border-radius: 999px; background: var(--jr-line); overflow: hidden;
}
.run-progress-bar { height: 100%; background: var(--jr-primary); border-radius: 999px; transition: width .25s ease; }

/* Discovery live results table — one row per scored posting. */
.scored-summary { display: inline-flex; align-items: center; gap: 1rem; }
.scored-table td { vertical-align: top; }
.scored-table .scored-skip { opacity: .6; }                 /* below threshold — dimmed */
.scored-table .scored-kept { background: rgba(22,163,74,.05); }
.scored-on { color: var(--jr-good); margin-left: .35rem; }
.scored-why { font-size: .82rem; color: var(--jr-body); line-height: 1.4; max-width: 38ch; white-space: normal; }

/* Resumes browser — filter bar + table badges/pills. */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem;
}
.filter-search {
    position: relative; display: inline-flex; align-items: center; flex: 1 1 280px; min-width: 220px;
}
.filter-search i { position: absolute; left: .7rem; color: var(--jr-faint); pointer-events: none; }
.filter-search input {
    width: 100%; padding: .5rem .7rem .5rem 2rem; border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius-sm); background: var(--jr-card); color: var(--jr-ink); font-size: .9rem;
}
.filter-search input:focus { outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint); }
.filter-select {
    padding: .5rem .7rem; border: 1px solid var(--jr-line); border-radius: var(--jr-radius-sm);
    background: var(--jr-card); color: var(--jr-ink); font-size: .9rem; cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--jr-primary); box-shadow: 0 0 0 3px var(--jr-primary-tint); }

.doc-type-badge {
    display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .55rem;
    border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.doc-type-badge.resume { background: var(--jr-primary-tint); color: var(--jr-primary-700); }
.doc-type-badge.cover  { background: #cffafe; color: #0e7490; }   /* cyan tint */

.status-pill {
    display: inline-block; padding: .15rem .55rem; border-radius: 999px;
    font-size: .78rem; font-weight: 600; white-space: nowrap;
    background: var(--jr-low-bg); color: var(--jr-low);
}
.status-pill.status-interested,
.status-pill.status-applied   { background: var(--jr-primary-tint); color: var(--jr-primary-700); }
.status-pill.status-screen,
.status-pill.status-interview { background: var(--jr-mid-bg); color: var(--jr-mid); }
.status-pill.status-offer     { background: var(--jr-good-bg); color: var(--jr-good); }
.status-pill.status-rejected,
.status-pill.status-notinterested { background: #fee2e2; color: var(--jr-danger); }
.status-pill.status-expired   { background: var(--jr-low-bg); color: var(--jr-faint); }

/* Board bulk-select bar + selection column. */
.bulk-bar {
    display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
    background: var(--jr-primary-tint); border: 1px solid var(--jr-primary-tint-2);
    border-radius: var(--jr-radius); padding: .55rem .8rem; margin-bottom: .8rem;
}
.bulk-bar .bulk-count { color: var(--jr-primary-700); }
.bulk-bar .bulk-sep { color: var(--jr-muted); font-size: .88rem; }
.bulk-bar .field-select { min-width: 160px; }
.sel-col { width: 34px; text-align: center; padding-left: .4rem !important; padding-right: .4rem !important; }
.sel-col input { cursor: pointer; }
table.jobs tbody tr.row-selected td { background: var(--jr-primary-tint); }

/* Billing / subscription + paywall. */
.billing-card {
    background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    box-shadow: var(--jr-shadow); padding: 1.4rem; max-width: 520px;
}
.plan-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.plan-name { font-weight: 700; color: var(--jr-ink); font-size: 1.1rem; }
.plan-price { font-size: 1.8rem; font-weight: 700; color: var(--jr-ink); margin-top: .2rem; }
.plan-price span { font-size: .95rem; font-weight: 500; color: var(--jr-muted); }
.plan-feats { list-style: none; padding: 0; margin: 1rem 0; display: flex; flex-direction: column; gap: .5rem; }
.plan-feats li { display: flex; align-items: center; gap: .55rem; color: var(--jr-body); font-size: .92rem; }
.plan-feats .bi { color: var(--jr-good); }
.btn-jr.lg { padding: .7rem 1.2rem; font-size: 1rem; }
.billing-banner {
    display: flex; align-items: center; gap: .5rem; padding: .65rem .9rem; border-radius: var(--jr-radius-sm);
    background: var(--jr-low-bg); color: var(--jr-body); font-size: .9rem; margin-bottom: 1rem;
}
.billing-banner.ok { background: var(--jr-good-bg); color: var(--jr-good); }
.billing-banner.warn { background: var(--jr-mid-bg); color: var(--jr-mid); align-items: flex-start; }
.billing-banner.info { background: var(--jr-primary-tint); color: var(--jr-primary-700); }
/* Emphasis inside a field hint — draws the eye to a "you should do this" nudge without alarming. */
.hint-strong { color: var(--jr-primary-700); }
.billing-banner-body { display: flex; flex-direction: column; gap: .35rem; }
.billing-banner-body p { margin: 0; color: var(--jr-body); font-size: .88rem; line-height: 1.5; max-width: 64ch; }
.billing-banner-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.billing-error-detail {
    margin-top: .5rem; padding: .5rem .6rem; border-radius: var(--jr-radius-sm);
    background: rgba(0,0,0,.06); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .78rem; line-height: 1.35; color: var(--jr-body); word-break: break-word;
}

.sub-badge {
    display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600;
    background: var(--jr-low-bg); color: var(--jr-low);
}
.sub-badge.sub-active { background: var(--jr-good-bg); color: var(--jr-good); }
.sub-badge.sub-trialing { background: var(--jr-primary-tint); color: var(--jr-primary-700); }
.sub-badge.sub-pastdue { background: var(--jr-mid-bg); color: var(--jr-mid); }
.sub-badge.sub-canceled, .sub-badge.sub-none { background: var(--jr-low-bg); color: var(--jr-muted); }

.paywall {
    display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem;
    background: var(--jr-primary-tint); border: 1px dashed var(--jr-primary-tint-2);
    border-radius: var(--jr-radius-sm);
}
.paywall.compact { padding: .4rem .6rem; gap: .5rem; font-size: .85rem; }
.paywall > .bi { color: var(--jr-primary); font-size: 1.1rem; }
.paywall-text { display: flex; flex-direction: column; line-height: 1.25; }
.paywall-text strong { color: var(--jr-ink); font-size: .9rem; }
.paywall-text span { color: var(--jr-muted); font-size: .82rem; }
.paywall button { margin-left: auto; }

.auth-loading { padding: 2rem; text-align: center; color: var(--jr-muted); }
/* Account dropdown at the right end of the topbar. */
.nav-account { display: inline-flex; align-items: center; flex: 0 0 auto; white-space: nowrap; }
.acct-menu { position: relative; }
.acct-trigger {
    display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
    background: none; border: 1px solid transparent; border-radius: 8px;
    color: rgba(255,255,255,.85); font-size: .88rem; padding: .4rem .7rem;
}
.acct-trigger:hover, .acct-menu.open .acct-trigger { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.12); }
.acct-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.acct-caret { font-size: .7rem; opacity: .7; transition: transform .15s ease; }
.acct-menu.open .acct-caret { transform: rotate(180deg); }

.acct-overlay { position: fixed; inset: 0; z-index: 1040; }
.acct-dropdown {
    position: absolute; top: calc(100% + .4rem); right: 0; z-index: 1050;
    min-width: 200px; background: var(--jr-card); color: var(--jr-ink);
    border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    box-shadow: var(--jr-shadow-md); padding: .35rem; display: flex; flex-direction: column;
}
.acct-item {
    display: flex; align-items: center; gap: .6rem; width: 100%;
    padding: .55rem .7rem; border-radius: 7px; font-size: .9rem;
    color: var(--jr-body); background: none; border: none; cursor: pointer; text-align: left;
}
.acct-item:hover { background: var(--jr-hover); color: var(--jr-ink); text-decoration: none; }
.acct-item .bi { color: var(--jr-muted); width: 1rem; }
.acct-sep { height: 1px; background: var(--jr-line); margin: .3rem .2rem; }
.acct-logout-form { margin: 0; }
.acct-logout:hover { background: #fee2e2; color: var(--jr-danger); }
.acct-logout:hover .bi { color: var(--jr-danger); }

/* ===== AI telemetry report ===== */
.tele-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.tele-card { background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius); box-shadow: var(--jr-shadow); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .2rem; }
.tele-card.big { background: linear-gradient(135deg, var(--jr-primary), var(--jr-primary-700)); border: none; }
.tele-card.big .tele-label, .tele-card.big .tele-sub { color: rgba(255,255,255,.8); }
.tele-card.big .tele-num { color: #fff; }
.tele-label { font-size: .78rem; color: var(--jr-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.tele-num { font-size: 1.7rem; font-weight: 700; color: var(--jr-ink); line-height: 1.1; }
.tele-sub { font-size: .8rem; color: var(--jr-muted); }

.tele-section { margin-bottom: 1.8rem; }
.tele-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.tele-stat { background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius-sm); padding: .9rem 1rem; display: flex; flex-direction: column; gap: .25rem; }
.tele-stat.headroom { border-color: var(--jr-primary-tint-2); background: var(--jr-primary-tint); }
.tele-stat-label { font-size: .82rem; color: var(--jr-muted); }
.tele-stat-num { font-size: 1.3rem; font-weight: 700; color: var(--jr-ink); }
.tele-stat-foot { font-size: .76rem; color: var(--jr-muted); }

.tele-chart { display: flex; align-items: flex-end; gap: .3rem; height: 160px; padding: .5rem 0; border-bottom: 1px solid var(--jr-line); overflow-x: auto; }
.tele-bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; flex: 1 0 26px; height: 100%; gap: .3rem; }
.tele-bar { width: 60%; min-height: 2px; background: var(--jr-primary); border-radius: 3px 3px 0 0; transition: height .2s ease; }
.tele-bar-col:hover .tele-bar { background: var(--jr-primary-700); }
.tele-bar-x { font-size: .68rem; color: var(--jr-faint); white-space: nowrap; }

.rate-unknown { display: inline-block; margin-left: .4rem; padding: .05rem .4rem; border-radius: 999px; font-size: .68rem; font-weight: 600; background: var(--jr-mid-bg); color: var(--jr-mid); }

/* ===== Admin area sub-nav + jump cards ===== */
.admin-subnav { display: flex; gap: .3rem; border-bottom: 1px solid var(--jr-line); margin-bottom: 1.4rem; flex-wrap: wrap; }
.admin-tab { display: inline-flex; align-items: center; gap: .4rem; padding: .6rem .95rem; font-size: .9rem; font-weight: 500; color: var(--jr-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab:hover { color: var(--jr-ink); text-decoration: none; }
.admin-tab.active { color: var(--jr-primary); border-bottom-color: var(--jr-primary); }
.admin-jump { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.admin-jump-card { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius); box-shadow: var(--jr-shadow); color: var(--jr-ink); }
.admin-jump-card:hover { border-color: var(--jr-primary-tint-2); box-shadow: var(--jr-shadow-md); text-decoration: none; }
.admin-jump-card > .bi { font-size: 1.5rem; color: var(--jr-primary); }
.admin-jump-card div { display: flex; flex-direction: column; }
.admin-jump-card strong { color: var(--jr-ink); }
.admin-jump-card span { font-size: .82rem; color: var(--jr-muted); }

/* Prominent background-import progress banner (My Background). White card for readability, with a
   thin indigo left edge so it still reads as an active/in-progress state. */
.import-progress {
    display: flex; align-items: center; gap: .9rem; margin-top: 1rem;
    padding: .9rem 1.1rem; border-radius: var(--jr-radius);
    background: var(--jr-card); border: 1px solid var(--jr-line);
    border-left: 3px solid var(--jr-primary);
    box-shadow: var(--jr-shadow);
}
.import-progress-text { display: flex; flex-direction: column; line-height: 1.3; }
.import-progress-text strong { color: var(--jr-ink); font-size: .95rem; }
.import-step { color: var(--jr-body); font-size: .88rem; }
.import-elapsed {
    margin-left: auto; flex: 0 0 auto; align-self: center;
    font-variant-numeric: tabular-nums; font-size: .85rem; font-weight: 600;
    color: var(--jr-muted); background: var(--jr-hover); padding: .15rem .5rem; border-radius: 999px;
}
.import-spinner {
    flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
    border: 3px solid var(--jr-primary-tint-2); border-top-color: var(--jr-primary);
    animation: jf-spin .8s linear infinite;
}
@keyframes jf-spin { to { transform: rotate(360deg); } }

/* ===== Billing: usage meters, plan picker, top-ups ===== */
.billing-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; }

.meter-grid { display: flex; flex-direction: column; gap: .9rem; margin: 1.1rem 0 .3rem; }
.meter-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .3rem; }
.meter-label { font-size: .9rem; color: var(--jr-ink); font-weight: 600; }
.meter-count { font-size: .82rem; color: var(--jr-muted); font-variant-numeric: tabular-nums; }
.meter-bar { height: 8px; border-radius: 999px; background: var(--jr-line); overflow: hidden; }
.meter-fill { height: 100%; background: var(--jr-primary); border-radius: 999px; transition: width .25s ease; }
.meter-fill.full { background: var(--jr-mid); }

.plan-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; max-width: 720px; }
.plan-option { position: relative; transition: border-color .15s ease, box-shadow .15s ease; }
/* Pro is highlighted by default… */
.plan-option.featured { border-color: var(--jr-primary); box-shadow: 0 0 0 1px var(--jr-primary), var(--jr-shadow-md); }
/* …but on hover the purple highlight follows the hovered card. While any card in the
   picker is hovered, the default featured highlight is suppressed so only one shows. */
.plan-picker:hover .plan-option.featured { border-color: var(--jr-line); box-shadow: var(--jr-shadow); }
.plan-picker .plan-option:hover { border-color: var(--jr-primary); box-shadow: 0 0 0 1px var(--jr-primary), var(--jr-shadow-md); }
.plan-badge { position: absolute; top: -10px; right: 14px; background: var(--jr-primary); color: #fff; font-size: .7rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; }

/* Top-up section — clearly separated from the plan card above it. */
.topup-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--jr-line); max-width: 720px; }
.topup-head { margin-bottom: 20px; }
.topup-head .section-title { margin-bottom: .35rem; }
.topup-head .muted { margin: 0; max-width: 56ch; line-height: 1.5; }

.topup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.topup-card {
    background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
    box-shadow: var(--jr-shadow); padding: 1.1rem 1.1rem 1.2rem; display: flex; flex-direction: column;
    align-items: flex-start; gap: .35rem; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.topup-card:hover { border-color: var(--jr-primary); box-shadow: var(--jr-shadow-md); transform: translateY(-2px); }
.topup-icon {
    width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
    background: var(--jr-primary-tint); color: var(--jr-primary); font-size: 1.15rem; margin-bottom: .3rem;
}
.topup-title { font-size: 1rem; font-weight: 700; color: var(--jr-ink); }
.topup-desc { font-size: .85rem; color: var(--jr-body); line-height: 1.4; }
/* Pin price + button to the bottom so they align across cards of differing description length. */
.topup-price { font-size: 1.35rem; font-weight: 800; color: var(--jr-ink); display: flex; align-items: baseline; gap: .4rem; margin-top: auto; padding-top: .6rem; }
.topup-once { font-size: .7rem; font-weight: 600; color: var(--jr-body); background: var(--jr-low-bg); padding: .1rem .4rem; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.topup-card .btn-jr { margin-top: .5rem; align-self: stretch; justify-content: center; }
.topup-foot { margin-top: 16px; }

/* ============================================================================
   Landing / marketing page (public, anonymous) — prefix .lp-
   ============================================================================ */
.lp-root { background: var(--jr-card); color: var(--jr-body); }
.lp-loading { min-height: 60vh; display: grid; place-items: center; color: var(--jr-muted); }

/* Top nav */
.lp-nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--jr-line); }
.lp-nav-inner { max-width: 1080px; margin: 0 auto; padding: .9rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.lp-logo { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.25rem; color: var(--jr-ink); text-decoration: none; }
.lp-logo-dot { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--jr-primary), var(--jr-accent)); box-shadow: 0 0 0 4px var(--jr-primary-tint); }
.lp-nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.lp-nav-links a { color: var(--jr-body); text-decoration: none; font-size: .92rem; font-weight: 500; }
.lp-nav-links a:hover { color: var(--jr-primary); }

/* Hero */
.lp-hero { max-width: 880px; margin: 0 auto; padding: 5rem 1.5rem 3.5rem; text-align: center; }
.lp-tag { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--jr-primary); background: var(--jr-primary-tint); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1.4rem; }
.lp-hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08; font-weight: 800; color: var(--jr-ink); letter-spacing: -.02em; margin: 0 0 1.2rem; }
.lp-grad { background: linear-gradient(120deg, var(--jr-primary), var(--jr-accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lp-sub { font-size: clamp(1.05rem, 2.2vw, 1.25rem); line-height: 1.6; color: var(--jr-body); max-width: 640px; margin: 0 auto 2rem; }
.lp-cta { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }
.lp-cta-note { margin-top: 1rem; font-size: .85rem; color: var(--jr-muted); }
.btn-jr.lg { padding: .8rem 1.5rem; font-size: 1rem; }
/* The shared .btn-jr.ghost is white-on-dark (for the app navbar); on the light hero it would be
   invisible. Give the landing hero's secondary CTA a visible light-surface treatment. */
.lp-hero .btn-jr.ghost {
    background: #fff; color: var(--jr-primary); border: 1px solid var(--jr-line);
}
.lp-hero .btn-jr.ghost:hover { background: var(--jr-primary-tint); color: var(--jr-primary); border-color: var(--jr-primary-tint-2); }

/* Sections */
.lp-section { max-width: 1080px; margin: 0 auto; padding: 4rem 1.5rem; }
.lp-section-alt { max-width: none; background: var(--jr-surface); border-top: 1px solid var(--jr-line); border-bottom: 1px solid var(--jr-line); }
.lp-section-alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.lp-h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 800; color: var(--jr-ink); text-align: center; letter-spacing: -.01em; margin: 0 0 .6rem; }
.lp-h2-sub { text-align: center; color: var(--jr-muted); margin: 0 0 2.5rem; }
.lp-h2 + .lp-steps, .lp-h2 + .lp-features, .lp-h2 + .lp-pricing { margin-top: 2.5rem; }

/* How it works */
.lp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.lp-step { background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius); padding: 1.8rem 1.5rem; box-shadow: var(--jr-shadow); }
.lp-step-n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--jr-primary); color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: 1rem; }
.lp-step h3 { font-size: 1.1rem; font-weight: 700; color: var(--jr-ink); margin: 0 0 .5rem; }
.lp-step p { margin: 0; line-height: 1.55; color: var(--jr-body); font-size: .94rem; }

/* Features */
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.3rem; }
.lp-feature { padding: 1.5rem; border-radius: var(--jr-radius); background: var(--jr-card); border: 1px solid var(--jr-line); }
.lp-feat-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--jr-primary-tint); color: var(--jr-primary); font-size: 1.3rem; margin-bottom: 1rem; }
.lp-feature h3 { font-size: 1.05rem; font-weight: 700; color: var(--jr-ink); margin: 0 0 .45rem; }
.lp-feature p { margin: 0; line-height: 1.55; color: var(--jr-body); font-size: .92rem; }

/* Pricing */
.lp-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; max-width: 760px; margin: 0 auto; }
.lp-plan { position: relative; background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius); padding: 2rem 1.6rem; box-shadow: var(--jr-shadow); display: flex; flex-direction: column; }
.lp-plan-featured { border-color: var(--jr-primary); box-shadow: 0 0 0 1px var(--jr-primary), var(--jr-shadow-md); }
.lp-plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--jr-primary); color: #fff; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .25rem .7rem; border-radius: 999px; }
.lp-plan-name { font-size: 1.1rem; font-weight: 700; color: var(--jr-ink); }
.lp-plan-price { font-size: 2.6rem; font-weight: 800; color: var(--jr-ink); margin: .3rem 0 1.2rem; }
.lp-plan-price span { font-size: 1rem; font-weight: 500; color: var(--jr-muted); }
.lp-plan-feats { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.lp-plan-feats li { display: flex; align-items: flex-start; gap: .55rem; color: var(--jr-body); font-size: .94rem; }
.lp-plan-feats .bi { color: var(--jr-good); margin-top: .15rem; }
.lp-plan-cta { justify-content: center; }
.lp-topup-note { text-align: center; color: var(--jr-muted); font-size: .9rem; margin: 2rem auto 0; max-width: 560px; }

/* Final CTA */
.lp-final { text-align: center; padding: 4.5rem 1.5rem; background: linear-gradient(135deg, var(--jr-primary), var(--jr-primary-700)); color: #fff; }
.lp-final h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; margin: 0 0 .8rem; }
.lp-final p { font-size: 1.1rem; opacity: .92; max-width: 560px; margin: 0 auto 2rem; line-height: 1.55; }
.lp-final .btn-jr.primary { background: #fff; color: var(--jr-primary); border-color: #fff; }
.lp-final .btn-jr.primary:hover { background: var(--jr-primary-tint); }

/* Footer */
.lp-footer { background: var(--jr-ink); color: #cbd5e1; }
.lp-footer-inner { max-width: 1080px; margin: 0 auto; padding: 3rem 1.5rem 2rem; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.lp-footer .lp-logo { color: #fff; }
.lp-footer-brand { max-width: 320px; }
.lp-footer-brand .muted { color: #94a3b8 !important; margin-top: .6rem; }
.lp-footer-links { display: flex; flex-direction: column; gap: .6rem; }
.lp-footer-links a { color: #cbd5e1; text-decoration: none; font-size: .92rem; }
.lp-footer-links a:hover { color: #fff; }
.lp-footer-bottom { border-top: 1px solid #1e293b; padding: 1.2rem 1.5rem; text-align: center; }
.lp-footer-bottom .muted { color: #64748b !important; }

@media (max-width: 640px) {
    .lp-nav-links { display: none; }
    .lp-hero { padding-top: 3rem; }
}

/* ============================================================================
   Legal pages (privacy / cookies / terms) — public, rendered from wwwroot/legal
   ============================================================================ */
.legal-wrap { max-width: 860px; margin: 0 auto; padding: 1.5rem; }
.legal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 0 1.5rem; border-bottom: 1px solid var(--jr-line); margin-bottom: 2rem; }
.legal-back { color: var(--jr-primary); text-decoration: none; font-size: .9rem; font-weight: 500; }
.legal-back:hover { text-decoration: underline; }
.legal-body { color: var(--jr-body); line-height: 1.6; }
.legal-body h1 { font-size: 1.8rem; color: var(--jr-ink); margin: 0 0 .5rem; }
.legal-body h2 { font-size: 1.25rem; color: var(--jr-ink); margin: 1.8rem 0 .6rem; }
.legal-body a { color: var(--jr-primary); word-break: break-word; }
.legal-body table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .9rem; }
.legal-body th, .legal-body td { border: 1px solid var(--jr-line); padding: .5rem .65rem; text-align: left; vertical-align: top; }
.legal-body th { background: var(--jr-surface); }

/* Skills "Show all / Show less" toggle (My Background read-only view) */
.bg-tags-more {
  margin-top: .6rem; background: none; border: none; padding: .15rem .25rem;
  color: var(--jr-primary); font-size: .85rem; font-weight: 600; cursor: pointer;
}
.bg-tags-more:hover { text-decoration: underline; }

/* ============================================================================
   Landing screenshots — browser-frame mockup (hero) + carousel ("A look inside")
   Images are native 1x crops displayed at (or below) their natural width, so the
   browser never upscales them — they stay crisp. max-width caps = the crop widths.
   ============================================================================ */
.lp-frame {
  display: block; width: 100%; padding: 0; text-align: inherit; font: inherit;
  border-radius: 12px; overflow: hidden; background: #fff;
  border: 1px solid var(--jr-line);
  box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .35), 0 8px 20px -8px rgba(15, 23, 42, .2);
}
.lp-frame-bar {
  display: flex; gap: 6px; align-items: center;
  padding: 9px 12px; background: #f1f3f7; border-bottom: 1px solid var(--jr-line);
}
.lp-frame-bar span { width: 11px; height: 11px; border-radius: 50%; background: #cdd3df; }
.lp-frame-bar span:nth-child(1) { background: #ff5f57; }
.lp-frame-bar span:nth-child(2) { background: #febc2e; }
.lp-frame-bar span:nth-child(3) { background: #28c840; }
.lp-frame img { display: block; width: 100%; height: auto; }

/* Hero: the board.png is 1278px native. The .lp-hero text column is only 880px,
   which would shrink (blur) the image. Break the shot OUT of that column to its
   native width (capped 1278px) so it displays ~1:1 — sharp, no downscale. */
.lp-hero-shot {
  margin: 2.5rem auto 0;
  /* match the carousel's effective slide width (1240px container − 3rem padding)
     so the hero isn't oversized; still well above the 880px text column. */
  width: min(1140px, calc(100vw - 3rem));
  max-width: 1140px;
  /* pull out of the 880px hero column and recenter on the viewport */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.lp-hero-shot .lp-frame img { image-rendering: -webkit-optimize-contrast; }

/* ============================================================================
   HERO VARIANTS — flip the class on .lp-hero-shot to compare. No tilt.
   A = baseline (no extra class)   B = hero-glow   C = hero-fade
   D = hero-split (handled in markup)   E = hero-stage
   ============================================================================ */

/* B — Glow + float: soft gradient glow behind a lifted, flat board */
.lp-hero-shot.hero-glow { margin-top: 3.5rem; }
.lp-hero-shot.hero-glow::before {
  content: ""; position: absolute; z-index: -1;
  inset: -10% -6% -2% -6%;
  background: radial-gradient(55% 55% at 50% 35%, rgba(99,102,241,.40), rgba(34,211,238,.20) 55%, transparent 78%);
  filter: blur(55px);
}
.lp-hero-shot.hero-glow .lp-frame {
  box-shadow: 0 50px 100px -35px rgba(15,23,42,.55), 0 20px 45px -20px rgba(15,23,42,.35);
}

/* C — Fade bottom: board peeks in, dissolving into the page. Fade begins higher
   (~45%) and runs longer for a softer, more gradual melt into the background. */
.lp-hero-shot.hero-fade .lp-frame {
  box-shadow: 0 40px 80px -30px rgba(15,23,42,.45);
  -webkit-mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
          mask-image: linear-gradient(to bottom, #000 45%, transparent 95%);
}

/* E — Gradient stage: board sits centered on a full-width colored panel.
   Breaks out of the 880px text column and recenters on the viewport. */
.lp-hero-stage {
  margin: 3rem 0 0; padding: 3.5rem clamp(1rem,5vw,4rem) 0;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: 22px 22px 0 0; overflow: hidden;
  width: min(1240px, calc(100vw - 2rem));
  position: relative; left: 50%; transform: translateX(-50%);
}
.lp-hero-stage .lp-frame {
  max-width: 1040px; margin: 0 auto; display: block;
  box-shadow: 0 -10px 60px -20px rgba(0,0,0,.4), 0 30px 60px -30px rgba(0,0,0,.5);
  border-radius: 12px 12px 0 0;
}

/* Sub-heading under section titles */
.lp-h2-sub { text-align: center; color: var(--jr-body); margin: -.5rem 0 2rem; }

.lp-slide-badge {
  display: inline-block; margin: 0 0 .9rem; padding: .35rem .9rem; border-radius: 999px;
  background: var(--jr-primary); color: #fff; font-size: .85rem; font-weight: 700; letter-spacing: .01em;
}

/* "A look inside" section heading is left-aligned (not centered like the other
   sections) and lined up with the showcase content width. */
#tour .lp-h2,
#tour .lp-h2-sub { text-align: left; max-width: 1140px; margin-left: auto; margin-right: auto; }

/* Feature showcase — STACKED blocks: centered caption above, full-width image
   below. Image gets max width (sharpest), caption sits right above it so the
   relationship is obvious. No awkward side-by-side gaps. */
.lp-showcase { max-width: 1140px; margin: 0 auto; display: flex; flex-direction: column; gap: 5rem; }
.lp-show-block { display: flex; flex-direction: column; }
.lp-show-head { text-align: center; max-width: 640px; margin: 0 auto 1.5rem; }
.lp-show-head h3 { font-size: 1.7rem; font-weight: 700; color: var(--jr-ink); margin: .5rem 0 .5rem; line-height: 1.2; }
.lp-show-head p { color: var(--jr-body); font-size: 1.05rem; line-height: 1.6; margin: 0; }
.lp-show-block .lp-frame { cursor: zoom-in; }
.lp-show-block .lp-frame img { display: block; width: 100%; height: auto; }

@media (max-width: 820px) {
  .lp-showcase { gap: 2.5rem; }
  .lp-show-head { margin-bottom: 0; }
  .lp-show-head h3 { font-size: 1.4rem; }
  /* Wide desktop screenshots are unreadable on phones — hide them; keep the
     benefit copy (which is what converts on mobile). Hero shot hidden too. */
  .lp-show-block .lp-frame,
  .lp-hero-shot { display: none; }
}

/* Hero shot is also clickable to expand */
.lp-hero-shot .lp-frame { cursor: zoom-in; }

/* Lightbox — JS-toggled (.open). Overlay fills the screen; the image scales to
   fill ~95% of it (up or down) while keeping aspect ratio, so it's always big
   and fully visible. Click anywhere / × / Esc closes. */
.lp-lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .9); padding: 2.5vh 2.5vw; cursor: zoom-out; text-decoration: none;
}
.lp-lightbox.open { display: flex; }
.lp-lightbox img {
  width: 95vw; height: 95vh; object-fit: contain;   /* fill the box, keep ratio */
  border-radius: 10px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.6);
}
.lp-lightbox-x {
  position: absolute; top: 16px; right: 24px; color: #fff; font-size: 2.2rem; line-height: 1;
  opacity: .9; z-index: 1; cursor: pointer;
}

/* ============================================================================
   Skills with proficiency (My Background) — edit rows + read-only chips
   ============================================================================ */
.skill-edit-list { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .75rem; max-width: 640px; }
.skill-edit-row { display: flex; align-items: center; gap: .5rem; }
.skill-edit-row .skill-name {
  flex: 1 1 auto; min-width: 0; padding: .4rem .6rem; border: 1px solid var(--jr-line);
  border-radius: 7px; font-size: .9rem;
}
.skill-edit-row .skill-level { flex: 0 0 132px; width: 132px; padding: .4rem .5rem; border-radius: 7px; font-size: .85rem; }
.skill-edit-row .skill-years { flex: 0 0 54px; width: 54px; padding: .4rem .35rem; border: 1px solid var(--jr-line); border-radius: 7px; font-size: .9rem; text-align: center; }
.skill-edit-row .skill-years-lbl { flex: 0 0 auto; color: var(--jr-muted); font-size: .78rem; }
.skill-edit-row .tag-x { flex: 0 0 auto; }
.skill-add { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; max-width: 640px; }
.skill-add .tag-entry { flex: 1 1 auto; padding: .45rem .6rem; border: 1px solid var(--jr-line); border-radius: 7px; }

/* Read-only chips: name + a small proficiency meta, tinted by level */
.skill-chip { display: inline-flex; align-items: baseline; gap: .35rem; }
.skill-chip .skill-meta { font-size: .72rem; font-weight: 600; opacity: .75; white-space: nowrap; }
.skill-chip.lvl-expert     { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.skill-chip.lvl-advanced   { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.skill-chip.lvl-proficient { background: #f5f3ff; border-color: #ddd6fe; color: #5b21b6; }
.skill-chip.lvl-familiar   { background: var(--jr-surface); }
.skill-chip.lvl-none       { background: var(--jr-surface); }

/* Skills read-only sort bar (clickable "headers") */
.skill-sort { display: flex; align-items: center; gap: .4rem; margin-bottom: .75rem; flex-wrap: wrap; }
.skill-sort-label { font-size: .78rem; font-weight: 600; color: var(--jr-muted); text-transform: uppercase; letter-spacing: .03em; margin-right: .15rem; }
.skill-sort-btn {
  background: var(--jr-surface); border: 1px solid var(--jr-line); border-radius: 999px;
  padding: .2rem .7rem; font-size: .8rem; font-weight: 600; color: var(--jr-body); cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.skill-sort-btn:hover { border-color: var(--jr-primary-tint-2); color: var(--jr-primary); }
.skill-sort-btn.active { background: var(--jr-primary); border-color: var(--jr-primary); color: #fff; }

/* ============================================================================
   Home dashboard (command center) — cards below the hero + tiles
   ============================================================================ */
.dash-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; margin-top: 1.5rem;
}
.dash-card {
  background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius);
  box-shadow: var(--jr-shadow); padding: 1.25rem 1.4rem;
}
.dash-top { grid-row: span 2; }       /* top matches column is taller */
.dash-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.dash-card-head h3 { font-size: 1rem; font-weight: 700; color: var(--jr-ink); margin: 0; display: flex; align-items: center; gap: .5rem; }
.dash-card-head h3 i { color: var(--jr-primary); }
.dash-link { font-size: .82rem; font-weight: 600; color: var(--jr-primary); white-space: nowrap; }
.dash-empty { color: var(--jr-muted); font-size: .9rem; margin: 0; }

/* Top matches */
.dash-matches { display: flex; flex-direction: column; gap: .5rem; }
.dash-match {
  display: flex; align-items: center; gap: .8rem; padding: .6rem .7rem; border-radius: 10px;
  border: 1px solid var(--jr-line); text-decoration: none; color: inherit; transition: border-color .12s, background .12s;
}
.dash-match:hover { border-color: var(--jr-primary-tint-2); background: var(--jr-surface); text-decoration: none; }
.dash-match-fit {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 800; font-size: .9rem;
}
.dash-match-fit.fit-strong { background: #ecfdf5; color: #065f46; }
.dash-match-fit.fit-good   { background: #eff6ff; color: #1e40af; }
.dash-match-fit.fit-ok     { background: #fffbeb; color: #92400e; }
.dash-match-fit.fit-low    { background: var(--jr-surface); color: var(--jr-muted); }
.dash-match-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.dash-match-title { font-weight: 600; color: var(--jr-ink); font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-match-sub { font-size: .8rem; color: var(--jr-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-match-status { flex: 0 0 auto; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--jr-body); background: var(--jr-surface); border-radius: 999px; padding: .2rem .55rem; }

/* Pipeline funnel — vertical bars */
.funnel { display: flex; align-items: flex-end; gap: .6rem; height: 150px; }
.funnel-stage { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: .35rem; height: 100%; justify-content: flex-end; }
.funnel-count { font-weight: 700; color: var(--jr-ink); font-size: .9rem; }
.funnel-bar { width: 100%; max-width: 42px; height: 90px; background: var(--jr-surface); border-radius: 6px; display: flex; align-items: flex-end; overflow: hidden; }
.funnel-fill { width: 100%; background: linear-gradient(180deg, var(--jr-primary), var(--jr-accent)); border-radius: 6px 6px 0 0; min-height: 3px; }
.funnel-label { font-size: .68rem; color: var(--jr-muted); text-align: center; }

/* Discovery activity + sparkline */
.dash-activity { font-size: .9rem; color: var(--jr-body); line-height: 1.5; margin: 0 0 .9rem; }
.dash-activity strong { color: var(--jr-ink); }
.sparkline { display: flex; align-items: flex-end; gap: 5px; height: 60px; }
.spark-bar { flex: 1 1 0; background: var(--jr-primary); border-radius: 3px 3px 0 0; min-height: 2px; opacity: .85; }
.sparkline-cap { display: flex; justify-content: space-between; margin-top: .4rem; font-size: .68rem; color: var(--jr-muted); }

/* Fit distribution — horizontal bars */
.fitdist { display: flex; flex-direction: column; gap: .55rem; }
.fitdist-row { display: flex; align-items: center; gap: .6rem; }
.fitdist-label { flex: 0 0 108px; font-size: .78rem; color: var(--jr-body); }
.fitdist-track { flex: 1 1 auto; height: 12px; background: var(--jr-surface); border-radius: 6px; overflow: hidden; }
.fitdist-fill { display: block; height: 100%; border-radius: 6px; min-width: 0; }
.fitdist-fill.fill-strong { background: #10b981; }
.fitdist-fill.fill-good   { background: #3b82f6; }
.fitdist-fill.fill-ok     { background: #f59e0b; }
.fitdist-fill.fill-possible { background: #a78bfa; }
.fitdist-fill.fill-low    { background: #cbd5e1; }
.fitdist-count { flex: 0 0 auto; font-size: .8rem; font-weight: 700; color: var(--jr-ink); width: 22px; text-align: right; }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-top { grid-row: auto; }
}

/* ===== Job detail page (/jobs/{id}) =====
   This app links only the global app.css (no scoped .razor.css bundle), so the
   detail page's layout lives here. It reuses global primitives (.detail-card,
   .field, .fit, .doc-chip, .btn-jr) and adds the page shell, header, the
   document-choice segmented control, and 20px gaps between the stacked cards. */
.detail-page { max-width: 1100px; margin: 0 auto; }

.back-link {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .85rem; font-weight: 600; color: var(--jr-muted);
  margin-bottom: 1rem; text-decoration: none;
}
.back-link:hover { color: var(--jr-primary); }

.job-loading { display: flex; align-items: center; gap: .5rem; color: var(--jr-muted); padding: 2rem 0; }

.not-found { text-align: center; padding: 2.5rem 1rem; }
.not-found h2 { margin: 0 0 .35rem; }
.not-found .btn-jr { margin-top: 1rem; }

/* Header: fit badge + title/company, with the status dropdown pinned right. */
.job-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; margin-bottom: 20px; flex-wrap: wrap;
}
.job-head-main { display: flex; align-items: flex-start; gap: .85rem; }
.job-title { margin: 0; font-size: 1.4rem; line-height: 1.25; }
.job-title a { color: var(--jr-heading, inherit); text-decoration: none; }
.job-title a:hover { color: var(--jr-primary); }
.job-title .bi { font-size: .8rem; opacity: .55; }
.job-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: .4rem;
  margin-top: .3rem; color: var(--jr-muted); font-size: .9rem;
}
.job-meta .company { font-weight: 600; color: var(--jr-body); }
.src-tag { font-size: .78rem; color: var(--jr-muted); }
.job-head .fit { font-size: 1rem; min-width: 2.4rem; text-align: center; }
.job-head-status { display: flex; flex-direction: column; gap: .3rem; min-width: 12rem; }

/* 20px between the stacked cards on this page. */
.why-card { margin-bottom: 20px; }
.why-card .why { color: var(--jr-body); margin: 0; max-width: 90ch; line-height: 1.55; font-size: .9rem; }

/* Generate-documents and Edit-job cards stack full-width, 20px apart. */
.detail-stack { display: flex; flex-direction: column; gap: 20px; }

/* Generate documents reads as a compact horizontal toolbar: base resume + what to
   generate + the action button on one row (wraps on narrow screens). */
.gen-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .85rem; }
.gen-row .field { flex: 1 1 16rem; min-width: 12rem; }
.gen-row .gen-btn { flex: 0 0 auto; height: 2.55rem; white-space: nowrap; }
@media (max-width: 640px) {
  .gen-row .field, .gen-row .gen-btn { flex: 1 1 100%; }
  .gen-row .gen-btn { justify-content: center; }
}

.doc-list-block { margin-top: .25rem; display: flex; flex-direction: column; gap: .4rem; }

/* The job description is the most-read field — give it a roomy, legible editor.
   Scoped under .field to beat the base ".field textarea" rule's specificity. */
.field textarea.jd-textarea {
  min-height: 22rem; line-height: 1.6; font-size: .92rem;
  font-family: ui-monospace, "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  white-space: pre-wrap;
}

/* The edit card is now full-width, so its fields lay out in three responsive columns. */
.jd-edit .jd-field-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 820px) { .jd-edit .jd-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .jd-edit .jd-field-grid { grid-template-columns: 1fr; } }

/* Re-score checkbox in the edit card. */
.rescore-chk {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  font-size: .85rem; color: var(--jr-body); cursor: pointer; margin: .25rem 0;
}
.rescore-chk input { accent-color: var(--jr-primary); width: 16px; height: 16px; }
.field-hint.inline { display: inline; margin-left: .15rem; }

@media (max-width: 700px) {
  .job-head-status { min-width: 100%; }
}

/* ===== Admin · Users — global discovery mode control ===== */
.disco-mode-card { margin-bottom: 1rem; }
.disco-mode-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.disco-mode-head .field-hint { max-width: 70ch; margin-top: .35rem; }

.disco-mode-opts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .25rem; }
.disco-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: .15rem;
  flex: 1 1 12rem; min-width: 10rem; padding: .65rem .8rem; cursor: pointer;
  background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: 10px;
  text-align: left; transition: background .12s, border-color .12s, color .12s;
}
.disco-opt .bi { color: var(--jr-primary); font-size: 1rem; }
.disco-opt-label { font-weight: 700; font-size: .9rem; }
.disco-opt-desc { font-size: .78rem; color: var(--jr-muted); }
.disco-opt:hover:not(:disabled) { border-color: var(--jr-primary-tint-2); background: var(--jr-primary-tint); }
.disco-opt.active { background: var(--jr-primary); border-color: var(--jr-primary); color: #fff; }
.disco-opt.active .bi, .disco-opt.active .disco-opt-desc { color: #fff; }
.disco-opt:disabled { opacity: .6; cursor: progress; }

/* The per-user discovery switch sits inline with a short "why off" reason. */
.disco-hint { margin-left: .5rem; vertical-align: middle; font-style: italic; }

/* Compact role dropdown inside the users table. */
.select-wrap-sm { display: inline-block; min-width: 7.5rem; }
.select-wrap-sm .field-select { padding: .3rem 1.8rem .3rem .55rem; font-size: .82rem; }

/* Per-user feature-permission checkboxes in the users table. */
.perm-list { display: flex; flex-direction: column; gap: .3rem; }
.perm-chk { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--jr-body); cursor: pointer; }
.perm-chk input { accent-color: var(--jr-primary); width: 15px; height: 15px; }

/* Dev-only build badge — bottom-right corner; confirms the running binary's build time. */
.dev-build-badge {
    position: fixed;
    right: 10px;
    bottom: 10px;
    z-index: 9999;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .55rem;
    font-size: .72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: #cbd5e1;
    background: rgba(15, 23, 42, .82);
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 6px;
    pointer-events: none;
    user-select: none;
    opacity: .85;
}
.dev-build-badge i { color: #fbbf24; }

/* Live scrape-cache populate progress (dev) — terminal-style step log. */
.scrape-progress {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: .85rem 1rem;
    margin: .5rem 0 1.25rem;
    box-shadow: 0 4px 14px rgba(2, 6, 23, .25);
}
.scrape-progress-head {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #e2e8f0;
    font-size: .95rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid #1e293b;
}
.scrape-progress-head .ok { color: #34d399; }
.scrape-progress-head .scrape-progress-count {
    margin-left: auto;
    font-size: .72rem;
    color: #94a3b8;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.scrape-progress .spin {
    width: 14px; height: 14px;
    border: 2px solid #334155; border-top-color: #818cf8;
    border-radius: 50%;
    display: inline-block;
    animation: scrape-spin .7s linear infinite;
}
@keyframes scrape-spin { to { transform: rotate(360deg); } }

.scrape-steps {
    list-style: none;
    margin: .55rem 0 0;
    padding: 0;
    max-height: 260px;
    overflow-y: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .78rem;
    line-height: 1.5;
}
.scrape-steps .step {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .15rem .2rem;
    color: #cbd5e1;
    border-radius: 4px;
}
.scrape-steps .step i { font-size: .8rem; flex: 0 0 auto; width: 1rem; text-align: center; color: #64748b; }
.scrape-steps .step-search { color: #93c5fd; }
.scrape-steps .step-search i { color: #60a5fa; }
/* The search icons spin ONLY while the run is in progress — once "Scrape complete",
   every line is historical, so they must stop (otherwise it looks like it's still running). */
.scrape-progress.is-running .scrape-steps .step-search i { animation: scrape-spin 1.1s linear infinite; }
.scrape-steps .step-found { color: #6ee7b7; }
.scrape-steps .step-found i { color: #34d399; }
.scrape-steps .step-term { color: #e2e8f0; font-weight: 600; margin-top: .25rem; }
.scrape-steps .step-term i { color: #a5b4fc; }
.scrape-steps .step-fail { color: #fca5a5; background: rgba(239, 68, 68, .08); }
.scrape-steps .step-fail i { color: #f87171; animation: none; }

.scrape-progress-done {
    margin-top: .7rem;
    padding-top: .6rem;
    border-top: 1px solid #1e293b;
    font-size: .85rem;
    color: #a7f3d0;
    font-weight: 600;
}

/* Admin: cross-user scrape sweep trigger row. */
.scrape-sweep-row { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; flex-wrap: wrap; }
.scrape-sweep-note { font-size: .85rem; color: var(--jr-body, #334155); }

/* Admin Function runs page — status badges. */
.fn-status { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.fn-status.fn-running   { background: #fef3c7; color: #92400e; }
.fn-status.fn-completed { background: #d1fae5; color: #065f46; }
.fn-status.fn-failed    { background: #fee2e2; color: #991b1b; }
.fn-error { color: #b91c1c; font-size: .8rem; }

/* Recent runs — expandable per-run details (provider breakdown + counts). */
.run-detail-row > td { background: #f8fafc; padding: 0; }
.run-detail { padding: .85rem 1.1rem; border-left: 3px solid var(--jr-primary, #6366f1); }
.run-detail-stats { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: var(--jr-body, #334155); margin-bottom: .6rem; }
.run-detail-stats strong { color: var(--jr-ink, #0f172a); }
.run-detail-error { color: #b91c1c; font-size: .82rem; margin-bottom: .6rem; }

/* Recent runs — per-source breakdown table (replaces the hard-to-read dark log). */
.run-detail-log-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--jr-muted, #64748b); margin: .3rem 0 .4rem; }
.run-sources { width: 100%; border-collapse: collapse; font-size: .82rem; background: #fff; border: 1px solid var(--jr-border, #e2e8f0); border-radius: 8px; overflow: hidden; }
.run-sources thead th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--jr-muted, #64748b); padding: .45rem .7rem; background: #f1f5f9; border-bottom: 1px solid var(--jr-border, #e2e8f0); }
.run-sources th.num, .run-sources td.num { text-align: right; font-variant-numeric: tabular-nums; }
.run-sources td { padding: .42rem .7rem; border-bottom: 1px solid #f1f5f9; color: var(--jr-body, #334155); }
.run-sources tr:last-child td { border-bottom: none; }
.run-sources tr.src-fetched td:first-child { font-weight: 600; color: var(--jr-ink, #0f172a); }
.src-tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; font-weight: 600; padding: .1rem .45rem; border-radius: 999px; }
.src-tag-fetched { background: #d1fae5; color: #065f46; }
.src-tag-skipped { background: #fef3c7; color: #92400e; }
.src-tag-nokey   { background: #e0e7ff; color: #3730a3; }
.src-tag-error   { background: #fee2e2; color: #991b1b; }

/* Target-titles cap counter + full state. */
.field-cap { font-size: .72rem; font-weight: 600; color: var(--jr-muted, #64748b); margin-left: .4rem; }
.tag-input.is-full { opacity: .95; }

/* ===== Cookie-consent banner (public marketing site only) ===== */
.consent-banner {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1080;
    background: var(--jr-card, #fff);
    border-top: 1px solid var(--jr-line, #e2e8f0);
    box-shadow: 0 -4px 16px rgba(15,23,42,.10);
}
.consent-inner {
    max-width: 1100px; margin: 0 auto; padding: .9rem 1.2rem;
    display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap;
}
.consent-copy { flex: 1 1 360px; font-size: .85rem; color: var(--jr-body, #334155); line-height: 1.5; }
.consent-copy strong { color: var(--jr-ink, #0f172a); }
.consent-copy a { color: var(--jr-primary, #4f46e5); text-decoration: underline; }
.consent-actions { display: flex; gap: .6rem; flex: 0 0 auto; }
.consent-actions .btn { font-size: .85rem; padding: .45rem 1rem; }
.consent-decline { border: 1px solid var(--jr-line, #e2e8f0); }
@media (max-width: 560px) {
    .consent-actions { width: 100%; }
    .consent-actions .btn { flex: 1; }
}

/* ===== Web Analytics dashboard (professional redesign) ===== */
/* Page header: title block left, time-window control right (segmented dropdown). */
.wa-head { align-items: flex-end; }
.wa-window { display: inline-flex; align-items: center; gap: .5rem; background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius-sm); padding: .15rem .15rem .15rem .65rem; box-shadow: var(--jr-shadow); }
.wa-window-ico { color: var(--jr-muted); font-size: .95rem; }
.wa-window .filter-select { border: none; box-shadow: none; background: transparent; font-weight: 600; color: var(--jr-ink); padding: .35rem 1.8rem .35rem .25rem; }
.wa-window .filter-select:focus { box-shadow: none; }

/* GTM-not-configured notice — calm info banner, not an error. */
.wa-notice { display: flex; align-items: flex-start; gap: .6rem; background: var(--jr-primary-tint); border: 1px solid var(--jr-primary-tint-2); color: var(--jr-body); border-radius: var(--jr-radius); padding: .75rem .9rem; font-size: .86rem; margin-bottom: 1.2rem; }
.wa-notice .bi { color: var(--jr-primary); font-size: 1rem; flex: 0 0 auto; margin-top: .05rem; }
.wa-notice code { background: rgba(79,70,229,.1); color: var(--jr-primary-700); padding: .05rem .35rem; border-radius: 5px; }

.wa-loading { padding: 2rem 0; display: flex; align-items: center; gap: .5rem; }
.wa-loading .spin { display: inline-block; animation: wa-spin 1s linear infinite; }
@keyframes wa-spin { to { transform: rotate(360deg); } }

/* ── KPI cards ─────────────────────────────────────────────────────────── */
.wa-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.wa-card {
    position: relative; background: var(--jr-card); border: 1px solid var(--jr-line);
    border-radius: var(--jr-radius); padding: 1.1rem 1.15rem 1rem; box-shadow: var(--jr-shadow);
    display: flex; flex-direction: column; gap: .45rem; overflow: hidden;
    transition: transform .15s ease, box-shadow .15s ease;
}
.wa-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--jr-line); }
.wa-card:hover { transform: translateY(-2px); box-shadow: var(--jr-shadow-md); }
.wa-card-top { display: flex; align-items: center; gap: .55rem; }
.wa-card .wa-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .045em; color: var(--jr-muted); font-weight: 600; }
.wa-card .wa-num { font-size: 1.85rem; font-weight: 700; color: var(--jr-ink); line-height: 1.05; font-variant-numeric: tabular-nums; }
.wa-card .wa-sub { font-size: .76rem; color: var(--jr-muted); display: flex; align-items: center; gap: .3rem; }
.wa-chip { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; font-size: .95rem; flex: 0 0 auto; }
.wa-chip-indigo { background: var(--jr-primary-tint); color: var(--jr-primary); }
.wa-chip-cyan   { background: #cffafe; color: #0891b2; }
.wa-chip-violet { background: #ede9fe; color: #7c3aed; }
.wa-chip-green  { background: var(--jr-good-bg); color: var(--jr-good); }
.wa-chip-light  { background: rgba(255,255,255,.2); color: #fff; }
/* Feature card: indigo gradient hero for the headline metric. */
.wa-card-feature { background: linear-gradient(135deg, var(--jr-primary), var(--jr-primary-700)); border: none; }
.wa-card-feature::before { background: var(--jr-accent); }
.wa-card-feature .wa-label, .wa-card-feature .wa-sub { color: rgba(255,255,255,.82); }
.wa-card-feature .wa-num { color: #fff; }

/* ── Panels (chart + tables share the surface) ────────────────────────── */
.wa-panel { background: var(--jr-card); border: 1px solid var(--jr-line); border-radius: var(--jr-radius); box-shadow: var(--jr-shadow); padding: 1.1rem 1.2rem 1.2rem; margin-bottom: 1.4rem; }
.wa-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.wa-panel-title { font-size: 1rem; font-weight: 700; color: var(--jr-ink); margin: 0; display: flex; align-items: center; gap: .5rem; }
.wa-panel-title .bi { color: var(--jr-primary); font-size: 1.05rem; }
.wa-panel-count { font-size: .74rem; color: var(--jr-faint); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.wa-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 1.4rem; align-items: start; }
.wa-grid-2 .wa-panel { margin-bottom: 0; }
.wa-foot { margin-top: 1.4rem; }

/* ── Chart: grouped views/visitors bars with gridlines + hover tooltips ── */
.wa-legend { display: flex; gap: 1rem; }
.wa-legend-item { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; color: var(--jr-muted); font-weight: 500; }
.wa-swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.wa-swatch-hits { background: var(--jr-primary); }
.wa-swatch-visitors { background: var(--jr-accent); }
.wa-chart-wrap { display: flex; gap: .6rem; }
.wa-yaxis { display: flex; flex-direction: column; justify-content: space-between; height: 190px; padding: 2px 0 18px; }
.wa-ytick { font-size: .66rem; color: var(--jr-faint); font-variant-numeric: tabular-nums; text-align: right; line-height: 1; }
.wa-plot { position: relative; flex: 1; min-width: 0; }
.wa-gridlines { position: absolute; left: 0; right: 0; top: 2px; height: 170px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.wa-gridline { border-top: 1px solid var(--jr-line-soft); height: 0; }
.wa-chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 2px; position: relative; overflow-x: auto; overflow-y: visible; }
.wa-bar-col { flex: 1 0 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; outline: none; }
.wa-bars { display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 100%; height: 170px; }
.wa-bar { width: 45%; max-width: 16px; min-height: 0; border-radius: 4px 4px 0 0; transition: filter .15s ease; }
.wa-bar-hits { background: linear-gradient(180deg, var(--jr-primary), #6366f1); }
.wa-bar-visitors { background: linear-gradient(180deg, var(--jr-accent), #22d3ee); }
.wa-bar-x { font-size: .62rem; color: var(--jr-faint); margin-top: .35rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wa-bar-col:hover .wa-bar, .wa-bar-col:focus-visible .wa-bar { filter: brightness(1.08) saturate(1.1); }
.wa-bar-col:focus-visible { outline: 2px solid var(--jr-primary-tint-2); outline-offset: 2px; border-radius: 4px; }
/* Tooltip (CSS-only, shows on hover/focus). */
.wa-tip {
    position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
    background: var(--jr-ink); color: #fff; border-radius: 8px; padding: .5rem .65rem; min-width: 132px;
    display: flex; flex-direction: column; gap: .2rem; font-size: .72rem; line-height: 1.3;
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .15s ease, transform .15s ease;
    box-shadow: var(--jr-shadow-md); z-index: 20;
}
.wa-tip::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--jr-ink); }
.wa-bar-col:hover .wa-tip, .wa-bar-col:focus-visible .wa-tip { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.wa-tip-date { font-weight: 700; margin-bottom: .1rem; }
.wa-tip-row { display: flex; align-items: center; gap: .4rem; color: rgba(255,255,255,.9); font-variant-numeric: tabular-nums; }

/* ── Tables: in-cell magnitude bar, tabular numerics, emphasized label ── */
.wa-table { width: 100%; }
.wa-table .wa-num-col { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; }
.wa-table thead th.wa-num-col { text-align: right; }
.wa-rank-cell { position: relative; max-width: 0; }
.wa-bar-bg { position: absolute; left: 0; top: 4px; bottom: 4px; width: var(--w, 0%); background: var(--jr-primary-tint); border-radius: 5px; z-index: 0; }
.wa-rank-label { position: relative; z-index: 1; display: flex; align-items: baseline; gap: .15rem; color: var(--jr-ink); font-weight: 600; min-width: 0; }
.wa-rank-label > .bi { color: var(--jr-primary); flex: 0 0 auto; }
.wa-rank-label strong { color: var(--jr-ink); }
.wa-rank-label, .wa-rank-label strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-utm-meta { color: var(--jr-muted); font-weight: 400; font-size: .8rem; margin-left: .4rem; }
.wa-table tbody tr:hover .wa-bar-bg { background: var(--jr-primary-tint-2); }

@media (max-width: 720px) {
    .wa-grid-2 { grid-template-columns: 1fr; }
    .wa-grid-2 .wa-panel { margin-bottom: 1.4rem; }
    .wa-yaxis { display: none; }
}

/* ===== Visitor drill-down (admin) — id header + vertical timeline ===== */
.vd-id { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: .6rem 0 1rem; }
.vd-vid { font-size: 1rem; background: var(--jr-primary-tint, #eef2ff); color: var(--jr-primary-700, #3730a3); padding: .15rem .5rem; border-radius: var(--jr-radius-sm, 7px); }
.wa-card .wa-num.vd-small-num { font-size: 1.05rem; }

.vd-timeline { list-style: none; margin: 0; padding: 0 0 0 .4rem; position: relative; }
.vd-timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: var(--jr-line, #e2e8f0); }
.vd-tl-item { position: relative; padding: 0 0 1.1rem 1.5rem; }
.vd-tl-item:last-child { padding-bottom: 0; }
.vd-tl-dot { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--jr-card, #fff); border: 2px solid var(--jr-primary, #4f46e5); }
.vd-tl-body { background: var(--jr-card, #fff); border: 1px solid var(--jr-line, #e2e8f0); border-radius: var(--jr-radius, 10px); padding: .55rem .8rem; }
.vd-tl-row { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.vd-tl-row .vd-path { color: var(--jr-ink, #0f172a); }
.vd-tl-row .vd-time { white-space: nowrap; }
.vd-tl-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .3rem; }

/* ===== Google Analytics panel (on the Web Analytics dashboard) ===== */
.wa-ga-head { display: flex; align-items: center; gap: .8rem; margin: 2.2rem 0 .2rem; padding-top: 1.4rem; border-top: 1px solid var(--jr-line, #e2e8f0); }
.wa-section-h { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; font-weight: 700; color: var(--jr-ink, #0f172a); margin: 0; }
.wa-ga-logo { width: 22px; height: 22px; }
.wa-ga-tag { font-size: .72rem; font-weight: 600; color: var(--jr-muted, #64748b); background: var(--jr-hover, #f1f5f9); padding: .2rem .55rem; border-radius: 999px; }
.wa-ga-cards { margin-top: 1rem; }
.wa-ic.ga { background: linear-gradient(135deg, #f9ab00 0%, #e37400 100%); }   /* GA amber */
.wa-ga-notice { margin-top: 1rem; }

/* ===== Pro upsell banner (Job sources page) ===== */
/* Premium SaaS upgrade card — deep dark indigo layered-gradient surface mirroring the
   landing hero CTA (near-black #111827 -> #1e1b4b -> #312e81 with soft cyan/violet glows),
   a glass hairline edge, refined multi-layer shadow, and a slow ambient glow drift. */
.pro-upsell {
    position: relative; overflow: hidden; isolation: isolate;
    display: flex; align-items: center; gap: 2rem; flex-wrap: wrap;
    background:
        radial-gradient(900px 320px at 85% -10%, rgba(6,182,212,.20), transparent 60%),
        radial-gradient(700px 300px at 10% 110%, rgba(79,70,229,.28), transparent 60%),
        linear-gradient(135deg, #111827 0%, #1e1b4b 60%, #312e81 100%);
    color: #fff; border-radius: 20px; padding: 2.1rem 2.3rem; margin: 1rem 0 1.4rem;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow:
        0 1px 0 rgba(255,255,255,.06) inset,
        0 18px 50px -12px rgba(17,24,39,.65),
        0 8px 24px -8px rgba(49,46,129,.45);
    transition: transform .25s ease, box-shadow .25s ease;
}
.pro-upsell:hover {
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255,255,255,.08) inset,
        0 24px 60px -12px rgba(17,24,39,.7),
        0 10px 28px -8px rgba(49,46,129,.55);
}
/* Slow ambient cyan glow that drifts across the card — classy, not flashy. */
.pro-upsell-glow {
    position: absolute; top: -45%; right: -8%; width: 440px; height: 440px; z-index: -1;
    background: radial-gradient(circle, rgba(6,182,212,.22) 0%, rgba(99,102,241,.12) 45%, transparent 70%);
    pointer-events: none; filter: blur(6px);
    animation: proUpsellGlow 14s ease-in-out infinite alternate;
}
@keyframes proUpsellGlow {
    from { transform: translate(0, 0) scale(1); opacity: .85; }
    to   { transform: translate(-40px, 24px) scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .pro-upsell-glow { animation: none; } .pro-upsell { transition: none; } }
.pro-upsell-body { flex: 1 1 460px; position: relative; z-index: 1; }
.pro-upsell-kicker {
    display: inline-flex; align-items: center; gap: .45rem; font-size: .7rem;
    font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #c7d2fe;
    background: rgba(99,102,241,.22); border: 1px solid rgba(165,180,252,.30);
    padding: .3rem .7rem; border-radius: 999px;
}
.pro-upsell-kicker i { color: #67e8f9; font-size: .85rem; }
.pro-upsell-title {
    font-size: clamp(1.6rem, 1.3rem + 1.2vw, 1.9rem); font-weight: 800; line-height: 1.18;
    letter-spacing: -.01em; margin: .85rem 0 .5rem; color: #fff;
}
.pro-upsell-sub { font-size: .94rem; line-height: 1.6; color: rgba(255,255,255,.8); max-width: 62ch; margin: 0 0 1.25rem; }
.pro-upsell-sub strong { color: #fff; font-weight: 600; }
.pro-upsell-points {
    list-style: none; padding: 0; margin: 0; display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.6rem;
}
.pro-upsell-points li {
    font-size: .88rem; line-height: 1.45; color: rgba(255,255,255,.82);
    display: flex; align-items: flex-start; gap: .6rem;
}
.pro-upsell-points li i {
    flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
    width: 1.6rem; height: 1.6rem; margin-top: -.05rem; border-radius: 8px;
    color: #67e8f9; font-size: .85rem;
    background: rgba(6,182,212,.14); border: 1px solid rgba(103,232,249,.22);
}
.pro-upsell-points strong { color: #fff; font-weight: 600; }
.pro-upsell-cta {
    position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center;
    gap: .6rem; flex: 0 0 auto; align-self: center;
}
.pro-upsell-cta .btn-jr.primary {
    background: #fff; color: var(--jr-primary, #4f46e5); border: none; font-weight: 700;
    box-shadow: 0 8px 22px -6px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.2) inset;
    white-space: nowrap; transition: transform .12s ease, box-shadow .15s ease, background .12s ease;
}
.pro-upsell-cta .btn-jr.primary:hover {
    background: #f8fafc; transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.3) inset;
}
.pro-upsell-fineprint {
    display: inline-flex; align-items: center; gap: .35rem;
    font-size: .74rem; color: rgba(255,255,255,.65);
}
.src-locked-note { margin: .2rem 0 .6rem; }
.src-included { font-size: .72rem; font-weight: 600; color: var(--jr-good, #16a34a); }

/* Named premium-source highlights inside the upsell — glass chips on the dark surface. */
.pro-upsell-sources { margin-top: 1.6rem; padding-top: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.pro-upsell-sources-label {
    display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: rgba(165, 243, 252, .85); margin-bottom: .65rem;
}
.pro-upsell-chips { display: flex; flex-direction: column; gap: .55rem; }
.pro-upsell-chip {
    display: flex; align-items: flex-start; gap: .65rem;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px; padding: .7rem .8rem;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.pro-upsell-chip:hover {
    background: rgba(255, 255, 255, .1); border-color: rgba(6, 182, 212, .4); transform: translateY(-1px);
}
.pro-upsell-chip-ic {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 9px; margin-top: .1rem;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
    background: rgba(6, 182, 212, .16); border: 1px solid rgba(6, 182, 212, .35); color: #a5f3fc;
}
.pro-upsell-chip-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.pro-upsell-chip-name { font-size: .85rem; font-weight: 700; color: #fff; }
.pro-upsell-chip-desc { font-size: .73rem; color: rgba(255, 255, 255, .68); line-height: 1.35; }

@media (max-width: 640px) {
    .pro-upsell { padding: 1.5rem 1.4rem; gap: 1.4rem; border-radius: 16px; }
    .pro-upsell-title { font-size: 1.35rem; }
    .pro-upsell-points { grid-template-columns: 1fr; gap: .6rem; }
    .pro-upsell-cta { width: 100%; align-items: stretch; }
    .pro-upsell-cta .btn-jr.primary { justify-content: center; }
    .pro-upsell-fineprint { justify-content: center; }
}
