:root {
    --paper: #F5F5F1;
    --ink: #1B1D22;
    --muted: #6B6F76;
    --line: #DEDCD3;
    --accent: #2a3480;
}

main {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px;
    margin-top: 4rem;
}

.breadcrumb {
    font-family: 'Kalam', "Brush Script MT", sans-serif;
    font-size: 12px;
    color: #6B6F76;
    letter-spacing: .04em;
    margin-top: 56px;
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.15;
    margin: 12px 0 24px;
    text-align: left;
}

h1 span {
    color: #2a3480;
    font-size: 2rem;
}

h3 {
    font-family: 'IBM Plex Mono', monospace;
    text-align: left;
    margin: 1rem;
}

.pulse-divider {
    width: 90%;
    height: 36px;
    margin: 8px 0 32px;
}

.ai-note {
    font-size: 0.85rem;
    color: #6b6f76;
    text-align: center;
    max-width: 560px;
    margin: 0 auto 2.5rem;
}

section {
    margin-top: 1rem;
}

section h2 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.lab-choice {
    text-align: center;
    margin: 2rem;
}

.lab-choice h2 {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.lab-choice p {
    font-size: 15px;
    color: #6B6F76;
}

.dashboard-frame {
    border: 1px solid #DEDCD3;
    border-radius: 12px;
    background: #F5F5F1;
    padding: 32px;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-align: center;
}

.start-here-label {
    font-family: 'Kalam', "Brush Script MT", sans-serif;
    font-size: 1.5rem;
    color: #2a3480;
    font-weight: 700;
}

/* Style the Buttons */
.btn {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 11px 20px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #DEDCD3;
    background: #fff;
    color: #1B1D22;
}

.btn:hover {
    border-color: #2a3480;
}

.btn-primary,
#btn-load-sample {
    background: #2a3480;
    color: #fff;
    border-color: #DEDCD3;
}

#btn-load-sample {
    margin: 1rem;
}

.btn-primary:hover {
    opacity: .9
}

.btn-primary:disabled {
    opacity: .4;
    cursor: not-allowed
}

.btn-reset {
    display: none;
}

.choice-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.program-intro {
    font-size: 1.05rem;
    line-height: 1.6;
    text-align: left;
    max-width: 800px;
}

#btn-view-dashboard {
    display: none;
    margin: 1rem;
}

#data-cleanup,
#dashboard-view {
    display: none;
    margin-top: 2rem;
    padding: 24px;
    border: 1px solid #DEDCD3;
    border-radius: 12px;
    min-height: 360px;
    text-align: left;
}

#data-cleanup p {
    font-size: 14px;
}

#initial-context {
    max-width: 700px;
    padding: 24px 28px;
    margin-bottom: 1.5rem;
    padding: 24px 28px;
    background: #eef7fa;
    border: 1.5px dashed var(--accent);
    border-radius: 14px 8px 16px 6px;
    transform: rotate(-0.4deg);
}

#initial-context p:not(.steps-breadcrumb) {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0.25rem 0 1.25rem 0;
    font-family: 'Kalam', "Brush Script MT", sans-serif;
}

#initial-context p:last-child {
    margin-bottom: 0;
}

#initial-context .steps-breadcrumb {
    color: #2a3480;
    font-weight: 600;
}

.steps-breadcrumb {
    font-family: 'Kalam', "Brush Script MT", sans-serif;
    font-size: 12px;
    color: #2a3480;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding-top: 5px;
}

.drop-zone {
    display: none;
    border: 2px dashed #DEDCD3;
    border-radius: 12px;
    background: #fff;
    padding: 40px 24px;
    text-align: center;
    color: #6B6F76;
    font-size: 14px;
    margin-top: 16px;
    transition: border-color .15s, background .15s;
}

.drop-zone .dz-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.drop-zone.dragover {
    border-color: #7A5CC4;
    background: #F1EDFA;
}

.sample-data-file-card {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #DEDCD3;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 16px;
    cursor: grab;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
}

.sample-data-file-card .fc-icon {
    color: #7A5CC4;
    font-size: 16px;
}

.sample-data-file-card .fc-hint {
    color: #6B6F76;
    font-size: 11px;
    margin-left: 4px;
}

#cleanup-steps {
    display: none;
}

#predashboard-context {
    display: none;
    margin-top: 1.5rem;
    max-width: 640px;
    padding: 24px 28px;
    margin-bottom: 1.5rem;
    background: #eef7fa;
    border: 1.5px dashed #3d72dd;
    border-radius: 14px 8px 16px 6px;
    transform: rotate(-0.4deg);
}

#predashboard-context p:not(.steps-breadcrumb) {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0.25rem 0 0 0;
    font-family: 'Kalam', "Brush Script MT", sans-serif;
}

#predashboard-context .steps-breadcrumb {
    color: #2a3480;
    font-weight: 600;
}

.raw-preview {
    background: #1B1D22;
    color: #D9D8D3;
    border-radius: 8px;
    padding: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre;
    overflow-x: auto;
    text-align: left;
}

