/* ── TOKENS ─────────────────────────────────────────────────────────────── */
:root {
    --navy: #1C3041;
    --teal: #34C1D0;
    --teal-dark: #26a0ad;
    --brown: #95684D;
    --red: #E22026;
    --lt-teal: #DCF1F8;
    --lt-teal2: #eaf8fb;
    --lt-gray: #F5F6F8;
    --mid-gray: #D1D5DB;
    --dark-gray: #6B7280;
    --text: #1a2535;
    --white: #ffffff;
    --amber: #FFF9E6;
    --amber-border: #F0C94A;
    --input-blue: #1a56db;
    --font: 'Quicksand', Arial, sans-serif;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(28, 48, 65, 0.10);
    --shadow-lg: 0 4px 24px rgba(28, 48, 65, 0.15);
}

/* ── RESET ───────────────────────────────────────────────────────────────── */
/*
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }

  body {
    font-family: var(--font);
    background: var(--lt-gray);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.6;
  }*/

/* ── SITE HEADER ─────────────────────────────────────────────────────────── */
.site-header {
    background: var(--navy);
    padding: 0 32px;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.site-header .logo-mark {
    width: 34px;
    height: 34px;
    background: var(--teal);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
    flex-shrink: 0;
}

.site-header .site-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    opacity: 0.85;
    letter-spacing: 0.3px;
}

.site-header .divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
}

.site-header .tool-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--teal);
}

/* ── LAYOUT ───────────────────────────────────────────────────────────────── */
.wizard-shell {
    /*max-width: 880px;*/
    margin: 32px auto 64px;
    /*padding: 0 20px;*/
}

/* ── PROGRESS BAR ────────────────────────────────────────────────────────── */
.progress-wrap {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 28px 16px;
    margin-bottom: 24px;
}

.progress-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.step-track {
    display: flex;
    align-items: center;
    gap: 0;
}

.step-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    cursor: pointer;
}

.step-node:last-child {
    flex: 0;
}

.step-connector {
    flex: 1;
    height: 3px;
    background: var(--mid-gray);
    transition: background 0.3s;
    margin-top: -14px;
    /* align with circle center */
}

.step-connector.done {
    background: var(--teal);
}

.step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid var(--mid-gray);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--dark-gray);
    transition: all 0.3s;
    z-index: 1;
    position: relative;
}

.step-node.active .step-circle {
    border-color: var(--teal);
    background: var(--teal);
    color: var(--white);
}

.step-node.done .step-circle {
    border-color: var(--teal);
    background: var(--teal);
    color: var(--white);
}

.step-node.done .step-circle::after {
    content: '✓';
    font-size: 13px;
}

.step-node.done .step-circle span {
    display: none;
}

.step-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--dark-gray);
    margin-top: 6px;
    text-align: center;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.step-node.active .step-name {
    color: var(--teal);
}

.step-node.done .step-name {
    color: var(--teal);
}

/* ── CARD ─────────────────────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    background: var(--navy);
    padding: 28px 36px 24px;
    color: var(--white);
}

.card-header .step-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.card-header h2 {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.card-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.card-body {
    padding: 32px 36px;
}

/* ── INFO BOX ────────────────────────────────────────────────────────────── */
.info-box {
    background: var(--lt-teal);
    border-left: 4px solid var(--teal);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 13.5px;
    line-height: 1.55;
}

.info-box strong {
    color: var(--navy);
    display: block;
    margin-bottom: 4px;
}

.formula-box {
    background: var(--amber);
    border: 1.5px solid var(--amber-border);
    border-radius: var(--radius);
    padding: 18px 22px;
    margin-bottom: 24px;
    text-align: center;
}

.formula-box .formula-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--brown);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
}

.formula-box .formula-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.5;
}

.formula-box .formula-note {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 6px;
    font-style: italic;
}

/* ── FORM ELEMENTS ───────────────────────────────────────────────────────── */
.field-group {
    margin-bottom: 22px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.field-label .req {
    color: var(--red);
    margin-left: 3px;
}

.field-hint {
    font-size: 12px;
    color: var(--dark-gray);
    margin-bottom: 6px;
    line-height: 1.4;
}

input[type="text"],
input[type="number"],
select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--mid-gray);
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    color: var(--input-blue);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(52, 193, 208, 0.18);
}

input[type="text"].error,
input[type="number"].error,
select.error {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(226, 32, 38, 0.12);
}

.error-msg {
    font-size: 12px;
    color: var(--red);
    font-weight: 600;
    margin-top: 5px;
    display: none;
}

.error-msg.show {
    display: block;
}

.input-prefix {
    position: relative;
}

.input-prefix span {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-gray);
    pointer-events: none;
}

.input-prefix input {
    padding-left: 26px;
}

.input-suffix {
    position: relative;
}

.input-suffix span {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-gray);
    pointer-events: none;
}

.input-suffix input {
    padding-right: 32px;
}

/* ── TOOLTIP ─────────────────────────────────────────────────────────────── */
.tooltip-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: var(--teal-dark);
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    background: none;
    border: none;
    font-family: var(--font);
    padding: 0;
    text-decoration: underline dotted;
}

.tooltip-trigger:hover {
    color: var(--navy);
}

