/* Shared geometry for the hub and its movement/nutrition documents. */
*,*::before,*::after{box-sizing:border-box}
input,textarea,select{min-inline-size:0;max-inline-size:100%;font-size: max(16px,1em)}
input[type="date"],input[type="datetime-local"],input[type="time"]{display:block;inline-size:100%;min-inline-size:0;max-inline-size:100%;min-block-size:48px}
input::-webkit-date-and-time-value{min-inline-size:0;text-align:start}
input::-webkit-datetime-edit{min-inline-size:0;padding:0}
:where(main,form,fieldset,label,.core-card,.panel,.family-tile,.compact-app,.suite-card){min-inline-size:0}
:where(h1,h2,h3,p,summary,button,a,label,output){overflow-wrap:anywhere}
button,:where(.core-primary,.core-secondary,.focused-link){max-inline-size:100%;white-space:normal}
:where(.family-form,.core-main,.core-practice-dialog) :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){inline-size:100%;min-inline-size:0;max-inline-size:100%;box-sizing:border-box}
.family-form label{align-items:stretch;min-inline-size:0}
.family-form :is(input,textarea,select){font-weight:400;line-height:1.5;min-block-size:48px}
.family-form textarea{min-block-size:112px}
.family-form [role="status"]:empty{display:none}
.family-form+.family-history,.core-card+.family-history{margin-block-start:24px}
.family-grid,.family-tools,.compact-grid,.compact-practices,.practice-grid,.journey-grid,.core-journal-grid,.core-settings-grid{align-items:stretch}
:is(.family-grid,.family-tools,.compact-grid,.compact-practices,.practice-grid,.journey-grid,.core-journal-grid,.core-settings-grid)>*{min-inline-size:0}
.family-tile strong{line-height:1.25}
.family-mark{display:block;min-block-size:1.8rem;line-height:1;margin-block-end:8px}
.family-tile>span:not(.family-mark):not(.family-arrow){flex:1}
.hyvinn-unified .language-control{min-inline-size:0;max-inline-size:100%}
.hyvinn-unified .language-control select{min-inline-size:0;max-inline-size:100%}
.hyvinn-unified .core-bottom-nav a{min-inline-size:0;justify-content:flex-start}
.hyvinn-unified .core-bottom-nav a>span:first-child{display:grid;place-items:center;block-size:28px;flex-shrink:0}
.hyvinn-unified .core-bottom-nav a>span:last-child{inline-size:100%;text-wrap:balance}
.hyvinn-unified .core-main{padding-block-end:calc(72px + var(--hyvinn-bottom-height,0px))}
.hyvinn-unified .core-save-bar{bottom:var(--hyvinn-bottom-height,0px)}
html{scroll-padding-bottom:calc(var(--hyvinn-bottom-height,0px) + 24px)}
body :is(main input,main textarea,main select,main button){scroll-margin-top:var(--hyvinn-scroll-offset,110px);scroll-margin-bottom:24px}
@media(max-width:640px){.hyvinn-unified .core-main{padding-block-end:calc(38px + var(--hyvinn-bottom-height,0px))}}
@media(max-width:480px){
 .hyvinn-unified header{grid-template-columns:44px minmax(0,1fr);column-gap:12px;row-gap:8px}
 .hyvinn-unified .brand{grid-column:2;grid-row:1}
 .hyvinn-unified #menu{grid-column:1;grid-row:1/3}
 .hyvinn-unified .support{grid-column:2;grid-row:2;white-space:normal}
 .hyvinn-unified .language-control{grid-column:1/-1;grid-row:3;display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:center;width:100%;margin:0}
 .hyvinn-unified .language-control span{margin:0;font-size:14px}
 .hyvinn-unified .language-control select{font-size:16px;min-height:44px;padding:8px 32px 8px 12px}
 .core-week-nav{flex-wrap:wrap}
 .core-save-bar{flex-wrap:wrap}
 .compact-actions{gap:12px}
 .compact-actions>button{flex:1 1 auto}
}

