:root{--bg:#f6f5f0;--ink:#253e36;--muted:#5e685f;--line:#d5dacf;--green:#526750;--orange:#a4512e;color-scheme:light}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scroll-padding-top:24px}
body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-size:16px;line-height:1.85;overflow-wrap:break-word}
button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit}button{line-height:1.5}button:focus-visible,a:focus-visible,summary:focus-visible{outline:2px solid var(--orange);outline-offset:4px}
header{max-width:960px;min-height:88px;margin:0 auto;padding:16px 28px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}
.brand{font-size:18px;font-weight:600;line-height:1.5;letter-spacing:0;cursor:default}.text-btn{border:0;background:none;color:var(--ink);min-height:44px;padding:10px 8px;font-size:15px}.text-btn span{margin-left:8px}header .text-btn{flex-shrink:0}
main{min-height:calc(100svh - 88px)}
.home,.flow,.results{width:100%;margin:auto;padding:44px 28px max(48px,env(safe-area-inset-bottom))}.home,.flow{max-width:760px}.results{max-width:960px}
h1,h2,h3,p{margin-top:0}h1,h2,h3{font-family:inherit;line-height:1.55;font-weight:600;letter-spacing:0;overflow-wrap:break-word;line-break:strict}
h1,.simple-home h1,.result-title{font-size:30px;margin-bottom:20px}h2{font-size:26px;margin-bottom:16px}.intro{color:var(--muted);margin-bottom:24px;line-height:1.85}.instructions{padding-left:1.5em;margin:0 0 28px;max-width:40em}.instructions li{padding-left:4px;margin-bottom:14px}.instructions li:last-child{margin-bottom:0}
.notice,.small-note,.hint,.reading,.optional,.validation{color:var(--muted)}.notice,.small-note{font-size:14px;line-height:1.8}.notice{margin:18px 0;max-width:46em}.small-note{margin:12px 0 0}.simple-home .primary{margin-top:14px}.hint{font-size:15px;line-height:1.8;margin-bottom:26px;max-width:42em}.optional{font-size:14px;display:block;margin-top:4px;font-weight:400}
.primary{border:1px solid var(--ink);background:var(--ink);color:#fffdf6;border-radius:5px;min-height:48px;padding:12px 24px;display:inline-flex;gap:28px;align-items:center;justify-content:center;font-size:16px;font-weight:500}.primary:disabled{opacity:.4;cursor:not-allowed}.primary:hover:not(:disabled){background:#385448}
.progress-meta{display:flex;justify-content:space-between;gap:16px;font-size:14px;line-height:1.5;color:var(--muted);margin-bottom:12px;font-variant-numeric:tabular-nums}.track{height:3px;background:var(--line);margin-bottom:32px}.track>div{height:100%;background:var(--green);transition:width .2s}.tag{display:inline-block;font-size:13px;line-height:1.5;background:#e7ebdf;color:var(--ink);padding:5px 10px;border-radius:3px;margin-bottom:16px}.tag.negative{background:#eee5dc;color:#79543a}
.reason-label{font-size:16px;font-weight:500;display:block;margin:24px 0 10px}textarea{display:block;width:100%;resize:vertical;min-height:100px;border:1px solid #aeb8a9;background:#fcfbf7;border-radius:5px;padding:13px 14px;color:var(--ink);font-size:16px;line-height:1.8}textarea::placeholder{color:#687368;opacity:1}textarea:focus{outline:2px solid var(--green);outline-offset:2px}
fieldset{border:0;border-top:1px solid var(--line);padding:22px 0 0;margin:28px 0 0;min-width:0}legend{float:left;font-size:16px;font-weight:500;line-height:1.65;width:100%;margin-bottom:14px;padding:0}.scale{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px;clear:both}.choice{position:relative;display:block;min-width:0}.choice input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}.choice span{display:grid;place-items:center;border:1px solid #b9c2b1;border-radius:5px;min-height:48px;background:#fcfbf7;font-size:16px;line-height:1.5;font-variant-numeric:tabular-nums;transition:background .15s}.choice input:checked+span{background:var(--ink);border-color:var(--ink);color:white;font-weight:600}.choice input:focus-visible+span{outline:2px solid var(--orange);outline-offset:3px}
.ends{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;color:var(--muted);font-size:13px;line-height:1.65;margin-top:10px}.ends span:last-child{text-align:right}.nav{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-top:32px}.back{background:none;border:0;color:var(--ink);min-height:48px;padding:10px 0;font-size:16px}.back:disabled{visibility:hidden}.validation{font-size:13px;line-height:1.7;margin:12px 0 0;text-align:right}.control{padding:4px 0 0}
.result-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:28px 0}.panel{min-width:0;border:1px solid var(--line);padding:26px;border-radius:5px}.panel h3{font-size:19px;margin-bottom:26px}.metric{margin:26px 0}.metric-head{display:flex;justify-content:space-between;align-items:baseline;gap:16px;font-size:15px;line-height:1.65;margin-bottom:13px}.metric-head strong{font-weight:600;font-variant-numeric:tabular-nums;white-space:nowrap}.metric-rail{height:6px;background:#dce1d5;position:relative;border-radius:10px;margin-inline:7px}.metric-dot{position:absolute;top:-4px;width:14px;height:14px;border-radius:50%;background:var(--green);transform:translateX(-50%);border:2px solid var(--bg)}.negative-panel .metric-dot{background:var(--orange)}.reading{font-size:15px;line-height:1.85;margin-bottom:0;max-width:44em}.full{grid-column:1/-1}.actions{display:flex;gap:16px 24px;align-items:center;flex-wrap:wrap;margin:28px 0}.details{margin-top:28px;font-size:15px;line-height:1.85}.details summary{cursor:pointer;min-height:44px;padding:9px 0}.details>.reading{margin:12px 0 20px}.answer-row{padding:20px 0;border-bottom:1px solid var(--line)}.answer-row strong{font-weight:500;line-height:1.8}.answer-row p{margin:8px 0 0;color:var(--muted);white-space:pre-wrap;overflow-wrap:anywhere}
dialog{width:min(660px,calc(100% - 32px));max-height:85vh;max-height:85svh;overflow:auto;border:1px solid var(--line);background:var(--bg);color:var(--ink);padding:32px;border-radius:6px}dialog::backdrop{background:#1a2d2766}dialog h2{font-size:24px;margin-bottom:24px}dialog p{font-size:15px;line-height:1.9;color:var(--muted);margin-bottom:18px}.close{float:right;min-width:44px;min-height:44px;margin:-12px -14px 0 8px;border:0;background:none;font-size:26px;color:var(--ink)}.sources{display:flex;flex-direction:column;gap:12px;font-size:14px;margin-top:24px}.sources a{min-height:36px;padding:4px 0;text-underline-offset:4px}
@media(max-width:700px){header{min-height:72px;padding:12px max(20px,env(safe-area-inset-right)) 12px max(20px,env(safe-area-inset-left));margin:0 0}.brand{font-size:17px}main{min-height:calc(100svh - 72px)}.home,.flow,.results{padding:28px max(20px,env(safe-area-inset-right)) max(40px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left))}h1,.simple-home h1,.result-title{font-size:27px;line-height:1.5;margin-bottom:18px}h2{font-size:23px;line-height:1.65;margin-bottom:16px}.instructions{margin-bottom:24px;line-height:1.85}.instructions li{margin-bottom:16px}.simple-home .primary{width:100%;margin-top:16px}.track{margin-bottom:26px}.hint{margin-bottom:22px}.scale{gap:5px}.choice span{min-height:48px}.ends{gap:16px;font-size:13px}.nav{gap:16px;margin-top:28px}.nav .primary{min-width:144px;gap:24px}.result-grid{grid-template-columns:minmax(0,1fr);gap:20px;margin-top:24px}.full{grid-column:auto}.panel{padding:22px 20px}.panel h3{font-size:18px}.metric{margin:26px 0}.metric-head{font-size:15px;gap:12px}.metric:last-of-type{margin-bottom:24px}.actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.actions .primary{grid-column:1/-1;width:100%}.actions .text-btn{padding:12px 0}.validation{text-align:left}dialog{padding:24px 20px}.close{margin-right:-8px}dialog h2{font-size:23px}}
@media(max-width:374px){header{padding-inline:16px;gap:8px}.home,.flow,.results{padding-inline:16px}.scale{gap:3px}.choice span{font-size:16px}.ends{gap:12px}.nav .primary{min-width:132px;gap:16px;padding-inline:18px}.brand{font-size:16px}.panel{padding:20px 16px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