.tooltip-panel {
    display: none;
    background: var(--lt-teal2);
    border: 1.5px solid var(--teal);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.55;
    animation: fadeIn 0.18s ease;
}

.tooltip-panel.open {
    display: block;
}

.tooltip-panel strong {
    color: var(--navy);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── TWO-COL GRID ─────────────────────────────────────────────────────────── */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 620px) {

    .two-col,
    .three-col {
        grid-template-columns: 1fr;
    }
}

/* ── SECTION DIVIDER ─────────────────────────────────────────────────────── */
.section-divider {
    border: none;
    border-top: 2px solid var(--lt-teal);
    margin: 28px 0;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--brown);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: var(--lt-teal);
}

/* ── CLASSROOM TABS ──────────────────────────────────────────────────────── */
.classroom-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    align-items: center;
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--mid-gray);
    background: var(--white);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    color: var(--dark-gray);
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn.active {
    border-color: var(--teal);
    background: var(--teal);
    color: var(--white);
}

.tab-btn:hover:not(.active) {
    border-color: var(--teal-dark);
    color: var(--teal-dark);
}

.tab-btn .remove-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-weight: 700;
}

.tab-btn.active .remove-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.add-classroom-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px dashed var(--teal);
    background: transparent;
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
    cursor: pointer;
    transition: all 0.18s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.add-classroom-btn:hover {
    background: var(--lt-teal);
}

.add-classroom-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── CLASSROOM PANEL ─────────────────────────────────────────────────────── */
.classroom-panel {
    display: none;
}

.classroom-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

/* ── PROFIT MARGIN SLIDER ────────────────────────────────────────────────── */
.margin-display {
    font-size: 42px;
    font-weight: 700;
    color: var(--teal);
    text-align: center;
    margin: 16px 0 8px;
    font-variant-numeric: tabular-nums;
}

.margin-display span {
    font-size: 24px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--teal) 0%, var(--teal) 50%, var(--mid-gray) 50%);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--teal);
    box-shadow: 0 2px 6px rgba(28, 48, 65, 0.2);
    cursor: pointer;
}

.margin-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--dark-gray);
    font-weight: 600;
    margin-top: 6px;
}

.margin-advisory {
    display: none;
    margin-top: 14px;
    background: #FEF3C7;
    border: 1.5px solid #F59E0B;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
}

.margin-advisory.show {
    display: block;
}

/* ── RESULTS TABLE ───────────────────────────────────────────────────────── */
.results-grid {
    border: 1.5px solid var(--mid-gray);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.results-grid-header {
    display: grid;
    grid-template-columns: 200px repeat(var(--cols, 1), 1fr);
    background: var(--navy);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
}

.results-grid-header div,
.results-row div {
    padding: 10px 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.results-row {
    display: grid;
    grid-template-columns: 200px repeat(var(--cols, 1), 1fr);
    border-top: 1px solid var(--mid-gray);
    font-size: 13px;
}

.results-row:nth-child(even) {
    background: var(--lt-gray);
}

.results-row .row-label {
    font-weight: 700;
    color: var(--navy);
    font-size: 12px;
    background: var(--lt-gray);
    border-right: 2px solid var(--mid-gray) !important;
}

.results-row.section-header-row .row-label,
.results-row.section-header-row div {
    background: var(--lt-teal);
    color: var(--navy);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 7px 14px;
}

.results-row.highlight div {
    background: var(--teal);
    color: var(--white);
    font-weight: 700;
}

.results-row.highlight .row-label {
    background: var(--teal-dark);
    color: var(--white);
}

.result-val {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--navy);
}

.result-val.calc {
    color: #111;
}

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.btn-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--lt-teal);
    gap: 12px;
}

.btn {
    padding: 12px 28px;
    border-radius: 8px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.18s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}

.btn-primary:hover {
    background: var(--teal-dark);
    border-color: var(--teal-dark);
}

.btn-secondary {
    background: var(--white);
    color: var(--navy);
    border-color: var(--mid-gray);
}

.btn-secondary:hover {
    border-color: var(--navy);
}

.btn-download {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
    font-size: 15px;
    padding: 14px 32px;
}

.btn-download:hover {
    background: #142535;
}

/* ── SCREENS ─────────────────────────────────────────────────────────────── */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

/* ── WELCOME SPECIFIC ────────────────────────────────────────────────────── */
.welcome-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.welcome-step {
    text-align: center;
    padding: 16px 10px;
    border: 2px solid var(--lt-teal);
    border-radius: var(--radius);
    background: var(--lt-gray);
}

.welcome-step .ws-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--white);
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.welcome-step p {
    font-size: 11px;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.3;
}

@media (max-width: 620px) {
    .welcome-steps {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── REVIEW SCREEN ───────────────────────────────────────────────────────── */
.summary-advisory {
    background: var(--lt-teal);
    border: 1.5px solid var(--teal);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 24px;
    font-size: 13.5px;
    line-height: 1.5;
}

.summary-advisory strong {
    color: var(--navy);
}

/* download simulation */
.download-confirm {
    display: none;
    background: #ECFDF5;
    border: 2px solid #10B981;
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #065F46;
    margin-top: 16px;
    text-align: center;
}

.download-confirm.show {
    display: block;
}