.clean-log {
    list-style: none;
    margin: 16px 0;
    padding: 0;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 13px;
    text-align: left;
}

.clean-log li {
    padding: 8px 0;
    border-bottom: 1px solid #DEDCD3;
    opacity: 0;
    animation: fadein 0.4s forwards;
}

.clean-log li .ok {
    color: #2F7D5B;
    margin-right: 8px;
}

.clean-log li .example {
    color: #6B6F76;
    margin-left: 6px;
}

@keyframes fadein {
    to {
        opacity: 1;
    }
}

.json-heading {
    display: none;
}

.json-box {
    display: none;
    background: #1B1D22;
    color: #D9D8D3;
    border-radius: 8px;
    padding: 16px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre;
    overflow-x: auto;
    max-height: 280px;
    overflow-y: auto;
    text-align: left;
}

/*--------------------------------------
    styling the dashboard below here 
    --------------------------------------*/
#dashboard-context {
    display: none;
    max-width: 920px;
    margin-top: 2rem;
    padding: 32px 40px;
    background: #eef7fa;
    border: 1.5px dashed #3d72dd;
    border-radius: 14px 8px 16px 6px;
    transform: rotate(-0.4deg);
}

#dashboard-context .dashboard-breadcrumb {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #2a3480;
    text-align: left;
    margin-bottom: 0.75rem;
}

#dashboard-context p:not(.dashboard-breadcrumb) {
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
    max-width: 640px;
    padding: 0;
    margin: 0 0 1.5rem 0;
    font-family: 'Kalam', "Brush Script MT", sans-serif;
}

.dashboard-questions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 2rem;
    max-width: 100%;
    margin: 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(107, 92, 165, 0.2);
    list-style: none;
    color: #555;
    text-align: left;
}

.dashboard-questions li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.dashboard-questions li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0;
    color: #6b5ca5;
}

.dashboard-questions li.span-full {
    grid-column: span 2;
}

/* style recommendations section */
.recommendations {
    margin: 3rem 0 3rem;
}

.recommendation-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
    margin-top: 14px;
}

.recommendation-item {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    align-items: start;
}

.recommendation-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
}

.recommendation-title {
    margin-bottom: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
}

.recommendation-detail {
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.4;
}

.dashboard-readout {
    max-width: 850px;
    margin: 42px 0 34px;
}

.readout-label {
    margin-bottom: 8px;
    color: var(--ink);
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: .08em;
}

.dashboard-readout p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: #6b7280;
}

.dashboard-readout strong {
    font-weight: 650;
}


.info-tip {
    position: relative;
    display: inline-flex;
    margin-left: 4px;
    vertical-align: middle;
}

.info-tip-button {
    width: 17px;
    height: 17px;
    padding: 0;
    border: 1px solid #9ca3af;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    font: inherit;
    font-size: 10px;
    line-height: 15px;
    text-align: center;
    cursor: pointer;
}

