:root {
    --navy: #1C3041;
    --teal: #34C1D0;
    --brown: #95684D;
    --light-teal: #DCF1F8;
    --ink: #1C3041;
    --muted: #5B6672;
    --line: #DCE3E8;
    --bg: #F7F9FA;
    --white: #FFFFFF;
    --danger: #B02A2A;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(28, 48, 65, 0.06), 0 4px 14px rgba(28, 48, 65, 0.05);
}

/*
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand {
    font-family: 'Quicksand', 'Inter', sans-serif;
}

button {
    font-family: inherit;
}

a {
    color: var(--navy);
}
*/

.wizard-container {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.wizard-container h1,
.wizard-container h2,
.wizard-container h3,
.wizard-container .brand {
    font-family: 'Quicksand', 'Inter', sans-serif;
}

.wizard-container button {
    font-family: inherit;
}

.wizard-container a {
    color: var(--navy);
}

/* dev banner */
.devnote {
    background: #FFF4E5;
    color: #7A4E00;
    border-bottom: 1px solid #F0D8A8;
    font-size: 12.5px;
    padding: 8px 20px;
    text-align: center;
}

.devnote strong {
    font-weight: 600;
}

header.topbar {
    background: var(--navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brandmark {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brandmark .name {
    font-weight: 700;
    font-size: 16.5px;
    color: var(--white);
}

.brandmark .sub {
    font-size: 11.5px;
    color: var(--light-teal);
    margin-top: 1px;
}

.savebtn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.96);
    color: var(--navy);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

.savebtn:hover {
    border-color: var(--teal);
    background: var(--white);
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    max-width: 1180px;
    margin: 0 auto;
    gap: 0;
}

@media (max-width: 860px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .railwrap {
        order: 2;
    }
}

/* left rail */
.railwrap {
    padding: 28px 18px 40px 28px;
}

.rail {
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.rail::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--line);
}

.rail li {
    position: relative;
    padding: 0 0 22px 34px;
}

.rail .dot {
    position: absolute;
    left: 0;
    top: 1px;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    transition: all .15s ease;
    z-index: 1;
}

.rail li.done .dot {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}

.rail li.current .dot {
    background: var(--navy);
    border-color: var(--navy);
    color: white;
    box-shadow: 0 0 0 4px var(--light-teal);
}

.rail li.upcoming .dot {
    color: var(--line);
}

.rail .label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.3;
    padding-top: 3px;
    display: block;
}

.rail li.current .label {
    color: var(--navy);
}

.rail li.done .label {
    color: var(--ink);
}

.rail li.hidden {
    display: none;
}

.rail li.done {
    cursor: pointer;
}

.rail li.done:hover .dot {
    background: var(--navy);
    border-color: var(--navy);
}

.rail li.done:hover .label {
    color: var(--navy);
}

.rail li.done:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.rail li.done:focus-visible .dot {
    background: var(--navy);
    border-color: var(--navy);
}

/* main card */
main {
    padding: 36px 32px 80px 20px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 36px 40px;
    max-width: 720px;
}

.eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
    color: var(--teal);
    margin-bottom: 6px;
}

.disclaimer-wrap {
    display: flex;
    justify-content: center;
    padding: 64px 20px 80px;
}

.disclaimer-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 44px 48px;
    max-width: 620px;
    width: 100%;
}

.disclaimer-text {
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--ink);
    margin: 0 0 26px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 20px 22px;
}

.disclaimer-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 26px;
    cursor: pointer;
}

.disclaimer-check input {
    accent-color: var(--navy);
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex-shrink: 0;
}

.disclaimer-check span {
    font-size: 14px;
    color: var(--ink);
    line-height: 1.4;
}

.step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 8px;
}

.step-sub {
    font-size: 14.5px;
    color: var(--muted);
    margin: 0 0 28px;
    line-height: 1.5;
}

.field {
    margin-bottom: 26px;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.field-help-text {
    font-size: 13px;
    color: var(--muted);
    margin: -2px 0 10px;
    line-height: 1.5;
}

.calc-helper {
    display: inline-block;
    margin: -4px 0 22px;
    padding: 6px 12px;
    background: var(--light-teal);
    color: var(--navy);
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
}

.info-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--light-teal);
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    position: relative;
    flex-shrink: 0;
}

.info-icon .tooltip {
    display: none;
    position: absolute;
    left: 22px;
    top: -6px;
    width: 270px;
    background: var(--navy);
    color: white;
    font-size: 12.5px;
    font-weight: 400;
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.45;
    z-index: 30;
    box-shadow: var(--shadow);
}

.info-icon:hover .tooltip,
.info-icon:focus .tooltip {
    display: block;
}

input[type=text],
input[type=number],
select,
textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-size: 14.5px;
    color: var(--ink);
    font-family: inherit;
    background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px var(--light-teal);
}

