*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #121514;
    --surface: #181d1b;
    --surface-strong: #202722;
    --ink: #f3f6ef;
    --muted: #a8b4aa;
    --soft: #d7dfd5;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #23b083;
    --accent-strong: #40d29d;
    --gold: #d6a548;
    --danger: #ff7a72;
    --shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    background: var(--bg);
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 16% 8%, rgba(35, 176, 131, 0.18), transparent 28rem),
        radial-gradient(circle at 86% 14%, rgba(214, 165, 72, 0.12), transparent 30rem),
        linear-gradient(90deg, #15211b 0%, #171914 44%, #111412 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: inherit;
}

h1, h2, h3, p {
    margin: 0;
}

h1:focus {
    outline: none;
}

.mind-shell {
    min-height: 100vh;
}

.site-header {
    width: min(1280px, calc(100% - 56px));
    min-height: 58px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand,
.header-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 900;
}

.brand {
    gap: 12px;
    font-size: 1.1rem;
}

.brand-mark {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(64, 210, 157, 0.5);
    border-radius: 8px;
    background:
        linear-gradient(90deg, transparent 46%, rgba(255, 255, 255, 0.42) 47% 53%, transparent 54%),
        linear-gradient(0deg, transparent 46%, rgba(255, 255, 255, 0.42) 47% 53%, transparent 54%),
        linear-gradient(135deg, #2acb97, #13775d);
    box-shadow: 0 0 0 5px rgba(35, 176, 131, 0.12);
}

.header-link {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--soft);
    font-size: 0.9rem;
}

.storefront {
    width: min(1280px, calc(100% - 56px));
    margin: 0 auto;
    padding: 12px 0 56px;
    display: grid;
    gap: 28px;
}

.hero-panel {
    max-width: 680px;
    display: grid;
    gap: 12px;
    padding: 12px 0 2px;
}

.eyebrow {
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 620px;
    font-size: clamp(2.1rem, 3.7vw, 3.35rem);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    line-height: 1;
    letter-spacing: 0;
}

h3 {
    font-size: 1.15rem;
    line-height: 1.16;
    letter-spacing: 0;
}

.lede {
    max-width: 560px;
    color: var(--muted);
    font-size: clamp(0.96rem, 1.2vw, 1.08rem);
    line-height: 1.6;
}

.signal-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.signal-row span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(64, 210, 157, 0.24);
    border-radius: 999px;
    background: rgba(35, 176, 131, 0.1);
    color: #dff7ed;
    font-size: 0.84rem;
    font-weight: 850;
}

.catalog-section {
    display: grid;
    gap: 16px;
}

.section-heading {
    display: grid;
    gap: 8px;
}

.section-heading > p:not(.eyebrow) {
    max-width: 620px;
    color: var(--muted);
    line-height: 1.5;
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 360px));
    justify-content: start;
    gap: 16px;
}

.product-configurator {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    column-gap: clamp(42px, 5vw, 82px);
    row-gap: 22px;
    align-items: start;
}

.base-product-column {
    min-width: 0;
}

.addon-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(64, 210, 157, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(35, 176, 131, 0.08), rgba(214, 165, 72, 0.05)),
        rgba(24, 29, 27, 0.58);
    box-shadow: var(--shadow);
}

.addon-panel-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.connector-plus {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(64, 210, 157, 0.52);
    border-radius: 8px;
    background: rgba(35, 176, 131, 0.18);
    color: var(--accent-strong);
    font-size: 1.8rem;
    font-weight: 950;
    line-height: 1;
}

.addon-panel-heading h3 {
    margin-top: 3px;
}

.addon-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.product-card {
    max-width: 360px;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 29, 27, 0.86);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: grid;
}

.addon-panel .product-card {
    max-width: none;
}

.product-card.selected {
    border-color: rgba(64, 210, 157, 0.72);
    box-shadow: 0 0 0 1px rgba(64, 210, 157, 0.28), var(--shadow);
}

.product-card.selection-locked {
    opacity: 0.7;
}

.product-image,
.summary-image {
    width: 100%;
    object-fit: contain;
    background: #0b0f0d;
}

.product-image {
    aspect-ratio: 16 / 9;
    border-bottom: 1px solid var(--line);
}

.summary-image {
    aspect-ratio: 16 / 10;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.product-mark {
    min-height: 150px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(35, 176, 131, 0.2), rgba(214, 165, 72, 0.12));
}

.product-mark span {
    width: 76px;
    height: 76px;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
}

.product-body {
    min-height: 190px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.product-heading {
    display: grid;
    gap: 8px;
}

.product-type {
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 950;
    text-transform: uppercase;
}

.product-description {
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.product-footer {
    align-self: end;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
}

.product-footer > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
}

.price {
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 950;
}

.availability {
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: right;
}

.checkout-button,
.back-link {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #04120d;
    font-weight: 950;
    text-decoration: none;
}

.checkout-button:hover,
.back-link:hover {
    background: var(--accent-strong);
}

.checkout-button.selected-button {
    background: var(--accent-strong);
}

.checkout-button.secondary,
.checkout-button:disabled {
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.09);
    color: var(--muted);
}

