/* Shared window-based layout. Folding and rotation resize CSS, never reload forms. */
:root{--ink:#233a34;--muted:#61726b;--green:#28634f;--paper:#f5f7f4;--line:#dce5df;--mint:#eaf3ec;--nav-height:78px}
html{scroll-padding-bottom:calc(var(--nav-height) + 24px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;line-height:1.6;background:var(--paper);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif}
*,*::before,*::after{box-sizing:border-box}
main#content,.app-shell,.card,.t-service-copy,.page-heading>div,.t-mine-profile>div{min-width:0}
img,video,canvas{max-width:100%}button,input,select,textarea{font:inherit}
button,a,input,select,textarea{touch-action:manipulation}
button:focus-visible,a:focus-visible{outline:3px solid #608cce;outline-offset:3px}
input,select,textarea{min-width:0;max-width:100%}
button{overflow-wrap:anywhere}
.sidebar{background:#f1f5ef;border-color:#dde6dd}
.sidebar nav{display:flex;flex-direction:column;overflow:visible}
.sidebar .nav-button{min-height:48px;color:#53685d;font-weight:500}
.sidebar .nav-button.active{background:#dcebdd;color:#215c46;box-shadow:inset 3px 0 #38765b}
.sidebar .brand{letter-spacing:.08em;font-size:21px}
.topbar{max-width:1280px;padding:0 32px}.topbar .quiet-button{font-size:13px}
.demo-notice{padding-left:32px;padding-right:32px}
main#content{max-width:1240px;padding:24px 32px 40px}
.family-bar{padding:0 0 20px;gap:12px;color:#52665c}
.family-bar label{min-width:0;white-space:nowrap;font-size:13px}
.family-bar select{min-width:0;max-width:220px;border-radius:12px;padding:9px 12px;font-size:14px;min-height:44px}
.family-bar .text-link{font-size:13px;min-height:44px;flex-shrink:0}
.page-heading h1,.t-home-top h1{font-size:clamp(26px,3.5vw,36px);font-weight:650;line-height:1.4;letter-spacing:-.025em}
.page-heading p{font-size:14px;color:#61726b;line-height:1.75}
.eyebrow{color:#718377;font-size:11px;letter-spacing:.1em}
.t-heading-icon{background:#e4efe6;color:#39745a;width:58px;height:58px;border-radius:18px}
.t-home-top{margin-bottom:20px}.t-profile-chip{font-size:13px;min-height:44px;border-color:#d8e4da}
.t-hero{background:linear-gradient(115deg,#e5f0e4,#f2f4e8);border:1px solid #d7e4d5;padding:28px 32px;min-height:235px;border-radius:24px}
.t-hero h2{font-size:clamp(28px,4vw,38px);font-weight:600;color:#284e3b;line-height:1.35}
.t-hero p{color:#526d5a;font-size:14px;max-width:320px}
.t-kicker{font-size:10px;color:#69816c}
.t-checkin{margin-top:18px;gap:8px}.t-checkin button{font-size:13px;min-height:44px;background:#ffffffc9;border-color:#cddfcf}
.t-checkin button[aria-pressed=true]{background:#326a50;color:white;border-color:#326a50}
.t-orbit{width:235px;height:220px}.t-orbit-core{color:#6e9067}
.t-section-label{margin:26px 0 14px;align-items:center;flex-wrap:wrap;gap:5px 12px}
.t-section-label h2{font-size:18px;font-weight:650;color:#304c3e}.t-section-label>span{font-size:12px;color:#718173}
.t-service-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.t-service-tile{--tile-ink:#315c49;--tile-bg:#e7f1e8;display:flex;position:relative;align-items:center;gap:13px;min-width:0;min-height:114px;padding:20px;text-align:left;background:#fff;border:1px solid #dce6df;border-radius:20px;box-shadow:0 3px 14px #17392a04;color:var(--tile-ink);transition:border-color .15s,box-shadow .15s}
.tone-violet{--tile-ink:#69528c;--tile-bg:#eee8f7}.tone-blue{--tile-ink:#315e8e;--tile-bg:#e6eff9}.tone-green{--tile-ink:#28664f;--tile-bg:#e6f2e9}.tone-amber{--tile-ink:#8b622e;--tile-bg:#faf0de}.tone-rose{--tile-ink:#99566a;--tile-bg:#fae9ef}
.t-service-icon{display:grid;place-items:center;flex-shrink:0;width:48px;height:48px;border-radius:15px;background:var(--tile-bg);color:var(--tile-ink)}
.t-service-icon svg{width:25px;height:25px}
.t-service-copy{flex:1}.t-service-copy strong{display:block;font-size:16px;font-weight:650;color:#30483c;line-height:1.5}
.t-service-copy small{display:block;font-size:13px;line-height:1.7;color:#68796d;margin-top:6px}
.t-service-arrow{font-size:18px;align-self:flex-start;color:var(--tile-ink);opacity:.65}
.t-service-tile:hover{border-color:#9bb9a4;box-shadow:0 5px 20px #2543320b}
.t-services .t-service-tile{border-top:3px solid var(--tile-bg)}
.card{border-color:#dde6df;border-radius:21px;box-shadow:0 4px 18px #233f2903}
.card p,.t-advice p{color:#586e60}.card h2{font-weight:650}
.t-advice-grid,.t-bottom-grid,.well-grid,.care-paths{gap:18px}
.t-advice{border-radius:21px}.t-advice.movement{background:#edf5eb;border-color:#dce9d8}.t-advice.nutrition{background:#fcf3e7;border-color:#efdfc9}
.t-category{font-size:13px;font-weight:600}.t-advice h2{font-size:24px;font-weight:600}
.t-link,.t-dark-link,.t-complete{font-size:13px;min-height:44px}
.t-metric-tile{border-color:#dde5df}.t-tile-label{font-size:13px;color:#5d7064}.t-tile-caption{font-size:12px;color:#65786a}
.t-list-row strong{font-size:15px}.t-list-row small{font-size:12px;color:#66796b}
.t-menu-item strong{font-size:16px;font-weight:600;color:#304b3b}.t-menu-item small{font-size:13px;color:#687b6d}
.t-menu-item .t-round-icon{width:45px;height:45px;border-radius:14px}
.t-mine-profile{background:linear-gradient(110deg,#e2eedf,#eff4ea);border:1px solid #d5e3d1;padding:25px;border-radius:22px;margin-bottom:12px}
.t-mine-profile h2{font-size:24px;font-weight:650}.t-mine-profile p{font-size:13px;color:#58704f}
.t-mine-profile>span{background:#cddfc5;color:#395e31;width:58px;height:58px}
.t-mine-group{margin-bottom:24px}.t-mine-group .t-section-label{margin-top:24px}
.t-mine-group .t-service-tile{min-height:106px}
.t-privacy-actions{padding-top:8px;border-top:1px solid #dce5db;gap:12px}
.t-source,.t-basis{font-size:12px;color:#66796a}
.btn{background:#28634f;border-color:#28634f}.btn:hover{background:#204e40}
.outline{border-color:#c8d8cf;color:#315d49}
.t-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.t-toolbar,.hero-actions,.form-actions{flex-wrap:wrap}
.report-table{max-width:100%;overflow-x:auto}
dialog{width:min(680px,calc(100% - 24px));max-width:calc(100% - 24px);max-height:calc(100dvh - 32px);padding:26px;overflow-y:auto}
dialog .close{min-width:44px;min-height:44px}
.mobile-nav{display:none}
/* This grid deliberately owns all five tracks; it cannot inherit sidebar flex-direction. */
@media(max-width:1023px){
 .sidebar{position:relative;inset:auto;width:100%;height:auto;display:flex;align-items:center;border:0;background:transparent;padding:16px max(18px,env(safe-area-inset-left)) 8px}
 .sidebar .brand{font-size:20px;gap:10px;display:inline-flex}.sidebar .brand-icon{width:33px;height:33px;font-size:27px}
 .sidebar .brand>span:last-child{display:block}.sidebar .brand small,.sidebar .nav-label,.sidebar nav,.sidebar-foot{display:none}
 .app-shell{margin-left:0!important;width:100%}
 .topbar{position:absolute;top:16px;right:max(16px,env(safe-area-inset-right));height:38px;min-height:38px;width:auto;padding:0;background:transparent}
 .breadcrumb,.topbar .private-label,.topbar .avatar,.topbar #privacy{display:none}
 .top-actions{width:auto;gap:0}.top-actions .quiet-button{font-size:12px;padding:8px;min-height:40px}
 .demo-notice{padding:2px 20px 0;margin:0;min-height:16px;text-align:right;font-size:10px}
 main#content{max-width:960px;padding:18px clamp(16px,3.5vw,30px) calc(var(--nav-height) + 30px + env(safe-area-inset-bottom))}
 .mobile-nav{position:fixed;inset:auto 0 0;z-index:100;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-flow:column;flex-direction:row;gap:4px;overflow:visible;border:0;border-top:1px solid #dce6dc;padding:8px max(10px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:#fcfdfbf5;backdrop-filter:blur(18px);box-shadow:0 -4px 22px #23412b08}
 .mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:100%;min-width:0;min-height:54px;padding:6px 2px;border:0;border-radius:14px;color:#687b6b;background:transparent;font-size:12px;line-height:1.4;font-weight:500;white-space:nowrap}
 .mobile-nav button svg{width:23px;height:23px;color:inherit;stroke-width:1.7}
 .mobile-nav button[aria-current=page]{background:#e2efe0;color:#245c3d;font-weight:700;box-shadow:inset 0 2px #81a574}
 .mobile-nav button[data-nav=assistant][aria-current=page]{background:#eee7f8;color:#675080;box-shadow:inset 0 2px #a88ac1}
 .mobile-nav button[data-nav=assistant] svg{color:inherit}
 .app-shell>footer{display:none}.toast{left:50%;max-width:calc(100% - 32px);bottom:calc(var(--nav-height) + 16px + env(safe-area-inset-bottom))!important}
 .t-orbit{position:absolute;right:-10px;top:14px;width:220px;height:220px;opacity:.7}.t-hero-copy{position:relative;z-index:1;min-height:0;width:100%}
 .t-hero h2{font-size:32px;margin:8px 0 14px}.t-hero{padding:24px;min-height:210px}.t-hero p{display:block;font-size:13px;max-width:58%}.t-hero .t-kicker{display:block;font-size:9px}
 .t-page-heading{display:flex;gap:16px}.t-page-heading h1{font-size:28px}.t-page-heading p{font-size:14px}
}
/* Inner fold displays and landscape windows use the available width for content. */
@media(min-width:600px) and (max-width:1023px){
 .t-menu-grid,.t-advice-grid,.t-bottom-grid,.well-grid,.care-paths{grid-template-columns:repeat(2,minmax(0,1fr))}
 .t-metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 .t-service-grid{gap:16px}.t-service-tile{padding:23px;min-height:116px}
 .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.form-grid>.span-2{grid-column:1/-1}
 .t-hero{min-height:245px;padding:30px}.t-hero h2{font-size:36px}.t-orbit{right:40px;width:250px;height:240px;top:0}
 .t-metric-tile{padding:18px 14px}.t-tile-label{flex-wrap:wrap}
}
@media(min-width:1024px){
 .sidebar{position:fixed;top:0;left:0;bottom:0;width:216px;padding:30px 17px;height:100dvh;overflow-y:auto}
 .sidebar .brand>span:last-child,.sidebar .nav-label,.sidebar-foot{display:block}
 .sidebar .nav-button{font-size:14px;justify-content:flex-start;gap:12px;padding:12px}
 .sidebar .brand{justify-content:flex-start}.app-shell{margin-left:216px}
 .t-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.t-hero{min-height:260px}
}
@media(min-width:1400px){.t-services .t-service-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.t-services .t-service-tile{align-items:flex-start;flex-wrap:wrap;gap:14px}.t-services .t-service-copy{flex-basis:100%}.t-services .t-service-arrow{position:absolute;right:18px;top:18px}}
@media(max-width:599px){
 .t-menu-grid,.t-advice-grid,.t-bottom-grid,.well-grid,.care-paths{grid-template-columns:minmax(0,1fr)}
 .t-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .t-services .t-service-tile{flex-wrap:wrap;align-content:flex-start;gap:12px;padding:16px;min-height:164px}
 .t-services .t-service-copy{flex-basis:100%}.t-services .t-service-arrow{position:absolute;right:14px;top:16px}
 .t-service-icon{width:43px;height:43px;border-radius:14px}.t-service-copy strong{font-size:15px}.t-service-copy small{font-size:12px}
 .t-mine-group .t-service-grid{grid-template-columns:minmax(0,1fr)}
 .t-mine-group .t-service-tile{padding:18px;min-height:94px}
 .family-bar{align-items:center;gap:8px;padding-bottom:17px}.family-bar label{font-size:11px;gap:7px}.family-bar select{max-width:155px;font-size:13px!important;padding:8px;min-height:42px}
 .family-bar .text-link{font-size:12px}.t-section-label>span{font-size:11px;white-space:normal}
 .t-mine-profile{padding:20px;gap:14px}.t-mine-profile h2{font-size:21px}.t-mine-profile p{font-size:12px}.t-mine-profile>span{width:48px;height:48px;font-size:22px}
 .t-heading-icon{width:44px;height:44px;border-radius:14px}.t-heading-icon svg{width:24px;height:24px}
 .t-page-heading h1{font-size:26px}.t-page-heading p{font-size:13px}
 .t-hero{min-height:215px;padding:22px}.t-hero h2{font-size:30px}.t-orbit{right:-48px;width:200px;height:210px;top:14px;opacity:.55}
 .t-hero p{max-width:75%;font-size:12px}.t-checkin{gap:6px}.t-checkin button{padding:9px 10px;font-size:12px}
 .form-actions{align-items:stretch}.form-actions>.btn{width:100%}
}
@media(max-width:359px){
 main#content{padding-left:12px;padding-right:12px}.family-bar{flex-wrap:wrap}.family-bar label{flex:1}.family-bar .text-link{font-size:11px}
 .t-page-heading h1{font-size:24px}.t-service-grid{gap:9px}.t-services .t-service-tile{padding:14px}.t-service-copy strong{font-size:14px}
 .t-mine-profile{flex-wrap:wrap}.t-mine-profile>div{flex:1}.t-profile-chip{max-width:43%}.t-checkin button{font-size:11px}
 .mobile-nav{gap:2px;padding-left:6px;padding-right:6px}.mobile-nav button{font-size:11px}
}
@media(max-height:500px) and (max-width:1023px){
 :root{--nav-height:60px}.mobile-nav{padding-top:4px;padding-bottom:calc(4px + env(safe-area-inset-bottom))}
 .mobile-nav button{flex-direction:row;gap:7px;min-height:44px}.mobile-nav button svg{width:20px;height:20px}
 dialog{max-height:calc(100dvh - 16px);margin:8px auto}
}
@media(prefers-reduced-motion:reduce){.t-service-tile{transition:none}}
