:root {
    --bg-a: #f5f7fa;
    --bg-b: #e8edf2;
    --text: #1a202c;
    --muted: #718096;
    --muted-2: #a0aec0;
    --line: #f3f4f6;
    --card: #ffffff;
    --input: #f7fafc;
    --primary-a: #0bc5ea;
    --primary-b: #3182ce;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -2px rgba(0, 0, 0, 0.10);

    --radius-xl: 32px;
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-pill: 9999px;

    --container: 1280px;
    --pad: clamp(16px, 2.5vw, 32px);
}

* { box-sizing: border-box; }

[hidden] {
    display: none !important;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    background: linear-gradient(133deg, var(--bg-a), var(--bg-b));
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Inter, Arial, sans-serif;
    line-height: 1.5;
}

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

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

.container {
    width: min(var(--container), calc(100% - 2 * var(--pad)));
    margin: 0 auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.skip-link:focus {
    left: 12px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 105px;
    background: rgba(255, 255, 255, 0.80);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.header-inner {
    height: 105px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 56px;
    height: 56px;
}

.brand-title {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(180deg, #1a365d 0%, var(--primary-a) 100%);
    color: transparent;
    background-clip: text;
}

.brand-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

.nav-link {
    padding: 8px 10px;
    border-radius: 10px;
}

.nav-link:hover {
    background: rgba(49, 130, 206, 0.08);
}

.page {
    padding-bottom: 80px;
}

.hero {
    padding: 48px 0 40px;
}

.card {
    background: var(--card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    min-height: 676px;
}

.panel {
    padding: 48px;
}

.panel-left {
    background: #fff;
}

.panel-right {
    background: linear-gradient(119deg, #ebf8ff 0%, #e6fffa 100%);
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background: rgba(11, 197, 234, 0.10);
    color: var(--primary-a);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.form {
    display: grid;
    gap: 26px;
}

.field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.label {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.hint {
    width: 20px;
    height: 20px;
    border: 0;
    background: #ebf8ff;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hint:focus-visible {
    outline: 2px solid rgba(49, 130, 206, 0.6);
    outline-offset: 2px;
}

.input-wrap {
    position: relative;
    background: var(--input);
    border-radius: var(--radius-md);
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 10px;
    border: 1px solid transparent;
}

.input-wrap:focus-within {
    border-color: rgba(49, 130, 206, 0.45);
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.10);
}

.prefix {
    color: var(--muted-2);
    font-size: 20px;
}

.suffix {
    margin-left: auto;
    color: var(--muted-2);
    font-size: 16px;
}

input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    min-width: 0;
}

input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.field-help {
    min-height: 20px;
    font-size: 13px;
    color: #c53030;
    margin-top: 8px;
}

.slider {
    margin-top: 14px;
}

.slider input[type="range"] {
    width: 100%;
    height: 8px;
    appearance: none;
    background: linear-gradient(90deg, var(--primary-a), var(--primary-b));
    border-radius: var(--radius-pill);
    outline: none;
}

.slider input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-pill);
    background: #fff;
    border: 2px solid rgba(49, 130, 206, 0.35);
    box-shadow: var(--shadow-sm);
}

.slider input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-pill);
    background: #fff;
    border: 2px solid rgba(49, 130, 206, 0.35);
    box-shadow: var(--shadow-sm);
}

.slider-scale {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
}

.actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.btn {
    border: 0;
    cursor: pointer;
    height: 56px;
    border-radius: var(--radius-lg);
    padding: 0 28px;
    font-size: 18px;
    font-weight: 700;
}

.btn:focus-visible {
    outline: 2px solid rgba(49, 130, 206, 0.6);
    outline-offset: 3px;
}

.btn-primary {
    flex: 1;
    color: #fff;
    background: linear-gradient(90deg, var(--primary-a) 0%, var(--primary-b) 100%);
}

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

.btn-secondary {
    width: 200px;
    background: #fff;
    color: #2d3748;
    outline: 2px solid #2d3748;
    outline-offset: -2px;
}

.result-idle {
    height: 100%;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
}

.result-icon {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-pill);
    background: #fff;
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}

.result-title {
    font-size: 20px;
    font-weight: 800;
    color: #2d3748;
}

.result-subtitle {
    margin-top: 8px;
    font-size: 14px;
    color: var(--muted);
}

.result-ready {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.result-header-title {
    font-size: 18px;
    font-weight: 800;
    color: #2d3748;
}

.result-header-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 2px;
}

.result-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
}

.metric {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 14px 14px;
}

.metric-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.metric-value {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 900;
    color: #1a365d;
}

