/* 商品体检 (product-health.js). One calm card to fill, past checks as soft cards below.
   "#main #health-root" outranks the page-wide ".shared-workbench #main input/button/p" rules. */
#main .hc{--hc-soft:color-mix(in srgb,var(--ink) 3%,var(--bg));--hc-ring:color-mix(in srgb,var(--ink) 9%,transparent);--hc-hair:color-mix(in srgb,var(--ink) 8%,transparent);--hc-purple:#7532d6;max-width:760px;margin-inline:auto;color:var(--ink)}
#main .hc :is(h1,h2,h3,h4,p,ol,ul,dl,dd){margin:0}
#main .hc .hc-head{margin:0 0 24px}
#main .hc .hc-head h1{margin:0 0 6px;font-size:30px;font-weight:600;line-height:1.15;letter-spacing:-.025em}
#main .hc .hc-head p{font-size:15px;color:var(--muted)}
#main .hc .hc-notice{margin:0 0 16px;padding:11px 16px;border-radius:14px;background:color-mix(in srgb,var(--ink) 5%,var(--bg));font-size:14px;line-height:1.5}
#main .hc .hc-notice:empty{display:none}
#main .hc .hc-notice.is-ok{background:#e8f6ec;color:#1e7a3c}
#main .hc .hc-notice.is-warn{background:#fff1e6;color:#b4530b}
#main .hc .hc-skeleton{display:grid;gap:16px}
#main .hc .hc-skeleton span{height:180px;border-radius:24px;background:var(--hc-soft);animation:card-wait 1.4s ease-in-out infinite}
#main .hc .hc-skeleton span+span{height:120px}

/* Shared bits */
#main #health-root .hc-step-n{display:inline-grid;place-items:center;flex:none;width:24px;height:24px;border-radius:50%;background:color-mix(in srgb,var(--hc-purple) 12%,var(--bg));color:var(--hc-purple);font-size:13px;font-weight:650;font-variant-numeric:tabular-nums}
#main #health-root .hc-primary{display:inline-flex;align-items:center;justify-content:center;height:48px;margin:0;padding:0 26px;border:0;border-radius:999px;background:var(--button);color:var(--button-ink);font:inherit;font-size:15px;font-weight:600;text-decoration:none;cursor:pointer;transition:opacity .15s ease,transform .2s var(--spring-soft,ease)}
#main #health-root .hc-primary:hover{opacity:.86}
#main #health-root .hc-primary:active{transform:scale(.97)}
#main #health-root .hc-primary:disabled{opacity:.55;cursor:default}
#main #health-root .hc-primary.is-done{background:color-mix(in srgb,var(--ink) 7%,var(--bg));color:var(--ink);opacity:1}
#main #health-root .hc-quiet{display:inline-flex;align-items:center;height:40px;margin:0;padding:0 18px;border:0;border-radius:999px;background:color-mix(in srgb,var(--ink) 6%,var(--bg));color:var(--ink);font:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:background-color .15s ease,transform .2s var(--spring-soft,ease)}
#main #health-root .hc-quiet:hover{background:color-mix(in srgb,var(--ink) 10%,var(--bg))}
#main #health-root .hc-quiet:active{transform:scale(.97)}
#main #health-root .hc-quiet:disabled{opacity:.6;cursor:wait}
#main #health-root svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* ---- Signed out ---- */
#main #health-root .hc-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 16px;padding:0;list-style:none;counter-reset:none}
#main #health-root .hc-steps li{display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:18px 18px 20px;border-radius:20px;background:var(--hc-soft)}
#main #health-root .hc-steps .hc-step-n{margin:0 0 8px}
#main #health-root .hc-steps strong{font-size:15px;font-weight:600}
#main #health-root .hc-steps li>span:last-child{font-size:13px;line-height:1.5;color:var(--muted)}
#main #health-root .hc-sample{padding:3px 10px;border-radius:999px;background:var(--bg);font-size:12px;font-weight:600;color:var(--muted)}
#main #health-root .health-example{max-width:none;margin:0;border:0}
#main #health-root .hc-cta{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:24px 0 0}
#main #health-root .hc-cta>span{font-size:13px;color:var(--muted)}


