:root {
    --ink: #172033;
    --muted: #6f7787;
    --line: #e8e9ee;
    --paper: #ffffff;
    --surface: #f7f7f9;
    --red: #e93245;
    --red-dark: #bf2032;
    --rose: #fff0f2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

.site-header {
    width: min(1440px, calc(100% - 64px));
    height: 76px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 48px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
    width: 42px; height: 42px; display: grid; place-items: center;
    color: #fff; background: var(--red); border-radius: 13px;
    font-size: 21px; font-weight: 800;
}
.brand strong { display: block; font-size: 18px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 3px; color: #9a9fac; font-size: 9px; letter-spacing: .16em; }
nav { display: flex; align-items: center; gap: 34px; }
nav a { color: #626979; font-size: 14px; }
nav a:hover, nav .is-active { color: var(--red); }
.header-action {
    padding: 11px 20px; color: #fff; background: var(--ink);
    border-radius: 10px; font-size: 14px; font-weight: 700;
}

.hero {
    min-height: 610px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(390px, .72fr);
    align-items: center;
    gap: 8vw;
    padding: 82px max(5vw, calc((100vw - 1300px) / 2));
    background:
        radial-gradient(circle at 83% 18%, rgba(233, 50, 69, .12), transparent 27%),
        linear-gradient(135deg, #fff 0%, #fff 46%, #fff7f8 100%);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.eyebrow { margin: 0 0 18px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.hero h1 { margin: 0; font-size: clamp(40px, 4.6vw, 68px); line-height: 1.16; letter-spacing: -.045em; }
.hero h1 span { color: var(--red); }
.hero-lead { max-width: 690px; margin: 28px 0 0; color: var(--muted); font-size: 18px; line-height: 1.9; }
.hero-actions { display: flex; gap: 14px; margin-top: 36px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; padding: 15px 24px; border-radius: 10px; font-weight: 700; }
.button-primary { color: #fff; background: var(--red); box-shadow: 0 12px 26px rgba(233, 50, 69, .2); }
.button-primary:hover { background: var(--red-dark); }
.button-secondary { border: 1px solid #d7d9e0; background: #fff; }
.hero-points { display: flex; gap: 28px; margin: 30px 0 0; padding: 0; list-style: none; color: #697080; font-size: 13px; }
.hero-points li::before { content: "✓"; margin-right: 7px; color: var(--red); font-weight: 800; }

.progress-card {
    padding: 30px;
    background: rgba(255,255,255,.94);
    border: 1px solid #ebe0e2;
    border-radius: 22px;
    box-shadow: 0 28px 70px rgba(70, 22, 29, .12);
}
.card-topline, .progress-meta { display: flex; align-items: center; justify-content: space-between; }
.card-topline { padding-bottom: 24px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.status { padding: 6px 10px; color: var(--red); background: var(--rose); border-radius: 20px; font-size: 11px; }
.progress-caption { margin: 28px 0 8px; color: #9399a6; font-size: 12px; }
.progress-card h2 { margin: 0; font-size: 25px; }
.progress-track { height: 8px; margin: 26px 0 10px; overflow: hidden; background: #f0f1f4; border-radius: 10px; }
.progress-track span { display: block; width: 38%; height: 100%; background: var(--red); border-radius: inherit; }
.progress-meta { color: #8a909d; font-size: 12px; }
.progress-meta strong { color: var(--red); font-size: 13px; }
.next-task { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; margin-top: 28px; padding: 18px; background: var(--surface); border-radius: 14px; }
.task-number { color: var(--red); font-size: 23px; font-weight: 800; }
.next-task small, .next-task strong { display: block; }
.next-task small { margin-bottom: 4px; color: #969ca8; font-size: 11px; }
.next-task strong { font-size: 14px; }
.arrow { color: var(--red); font-size: 22px; }

.path-section { width: min(1300px, calc(100% - 64px)); margin: 0 auto; padding: 94px 0 110px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.section-heading h2 { margin: 0; font-size: 40px; }
.section-heading > p { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.7; }
.path-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.path-grid article { min-height: 210px; padding: 28px; border: 1px solid var(--line); border-radius: 18px; transition: transform .2s, border-color .2s; }
.path-grid article:hover { transform: translateY(-4px); border-color: #efb6bd; }
.path-grid article span { color: #d8dae1; font-size: 28px; font-weight: 800; }
.path-grid h3 { margin: 32px 0 10px; font-size: 20px; }
.path-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px max(5vw, calc((100vw - 1300px) / 2)); color: #9298a5; background: #171d2a; font-size: 12px; }

@media (max-width: 900px) {
    .site-header { width: calc(100% - 36px); gap: 18px; }
    nav { display: none; }
    .hero { grid-template-columns: 1fr; padding: 64px 24px; }
    .progress-card { margin-top: 20px; }
    .path-section { width: calc(100% - 40px); padding: 68px 0; }
    .section-heading { align-items: start; flex-direction: column; }
    .path-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .brand strong { font-size: 15px; }
    .brand small, .header-action { display: none; }
    .site-header { height: 66px; }
    .hero { min-height: auto; padding: 52px 20px; }
    .hero h1 { font-size: 38px; }
    .hero-lead { font-size: 16px; }
    .hero-actions { align-items: stretch; flex-direction: column; }
    .hero-points { gap: 14px; flex-wrap: wrap; }
    .progress-card { padding: 22px; }
    .section-heading h2 { font-size: 32px; }
    .path-grid { grid-template-columns: 1fr; }
    footer { align-items: flex-start; flex-direction: column; }
}

/* Account diagnosis and action plan */
.diagnosis-shell { width: min(1120px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 100px; }
.diagnosis-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .7fr); align-items: end; gap: 60px; margin-bottom: 38px; }
.diagnosis-intro h1 { margin: 0; font-size: clamp(36px, 4.5vw, 56px); line-height: 1.15; letter-spacing: -.04em; }
.diagnosis-intro > p { margin: 0 0 4px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.diagnosis-form { display: grid; gap: 16px; }
.diagnosis-question { margin: 0; padding: 28px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.diagnosis-question legend { width: 100%; padding: 0; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 12px; }
.diagnosis-question legend > span { color: #d5d8df; font-size: 23px; font-weight: 800; }
.diagnosis-question legend strong { font-size: 19px; }
.diagnosis-question legend small { color: #969ca8; font-size: 12px; font-weight: 400; }
.diagnosis-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 24px; }
.diagnosis-options label { position: relative; cursor: pointer; }
.diagnosis-options input { position: absolute; opacity: 0; pointer-events: none; }
.diagnosis-options label span { min-height: 64px; padding: 13px 16px; display: flex; align-items: center; color: #596173; background: #fafafb; border: 1px solid #e4e6eb; border-radius: 11px; font-size: 13px; line-height: 1.55; transition: .18s ease; }
.diagnosis-options label:hover span { border-color: #efb6bd; }
.diagnosis-options input:checked + span { color: var(--red-dark); background: var(--rose); border-color: var(--red); box-shadow: 0 0 0 2px rgba(233,50,69,.08); font-weight: 700; }
.diagnosis-submitbar { position: sticky; bottom: 16px; z-index: 3; margin-top: 8px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(255,255,255,.96); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 48px rgba(23,32,51,.12); backdrop-filter: blur(12px); }
.diagnosis-submitbar p { margin: 0; color: var(--muted); font-size: 13px; }
.diagnosis-submitbar button { border: 0; cursor: pointer; font: inherit; }

.result-shell { display: grid; gap: 64px; }
.result-hero { padding: 42px; display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 44px; color: #fff; background: linear-gradient(130deg, #181f30, #2e2635 63%, #722a36); border-radius: 24px; }
.score-ring { width: 160px; height: 160px; display: grid; place-content: center; text-align: center; border: 12px solid rgba(255,255,255,.12); border-top-color: var(--red); border-radius: 50%; }
.score-ring strong { font-size: 48px; line-height: 1; }
.score-ring span { margin-top: 9px; color: #c6c8d0; font-size: 11px; }
.result-summary .eyebrow { margin-bottom: 10px; }
.result-summary h1 { margin: 0; font-size: clamp(34px, 4vw, 52px); }
.result-summary > p:last-child { max-width: 710px; margin: 22px 0 0; color: #d4d5da; line-height: 1.85; }
.result-tags { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.result-tags span, .result-tags a { padding: 7px 11px; border-radius: 18px; font-size: 11px; }
.result-tags span { color: #ffd5da; background: rgba(233,50,69,.18); }
.result-tags a { color: #d9dae0; border: 1px solid rgba(255,255,255,.2); }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 24px; }
.section-title .eyebrow { margin-bottom: 9px; }
.section-title h2 { margin: 0; font-size: 32px; }
.section-title > p { margin: 0; color: var(--muted); font-size: 13px; }
.dimension-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dimension-grid article { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 15px; }
.dimension-grid article > span { color: var(--muted); font-size: 12px; }
.dimension-grid article > strong { display: block; margin-top: 14px; font-size: 32px; }
.dimension-grid article > div { height: 6px; margin-top: 18px; overflow: hidden; background: #f0f1f4; border-radius: 10px; }
.dimension-grid i { display: block; height: 100%; background: var(--red); border-radius: inherit; }
.task-list { display: grid; gap: 10px; }
.task-item { padding: 22px 24px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 20px; background: #fff; border: 1px solid var(--line); border-radius: 15px; transition: .18s ease; }
.task-item:hover { border-color: #efb6bd; transform: translateY(-1px); }
.task-index { color: #d7dae1; font-size: 24px; font-weight: 800; }
.task-item h3 { margin: 0; font-size: 17px; }
.task-item p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.task-item small { display: block; margin-top: 8px; color: #969ca8; font-size: 11px; }
.task-item form { margin: 0; }
.task-item button { min-width: 96px; padding: 10px 13px; color: var(--red); background: #fff; border: 1px solid #efb6bd; border-radius: 9px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; }
.task-item.is-complete { background: #fbfbfc; opacity: .72; }
.task-item.is-complete h3 { text-decoration: line-through; }
.task-item.is-complete button { color: #54806b; border-color: #c9ded3; }
.dashboard-task-list { margin-top: 24px; }

@media (max-width: 900px) {
    .diagnosis-intro { grid-template-columns: 1fr; gap: 18px; }
    .diagnosis-options, .dimension-grid { grid-template-columns: repeat(2, 1fr); }
    .result-hero { grid-template-columns: 140px 1fr; padding: 32px; gap: 26px; }
    .score-ring { width: 130px; height: 130px; }
}

@media (max-width: 560px) {
    .diagnosis-shell { width: calc(100% - 28px); padding: 42px 0 72px; }
    .diagnosis-question { padding: 21px 17px; }
    .diagnosis-question legend { grid-template-columns: 42px 1fr; }
    .diagnosis-question legend small { display: none; }
    .diagnosis-options { grid-template-columns: 1fr; }
    .diagnosis-options label span { min-height: 52px; }
    .diagnosis-submitbar { align-items: stretch; flex-direction: column; }
    .diagnosis-submitbar .button { width: 100%; }
    .result-hero { grid-template-columns: 1fr; text-align: center; padding: 28px 20px; }
    .score-ring { margin: 0 auto; }
    .result-tags { justify-content: center; flex-wrap: wrap; }
    .dimension-grid { grid-template-columns: 1fr 1fr; }
    .section-title { align-items: start; flex-direction: column; }
    .task-item { grid-template-columns: 38px 1fr; padding: 19px 16px; gap: 12px; }
    .task-item form { grid-column: 2; }
    .task-item button { width: 100%; }
}

/* Account access */
.auth-page,
.dashboard-page { min-height: 100vh; background: #fafafb; }
.auth-header,
.dashboard-header { border-bottom: 1px solid var(--line); }
.auth-switch { color: var(--red); font-size: 14px; font-weight: 700; }
.auth-shell {
    width: min(1180px, calc(100% - 48px));
    min-height: calc(100vh - 77px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
    align-items: center;
    gap: 9vw;
    padding: 64px 0;
}
.auth-intro h1 { margin: 0; font-size: clamp(42px, 5vw, 66px); line-height: 1.15; letter-spacing: -.045em; }
.auth-intro h1 span { color: var(--red); }
.auth-intro > p:not(.eyebrow) { max-width: 570px; margin: 24px 0 0; color: var(--muted); font-size: 17px; line-height: 1.9; }
.auth-intro ul { display: grid; gap: 12px; margin: 28px 0 0; padding: 0; color: #596173; list-style: none; }
.auth-intro li::before { content: "✓"; display: inline-grid; width: 22px; height: 22px; margin-right: 10px; place-items: center; color: var(--red); background: var(--rose); border-radius: 50%; font-weight: 800; }
.auth-card { padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 65px rgba(23, 32, 51, .08); }
.auth-kicker { margin: 0 0 9px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.auth-card h2 { margin: 0; font-size: 29px; }
.auth-subtitle { margin: 10px 0 28px; color: var(--muted); font-size: 14px; }
.form-field { display: grid; gap: 8px; margin-top: 18px; }
.form-field span { color: #3f4758; font-size: 13px; font-weight: 700; }
.form-field input { width: 100%; height: 50px; padding: 0 15px; color: var(--ink); background: #fff; border: 1px solid #dfe1e7; border-radius: 10px; outline: none; font: inherit; }
.form-field input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(233, 50, 69, .09); }
.form-field input::placeholder { color: #a7acb7; }
.auth-submit { width: 100%; margin-top: 26px; border: 0; cursor: pointer; font: inherit; }
.auth-footnote { margin: 22px 0 0; color: #858c9a; text-align: center; font-size: 13px; }
.auth-footnote a { color: var(--red); font-weight: 700; }
.form-message { margin: 0 0 20px; padding: 12px 14px; border-radius: 9px; font-size: 13px; line-height: 1.6; }
.form-error { color: #a91e2d; background: #fff0f2; border: 1px solid #f8cbd1; }
.form-success { color: #16744b; background: #edf9f3; border: 1px solid #c7ead8; }
.form-notice { color: #795900; background: #fff8df; border: 1px solid #f1e1a6; }

/* Member dashboard */
.dashboard-header form { margin: 0; }
.logout-button { padding: 9px 14px; color: #686f7e; background: transparent; border: 1px solid #dfe1e7; border-radius: 9px; cursor: pointer; }
.logout-button:hover { color: var(--red); border-color: #efb6bd; }
.dashboard-shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0 100px; }
.dashboard-welcome { display: flex; align-items: start; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.dashboard-welcome h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); letter-spacing: -.035em; }
.dashboard-welcome > div > p:last-child { max-width: 690px; margin: 17px 0 0; color: var(--muted); line-height: 1.8; }
.member-badge { padding: 8px 13px; color: var(--red); background: var(--rose); border-radius: 20px; font-size: 12px; font-weight: 700; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
.dashboard-main-card,
.profile-summary { background: #fff; border: 1px solid var(--line); border-radius: 20px; }
.dashboard-main-card { padding: 34px; }
.dashboard-card-head { display: flex; justify-content: space-between; color: #8a909d; font-size: 12px; }
.dashboard-card-head strong { color: var(--red); }
.dashboard-main-card h2 { margin: 34px 0 12px; font-size: 30px; }
.dashboard-main-card > p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.8; }
.dashboard-progress { height: 8px; margin: 30px 0 14px; overflow: hidden; background: #f0f1f4; border-radius: 10px; }
.dashboard-progress span { display: block; width: 4%; height: 100%; background: var(--red); border-radius: inherit; }
.dashboard-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dashboard-actions span { color: #8a909d; font-size: 12px; }
.profile-summary { padding: 28px; }
.profile-label { margin: 0 0 22px; color: #989eaa; font-size: 12px; }
.profile-summary > strong,
.profile-summary > span { display: block; }
.profile-summary > strong { font-size: 21px; }
.profile-summary > span { margin-top: 7px; color: var(--muted); font-size: 13px; word-break: break-all; }
.profile-summary dl { display: grid; gap: 15px; margin: 28px 0 0; padding-top: 22px; border-top: 1px solid var(--line); }
.profile-summary dl div { display: grid; gap: 5px; }
.profile-summary dt { color: #989eaa; font-size: 11px; }
.profile-summary dd { margin: 0; color: #4f5768; font-size: 12px; }
.dashboard-next { margin-top: 72px; }
.dashboard-next h2 { margin: 0 0 26px; font-size: 32px; }
.dashboard-next-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dashboard-next-grid article { padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.dashboard-next-grid article span { color: #d4d7de; font-size: 25px; font-weight: 800; }
.dashboard-next-grid article strong { display: block; margin: 24px 0 9px; font-size: 18px; }
.dashboard-next-grid article p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; gap: 44px; padding-top: 48px; }
    .auth-intro { text-align: center; }
    .auth-intro > p:not(.eyebrow) { margin-right: auto; margin-left: auto; }
    .auth-intro ul { display: none; }
    .auth-card { width: min(100%, 520px); margin: 0 auto; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-next-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .auth-shell,
    .dashboard-shell { width: calc(100% - 32px); }
    .auth-shell { padding: 36px 0 56px; }
    .auth-intro h1 { font-size: 39px; }
    .auth-card { padding: 25px 20px; border-radius: 17px; }
    .auth-switch { font-size: 12px; }
    .dashboard-header nav { display: none; }
    .dashboard-shell { padding-top: 42px; }
    .dashboard-welcome { flex-direction: column; }
    .dashboard-main-card { padding: 24px 20px; }
    .dashboard-actions { align-items: stretch; flex-direction: column; }
    .dashboard-actions .button { width: 100%; }
}
