* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #028090 0%, #00A896 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: clip;
}

.header {
    background: linear-gradient(135deg, #028090 0%, #00A896 100%);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.header p {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

.subtitle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 14px;
    opacity: 0.9;
}

.main-content {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    flex: 1;
    align-items: start;
}

.how-it-works-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    opacity: 0.95;
    transition: all 0.3s ease;
    padding: 8px 14px;
    white-space: nowrap;
}

.how-it-works-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.3);
}

.save-progress-btn {
    background: linear-gradient(135deg, rgba(0,168,150,.18), rgba(0,212,170,.12));
    border: 1px solid rgba(0,212,170,.35);
    color: #00d4aa;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.save-progress-btn:hover {
    background: linear-gradient(135deg, rgba(0,168,150,.3), rgba(0,212,170,.22));
    border-color: rgba(0,212,170,.6);
    box-shadow: 0 0 14px rgba(0,212,170,.18);
    transform: translateY(-1px);
}
.save-progress-btn.saving {
    background: rgba(74,222,128,.12);
    border-color: rgba(74,222,128,.35);
    color: #4ade80;
    pointer-events: none;
}
.save-progress-btn.saved {
    background: rgba(74,222,128,.12);
    border-color: rgba(74,222,128,.35);
    color: #4ade80;
}
.save-notice {
    margin-top: 6px;
    font-size: .72rem;
    color: rgba(255,255,255,.55);
    transition: color .3s;
}
.save-notice.just-saved { color: rgba(39,174,96,.95); }

.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    display: none;
}

.welcome-overlay.show {
    display: flex;
}

.welcome-modal {
    background: white;
    border-radius: 16px;
    padding: 35px;
    width: 90%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: welcomeFadeIn 0.3s ease;
}

@keyframes welcomeFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-modal h2 {
    color: #028090;
    margin-bottom: 15px;
    font-size: 24px;
}

.welcome-modal p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 12px;
    font-size: 15px;
}

.welcome-modal .welcome-note {
    font-size: 14px;
    color: #666;
}

.welcome-dismiss-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #028090 0%, #00A896 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.welcome-dismiss-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 128, 144, 0.3);
}

.welcome-dismiss-button:active {
    transform: translateY(0);
}

.assessment-section {
    margin-bottom: 40px;
}

.control-header {
    background: #028090;
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    user-select: none;
}

.control-header:hover {
    background: #01697a;
}

.control-number {
    background: white;
    color: #028090;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}

.control-title {
    flex: 1;
}

.control-title h3 {
    font-size: 22px;
    margin-bottom: 4px;
}

.control-title p {
    font-size: 14px;
    opacity: 0.9;
}

.toggle-icon {
    font-size: 24px;
    transition: transform 0.3s;
}

.toggle-icon.expanded {
    transform: rotate(180deg);
}

.control-content {
    background: #f8f9fa;
    border: 2px solid #028090;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 25px;
    display: none;
}

/* ── CE advisor notes (collapsed toggle per question) ── */
.ce-notes-wrap {
    margin-top: 10px;
}

.ce-notes-toggle {
    background: none;
    border: none;
    padding: 2px 0;
    font-size: 0.78rem;
    font-family: inherit;
    color: #028090;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.15s;
}

.ce-notes-toggle:hover {
    opacity: 1;
}

.ce-notes-field {
    margin-top: 6px;
}

.ce-notes-field textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid rgba(2, 128, 144, 0.35);
    border-radius: 5px;
    background: rgba(2, 128, 144, 0.04);
    color: inherit;
    font-size: 0.82rem;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.ce-notes-field textarea:focus {
    outline: none;
    border-color: #028090;
    background: rgba(2, 128, 144, 0.07);
}

.control-content.expanded {
    display: block;
}

.question {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 6px;
    border-left: 4px solid #00A896;
}

.question-text {
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 16px;
}

.question-help {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
    padding-left: 10px;
    border-left: 2px solid #ddd;
}

.ask-consultant-btn {
    margin-top: 12px;
    background: none;
    color: #028090;
    border: 1px solid #028090;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ask-consultant-btn:hover {
    background: #028090;
    color: white;
}

.ask-consultant-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.consultant-response {
    display: none;
    margin-top: 10px;
    padding: 14px;
    background: #f0f9fa;
    border-left: 3px solid #028090;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.consultant-response.show {
    display: block;
}

.consultant-response .consultant-answer strong {
    color: #028090;
}

.consultant-response .consultant-loading {
    color: #666;
    font-style: italic;
}

.consultant-response .consultant-error {
    color: #dc3545;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.option:hover {
    border-color: #028090;
    background: #f0f9fa;
}

.option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.option.selected {
    border-color: #028090;
    background: #f0f9fa;
    font-weight: 500;
}

.option.fail {
    border-color: #dc3545;
    background: #fff5f5;
}

.text-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: #028090;
}