/* ---- The form ---- */
#main #health-root .hc-card{margin:0;padding:28px;border-radius:24px;background:var(--hc-soft)}
#main #health-root .hc-sec+.hc-sec{margin-top:30px}
#main #health-root .hc-sec>h2{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:17px;font-weight:600;letter-spacing:-.01em}
#main #health-root .hc-help{margin:-6px 0 14px 34px;font-size:14px;line-height:1.6;color:var(--muted)}
#main #health-root .hc-field{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;font-size:13px;font-weight:500}
#main #health-root .hc-label{color:var(--ink)}
#main #health-root .hc-input{display:flex;align-items:center;min-height:48px;padding:0 14px;border-radius:14px;background:var(--bg);box-shadow:0 0 0 1px var(--hc-ring);transition:box-shadow .15s ease}
#main #health-root .hc-input:focus-within{box-shadow:0 0 0 2px var(--hc-purple),0 0 0 6px color-mix(in srgb,#7532d6 14%,transparent)}
#main #health-root .hc-input i{font-style:normal;font-size:15px;color:var(--muted)}
#main #health-root .hc-input :is(input,textarea){flex:1;display:block;width:100%;min-width:0;height:46px;margin:0;padding:0;border:0;border-radius:0;outline:0;background:transparent;color:var(--ink);font:inherit;font-size:15px;font-weight:400;box-shadow:none}
#main #health-root .hc-input i+input{padding-left:6px;font-weight:600;font-variant-numeric:tabular-nums}
#main #health-root .hc-input :is(input,textarea)::placeholder{color:color-mix(in srgb,var(--muted) 70%,var(--bg))}
#main #health-root .hc-input input::-webkit-outer-spin-button,#main #health-root .hc-input input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}
#main #health-root .hc-input input[type=number]{-moz-appearance:textfield}
#main #health-root .hc-input.is-area{padding:0 14px}
#main #health-root .hc-input.is-area textarea{height:auto;min-height:64px;padding:13px 0;line-height:1.5;resize:vertical}
#main #health-root .hc-form-note{font-size:12px;color:var(--muted)}

/* Picking from the library */
#main #health-root .hc-ghost{display:inline-flex;align-items:center;gap:7px;height:36px;margin:12px 0 0;padding:0 15px 0 12px;border:0;border-radius:999px;background:var(--bg);color:var(--ink);font:inherit;font-size:13px;font-weight:600;box-shadow:0 0 0 1px var(--hc-ring);cursor:pointer;transition:box-shadow .15s ease,transform .2s var(--spring-soft,ease)}
#main #health-root .hc-ghost:hover{box-shadow:0 0 0 1px color-mix(in srgb,var(--ink) 22%,transparent)}
#main #health-root .hc-ghost:active{transform:scale(.97)}
#main #health-root .hc-ghost svg{width:16px;height:16px}
#main #health-root .hc-ghost[aria-expanded=true]{background:var(--ink);color:var(--bg);box-shadow:none}
#main #health-root #health-picker:not(:empty){margin:10px 0 0;animation:hc-drop .32s var(--spring-soft,ease) both;transform-origin:top left}
#main #health-root .hc-pick-list{display:flex;flex-direction:column;max-height:320px;padding:6px;overflow:auto;border-radius:18px;background:var(--bg);box-shadow:0 0 0 1px var(--hc-ring)}
#main #health-root .hc-pick{display:grid;grid-template-columns:44px minmax(0,1fr);align-items:center;gap:12px;width:100%;margin:0;padding:8px 10px;border:0;border-radius:12px;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;transition:background-color .15s ease}
#main #health-root .hc-pick:hover{background:color-mix(in srgb,var(--ink) 5%,transparent)}
#main #health-root .hc-pick:focus-visible{outline:2px solid var(--ink);outline-offset:-2px}
#main #health-root .hc-pick>:is(img,span:first-child){width:44px;height:44px;padding:3px;border-radius:10px;background:#f2f2f5;object-fit:contain;mix-blend-mode:multiply}
#main #health-root .hc-pick-text{display:flex;flex-direction:column;gap:1px;min-width:0}
#main #health-root .hc-pick-text strong{overflow:hidden;font-size:14px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}
#main #health-root .hc-pick-text small{font-size:12px;color:var(--muted)}
#main #health-root .hc-pick-wait{padding:14px 4px;font-size:14px;color:var(--muted)}
#main #health-root .hc-picked{display:flex;align-items:center;gap:10px;margin:10px 0 0;padding:6px 14px 6px 6px;border-radius:14px;background:var(--bg);box-shadow:0 0 0 1px var(--hc-ring);animation:hc-drop .32s var(--spring-soft,ease) both}
#main #health-root .hc-picked img{flex:none;width:36px;height:36px;padding:2px;border-radius:9px;background:#f2f2f5;object-fit:contain;mix-blend-mode:multiply}
#main #health-root .hc-picked span{flex:1;min-width:0;overflow:hidden;font-size:14px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}
#main #health-root .hc-picked em{flex:none;font-size:12px;font-style:normal;color:var(--muted)}

