:root {
    --navy: #1C3041;
    --teal: #34C1D0;
    --teal-dark: #279aa6;
    --brown: #95684D;
    --light-teal: #DCF1F8;
    --white: #FFFFFF;
    --bg: #F4F8FA;
    --input-bg: #EAF7EA;
    --input-border: #8FCB90;
    --calc-bg: #FFF6DF;
    --calc-border: #E8C877;
    --lock-bg: #EEF0F2;
    --error: #C24545;
    --error-bg: #FBEAEA;
    --text: #20303D;
    --text-soft: #5B6B76;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(28, 48, 65, 0.08);
    --shadow-lg: 0 12px 32px rgba(28, 48, 65, 0.16);
}

/*
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', system-ui, sans-serif;
}

h1,
h2,
h3,
.brand-font,
button,
.nav-step,
.pill,
.tab {
    font-family: 'Quicksand', system-ui, sans-serif;
}
*/

.wizard-container button {
    cursor: pointer;
    font-size: 15px;
}

.wizard-container input:focus,
.wizard-container button:focus-visible,
.wizard-container .chip:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}


/* ===== HEADER ===== */
.wizard-container header {
    background: var(--navy);
    color: var(--white);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand .eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
    font-weight: 600;
}

.brand .title {
    font-size: 19px;
    font-weight: 700;
}

nav.steps {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-step {
    background: transparent;
    border: none;
    color: #B9C7D1;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all .15s ease;
    white-space: nowrap;
}

.nav-step.reached {
    color: var(--white);
    cursor: pointer;
}

.nav-step.reached:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-step.current {
    background: var(--teal);
    color: var(--navy);
}

/* ===== SUBNAV (position spokes) ===== */
.subnav {
    background: var(--white);
    border-bottom: 1px solid #E2E8EC;
    padding: 12px 24px;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    position: sticky;
    top: 60px;
    z-index: 15;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1.5px solid #E2E8EC;
    background: var(--white);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    white-space: nowrap;
    flex-shrink: 0;
}

.tab.reached {
    cursor: pointer;
    color: var(--navy);
}

.tab.reached:hover {
    border-color: var(--teal);
}

.tab.current {
    border-color: var(--teal);
    background: var(--light-teal);
    color: var(--navy);
}

.tab .dots {
    display: flex;
    gap: 3px;
}

.tab .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #D6DEE2;
}

.tab .dot.done {
    background: var(--teal);
}

.tab .dot.active {
    background: var(--brown);
}

/* ===== MAIN ===== */
main {
    /*max-width: 860px;*/
    margin: 0 auto;
    padding: 36px 20px 140px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 36px;
    margin-bottom: 20px;
}

.eyebrow-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brown);
    margin-bottom: 6px;
}

h1.screen-title {
    font-size: 26px;
    color: var(--navy);
    margin: 0 0 10px;
    font-weight: 700;
}

p.lede {
    font-size: 15.5px;
    color: var(--text-soft);
    line-height: 1.6;
    margin: 0 0 24px;
    max-width: 640px;
}

label.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}

.field-help {
    font-size: 12.5px;
    color: var(--text-soft);
    margin-top: 6px;
    line-height: 1.5;
}

.text-input,
.number-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1.5px solid #D5DEE3;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--white);
}

.input-row {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
}

.prefix {
    color: var(--text-soft);
    font-weight: 600;
}

.info-box {
    background: var(--light-teal);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13.5px;
    color: var(--navy);
    line-height: 1.55;
    margin: 18px 0;
}

.info-box strong {
    color: var(--navy);
}

.error-box {
    background: var(--error-bg);
    border-left: 4px solid var(--error);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13.5px;
    color: #7A2222;
    line-height: 1.5;
    margin-top: 12px;
    font-weight: 600;
}

/* ===== FOOTER NAV ===== */
.footer-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid #E2E8EC;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    box-shadow: 0 -4px 16px rgba(28, 48, 65, 0.06);
}

.btn {
    padding: 12px 22px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 14.5px;
    border: none;
    transition: .15s;
}

.btn-primary {
    background: var(--teal);
    color: var(--navy);
}

.btn-primary:hover {
    background: var(--teal-dark);
    color: var(--white);
}

.btn-primary:disabled {
    background: #CBD6DA;
    color: #8A97A0;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border: 1.5px solid #D5DEE3;
}

.btn-ghost:hover {
    border-color: var(--navy);
}

.autosave {
    font-size: 12px;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 6px;
}

.autosave .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #5CB85C;
}

.autosave .dot.saving {
    background: #E0A21B;
}

/* ===== POSITIONS (hub) ===== */
.position-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 8px;
}

@media (max-width:600px) {
    .position-grid {
        grid-template-columns: 1fr;
    }
}

.chip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 2px solid #E2E8EC;
    border-radius: 10px;
    padding: 14px 16px;
    cursor: pointer;
    background: var(--white);
    text-align: left;
}

.chip.selected {
    border-color: var(--teal);
    background: var(--light-teal);
}

.chip input {
    margin-top: 3px;
}

.chip .chip-title {
    font-weight: 700;
    color: var(--navy);
    font-size: 14.5px;
}

.chip .chip-sub {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 2px;
}

.custom-list {
    margin-top: 18px;
}

.custom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--light-teal);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 8px;
}

.link-btn {
    background: none;
    border: none;
    color: var(--brown);
    font-weight: 700;
    font-size: 13px;
    padding: 6px 0;
    text-decoration: underline;
    cursor: pointer;
}

.remove-x {
    background: none;
    border: none;
    color: var(--error);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
}

