/* === Coverage Gap Analyzer — site-whole navy/gold theme ===
 *
 * Lifted from packages/site-hub/src/css/gap-analyzer.css and re-mapped
 * from hub's green-on-warm tokens to site-whole's navy-on-gold brand.
 * Hub uses CSS custom properties (--green, --ink, --warm, etc.) defined
 * in its global stylesheet; site-whole's main.css is Tailwind-generated
 * and exposes those colors only as utility classes, not CSS variables.
 * Inlining the literal hex values keeps this file Tailwind-cascade-safe
 * and removes a missing-token-ship hazard.
 *
 * Brand tokens (kept in sync with main.css and tailwind.config.js):
 *   navy:       #0f172a
 *   gold:       #d4a843
 *   gold-hover: #c49a38
 *   gold-text:  #b88a26
 */

.gap-container {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}

.gap-section {
    padding: 0 24px 40px;
}

.gap-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 32px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.gap-progress {
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    margin-bottom: 12px;
    overflow: hidden;
}

.gap-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d4a843 0%, #e8c36a 100%);
    border-radius: 3px;
    transition: width 0.4s ease;
}

.gap-step-label {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 28px;
    text-align: center;
}

.gap-step {
    display: none;
}

.gap-step.active {
    display: block;
    animation: gapFadeIn 0.3s ease;
}

@keyframes gapFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.gap-step h2 {
    font-family: inherit;
    font-size: 1.4rem;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.35;
    font-weight: 700;
}

.gap-hint {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 24px;
    line-height: 1.5;
}

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

.gap-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #faf8f1;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #0f172a;
    text-align: left;
    transition: all 200ms ease;
    font-family: inherit;
}

.gap-option:hover {
    border-color: #d4a843;
    background: rgba(212, 168, 67, 0.06);
}

.gap-option.selected {
    border-color: #d4a843;
    background: rgba(212, 168, 67, 0.12);
}

.gap-option-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.gap-input-group {
    margin-bottom: 24px;
}

.gap-input-group label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 8px;
}

.gap-currency-input {
    position: relative;
    display: flex;
    align-items: center;
}

.gap-currency-symbol {
    position: absolute;
    left: 14px;
    font-size: 1.05rem;
    color: #64748b;
    font-weight: 500;
    pointer-events: none;
}

.gap-currency-input input {
    width: 100%;
    padding: 12px 12px 12px 30px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.1rem;
    color: #0f172a;
    background: #faf8f1;
    transition: all 200ms ease;
}

.gap-currency-input input:focus {
    outline: none;
    border-color: #d4a843;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.18), 0 0 20px rgba(212, 168, 67, 0.06);
}

.gap-currency-input input::placeholder {
    color: #94a3b8;
}

/* Range slider — minimal layout-only rules. site-whole's general slider
 * styling lives elsewhere; the canonical hub stylesheet relies on a shared
 * range-slider.css that hub publishes but site-whole does not currently
 * passthrough. The fallback below keeps the slider functional and on-brand
 * without pulling another asset into the URL graph. */
.gap-slider {
    margin-top: 12px;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    outline: none;
}

.gap-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d4a843;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.gap-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #d4a843;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.gap-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 4px;
}

.gap-range-display {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gap-range-display .gap-slider {
    flex: 1;
    margin-top: 0;
}

.gap-range-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #b88a26;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.gap-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    width: fit-content;
}

.gap-stepper-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #e2e8f0;
    background: #faf8f1;
    font-size: 1.3rem;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}

.gap-stepper-btn:first-child { border-radius: 10px 0 0 10px; }
.gap-stepper-btn:last-child { border-radius: 0 10px 10px 0; }

.gap-stepper-btn:hover {
    background: rgba(212, 168, 67, 0.1);
    border-color: #d4a843;
}

.gap-stepper input {
    width: 56px;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
    background: #fff;
}

.gap-field-note {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 6px;
}

.gap-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    gap: 12px;
}

.gap-back-btn {
    padding: 12px 20px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #475569;
    cursor: pointer;
    font-family: inherit;
    transition: all 200ms ease;
}

.gap-back-btn:hover {
    border-color: #475569;
    color: #0f172a;
}

.gap-next-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #d4a843 0%, #e8c36a 50%, #d4a843 100%);
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    font-family: inherit;
    transition: all 200ms ease;
    margin-left: auto;
    box-shadow: 0 2px 8px rgba(212, 168, 67, 0.3);
}

.gap-next-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.45);
}

.gap-gate-icon {
    text-align: center;
    margin-bottom: 16px;
    /* Hub's gate icon uses --green stroke; remap to gold for site-whole */
    color: #d4a843;
}

.gap-gate-icon svg {
    stroke: #d4a843;
}

.gap-form-group {
    margin-bottom: 14px;
    text-align: left;
}

.gap-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
}

.gap-form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: #0f172a;
    background: #faf8f1;
    transition: all 200ms ease;
}

.gap-form-input:focus {
    outline: none;
    border-color: #d4a843;
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.18);
}