/* Market: a segmented switch */
#main #health-root .hc-seg{display:inline-grid;grid-auto-flow:column;grid-auto-columns:1fr;padding:3px;border-radius:12px;background:color-mix(in srgb,var(--ink) 6%,var(--bg))}
#main #health-root .hc-seg label{position:relative;margin:0;cursor:pointer}
#main #health-root .hc-seg input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
#main #health-root .hc-seg span{display:grid;place-items:center;height:36px;padding:0 22px;border-radius:9px;font-size:14px;font-weight:600;color:var(--muted);transition:background-color .2s ease,color .2s ease,box-shadow .2s ease}
#main #health-root .hc-seg input:checked+span{background:var(--bg);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.1)}
#main #health-root .hc-seg input:focus-visible+span{outline:2px solid var(--ink);outline-offset:1px}

/* Similar products */
#main #health-root .hc-comp{display:block;min-width:0;margin:12px 0 0;padding:18px;border:0;border-radius:18px;background:var(--bg)}
#main #health-root fieldset.hc-comp>legend{float:left;display:flex;align-items:center;gap:8px;width:100%;margin:0 0 14px;padding:0}
#main #health-root fieldset.hc-comp>legend+*{clear:both}
#main #health-root .hc-comp legend>span,#main #health-root .hc-comp summary>span{font-size:14px;font-weight:600}
#main #health-root .hc-comp :is(legend,summary) em{padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--ink) 6%,var(--bg));font-size:11px;font-style:normal;font-weight:600;color:var(--muted)}
#main #health-root .hc-comp[data-comp="0"] legend em{background:color-mix(in srgb,var(--hc-purple) 12%,var(--bg));color:var(--hc-purple)}
#main #health-root .hc-comp-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1.2fr) minmax(0,.7fr);gap:10px;margin:0 0 10px}
#main #health-root .hc-file{position:relative;display:inline-flex;align-items:center;gap:7px;margin:12px 0 0;padding:6px 10px 6px 8px;border-radius:10px;font-size:13px;font-weight:500;color:var(--muted);cursor:pointer;transition:background-color .15s ease,color .15s ease}
#main #health-root .hc-file:hover{background:color-mix(in srgb,var(--ink) 5%,transparent);color:var(--ink)}
#main #health-root .hc-file:focus-within{outline:2px solid var(--ink);outline-offset:1px}
#main #health-root .hc-file input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
#main #health-root .hc-file svg{width:18px;height:18px}
#main #health-root .hc-file.has-file{color:var(--hc-purple)}
#main #health-root details.hc-more{padding:0}
#main #health-root details.hc-more>summary{display:flex;align-items:center;gap:8px;padding:16px 18px;border-radius:18px;list-style:none;cursor:pointer;color:var(--ink);transition:background-color .15s ease}
#main #health-root details.hc-more>summary::-webkit-details-marker{display:none}
#main #health-root details.hc-more>summary::before{content:"";width:18px;height:18px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;transition:transform .35s var(--spring,ease)}
#main #health-root details.hc-more[open]>summary::before{transform:rotate(45deg)}
#main #health-root details.hc-more>summary:hover{background:color-mix(in srgb,var(--ink) 3%,var(--bg))}
#main #health-root details.hc-more[open]>summary{padding-bottom:12px}
#main #health-root details.hc-more>:not(summary){margin-inline:18px}
#main #health-root details.hc-more[open]>:last-child{margin-bottom:18px}
#main #health-root details.hc-more[open]>:not(summary){animation:hc-drop .32s var(--spring-soft,ease) both}
#main #health-root .hc-foot{display:flex;flex-direction:column;gap:16px;margin:28px 0 0;padding:22px 0 0;border-top:1px solid var(--hc-hair)}
#main #health-root .hc-fine{font-size:13px;line-height:1.6;color:var(--muted)}
#main #health-root .hc-go{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px}
#main #health-root .hc-quota{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}

