:root {
    color-scheme: light dark;
    --brand: #16a34a;
    --brand-strong: #12803c;
    --brand-soft: rgba(22, 163, 74, 0.12);
    --aurora-blue: #0ea5e9;
    --aurora-cyan: #06b6d4;
    --background: #f4f5f8;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-muted: #eef0f3;
    --text: #121417;
    --text-secondary: #72777f;
    --text-tertiary: #9b9fa6;
    --border: rgba(17, 24, 39, 0.1);
    --danger: #dc2626;
    --shadow: 0 18px 46px rgba(16, 24, 40, 0.08);
    --radius: 24px;
    --radius-small: 16px;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #090a0c;
        --surface: #1b1c1f;
        --surface-raised: #202226;
        --surface-muted: #2a2c31;
        --text: #f7f8fa;
        --text-secondary: #a6aab1;
        --text-tertiary: #747881;
        --border: rgba(255, 255, 255, 0.09);
        --shadow: 0 20px 52px rgba(0, 0, 0, 0.3);
    }
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--background);
    scroll-behavior: smooth;
}

body {
    min-height: 100dvh;
    margin: 0;
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
    overflow-x: hidden;
    font-family: var(--font);
    color: var(--text);
    background: var(--background);
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
    letter-spacing: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

a {
    color: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.42);
    outline-offset: 3px;
}

.site-header {
    width: min(1120px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header::before {
    content: "";
    height: 3px;
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    background: linear-gradient(90deg, #2563eb 0%, var(--aurora-blue) 45%, var(--aurora-cyan) 68%, var(--brand) 100%);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    text-decoration: none;
}

.brand img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(14, 165, 233, 0.2);
}

.brand span {
    display: grid;
    gap: 1px;
}

.brand strong {
    font-size: 19px;
    line-height: 1.1;
}

.brand small {
    color: var(--text-secondary);
    font-size: 12px;
}

.icon-button {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
    font-size: 18px;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.icon-button:hover {
    color: var(--brand);
    background: var(--brand-soft);
}

.icon-button:active {
    transform: scale(0.96);
}

.page-shell {
    width: min(1120px, calc(100% - 40px));
    margin: 28px auto 0;
}

.intro-block {
    max-width: 760px;
    margin-bottom: 26px;
}

.eyebrow,
.section-kicker {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

.intro-block h1 {
    max-width: 700px;
    margin: 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 760;
}

.intro-block p {
    margin: 14px 0 0;
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.6;
}

.stepper {
    max-width: 690px;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
    counter-reset: none;
}

.stepper li {
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.stepper li:not(:last-child)::after {
    content: "";
    height: 2px;
    position: absolute;
    left: 42px;
    right: 12px;
    top: 15px;
    background: var(--border);
}

.stepper span {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--surface);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.stepper .is-active,
.stepper .is-complete {
    color: var(--text);
}

.stepper .is-active span,
.stepper .is-complete span {
    border-color: var(--brand);
    color: #fff;
    background: var(--brand);
}

.stepper .is-complete:not(:last-child)::after {
    background: var(--brand);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 690px) minmax(280px, 360px);
    gap: 28px;
    align-items: start;
}

.workflow {
    display: grid;
    gap: 18px;
}

.workflow-card,
.trust-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.workflow-card {
    padding: 26px;
}

.section-heading {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    margin-bottom: 24px;
}

.section-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: var(--brand);
    background: var(--brand-soft);
    font-size: 20px;
}

.section-heading h2,
.support-card h2,
.modal-sheet h2 {
    margin: 3px 0 0;
    font-size: 21px;
    line-height: 1.25;
}

.completion-badge {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 999px;
    color: var(--brand);
    background: var(--brand-soft);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.completion-badge.is-visible {
    display: inline-flex;
}

.primary-button,
.secondary-button {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background 180ms ease, border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.primary-button {
    width: 100%;
    border: 0;
    color: #fff;
    background: var(--brand);
    box-shadow: 0 12px 30px rgba(22, 163, 74, 0.22);
}

.primary-button:hover {
    background: var(--brand-strong);
}

.primary-button:active,
.secondary-button:active {
    transform: scale(0.99);
}

.primary-button[disabled] {
    cursor: wait;
    opacity: 0.58;
}

.secondary-button {
    width: 100%;
    border: 1px solid rgba(22, 163, 74, 0.2);
    color: var(--brand);
    background: var(--brand-soft);
}

.secondary-button:hover {
    border-color: rgba(22, 163, 74, 0.4);
    background: rgba(22, 163, 74, 0.17);
}

.separator {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-tertiary);
    font-size: 12px;
}

.separator::before,
.separator::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--border);
}

.field {
    display: grid;
    gap: 8px;
}

.field-label {
    color: var(--text);
    font-size: 14px;
    font-weight: 680;
}

.field-label em {
    margin-left: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}

.field-control {
    min-height: 54px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text-secondary);
    background: var(--surface-muted);
    transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field-control:focus-within {
    border-color: var(--brand);
    background: var(--surface-raised);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.field-control input {
    width: 100%;
    min-width: 0;
    height: 52px;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    font-size: 16px;
}

.field-control input::placeholder {
    color: var(--text-tertiary);
}

.clear-input {
    width: 34px;
    height: 44px;
    border: 0;
    color: var(--text-tertiary);
    background: transparent;
    opacity: 0;
    pointer-events: none;
}

.field-control:has(input:not(:placeholder-shown)) .clear-input {
    opacity: 1;
    pointer-events: auto;
}

.field small {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.field-error:not(:empty) {
    color: var(--danger);
}

.field.has-error .field-control {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.09);
}

.delivery-options {
    display: grid;
    gap: 10px;
}

.delivery-option {
    min-height: 72px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 22px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-muted);
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease;
}

.delivery-option:hover,
.delivery-option.is-selected {
    border-color: rgba(22, 163, 74, 0.36);
    background: var(--brand-soft);
}

.delivery-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--text-secondary);
    background: var(--surface);
}