.catalog-actions {
    display: flex;
    justify-content: flex-start;
}

.catalog-actions .checkout-button {
    min-width: min(100%, 360px);
}

.product-selector {
    min-height: 40px;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid rgba(64, 210, 157, 0.5);
    border-radius: 8px;
    background: rgba(35, 176, 131, 0.14);
    color: var(--ink);
    font-weight: 950;
    cursor: pointer;
}

.product-selector.disabled {
    cursor: not-allowed;
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.product-selector input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.product-selector span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.catalog-status,
.checkout-status {
    min-height: 220px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-weight: 900;
}

.checkout-page {
    width: min(1100px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 72px;
}

.back-link {
    width: max-content;
    margin-bottom: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.06);
    color: var(--ink);
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1fr);
    gap: 24px;
    align-items: start;
}

.checkout-summary,
.checkout-form,
.success-panel {
    padding: clamp(20px, 3vw, 32px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(24, 29, 27, 0.9);
    box-shadow: var(--shadow);
}

.checkout-summary,
.checkout-form,
.success-panel {
    display: grid;
    gap: 18px;
}

.checkout-addons {
    display: grid;
    gap: 12px;
}

.checkout-addon-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 12px;
}

.checkout-addons h2 {
    font-size: 1.4rem;
}

.addon-option {
    min-height: 72px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    cursor: pointer;
}

.addon-option:has(input:checked) {
    border-color: rgba(64, 210, 157, 0.72);
    background: rgba(35, 176, 131, 0.14);
}

.addon-option:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.72;
}

.addon-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.addon-option span {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.addon-option strong {
    overflow-wrap: anywhere;
}

.addon-option small {
    color: var(--accent-strong);
    font-size: 0.9rem;
    font-weight: 900;
}

.checkout-summary h1,
.success-panel h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.8rem);
}

.price-row {
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.product-facts {
    margin: 0;
    display: grid;
    gap: 12px;
}

.product-facts div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
}

.product-facts dt,
.wire-details dt,
.wire-bank dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.product-facts dd,
.wire-details dd,
.wire-bank dd {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    overflow-wrap: anywhere;
    font-weight: 850;
}

.form-grid,
.card-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.payment-method {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--soft);
    font-weight: 900;
}

.payment-method.active {
    border-color: rgba(64, 210, 157, 0.75);
    background: rgba(35, 176, 131, 0.22);
    color: var(--ink);
}

.full-span {
    grid-column: 1 / -1;
}

.checkout-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.checkout-form input,
.stripe-field {
    min-height: 46px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--ink);
}

.checkout-form input:focus,
.stripe-field:focus-within {
    outline: 2px solid rgba(64, 210, 157, 0.35);
    border-color: rgba(64, 210, 157, 0.7);
}

.payment-error {
    min-height: 20px;
    margin: 0;
    color: var(--danger);
    font-weight: 900;
}

.payment-note,
.product-note {
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(64, 210, 157, 0.24);
    border-radius: 8px;
    background: rgba(35, 176, 131, 0.1);
    color: #c5f4df;
    font-size: 0.9rem;
    font-weight: 850;
}

.stripe-payment-element,
.wire-panel,
.wire-bank-list,
.wire-details,
.wire-bank {
    display: grid;
    gap: 12px;
}

.wire-details,
.wire-bank {
    margin: 0;
}

.wire-details div,
.wire-bank div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.checkout-status.error {
    color: var(--danger);
}

.not-found {
    min-height: 100vh;
    display: grid;
    place-content: center;
    gap: 14px;
    text-align: center;
}

.not-found h1 {
    font-size: 2.2rem;
}

.not-found a {
    color: var(--accent-strong);
    font-weight: 900;
}

#blazor-error-ui {
    color-scheme: dark;
    background: #372015;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #7d1e1e;
    color: white;
    padding: 1rem;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.16);
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text::after {
    content: var(--blazor-load-percentage-text, "Loading");
}

code {
    color: #ffb66e;
}

@media (max-width: 900px) {
    .site-header,
    .storefront,
    .checkout-page {
        width: min(100% - 28px, 720px);
    }

    .hero-panel {
        padding-top: 22px;
    }

    h1 {
        font-size: clamp(2.25rem, 12vw, 4rem);
    }

    .catalog-grid,
    .product-configurator,
    .addon-product-grid,
    .checkout-layout,
    .payment-methods,
    .form-grid,
    .card-fields {
        grid-template-columns: 1fr;
    }

    .product-card {
        max-width: none;
    }

    .catalog-actions .checkout-button {
        width: 100%;
    }

    .product-body {
        min-height: 0;
        padding: 20px;
    }

    .product-footer > div,
    .price-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .availability {
        text-align: left;
    }

    .product-facts div,
    .wire-details div,
    .wire-bank div {
        grid-template-columns: 1fr;
    }
}
