/* CSS Reset and Variables */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Government of Canada inspired colors */
    --primary: #26374a;
    --secondary: #335075;
    --accent: #1976d2;
    --bg: #ffffff;
    --border: #e0e0e0;
    --text: #333333;
    --text-light: #666666;
    --error: #c62828;
    --success: #2e7d32;
    --highlight: #e3f2fd;
    --gc-red: #af3c43;
    --gc-blue: #26374a;

    /* v5.1 Design Tokens */
    --app-bar-bg: #26374a;
    --app-bar-badge-bg: #4a6fa5;
    --pill-noc-bg: #555555;
    --pill-caf-bg: #28a745;
    --pill-ochro-bg: #fd7e14;
    --pill-onet-bg: #17a2b8;
    --pill-oasis-bg: #6f42c1;
    --badge-green-bg: #d4edda;
    --badge-green-text: #155724;
    --badge-blue-bg: #cce5ff;
    --badge-blue-text: #004085;
    --badge-grey-bg: #e2e3e5;
    --badge-grey-text: #383d41;
    --stepper-active-bg: #26374a;
    --stepper-inactive-bg: #e0e0e0;
    --stepper-completed-bg: #28a745;
    --footer-bg: #26374a;
}

/* Base Typography */
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: var(--text);
    background: #f5f5f5;
    min-height: 100vh;
}

/* Visually Hidden (for screen readers) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===================== */
/* GC CDTS Header        */
/* ===================== */
.gc-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.gc-header__top {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.gc-header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.gc-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Canadian Flag */
.gc-header__flag {
    flex-shrink: 0;
}

.gc-flag {
    display: flex;
    width: 42px;
    height: 28px;
    border: 1px solid #ccc;
}

.gc-flag__red {
    width: 25%;
    background: #ff0000;
}

.gc-flag__white {
    width: 50%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gc-flag__leaf {
    color: #ff0000;
    font-size: 1rem;
}

.gc-header__titles {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.gc-header__title-en,
.gc-header__title-fr {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--gc-blue);
}

/* GC Header Search */
.gc-header__search {
    display: flex;
    flex: 1;
    max-width: 400px;
    margin: 0 1rem;
}

.gc-header__search-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 0;
    outline: none;
}

.gc-header__search-input:focus {
    border-color: var(--accent);
}

.gc-header__search-btn {
    padding: 0.5rem 0.75rem;
    background: var(--gc-blue);
    color: white;
    border: 1px solid var(--gc-blue);
    cursor: pointer;
    font-size: 0.875rem;
}

.gc-header__search-btn:hover {
    background: #1a2a3a;
}

.gc-header__lang a {
    color: var(--accent);
    text-decoration: underline;
    font-size: 0.875rem;
}

.gc-header__lang a:hover {
    text-decoration: none;
}

.gc-header__nav {
    padding: 0;
    background: var(--gc-blue);
}

.gc-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    color: white;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.gc-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gc-menu-btn i {
    font-size: 0.75rem;
}

.gc-breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.gc-breadcrumb li {
    display: flex;
    align-items: center;
}

.gc-breadcrumb li:not(:last-child)::after {
    content: ">";
    margin-left: 0.5rem;
    color: var(--text-light);
}

.gc-breadcrumb a {
    color: var(--accent);
    text-decoration: underline;
}

.gc-breadcrumb a:hover {
    text-decoration: none;
}

.gc-breadcrumb li[aria-current="page"] {
    color: var(--text);
}

/* ===================== */
/* GC CDTS Footer        */
/* ===================== */
.gc-footer {
    margin-top: 3rem;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.gc-footer__main {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.gc-footer__links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.gc-footer__links a {
    color: var(--accent);
    text-decoration: underline;
    font-size: 0.875rem;
}

.gc-footer__links a:hover {
    text-decoration: none;
}

.gc-footer__brand {
    padding: 1rem 0;
    text-align: right;
}

.gc-footer__logo {
    height: 32px;
    width: auto;
}

/* Footer Wordmark (Canada with maple leaf) */
.gc-footer__wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.gc-wordmark__text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gc-blue);
    font-family: 'Times New Roman', Times, serif;
}

.gc-wordmark__flag {
    font-size: 1.25rem;
    color: #ff0000;
}

/* ===================== */
/* Welcome Section       */
/* ===================== */
.welcome-section {
    background: var(--bg);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.welcome-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    align-items: center;
}

.welcome-image img {
    width: 100%;
    height: auto;
    max-width: 300px;
}

.welcome-image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-image-placeholder i {
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.6;
}

.welcome-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--gc-blue);
    margin-bottom: 0.25rem;
}

.welcome-subtitle {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 1rem;
    font-weight: 500;
}

.welcome-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.welcome-content .search-container {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.search-input-row {
    display: flex;
    gap: 0.5rem;
}

.search-input-row input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input-row input:focus {
    border-color: var(--primary);
}

.search-input-row button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-input-row button:hover {
    background: #1a2a3a;
}

/* Job Family pill (disabled) */
.pill-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
}

