/* DBHC — Business Health Check assessment */
.dbhc-app {
    --dbhc-navy: #0f4c5c;
    --dbhc-navy-dark: #0a3540;
    --dbhc-gold: #c9a227;
    --dbhc-gold-light: #e8d48a;
    --dbhc-bg: #eef1f4;
    margin: 0 -0px 0;
    background: var(--dbhc-bg);
}

.dbhc-topbar {
    background: linear-gradient(180deg, #0d3d4a 0%, var(--dbhc-navy) 100%);
    color: #fff;
    padding: 1rem 0 0.75rem;
}

.dbhc-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.dbhc-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dbhc-brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--dbhc-gold);
    color: var(--dbhc-navy-dark);
    font-weight: 800;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dbhc-brand-text {
    display: flex;
    flex-direction: column;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.dbhc-brand-text span {
    opacity: 0.85;
    font-size: 0.75rem;
}

.dbhc-topbar-btn {
    background: var(--dbhc-gold);
    color: var(--dbhc-navy-dark);
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}

.dbhc-topbar-btn:hover {
    background: var(--dbhc-gold-light);
    color: var(--dbhc-navy-dark);
}

.dbhc-progress-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 0.75rem;
}

.dbhc-progress-track {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
}

.dbhc-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--dbhc-gold);
    border-radius: 999px;
    transition: width 0.25s ease;
}

.dbhc-progress-label {
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0.9;
}