.gap-form-input::placeholder { color: #94a3b8; }

.gap-form-input.field-valid { border-color: #d4a843 !important; }

.gap-form-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #d4a843 0%, #e8c36a 50%, #d4a843 100%);
    color: #0f172a;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 200ms ease;
    margin-top: 4px;
    box-shadow: 0 2px 8px rgba(212, 168, 67, 0.3);
}

.gap-form-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.45);
}

.gap-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.gap-form-note {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 10px;
}

.gap-result {
    display: none;
}

.gap-result.active {
    display: block;
    animation: gapFadeIn 0.5s ease;
}

.gap-meter-container {
    margin-bottom: 28px;
}

.gap-meter {
    height: 32px;
    background: #f1f5f9;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    position: relative;
}

.gap-meter-covered {
    height: 100%;
    background: linear-gradient(90deg, #d4a843, #e8c36a);
    transition: width 1s ease;
    border-radius: 16px 0 0 16px;
    min-width: 2%;
}

.gap-meter-gap {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    transition: width 1s ease;
    min-width: 2%;
}

.gap-meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}

.gap-meter-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gap-meter-label.covered { color: #b88a26; }
.gap-meter-label.danger { color: #dc2626; }

.gap-status-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 999px;
    margin-bottom: 16px;
}

.gap-status-badge.danger {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.gap-status-badge.warning {
    background: rgba(217, 119, 6, 0.12);
    color: #d97706;
}

.gap-status-badge.safe {
    background: rgba(212, 168, 67, 0.12);
    color: #b88a26;
}

.gap-big-number {
    font-family: inherit;
    font-size: 3.2rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1.1;
    margin-bottom: 4px;
}

.gap-big-number.safe { color: #b88a26; }

.gap-big-label {
    font-size: 1rem;
    color: #475569;
    margin-bottom: 32px;
}

.gap-breakdown {
    background: #faf8f1;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: left;
}

.gap-breakdown h3 {
    font-family: inherit;
    font-size: 1.15rem;
    color: #0f172a;
    margin-bottom: 16px;
    font-weight: 700;
}

.gap-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.gap-breakdown-row.final {
    padding-top: 14px;
}

.gap-breakdown-label {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.95rem;
}

.gap-breakdown-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: #0f172a;
}

.gap-breakdown-value.green {
    color: #b88a26;
}

.gap-breakdown-detail {
    display: flex;
    justify-content: space-between;
    padding: 6px 0 6px 16px;
    font-size: 0.88rem;
    color: #475569;
}

.gap-breakdown-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 12px 0;
}

.gap-risk-message {
    background: rgba(220, 38, 38, 0.06);
    border: 1px solid rgba(220, 38, 38, 0.15);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 32px;
    text-align: left;
}

.gap-risk-message.safe {
    background: rgba(212, 168, 67, 0.06);
    border-color: rgba(212, 168, 67, 0.18);
}

.gap-risk-message p {
    font-size: 0.95rem;
    color: #0f172a;
    line-height: 1.6;
}

.gap-result-cta {
    padding: 32px 24px;
    background: #faf8f1;
    border-radius: 12px;
    text-align: center;
}

.gap-result-cta h3 {
    font-family: inherit;
    font-size: 1.3rem;
    color: #0f172a;
    margin-bottom: 8px;
    font-weight: 700;
}

.gap-result-cta > p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.gap-result-btn {
    display: inline-block;
    padding: 16px 40px;
    background: linear-gradient(135deg, #d4a843 0%, #e8c36a 50%, #d4a843 100%);
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    transition: all 200ms ease;
    box-shadow: 0 2px 8px rgba(212, 168, 67, 0.3);
}

.gap-result-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(212, 168, 67, 0.45);
}

.gap-result-alt {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #64748b;
}

.gap-result-alt a {
    color: #b88a26;
    font-weight: 600;
    text-decoration: none;
}

.gap-result-alt a:hover {
    text-decoration: underline;
}

.gap-faq {
    padding: 40px 24px 80px;
}

.gap-faq h2 {
    font-family: inherit;
    font-size: 1.8rem;
    color: #0f172a;
    text-align: center;
    margin-bottom: 32px;
    font-weight: 700;
}

.gap-faq-list {
    max-width: 640px;
    margin: 0 auto;
}

.gap-faq-item {
    border-bottom: 1px solid #e2e8f0;
}

.gap-faq-item summary {
    padding: 18px 0;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-faq-item summary::-webkit-details-marker { display: none; }

.gap-faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: #94a3b8;
    font-weight: 300;
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform 0.2s;
}

.gap-faq-item[open] summary::after { content: '\2212'; }

.gap-faq-item p {
    padding: 0 0 18px;
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.7;
}

@media (max-width: 600px) {
    .gap-card { padding: 24px 16px; }
    .gap-step h2 { font-size: 1.2rem; }
    .gap-option { padding: 14px 16px; }
    .gap-big-number { font-size: 2.4rem; }
    .gap-breakdown { padding: 16px; }
    .gap-result-cta { padding: 24px 16px; }
    .gap-range-display {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .gap-range-value { text-align: center; }
    .gap-nav-buttons { flex-direction: column-reverse; }
    .gap-next-btn { margin-left: 0; }
}
