@font-face {
    font-family: Manrope;
    src: url('/optigo/fonts/manrope-latin-variable.woff2') format('woff2');
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

:root {
    color: #050505;
    background: #e9e9e7;
    font-family: Manrope, Arial, sans-serif;
    font-synthesis: none;
    --black: #050505;
    --white: #fff;
    --muted: #61615d;
    --soft: #f4f4f1;
    --line: #171717;
    --hairline: #c9c9c4;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; }
body { background: #e9e9e7; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button, label, input[type="radio"], input[type="checkbox"] { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid #50504d; outline-offset: 3px; }
[hidden] { display: none !important; }

.optigo-shell {
    width: min(100%, 430px);
    min-height: 100dvh;
    margin-inline: auto;
    position: relative;
    overflow-x: hidden;
    background: var(--white);
    border-inline: 1px solid #d7d7d2;
}

.shop-home, .shop-wizard {
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: var(--white);
}

.site-header {
    min-height: 54px;
    padding: 13px 20px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.site-header.compact { min-height: 64px; padding-block: 15px 12px; }
.wordmark { padding: 0; border: 0; background: transparent; font-size: 31px; font-weight: 760; line-height: .95; letter-spacing: -.075em; text-decoration: none; }
.site-header nav { display: flex; gap: 20px; align-items: center; }
.site-header nav button { padding: 5px 0 7px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 14px; }
.site-header nav button.active, .site-header nav button:hover { border-bottom-color: var(--black); }
.site-header nav button:disabled { color: #969691; border-bottom-color: transparent; cursor: not-allowed; }
.site-header nav [data-install] { font-weight: 750; }
.back-button { padding: 8px 0; border: 0; border-bottom: 1px solid var(--black); background: transparent; font-size: 12px; font-weight: 700; }

.home-content { padding: 38px 20px 8px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 38px; font-size: clamp(38px, 10.8vw, 46px); font-weight: 720; line-height: 1; letter-spacing: -.065em; }
.home-content > h1 { white-space: nowrap; }
.error-banner { margin: -12px 0 24px; padding: 12px; border: 1px solid var(--black); font-size: 12px; line-height: 1.5; }

.purchase-routes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.purchase-route { min-width: 0; min-height: 244px; padding: 17px 12px 18px 0; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; }
.purchase-route + .purchase-route { padding-inline: 12px 0; border-left: 1px solid var(--line); }
.route-label { margin-bottom: 5px; font-size: 12px; font-weight: 780; letter-spacing: .045em; }
.route-note { min-height: 48px; margin-bottom: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.route-price { display: grid; gap: 2px; }
.route-price > small { font-size: 11px; }
.route-price strong { display: flex; align-items: baseline; font-weight: 730; line-height: .86; white-space: nowrap; }
.route-price strong span { margin-right: 1px; font-size: 22px; letter-spacing: -.08em; }
.route-price strong b { font-size: clamp(39px, 10.8vw, 46px); font-weight: inherit; letter-spacing: -.105em; }

.primary-button {
    min-height: 50px;
    width: 100%;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--black);
    border-radius: 0;
    background: var(--black);
    color: var(--white);
    font-size: 12px;
    font-weight: 740;
    text-align: center;
    text-decoration: none;
}
.primary-button:hover { background: var(--white); color: var(--black); }
.primary-button:disabled { border-color: #9f9f99; background: #9f9f99; cursor: not-allowed; }

.frame-feature { padding: 24px 0 14px; }
.frame-feature img, .step-frame-image { width: 100%; height: auto; display: block; mix-blend-mode: multiply; }
.frame-feature img { margin-block: -16px -2px; }
.frame-image-placeholder { min-height: 190px; margin-bottom: 18px; display: grid; place-items: center; border: 1px dashed var(--hairline); background: var(--soft); color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.frame-image-placeholder.step-placeholder { min-height: 155px; margin-block: 0 18px; }
.frame-feature h2 { margin-bottom: 5px; font-size: 22px; line-height: 1; letter-spacing: -.05em; }
.frame-feature p { margin-bottom: 15px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.frame-picker { display: grid; grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--hairline); }
.frame-picker button { padding: 9px 0 11px; border: 0; border-bottom: 3px solid transparent; background: transparent; font-size: 12px; text-align: center; }
.frame-picker button.active { border-bottom-color: var(--black); font-weight: 780; }
.trust-strip { min-height: 56px; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); background: var(--white); font-size: 10px; font-weight: 650; line-height: 1.35; }
.network-status { white-space: nowrap; }
.offline-notice { position: fixed; z-index: 20; top: 8px; left: 50%; width: min(calc(100% - 24px), 406px); padding: 9px 12px; transform: translateX(-50%); border: 1px solid var(--black); background: var(--black); color: var(--white); font-size: 10px; font-weight: 720; text-align: center; }

.shop-wizard { position: relative; height: 100dvh; overflow: hidden; }
.progress-track { position: absolute; top: 63px; left: 0; right: 0; height: 3px; background: #e3e3df; z-index: 3; }
.progress-track span { display: block; width: 16.666%; height: 100%; background: var(--black); transition: width 180ms ease; }
.wizard-scroll { min-height: 0; overflow-y: auto; padding: 32px 20px 108px; }
.eyebrow { margin: 0 0 12px; font-size: 10px; font-weight: 760; line-height: 1.25; letter-spacing: .11em; text-transform: uppercase; }
.wizard-step h1 { margin-bottom: 22px; font-size: clamp(38px, 11vw, 48px); }
.step-lead, .confirmation-lead { margin: -10px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.step-frame-image { margin: -8px -8px 2px; width: calc(100% + 16px); }
.choice-list { border-top: 1px solid var(--line); }
.choice-row { width: 100%; min-height: 76px; padding: 13px 0; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--hairline); }
.choice-row input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.choice-marker { width: 16px; height: 16px; border: 1px solid var(--black); }
.choice-row:has(input:checked) .choice-marker { border: 5px solid var(--black); background: var(--white); }
.choice-copy { display: grid; gap: 4px; text-align: left; }
.choice-copy strong { font-size: 13px; line-height: 1.25; }
.choice-copy small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.choice-price { display: grid; gap: 3px; font-size: 13px; font-weight: 720; text-align: right; white-space: nowrap; }
.choice-price small { color: var(--muted); font-size: 9px; font-weight: 500; }
.notice { margin-top: 18px; padding: 13px 0; border-block: 1px solid var(--hairline); color: var(--muted); font-size: 11px; line-height: 1.5; }

.segmented-control { margin-bottom: 18px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--black); }
.segmented-control label { min-height: 44px; display: grid; place-items: center; font-size: 11px; font-weight: 680; }
.segmented-control label + label { border-left: 1px solid var(--black); }
.segmented-control label:has(input:checked) { background: var(--black); color: var(--white); }
.segmented-control input { position: absolute; opacity: 0; }
.upload-field { min-height: 146px; padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; border: 1px dashed var(--black); text-align: center; }
.upload-field strong { font-size: 13px; }
.upload-field small { color: var(--muted); font-size: 10px; }
.upload-field input { max-width: 100%; margin-top: 7px; font-size: 10px; }
.compact-upload { min-height: 116px; margin-top: 18px; }
.rx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.form-stack { display: grid; gap: 15px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 10px; font-weight: 730; letter-spacing: .06em; text-transform: uppercase; }
.field input, .field textarea { width: 100%; padding: 12px; border: 1px solid var(--hairline); border-radius: 0; background: var(--white); font-size: 14px; }
.field textarea { resize: vertical; }
.field-error { color: #8f1717; font-size: 10px; line-height: 1.4; }

.wizard-actions { padding: 12px 20px 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--line); background: rgba(255,255,255,.98); }
.assistant-button { min-height: 50px; padding: 0 14px; border: 1px solid var(--black); background: var(--white); font-size: 11px; font-weight: 720; }
.wizard-actions [data-submit] { grid-column: 2; }

.order-summary { border-top: 1px solid var(--line); }
.order-summary > div { min-height: 51px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--hairline); }
.order-summary span { color: var(--muted); font-size: 11px; }
.order-summary strong { max-width: 62%; font-size: 12px; text-align: right; }
.order-summary .summary-total { min-height: 72px; border-bottom-color: var(--line); }
.order-summary .summary-total strong { font-size: 28px; letter-spacing: -.06em; }
.consent-row { margin-top: 22px; display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.consent-row input { width: 18px; height: 18px; margin: 0; accent-color: var(--black); }

.assistant-dialog { width: min(calc(100% - 32px), 398px); max-height: min(620px, calc(100dvh - 32px)); padding: 0; border: 1px solid var(--black); border-radius: 0; background: var(--white); color: var(--black); }
.assistant-dialog::backdrop { background: rgba(0,0,0,.55); }
.assistant-head { padding: 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.assistant-head > div { display: grid; }
.assistant-head strong { font-size: 20px; }
.assistant-head small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.assistant-head button { padding: 5px 0; border: 0; border-bottom: 1px solid var(--black); background: transparent; font-size: 11px; }
.assistant-messages { min-height: 190px; max-height: 390px; padding: 16px; overflow-y: auto; }
.assistant-messages p { margin-bottom: 10px; padding: 11px; border: 1px solid var(--hairline); font-size: 12px; line-height: 1.5; }
.assistant-messages p.user { margin-left: 32px; border-color: var(--black); background: var(--black); color: var(--white); }
.assistant-dialog form { padding: 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; border-top: 1px solid var(--line); }
.assistant-dialog input { width: 100%; min-height: 44px; padding: 10px; border: 1px solid var(--hairline); }
.assistant-dialog form button { min-width: 72px; border: 1px solid var(--black); background: var(--black); color: var(--white); }

.confirmation-shell { min-height: 100dvh; background: var(--white); }
.confirmation-content { padding: 54px 20px 32px; }
.confirmation-content h1 { font-size: clamp(44px, 13vw, 58px); }
.confirmation-content .primary-button { margin-top: 24px; }
.offline-shell { min-height: 100dvh; display: grid; place-items: center; padding: 22px; background: var(--white); }
.offline-card { width: min(100%, 430px); padding: 28px; border: 1px solid var(--black); background: var(--white); }
.offline-card .wordmark { margin-bottom: 62px; }
.offline-card h1 { margin-bottom: 20px; }
.offline-card > p:not(.eyebrow) { margin-bottom: 28px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.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 (min-width: 431px) {
    body { padding-block: 24px; }
    .optigo-shell, .shop-home, .shop-wizard { min-height: min(844px, calc(100dvh - 48px)); }
    .shop-wizard { height: min(844px, calc(100dvh - 48px)); }
}

@media (max-width: 370px) {
    .home-content { padding-inline: 14px; }
    .site-header, .trust-strip, .wizard-actions { padding-inline: 14px; }
    .route-price strong span { font-size: 18px; }
    .route-price strong b { font-size: 35px; }
    .route-note { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
