/* ============================================================
   Kaufmann QuickScan — Consolidated Stylesheet
   Brand: background #f5f2e8, navy #1e3a5f, green #355e3b
   Font: Inter (400/500/600/700/800)
   ============================================================ */

/* === RESET & BASE === */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f5f2e8;
    min-height: 100vh;
    padding: 40px 24px;
    color: #1e3a5f;
}
.container { max-width: 900px; margin: 0 auto; }

/* === HEADER === */
.header { text-align: center; margin-bottom: 40px; }
.header h1 { font-size: 36px; font-weight: 700; color: #1e3a5f; margin-bottom: 6px; }
.header .subtitle { font-size: 15px; color: #6b7c8f; }

/* === APP TAB NAVIGATION === */
.app-tabs {
    display: flex; background: white; border-radius: 12px; padding: 6px;
    margin-bottom: 24px; box-shadow: 0 2px 8px rgba(30,58,95,0.08); gap: 6px;
}
.app-tab {
    flex: 1; padding: 14px 12px; border: none; border-radius: 8px;
    font-size: 15px; font-weight: 600; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.2s; background: transparent; color: #6b7c8f;
    text-align: center; position: relative;
}
.app-tab.active { background: #1e3a5f; color: white; }
.app-tab:hover:not(.active):not(.locked) { background: #e8f0e9; color: #355e3b; }
.app-tab.locked { opacity: 0.5; cursor: not-allowed; }
.app-tab .tab-icon { display: block; font-size: 18px; margin-bottom: 2px; }
.app-tab .tab-check {
    position: absolute; top: 6px; right: 8px; width: 18px; height: 18px;
    border-radius: 50%; background: #355e3b; color: white; font-size: 11px;
    font-weight: 700; display: none; align-items: center; justify-content: center;
}
.app-tab .tab-check.visible { display: flex; }

/* Tab content panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* Locked assessment message */
.locked-message {
    background: white; border-radius: 12px; padding: 48px 32px;
    text-align: center; box-shadow: 0 2px 8px rgba(30,58,95,0.08);
}
.locked-message .lock-icon { font-size: 48px; margin-bottom: 16px; }
.locked-message h2 { font-size: 22px; font-weight: 700; color: #1e3a5f; margin-bottom: 12px; }
.locked-message p { font-size: 16px; color: #6b7c8f; line-height: 1.6; max-width: 480px; margin: 0 auto 24px; }

/* === PROGRESS BAR === */
.progress-container {
    background: white; border-radius: 12px; padding: 20px 24px;
    margin-bottom: 32px; box-shadow: 0 2px 8px rgba(30,58,95,0.08);
}
.progress-label {
    display: flex; justify-content: space-between; margin-bottom: 10px;
    font-size: 15px; font-weight: 600; color: #1e3a5f;
}
.progress-bar { height: 12px; background: #e8e8e8; border-radius: 6px; overflow: hidden; }
.progress-fill {
    height: 100%; background: linear-gradient(to right, #355e3b, #4a7c59);
    border-radius: 6px; transition: width 0.4s ease; width: 0%;
}

/* === SCOREBOARD STRIP (Discovery) === */
.scoreboard-strip {
    background: white; border-radius: 12px; padding: 16px 24px;
    margin-bottom: 32px; box-shadow: 0 2px 8px rgba(30,58,95,0.08);
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    flex-wrap: wrap;
}
.scoreboard-item {
    display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6b7c8f;
}
.scoreboard-count {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%; font-weight: 700; font-size: 14px;
    background: #e8f0e9; color: #355e3b; transition: all 0.3s;
}
.scoreboard-count.active { background: #355e3b; color: white; }
.scoreboard-total {
    font-size: 15px; font-weight: 700; color: #1e3a5f;
    padding: 6px 16px; background: #e8f0e9; border-radius: 20px;
}

/* === SECTION ACCORDION (shared) === */
.section {
    background: white; border-radius: 12px; margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); overflow: hidden;
    border: 2px solid transparent; transition: border-color 0.3s;
}
.section.active { border-color: #355e3b; }
.section.has-items,
.section.completed { border-color: #355e3b; }
.section.has-items .section-header,
.section.completed .section-header { background: #e8f0e9; }
.section-header {
    display: flex; align-items: center; gap: 16px; padding: 20px 24px;
    cursor: pointer; transition: background-color 0.2s; user-select: none;
}
.section-header:hover { background-color: rgba(53,94,59,0.04); }
.section-number {
    width: 44px; height: 44px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-weight: 700;
    font-size: 18px; flex-shrink: 0; background: #e8f0e9; color: #355e3b;
}
.section.has-items .section-number,
.section.completed .section-number { background: #355e3b; color: white; }
.section-title-area { flex: 1; }
.section-title { font-size: 20px; font-weight: 600; color: #1e3a5f; margin-bottom: 4px; }
.section-subtitle { font-size: 14px; color: #5a7a6b; }
.section-expand {
    width: 36px; height: 36px; border-radius: 50%; background: #e8f0e9;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s, background-color 0.2s; flex-shrink: 0;
}
.section.expanded .section-expand { transform: rotate(180deg); background: #355e3b; }
.section-expand svg { width: 18px; height: 18px; stroke: #355e3b; }
.section.expanded .section-expand svg { stroke: white; }
.section-badge {
    font-size: 12px; font-weight: 700; color: #fff; background: #355e3b;
    border-radius: 12px; padding: 3px 10px; min-width: 24px; text-align: center;
    display: none;
}
.section-badge.visible { display: inline-block; }

/* Section Content */
.section-content {
    display: none; padding: 0 24px 24px 24px; animation: fadeIn 0.3s ease;
}
.section.expanded .section-content { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* === DISCOVERY: ISSUE CHECKBOX ROWS === */
.issue-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border-radius: 8px; cursor: pointer; transition: background-color 0.15s;
    margin-bottom: 4px;
}
.issue-row:hover { background-color: rgba(53,94,59,0.04); }
.issue-row.selected { background-color: rgba(53,94,59,0.10); }
.issue-checkbox {
    width: 20px; height: 20px; border: 2px solid #c0c0c0; border-radius: 4px;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.issue-row.selected .issue-checkbox {
    border-color: #355e3b; background-color: #355e3b;
}
.issue-row.selected .issue-checkbox::after {
    content: '\2713'; color: #fff; font-size: 13px; font-weight: 700;
}
.issue-label { font-size: 16px; color: #1e3a5f; line-height: 1.3; }
.issue-row.selected .issue-label { font-weight: 600; }

/* === DISCOVERY: ISSUE DETAIL CARD === */
.issue-detail {
    display: none; background: #fafafa; border: 1px solid #e8e8e8;
    border-radius: 10px; margin: 8px 0 16px 32px; padding: 20px;
    animation: fadeIn 0.3s ease;
}
.issue-detail.visible { display: block; }
.issue-detail-title {
    font-size: 14px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: #355e3b; margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 2px solid #e8f0e9;
}
.discussion-field { margin-bottom: 14px; }
.discussion-field:last-child { margin-bottom: 0; }
.discussion-label {
    font-size: 15px; font-weight: 600; color: #1e3a5f; margin-bottom: 6px;
}
.discussion-textarea {
    width: 100%; padding: 10px 14px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 15px; font-family: 'Inter', sans-serif; color: #1e3a5f;
    resize: vertical; min-height: 60px; transition: border-color 0.2s;
}
.discussion-textarea:focus { outline: none; border-color: #355e3b; }
.discussion-textarea::placeholder { color: #b0b0b0; font-style: italic; }

/* === DISCOVERY: TRIGGERS === */
.trigger-section {
    margin-top: 16px; border-top: 1px solid #e0e0e0; padding-top: 14px;
}
.trigger-header {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; padding: 8px 0; user-select: none;
}
.trigger-header-text { font-size: 14px; font-weight: 600; color: #355e3b; }
.trigger-arrow {
    font-size: 12px; color: #355e3b; transition: transform 0.2s; display: inline-block;
}
.trigger-arrow.open { transform: rotate(90deg); }
.trigger-badge {
    font-size: 11px; font-weight: 700; color: #fff; background: #355e3b;
    border-radius: 10px; padding: 2px 7px; margin-left: 8px; display: none;
}
.trigger-badge.visible { display: inline-block; }
.trigger-list { display: none; padding-top: 8px; }
.trigger-list.open { display: block; }
.trigger-intro {
    font-size: 13px; color: #6b7c8f; line-height: 1.5; margin-bottom: 10px;
    padding: 10px 14px; background: rgba(53,94,59,0.03); border-radius: 6px;
}
.trigger-item {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px;
    border-bottom: 1px solid #f0f0f0; cursor: pointer; transition: background-color 0.15s;
}
.trigger-item:last-child { border-bottom: none; }
.trigger-item:hover { background-color: rgba(53,94,59,0.03); }
.trigger-item.checked { background-color: rgba(53,94,59,0.06); }
.trigger-check {
    width: 16px; height: 16px; border: 2px solid rgba(0,0,0,0.25); border-radius: 3px;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; margin-top: 2px;
}
.trigger-item.checked .trigger-check {
    border-color: #355e3b; background-color: #355e3b;
}
.trigger-item.checked .trigger-check::after {
    content: '\2713'; color: #fff; font-size: 10px; font-weight: 700;
}
.trigger-info { flex: 1; }
.trigger-label-text { font-size: 14px; color: #1e3a5f; font-weight: 500; }
.trigger-item.checked .trigger-label-text { font-weight: 600; }
.trigger-hint { font-size: 12px; color: #6b7c8f; margin-top: 2px; font-style: italic; }
.trigger-notes { display: none; margin-top: 6px; }
.trigger-item.checked .trigger-notes { display: block; }
.trigger-notes textarea {
    width: 100%; padding: 7px 10px; border: 1px solid #d4d4d4; border-radius: 5px;
    font-size: 13px; font-family: 'Inter', sans-serif; color: #1e3a5f;
    resize: vertical; min-height: 36px;
}
.trigger-notes textarea:focus { outline: none; border-color: #355e3b; }
.trigger-notes textarea::placeholder { color: #b0b0b0; font-style: italic; }

/* === DISCOVERY: AREA BRIEF === */
.area-brief {
    margin-top: 20px; padding-top: 16px; border-top: 2px solid #e8f0e9;
}
.area-brief-label {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: #1e3a5f; margin-bottom: 8px;
}
.area-brief-hint {
    font-size: 12px; color: #6b7c8f; margin-bottom: 8px; font-style: italic;
}
.area-brief textarea {
    width: 100%; padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 15px; font-family: 'Inter', sans-serif; color: #1e3a5f;
    resize: vertical; min-height: 80px; transition: border-color 0.2s;
}
.area-brief textarea:focus { outline: none; border-color: #355e3b; }
.area-brief textarea::placeholder { color: #b0b0b0; font-style: italic; }

/* === DISCOVERY: SPIN QUESTIONS === */
.spin-card {
    background: #fff; border: 2px solid #e8e8e8; border-radius: 10px;
    margin-bottom: 10px; overflow: hidden;
}
.spin-card.active { border-color: #355e3b; }
.spin-header {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    cursor: pointer; transition: background-color 0.15s;
}
.spin-header:hover { background-color: rgba(53,94,59,0.04); }
.spin-arrow { font-size: 12px; color: #6b7c8f; transition: transform 0.2s; width: 16px; }
.spin-ask { font-size: 16px; font-weight: 600; color: #1e3a5f; }
.spin-content { display: none; padding: 0 16px 16px 44px; }
.spin-card.expanded .spin-arrow { transform: rotate(90deg); }
.spin-card.expanded .spin-content { display: block; }

/* === DISCOVERY: CONNECTION MAP === */
.map-container {
    background: white; border-radius: 12px; padding: 24px;
    margin-bottom: 16px; box-shadow: 0 2px 8px rgba(30,58,95,0.08);
    display: none;
}
.map-container.visible { display: block; animation: fadeIn 0.5s ease; }
.map-title { font-size: 20px; font-weight: 700; color: #1e3a5f; margin-bottom: 6px; }
.map-subtitle { font-size: 14px; color: #6b7c8f; margin-bottom: 16px; }
.map-svg-wrap { overflow-x: auto; }
.map-legend {
    display: flex; justify-content: center; gap: 20px; margin-top: 12px; font-size: 12px;
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 16px; height: 16px; border-radius: 4px; border: 1px solid; }
.map-summary {
    text-align: center; margin-top: 16px; padding: 14px;
    background: #e8f0e9; border-radius: 8px;
    font-size: 16px; font-weight: 600; color: #355e3b;
}

/* === DISCOVERY: CATEGORY EXPLORER === */
.explorer-container {
    background: white; border-radius: 12px; padding: 28px 24px;
    margin-bottom: 16px; box-shadow: 0 2px 8px rgba(30,58,95,0.08);
    display: none;
}
.explorer-container.visible { display: block; animation: fadeIn 0.5s ease; }
.explorer-title { font-size: 20px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.explorer-subtitle { font-size: 14px; color: #6b7c8f; margin-bottom: 20px; }
.explorer-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 24px;
}
.explorer-btn {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16px 12px; background: white; border: 2px solid rgba(30,58,95,0.12);
    border-radius: 10px; cursor: pointer; transition: all 0.25s; user-select: none;
    text-align: center;
}
.explorer-btn:hover:not(.disabled) { border-color: #4a7d52; background: #f5f9f5; }
.explorer-btn.active {
    border-color: #355e3b; background: #e8f0e9;
    box-shadow: 0 0 0 3px rgba(53,94,59,0.15);
}
.explorer-btn.disabled { opacity: 0.35; cursor: default; background: #f5f5f5; }
.explorer-btn-name { font-size: 14px; font-weight: 600; color: #1e3a5f; line-height: 1.3; }
.explorer-btn-count {
    font-size: 12px; font-weight: 700; color: #355e3b;
    background: #e8f0e9; padding: 2px 10px; border-radius: 10px;
}
.explorer-btn.disabled .explorer-btn-count { color: #999; background: #eee; }
.explorer-btn.active .explorer-btn-count { background: #355e3b; color: white; }
.explorer-prompt {
    text-align: center; padding: 40px 20px; color: #b0b0b0;
    font-size: 15px; font-style: italic;
}

/* Explorer results */
.explorer-results { display: none; }
.explorer-results.visible { display: block; animation: fadeIn 0.3s ease; }
.explorer-summary {
    text-align: center; padding: 14px 20px; background: #1e3a5f;
    border-radius: 10px; margin-bottom: 20px; color: rgba(245,242,232,0.85);
    font-size: 16px; line-height: 1.5;
}
.explorer-summary strong { color: #fff; }
.explorer-cat-card {
    background: #f5f9f5; border: 1px solid rgba(53,94,59,0.15);
    border-radius: 10px; padding: 14px 18px; margin-bottom: 12px;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.explorer-cat-card.visible { opacity: 1; transform: translateY(0); }
.explorer-cat-name { font-size: 15px; font-weight: 700; color: #355e3b; margin-bottom: 8px; }
.explorer-issue-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.explorer-issue-tag {
    font-size: 12px; font-weight: 600; color: #1e3a5f;
    background: white; border: 1px solid rgba(30,58,95,0.12);
    padding: 4px 10px; border-radius: 6px;
}

/* Explorer pattern cards */
.explorer-pattern-group { margin-bottom: 16px; }
.explorer-pattern-group-label {
    display: inline-block; font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 4px 10px; border-radius: 6px; margin-bottom: 8px;
}
.explorer-pattern-card {
    background: white; border-radius: 8px; padding: 12px 16px;
    margin-bottom: 6px; border-left: 3px solid #ccc;
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.explorer-pattern-card.visible { opacity: 1; transform: translateY(0); }
.explorer-pattern-card.shared {
    background: #f0f7f1; box-shadow: 0 0 0 1px rgba(53,94,59,0.15);
}
.explorer-pattern-name {
    font-size: 15px; font-weight: 700; color: #1e3a5f;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.explorer-pattern-desc { font-size: 14px; color: #4a6d8c; line-height: 1.5; margin-top: 4px; }
.explorer-shared-badge {
    display: inline-block; font-size: 11px; font-weight: 700;
    padding: 2px 8px; border-radius: 10px; background: #355e3b; color: #fff;
}
.explorer-pattern-sources { font-size: 12px; color: #7a9ab5; margin-top: 4px; font-weight: 500; }

.egroup-floor .explorer-pattern-group-label { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }
.egroup-floor .explorer-pattern-card { border-left-color: #f59e0b; }
.egroup-bridge .explorer-pattern-group-label { background: #dbeafe; color: #1e40af; border: 1px solid #3b82f6; }
.egroup-bridge .explorer-pattern-card { border-left-color: #3b82f6; }
.egroup-financial .explorer-pattern-group-label { background: #fce7f3; color: #9d174d; border: 1px solid #ec4899; }
.egroup-financial .explorer-pattern-card { border-left-color: #ec4899; }

/* KC2 Progressive Map (inside explorer) */
.kc2-map {
    margin-top: 20px; display: none;
    background: #ffffff; border-radius: 12px;
    border: 1px solid rgba(30,58,95,0.1);
    padding: 20px 16px 16px;
    box-shadow: 0 2px 12px rgba(30,58,95,0.04);
}
.kc2-map.kc2-show { display: block; animation: fadeIn 0.4s ease; }
.kc2-map-title {
    text-align: center; font-size: 14px; font-weight: 700;
    color: #1e3a5f; margin-bottom: 12px;
    text-transform: uppercase; letter-spacing: 0.8px;
}
.kc2-map svg { display: block; margin: 0 auto; max-width: 100%; height: auto; }
.kc2-map-legend {
    display: flex; justify-content: center; gap: 20px;
    margin-top: 12px; flex-wrap: wrap;
}
.kc2-legend-item { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.kc2-legend-swatch { width: 14px; height: 14px; border-radius: 3px; border: 1.5px solid; }

/* === DISCOVERY: TAB 2 (Detailed Analysis) === */
.tab2-content { display: none; }
.tab2-content.visible { display: block; animation: fadeIn 0.5s ease; }
.tab2-header {
    background: #1e3a5f; border-radius: 12px; padding: 28px;
    margin-bottom: 24px; text-align: center; color: white;
}
.tab2-header h2 { font-size: 26px; font-weight: 700; margin-bottom: 6px; }
.tab2-header p { font-size: 15px; color: rgba(245,242,232,0.7); }
.tab2-section {
    background: white; border-radius: 12px; padding: 24px;
    margin-bottom: 16px; box-shadow: 0 2px 8px rgba(30,58,95,0.08);
}
.tab2-section-title { font-size: 20px; font-weight: 700; color: #1e3a5f; margin-bottom: 6px; }
.tab2-section-subtitle { font-size: 14px; color: #6b7c8f; margin-bottom: 16px; }
.tab2-pattern-card {
    border-left: 3px solid #ccc; background: #fafafa; padding: 14px 18px;
    margin-bottom: 8px; border-radius: 0 8px 8px 0;
}
.tab2-pattern-name { font-size: 16px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.tab2-pattern-desc { font-size: 15px; color: #4a6d8c; line-height: 1.55; }
.tab2-area-card {
    border-left: 3px solid #355e3b; background: #f5f9f5; padding: 14px 18px;
    margin-bottom: 10px; border-radius: 0 8px 8px 0;
}
.tab2-area-name { font-size: 16px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.tab2-area-issues { font-size: 13px; color: #355e3b; font-weight: 600; margin-bottom: 6px; }
.tab2-area-text { font-size: 15px; color: #444; line-height: 1.6; }
.tab2-group-label {
    display: inline-block; font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    padding: 5px 12px; border-radius: 6px; margin-bottom: 10px; border: 1px solid;
}
.tab2-cta {
    background: linear-gradient(135deg, #355e3b, #4a7d52); border-radius: 14px;
    padding: 36px 28px; text-align: center; margin-top: 24px;
    box-shadow: 0 4px 20px rgba(53,94,59,0.2);
}
.tab2-cta h3 { font-size: 22px; font-weight: 700; color: white; margin-bottom: 10px; }
.tab2-cta p {
    font-size: 16px; color: rgba(255,255,255,0.85); line-height: 1.6;
    max-width: 560px; margin: 0 auto 20px;
}
.tab2-cta-btn {
    display: inline-block; background: white; color: #355e3b;
    font-size: 17px; font-weight: 700; padding: 14px 36px; border-radius: 10px;
    text-decoration: none; transition: all 0.2s; border: none; cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.tab2-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }

/* Discovery inner tab bar */
.tab-bar {
    display: none; background: white; border-radius: 12px; padding: 6px;
    margin-bottom: 24px; box-shadow: 0 2px 8px rgba(30,58,95,0.08); gap: 6px;
}
.tab-bar.visible { display: flex; }
.tab-btn {
    flex: 1; padding: 14px 20px; border: none; border-radius: 8px;
    font-size: 16px; font-weight: 600; font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.2s; background: transparent; color: #6b7c8f;
}
.tab-btn.active { background: #355e3b; color: white; }
.tab-btn:hover:not(.active) { background: #e8f0e9; color: #355e3b; }
.tab-btn .tab-badge {
    display: inline-block; background: rgba(255,255,255,0.3); color: white;
    font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 8px;
}

/* === FORM FIELDS (shared) === */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field-row.single { grid-template-columns: 1fr; }
.field-row.triple { grid-template-columns: 1fr 1fr 1fr; }
.field { display: flex; flex-direction: column; }
.field-label { font-size: 15px; font-weight: 600; color: #1e3a5f; margin-bottom: 6px; }
.field-hint { font-size: 13px; color: #7a8a9b; margin-bottom: 6px; }
.field-input {
    width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 16px; font-family: 'Inter', sans-serif; color: #1e3a5f;
    transition: border-color 0.2s;
}
.field-input:focus { outline: none; border-color: #355e3b; }
.field-input::placeholder { color: #b0b0b0; }
.field-select {
    width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 16px; font-family: 'Inter', sans-serif; color: #1e3a5f;
    background: white; cursor: pointer;
}
.field-select:focus { outline: none; border-color: #355e3b; }
.field-textarea {
    width: 100%; padding: 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 16px; font-family: 'Inter', sans-serif; color: #1e3a5f;
    resize: vertical; min-height: 80px;
}
.field-textarea:focus { outline: none; border-color: #355e3b; }
.field-textarea::placeholder { color: #b0b0b0; font-style: italic; }

/* === ASSESSMENT: PREFIX / SUFFIX INPUTS === */
.field-input-with-prefix {
    display: flex; align-items: center; border: 2px solid #e0e0e0;
    border-radius: 8px; overflow: hidden; transition: border-color 0.2s;
}
.field-input-with-prefix:focus-within { border-color: #355e3b; }
.field-prefix {
    padding: 12px 12px 12px 16px; font-size: 16px; color: #7a8a9b;
    background: #f8f8f8; font-weight: 600;
}
.field-input-with-prefix .field-input { border: none; padding-left: 8px; }
.field-input-with-prefix .field-input:focus { outline: none; }

.field-input-with-suffix {
    display: flex; align-items: center; border: 2px solid #e0e0e0;
    border-radius: 8px; overflow: hidden; transition: border-color 0.2s;
}
.field-input-with-suffix:focus-within { border-color: #355e3b; }
.field-suffix {
    padding: 12px 16px 12px 8px; font-size: 14px; color: #7a8a9b;
    background: #f8f8f8; font-weight: 500; white-space: nowrap;
}
.field-input-with-suffix .field-input { border: none; }
.field-input-with-suffix .field-input:focus { outline: none; }

/* === ASSESSMENT: FIELD GROUPS === */
.field-group { margin-bottom: 24px; }
.field-group:last-child { margin-bottom: 0; }
.field-group-title {
    font-size: 14px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: #355e3b; margin-bottom: 16px;
    padding-bottom: 8px; border-bottom: 2px solid #e8f0e9;
}

/* === ASSESSMENT: RADIO GROUP === */
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-option {
    padding: 10px 16px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.2s;
    color: #5a6a7a;
}
.radio-option:hover { border-color: #355e3b; color: #355e3b; }
.radio-option.selected { border-color: #355e3b; background: #355e3b; color: white; }
.radio-hint { font-size: 12px; color: #7a8a9a; font-style: italic; margin-top: 4px; }

/* === ASSESSMENT: RELATED ITEMS SUB-SECTION === */
.related-section {
    background: rgba(53,94,59,0.04); border-radius: 8px; padding: 16px;
    margin-top: 12px; border-left: 3px solid #355e3b;
}
.related-title {
    font-size: 13px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: #355e3b; margin-bottom: 12px; opacity: 0.8;
}
.related-field-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.related-field-row:last-child { margin-bottom: 0; }
.related-field-label { font-size: 13px; font-weight: 600; color: #1e3a5f; margin-bottom: 4px; }
.related-field-hint { font-size: 12px; color: #7a8a9b; margin-bottom: 4px; }

/* ===================================================================
   DISCOVERY MODULE — New class names used by js/discovery.js
   =================================================================== */

/* Wrapper */
.discovery-wrapper { padding-bottom: 32px; }
.progress-text { font-size: 14px; color: #6b7c8f; margin-top: 6px; }

/* Section card (accordion wrapper) */
.section-card {
    background: white; border-radius: 12px; margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); overflow: hidden;
    border: 2px solid transparent; transition: border-color 0.3s;
}
.section-card.has-items,
.section-card.relevant-section { border-color: #355e3b; }
.section-card .section-header { background: transparent; }
.section-card.has-items .section-header,
.section-card.relevant-section .section-header { background: #e8f0e9; }
.section-body { padding: 16px 20px 20px; }
.section-body.collapsed { display: none; }
.section-icon { font-size: 18px; }
.section-chevron {
    margin-left: auto; font-size: 13px; color: #9aabbf;
    transition: transform 0.25s; display: inline-block;
}
.section-chevron.open { transform: rotate(90deg); }
.section-count-badge {
    font-size: 12px; font-weight: 700; color: #355e3b;
    background: #e8f0e9; border-radius: 12px; padding: 3px 10px; margin-left: 4px;
}
.section-intro { font-size: 14px; color: #6b7c8f; margin-bottom: 16px; line-height: 1.5; }

/* Info grid */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.info-field { display: flex; flex-direction: column; }
.info-field label { font-size: 14px; font-weight: 600; color: #1e3a5f; margin-bottom: 5px; }
.optional-tag { font-size: 11px; font-weight: 400; color: #9aabbf; }

/* Text & select inputs */
.text-input, .select-input {
    width: 100%; padding: 10px 14px; border: 2px solid #e0e0e0;
    border-radius: 8px; font-size: 15px; font-family: 'Inter', sans-serif;
    color: #1e3a5f; background: white; transition: border-color 0.2s;
}
.text-input:focus, .select-input:focus { outline: none; border-color: #355e3b; }
.text-input::placeholder { color: #b0b0b0; }

/* Shared note textarea */
.note-area {
    width: 100%; padding: 10px 14px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; font-family: 'Inter', sans-serif; color: #1e3a5f;
    resize: vertical; min-height: 60px; transition: border-color 0.2s;
}
.note-area:focus { outline: none; border-color: #355e3b; }
.note-area::placeholder { color: #b0b0b0; font-style: italic; }

/* Area brief */
.area-brief-container { margin-bottom: 14px; }
.area-brief-label { font-size: 13px; font-weight: 600; color: #355e3b; margin-bottom: 6px; display: block; }
textarea.area-brief, .area-brief textarea {
    width: 100%; padding: 10px 14px; border: 2px solid #e0e8e4;
    border-radius: 8px; font-size: 14px; font-family: 'Inter', sans-serif;
    color: #1e3a5f; resize: vertical; min-height: 56px; background: #fafdf9;
    transition: border-color 0.2s;
}
textarea.area-brief:focus, .area-brief textarea:focus { outline: none; border-color: #355e3b; }
textarea.area-brief::placeholder { color: #b0b0b0; font-style: italic; }

/* Issue rows */
.issue-main {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    cursor: pointer; transition: background-color 0.15s; user-select: none;
}
.issue-main:hover { background-color: rgba(53,94,59,0.04); }
.issue-row.selected .issue-main { background-color: rgba(53,94,59,0.08); }
.issue-check {
    width: 20px; height: 20px; border: 2px solid #c0c0c0; border-radius: 4px;
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: transparent; transition: all 0.15s;
}
.issue-check.checked { border-color: #355e3b; background: #355e3b; color: white; }
.issue-text { flex: 1; }
.issue-hint { font-size: 12px; color: #6b7c8f; margin-top: 2px; display: block; }

/* Issue detail card */
.issue-detail-card {
    margin: 0 16px 12px; padding: 16px; background: #fafdf9;
    border: 1px solid #d8eedd; border-radius: 8px;
    animation: fadeIn 0.25s ease;
}
.discuss-field { margin-bottom: 12px; }
.discuss-field:last-child { margin-bottom: 0; }
.discuss-label { font-size: 13px; font-weight: 600; color: #1e3a5f; margin-bottom: 5px; display: block; }

/* Triggers accordion */
.triggers-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; cursor: pointer; background: #f0faf0;
    border-radius: 6px; margin-bottom: 4px; user-select: none;
}
.triggers-label { font-size: 13px; font-weight: 600; color: #355e3b; }
.triggers-chevron { font-size: 11px; color: #355e3b; transition: transform 0.2s; }
.triggers-body { padding: 4px 0 4px 4px; }
.trigger-row {
    display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px;
    margin-bottom: 3px; border: 1px solid transparent; transition: background 0.15s;
}
.trigger-row.checked { background: rgba(53,94,59,0.05); border-color: rgba(53,94,59,0.12); }
.trigger-main { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.trigger-label { font-size: 13px; color: #3d5060; line-height: 1.35; }
.trigger-row.checked .trigger-label { font-weight: 600; color: #1e3a5f; }
.trigger-note {
    width: 100%; margin-top: 6px; padding: 7px 10px;
    border: 1px solid #d0dce8; border-radius: 5px; font-size: 13px;
    font-family: 'Inter', sans-serif; color: #1e3a5f; resize: vertical; min-height: 36px;
}
.trigger-note:focus { outline: none; border-color: #355e3b; }
.trigger-note::placeholder { color: #b0b0b0; font-style: italic; }

/* SPIN questions */
.spin-row { border-bottom: 1px solid #f0f0f0; }
.spin-row:last-child { border-bottom: none; }
.spin-question-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; cursor: pointer; user-select: none; transition: background 0.15s;
}
.spin-question-header:hover { background: rgba(53,94,59,0.03); }
.spin-question-text { font-size: 14px; font-weight: 600; color: #1e3a5f; flex: 1; line-height: 1.4; }
.spin-chevron { font-size: 11px; color: #9aabbf; transition: transform 0.2s; margin-left: 8px; flex-shrink: 0; }
.spin-note-area { padding: 4px 14px 14px; }

/* Pattern explorer */
.explorer-section {
    background: white; border-radius: 12px; margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); overflow: hidden;
    animation: fadeIn 0.3s ease;
}
.explorer-header { padding: 20px 24px 12px; }
.explorer-header h3 { font-size: 18px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.explorer-map-container { padding: 16px 20px; background: #fafafa; border-top: 1px solid #eee; }

/* Actions bar */
.actions-bar {
    display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; padding: 16px 0;
}

/* ===================================================================
   ASSESSMENT MODULE — New class names used by js/assessment.js
   =================================================================== */

.assessment-wrapper { padding-bottom: 32px; }
.assessment-header { margin-bottom: 20px; }
.assessment-header h2 { font-size: 1.5rem; font-weight: 700; color: #1e3a5f; margin-bottom: 6px; }
.assessment-intro { font-size: 0.95rem; color: #5a7090; line-height: 1.55; }
.assessment-relevance-note {
    background: #e8f5e9; border: 1.5px solid #a5d6a7;
    border-radius: 8px; padding: 12px 16px; margin-bottom: 16px;
    font-size: 0.9rem; color: #2d6a4f; line-height: 1.5;
}
.assessment-not-applicable {
    background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px;
    padding: 12px 16px; margin-bottom: 16px; font-size: 0.88rem; color: #6b7c8f;
}
.section-title-group { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.relevance-dot { color: #355e3b; font-size: 10px; flex-shrink: 0; margin-right: 2px; }
.assessment-group { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid #f0f0f0; }
.assessment-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.group-title {
    font-size: 0.82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: #355e3b; margin-bottom: 12px;
    padding-bottom: 6px; border-bottom: 2px solid #e8f0e9;
}
.fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-wrapper { display: flex; flex-direction: column; }
.field-wrapper.field-wide { grid-column: span 2; }
.field-input-wrap {
    display: flex; align-items: center; border: 2px solid #e0e0e0;
    border-radius: 8px; overflow: hidden; transition: border-color 0.2s;
}
.field-input-wrap:focus-within { border-color: #355e3b; }
.text-input.has-prefix, .text-input.has-suffix { border: none; }
.text-input.has-prefix:focus, .text-input.has-suffix:focus { outline: none; }
.related-costs-section { margin-top: 8px; border-top: 1px solid #e8f0e9; padding-top: 8px; }
.related-costs-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; cursor: pointer; background: #f5fcf6;
    border-radius: 6px; user-select: none;
}
.related-costs-label { font-size: 13px; font-weight: 600; color: #355e3b; }
.related-chevron { font-size: 11px; color: #355e3b; transition: transform 0.2s; }
.related-costs-body { padding: 12px 4px 4px; }
.assessment-actions { border-top: 1px solid #eef2f7; padding-top: 16px; }

/* ===================================================================
   RESULTS: REPORT (legacy output wrapper kept for compatibility)
   =================================================================== */
.report-output {
    display: none; margin-top: 32px; animation: reportReveal 0.6s ease-out;
}
.report-output.visible { display: block; }
@keyframes reportReveal {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.report-header {
    background: #1e3a5f; color: #ffffff; padding: 2rem;
    border-radius: 12px 12px 0 0;
}
.report-header h1 { font-size: 1.75rem; margin-bottom: 0.5rem; font-weight: 700; }
.report-header .contact-line { font-size: 0.95rem; opacity: 0.9; }
.report-header .metrics-line {
    font-size: 1.1rem; margin-top: 0.75rem; padding-top: 0.75rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.summary-box { background: #ffffff; padding: 2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.summary-box h2 {
    font-size: 1.1rem; color: #3d4f5f; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 1.5rem;
}
.summary-table { width: 100%; border-collapse: collapse; }
.summary-table th, .summary-table td {
    padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #eee;
}
.summary-table th { font-weight: 500; color: #3d4f5f; }
.summary-table td:last-child {
    text-align: right; font-weight: 600; font-family: 'Inter', sans-serif;
}
.summary-table tr:last-child td { border-bottom: none; }
.summary-table .total-row { background: #1e3a5f; color: #ffffff; }
.summary-table .total-row td {
    padding: 1rem; font-size: 1.1rem; border-bottom: none;
}
.insight-box {
    background: #f8f9fa; border: 1px solid #dee2e6; color: #1e3a5f;
    padding: 1.5rem 2rem; font-size: 1.1rem;
}
.insight-box strong { font-size: inherit; }

/* Report category sections */
.category-section {
    background: #ffffff; margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden;
}
.category-header {
    background: #3d4f5f; color: #ffffff; padding: 1rem 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
}
.category-header h3 {
    font-size: 1rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px;
}
.category-total { font-family: 'Inter', sans-serif; font-size: 1.1rem; font-weight: 600; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th {
    background: #f8f8f5; padding: 0.75rem 1rem; text-align: left;
    font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: #3d4f5f; font-weight: 500;
}
.detail-table td {
    padding: 0.75rem 1rem; border-bottom: 1px solid #eee;
    vertical-align: top; font-size: 1rem;
}
.detail-table td:first-child { font-family: 'Inter', sans-serif; font-weight: 500; width: 25%; }
.detail-table td:nth-child(2) {
    font-family: 'Inter', sans-serif; font-size: 1rem; color: #3d4f5f; width: 50%;
}
.detail-table td:last-child {
    text-align: right; font-family: 'Inter', sans-serif; font-weight: 600; width: 25%;
}
.cash-section { background: #2d6a4f; color: #ffffff; }
.cash-section .category-header { background: #245c42; }
.cash-section .detail-table th { background: #2d6a4f; color: #ffffff; }
.cash-section .detail-table td { border-color: rgba(255,255,255,0.1); color: #ffffff; }
.key-question {
    background: #1e3a5f; color: #ffffff; padding: 2rem;
    margin-top: 2rem; text-align: center; border-radius: 8px;
}
.key-question p { font-size: 1.2rem; font-style: italic; max-width: 600px; margin: 0 auto; }
.key-question p:last-child { margin-top: 1rem; font-style: normal; font-weight: 500; }
.report-footer-note { text-align: center; padding: 1.5rem; font-size: 0.85rem; color: #3d4f5f; }
.report-actions { display: flex; gap: 12px; margin-top: 24px; justify-content: center; }
.report-actions .btn { padding: 12px 24px; font-size: 15px; }

/* === RESULTS: PATTERN ANALYSIS === */
.patterns-section {
    margin-top: 2rem; background: #ffffff; border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); overflow: hidden;
}
.patterns-header {
    background: #1e3a5f; color: #ffffff; padding: 1.25rem 1.5rem;
}
.patterns-header h2 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.25rem; }
.patterns-header p { font-size: 0.95rem; opacity: 0.85; font-weight: 400; }
.patterns-body { padding: 1.5rem; }
.pattern-tier { margin-bottom: 1.5rem; }
.pattern-tier:last-child { margin-bottom: 0; }
.pattern-tier-label {
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; margin-bottom: 0.75rem;
    padding-bottom: 0.5rem; border-bottom: 2px solid #e8e8e8;
}
.tier-operating .pattern-tier-label { color: #2d6a4f; border-color: #2d6a4f; }
.tier-bridge .pattern-tier-label { color: #e07c24; border-color: #e07c24; }
.tier-financial .pattern-tier-label { color: #c0392b; border-color: #c0392b; }
.pattern-card {
    background: #f8f9fa; border-radius: 6px; padding: 1rem 1.25rem;
    margin-bottom: 0.75rem; border-left: 4px solid #ccc;
}
.tier-operating .pattern-card { border-left-color: #2d6a4f; }
.tier-bridge .pattern-card { border-left-color: #e07c24; }
.tier-financial .pattern-card { border-left-color: #c0392b; }
.pattern-name { font-weight: 600; font-size: 1rem; color: #1e3a5f; margin-bottom: 0.35rem; }
.pattern-desc { font-size: 0.95rem; color: #3d4f5f; line-height: 1.5; margin-bottom: 0.5rem; }
.pattern-evidence { font-size: 0.85rem; color: #6c757d; font-style: italic; }
.pattern-evidence strong { font-style: normal; color: #1e3a5f; }
.patterns-none { padding: 1.5rem; text-align: center; color: #6c757d; font-style: italic; }

/* Pattern flow diagram */
.patterns-flow {
    margin: 1.5rem 0; padding: 1.25rem; background: #fafafa;
    border: 1px solid #e8e8e8; border-radius: 8px;
}
.flow-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-bottom: 0.5rem; }
.flow-label {
    width: 100%; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.25rem;
}
.flow-label-symptoms { color: #1e3a5f; }
.flow-label-drivers { color: #2d6a4f; }
.flow-label-bridge { color: #e07c24; }
.flow-label-impact { color: #c0392b; }
.flow-box {
    display: inline-block; padding: 6px 14px; border-radius: 6px;
    font-size: 0.85rem; font-weight: 500; text-align: center;
}
.flow-box-symptom { background: #e8edf2; color: #1e3a5f; border: 1px solid #c8d3de; }
.flow-box-driver { background: #e8f5e9; color: #2d6a4f; border: 1px solid #a5d6a7; }
.flow-box-bridge { background: #fff3e0; color: #e07c24; border: 1px solid #ffcc80; }
.flow-box-financial { background: #fce4e4; color: #c0392b; border: 1px solid #ef9a9a; }
.flow-arrows { text-align: center; font-size: 1.2rem; color: #aaa; margin: 0.5rem 0; }

/* === RESULTS: DIFFICULTY PANEL === */
.difficulty-panel {
    display: none; background: #ffffff; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(30,58,95,0.10);
    margin-top: 1.5rem; overflow: hidden; animation: fadeIn 0.3s ease;
}
.difficulty-panel.visible { display: block; }
.difficulty-panel-header {
    background: #1e3a5f; color: #ffffff; padding: 1.25rem 1.5rem;
}
.difficulty-panel-header h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.3rem; }
.difficulty-panel-header .diff-scale-hint { font-size: 0.9rem; opacity: 0.85; font-weight: 400; }
.difficulty-panel-body { padding: 1.25rem 1.5rem; }
.diff-category-label {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: #3d4f5f; margin: 1.25rem 0 0.5rem;
    padding-bottom: 0.4rem; border-bottom: 2px solid #e8e8e8;
}
.diff-category-label:first-child { margin-top: 0; }
.diff-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #f0f0f0;
}
.diff-row:last-child { border-bottom: none; }
.diff-item-name { flex: 1; font-size: 0.95rem; font-weight: 500; color: #1e3a5f; }
.diff-item-amount {
    font-size: 0.95rem; font-weight: 600; color: #355e3b;
    min-width: 90px; text-align: right;
}
.diff-pills { display: flex; gap: 6px; }
.diff-pill {
    width: 36px; height: 36px; border-radius: 50%; border: 2px solid #dde3e8;
    background: #f8f9fa; font-size: 14px; font-weight: 600;
    font-family: 'Inter', sans-serif; color: #5a7a8a; cursor: pointer;
    transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.diff-pill:hover { border-color: #1e3a5f; color: #1e3a5f; }
.diff-pill.selected { background: #1e3a5f; border-color: #1e3a5f; color: #ffffff; }
.diff-accordion-toggle {
    display: flex; align-items: center; gap: 6px; padding: 4px 0 4px 16px;
    font-size: 0.8rem; color: #7a8a9b; cursor: pointer; user-select: none;
    transition: color 0.15s;
}
.diff-accordion-toggle:hover { color: #1e3a5f; }
.diff-accordion-toggle .toggle-arrow {
    font-size: 0.7rem; transition: transform 0.2s; display: inline-block;
}
.diff-accordion-toggle.expanded .toggle-arrow { transform: rotate(90deg); }
.diff-factors-list {
    display: none; padding: 8px 0 8px 24px; border-left: 2px solid #e8f0e9;
    margin-left: 8px; margin-bottom: 4px;
}
.diff-factors-list.expanded { display: block; }
.diff-factor-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.diff-factor-name { flex: 1; font-size: 0.82rem; font-weight: 400; color: #5a7a8a; }
.diff-factor-pills { display: flex; gap: 4px; }
.diff-factor-pill {
    width: 28px; height: 28px; border-radius: 50%; border: 2px solid #dde3e8;
    background: #f8f9fa; font-size: 12px; font-weight: 600;
    font-family: 'Inter', sans-serif; color: #7a8a9b; cursor: pointer;
    transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.diff-factor-pill:hover { border-color: #1e3a5f; color: #1e3a5f; }
.diff-factor-pill.selected { background: #1e3a5f; border-color: #1e3a5f; color: #ffffff; }
.diff-overall-score { font-size: 0.95rem; font-weight: 700; color: #1e3a5f; min-width: 110px; text-align: right; }
.diff-overall-score.rated { color: #355e3b; }
.diff-add-factor { display: flex; align-items: center; gap: 8px; padding: 6px 0; margin-top: 4px; }
.diff-add-factor input {
    flex: 1; padding: 5px 10px; border: 1px solid #dde3e8; border-radius: 6px;
    font-size: 0.8rem; font-family: 'Inter', sans-serif; color: #1e3a5f;
}
.diff-add-factor input:focus { outline: none; border-color: #355e3b; }
.diff-add-factor input::placeholder { color: #b0b0b0; }
.diff-add-factor button {
    padding: 5px 12px; background: #e8f0e9; border: 1px solid #c0d4c3;
    border-radius: 6px; font-size: 0.78rem; font-weight: 600;
    font-family: 'Inter', sans-serif; color: #355e3b; cursor: pointer;
    transition: background 0.15s; white-space: nowrap;
}
.diff-add-factor button:hover { background: #d0e0d2; }
.diff-generate-row { display: flex; justify-content: center; padding: 1.5rem 0 0.5rem; }

/* === RESULTS: IMPACT MATRIX === */
.matrix-trigger-row { display: flex; justify-content: center; margin-top: 2rem; }
.btn-matrix-trigger {
    background: #1e3a5f; color: white; padding: 14px 32px; border: none;
    border-radius: 10px; font-size: 16px; font-weight: 600;
    font-family: 'Inter', sans-serif; cursor: pointer; transition: background 0.2s;
}
.btn-matrix-trigger:hover { background: #162d4a; }
.btn-generate-matrix {
    background: #355e3b; color: white; padding: 13px 36px; border: none;
    border-radius: 10px; font-size: 15px; font-weight: 600;
    font-family: 'Inter', sans-serif; cursor: pointer; transition: background 0.2s;
}
.btn-generate-matrix:disabled { background: #b0b8b0; cursor: not-allowed; }
.btn-generate-matrix:not(:disabled):hover { background: #2a4d30; }
.matrix-output { display: none; margin-top: 1.5rem; }
.matrix-output.visible { display: block; }
.matrix-svg-wrap {
    background: #ffffff; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08);
    padding: 1.5rem; overflow-x: auto;
}

/* === RESULTS: SCENARIO / COMBO CARDS === */
.combo-section {
    background: #ffffff; border-radius: 12px;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08);
    margin-top: 1.5rem; overflow: hidden;
}
.combo-header { background: #1e3a5f; color: white; padding: 1.1rem 1.5rem; }
.combo-header h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.2rem; }
.combo-header p { font-size: 0.9rem; opacity: 0.85; }
.combo-cards {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem; padding: 1.25rem 1.5rem;
}
.combo-card {
    background: #f8f9fa; border-radius: 8px; padding: 1rem 1.1rem;
    border-left: 4px solid #355e3b;
}
.combo-card-label {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px; color: #355e3b; margin-bottom: 0.4rem;
}
.combo-card-items { font-size: 0.9rem; color: #3d4f5f; margin-bottom: 0.6rem; line-height: 1.5; }
.combo-card-total { font-size: 1.1rem; font-weight: 700; color: #1e3a5f; }
.combo-card-meta { font-size: 0.82rem; color: #6c757d; margin-top: 0.2rem; }

/* ===================================================================
   RESULTS TAB — New module styles
   =================================================================== */

/* Results wrapper & header */
.results-wrapper { max-width: 900px; margin: 0 auto; padding: 0 0 48px; }
.results-header {
    background: #1e3a5f; color: #fff; border-radius: 12px;
    padding: 2rem 2rem 1.5rem; margin-bottom: 2rem;
}
.results-header-meta { margin-bottom: 1rem; }
.results-company { font-size: 1.35rem; font-weight: 700; display: block; margin-bottom: 4px; }
.results-label { font-size: 0.85rem; opacity: 0.75; text-transform: uppercase; letter-spacing: 0.5px; }
.results-total-block {
    background: rgba(255,255,255,0.1); border-radius: 8px; padding: 1.25rem 1.5rem;
    display: inline-block; min-width: 300px;
}
.results-total-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.8; margin-bottom: 4px; }
.results-total-amount { font-size: 2.4rem; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.results-total-sub { font-size: 0.85rem; opacity: 0.75; }

/* Financial report section */
.report-section {
    background: #fff; border-radius: 12px; padding: 2rem;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); margin-bottom: 2rem;
}
.report-section h2 { font-size: 1.3rem; font-weight: 700; color: #1e3a5f; margin-bottom: 1.25rem; }
.report-summary-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.report-summary-table th, .report-summary-table td {
    padding: 10px 14px; text-align: left; border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}
.report-summary-table th { font-weight: 600; color: #3d4f5f; background: #f8f9fa; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.4px; }
.report-total-row td { background: #1e3a5f; color: #fff; font-weight: 700; }
.cost-cell { text-align: right !important; font-family: 'Inter', monospace; font-weight: 600; }
.report-category { margin-bottom: 1.75rem; }
.report-category-title { font-size: 1rem; font-weight: 700; color: #3d4f5f; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 2px solid #e8e8e8; }
.report-detail-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.report-detail-table th {
    background: #f0f4f8; padding: 8px 12px; text-align: left;
    font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; color: #4a6080; font-weight: 600;
}
.report-detail-table td { padding: 9px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: top; }
.item-name-cell { font-weight: 600; color: #1e3a5f; min-width: 170px; }
.formula-cell { color: #5a7090; line-height: 1.45; }
.category-total-row td { background: #f0f4f8; font-weight: 600; color: #1e3a5f; }

/* Difficulty rating section */
.difficulty-section {
    background: #fff; border-radius: 12px; padding: 2rem;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); margin-bottom: 2rem;
}
.difficulty-section h2 { font-size: 1.3rem; font-weight: 700; color: #1e3a5f; margin-bottom: 0.5rem; }
.difficulty-intro { color: #5a7090; font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.55; }
.difficulty-table { border: 1px solid #e8edf4; border-radius: 8px; overflow: hidden; }
.difficulty-header-row {
    display: grid; grid-template-columns: 1fr 120px 1fr 70px;
    gap: 8px; padding: 10px 14px;
    background: #f0f4f8; font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.4px; color: #4a6080;
}
.difficulty-row { border-bottom: 1px solid #eef2f7; }
.difficulty-row:last-child { border-bottom: none; }
.diff-main-row {
    display: grid; grid-template-columns: 1fr 120px 1fr 70px;
    gap: 8px; align-items: center; padding: 12px 14px;
}
.diff-main-row:hover { background: #fafbfd; }
.diff-expand-btn {
    background: none; border: none; cursor: pointer; color: #7a9ab5;
    font-size: 10px; margin-right: 6px; padding: 0; transition: color 0.15s;
}
.diff-expand-btn:hover { color: #1e3a5f; }
.diff-item-name { font-size: 0.92rem; font-weight: 500; color: #1e3a5f; }
.diff-item-cost { font-size: 0.9rem; font-weight: 600; color: #355e3b; font-family: 'Inter', monospace; }
.diff-pills { display: flex; gap: 5px; }
.diff-pill {
    width: 30px; height: 30px; border: 1.5px solid #c8d3de; border-radius: 6px;
    background: #fff; color: #5a7090; font-size: 0.82rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.diff-pill:hover { border-color: #1e3a5f; color: #1e3a5f; background: #f0f4ff; }
.diff-pill.active, .diff-pill.selected { background: #1e3a5f; border-color: #1e3a5f; color: #fff; }
.diff-pill-sm { width: 26px; height: 26px; font-size: 0.78rem; }
.diff-overall-score { font-size: 0.95rem; font-weight: 700; color: #1e3a5f; text-align: center; }
.diff-factors-panel { padding: 10px 14px 14px 36px; background: #fafbfd; border-top: 1px solid #eef2f7; }
.diff-factors-intro { font-size: 0.83rem; color: #7a9ab5; margin-bottom: 10px; }
.diff-factor-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.diff-factor-label { flex: 1; font-size: 0.85rem; color: #4a6080; }
.diff-factor-pills { display: flex; gap: 4px; }
.difficulty-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #eef2f7; }
.difficulty-hint { font-size: 0.83rem; color: #9aabbf; margin: 0; }

/* Matrix section */
.matrix-section { margin-bottom: 2rem; }
.matrix-header { margin-bottom: 1rem; }
.matrix-header h2 { font-size: 1.3rem; font-weight: 700; color: #1e3a5f; margin-bottom: 0.4rem; }
.matrix-header p { font-size: 0.95rem; color: #5a7090; line-height: 1.5; }
.matrix-legend {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    margin: 1rem 0; padding: 1rem 1.25rem;
    background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(30,58,95,0.06);
}
.matrix-legend-item { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.matrix-legend-dot {
    width: 22px; height: 22px; border-radius: 50%; color: #fff;
    font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.matrix-legend-label { color: #3d4f5f; }
.matrix-legend-label em { color: #355e3b; font-style: normal; }

/* Scenarios */
.scenarios-section {
    background: #fff; border-radius: 12px; padding: 2rem;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); margin-top: 1.5rem;
}
.scenarios-section h3 { font-size: 1.1rem; font-weight: 700; color: #1e3a5f; margin-bottom: 0.4rem; }
.scenarios-section > p { font-size: 0.9rem; color: #5a7090; margin-bottom: 1.25rem; }
.scenarios-empty { color: #9aabbf; font-style: italic; font-size: 0.9rem; }
.scenarios-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.scenario-card {
    border-radius: 10px; padding: 1.25rem;
    border: 1.5px solid #e8edf4; position: relative;
}
.scenario-card-a { border-color: #355e3b; background: #f6fbf7; }
.scenario-card-b { border-color: #1e3a5f; background: #f4f8ff; }
.scenario-card-c { border-color: #b07c2a; background: #fdfaf4; }
.scenario-letter {
    width: 28px; height: 28px; border-radius: 50%;
    background: #1e3a5f; color: #fff;
    font-size: 0.85rem; font-weight: 700; display: flex; align-items: center; justify-content: center;
    margin-bottom: 8px;
}
.scenario-card-a .scenario-letter { background: #355e3b; }
.scenario-card-b .scenario-letter { background: #1e3a5f; }
.scenario-card-c .scenario-letter { background: #b07c2a; }
.scenario-title { font-size: 0.95rem; font-weight: 700; color: #1e3a5f; margin-bottom: 4px; }
.scenario-desc { font-size: 0.85rem; color: #5a7090; margin-bottom: 10px; line-height: 1.5; }
.scenario-items { margin: 0 0 10px 0; padding: 0 0 0 16px; font-size: 0.88rem; color: #3d4f5f; line-height: 1.7; }
.scenario-total { font-size: 0.9rem; font-weight: 700; color: #355e3b; padding-top: 8px; border-top: 1px solid rgba(0,0,0,0.06); }

/* Data prep checklist */
.checklist-section {
    background: #fff; border-radius: 12px; padding: 2rem;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); margin-bottom: 2rem;
}
.checklist-section h2 { font-size: 1.3rem; font-weight: 700; color: #1e3a5f; margin-bottom: 0.4rem; }
.checklist-section > p { font-size: 0.95rem; color: #5a7090; margin-bottom: 1.5rem; }
.checklist-category { margin-bottom: 1.5rem; }
.checklist-category:last-child { margin-bottom: 0; }
.checklist-cat-title { font-size: 0.95rem; font-weight: 700; color: #1e3a5f; margin-bottom: 10px; }
.checklist-subgroup { margin-bottom: 10px; }
.checklist-subgroup-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; color: #7a9ab5; margin-bottom: 5px; }
.checklist-items { list-style: none; margin: 0; padding: 0; }
.checklist-items li { font-size: 0.88rem; color: #4a6080; padding: 3px 0; line-height: 1.45; }

/* section-badge visibility fix for new section-card context */
.section-card .section-badge { display: inline-block; }

/* ===================================================================
   NEXT STEPS TAB — Classes used by js/gating.js NextSteps module
   =================================================================== */

.nextsteps-wrapper { max-width: 700px; margin: 0 auto; padding: 0 0 48px; }
.nextsteps-hero {
    background: linear-gradient(135deg, #1e3a5f, #2d5a8c);
    border-radius: 16px; padding: 2.5rem 2rem; text-align: center; color: #fff;
    margin-bottom: 2rem;
}
.nextsteps-hero-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.nextsteps-hero h2 { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.5rem; }
.nextsteps-tagline { font-size: 1.05rem; font-weight: 600; opacity: 0.9; margin-bottom: 0.75rem; }
.nextsteps-intro { font-size: 0.95rem; opacity: 0.82; line-height: 1.6; max-width: 520px; margin: 0 auto 1.5rem; }
.nextsteps-cta-btn {
    display: inline-block; text-decoration: none; padding: 16px 32px;
    background: #355e3b; color: white; border-radius: 10px; font-size: 1rem;
    font-weight: 700; font-family: 'Inter', sans-serif; transition: background 0.2s;
}
.nextsteps-cta-btn:hover { background: #2a4d30; }
.btn-large { padding: 18px 36px; font-size: 1.05rem; }
.nextsteps-section {
    background: #fff; border-radius: 12px; padding: 1.75rem 2rem;
    box-shadow: 0 2px 8px rgba(30,58,95,0.08); margin-bottom: 1.5rem;
}
.nextsteps-section h3 { font-size: 1.1rem; font-weight: 700; color: #1e3a5f; margin-bottom: 1rem; }
.nextsteps-list { list-style: none; padding: 0; margin: 0; }
.nextsteps-list li {
    padding: 8px 0; border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem; color: #3d4f5f; line-height: 1.5;
}
.nextsteps-list li:last-child { border-bottom: none; }
.nextsteps-actions { }
.nextsteps-btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 0.5rem; }
.nextsteps-footer {
    text-align: center; padding: 1.5rem 0; color: #9aabbf; font-size: 0.85rem;
}

/* btn-outline variant */
.btn-outline {
    background: transparent; color: #355e3b;
    border: 2px solid #355e3b; padding: 14px 30px;
}
.btn-outline:hover { background: #e8f0e9; }

/* === BUTTONS === */
.btn {
    padding: 16px 32px; border: none; border-radius: 10px; font-size: 16px;
    font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer;
    transition: all 0.2s;
}
.btn-primary { background: #355e3b; color: white; flex: 1; }
.btn-primary:hover { background: #2a4d30; }
.btn-secondary { background: #e8f0e9; color: #355e3b; }
.btn-secondary:hover { background: #d0e0d2; }
.btn-navy { background: #1e3a5f; color: white; }
.btn-navy:hover { background: #162d4a; }

/* Actions row */
.actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* === FOOTER === */
.footer { text-align: center; margin-top: 32px; padding: 16px; color: #7a8a9b; font-size: 13px; }
.footer a { color: #355e3b; text-decoration: none; }

/* === TOAST === */
.toast {
    position: fixed; bottom: 30px; left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #355e3b; color: #fff; padding: 14px 28px; border-radius: 8px;
    font-size: 15px; font-weight: 600; box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s ease; z-index: 100;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* === VALIDATION MESSAGE === */
.validation-msg {
    background: #fff3cd; color: #856404; padding: 12px 16px; border-radius: 8px;
    margin-bottom: 16px; border: 1px solid #ffeaa7; display: none; font-size: 14px;
}
.validation-msg.visible { display: block; }

/* === ANALYZING SPINNER === */
.analyzing-overlay { text-align: center; padding: 3rem; display: none; }
.analyzing-overlay.visible { display: block; }
.analyzing-spinner {
    width: 48px; height: 48px; border: 4px solid #e8f0e9;
    border-top: 4px solid #355e3b; border-radius: 50%;
    animation: spin 0.8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === PRINT === */
@media print {
    body { background: white; padding: 0; }
    .app-tabs, .section, .progress-container, .actions, .footer,
    .header, .scoreboard-strip, .report-actions { display: none !important; }
    .container { padding: 0; max-width: 100%; }
    .report-output { display: block !important; }
    .category-section { break-inside: avoid; }
    .diff-factors-list { display: block !important; }
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
    body { padding: 20px 12px; }
    .app-tabs { flex-wrap: wrap; }
    .app-tab { flex: 1 1 45%; font-size: 13px; padding: 10px 8px; }
    .field-row { grid-template-columns: 1fr; }
    .field-row.triple { grid-template-columns: 1fr; }
    .related-field-row { grid-template-columns: 1fr; }
    .explorer-grid { grid-template-columns: repeat(2, 1fr); }
    .diff-row { flex-wrap: wrap; gap: 8px; }
    .diff-item-name { min-width: 100%; }
    .diff-pills { margin-left: auto; }
    .combo-cards { grid-template-columns: 1fr; }
    .header h1 { font-size: 28px; }
    .section-title { font-size: 18px; }
}
