/* Skill Matrix design tokens.
   One set of tokens drives the page and the charts (app.js reads them with
   getComputedStyle), so light and dark mode stay in step. The categorical chart
   colors live in app.js and were validated for colorblind separation against
   both card surfaces below. */

@font-face {
    font-family: "Inter";
    src: url("fonts/inter-latin-wght-normal.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --page: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #f7f9fb;
    --surface-3: #eef1f5;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.18);
    --gridline: #e8ecf1;
    --axis: #cbd2dc;
    --accent: #0f172a;
    --accent-ink: #ffffff;
    --focus: #2a78d6;
    --brand-blue: #005293;
    --brand-yellow: #fecb00;
    --good: #0f8a5f;
    --bad: #c2410c;
    --tooltip-bg: #0f172a;
    --tooltip-ink: #f8fafc;
    /* Job titles: one hue, used for their bars, sparklines and the heatmap scale. */
    --title: #6250d6;
    --title-ink: #ffffff;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px -4px rgba(15, 23, 42, 0.10);

    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* type scale (1.2 ratio) */
    --fs-xs: 0.75rem;
    --fs-sm: 0.8125rem;
    --fs-base: 0.9375rem;
    --fs-md: 1rem;
    --fs-lg: 1.125rem;
    --fs-xl: 1.5rem;
    --fs-display: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);

    --radius-sm: 8px;
    --radius: 14px;
    --content: 1200px;
    --gutter: clamp(1rem, 3vw, 2rem);
}

/* Dark mode: follows the OS unless the viewer picked light with the toggle. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --page: #0b0f15;
        --surface: #121821;
        --surface-2: #161d28;
        --surface-3: #1d2532;
        --text-primary: #e8edf4;
        --text-secondary: #a9b3c1;
        --text-muted: #8591a3;
        --border: rgba(255, 255, 255, 0.07);
        --border-strong: rgba(255, 255, 255, 0.18);
        --gridline: #212a36;
        --axis: #333d4b;
        --accent: #e8edf4;
        --accent-ink: #0b0f15;
        --focus: #3987e5;
        --good: #34c08b;
        --bad: #f08a5d;
        --tooltip-bg: #e8edf4;
        --tooltip-ink: #0b0f15;
        --title: #9085e9;
        --title-ink: #0b0f15;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.5);
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --page: #0b0f15;
    --surface: #121821;
    --surface-2: #161d28;
    --surface-3: #1d2532;
    --text-primary: #e8edf4;
    --text-secondary: #a9b3c1;
    --text-muted: #8591a3;
    --border: rgba(255, 255, 255, 0.07);
    --border-strong: rgba(255, 255, 255, 0.18);
    --gridline: #212a36;
    --axis: #333d4b;
    --accent: #e8edf4;
    --accent-ink: #0b0f15;
    --focus: #3987e5;
    --good: #34c08b;
    --bad: #f08a5d;
    --tooltip-bg: #e8edf4;
    --tooltip-ink: #0b0f15;
    --title: #9085e9;
    --title-ink: #0b0f15;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px -6px rgba(0, 0, 0, 0.5);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 8rem;
}

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

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.55;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    background-color: var(--page);
    color: var(--text-primary);
}

a {
    color: inherit;
}

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

/* ---------- Top bar ---------- */

.topbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: var(--content);
    margin: 0 auto;
    padding: 0.75rem var(--gutter);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: var(--fs-md);
    letter-spacing: -0.01em;
    text-decoration: none;
}

/* A small nod to the Swedish flag: blue square, yellow cross. */
.brand-mark {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background:
        linear-gradient(var(--brand-yellow), var(--brand-yellow)) 7px 0 / 4px 100% no-repeat,
        linear-gradient(var(--brand-yellow), var(--brand-yellow)) 0 9px / 100% 4px no-repeat,
        var(--brand-blue);
}