/* ---- Results ---- */
#main #health-root .hc-list-head{margin:44px 0 14px;font-size:20px;font-weight:600;letter-spacing:-.01em}
#main #health-root .hc-result{margin:0 0 16px;padding:24px;border-radius:24px;background:var(--hc-soft);overflow-wrap:anywhere}
#main #health-root .hc-result-top{display:flex;align-items:center;gap:14px}
#main #health-root .hc-thumb{display:block;flex:none;width:56px;height:56px;padding:4px;overflow:hidden;border-radius:14px;background:#f2f2f5}
#main #health-root .hc-thumb.is-empty{background:color-mix(in srgb,var(--ink) 6%,var(--bg))}
#main #health-root .hc-thumb img{width:100%;height:100%;object-fit:contain;mix-blend-mode:multiply}
#main #health-root .hc-title{min-width:0;flex:1}
#main #health-root .hc-title h3{display:-webkit-box;overflow:hidden;font-size:16px;font-weight:600;line-height:1.4;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#main #health-root .hc-title p{margin:2px 0 0;font-size:13px;color:var(--muted)}
#main #health-root .hc-route{display:flex;align-items:center;gap:10px;margin:20px 0 4px;font-size:24px;font-weight:650;letter-spacing:-.02em;line-height:1.25}
#main #health-root .hc-route::before{content:"";flex:none;width:10px;height:10px;border-radius:50%;background:color-mix(in srgb,var(--ink) 35%,var(--bg))}
#main #health-root .hc-route.is-good::before{background:#2fa35a}
#main #health-root .hc-route.is-paid::before{background:var(--hc-purple)}
#main #health-root .hc-route.is-risk::before{background:#e07b28}
#main #health-root .hc-why{margin:0 0 0 20px;font-size:14px;line-height:1.6;color:var(--muted)}
#main #health-root .hc-why span{display:block}
#main #health-root .hc-nums{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:16px;margin:22px 0 0;padding:18px 20px;border-radius:18px;background:var(--bg)}
#main #health-root .hc-nums dt{font-size:12px;color:var(--muted)}
#main #health-root .hc-nums dd{margin:2px 0 0;font-size:20px;font-weight:650;letter-spacing:-.01em;font-variant-numeric:tabular-nums}
#main #health-root .hc-nums .is-big dd{font-size:32px;line-height:1.1;letter-spacing:-.03em}
#main #health-root .hc-nums small{margin-left:1px;font-size:18px;font-weight:600;color:var(--muted)}
#main #health-root .hc-nums div>span{display:block;margin-top:2px;font-size:12px;color:var(--muted)}
#main #health-root .hc-bar{height:8px;margin:16px 0 0;overflow:hidden;border-radius:999px;background:#d8efe0}
#main #health-root .hc-bar span{display:block;width:var(--w);height:100%;border-radius:inherit;background:var(--ink);animation:hc-grow .9s var(--spring-soft,cubic-bezier(.2,.8,.2,1)) .1s both}
#main #health-root .hc-bar-note{display:flex;justify-content:space-between;gap:12px;margin:6px 0 0;font-size:12px;color:var(--muted)}
#main #health-root .hc-facts{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:14px 0 0;font-size:13px;color:var(--muted)}
#main #health-root .hc-facts i{width:3px;height:3px;border-radius:50%;background:currentColor;opacity:.6}
#main #health-root .hc-comps{margin:22px 0 0}
#main #health-root .hc-comps h4{margin:0 0 4px;font-size:13px;font-weight:600;color:var(--muted)}
#main #health-root .hc-comps ul{padding:0;list-style:none}
#main #health-root .hc-comps li{padding:12px 0}
#main #health-root .hc-comps li+li{border-top:1px solid var(--hc-hair)}
#main #health-root .hc-comp-line{display:flex;align-items:baseline;justify-content:space-between;gap:16px}
#main #health-root .hc-comp-line a{min-width:0;overflow:hidden;font-size:14px;font-weight:500;color:var(--ink);white-space:nowrap;text-overflow:ellipsis;text-decoration:none}
#main #health-root .hc-comp-line a:hover{text-decoration:underline;text-underline-offset:3px}
#main #health-root .hc-comp-line strong{flex:none;font-size:15px;font-weight:650;font-variant-numeric:tabular-nums}
#main #health-root .hc-comp-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:5px 0 0;font-size:12px;color:var(--muted)}
#main #health-root .hc-chip{padding:2px 8px;border-radius:999px;background:color-mix(in srgb,var(--ink) 7%,var(--bg));font-size:11px;font-weight:600;color:var(--muted)}
#main #health-root .hc-chip.is-good{background:#e8f6ec;color:#1e7a3c}
#main #health-root .hc-comp-why{display:-webkit-box;margin:5px 0 0;overflow:hidden;font-size:12px;line-height:1.5;color:var(--muted);-webkit-line-clamp:2;-webkit-box-orient:vertical}
#main #health-root .hc-cost{margin:18px 0 0;font-size:12px;color:var(--muted)}
#main #health-root .hc-cost summary{display:inline-block;padding:2px 0;cursor:pointer}
#main #health-root .hc-cost p{margin:6px 0 0;line-height:1.6}
#main #health-root .hc-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:22px 0 0}
#main #health-root .hc-actions .hc-primary{height:44px;padding:0 22px}

