* {
    box-sizing: border-box;
}

@font-face {
    font-family: "Saira";
    src: url("/assets/fonts/saira-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --sidebar-width: 17.75rem;
    --content-width: 78rem;
    --font-heading: "Saira", "Helvetica Neue", Arial, sans-serif;
    --font-body: "Saira", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --brand-blue: #004981;
    --brand-blue-soft: #6c91b8;
}

html {
    font-size: 16px;
    width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--font-body);
    color: #222a31;
    background: #edf1f4;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    appearance: none;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
}

.sidebar {
    display: flex;
    flex-direction: column;
    padding: 1.1rem 1rem 1.5rem;
    background: #213040;
    color: #f2f5f8;
}

.sidebar__brand {
    margin-bottom: 1.4rem;
    background: #fff;
    padding: 0.9rem;
    width:fit-content;
}

.brand-logo {
    max-height: 60px;
    width: auto;
}

.step-nav {
    display: grid;
    gap: 0.85rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.step-nav li {
    display: grid;
    grid-template-columns: 2rem 1fr;
    gap: 0.65rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    border-left: 2px solid transparent;
}

.step-nav li.is-active {
    background: rgba(255, 255, 255, 0.09);
    border-left-color: #93b8de;
    color: #fff;
}

.step-nav li.is-complete:not(.is-active) {
    color: rgba(255, 255, 255, 0.9);
}

.step-nav__index {
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.step-nav__title {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.step-nav__desc {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.58);
}

.sidebar__foot {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.58);
}

.sidebar__foot a {
    color: inherit;
    text-decoration: none;
}

.main-content {
    padding: 1.75rem 2rem 2.5rem;
    min-width: 0;
}

.wizard-card {
    width: min(100%, var(--content-width));
    margin: 0;
    max-width: 100%;
    min-width: 0;
    padding: 1rem 1rem 2rem;
    background: #f7f8fa;
    border-radius: 0 0 1rem 1rem;
}

.turnstile-wrap {
    display: grid;
    gap: 0.65rem;
}

.turnstile-wrap label {
    font-size: 0.95rem;
    color: #4f5e70;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.login-card {
    width: min(100%, 28rem);
    display: grid;
    gap: 0.85rem;
    padding: 2rem;
    background: #fff;
    border: 1px solid #d7e0eb;
    box-shadow: 0 16px 40px rgba(20, 33, 58, 0.08);
}

.login-logo {
    max-width: 13rem;
    margin-bottom: 0.5rem;
}

.login-card h1 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    line-height: 1;
}

.login-card label {
    font-size: 0.95rem;
    color: #526175;
}

.login-card input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid #cfd8e3;
    background: #fff;
}

.login-card button {
    padding: 0.95rem 1.2rem;
    border: 0;
    background: #004981;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.login-error {
    padding: 0.85rem 1rem;
    background: #fff2f2;
    border: 1px solid #efb0b0;
    color: #952828;
}

.step-panel {
    display: grid;
    gap: 2rem;
    min-width: 0;
}

.step-header {
    display: grid;
    gap: 0.65rem;
}

.step-kicker {
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #58789d;
}

.step-header h1 {
    margin: 0;
    max-width: 46rem;
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 3.1vw, 2.25rem);
    line-height: 0.98;
    letter-spacing: -0.04em;
}

.step-header p {
    margin: 0;
    max-width: 44rem;
    color: #697685;
    font-size: 1rem;
}

.section-grid {
    display: grid;
    gap: 1.6rem;
    min-width: 0;
}

.section-block {
    display: grid;
    gap: 1rem;
}

.section-label {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #2a3138;
}

.section-label__title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.section-label__meta {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7c8793;
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid #cbd2d9;
}

.package-card {
    position: relative;
    display: grid;
    gap: 0.85rem;
    min-height: 12rem;
    padding: 1.8rem 1.35rem 1.45rem;
    border: 0;
    border-right: 1px solid #cbd2d9;
    background: transparent;
    color: #23313f;
    text-align: left;
    cursor: pointer;
}

.package-card:last-child {
    border-right: 0;
}

.package-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 4px solid transparent;
}

.package-card.is-selected {
    background: var(--brand-blue);
    color: #fff;
}

.package-card.is-selected::before {
    border-top-color: #8eb5dd;
}

.package-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.package-card__status {
    font-size: 0.74rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7a8692;
}

.package-card.is-selected .package-card__status {
    color: rgba(255, 255, 255, 0.78);
}

.package-card h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.18rem;
    line-height: 1.1;
}

.package-card p {
    margin: 0;
    max-width: 17rem;
    color: inherit;
    opacity: 0.82;
    line-height: 1.45;
}

.package-price {
    margin-top: auto;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
}

.room-counter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border: 1px solid #cbd2d9;
}

.counter-card {
    position: relative;
    display: grid;
    gap: 1.25rem;
    min-height: 9.6rem;
    padding: 1.45rem 1rem 0.95rem;
    border-right: 1px solid #cbd2d9;
    border-bottom: 1px solid #cbd2d9;
    background: transparent;
}