.add-custom-box {
    border: 1.5px dashed #C7D2D6;
    border-radius: 8px;
    padding: 14px;
    margin-top: 14px;
    display: flex;
    gap: 10px;
}

/* ===== TIER TABLE ===== */
table.tier-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

table.tier-table th {
    background: var(--navy);
    color: var(--white);
    font-size: 12.5px;
    text-align: left;
    padding: 10px 12px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
}

table.tier-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #ECEFF1;
    font-size: 14px;
    vertical-align: middle;
}

.tier-num {
    font-weight: 700;
    color: var(--navy);
    width: 28px;
    text-align: center;
}

.step-input-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.step-input-row .prefix {
    font-size: 13px;
    font-weight: 600;
}

.step-input {
    width: 68px;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1.5px solid var(--input-border);
    background: var(--input-bg);
    font-weight: 600;
    text-align: center;
}

.step-locked {
    background: var(--lock-bg);
    border-radius: 6px;
    padding: 7px 9px;
    text-align: center;
    font-style: italic;
    color: var(--text-soft);
    font-size: 12.5px;
}

.tier-label-input {
    width: 100%;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1.5px solid #D5DEE3;
}

.tier-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.remove-tier {
    background: none;
    border: none;
    color: var(--error);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* ===== BASE PAY / TOGGLE ===== */
.basis-toggle {
    display: inline-flex;
    border: 1.5px solid #D5DEE3;
    border-radius: 9px;
    overflow: hidden;
    margin-bottom: 20px;
}

.basis-toggle button {
    border: none;
    padding: 10px 20px;
    background: var(--white);
    color: var(--text-soft);
    font-weight: 700;
    font-size: 13.5px;
}

.basis-toggle button.active {
    background: var(--navy);
    color: var(--white);
}

/* ===== MATRIX ===== */
.matrix-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-end;
    margin-bottom: 20px;
}

.matrix-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #E2E8EC;
    position: relative;
}

.matrix-wrap.scrollable::after {
    content: "";
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    width: 22px;
    height: 100%;
    margin-left: -22px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(28, 48, 65, 0.14));
    pointer-events: none;
    display: block;
}

.scroll-hint {
    display: none;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--brown);
    font-weight: 600;
    margin-top: 8px;
}

.scroll-hint.visible {
    display: flex;
}

table.matrix {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
}

table.matrix th {
    background: var(--navy);
    color: var(--white);
    padding: 7px 5px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 10.5px;
    text-align: center;
    white-space: nowrap;
}

table.matrix th.tier-col-h,
table.matrix td.tier-col {
    text-align: left;
    position: sticky;
    left: 0;
    background: var(--navy);
    color: var(--white);
    z-index: 2;
    min-width: 128px;
    max-width: 128px;
    white-space: normal;
}

table.matrix td.tier-col {
    background: var(--white);
    color: var(--text);
    border-right: 2px solid #E2E8EC;
}

table.matrix td {
    padding: 4px 3px;
    text-align: center;
    border-bottom: 1px solid #EEF1F3;
}

.cell-input {
    width: 64px;
    text-align: center;
    border-radius: 6px;
    border: 1.5px solid var(--calc-border);
    background: var(--calc-bg);
    padding: 5px 3px;
    font-weight: 600;
    font-size: 11.5px;
}

.cell-input.overridden {
    border-color: var(--brown);
    background: #FBEFE6;
}

.reset-link {
    display: block;
    font-size: 9.5px;
    color: var(--brown);
    margin-top: 2px;
    cursor: pointer;
    text-decoration: underline;
}

.legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-soft);
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.swatch {
    width: 13px;
    height: 13px;
    border-radius: 3px;
    display: inline-block;
}

/* ===== TOOLTIP ===== */
.tip-wrap {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 6px;
}

.tip-icon {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--brown);
    color: var(--white);
    border: none;
    font-size: 11px;
    font-weight: 700;
    line-height: 17px;
    padding: 0;
    cursor: help;
    font-family: 'Quicksand', sans-serif;
}

.tip-bubble {
    display: none;
    position: absolute;
    bottom: 135%;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    background: var(--navy);
    color: var(--white);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.55;
    z-index: 30;
    box-shadow: var(--shadow-lg);
    font-weight: 400;
    text-align: left;
}

.tip-bubble::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border: 5px solid transparent;
    border-top-color: var(--navy);
}

.tip-wrap:hover .tip-bubble,
.tip-wrap:focus-within .tip-bubble {
    display: block;
}


/* ===== REVIEW ===== */
.review-card {
    border: 1.5px solid #E2E8EC;
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 14px;
}

.review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-head .rname {
    font-weight: 700;
    color: var(--navy);
    font-size: 15.5px;
}

.review-meta {
    font-size: 12.5px;
    color: var(--text-soft);
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.range-bar {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--light-teal), var(--teal));
    margin: 8px 0 4px;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 600;
}

/* ===== WELCOME / GENERATE ===== */
.welcome-hero {
    text-align: center;
    padding: 20px 36px 44px;
}

.welcome-hero .icon-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--light-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 28px;
}

.step-list {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    display: grid;
    gap: 10px;
}

.step-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 14px;
    color: var(--text-soft);
}

.step-list .num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-size: 11.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.success-panel {
    background: var(--light-teal);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    margin-top: 20px;
}

.success-panel .big-check {
    font-size: 36px;
    margin-bottom: 8px;
}

.mock-download {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 26px;
    background: var(--navy);
    color: var(--white);
    border-radius: 9px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.mock-note {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 10px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}