:root {
    color-scheme: light;
    --page-bg: #fdfdfc;
    --alternate-bg: #f5f6fa;
    --surface: #ffffff;
    --text-primary: #202127;
    --text-secondary: #60636f;
    --text-on-brand: #484c5c;
    --text-muted: #737784;
    --border: #e2e4ec;
    --field-border: color-mix(in srgb, var(--text-secondary) 65%, var(--border));
    --field-bg: color-mix(in srgb, var(--surface-brand) 20%, var(--surface));
    --field-focus-ring: color-mix(in srgb, var(--brand-blue) 14%, transparent);
    --validation-error: #a6324f;
    --brand-cyan: #087fa4;
    --brand-blue: #2254d2;
    --brand-violet: #7035ce;
    --brand-magenta: #a649ad;
    --brand-ink-blue: #173fae;
    --brand-ink-violet: #5923b4;
    --brand-text-gradient: linear-gradient(115deg, var(--brand-ink-blue) 10%, var(--brand-ink-violet) 90%);
    --accent-blue: var(--brand-blue);
    --accent-violet: var(--brand-violet);
    --brand-gradient: linear-gradient(115deg, var(--brand-blue) 10%, var(--brand-violet) 90%);
    --brand-gradient-secondary: linear-gradient(125deg, var(--brand-cyan), var(--brand-blue) 38%, var(--brand-violet) 72%, var(--brand-magenta));
    --surface-blue: #eff8fd;
    --surface-violet: #f5f0fc;
    --surface-brand: #f3f5fc;
    --glow-cyan: #12d3f4;
    --glow-blue: #387eff;
    --glow-violet: #9658f3;
    --glow-magenta: #e968d4;
    --ambient-mask: radial-gradient(ellipse at center, #000 15%, transparent 70%);
    --field-mask: radial-gradient(ellipse at center, #000 28%, transparent 72%);
    --privacy-cyan: #b7edfa;
    --privacy-blue: #c2dbff;
    --privacy-violet: #d4bff8;
    --privacy-magenta: #efc6eb;
    --ambient-spectrum:
        radial-gradient(ellipse 55% 48% at 65% 22%, var(--glow-cyan), transparent 90%),
        radial-gradient(ellipse 58% 55% at 28% 42%, var(--glow-blue), transparent 90%),
        radial-gradient(ellipse 58% 52% at 55% 65%, var(--glow-violet), transparent 90%),
        radial-gradient(ellipse 48% 50% at 82% 78%, var(--glow-magenta), transparent 90%);
    --ambient-cool:
        radial-gradient(ellipse 65% 36% at 24% 25%, var(--glow-cyan), transparent 65%),
        radial-gradient(ellipse 65% 40% at 52% 48%, var(--glow-blue), transparent 70%),
        radial-gradient(ellipse 52% 35% at 78% 73%, var(--glow-violet), transparent 65%);
    --ambient-warm:
        radial-gradient(ellipse at 68% 25%, var(--glow-blue), transparent 65%),
        radial-gradient(ellipse at 40% 55%, var(--glow-violet), transparent 70%),
        radial-gradient(ellipse at 16% 76%, var(--glow-magenta), transparent 65%);
    --header-bg: #fdfdfce8;
    --shadow-color: #32334f18;
    --on-accent: #ffffff;
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --page-width: 1160px;
    --gutter: clamp(22px, 5vw, 72px);
    --section-space: clamp(76px, 9vw, 136px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
body { margin: 0; background: var(--page-bg); color: var(--text-primary); font-family: var(--font-system); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-blue); }
button, input, summary { font: inherit; }
:focus-visible { outline: 3px solid var(--accent-blue); outline-offset: 6px; border-radius: 4px; }
/* Keep decorative content in a stacking context below the sticky header. */
main { isolation: isolate; }
main:focus { outline: none; }
::selection { background: var(--glow-violet); color: var(--text-primary); }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; }
h1 { font-size: clamp(54px, 6.3vw, 86px); line-height: 1.055; letter-spacing: -.065em; }
h2 { font-size: clamp(39px, 4.4vw, 60px); line-height: 1.1; letter-spacing: -.05em; }
h3 { font-size: 19px; line-height: 1.35; letter-spacing: -.025em; }
img { max-width: 100%; }
.page-width { width: min(calc(100% - var(--gutter) * 2), var(--page-width)); margin-inline: auto; }
.section-space { padding-block: var(--section-space); }
.eyebrow { margin-bottom: 24px; color: var(--text-secondary); font-size: 12px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.section-description { color: var(--text-secondary); font-size: 18px; line-height: 1.75; }
/* Solid text remains readable when clipping is unavailable or colors are forced. */
.gradient-text { color: var(--brand-ink-blue); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
    .gradient-text { background: var(--brand-text-gradient); background-clip: text; -webkit-background-clip: text; color: transparent; }
}
.ambient-glow { position: absolute; inset: 0; background: var(--ambient-spectrum); mask-image: var(--field-mask); opacity: .85; pointer-events: none; z-index: -1; }
.app-mark { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; object-fit: contain; }
.app-mark-placeholder { border-radius: 10px; background: var(--brand-gradient); color: var(--on-accent); box-shadow: inset 0 0 0 1px var(--shadow-color); font-size: 22px; }
.store-cta { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 54px; padding: 14px 23px; border-radius: 10px; background: var(--text-primary); color: var(--on-accent); font-size: 16px; font-weight: 500; line-height: 1.35; transition: transform .18s ease; }
/* Fade a stable gradient layer: solid-color/gradient backgrounds cannot interpolate. */
a.store-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--brand-gradient); opacity: 0; transition: opacity .18s ease; pointer-events: none; }
a.store-cta:hover, a.store-cta:focus-visible { color: var(--on-accent); }
a.store-cta:hover::before, a.store-cta:focus-visible::before { opacity: 1; }
a.store-cta:hover { transform: translateY(-2px); }
.store-cta > .hx-icon { font-size: 22px; flex-shrink: 0; }
.cta-arrow { margin-left: 5px; opacity: .65; }
.store-cta-compact { min-height: 40px; padding: 10px 15px; font-size: 13px; border-radius: 8px; gap: 8px; }
.store-cta-compact > .hx-icon { font-size: 17px; }
.store-cta-compact .cta-arrow { display: none; }
.store-cta-coming-soon { min-width: 206px; background: var(--text-primary); color: var(--on-accent); cursor: default; transition: none; }
.store-cta-coming-soon.store-cta-compact { min-width: 142px; }
.purchase-note { margin-top: 16px; color: var(--text-secondary); font-size: 12px; letter-spacing: .015em; }
.skip-link { position: fixed; top: 8px; left: 16px; padding: 12px 20px; background: var(--surface); z-index: 100; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; white-space: nowrap; }
.skip-link:focus { clip-path: none; width: auto; height: auto; overflow: visible; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; min-height: 86px; gap: 38px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 21px; font-weight: 600; letter-spacing: -.035em; }
.primary-nav a:hover, .primary-nav a:focus-visible { color: var(--brand-violet); }
.primary-nav { display: flex; gap: 30px; margin-left: auto; font-size: 13px; font-weight: 500; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 30px; border-top: 1px solid var(--border); font-size: 13px; line-height: 1.6; }
.footer-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.footer-brand .app-mark { width: 30px; height: 30px; }
.footer-brand > span { font-size: 17px; font-weight: 600; }
.footer-contact, .site-footer nav { display: flex; align-items: center; gap: 22px; }
.footer-contact { flex-wrap: wrap; justify-content: center; min-width: 0; }
.footer-email { color: var(--text-secondary); overflow-wrap: anywhere; }
.footer-attribution { display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--text-secondary); font-size: 12px; flex-shrink: 0; }
.footer-publisher { display: inline-flex; align-items: center; gap: 7px; }
.footer-version { white-space: nowrap; }
.site-footer a { padding-block: 7px; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--brand-ink-blue); text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 701px) and (max-width: 1050px) {
    .site-footer { flex-wrap: wrap; gap: 12px 28px; }
    .footer-contact { margin-left: auto; justify-content: flex-end; }
    .footer-attribution { flex-basis: 100%; }
}
#blazor-error-ui { display: none; position: fixed; inset: auto 0 0; padding: 1rem; background: var(--surface); border-top: 1px solid var(--border); z-index: 30; }
#blazor-error-ui a { text-decoration: underline; }
@media (max-width: 700px) {
    .header-inner { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding-block: 14px 10px; }
    .brand { font-size: 19px; }
    .brand .app-mark { width: 32px; height: 32px; font-size: 18px; }
    .header-cta { grid-column: 2; grid-row: 1; }
    .primary-nav { grid-column: 1 / -1; grid-row: 2; justify-content: center; margin-left: 0; gap: 36px; }
    .primary-nav a { padding: 7px 0; }
    .store-cta-compact { font-size: 12px; padding: 9px 12px; }
    .store-cta-coming-soon.store-cta-compact { min-width: 126px; }
    .site-footer { flex-direction: column; align-items: flex-start; gap: 16px; padding-block: 28px; }
    .footer-contact { flex-direction: column; align-items: flex-start; gap: 2px; max-width: 100%; }
    .footer-attribution { flex-direction: column; align-items: flex-start; gap: 0; }
    .footer-separator { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Document routes share the brand without compromising reading width. */
.document-page { padding-block: 64px 100px; }
.document-heading { position: relative; isolation: isolate; max-width: 850px; margin-bottom: 56px; }
.document-heading::before { content: ""; position: absolute; inset: -35px 0; background: var(--ambient-spectrum); mask-image: var(--field-mask); opacity: .22; z-index: -1; pointer-events: none; }
.document-heading h1 { font-size: clamp(40px, 5vw, 64px); }
.document-heading p { margin-top: 24px; color: var(--text-secondary); max-width: 650px; }
.policy-body { max-width: 740px; }
.policy-body section { margin-top: 32px; }
.policy-body h2, .support-grid h2 { font-size: 25px; letter-spacing: -.025em; margin-bottom: 16px; }
.policy-body p { color: var(--text-secondary); }
.support-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 80px; }
.support-form fieldset { min-width: 0; }
.support-form .mb-3, .support-form .form-select { margin-bottom: 20px; }
.support-form .form-control { margin-bottom: 16px; }
.support-form label { font-size: 15px; font-weight: 500; }
.support-form .form-control, .support-form .form-select {
    min-height: 48px; padding: 12px 14px; border: 1px solid var(--field-border); border-radius: 10px;
    background-color: var(--field-bg); color: var(--text-primary);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.support-form .form-select { padding-right: 40px; }
.support-form .form-control:hover:not(:disabled):not(:focus):not(.is-invalid), .support-form .form-select:hover:not(:disabled):not(:focus):not(.is-invalid) {
    border-color: color-mix(in srgb, var(--brand-blue) 35%, var(--field-border));
}
.support-form .form-control:focus, .support-form .form-select:focus {
    border-color: var(--brand-blue); box-shadow: 0 0 0 4px var(--field-focus-ring);
}
.support-form .form-control.is-invalid, .support-form .form-select.is-invalid { border-color: var(--validation-error); }
.support-form .form-control:disabled, .support-form .form-select:disabled { background-color: var(--alternate-bg); }
.support-privacy-notice { margin-block: 14px 24px; font-size: 14px; line-height: 1.6; color: var(--text-secondary); }
.support-privacy-notice p + p { margin-top: 4px; }
.support-privacy-notice a { text-decoration: underline; text-underline-offset: 3px; }
.form-note { font-size: 14px; color: var(--text-secondary); margin-block: 18px 0; }
.form-note a { text-decoration: underline; }
.support-form .support-submit { background: var(--brand-gradient); color: var(--on-accent); border: 1px solid transparent; border-radius: 10px; min-height: 50px; padding: 12px 26px; font-weight: 500; transition: filter .15s ease, box-shadow .15s ease; }
.support-form .support-submit:hover:not(:disabled) { filter: brightness(.94); }
.support-form .support-submit:active:not(:disabled) { filter: brightness(.86); }
.support-form .support-submit:focus-visible { outline: 3px solid var(--brand-ink-blue); outline-offset: 4px; box-shadow: 0 0 0 7px var(--field-focus-ring); }
.support-form .support-submit:disabled { opacity: .65; cursor: wait; }
.support-page .document-heading::before { inset: -44px -16px -16px; opacity: .36; }
.support-direct { display: flex; align-items: flex-start; gap: 14px; margin-top: 32px; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--border) 75%, var(--surface)); border-radius: 12px; background: linear-gradient(120deg, var(--surface-blue), var(--surface-brand) 50%, var(--surface-violet)); }
.support-direct > .hx-icon { color: var(--brand-blue); font-size: 22px; line-height: 1.5; }
.support-grid .support-direct h2 { font-size: 16px; margin-bottom: 4px; letter-spacing: -.015em; }
.support-direct p { font-size: 14px; color: var(--text-secondary); }
.support-direct a { display: inline-block; max-width: 100%; padding-block: 2px; color: var(--brand-ink-blue); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.support-direct > div { min-width: 0; }
.support-faq details[open] summary { color: var(--brand-ink-blue); }
.support-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.form-error, .validation-message, .validation-errors { color: var(--text-primary); margin-block: 12px; }
@media (max-width: 800px) { .support-grid { grid-template-columns: 1fr; gap: 48px; } .document-page { padding-block: 40px 64px; } }

/* Field validation remains subtle, with accessible messages beside each control. */
.support-form .form-control.is-invalid { background-image: none; }
.support-form .form-select.is-invalid { --bs-form-select-bg-icon: none; }

/* Keep support confirmation toasts within narrow mobile viewports. */
.hx-messenger .hx-toast-container { max-width: calc(100vw - 2rem); }

/* Narrow phones: a single-row sticky header and readable, touch-friendly footer. */
@media (max-width: 600px) {
    .header-inner { min-height: 68px; padding-block: 12px; }
    .primary-nav { display: none; }
    .header-cta .store-cta { min-height: 44px; }
    .site-footer { font-size: 14px; gap: 12px; }
    .footer-attribution { font-size: 13px; }
    .site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
    .site-footer .footer-email { display: block; padding-block: 11px; }
}
