/* Native discussion controls use the same paper, ink and typography as the site. */
.community-root{--community-paper:#f9f8f4;--community-ink:#292724;--community-red:#a13c2f;--community-rule:#d6d2c8;--community-sans:var(--font,var(--sans,'Noto Sans TC',system-ui,sans-serif));--community-serif:var(--serif,'Noto Serif TC','Songti TC',serif);color:var(--community-ink);font-family:var(--community-sans)}
.community-launcher{position:fixed;right:22px;bottom:22px;z-index:31;display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:126px;min-height:47px;margin:0;padding:11px 15px;border:1px solid var(--community-ink);border-radius:0;background:var(--community-paper);color:var(--community-ink);box-shadow:0 3px 12px #29272412;font:500 13px/1.5 var(--community-sans);cursor:pointer;touch-action:manipulation}
.community-launcher svg{width:21px;height:21px;flex:none;color:var(--community-red)}
.community-launcher:hover{background:var(--community-ink);color:var(--community-paper)}
.community-launcher:hover svg{color:var(--community-paper)}
.community-launcher:focus-visible,.community-close:focus-visible,.community-dialog a:focus-visible,.community-dialog button:focus-visible,.community-dialog textarea:focus-visible{outline:2px solid var(--community-red);outline-offset:4px}
body.community-modal-open{overflow:hidden}
body.community-open .community-launcher,body.community-other-dialog-open .community-launcher{visibility:hidden;pointer-events:none}
body:has(dialog[open]:not(#community-dialog)) .community-launcher{visibility:hidden;pointer-events:none}
.community-dialog{position:fixed;inset:0 0 0 auto;z-index:40;width:var(--community-sidebar-width,380px);height:100dvh;max-width:none;max-height:none;margin:0;padding:0;overflow:hidden;border:0;border-left:1px solid var(--community-ink);border-radius:0;background:var(--community-paper);color:var(--community-ink);font-family:var(--community-sans)}
.community-dialog[open]{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto}
.community-dialog::backdrop{background:var(--community-paper)}
.community-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 18px;padding:16px 0 12px;border-bottom:3px double var(--community-ink)}
.community-kicker{display:block;color:var(--community-red);font:500 9px/1.5 var(--community-sans);letter-spacing:.12em}
.community-heading h2{margin:5px 0 0;font:600 22px/1.4 var(--community-serif);letter-spacing:0}
.community-close{display:block;flex:none;width:38px;height:38px;padding:0;border:0;border-radius:0;background:transparent;color:var(--community-ink);font:32px/1 var(--community-sans);cursor:pointer}
.community-close:hover{color:var(--community-red)}
.community-description{margin:0;padding:10px 18px;color:#6d6860;font:12px/1.6 var(--community-sans)}
 .community-dialog button,.community-dialog textarea{font-family:inherit}
.community-discussion{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 18px 14px;border-block:1px solid var(--community-rule);scrollbar-width:thin}
.community-discussion-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0 9px}
.community-discussion-head h3{margin:0;font:600 14px/1.5 var(--community-serif)}
.community-refresh,.community-retry{appearance:none;border:0;border-bottom:1px solid currentColor;background:transparent;color:var(--community-ink);padding:3px 0;font-size:11px;line-height:1.5;cursor:pointer}
.community-refresh:hover,.community-retry:hover{color:var(--community-red)}
.community-dialog button:disabled{opacity:.5;cursor:default}
.community-read-status{margin:0;color:#6d6860;font:12px/1.8 var(--community-sans)}
.community-read-status:not(:empty){padding:14px 0}
.community-retry{margin-bottom:15px}
.community-retry[hidden],.community-more-note[hidden]{display:none}
.community-messages{display:block;list-style:none;margin:0;padding:0}
.community-message{margin:0;padding:14px 0;border-bottom:1px solid var(--community-rule)}
.community-message:first-child{padding-top:4px}
.community-message:last-child{border-bottom:0}
.community-message-meta{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 10px;font:10px/1.6 var(--community-sans);color:#79766e}
.community-author{font-size:11px;font-weight:600;color:var(--community-ink);overflow-wrap:anywhere}
.community-message-meta time{margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap}
.community-reply-label{font-size:9px;color:#79766e}
.community-message-text{margin:6px 0 0;color:var(--community-ink);font:13px/1.85 var(--community-sans);white-space:pre-wrap;overflow-wrap:anywhere}
.community-more-note{margin:14px 0 0;color:#79766e;font:10px/1.7 var(--community-sans)}
.community-composer{margin:0;padding:13px 18px 10px;border-bottom:1px solid var(--community-rule);font:12px/1.6 var(--community-sans)}
.community-composer label{display:block;margin:0 0 7px;font-weight:600}
.community-draft{display:block;box-sizing:border-box;width:100%;min-height:72px;max-height:150px;resize:vertical;border:1px solid #aaa49a;border-radius:0;margin:0;padding:9px 10px;background:#fffefb;color:var(--community-ink);font-size:13px;line-height:1.7;box-shadow:none}
.community-draft::placeholder{color:#79766e;opacity:1}
.community-draft[aria-invalid=true]{border-color:var(--community-red)}
.community-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-top:8px}
.community-character-count{color:#79766e;font-size:10px;font-variant-numeric:tabular-nums}
.community-character-count.is-over-limit{color:var(--community-red);font-weight:600}
.community-submit{min-height:35px;border:1px solid var(--community-red);border-radius:0;padding:6px 14px;background:var(--community-red);color:var(--community-paper);font-size:12px;line-height:1.5;cursor:pointer}
.community-submit:hover:not(:disabled){color:var(--community-paper);background:#853126;border-color:#853126}
.community-post-status{margin:0;color:#6d6860;font:11px/1.7 var(--community-sans)}
.community-post-status:not(:empty){margin-top:8px}
.community-post-status.is-uncertain{color:var(--community-red)}
.community-input-note{margin:8px 0 0;color:#79766e;font:9px/1.6 var(--community-sans)}
.community-footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:6px 12px;margin:0;padding:12px 18px;border:0;background:var(--community-paper)}
.community-footer p{margin:0;color:#6d6860;font:10px/1.6 var(--community-sans)}
.community-footer .community-privacy{margin:0;font:11px/1.6 var(--community-sans);color:var(--community-ink);text-decoration:underline;text-underline-offset:3px;white-space:nowrap}
.community-privacy:hover{color:var(--community-red)}
/* Keep the topic and discussion side by side, with independent scrolling. */
@media(min-width:1001px){
 body.community-enabled{--community-sidebar-width:clamp(320px,26vw,380px)}
 body.community-sidebar-open{padding-right:var(--community-sidebar-width)}
 body.community-sidebar-open .floating-timeline{left:calc((100% - var(--community-sidebar-width))/2);width:min(620px,calc(100% - var(--community-sidebar-width) - 36px));transform:translateX(-50%)}
 body.community-sidebar-open .toast{left:calc((100% - var(--community-sidebar-width))/2);max-width:calc(100% - var(--community-sidebar-width) - 36px)}
 body.community-sidebar-open main{padding-inline:24px}
 body.community-sidebar-open .page-shell{padding-inline:32px}
}
/* The reduced reading column needs its own compact layout; viewport queries
   alone do not react when the discussion sidebar opens. */
@media(min-width:1001px) and (max-width:1500px){
 body.community-sidebar-open.community-simulator .masthead{min-height:0;flex-basis:56px;gap:10px}
 body.community-sidebar-open.community-simulator .brand{font-size:28px}
 body.community-sidebar-open.community-simulator .brand small{font-size:7px}
 body.community-sidebar-open.community-simulator .edition-meta{font-size:9px}
 body.community-sidebar-open.community-simulator .edition-meta time{font-size:8px}
 body.community-sidebar-open.community-simulator .masthead .actions{gap:9px}
 body.community-sidebar-open.community-simulator .masthead .actions .button{font-size:9px}
 body.community-sidebar-open.community-simulator .section-nav{font-size:8px;gap:12px}
 body.community-sidebar-open.community-simulator .section-nav>div{gap:16px}
 body.community-sidebar-open.community-simulator .leadline{min-height:0;flex-basis:78px;gap:16px}
 body.community-sidebar-open.community-simulator .leadline h1{font-size:28px}
 body.community-sidebar-open.community-simulator .leadline>p{display:none}
 body.community-sidebar-open.community-simulator .simulation-layout{grid-template-columns:170px minmax(0,1fr);gap:18px}
 body.community-sidebar-open.community-simulator .controls{padding-right:16px;gap:10px}
 body.community-sidebar-open.community-simulator .label-row output{font-size:25px}
 body.community-sidebar-open.community-simulator .metrics article{padding-inline:7px}
 body.community-sidebar-open.community-simulator .metrics article:first-child{padding-left:0}
 body.community-sidebar-open.community-simulator .metrics article>span{font-size:8px;white-space:normal}
 body.community-sidebar-open.community-simulator .metrics strong{font-size:23px}
 body.community-sidebar-open.community-simulator .metrics strong em{font-size:8px;margin-left:3px}
 body.community-sidebar-open.community-simulator .metrics small{font-size:7px;white-space:normal}
 body.community-sidebar-open.community-simulator .plot-head:has(.pressure-toolbar:not([hidden])){height:58px;flex-basis:58px;flex-wrap:wrap;gap:0 10px}
 body.community-sidebar-open.community-simulator .plot-head:has(.pressure-toolbar:not([hidden])) .tabs{height:29px}
 body.community-sidebar-open.community-simulator .pressure-toolbar{flex-basis:100%;height:29px;order:3;gap:8px}
 body.community-sidebar-open.community-simulator .pressure-toolbar select{max-width:150px}
 body.community-sidebar-open.community-simulator .plot-head .text-button{margin-left:auto}
 body.community-sidebar-open.community-simulator .chart-legend{gap:3px 10px;flex-wrap:wrap;white-space:normal;font-size:8px;flex-basis:auto;min-height:24px;padding:3px 0}
 body.community-sidebar-open.community-simulator .chart-legend b{font-size:10px}
 body.community-sidebar-open.community-simulator .person-name{font-size:9px}
 body.community-sidebar-open.community-simulator .scene-head h2{font-size:14px}
 body.community-sidebar-open.community-simulator .risk-bridge{flex-wrap:wrap;white-space:normal;gap:2px 9px;flex-basis:auto;min-height:19px}
 body.community-sidebar-open.community-simulator .risk-bridge .care-bridge{font-size:8px}
 body.community-sidebar-open.community-simulator .household-panel{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px}
 body.community-sidebar-open.community-simulator .household-intro{grid-column:1/-1}
 body.community-sidebar-open.community-simulator .household-intro h3 br{display:none}
 body.community-sidebar-open .page-shell .hero{gap:30px;padding-block:42px}
 body.community-sidebar-open .page-shell .hero h1{font-size:60px}
 body.community-sidebar-open .page-shell .hero-intro{padding-left:24px}
 body.community-sidebar-open .page-shell .hero-intro>p:first-child{font-size:24px}
 body.community-sidebar-open .page-shell .featured{gap:28px}
 body.community-sidebar-open .page-shell .featured h3{font-size:34px}
 body.community-sidebar-open .page-shell .featured-question{font-size:22px}
 body.community-sidebar-open .page-shell .project-action{align-items:flex-start;flex-direction:column;gap:8px}
 body.community-sidebar-open .page-shell .work h3{font-size:32px}
 body.community-sidebar-open .page-shell .work-dome h3{font-size:44px}
 body.community-sidebar-open .page-shell .work-figure img{height:220px}
 body.community-sidebar-open .page-shell .about{gap:38px}
 body.community-sidebar-open .page-shell .about h2{font-size:31px}
 body.community-sidebar-open .page-shell .footer-links{flex-wrap:wrap;gap:16px}
}
/* Small desktop windows retain readable controls rather than squeezing rows. */
@media(min-width:1001px) and (max-width:1150px){
 body.community-sidebar-open.community-simulator .front-page{height:auto;min-height:0;padding-top:10px}
 body.community-sidebar-open.community-simulator .masthead{grid-template-columns:minmax(0,1fr) auto;min-height:60px}
 body.community-sidebar-open.community-simulator .edition-meta{display:none}
 body.community-sidebar-open.community-simulator .masthead .brand{text-align:left;font-size:26px}
 body.community-sidebar-open.community-simulator .masthead .actions{gap:7px}
 body.community-sidebar-open.community-simulator .section-nav>span{display:none}
 body.community-sidebar-open.community-simulator .leadline{min-height:82px}
 body.community-sidebar-open.community-simulator .simulation-layout{flex:none;grid-template-columns:150px minmax(0,1fr);gap:16px}
 body.community-sidebar-open.community-simulator .controls{gap:14px;padding-right:12px}
 body.community-sidebar-open.community-simulator .label-row{gap:5px}
 body.community-sidebar-open.community-simulator .label-row label{font-size:10px}
 body.community-sidebar-open.community-simulator .label-row output{font-size:23px}
 body.community-sidebar-open.community-simulator .workspace{grid-template-rows:42px auto 290px auto;gap:12px}
 body.community-sidebar-open.community-simulator .timeline{gap:10px}
 body.community-sidebar-open.community-simulator .year-display strong{font-size:29px}
 body.community-sidebar-open.community-simulator .play-hint{display:none}
 body.community-sidebar-open.community-simulator .metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
 body.community-sidebar-open.community-simulator .metrics article{min-height:74px;padding:8px 7px;border-bottom:1px solid var(--line);border-right:1px solid var(--line)}
 body.community-sidebar-open.community-simulator .metrics article:nth-child(3){border-right:0}
 body.community-sidebar-open.community-simulator .metrics article:nth-child(n+4){border-bottom:0}
 body.community-sidebar-open.community-simulator .metrics article:last-child{grid-column:auto;border-right:0}
 body.community-sidebar-open.community-simulator .metrics strong{font-size:23px}
 body.community-sidebar-open.community-simulator .scene-head{flex-wrap:wrap;gap:4px}
 body.community-sidebar-open.community-simulator .scene-tools{margin-left:auto}
 body.community-sidebar-open.community-simulator .risk-bridge{padding-top:5px;min-height:37px}
 body.community-sidebar-open.community-simulator .care-bridge{margin-left:0}
 body.community-sidebar-open.community-simulator .characters{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 5px;margin-top:6px}
 body.community-sidebar-open.community-simulator .person{grid-template-rows:116px 18px 14px;padding-inline:0}
 body.community-sidebar-open.community-simulator .scroll-cue{margin-block:16px 5px}
 body.community-sidebar-open.community-simulator .care-scenario-cards{grid-template-columns:1fr;gap:14px}
 body.community-sidebar-open.community-simulator .care-scenario-card dl{display:grid;grid-template-columns:1fr 1fr;gap:14px}
 body.community-sidebar-open.community-simulator .budget-evidence{gap:16px}
 body.community-sidebar-open.community-simulator .ledger-card{padding-right:14px}
 body.community-sidebar-open.community-simulator .ledger-card+.ledger-card{padding-left:14px}
 body.community-sidebar-open.community-simulator .ledger-card strong{font-size:23px}
 body.community-sidebar-open.community-simulator .method-grid{grid-template-columns:1fr;gap:20px}
 body.community-sidebar-open .page-shell .masthead{gap:18px}
 body.community-sidebar-open .page-shell .brand{display:block}
 body.community-sidebar-open .page-shell .brand-descriptor{display:block;font-size:12px;margin-top:8px}
 body.community-sidebar-open .page-shell .main-nav{gap:16px;font-size:12px}
 body.community-sidebar-open .page-shell .hero{display:block;padding-block:36px}
 body.community-sidebar-open .page-shell .hero h1{font-size:58px}
 body.community-sidebar-open .page-shell .hero-intro{border-left:0;padding:0;margin-top:25px}
 body.community-sidebar-open .page-shell .featured{grid-template-columns:1fr;gap:26px}
 body.community-sidebar-open .page-shell .featured-art{width:100%}
 body.community-sidebar-open .page-shell .more-projects{gap:24px}
 body.community-sidebar-open .page-shell .work-shelter{padding-left:24px}
 body.community-sidebar-open .page-shell .work-figure img{height:180px}
 body.community-sidebar-open .page-shell .about{display:block;padding-block:35px}
 body.community-sidebar-open .page-shell .about-copy{margin-top:22px}
}
@media(min-width:651px) and (max-width:1000px){body.community-enabled .floating-timeline{left:18px;width:calc(100% - 190px);transform:none}}
@media(max-width:1000px){
 .community-dialog{inset:0;width:100%;height:100dvh;margin:0;border:0;padding:env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) env(safe-area-inset-bottom,0px) env(safe-area-inset-left,0px)}
 .community-draft{font-size:16px;line-height:1.5}
 body.community-modal-open .mobile-settings-dock,body.community-modal-open .floating-timeline{visibility:hidden}
}
@media(max-width:650px){
 .community-launcher{right:14px;bottom:calc(14px + env(safe-area-inset-bottom,0px));min-width:112px;min-height:44px;padding:9px 12px;font-size:12px}
 .community-heading{margin-inline:15px;padding-top:13px;padding-bottom:10px}
 .community-heading h2{font-size:21px}
 .community-description{padding:8px 15px;font-size:11px}
 .community-footer{padding:9px 15px;gap:4px 10px}
 .community-discussion{padding-inline:15px}
 .community-composer{padding:10px 15px}
 .community-draft{font-size:16px;min-height:76px;line-height:1.5}
 body.community-simulator .community-launcher{inset:auto 0 0 auto;flex-direction:column;gap:3px;width:76px;min-width:76px;min-height:calc(64px + env(safe-area-inset-bottom,0px));padding:9px 4px calc(11px + env(safe-area-inset-bottom,0px));border:0;border-top:1px solid var(--community-ink);border-left:1px solid var(--community-rule);border-radius:0 16px 0 0;box-shadow:0 -5px 20px #2927240d;font-size:10px}
 body.community-simulator .community-launcher svg{width:20px;height:20px}
 body.community-simulator .mobile-settings-dock{right:76px;width:calc(100% - 76px);max-width:none;min-height:calc(64px + env(safe-area-inset-bottom,0px));margin:0;padding-inline:16px;border-top-right-radius:0}
 body.community-simulator .mobile-settings-dock .dock-row{gap:8px}
 body.community-simulator .mobile-settings-dock .dock-summary{font-size:9px}
}
@media print{.community-root{display:none!important}body.community-sidebar-open{padding-right:0}}