textarea {
    min-height: 76px;
    resize: vertical;
}

.unit-suffix {
    display: flex;
    align-items: center;
    gap: 8px;
}

.unit-suffix input {
    flex: 1;
}

.unit-suffix span {
    font-size: 13.5px;
    color: var(--muted);
    white-space: nowrap;
}

.choice-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.choice-group.row {
    flex-direction: row;
    flex-wrap: wrap;
}

.choice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: .12s ease;
}

.choice:hover {
    border-color: var(--teal);
}

.choice.selected {
    border-color: var(--navy);
    background: var(--light-teal);
}

.choice input {
    margin-top: 2px;
    accent-color: var(--navy);
    flex-shrink: 0;
}

.choice .choice-text {
    font-size: 14px;
    line-height: 1.4;
}

.choice .choice-title {
    font-weight: 600;
    color: var(--ink);
}

.choice .choice-desc {
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 2px;
}

.statutory-note {
    background: var(--light-teal);
    border-left: 3px solid var(--teal);
    border-radius: 0 8px 8px 0;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--navy);
    line-height: 1.5;
    margin: 10px 0 0;
}

.statutory-note strong {
    color: var(--navy);
}

.readonly-block {
    background: var(--bg);
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
}

table.tenure-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 6px;
}

table.tenure-table th {
    background: var(--navy);
    color: white;
    font-size: 12.5px;
    text-align: left;
    padding: 9px 11px;
    font-weight: 600;
}

table.tenure-table td {
    padding: 6px;
    border-bottom: 1px solid var(--line);
}

table.tenure-table input {
    padding: 8px 10px;
    font-size: 13.5px;
}

.table-add {
    margin-top: 8px;
    background: none;
    border: 1.5px dashed var(--line);
    color: var(--navy);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

.table-add:hover {
    border-color: var(--teal);
}

.table-remove {
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1;
}

.table-remove:hover {
    background: #FBEAEA;
    color: var(--danger);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.checkbox-row input {
    accent-color: var(--navy);
    width: 16px;
    height: 16px;
}

.subfield {
    margin-top: 14px;
    padding: 16px 18px;
    background: var(--bg);
    border-radius: 10px;
    border: 1px solid var(--line);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 720px;
    margin-top: 22px;
}

.btn {
    padding: 11px 22px;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: .12s;
}

.btn-primary {
    background: var(--navy);
    color: white;
}

.btn-primary:hover {
    background: #142331;
}

.btn-primary:disabled {
    background: #B7C1C9;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--navy);
}

.btn-ghost:hover {
    border-color: var(--teal);
}

.btn-ghost:disabled {
    color: #B7C1C9;
    border-color: var(--line);
    cursor: not-allowed;
}

/* review step */
.review-section {
    margin-bottom: 22px;
}

.review-section h3 {
    font-size: 15px;
    color: var(--navy);
    margin: 0 0 10px;
    font-weight: 700;
}

.review-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
}

.review-row .rk {
    color: var(--muted);
}

.review-row .rv {
    color: var(--ink);
    font-weight: 600;
    text-align: right;
}

.preview-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 26px 0 14px;
    background: var(--light-teal);
    color: var(--navy);
    border: none;
    padding: 12px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
}

.preview-toggle:hover {
    background: #C7E9F2;
}

/* Download hand-off — saves, then sends the user to the wizard list page. */
.download-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0 8px;
}

.download-row .field-help-text {
    margin: 0;
    max-width: 520px;
}

.policy-preview {
    background: var(--white);
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 28px 32px;
    margin-top: 10px;
    max-width: 720px;
    font-size: 13.8px;
    line-height: 1.7;
    display: none;
}

.policy-preview.open {
    display: block;
}

.policy-preview h2 {
    font-size: 17px;
    text-align: center;
    color: var(--navy);
    margin: 0 0 4px;
}

.policy-preview .peffective {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 20px;
}

.policy-preview h4 {
    font-size: 13.5px;
    color: var(--navy);
    border-bottom: 1px solid var(--line);
    padding-bottom: 5px;
    margin: 20px 0 8px;
}

.policy-preview p {
    margin: 0 0 10px;
}

.policy-preview table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0 14px;
    font-size: 12.5px;
}

.policy-preview th {
    background: var(--bg);
    text-align: left;
    padding: 6px 8px;
    border-bottom: 2px solid var(--line);
}

.policy-preview td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--line);
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--navy);
    color: white;
    padding: 12px 20px;
    border-radius: 9px;
    font-size: 13.5px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transition: .2s;
    z-index: 50;
    box-shadow: var(--shadow);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.err {
    color: var(--danger);
    font-size: 12.5px;
    margin-top: 6px;
    display: none;
}

.field.invalid input,
.field.invalid select {
    border-color: var(--danger);
}

.field.invalid .err {
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}