.counter-card:nth-child(4n) {
    border-right: 0;
}

.counter-card:nth-last-child(-n + 4) {
    border-bottom: 0;
}

.counter-card.is-active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--brand-blue);
}

.counter-head,
.counter-title {
    display: grid;
    gap: 0.7rem;
}

.counter-title h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.counter-title p {
    display: none;
}

.icon-badge {
    width: 1.55rem;
    height: 1.55rem;
    color: #58789d;
}

.package-card .icon-badge {
    width: 1.4rem;
    height: 1.4rem;
}

.inline-svg-icon {
    width: 100%;
    height: 100%;
    display: block;
}

.counter-controls {
    display: inline-grid;
    grid-template-columns: 2.3rem 3rem 2.3rem;
    align-items: center;
    border: 1px solid #d2d7dd;
    width: fit-content;
}

.count-btn {
    height: 2.15rem;
    border: 0;
    border-right: 1px solid #d2d7dd;
    background: transparent;
    color: #222a31;
    font-size: 1.15rem;
    cursor: pointer;
}

.count-btn:last-child {
    border-right: 0;
    border-left: 1px solid #d2d7dd;
}

.count-value {
    height: 2.15rem;
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.instance-stack {
    display: grid;
    gap: 2rem;
}

.room-section {
    display: grid;
    gap: 1.3rem;
}

.room-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.room-tab {
    min-width: 4.9rem;
    padding: 0.7rem 1rem;
    border: 1px solid #cfd5db;
    background: #fff;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    cursor: pointer;
}

.room-tab + .room-tab {
    margin-left: -1px;
}

.room-tab.is-selected {
    background: var(--brand-blue);
    color: #fff;
    border-color: var(--brand-blue);
}

.instance-card {
    display: grid;
    gap: 1.3rem;
}

.instance-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.instance-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.instance-number {
    min-width: 2.1rem;
    height: 2.1rem;
    display: grid;
    place-items: center;
    background: var(--brand-blue);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.instance-meta h3 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.helper-text,
.loading-text,
.empty-state {
    color: #6e7987;
}

.choice-group {
    display: grid;
    grid-template-columns: 10rem minmax(0, 1fr);
    gap: 1rem 1.25rem;
    align-items: start;
}

.choice-group__label {
    padding-top: 0.85rem;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #7c8793;
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.choice-chip,
.extra-chip {
    min-width: 7rem;
    padding: 0.8rem 1rem;
    border: 1px solid #cfd5db;
    background: #fff;
    color: #23313f;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    text-align: center;
    cursor: pointer;
}

.extra-chip {
    min-width: auto;
}

.choice-chip small,
.extra-chip small {
    display: none;
}

.choice-chip.is-selected,
.extra-chip.is-selected {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}

.clone-link {
    width: fit-content;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--brand-blue);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 1.2rem 1rem;
}

.field,
.checkbox-field {
    display: grid;
    gap: 0.45rem;
}

.field--span-6 {
    grid-column: span 6;
}

.field--span-4 {
    grid-column: span 4;
}

.field--span-3 {
    grid-column: span 3;
}

.field--span-2 {
    grid-column: span 2;
}

.field label,
.checkbox-field > label {
    font-size: 0.86rem;
    color: #5f6975;
}

.field input,
.field textarea {
    width: 100%;
    min-height: 2.35rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #d0d6dd;
    background: #fff;
    color: #222a31;
    outline: none;
}

.field textarea {
    min-height: 7.5rem;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    border-color: #648ebb;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.checkbox-inline input {
    width: 1rem;
    height: 1rem;
}

.error-text {
    color: #bf3a4f;
    font-size: 0.88rem;
}

.summary-grid {
    display: grid;
    gap: 2rem;
}

.summary-card {
    border: 1px solid #cbd2d9;
    padding: 1.1rem 1.25rem 1.25rem;
    min-width: 0;
}

.summary-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.summary-table th {
    padding: 0.9rem 0.5rem;
    border-bottom: 1px solid #d4dae1;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7c8793;
    text-align: left;
}

.summary-table td {
    padding: 0.9rem 0.5rem;
    border-bottom: 1px solid #e1e6eb;
    vertical-align: top;
}

.summary-table td:last-child,
.summary-table th:last-child {
    text-align: right;
}

.summary-table__sub {
    color: #6c7885;
}

.result-panel {
    display: grid;
    grid-template-columns: minmax(18rem, 1fr) minmax(16rem, 0.9fr);
    gap: 1.4rem;
    align-items: center;
    min-width: 0;
}

.result-card {
    padding: 1.55rem 1.45rem;
    background: var(--brand-blue);
    color: #fff;
}

.result-card__label {
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
}

.result-price {
    margin-top: 0.8rem;
    font-family: var(--font-heading);
    font-size: clamp(3rem, 5vw, 4.2rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
}

.result-meta {
    color: #525f6e;
    line-height: 1.55;
}

.result-meta strong {
    color: #222a31;
}

.totals {
    display: grid;
    gap: 0.45rem;
    margin-top: 1rem;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.totals-row--total {
    margin-top: 0.45rem;
    padding-top: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
}

.success-pill {
    display: inline-block;
    margin-top: 0.95rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.72);
}

.nav-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 1.25rem;
    border-top: 1px solid #2a3138;
}

.nav-actions__stepnote {
    font-size: 0.82rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7d8792;
}

.nav-actions__buttons {
    display: flex;
    gap: 0.6rem;
    margin-left: auto;
}

.btn {
    min-width: 6.5rem;
    padding: 0.95rem 1.35rem;
    border: 1px solid #ced5dc;
    background: #fff;
    color: #222a31;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.btn--primary {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
}

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

.hidden {
    display: none !important;
}

@media (max-width: 1180px) {
    .room-counter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .counter-card:nth-child(4n) {
        border-right: 1px solid #cbd2d9;
    }

    .counter-card:nth-child(2n) {
        border-right: 0;
    }

    .counter-card:nth-last-child(-n + 4) {
        border-bottom: 1px solid #cbd2d9;
    }

    .counter-card:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .contact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field--span-6,
    .field--span-4,
    .field--span-3,
    .field--span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 1rem;
        min-height: auto;
        padding: 1rem;
    }

    .sidebar__brand {
        margin-bottom: 0;
        max-width: 14rem;
        align-self: center;
    }

    .step-nav {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        overflow-x: auto;
        gap: 0.6rem;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
        width: 100%;
    }

    .step-nav li {
        min-width: 0;
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        border-left: 0;
        border-top: 2px solid transparent;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.04);
    }

    .step-nav li.is-active {
        border-left-color: transparent;
        border-top-color: #93b8de;
    }

    .step-nav__title {
        font-size: 0.96rem;
        margin-top: 0.2rem;
    }

    .step-nav__desc {
        display: none;
    }

    .sidebar__foot {
        display: none;
    }

    .main-content {
        padding: 1rem;
    }

    .wizard-card {
        width: 100%;
        padding: 0.5rem 0.5rem 1.5rem;
    }

    .package-grid,
    .result-panel {
        grid-template-columns: 1fr;
    }

    .choice-group {
        grid-template-columns: 1fr;
    }

    .choice-group__label {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 0.75rem;
    }

    .sidebar {
        padding: 0.75rem;
    }

    .sidebar__brand {
        max-width: 11rem;
        padding: 0.65rem;
        margin-left: auto;
        margin-right: auto;
    }

    .step-nav li {
        gap: 0.35rem;
        padding: 0.7rem 0.4rem;
    }

    .step-nav__index {
        height: 2rem;
        font-size: 0.95rem;
        width: 2rem;
    }

    .step-nav__title {
        font-size: 0.9rem;
        line-height: 1.1;
    }

    .step-header h1 {
        font-size: 2.15rem;
    }

    .step-kicker {
        font-size: 0.82rem;
    }

    .step-header p,
    .field label,
    .checkbox-field > label,
    .checkbox-inline,
    .summary-table td,
    .result-meta,
    .helper-text,
    .loading-text,
    .empty-state {
        font-size: 1rem;
    }

    .section-label__title {
        font-size: 1.1rem;
    }

    .section-label__meta,
    .nav-actions__stepnote {
        font-size: 0.86rem;
    }

    .counter-card {
        min-height: 11.5rem;
        gap: 1.5rem;
        padding: 1.1rem 1rem 1rem;
    }

    .icon-badge {
        width: 1.9rem;
        height: 1.9rem;
    }

    .counter-title h3 {
        font-size: 1.18rem;
        line-height: 1.15;
    }

    .counter-controls {
        grid-template-columns: 2.9rem 4rem 2.9rem;
    }

    .count-btn {
        height: 2.8rem;
        font-size: 1.35rem;
    }

    .count-value {
        height: 2.8rem;
        font-size: 1.25rem;
    }

    .summary-card {
        padding: 1rem;
    }

    .result-card {
        padding: 1.25rem 1rem;
    }

    .result-panel {
        gap: 1rem;
    }

    .room-counter-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .counter-card {
        border-right: 0 !important;
        border-bottom: 1px solid #cbd2d9 !important;
    }

    .counter-card:last-child {
        border-bottom: 0 !important;
    }

    .summary-table,
    .summary-table tbody,
    .summary-table tr,
    .summary-table td {
        display: block;
        width: 100%;
    }

    .summary-table thead {
        display: none;
    }

    .summary-table td {
        text-align: left !important;
        padding: 0.4rem 0;
        border-bottom: 0;
    }

    .summary-table tr {
        padding: 0.8rem 0;
        border-bottom: 1px solid #e1e6eb;
    }

    .nav-actions {
        gap: 1rem;
        align-items: stretch;
        flex-direction: column;
    }

    .nav-actions__buttons {
        width: 100%;
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }
}