.topnav {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.topnav a {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.topnav a:hover {
    color: var(--text-primary);
    background-color: var(--surface-3);
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Show the icon of the mode you'd switch to. */
.icon-sun { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-sun { display: block; }
    :root:not([data-theme="light"]) .icon-moon { display: none; }
}
:root[data-theme="dark"] .icon-sun { display: block; }
:root[data-theme="dark"] .icon-moon { display: none; }

@media (max-width: 760px) {
    .topnav { display: none; }
    .icon-button { margin-left: auto; }
}

/* ---------- Page & hero ---------- */

.page {
    padding-bottom: 4rem;
}

.hero {
    max-width: var(--content);
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 2rem;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 2px;
    background-color: var(--brand-yellow);
    border-radius: 2px;
}

h1 {
    max-width: 22ch;
    margin: 0 0 1rem;
    font-size: var(--fs-display);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.lede {
    max-width: 62ch;
    margin: 0;
    font-size: var(--fs-lg);
    line-height: 1.6;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 1.5rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--accent-ink);
    background-color: var(--accent);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: transform 0.15s ease;
}

.hero-cta::after { content: "↓"; }
.hero-cta:hover { transform: translateY(-1px); }
.hero-cta:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.hero-cta-note {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin: 2.5rem 0 0;
    background-color: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.kpi {
    min-width: 0;
    padding: 1.125rem 1.25rem;
    background-color: var(--surface);
}

.kpi dt {
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-muted);
}

.kpi dd {
    margin: 0.25rem 0 0;
    font-size: var(--fs-xl);
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi dd small {
    margin-left: 0.375rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0;
    color: var(--text-secondary);
}

@media (max-width: 760px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Wide screens: headline on the left, the four KPI tiles as a 2x2 block on the right. */
@media (min-width: 1000px) {
    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
        gap: 3rem;
        align-items: center;
    }
    .hero .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 0;
    }
    .hero .kpi { padding: 1.375rem 1.5rem; }
}

/* ---------- Sticky filter bar ---------- */

.toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: color-mix(in srgb, var(--page) 85%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}

.toolbar-inner {
    max-width: var(--content);
    margin: 0 auto;
    padding: 0.75rem var(--gutter);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.875rem;
}

.toolbar-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.timestamp {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-xs);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.timestamp::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--good);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent);
}

@media (max-width: 600px) {
    /* On phones the wrapped filter row would eat too much of the screen if it stuck. */
    .toolbar { position: static; }
    .toolbar-label { display: none; }
    .timestamp { margin-left: 0; width: 100%; }
    .section-head { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; }
}

/* ---------- Pills (location filter, category tabs, buttons) ---------- */

.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.location-pill {
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    line-height: 1.2;
    color: var(--text-secondary);
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    padding: 0.4375rem 0.875rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.location-pill:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.location-pill-active,
.location-pill-active:hover {
    color: var(--accent-ink);
    background-color: var(--accent);
    border-color: var(--accent);
}

/* Category switch inside the history card: a segmented control. */
.pill-group-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: 1.25rem;
    background-color: var(--surface-3);
    border-radius: 999px;
}

.pill-group-tabs .location-pill {
    border-color: transparent;
    background-color: transparent;
}

.pill-group-tabs .location-pill-active {
    color: var(--text-primary);
    background-color: var(--surface);
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
}

@media (max-width: 600px) {
    /* Four tabs don't fit a phone: let them wrap onto a second row. */
    .pill-group-tabs { display: flex; flex-wrap: wrap; border-radius: 18px; }
    .pill-group-tabs .location-pill {
        flex: 1 1 auto;
        padding-inline: 0.5rem;
        font-size: var(--fs-xs);
        white-space: nowrap;
    }
}

/* ---------- Sections & cards ---------- */

.section {
    max-width: var(--content);
    margin: 0 auto;
    padding: 3.5rem var(--gutter) 0;
}