.dbhc-hero {
    background: linear-gradient(165deg, #0d3d4a 0%, var(--dbhc-navy) 40%, #1a5f6e 100%);
    color: #fff;
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.dbhc-hero-title {
    font-family: var(--font-heading, 'Playfair Display', Georgia, serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin: 0 0 1rem;
}

.dbhc-gold {
    color: var(--dbhc-gold);
}

.dbhc-hero-sub {
    max-width: 720px;
    margin: 0 auto 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    opacity: 0.92;
}

.dbhc-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.dbhc-badges span {
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

.dbhc-confidential {
    max-width: 800px;
    margin: 0 auto;
    background: #faf6ee;
    color: #334155;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    text-align: left;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.dbhc-confidential p {
    margin: 0;
}

.dbhc-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem 4rem;
    align-items: start;
}

.dbhc-section-panel {
    scroll-margin-top: 1.5rem;
}

.dbhc-sidebar {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dbhc-sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.dbhc-sidebar-title {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dbhc-gold);
    margin: 0 0 1rem;
}

.dbhc-section-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dbhc-section-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
}

.dbhc-section-link:hover {
    background: #f1f5f9;
}

.dbhc-section-link.is-active {
    background: var(--dbhc-navy);
    color: #fff;
}

.dbhc-section-letter {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.dbhc-section-link.is-active .dbhc-section-letter {
    border-color: rgba(255, 255, 255, 0.7) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
}

.dbhc-section-letter--empty {
    border-color: #cbd5e1;
    background: #f8fafc;
    color: #94a3b8;
}

.dbhc-section-letter--critical {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.dbhc-section-letter--warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #c2410c;
}

.dbhc-section-letter--watch {
    border-color: #fde68a;
    background: #fffbeb;
    color: #b45309;
}

.dbhc-section-letter--good {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.dbhc-section-letter--progress {
    border-color: #bae6fd;
    background: #f0f9ff;
    color: #0369a1;
}

.dbhc-section-link-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dbhc-score-card {
    padding-bottom: 1rem;
}

.dbhc-live-gauge {
    position: relative;
    width: 148px;
    height: 148px;
    margin: 0 auto 0.75rem;
}

.dbhc-gauge-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.dbhc-gauge-track {
    stroke: #e8edf2;
}

.dbhc-gauge-progress {
    stroke: var(--dbhc-gold);
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset 0.35s ease, stroke 0.25s ease;
}

.dbhc-live-gauge.is-critical .dbhc-gauge-progress {
    stroke: #ef4444;
}

.dbhc-live-gauge.is-warning .dbhc-gauge-progress {
    stroke: #f97316;
}

.dbhc-live-gauge.is-watch .dbhc-gauge-progress {
    stroke: #eab308;
}

.dbhc-live-gauge.is-good .dbhc-gauge-progress {
    stroke: #22c55e;
}

.dbhc-gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    line-height: 1.1;
}

.dbhc-gauge-score {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.02em;
}

.dbhc-gauge-max-line {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.dbhc-status-badge {
    display: block;
    width: 100%;
    text-align: center;
    margin: 0 0 0.65rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    border-radius: 8px;
    line-height: 1.25;
    box-sizing: border-box;
}

.dbhc-status-badge.is-empty {
    background: #f1f5f9;
    color: #64748b;
}

.dbhc-status-badge.is-critical {
    background: #fde8e8;
    color: #b91c1c;
}

.dbhc-status-badge.is-warning {
    background: #fde8d8;
    color: #c2410c;
}

.dbhc-status-badge.is-watch {
    background: #fef3c7;
    color: #b45309;
}

.dbhc-status-badge.is-stable {
    background: #dbeafe;
    color: #1e40af;
}

.dbhc-status-badge.is-good {
    background: #dcfce7;
    color: #15803d;
}

.dbhc-section-scores-wrap {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}

.dbhc-section-scores {
    list-style: none;
    margin: 0;
    padding: 0.4rem 0.55rem;
    overflow: visible;
}

.dbhc-score-row {
    padding: 0.4rem 0.15rem;
}

.dbhc-score-row__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.dbhc-score-row__label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    font-size: 0.6875rem;
    color: #334155;
    line-height: 1.25;
}

.dbhc-score-row__letter {
    font-weight: 700;
    color: #0f172a;
    flex-shrink: 0;
}

.dbhc-score-row__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.dbhc-score-row__val {
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    flex-shrink: 0;
    min-width: 1.1rem;
    text-align: right;
}

.dbhc-score-row__val.is-dash {
    color: #94a3b8;
    font-weight: 500;
}

.dbhc-score-row__line {
    display: block;
    height: 2px;
    margin-top: 0.3rem;
    border-radius: 2px;
    background: #e2e8f0;
    transition: background 0.2s ease, height 0.2s ease;
}

.dbhc-score-row.is-line-empty .dbhc-score-row__line {
    background: #e2e8f0;
}

.dbhc-score-row.is-line-good .dbhc-score-row__line {
    background: #22c55e;
}

.dbhc-score-row.is-line-watch .dbhc-score-row__line {
    background: #eab308;
}

.dbhc-score-row.is-line-warning .dbhc-score-row__line,
.dbhc-score-row.is-line-critical .dbhc-score-row__line,
.dbhc-score-row.is-line-active .dbhc-score-row__line {
    background: #f97316;
}

.dbhc-score-row.is-line-active .dbhc-score-row__line {
    height: 3px;
}

.dbhc-score-row.is-line-progress .dbhc-score-row__line {
    background: #93c5fd;
}

.dbhc-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.dbhc-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
}

.dbhc-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dbhc-navy);
    margin: 0 0 1.25rem;
}

.dbhc-steps {
    margin: 0;
    padding-left: 1.25rem;
    color: #475569;
    font-size: 0.9375rem;
    line-height: 1.7;
}

.dbhc-steps li {
    margin-bottom: 0.75rem;
}

.dbhc-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem 1.25rem;
}

.dbhc-field label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.35rem;
}

.dbhc-field .req {
    color: #dc2626;
}

.dbhc-field input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
}

.dbhc-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--dbhc-navy);
    color: #fff;
    margin: -1.5rem -1.75rem 1.25rem;
    padding: 1rem 1.75rem;
    border-radius: 12px 12px 0 0;
    flex-wrap: wrap;
}

.dbhc-section-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dbhc-section-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--dbhc-gold);
    color: var(--dbhc-navy-dark);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dbhc-section-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.dbhc-section-meta {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin: 0.15rem 0 0;
}