.is-selected .choice-icon,
.is-selected .choice-check {
    color: var(--brand);
}

.choice-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.choice-copy strong {
    font-size: 15px;
}

.choice-copy small {
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.choice-check {
    color: var(--text-tertiary);
}

.submit-button {
    min-height: 58px;
    font-size: 17px;
}

.button-loading {
    display: none;
}

.is-loading .button-idle {
    display: none;
}

.is-loading .button-loading {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.privacy-note {
    margin: -5px 0 0;
    color: var(--text-tertiary);
    text-align: center;
    font-size: 12px;
}

.support-panel {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 20px;
}

.support-card {
    padding: 0;
}

.support-card h2 {
    margin-bottom: 18px;
}

.quick-links {
    display: grid;
    gap: 10px;
}

.quick-links a,
.quick-links button {
    min-height: 72px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 16px;
    grid-template-rows: auto auto;
    column-gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--text);
    text-align: left;
    text-decoration: none;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

.quick-links a > span,
.quick-links button > span {
    width: 42px;
    height: 42px;
    grid-row: 1 / 3;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--brand);
    background: var(--brand-soft);
}

.quick-links strong {
    align-self: end;
    font-size: 15px;
}

.quick-links small {
    align-self: start;
    color: var(--text-secondary);
    font-size: 12px;
}

.quick-links > * > i {
    grid-column: 3;
    grid-row: 1 / 3;
    color: var(--text-tertiary);
    font-size: 12px;
}

.trust-card {
    display: flex;
    gap: 12px;
    padding: 18px;
    box-shadow: none;
}

.trust-card > i {
    margin-top: 2px;
    color: var(--aurora-blue);
}

.trust-card strong {
    font-size: 14px;
}

.trust-card p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.55;
}

.site-footer {
    width: min(1120px, calc(100% - 40px));
    margin: 48px auto 0;
    padding: 26px 0 34px;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    color: var(--text-tertiary);
    font-size: 12px;
}

.site-footer a {
    color: var(--brand);
    text-decoration: none;
}

.modal[hidden] {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-sheet {
    width: min(100%, 480px);
    max-height: min(760px, calc(100dvh - 40px));
    position: relative;
    z-index: 1;
    overflow-y: auto;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: 28px;
    background: var(--surface-raised);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
    animation: modal-in 220ms ease-out;
}

.modal-sheet header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.modal-handle {
    display: none;
}

.modal-sheet form {
    display: grid;
    gap: 18px;
}

.help-steps {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    list-style: none;
}

.help-steps li {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-radius: 16px;
    background: var(--surface-muted);
}

.help-steps li > span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--brand);
    font-weight: 700;
}

.help-steps div {
    display: grid;
    gap: 5px;
}

.help-steps small {
    color: var(--text-secondary);
    line-height: 1.55;
}