.section-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 1.5rem;
}

.section-kicker {
    margin: 0;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.section-head h2 {
    margin: 0 0 0.375rem;
    font-size: var(--fs-xl);
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.section-desc {
    max-width: 75ch;
    margin: 0;
    color: var(--text-secondary);
}

.card {
    min-width: 0; /* grid items default to min-width:auto, which sizes to the canvas's
                     content width and creates a circular resize loop with Chart.js */
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card-head {
    margin-bottom: 1.25rem;
}

.card-head h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.card-sub {
    margin: 0.25rem 0 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.card-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
    background-color: var(--text-muted);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 1.25rem;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

canvas {
    display: block;
}

/* ---------- History ---------- */

.history-chart-wrapper {
    height: 400px;
}

@media (max-width: 600px) {
    .history-chart-wrapper { height: 340px; }
}

.history-table-toggle {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gridline);
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.history-table-toggle summary {
    cursor: pointer;
    font-weight: 500;
    width: fit-content;
}

.history-table-toggle summary:hover {
    color: var(--text-primary);
}

.history-table-scroll {
    overflow-x: auto;
    margin-top: 0.75rem;
}

.history-table {
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.history-table th,
.history-table td {
    padding: 0.375rem 0.75rem;
    text-align: right;
    border-bottom: 1px solid var(--gridline);
    color: var(--text-primary);
}

.history-table th:first-child,
.history-table td:first-child {
    text-align: left;
}

.history-table thead th {
    color: var(--text-muted);
    font-weight: 600;
}

/* ---------- Learning plan ---------- */

.plan-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr) minmax(0, 1.1fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1080px) {
    .plan-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .plan-grid .job-card { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .plan-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 1081px) {
    .job-card {
        position: sticky;
        top: 4.5rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
    }
}

.section-hint {
    margin: 0 0 1rem;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.skill-category-label {
    margin: 1.25rem 0 0.625rem;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.skill-category-label:first-child {
    margin-top: 0;
}

.skill-picker-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Each skill is a toggle chip wrapping a real checkbox. */
.skill-check-row {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4375rem;
    padding: 0.375rem 0.75rem 0.375rem 0.625rem;
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--text-secondary);
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.skill-check-row:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.skill-check-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.skill-check-row:has(input:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.skill-check-row:has(input:checked) {
    color: var(--text-primary);
    background-color: var(--surface-3);
    border-color: var(--text-muted);
}

.skill-check-row:has(input:checked)::after {
    content: "✓";
    font-size: var(--fs-xs);
    font-weight: 700;
}

.skill-swatch {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skill-gap-results {
    display: flex;
    flex-direction: column;
}

.skill-gap-item {
    padding: 0.875rem 0.5rem;
    border-top: 1px solid var(--gridline);
}

.skill-gap-item:first-child {
    border-top: none;
    padding-top: 0.25rem;
}

.skill-gap-item-clickable {
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.15s ease;
}

.skill-gap-item-clickable:hover {
    background-color: var(--surface-2);
}

.skill-gap-item.is-selected {
    background-color: var(--surface-3);
}

.skill-gap-item-header {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0.375rem;
}

.skill-gap-rank {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.skill-gap-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    min-width: 0;
}

.skill-gap-count {
    font-size: var(--fs-sm);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.skill-gap-bar {
    grid-column: 2 / -1;
    height: 4px;
    border-radius: 999px;
    background-color: var(--surface-3);
    overflow: hidden;
}

.skill-gap-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
}

.skill-gap-trend {
    grid-column: 2 / -1;
    font-size: var(--fs-xs);
    font-weight: 500;
    white-space: nowrap;
}

.trend-up { color: var(--good); }
.trend-down { color: var(--bad); }
.trend-flat { color: var(--text-muted); }

.skill-gap-courses {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin-top: 0.5rem;
    padding-left: 2.25rem;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.skill-gap-courses a {
    width: fit-content;
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 3px;
}

.skill-gap-courses a:hover {
    color: var(--text-primary);
    text-decoration-color: currentColor;
}

.show-more {
    align-self: flex-start;
    margin-top: 0.75rem;
}

.skill-gap-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
    margin: 0;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
}

.job-postings-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.job-posting-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.875rem;
    text-decoration: none;
    color: inherit;
    background-color: var(--surface-2);
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.job-posting-card:hover {
    border-color: var(--border-strong);
    background-color: var(--surface);
}

.job-posting-headline {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.125rem;
}

.job-posting-meta {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.remote-work-badge {
    margin: 0;
    padding: 0.625rem 0.75rem;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    background-color: var(--surface-2);
    border-radius: var(--radius-sm);
}

.co-occurrence-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0 0.75rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--gridline);
}

.co-occurrence-label {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-right: 0.125rem;
}

.co-occurrence-chip {
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--surface-3);
    border-radius: 999px;
    padding: 0.1875rem 0.625rem;
    font-variant-numeric: tabular-nums;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

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

.site-footer {
    border-top: 1px solid var(--border);
    background-color: var(--surface);
}

.footer-inner {
    max-width: var(--content);
    margin: 0 auto;
    padding: 1.5rem var(--gutter);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.footer-inner p {
    margin: 0;
}

.footer-inner a {
    color: var(--text-secondary);
    text-underline-offset: 3px;
}

/* ---------- "How the skills connect" radial tree ---------- */

.network-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
    gap: 2rem;
    align-items: center;
}

@media (max-width: 760px) {
    .network-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

.network-chart {
    min-width: 0;
    color: var(--text-secondary);
}

.network-panel {
    padding: 1.25rem;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.network-svg {
    display: block;
    width: 100%;
    max-width: 620px;
    height: auto;
    margin: 0 auto;
    overflow: visible;
    font-family: inherit;
}

.network-branch {
    fill: none;
    stroke: var(--gridline);
    stroke-width: 1.5;
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
}

.network-branch.is-lit {
    stroke-width: 2.5;
}

.network-link {
    fill: none;
    stroke: var(--text-muted);
    stroke-opacity: 0.28;
    stroke-linecap: round;
}

.network-link.is-bundle {
    stroke-opacity: 0.9;
    stroke-dasharray: 6 5;
    animation: network-flow 1.2s linear infinite;
}

@keyframes network-flow {
    to { stroke-dashoffset: -22; }
}

.network-root {
    fill: var(--surface-3);
    stroke: var(--border-strong);
}

.network-root-label {
    font-size: 11px;
    font-weight: 600;
    fill: var(--text-secondary);
}

.network-category-node {
    opacity: 0.45;
}

.network-category-node.is-lit {
    opacity: 1;
}

.network-category-label {
    paint-order: stroke;
    stroke: var(--surface);
    stroke-width: 4px;
    stroke-linejoin: round;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    fill: var(--text-muted);
}

.network-leaf {
    cursor: pointer;
    outline: none;
}

.network-hit {
    fill: transparent;
}

.network-dot {
    transition: opacity 0.3s ease;
}

.network-leaf.is-dim .network-dot {
    opacity: 0.35;
}

.network-leaf:hover .network-dot,
.network-leaf:focus-visible .network-dot {
    opacity: 1;
}

.network-halo {
    fill: none;
    stroke-width: 2;
    transform-box: fill-box;
    transform-origin: center;
    animation: network-pulse 1.8s ease-out infinite;
}

.network-leaf.is-selected .network-halo {
    stroke-width: 3;
    animation: none;
}

@keyframes network-pulse {
    0%   { transform: scale(0.8); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}

.network-label {
    font-size: 12.5px;
    font-weight: 500;
    fill: var(--text-muted);
    transition: fill 0.3s ease;
}

.network-leaf.is-selected .network-label,
.network-leaf.is-bundle .network-label {
    fill: var(--text-primary);
    font-weight: 700;
}

.network-leaf:hover .network-label,
.network-leaf:focus-visible .network-label {
    fill: var(--text-primary);
    text-decoration: underline;
}

.network-step {
    font-size: 10.5px;
    fill: var(--text-secondary);
}

@media (prefers-reduced-motion: reduce) {
    .network-link.is-bundle,
    .network-halo {
        animation: none;
    }
}

.network-panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.25rem;
    font-size: var(--fs-xl);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.network-panel-title .skill-swatch {
    width: 12px;
    height: 12px;
}

.network-panel-meta,
.network-panel-note {
    margin: 0 0 1rem;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.55;
}

.network-panel-subhead {
    margin: 0 0 0.625rem;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.network-steps {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.network-step-row {
    display: grid;
    grid-template-columns: minmax(7rem, auto) 1fr 2.75rem;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--fs-sm);
}

.network-step-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font: inherit;
    font-weight: 600;
    color: var(--text-primary);
    background: none;
    border: none;
    padding: 0;
    text-align: left;
}

button.network-step-label {
    cursor: pointer;
}

button.network-step-label:hover {
    text-decoration: underline;
}

span.network-step-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.network-step-num {
    display: inline-grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    font-size: 0.6875rem;
    color: var(--accent-ink);
    background-color: var(--accent);
}

.network-step-bar {
    height: 6px;
    border-radius: 999px;
    background-color: var(--surface-3);
    overflow: hidden;
}

.network-step-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

.network-step-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.network-openings {
    margin-top: 0.25rem;
}

/* The tree scales down with the screen; enlarge its text so labels stay readable. */
@media (max-width: 600px) {
    .network-label { font-size: 21px; }
    .network-step { font-size: 17px; }
    .network-category-label { font-size: 15px; }
    .network-root-label { font-size: 15px; }
    .card { padding: 1.125rem; }
    .network-panel { padding: 1rem; }
}

/* ---------- Job Titles ---------- */

.titles-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .titles-layout { grid-template-columns: minmax(0, 1fr); }
}

.title-panel {
    background: none;
    border: none;
    padding: 0;
}

.title-rows {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.title-row {
    display: grid;
    grid-template-columns: minmax(10.5rem, 1.1fr) minmax(5rem, 1.4fr) 4.75rem 96px;
    align-items: center;
    gap: 0.875rem;
    width: 100%;
    padding: 0.4rem 0.5rem;
    font: inherit;
    font-size: var(--fs-sm);
    color: var(--text-primary);
    text-align: left;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.title-row.no-history {
    grid-template-columns: minmax(10.5rem, 1fr) minmax(5rem, 1.6fr);
}

.title-row:hover {
    background-color: var(--surface-2);
}

.title-row.is-selected {
    background-color: var(--surface-2);
    border-color: var(--border-strong);
}

.title-row-head {
    cursor: default;
    padding-top: 0;
    padding-bottom: 0.375rem;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.title-row-head:hover { background: none; }

.title-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    min-width: 0;
}

.title-rank {
    flex-shrink: 0;
    width: 1.25rem;
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.title-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 18px;
}

.title-bar-fill {
    display: block;
    height: 12px;
    min-width: 2px;
    border-radius: 0 4px 4px 0;
    background-color: var(--title);
    transition: width 0.4s ease;
}

.title-bar-value {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.title-trend {
    font-size: var(--fs-xs);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.title-spark-wrap { display: block; line-height: 0; }

.title-spark {
    width: 96px;
    height: 28px;
    overflow: visible;
}

.title-spark-line {
    fill: none;
    stroke: var(--title);
    stroke-width: 1.75;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.title-spark-area {
    fill: var(--title);
    opacity: 0.12;
}

.title-spark-dot {
    fill: var(--title);
    stroke: var(--surface);
    stroke-width: 1.5;
}

.title-note {
    margin: 0.875rem 0 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.link-button {
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--text-primary);
    background: none;
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.network-title-links {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.network-title-link {
    display: inline-flex;
    align-items: baseline;
    gap: 0.375rem;
    padding: 0.3rem 0.625rem;
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-left: 3px solid var(--title);
    border-radius: 6px;
    cursor: pointer;
}

.network-title-link:hover { background-color: var(--surface-3); }

.network-title-value {
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--text-muted);
}

.network-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.network-root.is-title {
    fill: var(--title);
    stroke: none;
}

.network-root.is-title + .network-root-label {
    fill: var(--title-ink);
}

/* Heatmap: titles x skills. Cell color mixes the title hue into the surface by share. */

.heatmap-scroll {
    overflow-x: auto;
    margin: 0 -0.25rem;
    padding: 0 0.25rem 0.25rem;
}

.heatmap {
    border-collapse: separate;
    border-spacing: 2px;
    font-size: var(--fs-xs);
    font-variant-numeric: tabular-nums;
    min-width: 100%;
}

.heatmap th {
    font-weight: 600;
    color: var(--text-secondary);
}

.heatmap-corner {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: var(--surface);
    text-align: left;
    vertical-align: bottom;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    padding: 0 0.5rem 0.375rem 0;
    white-space: nowrap;
}

.heatmap-group {
    text-align: left;
    padding: 0 0 0.25rem 0.25rem;
    white-space: nowrap;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted) !important;
}

.heatmap-group .card-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.375rem;
    vertical-align: 0;
}

.heatmap-group-start { border-left: 6px solid transparent; background-clip: padding-box; }

.heatmap-col {
    vertical-align: bottom;
    height: 6.5rem;
    padding: 0 0 0.375rem;
}

.heatmap-col-button {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.heatmap-col-button:hover,
.heatmap-col.is-active .heatmap-col-button {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.heatmap tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    background-color: var(--surface);
    text-align: left;
    padding: 0 0.75rem 0 0;
    white-space: nowrap;
}

.heatmap-row-button {
    padding: 0.125rem 0;
    font: inherit;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--text-primary);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.heatmap-row-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.heatmap tbody tr.is-selected th .heatmap-row-button {
    box-shadow: inset 3px 0 0 var(--title);
    padding-left: 0.5rem;
}

.heatmap-cell {
    --level: 0%;
    min-width: 2.125rem;
    height: 1.875rem;
    text-align: center;
    border-radius: 4px;
    color: var(--text-secondary);
    background-color: color-mix(in oklab, var(--title) var(--level), var(--surface-2));
}

.heatmap-cell.is-strong {
    color: var(--title-ink);
    font-weight: 600;
}

.heatmap tbody tr.is-selected .heatmap-cell {
    outline: 1.5px solid var(--text-primary);
    outline-offset: -1px;
}

.heatmap-cell.is-active {
    box-shadow: inset 0 0 0 1.5px var(--text-primary);
}

.heatmap-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-top: 0.875rem;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.heatmap-legend-scale { display: inline-flex; gap: 2px; }

.heatmap-legend-step {
    --level: 0%;
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 1.25rem;
    border-radius: 3px;
    color: var(--text-secondary);
    background-color: color-mix(in oklab, var(--title) var(--level), var(--surface-2));
}

.heatmap-legend-step:nth-last-child(-n+2) { color: var(--title-ink); }

@media (max-width: 600px) {
    .title-row {
        grid-template-columns: minmax(0, 1fr) 4.25rem 64px;
        grid-template-areas: "name trend spark" "bar bar bar";
        row-gap: 0.25rem;
    }
    .title-row.no-history { grid-template-columns: minmax(0, 1fr); grid-template-areas: "name" "bar"; }
    .title-row .title-name { grid-area: name; }
    .title-row .title-bar { grid-area: bar; }
    .title-row .title-trend { grid-area: trend; text-align: right; }
    .title-row .title-spark-wrap { grid-area: spark; }
    .title-spark { width: 64px; }
    .title-row-head { display: none; }
    .heatmap tbody th { white-space: normal; min-width: 6.5rem; max-width: 7.5rem; line-height: 1.25; }
    .heatmap-row-button { font-size: var(--fs-xs); }
    .heatmap-corner { white-space: normal; }
}

/* ---------- Check your CV ---------- */

.cv-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cv-grid { grid-template-columns: minmax(0, 1fr); }
}

.cv-privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.375rem;
}

.cv-privacy svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cv-drop {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 1.75rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    background-color: var(--surface-2);
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.cv-drop:hover,
.cv-drop.is-dragging {
    border-color: var(--focus);
    background-color: var(--surface-3);
}

.cv-drop:has(input:focus-visible) {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.cv-drop input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.cv-drop svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--text-muted);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cv-drop-title {
    font-weight: 600;
    color: var(--text-primary);
}

.cv-drop-title u { text-underline-offset: 3px; }

.cv-drop-sub {
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.cv-alt {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.cv-alt .link-button { font-weight: 500; color: var(--text-secondary); }

.cv-paste {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
    justify-items: start;
}

.cv-paste textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.625rem 0.75rem;
    font: inherit;
    font-size: var(--fs-sm);
    color: var(--text-primary);
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    resize: vertical;
}

.cv-paste[hidden] { display: none; }

.cv-status {
    margin: 0.875rem 0 0;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.cv-status:empty { display: none; }
.cv-status.is-error { color: var(--bad); }

.cv-found { margin-top: 1.25rem; }
.cv-found .skill-category-label:first-child { margin-top: 0; }

.skill-check-row.cv-not-found:not(:has(input:checked)) {
    color: var(--text-muted);
    border-style: dashed;
}

.cv-other {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.cv-experience {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
}

.cv-experience input {
    width: 4.5rem;
    padding: 0.375rem 0.5rem;
    font: inherit;
    font-weight: 600;
    color: var(--text-primary);
    background-color: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 6px;
}

.cv-experience .cv-note { flex-basis: 100%; }

.cv-note {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

.cv-text {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    line-height: 1.55;
}

.cv-empty {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.cv-empty p { margin: 0; }

.cv-empty-score {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 650;
    color: var(--text-muted);
}

.cv-score {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1.25rem;
    align-items: center;
}

.cv-ring {
    --p: 0;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background:
        radial-gradient(closest-side, var(--surface) 78%, transparent 79%),
        conic-gradient(var(--focus) calc(var(--p) * 1%), var(--surface-3) 0);
}

.cv-ring-value {
    font-size: 1.625rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.cv-score-label {
    margin: 0;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cv-score-main {
    margin: 0.25rem 0 0.375rem;
    font-size: var(--fs-lg);
    font-weight: 600;
    line-height: 1.35;
}

@media (max-width: 480px) {
    .cv-score { grid-template-columns: minmax(0, 1fr); justify-items: start; }
    .cv-ring { width: 96px; height: 96px; }
}

.cv-block {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gridline);
}

.cv-subhead {
    margin: 0 0 0.625rem;
    font-size: var(--fs-base);
    font-weight: 600;
}

.cv-block .cv-note + * { margin-top: 0.625rem; }

.cv-bar-row {
    display: grid;
    grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) 3rem;
    grid-template-areas: "name bar value" "name sub sub";
    align-items: center;
    column-gap: 0.75rem;
    width: 100%;
    padding: 0.4375rem 0.5rem;
    margin: 0 -0.5rem;
    box-sizing: content-box;
    font: inherit;
    font-size: var(--fs-sm);
    text-align: left;
    color: var(--text-primary);
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.cv-bar-row:hover { background-color: var(--surface-2); }
.cv-bar-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }

.cv-bar-name { grid-area: name; font-weight: 500; }
.cv-bar-row.is-guess .cv-bar-name { font-weight: 700; }
.cv-bar-row.is-guess .cv-bar-name::after { content: " · your CV"; font-weight: 500; color: var(--text-muted); }

.cv-bar {
    grid-area: bar;
    height: 8px;
    background-color: var(--surface-3);
    border-radius: 999px;
    overflow: hidden;
}

.cv-bar-fill {
    display: block;
    height: 100%;
    background-color: var(--title);
    border-radius: 999px;
}

.cv-bar-value {
    grid-area: value;
    font-weight: 600;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cv-bar-sub {
    grid-area: sub;
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .cv-bar-row { grid-template-columns: minmax(0, 1fr) 3rem; grid-template-areas: "name value" "bar bar" "sub sub"; row-gap: 0.25rem; }
}

.cv-gap {
    padding: 0.625rem 0;
}

.cv-gap + .cv-gap { border-top: 1px dashed var(--gridline); }

.cv-gap-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.25rem 0.75rem;
    align-items: baseline;
}

.cv-gap-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.cv-gap-value {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--good);
    font-variant-numeric: tabular-nums;
}

.cv-gap .skill-gap-courses { margin-top: 0.375rem; }

.cv-trends {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.cv-trend {
    display: inline-flex;
    align-items: baseline;
    gap: 0.375rem;
    padding: 0.3rem 0.625rem;
    font-size: var(--fs-sm);
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
}

.cv-trend-name { font-weight: 500; }

.cv-trend-value {
    font-size: var(--fs-xs);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cv-actions { margin-top: 1.5rem; }

.cv-trend-then {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

/* Matching ads, full width under the CV cards */
.cv-jobs-card { grid-column: 1 / -1; }
.cv-jobs-card[hidden] { display: none; }

.cv-jobs-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem 1.5rem;
}

.cv-jobs-head > div:first-child { flex: 1 1 22rem; min-width: 0; }
.cv-jobs-filter { margin-bottom: 0; }
.cv-jobs-filter .location-pill:disabled { opacity: 0.5; cursor: default; }

.cv-jobs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
    gap: 0.75rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.cv-job {
    display: grid;
    gap: 0.375rem;
    align-content: start;
    min-width: 0;
    padding: 0.875rem 1rem;
    background-color: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.cv-job-title {
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

a.cv-job-title {
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 3px;
}

a.cv-job-title:hover { text-decoration-color: currentColor; }

.cv-job-meta {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    overflow-wrap: anywhere;
}

.cv-job-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.125rem;
}

.cv-job-skill {
    padding: 0.125rem 0.5rem;
    font-size: var(--fs-xs);
    font-weight: 500;
    border-radius: 999px;
}

.cv-job-skill.is-have {
    color: var(--text-secondary);
    background-color: var(--surface-3);
}

.cv-job-skill.is-missing {
    color: var(--bad);
    border: 1px dashed currentColor;
}

/* Fixed-height CV columns: content scrolls inside the cards instead of
   stretching the layout as skills, titles and jobs are added. */
@media (min-width: 901px) {
    .cv-input-card,
    .cv-result-card {
        height: min(80vh, 780px);
        box-sizing: border-box;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable;
    }
}

.cv-jobs-list {
    max-height: min(70vh, 640px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-right: 0.25rem;
}

.cv-jobs-count {
    margin: 0.75rem 0 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
}

/* ---------- Big Themes (a tab in the Job titles card) ---------- */

#titleTabs { margin-bottom: 0; }
#titleTabs[hidden],
#titleListHeading[hidden] { display: none; }

.hot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-bottom: 1rem;
}

.hot-chip-link {
    font-family: inherit;
    border: none;
    cursor: pointer;
}

.hot-chip-link:hover {
    color: var(--text-primary);
    background-color: var(--border-strong);
}