.result-note {
    margin-top: auto;
    font-size: 13px;
    color: var(--muted);
}

.below-card {
    padding: 32px 0 0;
    display: flex;
    justify-content: center;
}

.pill-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 24px;
    border-radius: var(--radius-pill);
    background: #fff;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.section {
    padding: 18px 0;
}

.section-title {
    margin: 10px 0 12px;
    font-size: 18px;
    font-weight: 900;
    color: #2d3748;
}

.section-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.guide-list {
    margin: 0;
    padding-left: 18px;
}

.faq-item {
    border-radius: 14px;
    padding: 12px 12px;
    background: rgba(255, 255, 255, 0.55);
}

.faq-item + .faq-item {
    margin-top: 10px;
}

.faq-item summary {
    cursor: pointer;
    font-weight: 700;
}

.site-footer {
    position: relative;
    margin-top: 80px;
    background: #1a202c;
    color: #fff;
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    overflow: hidden;
}

.footer-bg {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0.03;
    font-size: clamp(42px, 8vw, 120px);
    font-weight: 900;
    letter-spacing: 0.04em;
    pointer-events: none;
    user-select: none;
}

.footer-inner {
    position: relative;
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 48px;
}

.footer-brand {
    font-size: 24px;
    font-weight: 800;
}

.footer-cta {
    margin-top: 12px;
    font-size: 30px;
    font-weight: 800;
}

.footer-cta-strong {
    display: inline-block;
    margin-left: 8px;
}

.footer-button {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    padding: 0 22px;
    border-radius: 24px;
    border: 2px solid #fff;
    color: #fff;
}

.footer-title {
    font-size: 16px;
    font-weight: 800;
}

.footer-subtitle {
    margin-top: 10px;
    font-size: 14px;
    color: var(--muted-2);
}

.footer-links {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.footer-link {
    font-size: 14px;
    color: var(--muted-2);
}

.social {
    margin-top: 16px;
    display: grid;
    gap: 12px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.social-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    display: grid;
    place-items: center;
    outline: 1px solid rgba(255, 255, 255, 0.9);
    outline-offset: -1px;
}

.social-icon img {
    width: 16px;
    height: 16px;
}

.social-text {
    font-size: 14px;
    color: var(--muted-2);
}

.subscribe {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.subscribe input {
    height: 48px;
    border-radius: 24px;
    background: #2d3748;
    border: 1px solid #4a5568;
    padding: 0 16px;
    font-size: 14px;
    color: #fff;
}

.subscribe input::placeholder {
    color: var(--muted);
    font-weight: 600;
}

.subscribe-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-pill);
    border: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    background: linear-gradient(90deg, var(--primary-a) 0%, var(--primary-b) 100%);
}

.subscribe-btn img {
    width: 20px;
    height: 20px;
}

.subscribe-status {
    margin-top: 10px;
    min-height: 18px;
    font-size: 13px;
    color: var(--muted-2);
}

.subscribe-status[data-kind="error"] {
    color: #feb2b2;
}

.subscribe input[aria-invalid="true"] {
    border-color: #fc8181;
    box-shadow: 0 0 0 3px rgba(252, 129, 129, 0.25);
}

.footer-bottom {
    margin-top: 28px;
    padding-top: 28px;
    border-top: 1px solid #2d3748;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
}

.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;
}

.modal {
    width: min(720px, calc(100% - 32px));
    border: 0;
    border-radius: 18px;
    padding: 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.modal-card {
    background: #fff;
    border-radius: 18px;
    padding: 18px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.modal-title {
    font-size: 18px;
    font-weight: 900;
    color: #2d3748;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 22px;
    cursor: pointer;
}

.modal-body {
    margin-top: 14px;
    color: #2d3748;
}

.formula {
    border-radius: 16px;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    padding: 14px;
}

.formula-title {
    font-weight: 900;
}

.formula-eq {
    margin-top: 8px;
    font-size: 16px;
    font-weight: 800;
    color: #1a365d;
    word-break: break-word;
}

.formula-notes {
    margin-top: 10px;
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.modal-tip {
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    background: rgba(26, 32, 44, 0.92);
    color: #fff;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    z-index: 1000;
}

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

    .panel {
        padding: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .site-header {
        height: auto;
        padding: 14px 0;
    }

    .header-inner {
        height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav {
        width: 100%;
        gap: 10px;
        flex-wrap: wrap;
    }

    .panel {
        padding: 20px;
    }

    .actions {
        flex-direction: column;
    }

    .btn-secondary {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-cta {
        font-size: 26px;
    }
}