/* Keep consecutive writing surfaces separate without changing grid spacing. */
.core-main>.core-card+.core-card,
.core-main>.core-card+#identity-vision,
#identity-vision+.core-card{margin-block-start:24px}
.adis-exercises>.adis-task+.adis-task{margin-block-start:16px}
.adis-exercises>.family-history{margin-block-start:24px}
:is(.adis-task,.encouragement-card,.sleep-note) textarea{min-inline-size:0;max-inline-size:100%;min-block-size:112px;line-height:1.5}
:is(.adis-task,.encouragement-card) [role="status"]:empty{display:none}
.hyvinn-unified :focus-visible{outline-color:var(--accent)}
.hyvinn-unified .core-bottom-nav a{font-size:.75rem}
/* Menu and human support share the left edge; the larger brand sits at top right. */
body.hyvinn-unified header{grid-template-columns:minmax(0,1fr) max-content;grid-template-rows:auto auto auto;column-gap:16px;row-gap:8px;align-items:start}
body.hyvinn-unified header #menu{grid-column:1;grid-row:1;align-self:start;justify-self:start;width:44px;height:44px;min-height:44px}
body.hyvinn-unified header .support{grid-column:1;grid-row:2;align-self:start;justify-self:start;margin:0;max-width:100%;width:max-content;white-space:normal;font-size:14px;line-height:1.35}
body.hyvinn-unified header .brand{grid-column:2;grid-row:1/3;align-self:start;justify-self:end;justify-content:flex-end;min-width:0;max-width:100%;gap:12px;font-size:32px;letter-spacing:.12em;text-align:left;text-decoration:none}
body.hyvinn-unified header .brand .hyvinn-brand-logo{width:72px;height:72px;flex:0 0 72px;border-radius:16px}
body.hyvinn-unified header .brand .hyvinn-brand-wordmark{white-space:nowrap;line-height:1.2}
body.hyvinn-unified header .brand .hyvinn-brand-wordmark>span{font-size:13px;letter-spacing:.08em;white-space:nowrap;line-height:1.4;margin-top:5px}
body.hyvinn-unified header .language-control{grid-column:1/-1;grid-row:3;justify-self:end;width:auto;margin:0;display:flex;align-items:center;gap:12px}
body.hyvinn-unified header .hyvinn-header-actions{grid-column:1/-1;grid-row:4}
@media(max-width:640px){
 body.hyvinn-unified header{padding:12px 16px;column-gap:12px}
 body.hyvinn-unified header .brand{font-size:clamp(23px,6.3vw,30px);gap:10px}
 body.hyvinn-unified header .brand .hyvinn-brand-logo{width:clamp(48px,14vw,64px);height:clamp(48px,14vw,64px);flex-basis:clamp(48px,14vw,64px);border-radius:13px}
 body.hyvinn-unified header .brand .hyvinn-brand-wordmark>span{font-size:clamp(9.5px,2.7vw,12px);margin-top:4px}
 body.hyvinn-unified header .support{padding:10px 9px;font-size:13px;min-height:44px}
 body.hyvinn-unified header .language-control{display:grid;grid-template-columns:auto minmax(0,1fr);justify-self:stretch;width:100%;gap:12px}
 body.hyvinn-unified header .language-control span{font-size:14px;margin:0}
 body.hyvinn-unified header .language-control select{width:100%;font-size:16px;min-height:44px;padding:8px 32px 8px 12px}
 body.hyvinn-unified>.core-bottom-nav{display:grid!important;position:fixed!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;width:auto;max-width:none;margin:0;z-index:90;transform:none!important}
 body.hyvinn-unified :is(main input,main textarea,main select,main button){scroll-margin-bottom:calc(var(--hyvinn-bottom-height,80px) + 24px)}
}
@media(max-width:360px){
 body.hyvinn-unified header{padding-inline:12px;column-gap:8px}
 body.hyvinn-unified header .brand{gap:8px;letter-spacing:.1em}
}
@media(max-width:480px){
 .core-main>.core-card+.core-card,
 .core-main>.core-card+#identity-vision,
 #identity-vision+.core-card{margin-block-start:20px}
 .hyvinn-unified header .brand span{white-space:normal;line-height:1.5}
}
@media print{body.hyvinn-unified>.core-bottom-nav{display:none!important}}