.text-input.validation-error {
    border-color: #dc3545;
    background: #fff5f5;
}

.text-input.validation-error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.validation-error-msg {
    color: #dc3545;
    font-size: 13px;
    margin-top: 6px;
    font-weight: 600;
}

.required-indicator {
    color: #dc3545;
    margin-left: 4px;
    font-weight: bold;
}

.analyze-button {
    background: linear-gradient(135deg, #028090 0%, #00A896 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.analyze-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(2, 128, 144, 0.3);
}

.analyze-button:active {
    transform: translateY(0);
}

.analyze-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.results {
    margin-top: 30px;
    padding: 30px;
    background: white;
    border-radius: 8px;
    border: 2px solid #ddd;
    display: none;
}

.results.show {
    display: block;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-status {
    font-size: 48px;
    margin-bottom: 15px;
}

.result-status.pass {
    color: #28a745;
}

.result-status.fail {
    color: #dc3545;
}

.result-status.partial {
    color: #ffc107;
}

.result-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-subtitle {
    font-size: 18px;
    color: #666;
}

.score-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.score-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e0e0e0;
}

.score-value {
    font-size: 36px;
    font-weight: bold;
    color: #028090;
    margin-bottom: 5px;
}

.score-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.issues-section {
    margin-bottom: 30px;
}

.issue-category {
    margin-bottom: 20px;
}

.issue-category h3 {
    color: #dc3545;
    margin-bottom: 15px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.issue-item {
    background: #fff5f5;
    border-left: 4px solid #dc3545;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.issue-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.issue-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.issue-action {
    background: white;
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    border: 1px solid #dc3545;
}

.issue-action strong {
    color: #dc3545;
}

.recommendations {
    background: #f0f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #028090;
}

.recommendations h3 {
    color: #028090;
    margin-bottom: 15px;
    font-size: 20px;
}

.recommendation-item {
    margin-bottom: 15px;
    padding-left: 25px;
    position: relative;
}

.recommendation-item:before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #028090 0%, #00A896 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.ai-analysis {
    background: #fff9e6;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.ai-icon {
    font-size: 24px;
}

.ai-title {
    font-size: 18px;
    font-weight: bold;
    color: #856404;
}

.ai-content {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.loading {
    display: inline-block;
    margin-left: 10px;
}

.loading:after {
    content: '.';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

.export-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.export-button {
    flex: 1;
    padding: 12px 24px;
    border: 2px solid #028090;
    background: white;
    color: #028090;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
}

.export-button:hover {
    background: #028090;
    color: white;
}

/* Save/Load bar */
.save-load-bar {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.save-load-bar .export-button.danger {
    border-color: #dc3545;
    color: #dc3545;
}

.save-load-bar .export-button.danger:hover {
    background: #dc3545;
    color: white;
}

/* Risk Overview — Radar Chart + Heatmap */
.risk-overview-section {
    margin-bottom: 30px;
}

.risk-overview {
    display: flex;
    align-items: center;
    gap: 30px;
}

.radar-chart-container {
    flex: 0 0 auto;
    width: 300px;
    overflow: visible;
}

.radar-chart-container svg {
    width: 100%;
    height: auto;
}

.risk-heatmap {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.heatmap-cell {
    padding: 16px 12px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
}

.heatmap-cell:hover {
    transform: translateY(-2px);
}

.heatmap-score {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.heatmap-label {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
}

.heatmap-status {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.heatmap-cell.status-pass {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.heatmap-cell.status-warn {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.heatmap-cell.status-fail {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Conditional follow-up questions (smart branching) */
.conditional-question {
    margin-left: 24px;
    border-left: 4px dashed #80c5ce;
}

/* Welcome modal step 2 — Supply chain choice buttons */
.supply-chain-choice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.supply-chain-choice .supply-chain-yes {
    background: linear-gradient(135deg, #028090 0%, #00A896 100%);
}

.supply-chain-choice .supply-chain-no {
    background: #fff;
    color: #666;
    border: 2px solid #ddd;
}

.supply-chain-choice .supply-chain-no:hover {
    background: #f8f9fa;
    box-shadow: none;
    transform: none;
}

/* Header toggle — supply chain on/off */
.supply-chain-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    white-space: nowrap;
    opacity: 0.95;
    transition: all 0.3s ease;
}

.supply-chain-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
}

.supply-chain-toggle.active {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.7);
}

/* Supply chain section header */
.supply-chain-header {
    background: #1a6b78;
}

.supply-chain-header:hover {
    background: #145761;
}

.supply-chain-intro {
    padding: 15px;
    margin-bottom: 15px;
    background: #e8f8fa;
    border-radius: 6px;
    border-left: 4px solid #028090;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* Vendor card — accordion style */
.vendor-card {
    background: white;
    border: 2px solid #028090;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.vendor-card-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f0f9fa;
    cursor: pointer;
    user-select: none;
    gap: 12px;
}

.vendor-card-header:hover {
    background: #e0f3f5;
}

.vendor-name {
    font-weight: 600;
    font-size: 16px;
    color: #028090;
    flex: 1;
}

.vendor-access-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
    background: #e8f8fa;
    color: #028090;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.vendor-risk-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    text-transform: uppercase;
}

.vendor-risk-badge.risk-low {
    background: #d4edda;
    color: #155724;
}

.vendor-risk-badge.risk-medium {
    background: #fff3cd;
    color: #856404;
}

.vendor-risk-badge.risk-high {
    background: #f8d7da;
    color: #721c24;
}

.vendor-toggle-icon {
    font-size: 16px;
    transition: transform 0.3s;
    color: #028090;
}

.vendor-toggle-icon.expanded {
    transform: rotate(180deg);
}

.vendor-card-body {
    display: none;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

.vendor-card-body.expanded {
    display: block;
}

.vendor-remove-btn {
    background: none;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.2s;
}

.vendor-remove-btn:hover {
    background: #dc3545;
    color: white;
}

/* Add vendor button */
.add-vendor-btn {
    width: 100%;
    padding: 14px;
    border: 2px dashed #028090;
    background: white;
    color: #028090;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.add-vendor-btn:hover {
    background: #f0f9fa;
    border-style: solid;
}

/* Add vendor modal form fields */
.add-vendor-modal {
    max-width: 480px;
}

.vendor-form-field {
    margin-bottom: 15px;
}

.vendor-form-field label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 14px;
}

.vendor-form-field select.text-input {
    appearance: auto;
}

/* Vendor question styling within vendor cards */
.vendor-question {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 3px solid #028090;
}

.vendor-question .question-text {
    font-size: 14px;
    margin-bottom: 10px;
}

.vendor-question .options {
    gap: 8px;
}

.vendor-question .option {
    padding: 10px 12px;
    font-size: 13px;
}

/* Vendor risk table in results */
.vendor-risk-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.vendor-risk-table th {
    background: #028090;
    color: white;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.vendor-risk-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.vendor-risk-table tr:nth-child(even) {
    background: #f8f9fa;
}

.vendor-risk-table .risk-cell {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
}

.vendor-risk-table .risk-cell.low { color: #155724; }
.vendor-risk-table .risk-cell.medium { color: #856404; }
.vendor-risk-table .risk-cell.high { color: #721c24; }

/* =============================================
   PROGRESS TRACKER — Sticky sidebar + mobile bar
   ============================================= */
.progress-tracker {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    background: white;
    border-right: 1px solid #e0e0e0;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.progress-ring { width: 72px; height: 72px; }
.progress-ring-bg { fill: none; stroke: #e0e0e0; stroke-width: 8; }
.progress-ring-fill {
    fill: none;
    stroke: #028090;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 213.6;
    stroke-dashoffset: 213.6;
    transform: rotate(-90deg);
    transform-origin: 40px 40px;
    transition: stroke-dashoffset 0.4s ease;
}
.progress-ring-label { font-size: 1.1rem; font-weight: 700; color: #028090; }
.progress-ring-sub { font-size: .72rem; color: #888; }
.progress-sections { display: flex; flex-direction: column; gap: 2px; }

.progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: .83rem;
}

.progress-row:hover {
    background: #f5f5f5;
}

.progress-row-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e0e0e0;
    flex-shrink: 0;
}

.progress-row-badge.complete { background: #28a745; }
.progress-row-badge.partial { background: #ffc107; }
.progress-row-badge.started { background: #80c4cc; }

.progress-row-name { flex: 1; color: #333; }
.progress-row-count { font-size: .75rem; color: #888; }

.assessment-sections { padding: 24px 28px; display: flex; flex-direction: column; gap: 16px; }

/* Remediation tracker sits above the form — needs horizontal padding to match assessment-sections */
#remediation-tracker-panel:not(:empty) {
    padding: 0 28px;
    margin-top: 0;
    margin-bottom: 0;
}

/* Mobile progress bar — hidden on desktop */
.progress-mobile-bar {
    display: none;
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .progress-tracker {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .progress-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #028090 0%, #00A896 100%);
        color: white;
        padding: 12px 20px;
        z-index: 999;
        cursor: pointer;
        font-weight: 600;
        font-size: 14px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    }

    .progress-mobile-arrow {
        font-size: 12px;
        transition: transform 0.3s;
    }

    .progress-mobile-arrow.expanded {
        transform: rotate(180deg);
    }

    /* When mobile dropdown is open, show tracker as a bottom sheet */
    .progress-tracker.mobile-expanded {
        display: block;
        position: fixed;
        bottom: 48px;
        left: 0;
        right: 0;
        width: auto;
        margin: 0;
        border-radius: 12px 12px 0 0;
        z-index: 998;
        max-height: 60vh;
        overflow-y: auto;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    }

    .assessment-sections { padding: 16px; }

    .score-summary {
        grid-template-columns: 1fr;
    }

    .export-buttons {
        flex-direction: column;
    }

    .save-load-bar {
        flex-direction: column;
    }

    .risk-overview {
        flex-direction: column;
    }

    .radar-chart-container {
        width: 100%;
        max-width: 300px;
    }

    .supply-chain-choice {
        flex-direction: column;
    }
}

@media print {
    body {
        background: white;
        padding: 0 !important;       /* override nav-auth.js body { padding-top: 40px !important } */
        padding-top: 0 !important;
    }

    /* Hide nav bar injected by nav-auth.js */
    #sch-nav-bar {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
    }

    .header,
    .assessment-section,
    .analyze-button,
    .export-buttons,
    .save-load-bar,
    .welcome-overlay,
    #add-vendor-overlay,
    #pdf-instructions-overlay,
    .progress-tracker,
    .progress-mobile-bar,
    .ask-consultant-btn,
    .consultant-response,
    #remediation-tracker-panel {
        display: none !important;
    }

    /* Vendor risk table in results */
    .vendor-risk-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    .vendor-risk-table th,
    .vendor-risk-table td {
        padding: 8px 10px;
    }

    .container {
        box-shadow: none;
        border-radius: 0;
        overflow: visible;
        max-width: none;
    }

    .results {
        display: block !important;
        margin: 0;
        padding: 20px;
        border: none;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .progress-bar {
        display: none !important;
    }

    /* Keep headings attached to the content that follows */
    h3 {
        page-break-after: avoid;
        break-after: avoid;
    }

    .result-header {
        page-break-after: avoid;
        break-after: avoid;
    }

    /* Protect individual atomic boxes from splitting across pages */
    .summary-box,
    .score-card,
    .issue-item,
    .warning-item,
    .recommendation-item,
    .appendix-item,
    .heatmap-cell,
    .score-summary,
    .risk-overview-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    /* Allow sections with many items to flow across pages naturally */
    .issues-section,
    .issue-category,
    .warnings-section,
    .recommendations,
    .vendor-risk-section {
        page-break-inside: auto;
        break-inside: auto;
    }

    /* Allow breaks between individual warning/issue items */
    .issue-item,
    .warning-item,
    .recommendation-item {
        page-break-before: auto;
        page-break-after: auto;
        break-before: auto;
        break-after: auto;
    }

    /* Force each major result block to start cleanly — don't orphan headings */
    .issues-section,
    .warnings-section,
    .recommendations,
    .vendor-risk-section {
        break-before: avoid-page;
    }

    /* Company name header — match print padding (20px, not 30px) */
    #company-name-header {
        margin-left: -20px !important;
        margin-right: -20px !important;
        margin-top: -20px !important;
        border-radius: 0 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Flex/grid containers must be display:block for break-inside to work on children */
    .main-content,
    .assessment-sections,
    .score-summary,
    .risk-overview,
    .issues-section,
    .warnings-section,
    .recommendations,
    .vendor-risk-section,
    .risk-overview-section {
        display: block !important;
    }

    /* Score cards — lay out as inline-block row instead of grid */
    .score-card {
        display: inline-block;
        width: 30%;
        margin: 0 1% 8px;
        vertical-align: top;
    }

    /* Risk overview — radar + heatmap stacked, each full width */
    .radar-chart-container {
        display: block;
        margin: 0 auto 16px;
        width: 260px;
        overflow: visible;
    }

    /* Risk heatmap — force block so cells can paginate correctly */
    .risk-heatmap {
        display: block !important;
        width: 100%;
    }

    .heatmap-cell {
        padding: 10px 6px;
    }

    .heatmap-score {
        font-size: 20px;
    }

    .heatmap-label {
        font-size: 11px;
    }

    .heatmap-status {
        font-size: 9px;
    }

    .heatmap-cell.status-pass {
        background: #d4edda !important;
        color: #155724 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .heatmap-cell.status-warn {
        background: #fff3cd !important;
        color: #856404 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .heatmap-cell.status-fail {
        background: #f8d7da !important;
        color: #721c24 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .result-status.pass {
        color: #28a745 !important;
    }

    .result-status.fail {
        color: #dc3545 !important;
    }

    .result-status.partial {
        color: #ffc107 !important;
    }

    @page {
        /*
         * Setting margin to 0 removes the browser-default header/footer
         * area where the page URL, date, and page numbers are printed.
         * Content spacing is handled by body padding below instead.
         */
        size: auto;
        margin: 0mm;
    }

    body {
        padding: 2cm;
    }

    /* Prevent browsers from appending URLs after links when printing */
    a[href]::after {
        content: none !important;
    }

    /* Appendix starts on a new page in print */
    #report-appendix {
        page-break-before: always;
    }

    /* Sector benchmark always starts the last page */
    .benchmark-block { page-break-before: always; }
}
}

/* ── CE → CRMA "What's next?" promotional card ── */
.ce-next-step-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #0e1e2e;
    border: 1.5px solid rgba(0, 168, 120, .35);
    border-left: 4px solid #00a878;
    border-radius: 10px;
    padding: 22px 24px;
    margin: 24px 0 0;
    max-width: 720px;
}
.ce-next-step-icon {
    flex-shrink: 0;
    padding-top: 2px;
}
.ce-next-step-body {
    flex: 1;
}
.ce-next-step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #e8edf2;
    margin-bottom: 6px;
}
.ce-next-step-body p {
    font-size: .88rem;
    color: #8fa3b8;
    line-height: 1.55;
    margin: 0 0 14px;
}
.ce-next-step-btn {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(0, 168, 120, .15);
    color: #00a878;
    border: 1px solid rgba(0, 168, 120, .4);
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.ce-next-step-btn:hover { background: rgba(0, 168, 120, .25); }

/* ── Entra ID inline hints ─────────────────────────────────────────────────── */
.entra-hint {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 0.76rem;
    line-height: 1.45;
    padding: 5px 10px;
    border-radius: 5px;
    margin: 5px 0 10px;
}
.entra-hint--data {
    background: rgba(0, 120, 212, 0.1);
    border-left: 3px solid #0078d4;
    color: #1a3a5c;
}
.entra-hint--licence-required {
    background: rgba(234, 179, 8, 0.07);
    border-left: 3px solid rgba(234, 179, 8, 0.35);
    color: rgba(234, 179, 8, 0.85);
}
.entra-hint-icon {
    flex-shrink: 0;
    font-size: 0.9rem;
    margin-top: 1px;
    opacity: 0.75;
}
@media print { .entra-hint { display: none; } }