.pill-btn.disabled:hover {
    background: #f0f0f0;
}

/* ===================== */
/* Explore Section       */
/* ===================== */
.explore-section {
    margin-bottom: 2rem;
}

.explore-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gc-blue);
    margin-bottom: 1rem;
}

.explore-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.explore-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    cursor: default;
}

/* Hover effect: blue background, white text */
.explore-card:hover,
.explore-card:focus {
    background: var(--gc-blue);
    border-color: var(--gc-blue);
}

.explore-card:hover .explore-card__title,
.explore-card:hover .explore-card__desc,
.explore-card:focus .explore-card__title,
.explore-card:focus .explore-card__desc {
    color: white;
}

.explore-card:hover .explore-card__icon,
.explore-card:focus .explore-card__icon {
    background: rgba(255, 255, 255, 0.2);
}

.explore-card:hover .explore-card__icon i,
.explore-card:focus .explore-card__icon i {
    color: white;
}

.explore-card:hover .explore-card__badge,
.explore-card:focus .explore-card__badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.explore-card:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.explore-card__icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: background 0.2s;
}

.explore-card__icon i {
    font-size: 1.5rem;
    color: var(--accent);
    transition: color 0.2s;
}

.explore-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gc-blue);
    margin-bottom: 0.5rem;
    transition: color 0.2s;
}

.explore-card__desc {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
    flex: 1;
    transition: color 0.2s;
}

.explore-card__badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #f0f0f0;
    color: var(--text-light);
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

/* Responsive: Welcome and Explore */
@media (max-width: 768px) {
    .welcome-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .welcome-image {
        order: -1;
        margin-bottom: 1rem;
    }

    .welcome-image img,
    .welcome-image-placeholder {
        max-width: 200px;
        margin: 0 auto;
    }

    .explore-grid {
        grid-template-columns: 1fr;
    }

    .gc-footer__links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .gc-footer__brand {
        text-align: center;
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Legacy Header (replaced by GC CDTS header) */
.header {
    display: none;
}

/* Main Content */
main.container {
    padding-bottom: 80px; /* Space for sticky action bar */
    transition: margin-right 0.3s ease;
}

body.sidebar-open main.container {
    margin-right: 300px;
}

/* Search Container */
.search-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--bg);
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-container input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.search-container input[type="search"]:focus {
    border-color: var(--primary);
}

.search-container button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-container button:hover {
    background: #1a2a3a;
}

.search-container button:disabled {
    background: #999;
    cursor: not-allowed;
}

/* Pill Toggle Styles */
.search-type-toggle {
    display: flex;
    gap: 0;
}

.pill-btn {
    padding: 7px 16px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}

.pill-btn:first-child {
    border-radius: 25px 0 0 25px;
}

.pill-btn:last-child {
    border-radius: 0 25px 25px 0;
    border-left: none;
}

.pill-btn.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--primary) !important;
}

.pill-btn:hover:not(.active) {
    background: var(--highlight);
}

.pill-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    z-index: 1;
}

/* Authoritative Sources Footnote */
.authoritative-sources {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    text-align: left;
}

/* Provenance Description */
.provenance-description {
    font-size: 0.8125rem;
    color: var(--text-light);
    line-height: 1.5;
    font-style: italic;
    margin-top: 0;
    padding: 0.75rem;
    background: #f8f9fa;
    border-left: 3px solid var(--accent);
    border-radius: 0 4px 4px 0;
}