.dbhc-section-score-pill {
    background: rgba(255, 255, 255, 0.15);
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.dbhc-questions-table {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.dbhc-q-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.dbhc-q-row:last-child {
    border-bottom: none;
}

.dbhc-q-head {
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.dbhc-q-head .dbhc-responses {
    display: none;
}

.dbhc-q-num {
    font-weight: 700;
    color: #64748b;
}

.dbhc-q-text {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
    color: #334155;
}

.dbhc-responses {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.dbhc-resp-btn {
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    color: #475569;
    white-space: nowrap;
}

.dbhc-resp-btn:hover {
    border-color: var(--dbhc-navy);
    color: var(--dbhc-navy);
}

.dbhc-resp-btn.is-selected {
    background: var(--dbhc-navy);
    border-color: var(--dbhc-navy);
    color: #fff;
}

.dbhc-resp-btn[data-value="2"].is-selected {
    background: #047857;
    border-color: #047857;
}

.dbhc-resp-btn[data-value="1"].is-selected {
    background: #b45309;
    border-color: #b45309;
}

.dbhc-resp-btn[data-value="0"].is-selected {
    background: #b91c1c;
    border-color: #b91c1c;
}

.dbhc-section-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.8125rem;
}

.dbhc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #f1f5f9;
    color: #475569;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
}

.dbhc-status-pill__label {
    font-weight: 500;
    color: #64748b;
}

.dbhc-status-pill__badge {
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.dbhc-status-pill__badge.is-muted {
    background: #e2e8f0;
    color: #475569;
}

.dbhc-status-pill__badge.is-progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.dbhc-status-pill__badge.is-critical {
    background: #fee2e2;
    color: #b91c1c;
}

.dbhc-status-pill__badge.is-fair,
.dbhc-status-pill__badge.is-warning {
    background: #ffedd5;
    color: #c2410c;
}

.dbhc-status-pill__badge.is-watch {
    background: #fef3c7;
    color: #b45309;
}

.dbhc-status-pill__badge.is-good {
    background: #dcfce7;
    color: #15803d;
}

.dbhc-zone-hint {
    color: #64748b;
}

.dbhc-actions {
    text-align: center;
    padding: 0.5rem 0 2rem;
}

.dbhc-generate-btn {
    background: var(--dbhc-gold);
    color: var(--dbhc-navy-dark);
    border: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.9rem 2.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(201, 162, 39, 0.4);
}

.dbhc-generate-btn:hover {
    background: var(--dbhc-gold-light);
}

.dbhc-modal[hidden] {
    display: none;
}

.dbhc-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dbhc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.dbhc-modal-dialog {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.dbhc-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    border: none;
    background: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}

.dbhc-modal-title {
    font-size: 1.375rem;
    color: var(--dbhc-navy);
    margin: 0 0 1.25rem;
}

.dbhc-report-body {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #334155;
}

.dbhc-report-zone {
    background: var(--dbhc-navy);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

.dbhc-report-zone strong {
    display: block;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.dbhc-report-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.dbhc-report-table th,
.dbhc-report-table td {
    border: 1px solid #e2e8f0;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.dbhc-print-btn {
    margin-top: 1.25rem;
    background: var(--dbhc-navy);
    color: #fff;
    border: none;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

@media (max-width: 992px) {
    .dbhc-layout {
        grid-template-columns: 1fr;
    }

    .dbhc-sidebar {
        position: static;
    }

    .dbhc-section-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dbhc-q-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .dbhc-q-head {
        display: none;
    }

    .dbhc-responses {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .dbhc-form-grid {
        grid-template-columns: 1fr;
    }

    .dbhc-responses {
        flex-wrap: wrap;
    }
}

@media print {
    .main-header,
    .site-footer,
    .dbhc-sidebar,
    .dbhc-actions,
    .dbhc-modal-close,
    .dbhc-print-btn,
    .dbhc-topbar-btn {
        display: none !important;
    }

    .dbhc-modal {
        position: static;
        display: block !important;
    }

    .dbhc-modal-backdrop {
        display: none;
    }

    .dbhc-modal-dialog {
        max-height: none;
        box-shadow: none;
    }
}