.info-tip-content {
    display: none;
    position: absolute;
    z-index: 20;

    top: 25px;
    left: 0;

    width: 240px;
    padding: 12px 14px;

    background: #fff;
    border: 1px solid #dedede;
    border-radius: 8px;

    color: #333;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
    text-transform: none;
    letter-spacing: normal;

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.info-tip.open .info-tip-content {
    display: block;
}


@media (max-width: 700px) {

    @media (max-width: 700px) {

        .recommendation-list {
            grid-template-columns: 1fr;
            gap: 22px;
        }

        .recommendation-item {
            grid-template-columns: 42px 1fr;
        }

        .key-insights {
            max-width: none;
        }
    }

    #dashboard-context p:not(.steps-breadcrumb) {
        font-size: 0.95rem;
        max-width: 100%;
    }

    .dashboard-questions {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .dashboard-questions li:last-child {
        grid-column: span 1;
        /* reset since there's only 1 column now */
    }

    .recommendation-list {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@keyframes dashFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
}

.dash-title {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    font-size: 22px;
    letter-spacing: .08em;
}

.dash-date {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 12px;
    color: var(--muted);
}

.dash-metrics {
    display: flex;
    margin-bottom: 48px;
}

.dash-metrics>div:first-child {
    width: 38%;
    flex-shrink: 0;
}

.secondary-grid {
    width: 48%;
    margin-left: 8%;
}

.metric-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: .08em;
    color: var(--muted);
}

.metric-hero {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}

.metric-secondary {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 32px;
    font-weight: 700;
}

.dash-section-label {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: .08em;
    color: var(--ink);
    margin-bottom: 12px;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table td {
    padding: 16px 24px 16px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    white-space: nowrap;
}

.dash-table th {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .05em;
    text-align: left;
    font-weight: 400;
    padding: 0 24px 8px 0;
    border-bottom: 1px solid var(--line);
}

/*
.dash-table td {
    padding: 10px 24px 10px 0;
    font-size: 14px;
}*/

.dash-table .muted {
    color: var(--muted);
}

.bar-track {
    width: 160px;
}

.bar-fill {
    height: 2px;
    background: var(--accent);
}

.below-target {
    display: inline-block;
    background: #FBEAE8;
    color: #B23A2E;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.gap-below {
    color: #B23A2E;
    font-size: 13px;
}

.gap-ok {
    color: var(--muted);
    font-size: 13px;
}

.dash-metrics {
    display: flex;
    gap: 56px;
    align-items: flex-start;
    margin-bottom: 48px;
}

.secondary-grid {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 1rem 5rem;
}

.stage-metrics {
    margin-bottom: 48px;
}


/* Risk / attention section */

.section-insight {
    max-width: 700px;
    margin: -4px 0 18px;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.section-insight strong {
    color: var(--ink);
    font-weight: 600;
}

.risk-columns {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);

    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: .05em;
}

.risk-columns span:last-child {
    text-align: right;
}

.risk-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.risk-name {
    font-size: 13px;
}

.risk-reason {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.risk-side {
    min-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.risk-value {
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
}

.risk-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.risk-status-blocked {
    color: #B0554A;
}

.risk-status-attention {
    color: #B07825;
}


/* Lower dashboard layout */

.dash-two-col {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 5rem;
}

.section-insight strong {
    color: var(--ink);
    font-weight: 600;
}

.risk-side {
    min-width: 105px;
    text-align: right;
}

.risk-value {
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
}

.risk-status {
    margin-top: 4px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.risk-status-blocked {
    color: #B0554A;
}

.risk-status-attention {
    color: #B07825;
}

.dash-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.industry-insight {
    margin-top: 0;
    margin-bottom: 18px;
}

.region-select {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 4px 8px;
    background: #fff;
}

.bench-tag {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.bench-above {
    color: #43805f;
}

.bench-near {
    color: #B07825;
}

.bench-below {
    color: #B0554A;
}

.dashboard-drawing {
    height: 300px;
    margin-top: 2rem;
}

.image-caption {
    color: #999999;
    font-size: 12px;
    font-family: -apple-system, sans-serif;
    text-align: center;
    font-style: italic;
    margin-top: 4px;
}

.pipeline-section {
    margin: 42px 0;
}

.pipeline-heading {
    margin-bottom: 22px;
}

.pipeline-heading .dash-section-label {
    margin-bottom: 5px;
}

.pipeline-heading p {
    margin: 0;
    color: #707783;
    font-size: 0.9rem;
    line-height: 1.4;
}

.pipeline-rows {
    max-width: 95%
}

.pipeline-row {
    display: grid;
    grid-template-columns: 160px 300px minmax(150px, 1fr);
    gap: 28px;
    align-items: center;

    padding: 15px 0;
    border-top: 1px solid #e3e0da;
}

.pipeline-row:last-child {
    border-bottom: 1px solid #e3e0da;
}

.pipeline-stage-name {
    font-size: 0.95rem;
    font-weight: 500;
}

.pipeline-count {
    margin-top: 2px;
    color: #747b86;
    font-size: 0.8rem;
}

.pipeline-bar-wrap {
    width: 100%;
    height: 26px;
    background: #dfe7f2;
    border-radius: 3px;
    overflow: hidden;
}

.pipeline-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
}

.pipeline-row:nth-child(even) .pipeline-bar {
    background: #45423e;
}

.pipeline-result {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.pipeline-value {
    color: #222;
    font-size: 1rem;
    font-weight: 650;
    white-space: nowrap;
}

.pipeline-gap {
    font-size: 0.82rem;
    white-space: nowrap;
}

.pipeline-positive {
    color: #43805f;
}

.pipeline-negative {
    color: #b84c37;
}

.pipeline-neutral {
    color: #747b86;
}

@media(max-width: 700px) {
    .dash-metrics {
        display: block;
        margin-bottom: 40px;
    }

    .dash-metrics>div:first-child {
        width: 100%;
    }

    .metric-hero {
        font-size: 52px;
        margin-bottom: 32px;
    }

    .secondary-grid {
        width: 100%;
        margin-left: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px 32px;
    }

    .metric-secondary {
        font-size: 26px;
    }

    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .dash-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .dash-two-col {
        display: none;
    }

    .dashboard-drawing {
        height: 175px;
    }

    .pipeline-row {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 6px 20px;
        align-items: center;
        padding: 16px 0;
    }

    .pipeline-bar-wrap {
        display: none;
    }

    .pipeline-stage {
        min-width: 0;
    }

    .pipeline-result {
        display: block;
        text-align: right;
    }

    .pipeline-value {
        font-size: 0.95rem;
    }

    .pipeline-gap {
        margin-top: 3px;
        font-size: 0.75rem;
    }

    .pipeline-stage-name {
        font-size: 0.95rem;
    }

    .pipeline-count {
        margin-top: 3px;
        font-size: 0.8rem;
    }

    #dashboard-view {
        padding: 20px;
    }

    .dash-two-col {
        display: block;
    }

    .stage-metrics {
        margin-bottom: 36px;
    }
}