/* Results Meta (Publication date & Data Steward) */
.results-meta {
    display: inline-flex;
    gap: 1rem;
    margin-left: 1rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.results-meta__date,
.results-meta__steward {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.results-meta__date::before {
    content: "📅";
    font-size: 0.875rem;
}

.results-meta__steward::before {
    content: "👤";
    font-size: 0.875rem;
}

/* Info Card */
.info-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 1rem;
    color: var(--text);
}

.info-value a {
    color: var(--accent);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

/* Search Results */
.search-results {
    background: var(--bg);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-results h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.search-results ul {
    list-style: none;
}

.search-results li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.search-results li:last-child {
    border-bottom: none;
}

.search-results li:hover {
    background: var(--highlight);
}

.search-results .result-title {
    font-weight: 500;
    color: var(--text);
}

.search-results .result-code {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-left: 0.5rem;
}

/* Error Message */
.error-message {
    background: #ffebee;
    color: var(--error);
    border-left: 4px solid var(--error);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0 4px 4px 0;
}

/* JD Sections Container */
.jd-sections {
    margin-top: 1rem;
}

/* Action Bar */
.action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 1rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 40;
    transition: right 0.3s ease;
    text-align: center;
}

body.sidebar-open .action-bar {
    right: 300px;
}

/* Button Base Styles */
.btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn--primary {
    background-color: var(--primary);
    color: white;
}

.btn--primary:hover:not(:disabled) {
    background-color: #1a2a3a;
}

.btn--primary:disabled {
    background-color: #999;
    cursor: not-allowed;
}

.btn--secondary {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn--secondary:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
}

#generate-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#generate-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

#generate-btn:not(:disabled):hover {
    background: #1a2a3a;
}

/* Profile Tabs Navigation */
.profile-tabs-container {
    margin-bottom: 1.5rem;
}

.tabs-bar {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tabs-bar li {
    margin-bottom: -2px;
}

.tab-button {
    background: var(--gc-blue, #26374a);
    border: 1px solid var(--gc-blue, #26374a);
    border-bottom: 2px solid var(--gc-blue, #26374a);
    border-radius: 4px 4px 0 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: white;
    background: #1a2a3a;
    border-color: #1a2a3a;
}

.tab-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.tab-button-active {
    color: var(--gc-blue, #26374a);
    background: #fff;
    border-color: var(--gc-blue, #26374a);
    border-bottom-color: #fff;
    font-weight: 600;
}

/* Tab Panels */
.tab-panel {
    padding: 1.5rem 0;
}

.tab-panel[hidden] {
    display: none;
}

/* Panel Section Styling */
.tab-panel__section {
    margin-bottom: 1.5rem;
}

.tab-panel__section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

/* Section Definition - category description from guide.csv */
.tab-panel__section-definition {
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-left: 3px solid var(--gc-blue);
    border-radius: 0 4px 4px 0;
}

/* Empty state for tabs without content */
.tab-panel__empty {
    color: #666;
    font-style: italic;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: 4px;
    text-align: center;
}

/* Text paragraph in tab panels */
.tab-panel__text {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.tab-panel__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tab-panel__item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.tab-panel__item:last-child {
    border-bottom: none;
}

/* ============================================
   OaSIS Panel Cards (matches OaSIS welcome page)
   ============================================ */

.oasis-panel {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.oasis-panel__heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(to bottom, #f5f5f5, #e8e8e8);
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.oasis-panel__icon {
    font-size: 1.5rem;
    color: var(--gc-blue, #26374a);
    flex-shrink: 0;
}

.oasis-panel__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.oasis-panel__body {
    padding: 1rem;
}

/* Also Known As - OaSIS style job titles list */
.also-known-as-panel {
    max-width: 600px;
}

.aka-list {
    list-style: disc;
    margin: 0;
    padding-left: 1.25rem;
}

.aka-list__item {
    padding: 0.25rem 0;
    color: #333;
    line-height: 1.4;
}

.aka-list--hidden {
    display: none;
}

.aka-list--hidden.visible {
    display: block;
    margin-top: 0.5rem;
}

.aka-see-more {
    background: none;
    border: none;
    padding: 0.5rem 0;
    color: var(--gc-blue, #26374a);
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: underline;
}

.aka-see-more:hover {
    color: #1a4a8c;
}

/* NOC Hierarchy Table */
.noc-hierarchy-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.noc-hierarchy-table thead th {
    background: var(--gc-blue);
    color: white;
    font-weight: 600;
    padding: 0.625rem 0.75rem;
}

.noc-hierarchy-table th,
.noc-hierarchy-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.noc-hierarchy-table tbody th {
    font-weight: 500;
    color: #666;
    width: 140px;
}

.noc-hierarchy-table .noc-level {
    width: 50px;
    text-align: center;
    font-weight: 600;
    color: #1565c0;
}

.noc-hierarchy-table .noc-code {
    font-weight: 600;
    color: #1565c0;
    width: 80px;
}

.noc-hierarchy-table .noc-name {
    color: #333;
}

.noc-hierarchy-table tr:last-child th,
.noc-hierarchy-table tr:last-child td {
    border-bottom: none;
}

/* Results Footer (same as welcome section) */
.results-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

/* Profile Header - Blue Banner */
.profile-header {
    background: linear-gradient(135deg, #003366 0%, #004488 100%);
    color: #ffffff;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
}

.profile-header__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.profile-header__text {
    flex: 1;
}

.profile-header__title {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #ffffff;
}

.oasis-code-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.profile-header__lead {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0.75rem 0;
    opacity: 0.95;
}

.profile-header__description {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 1rem 0 0 0;
    opacity: 0.9;
    font-style: italic;
}

.profile-header__icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-header__icon i {
    font-size: 5rem;
    color: #CADBF2;
}

.profile-header__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.8125rem;
    opacity: 0.8;
}

.profile-header__meta a {
    color: #CADBF2;
    text-decoration: underline;
}

/* Tab button icons (v5.1) */
.tab-icon {
    margin-right: 0.4rem;
    font-size: 0.85em;
    opacity: 0.7;
}
.tab-button-active .tab-icon {
    opacity: 1;
}

/* Section Description Box (v5.1) */
.section-description-box {
    background: #f0f4f8;
    border-left: 4px solid var(--primary);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text);
}
.section-description-box__icon {
    color: var(--primary);
    font-size: 1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}
.section-description-box__title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--primary);
    display: block;
}
.section-description-box__text {
    margin: 0;
    color: var(--text-light);
}
.section-description-box__text em {
    font-style: italic;
}

/* Overview Position Title Input (BUILD-03) */
.overview-position-title {
    margin-bottom: 1.25rem;
}
.overview-position-title__label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}
.overview-position-title__input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.overview-position-title__input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(38,55,74,0.1);
}

/* Overview Two-Column Layout */
.overview-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.overview-two-col__panel {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 1rem;
    border: 1px solid var(--border);
}
.overview-two-col__heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.overview-two-col__text {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text);
    margin: 0;
}

/* v5.1 Occupation Header Card */
.profile-header--v51 {
    background: var(--primary); /* #26374a dark navy */
    color: #ffffff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.profile-header__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.profile-header__close:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.15);
}

.profile-header--v51 .profile-header__content {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.profile-header__icon-wrap {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #ffffff;
}

.profile-header--v51 .profile-header__title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #ffffff;
    padding-right: 2rem; /* space for close button */
}

.profile-header__noc-badge {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    color: #ffffff;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.profile-header--v51 .profile-header__lead {
    color: rgba(255,255,255,0.88);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.5rem;
}

.profile-header--v51 .profile-header__description {
    color: rgba(255,255,255,0.75);
    font-size: 0.88rem;
    margin-top: 0.5rem;
}

.profile-header--v51 .profile-header__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
}

.profile-header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.profile-header__meta-item--verified {
    color: #81c784; /* soft green */
}
.profile-header__meta-divider {
    color: rgba(255,255,255,0.3);
}

.profile-header__provenance-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.profile-header__provenance-btn:hover {
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}

.profile-header__links {
    margin-top: 0.5rem;
}
.profile-header__oasis-link {
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    text-decoration: none;
}
.profile-header__oasis-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .search-container {
        flex-wrap: wrap;
    }

    .search-type-toggle {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .search-container button {
        width: 100%;
    }

    .profile-header__icon {
        display: none;
    }

    .profile-header__content {
        flex-direction: column;
    }

    .profile-header--v51 .profile-header__content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .profile-header--v51 .profile-header__meta {
        justify-content: center;
    }

    .overview-two-col {
        grid-template-columns: 1fr;
    }

    /* Responsive tabs - scroll on mobile */
    .tabs-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tabs-bar::-webkit-scrollbar {
        display: none;
    }

    .tab-button {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
}

/* NOC code styling in search results */
.noc-code {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: normal;
}

/* View toggle button styling */
.view-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.5rem;
}

.view-toggle {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text);
    transition: background 0.15s, border-color 0.15s;
}

.view-toggle:hover {
    background: var(--highlight);
    border-color: var(--accent);
}

.view-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.view-toggle[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Grid view (table layout) - 6 column layout for JD categories */
.results-list.grid-view {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
}

.results-list.grid-view .grid-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    background: var(--highlight);
    border-bottom: 2px solid var(--border);
}

.results-list.grid-view .grid-header-cell {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-light);
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.results-list.grid-view .grid-header-cell:hover {
    background: var(--highlight);
}

.results-list.grid-view .grid-header-cell .sort-indicator {
    font-size: 0.75rem;
    opacity: 0.5;
}

.results-list.grid-view .grid-header-cell .sort-indicator.active {
    opacity: 1;
}

.results-list.grid-view .grid-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background-color 0.15s;
}

.results-list.grid-view .grid-row:last-child {
    border-bottom: none;
}

.results-list.grid-view .grid-row:hover {
    background: var(--highlight);
}

.results-list.grid-view .grid-cell {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    border-right: 1px solid var(--border-light, #f0f0f0);
}

.results-list.grid-view .grid-cell:last-child {
    border-right: none;
}

/* Card view (default) */
.results-list.card-view {
    list-style: none;
}

.results-list.card-view li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}

.results-list.card-view li:last-child {
    border-bottom: none;
}

.results-list.card-view li:hover {
    background: var(--highlight);
}

/* Hide view toggle on mobile */
@media (max-width: 768px) {
    .view-toggle {
        display: none;
    }

    .results-list.grid-view {
        display: none;
    }

    .results-list.grid-view .grid-header {
        display: none;
    }

    .results-list.grid-view .grid-row {
        display: block;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border);
    }

    .results-list.grid-view .grid-cell {
        display: inline;
        padding: 0;
        border: none;
    }

    .results-list.grid-view .grid-cell:not(:first-child) {
        display: none;
    }
}

/* ============================================
   JD Building Progress Stepper
   ============================================ */

.jd-stepper {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.jd-stepper__steps {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
}

.jd-stepper__step {
    display: flex;
    align-items: center;
    position: relative;
}

/* Connector line between steps */
.jd-stepper__step:not(:last-child)::after {
    content: '';
    width: 60px;
    height: 2px;
    background: #ccc;
    margin: 0 0.5rem;
}

.jd-stepper__step--completed:not(:last-child)::after {
    background: var(--gc-blue, #26374a);
}

.jd-stepper__btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 4px;
}

.jd-stepper__btn:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
}

.jd-stepper__btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Enabled but not active/completed - show as clickable */
.jd-stepper__btn:not(:disabled) {
    opacity: 1;
}

/* Only style enabled buttons that are NOT in completed or active steps */
.jd-stepper__step:not(.jd-stepper__step--completed):not(.jd-stepper__step--active) .jd-stepper__btn:not(:disabled) .jd-stepper__number {
    background: var(--gc-blue, #26374a);
}

.jd-stepper__step:not(.jd-stepper__step--completed):not(.jd-stepper__step--active) .jd-stepper__btn:not(:disabled) .jd-stepper__label {
    color: var(--gc-blue, #26374a);
}

.jd-stepper__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--stepper-inactive-bg, #e0e0e0);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s;
}

.jd-stepper__step--active .jd-stepper__number {
    background: var(--stepper-active-bg, #26374a);
}

.jd-stepper__step--completed .jd-stepper__number {
    background: var(--stepper-completed-bg, #28a745);
}

.jd-stepper__step--completed .jd-stepper__number::after {
    content: '✓';
    font-size: 0.75rem;
}

.jd-stepper__label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.jd-stepper__step--active .jd-stepper__label {
    color: var(--gc-blue, #26374a);
    font-weight: 600;
}

.jd-stepper__step--completed .jd-stepper__label {
    color: #28a745;
}

/* Responsive: hide labels on mobile, show only numbers */
@media (max-width: 600px) {
    .jd-stepper__label {
        display: none;
    }

    .jd-stepper__step:not(:last-child)::after {
        width: 30px;
    }
}

/* ============================================
   Other Job Info Tab Styles
   ============================================ */

/* Other Info List */
.other-info-list {
    list-style: disc;
    margin: 0;
    padding-left: 1.25rem;
}

.other-info-list__item {
    padding: 0.375rem 0;
    color: #333;
    line-height: 1.5;
}

/* Inline list (tags style) */
.other-info-list--inline {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.other-info-list__item--tag {
    display: inline-block;
    background: #f0f4f8;
    padding: 0.375rem 0.75rem;
    border-radius: 16px;
    font-size: 0.875rem;
    color: #333;
    border: 1px solid #e0e4e8;
}

/* Holland Codes Styling */
.holland-codes {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.holland-code {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e8ecf0;
}

.holland-code__badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* Holland code colors */
.holland-code__badge--r { background: #d32f2f; } /* Realistic - Red */
.holland-code__badge--i { background: #1976d2; } /* Investigative - Blue */
.holland-code__badge--a { background: #7b1fa2; } /* Artistic - Purple */
.holland-code__badge--s { background: #388e3c; } /* Social - Green */
.holland-code__badge--e { background: #f57c00; } /* Enterprising - Orange */
.holland-code__badge--c { background: #455a64; } /* Conventional - Gray-Blue */

.holland-code__content {
    flex: 1;
}

.holland-code__title {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.holland-code__rank {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.75rem;
    color: #666;
    background: #e0e0e0;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.holland-code__description {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

/* Attributes Grid */
.attributes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e8ecf0;
}

.attribute-item__name {
    font-size: 0.875rem;
    color: #333;
}

.attribute-item__level {
    display: flex;
    align-items: center;
}

/* Attribute Level Indicators */
.attribute-level {
    font-size: 0.875rem;
    letter-spacing: 1px;
}

.attribute-level .level-filled {
    color: #1976d2;
}

.attribute-level .level-empty {
    color: #ccc;
}

/* Exclusions List */
.exclusions-note {
    font-size: 0.875rem;
    color: #666;
    font-style: italic;
    margin-bottom: 0.75rem;
}

.exclusions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.exclusions-list__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.exclusions-list__item:last-child {
    border-bottom: none;
}

.exclusions-list__title {
    color: #333;
}

.exclusions-list__code {
    font-size: 0.8125rem;
    color: #888;
    font-family: 'Courier New', Courier, monospace;
}

/* Work Context Grid */
.work-context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.work-context-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e8ecf0;
}

.work-context-item__name {
    font-size: 0.875rem;
    color: #333;
    flex: 1;
    padding-right: 0.5rem;
}

.work-context-item__level {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Responsive adjustments for Other tab */
@media (max-width: 768px) {
    .attributes-grid {
        grid-template-columns: 1fr;
    }

    .work-context-grid {
        grid-template-columns: 1fr;
    }

    .holland-code {
        flex-direction: column;
        text-align: center;
    }

    .holland-code__badge {
        margin: 0 auto;
    }

    .other-info-list--inline {
        justify-content: center;
    }
}

/* ============================================
   Toast Notifications
   ============================================ */

.toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #333333;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: toast-slide-in 0.3s ease;
}

.toast--error {
    background: #d32f2f;
}

.toast--success {
    background: #388e3c;
}

.toast--warning {
    background: #f57c00;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-dismiss {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

/* ==========================================================================
   Styled Statement Display (Phase 12)
   ========================================================================== */

/* Section header with Style Selected button */
.tab-panel__section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tab-panel__section-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Select All checkbox styling */
.select-all-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #f0f7ff;
    border: 1px solid #cce0ff;
    font-size: 0.8125rem;
    color: var(--gc-blue, #26374a);
    transition: background 0.2s, border-color 0.2s;
}

.select-all-label:hover {
    background: #e0f0ff;
    border-color: #99c2ff;
}

.select-all-checkbox {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.select-all-text {
    font-weight: 500;
}

.style-selected-btn {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s;
}

.style-selected-btn:hover {
    background-color: #0a58ca;
}

.style-selected-btn:active {
    background-color: #084298;
}

.style-selected-btn i {
    font-size: 0.9rem;
}

/* Confidence indicator dots - per CONTEXT.md color scheme */
.confidence-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.confidence-dot.high {
    background-color: #28a745; /* Green - >= 0.8 */
}

.confidence-dot.medium {
    background-color: #ffc107; /* Yellow - >= 0.5 */
}

.confidence-dot.low {
    background-color: #dc3545; /* Red - < 0.5 */
}

/* Styled statement container */
.styled-statement-container {
    margin-top: 8px;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #0d6efd;
}

.styled-statement-container.is-fallback {
    border-left-color: #6c757d;
    background-color: #f5f5f5;
}

/* Primary styled text display */
.styled-text {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* Collapsible original text - per CONTEXT.md: expandable/collapsible */
.original-text-toggle {
    font-size: 0.8rem;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.original-text-toggle:hover {
    color: #495057;
}

.original-text-content {
    display: none;
    margin-top: 8px;
    padding: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #495057;
}

.original-text-content.show {
    display: block;
}

/* AI-Styled label - per CONTEXT.md */
.ai-styled-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
}

/* Statement controls row */
.statement-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #dee2e6;
}

/* Regenerate button - inline icon style per CONTEXT.md discretion */
.regenerate-btn {
    background: none;
    border: none;
    color: #0d6efd;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.regenerate-btn:hover {
    color: #0a58ca;
    text-decoration: underline;
}

.regenerate-btn:disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

.regenerate-btn .spinner {
    display: none;
    width: 14px;
    height: 14px;
    border: 2px solid #0d6efd;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.regenerate-btn.loading .spinner {
    display: inline-block;
}

.regenerate-btn.loading .btn-text {
    display: none;
}

/* Opt-out toggle - per CONTEXT.md user decision */
.use-original-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #495057;
}

.use-original-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Confidence score tooltip */
.confidence-info {
    font-size: 0.75rem;
    color: #6c757d;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================================================
   Phase 18-01: Tab Overflow and Overview Layout Styles
   ===================================================== */

/* Tab bar horizontal scroll with scroll-snap on mobile */
@media (max-width: 768px) {
    .tabs-bar {
        scroll-snap-type: x mandatory;
    }
    
    .tabs-bar li {
        scroll-snap-align: start;
    }
    
    .tab-button {
        flex-shrink: 0;
        min-width: max-content;
    }
}

/* Overview tab layout */
.overview-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.overview-icon {
    font-size: 3rem;
    color: var(--gc-blue, #26374a);
    flex-shrink: 0;
}

.overview-header-text h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gc-blue, #26374a);
}

.noc-badge {
    display: inline-block;
    background: var(--gc-blue, #26374a);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.overview-description {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f0f4f8;
    border-left: 4px solid var(--gc-blue, #26374a);
    border-radius: 0 4px 4px 0;
}

.navy-description {
    color: var(--gc-blue, #26374a);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

/* Dimension labels for rating circles */
.attribute-dimension {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.8125rem;
    color: #666;
    font-weight: 500;
}

.rating-label {
    font-size: 0.8125rem;
    color: #666;
    font-weight: 500;
}

/* Career content styling */
.career-content {
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Source badge -- shown at the bottom of each tab panel (Phase 22) */
.source-badge-container {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e0e0e0;
}

.source-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.source-badge--jobforge {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.source-badge--oasis {
    background: #f5f5f5;
    color: #616161;
    border: 1px solid #e0e0e0;
}

/* ============================================
   v5.1 Global Chrome Styles (CHROME-01 to 08)
   ============================================ */

/* CHROME-01: GoC Identity Header */
.gc-identity-header {
    background: #ffffff;
    border-bottom: 3px solid #af3c43;
    padding: 0.75rem 0;
}

.gc-identity-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-identity-header__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.gc-identity-header__titles {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.gc-identity-header__title-en,
.gc-identity-header__title-fr {
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--gc-blue);
}

.gc-identity-header__lang {
    color: var(--accent);
    text-decoration: underline;
    font-size: 0.875rem;
}

.gc-identity-header__lang:hover {
    text-decoration: none;
}

/* CHROME-02: App Bar */
.app-bar {
    background: var(--app-bar-bg);
    color: white;
    padding: 0.5rem 0;
}

.app-bar__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-bar__badge {
    background: var(--app-bar-badge-bg);
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-weight: bold;
    font-size: 0.875rem;
    white-space: nowrap;
}

.app-bar__session {
    font-size: 0.85rem;
    opacity: 0.8;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-bar__audit {
    font-size: 0.85rem;
    white-space: nowrap;
}

.app-bar__audit-count {
    background: white;
    color: var(--app-bar-bg);
    border-radius: 50%;
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    text-align: center;
    line-height: 1.5em;
    font-weight: bold;
    font-size: 0.8rem;
}

.app-bar__reset,
.app-bar__provenance {
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: transparent;
    color: white;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.app-bar__reset:hover,
.app-bar__provenance:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* CHROME-03: Data Source Pills */
.data-sources-bar {
    background: #f5f5f5;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.data-sources-bar__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.data-source-pill {
    display: inline-block;
    border-radius: 12px;
    padding: 0.25rem 0.75rem;
    color: white;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.data-source-pill:hover {
    opacity: 0.85;
    color: white;
}

.data-source-pill--noc  { background: var(--pill-noc-bg); }
.data-source-pill--caf  { background: var(--pill-caf-bg); }
.data-source-pill--ochro { background: var(--pill-ochro-bg); }
.data-source-pill--onet { background: var(--pill-onet-bg); }
.data-source-pill--oasis { background: var(--pill-oasis-bg); }

/* CHROME-05: Selections Tab (right edge vertical) */
.selections-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: var(--app-bar-bg);
    color: white;
    padding: 1rem 0.5rem;
    cursor: pointer;
    z-index: 200;
    border-radius: 4px 0 0 4px;
    border: none;
    font-size: 0.9rem;
    font-family: inherit;
    white-space: nowrap;
    transition: background 0.2s;
}

.selections-tab:hover {
    background: #1a2a3a;
}

/* CHROME-06: Compliance Bar */
.compliance-bar {
    background: #f8f9fa;
    padding: 1rem 0;
    border-top: 1px solid #dee2e6;
    margin-top: 2rem;
}

.compliance-bar__text {
    font-size: 0.85rem;
    color: #555;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

/* CHROME-07: App Footer */
.app-footer {
    background: var(--footer-bg);
    color: white;
    padding: 1rem 0;
}

.app-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.app-footer__brand {
    font-size: 0.9rem;
    opacity: 0.9;
}

.app-footer__wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.app-footer .gc-wordmark__text {
    color: white;
}

.app-footer .gc-wordmark__flag {
    color: #ff6b6b;
}

/* CHROME-08: O*NET Attribution */
.onet-attribution {
    background: #f5f5f5;
    padding: 0.5rem 0;
    text-align: center;
    border-top: 1px solid #dee2e6;
}

.onet-attribution__text {
    font-size: 0.75rem;
    color: #777;
}

/* Override old chrome rules that are no longer needed */
.gc-header__search,
.gc-header__nav,
.gc-menu-btn {
    display: none;
}

/* ============================================================
   v5.1 Build Page: Tab Content Styles (27-02)
   ============================================================ */

/* Select All Row — top of each selectable tab panel */
.select-all-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    background: #f8f9fa;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.select-all-row .select-all-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
}
.selection-count {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Sources Row — Core Competencies source attribution */
.sources-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
}
.sources-label {
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.source-chip {
    background: #e8edf2;
    color: var(--secondary);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Level Group Container */
.level-group {
    margin-bottom: 1rem;
}
.level-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #e8edf2;
}
.level-group-count {
    font-size: 0.78rem;
    color: var(--text-light);
}

/* Level Badges — color scheme from v5.1 spec */
.level-badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
}
.level-badge--5 { background: #28a745; }
.level-badge--4 { background: #1976d2; }
.level-badge--3 { background: #f57c00; }
.level-badge--2 { background: #78909c; }
.level-badge--1 { background: #9e9e9e; }
.level-badge--unrated { background: #9e9e9e; }

/* Activity Section Headings — Key Activities tab (Main Duties / Work Activities) */
.activity-section-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1rem 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--primary);
}

/* Sub-descriptions displayed below each statement label */
.statement__description {
    display: block;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 0.2rem;
    line-height: 1.4;
}

/* ============================================================
   Build Navigation Bar (NAV-01)
   ============================================================ */
.build-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #fff;
    border-top: 2px solid var(--border, #e0e0e0);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    z-index: 40;
}

.build-nav-bar.hidden {
    display: none;
}

.build-nav-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.build-nav-bar__btn--back {
    background: transparent;
    color: var(--primary, #1a3a5c);
    border: 1px solid var(--border, #e0e0e0);
}

.build-nav-bar__btn--back:hover {
    background: #f5f7fa;
}

.build-nav-bar__btn--preview {
    background: var(--primary, #1a3a5c);
    color: #fff;
}

.build-nav-bar__btn--preview:hover {
    background: #15304d;
}

.build-nav-bar__btn--forward {
    background: var(--accent, #2563eb);
    color: #fff;
}

.build-nav-bar__btn--forward:hover {
    background: #1d4ed8;
}

/* Add bottom padding to Build content so it doesn't get hidden behind fixed nav bar */
.profile-tabs-container:not(.hidden) {
    padding-bottom: 5rem;
}

/* Classify navigation actions (NAV-04) */
.classify-nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #e0e0e0);
}

/* Generate navigation actions (NAV-05) */
.generate-nav-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border, #e0e0e0);
}

/* JD Preview Modal (PREV-01, PREV-02) */
.jd-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jd-preview-modal.hidden {
    display: none;
}

.jd-preview-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.jd-preview-modal__container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.jd-preview-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border, #e0e0e0);
    background: #f8f9fa;
}

.jd-preview-modal__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text, #333);
    margin: 0;
}

.jd-preview-modal__close {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 6px;
    color: var(--primary, #1a3a5c);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
}

.jd-preview-modal__close:hover {
    background: #f0f0f0;
}

.jd-preview-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.jd-preview-modal__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border, #e0e0e0);
    background: #f8f9fa;
}

.jd-preview-modal__export-btns {
    display: flex;
    gap: 0.5rem;
}

body.modal-open {
    overflow: hidden;
}

/* Preview JD content styling */
.preview-jd__header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary, #1a3a5c);
}

.preview-jd__title {
    font-size: 1.3rem;
    color: var(--primary, #1a3a5c);
    margin: 0 0 0.25rem 0;
}

.preview-jd__noc {
    font-size: 0.85rem;
    color: var(--text-light, #666);
    font-weight: 500;
}

.preview-jd__lead {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--text, #333);
    line-height: 1.5;
}

.preview-jd__position {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.preview-jd__section {
    margin-bottom: 1.25rem;
}

.preview-jd__section h4 {
    font-size: 1rem;
    color: var(--primary, #1a3a5c);
    margin: 0 0 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e8e8e8;
}

.preview-jd__count {
    font-weight: 400;
    color: var(--text-light, #666);
    font-size: 0.85rem;
}

.preview-jd__list {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0;
}

.preview-jd__list li {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text, #333);
}

.preview-jd__empty {
    color: var(--text-light, #666);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* ============================================================
   Export Page (Step 5)
   ============================================================ */
.export-section { padding: 0; }

.export-page {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.export-page__header { margin-bottom: 0.25rem; }

.export-page__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-navy, #1a2332);
    margin: 0 0 0.25rem;
}

.export-page__subtitle {
    color: #555;
    margin: 0;
    font-size: 0.95rem;
}

/* JD Preview Card */
.export-preview-card {
    border: 1px solid #dde3ea;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    background: #fff;
    max-height: 320px;
    overflow-y: auto;
}

.export-preview-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.export-preview-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a2332;
    margin: 0 0 0.2rem;
}

.export-preview-card__noc {
    font-size: 0.8rem;
    color: #666;
    font-family: monospace;
}

.export-preview-card__badges {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.export-preview-card__overview {
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 6px;
    border-left: 3px solid #1976d2;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #333;
}

.export-preview-card__overview p { margin: 0; }

.export-preview-card__selections { font-size: 0.875rem; color: #444; }

.export-preview-card__selections ul {
    margin: 0.25rem 0 0.75rem 1.25rem;
    padding: 0;
}

.export-preview-card__sel-heading {
    font-weight: 600;
    color: #1a2332;
    margin: 0.5rem 0 0.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Compliance Cards */
.export-compliance-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

@media (max-width: 700px) {
    .export-compliance-cards { grid-template-columns: 1fr; }
}

.export-compliance-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.export-compliance-card--dama {
    background: #f0faf2;
    border-color: #4caf50;
}

.export-compliance-card--tbs {
    background: #f0f4fa;
    border-color: #1a2332;
}

.export-compliance-card--lineage {
    background: #f5f0fa;
    border-color: #7b1fa2;
}

.export-compliance-card__icon { font-size: 1.4rem; margin-top: 0.1rem; }

.export-compliance-card--dama .export-compliance-card__icon { color: #2e7d32; }
.export-compliance-card--tbs .export-compliance-card__icon { color: #1a2332; }
.export-compliance-card--lineage .export-compliance-card__icon { color: #7b1fa2; }

.export-compliance-card__title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a2332;
    margin-bottom: 0.2rem;
}

.export-compliance-card__desc { font-size: 0.8rem; color: #555; line-height: 1.4; }

/* Export Options */
.export-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.export-options__label {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a2332;
}

.export-option-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
}

.export-option-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #1976d2;
    cursor: pointer;
}

/* Download Buttons */
.export-download-btns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn--export-pdf,
.btn--export-docx,
.btn--export-json {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.4rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    transition: opacity 0.15s, transform 0.1s;
    width: 100%;
}

.btn--export-pdf { background: #c62828; color: #fff; }
.btn--export-docx { background: #1565c0; color: #fff; }
.btn--export-json { background: transparent; color: #1a2332; border: 2px solid #c7d0dc; }

.btn--export-pdf:hover { opacity: 0.9; }
.btn--export-docx:hover { opacity: 0.9; }
.btn--export-json:hover { background: #f0f4fa; }

.btn--export-pdf i,
.btn--export-docx i,
.btn--export-json i { font-size: 1.2rem; flex-shrink: 0; }

.btn--export-pdf small,
.btn--export-docx small,
.btn--export-json small {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.85;
    margin-left: auto;
}

.export-nav-actions {
    display: flex;
    justify-content: flex-start;
    padding-top: 0.5rem;
}