.query-results {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.result-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface-muted);
}

.result-card strong {
    display: block;
    margin-bottom: 8px;
}

.result-card dl {
    margin: 0;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 6px 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.result-card dt,
.result-card dd {
    margin: 0;
}

.result-card dd {
    overflow-wrap: anywhere;
    color: var(--text);
}

.compact-sheet {
    text-align: center;
}

.compact-sheet h2 {
    margin-top: 16px;
}

.compact-sheet > p {
    color: var(--text-secondary);
}

.compact-sheet > p.is-warning {
    padding: 10px 12px;
    border-radius: 12px;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    font-size: 13px;
    line-height: 1.5;
}

@media (prefers-color-scheme: dark) {
    .compact-sheet > p.is-warning {
        color: #fbbf24;
    }
}

.success-mark,
.status-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border-radius: 20px;
    color: #fff;
    background: var(--brand);
    font-size: 26px;
}

.result-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.result-actions .primary-button,
.result-actions .secondary-button {
    border-radius: 16px;
}

.text-button {
    min-height: 44px;
    margin-top: 8px;
    border: 0;
    color: var(--text-secondary);
    background: transparent;
}

.toast {
    min-width: 220px;
    max-width: min(420px, calc(100% - 32px));
    position: fixed;
    left: 50%;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 2000;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--text);
    text-align: center;
    background: var(--surface-raised);
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 16px);
    transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.callback-page {
    display: grid;
    place-items: center;
    padding: 24px;
}

.callback-card {
    width: min(100%, 420px);
    padding: 34px;
    border: 1px solid var(--border);
    border-radius: 28px;
    text-align: center;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.callback-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 20px;
}

.callback-card .status-icon {
    width: 42px;
    height: 42px;
    margin-top: -42px;
    margin-right: calc(50% - 48px);
    border: 4px solid var(--surface);
    border-radius: 14px;
    font-size: 18px;
}

.flow-badge {
    min-width: 58px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    margin: -42px calc(50% - 56px) 0 auto;
    padding: 0 9px;
    border: 4px solid var(--surface);
    border-radius: 13px;
    color: #fff;
    background: var(--brand);
    font-size: 10px;
    font-weight: 800;
}

.callback-card h1 {
    margin: 24px 0 8px;
    font-size: 25px;
}

.callback-card p {
    margin: 0 0 24px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.callback-hint {
    display: block;
    margin-top: 16px;
    color: var(--text-tertiary);
    font-size: 12px;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

    .support-panel {
        position: static;
    }

    .support-card h2 {
        margin-bottom: 8px;
    }

}

@media (max-width: 600px) {
    body {
        background: var(--background);
    }

    .site-header,
    .page-shell,
    .site-footer {
        width: min(100% - 32px, 1120px);
    }

    .site-header {
        min-height: 70px;
    }

    .page-shell {
        margin-top: 22px;
    }

    .intro-block {
        margin-bottom: 22px;
    }

    .intro-block h1 {
        font-size: 34px;
    }

    .intro-block p {
        font-size: 15px;
    }

    .stepper {
        margin-bottom: 22px;
    }

    .stepper li {
        gap: 6px;
    }

    .stepper li:not(:last-child)::after {
        left: 36px;
        right: 8px;
    }

    .stepper strong {
        font-size: 12px;
    }

    .workflow-card {
        padding: 20px;
        border-radius: 22px;
    }

    .section-heading {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 11px;
        margin-bottom: 20px;
    }

    .section-icon {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }

    .section-heading h2 {
        font-size: 19px;
    }

    .completion-badge {
        width: 28px;
        height: 28px;
        justify-content: center;
        padding: 0;
        overflow: hidden;
        color: #fff;
        background: var(--brand);
        font-size: 0;
    }

    .completion-badge i {
        font-size: 12px;
    }

    .site-footer {
        margin-top: 34px;
    }

    .modal {
        align-items: end;
        padding: 0;
    }

    .modal-sheet {
        width: 100%;
        max-height: calc(100dvh - 18px);
        padding: 12px 20px max(20px, env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        animation-name: sheet-in;
    }

    .modal-handle {
        width: 38px;
        height: 5px;
        display: block;
        margin: 0 auto 18px;
        border-radius: 999px;
        background: var(--text-tertiary);
        opacity: 0.42;
    }
}

@keyframes sheet-in {
    from { opacity: 0; transform: translateY(32px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