/* Waiting for a result: a thin bar that keeps moving, nothing else. */
#main #health-root .hc-result.is-wait .hc-title h3{font-size:18px}
#main #health-root .hc-wait-bar{position:relative;height:4px;margin:20px 0 12px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--ink) 7%,var(--bg))}
#main #health-root .hc-wait-bar span{position:absolute;inset:0 auto 0 0;width:32%;border-radius:inherit;background:var(--hc-purple);animation:hc-slide 1.6s cubic-bezier(.65,0,.35,1) infinite}
#main #health-root .hc-result.is-wait .hc-why{margin:0}

#main .hc .hc-dev{margin:24px 0 0;font-size:12px;color:var(--muted)}
#main .hc .hc-dev summary{cursor:pointer}
#main .hc .hc-dev label{display:flex;align-items:center;gap:6px;margin:8px 0 0}

@keyframes hc-grow{from{width:0}}
@keyframes hc-slide{0%{transform:translateX(-100%)}100%{transform:translateX(320%)}}
@keyframes hc-drop{from{opacity:0;transform:translateY(-6px) scale(.98)}}

/* Dark */
:root[data-theme=dark] #main .hc{--hc-soft:#1c1c1e}
:root[data-theme=dark] #main #health-root :is(.hc-input,.hc-comp,.hc-nums,.hc-pick-list,.hc-picked,.hc-ghost:not([aria-expanded=true])){background:#2c2c2e}
:root[data-theme=dark] #main #health-root .hc-seg input:checked+span{background:#3a3a3c}
:root[data-theme=dark] #main #health-root :is(.hc-thumb:not(.is-empty),.hc-pick>img,.hc-picked img){background:#e8e8ec}
:root[data-theme=dark] #main #health-root :is(.hc-pick>img,.hc-picked img){mix-blend-mode:normal}
:root[data-theme=dark] #main #health-root .hc-chip.is-good,:root[data-theme=dark] #main .hc .hc-notice.is-ok{background:#12301d;color:#5ad27f}
:root[data-theme=dark] #main .hc .hc-notice.is-warn{background:#3a2210;color:#ffb066}
:root[data-theme=dark] #main #health-root .hc-bar{background:#1d3a27}
:root[data-theme=dark] #main #health-root .hc-step-n{background:#2e2148;color:#c4a8ff}

@media(max-width:700px){
 #main .hc .hc-head h1{font-size:26px}
 #main #health-root .hc-steps{grid-template-columns:1fr}
 #main #health-root .hc-steps li{flex-direction:row;flex-wrap:wrap;align-items:center;column-gap:10px;padding:14px 16px}
 #main #health-root .hc-steps .hc-step-n{margin:0}
 #main #health-root .hc-steps li>span:last-child{flex-basis:100%;padding-left:34px}
 #main #health-root .hc-card{padding:20px 16px;border-radius:22px}
 #main #health-root .hc-help{margin-left:0}
 #main #health-root .hc-comp{padding:16px 14px}
 #main #health-root .hc-comp-grid{grid-template-columns:1fr}
 #main #health-root .hc-seg{display:grid}
 #main #health-root .hc-seg span{padding:0 10px}
 #main #health-root .hc-result{padding:20px 16px}
 #main #health-root .hc-nums{grid-template-columns:1fr 1fr;padding:16px}
 #main #health-root .hc-why{margin-left:0}
 #main #health-root .hc-go .hc-primary{flex:1}
}
@media(prefers-reduced-motion:reduce){#main .hc *{animation:none!important;transition:none!important}}
