/* Approved 8840 analysis direction. All type inherits the current application font. */
.analysis-entry{display:flex;align-items:center;gap:12px;width:100%;padding:15px 18px;margin:12px 0;border:1px solid var(--line,#d8e3cf);background:var(--soft,#eff4e7);border-radius:20px;text-align:left;color:var(--brand,#355447)}
.analysis-entry>span:first-child{flex:1;min-width:0}.analysis-entry b,.analysis-entry small{display:block}.analysis-entry b{font-size:16px}.analysis-entry small{font-size:12px;font-weight:400;margin-top:3px;color:var(--muted,#5c665e)}
.analysis-photos{display:flex;align-items:center;padding-left:7px}.analysis-photos img{width:40px;height:40px;border:2px solid var(--paper,#f8f8f2);border-radius:12px;object-fit:cover;margin-left:-7px}
.analysis-photos .meal-mini-photo{width:40px;height:40px;border:2px solid var(--paper,#f8f8f2);border-radius:12px;margin-left:-7px;overflow:hidden;flex:none}.analysis-photos .meal-mini-photo img{width:100%;height:100%;border:0;margin:0;border-radius:0}.analysis-photos svg{width:20px;height:20px}
#analysis{font-family:inherit;overflow-anchor:none;padding-bottom:32px;color:var(--text,#29352f)}
#analysis h1,#analysis h2,.analysis-close-sheet h2{font-family:inherit;letter-spacing:0}
#analysis h1{font-size:26px;margin:0}#analysis h2{font-size:20px;margin:0 0 12px;line-height:1.5}
.analysis-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:8px 0 18px}.analysis-heading>small{font-size:11px;color:var(--muted,#5c665e);max-width:160px}
.analysis-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:5px;background:var(--soft,#e9eedf);border-radius:16px}
.analysis-periods button,.analysis-purpose button,.analysis-jumps button{min-height:44px;padding:7px 8px;border:0;background:transparent;color:var(--brand,#355447);font:inherit;border-radius:12px;line-height:1.4}
.analysis-periods button[aria-pressed=true],.analysis-purpose button[aria-pressed=true]{background:var(--paper,#fff);font-weight:700;box-shadow:0 2px 6px #25332d09}
.analysis-dates{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:14px 0 9px}.analysis-date-selected{flex:1;min-width:0;text-align:center}.analysis-date-selected small{display:block;font-size:12px;margin-top:5px}.analysis-dates button{width:44px;flex:none;min-width:44px;min-height:44px;padding:0;font-size:24px;border-radius:13px}
#analysis .analysis-date-selected input[type=date]{display:block;margin:0 auto;min-width:0;max-width:190px;width:100%;min-height:44px;font:inherit;padding:6px 12px;box-sizing:border-box;color:inherit;border:1px solid var(--line,#d8e3cf);border-radius:12px;background:var(--paper,#fff)}
.analysis-hero{background:linear-gradient(120deg,var(--soft,#e3edcf),var(--paper,#f7f9ef));border:1px solid var(--line,#d8e3c8);border-radius:24px;padding:20px;margin:15px 0 18px;overflow:hidden}
.analysis-hero-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.analysis-hero-top h2{flex:1}.analysis-hero p{font-size:14px;line-height:1.8;margin:12px 0}.review-energy{display:grid;grid-template-columns:1.15fr 1fr;gap:14px;padding:14px 0;margin:10px 0;border-top:1px solid var(--line,#d1dcc4);border-bottom:1px solid var(--line,#d1dcc4)}
.review-energy>div{min-width:0}.review-energy small{display:block;font-size:12px;color:var(--muted,#5c665e)}.review-energy strong{display:block;font-size:clamp(21px,5vw,32px);line-height:1.8;white-space:nowrap;color:var(--brand,#355447);font-variant-numeric:tabular-nums}
.analysis-jumps{position:sticky;top:0;z-index:4;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;padding:6px 0;background:var(--paper,#f8f8f1);margin-bottom:10px}.analysis-jumps button{background:var(--soft,#eff3e7);font-size:12px;font-weight:600;overflow-wrap:anywhere}
.analysis-section{background:var(--panel,#fffefa);border:1px solid var(--line,#dfe6d8);border-radius:24px;padding:20px;margin:15px 0;scroll-margin-top:65px;min-width:0}
.analysis-purpose{display:flex;gap:4px;padding:4px;margin:8px 0 18px;border-radius:14px;background:var(--soft,#f0f3eb)}.analysis-purpose button{flex:1;min-width:0;font-size:13px}
.analysis-pfc-split{display:flex;height:12px;overflow:hidden;border-radius:8px;background:#e9eee4}.analysis-pfc-split>span{background:var(--nutrient)}
.analysis-pfc-labels{display:flex;justify-content:space-between;font-size:12px;margin:7px 0 20px}.analysis-pfc-labels span{color:var(--nutrient-text)}
#analysis [data-nutrient=p]{--nutrient:#638673;--nutrient-text:#4c6a59;--nutrient-bg:#edf4ec}#analysis [data-nutrient=f]{--nutrient:#aa9c8a;--nutrient-text:#756959;--nutrient-bg:#f4f0e9}#analysis [data-nutrient=c]{--nutrient:#91afc6;--nutrient-text:#4f7089;--nutrient-bg:#edf3f8}#analysis [data-nutrient=salt]{--nutrient:#be9169;--nutrient-text:#796249;--nutrient-bg:#f8f2e9}#analysis [data-nutrient=k]{--nutrient:#849a79;--nutrient-text:#58694f;--nutrient-bg:#f0f4e9}
.analysis-nutrient{margin:18px 0;min-width:0}.analysis-nutrient>div{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.analysis-nutrient>div>span{color:var(--nutrient-text);font-weight:650}.analysis-nutrient b{font-size:23px;white-space:nowrap;font-variant-numeric:tabular-nums}.analysis-nutrient small{display:block;font-size:12px;color:var(--muted,#5c665e)}
.analysis-meter{display:block;width:100%;height:9px;background:var(--nutrient-bg);border-radius:7px;overflow:hidden;margin:8px 0 5px}.analysis-meter i{display:block;height:100%;background:var(--nutrient);border-radius:7px;transform-origin:left;animation:analysis-meter 450ms cubic-bezier(.2,.75,.25,1) both}
.analysis-minerals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border-top:1px solid var(--line,#dfe6d8);margin-top:22px;padding-top:16px}.analysis-minerals .analysis-nutrient{padding:12px;background:var(--nutrient-bg);border-radius:15px;margin:0}.analysis-minerals .analysis-nutrient>div{display:block}.analysis-minerals b{display:block;font-size:23px}
.analysis-tip{background:var(--soft,#f1f5e9);padding:12px 14px;border-radius:15px;font-size:13px;line-height:1.8;margin:14px 0 0;color:inherit}
.meal-distribution{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:18px 0 10px}.meal-distribution>div{display:flex;flex-direction:column;align-items:center;min-width:0;text-align:center}.meal-distribution b{font-size:12px;white-space:nowrap}.meal-distribution small{font-size:12px;line-height:1.5;margin-top:8px}.distribution-track{display:flex;align-items:flex-end;height:96px;width:37px;background:var(--soft,#f1f5eb);border-radius:9px;overflow:hidden;margin-top:8px}.distribution-track i{width:100%;border-radius:8px 8px 0 0;background:#8faa78;transform-origin:bottom;animation:analysis-column 450ms ease-out both}
.time-bins{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:5px;margin:24px 0}.time-bins>div{text-align:center;display:flex;flex-direction:column;gap:8px}.time-bins b{font-size:13px}.time-bins span{height:13px;background:var(--soft,#edf2e6);border-radius:5px}.time-bins .has-meal{background:#78966d}.time-bins small{font-size:10px;white-space:nowrap}
.analysis-count{display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding:9px 0;font-size:13px}.analysis-count b{white-space:nowrap}.analysis-method{margin:24px 0;padding:16px 0;border-top:1px solid var(--line,#dfe6d8)}.analysis-method summary{cursor:pointer;font-weight:650}.analysis-method p{font-size:13px;line-height:1.8}
.analysis-close-sheet{font-family:inherit;padding:22px!important;max-height:65dvh!important;width:min(460px,calc(100vw - 16px));box-sizing:border-box}.analysis-close-sheet .sheet-grab{margin:0 auto 15px}.analysis-close-sheet h2{font-size:18px;margin:0}.analysis-close-sheet p{font-size:13px;line-height:1.7;margin:12px 0}.close-review-top{display:flex;align-items:center;gap:10px}.close-review-top h2{flex:1}.close-review-check{display:grid;place-items:center;flex:none;width:38px;height:38px;background:var(--soft,#e3edcf);color:var(--brand,#355447);border-radius:50%;font-size:24px}.close-review-links{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:10px}.analysis-close-sheet .primary{width:100%;min-height:48px;margin-top:8px}
#analysis button:focus-visible,.analysis-close-sheet button:focus-visible{outline:2px solid var(--brand,#355447);outline-offset:3px}
@keyframes analysis-meter{from{transform:scaleX(0)}to{transform:scaleX(1)}}@keyframes analysis-column{from{transform:scaleY(0)}to{transform:scaleY(1)}}
@media(max-width:350px){.analysis-section,.analysis-hero{padding:16px;border-radius:20px}.analysis-heading{display:block}.analysis-heading>small{max-width:none}.analysis-jumps button{font-size:11px;padding:5px 3px}.analysis-nutrient b{font-size:21px}.analysis-minerals{gap:8px}.analysis-minerals .analysis-nutrient{padding:10px}.analysis-minerals b{font-size:20px}.meal-distribution b{font-size:11px}.time-bins{gap:3px}.time-bins small{font-size:9px}.analysis-close-sheet{padding:18px!important}.close-review-top .analysis-photos{display:none}}
@media(prefers-reduced-motion:reduce){#analysis *,#analysis *::before,#analysis *::after,.analysis-close-sheet *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Evidence-led encouragement and one optional next step; keep current font and palette. */
.analysis-advice-context small{display:block;font-size:12px;color:var(--muted,#5c665e);line-height:1.6}.analysis-advice-context p{font-size:13px;margin:7px 0;line-height:1.7}
.analysis-next-focus{padding:14px 16px;margin:14px 0 6px;background:var(--paper,#f8f8f2);border-radius:16px;border:1px solid var(--line,#d8e3cf)}.analysis-next-focus h3{font-size:14px;color:var(--brand,#355447);margin:0 0 8px}.analysis-next-focus>b{display:block;font-size:14px;line-height:1.7;font-variant-numeric:tabular-nums}.analysis-next-focus p{margin:8px 0;font-size:14px;line-height:1.8}.analysis-next-focus small{display:block;font-size:12px;color:var(--muted,#5c665e);line-height:1.7}
.analysis-period-energy{margin-top:10px;padding:16px;background:var(--paper,#fffefa);border:1px solid var(--line,#d8e3cf);border-radius:18px}.analysis-energy-heading h3{font:inherit;font-weight:700;margin:0 0 3px}.analysis-period-energy small{font-size:12px;color:var(--muted,#5c665e);line-height:1.6}.analysis-energy-heading{margin-bottom:14px}.analysis-energy-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 12px}.analysis-energy-pair>div{min-width:0;display:grid;grid-template-rows:subgrid;grid-row:span 2}.analysis-energy-pair small,.analysis-energy-pair b{display:block}.analysis-energy-pair small{text-wrap:balance}.analysis-energy-pair b{font-size:clamp(17px,4.4vw,26px);line-height:1.8;font-variant-numeric:tabular-nums;white-space:nowrap}.analysis-energy-result{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px -6px 0;padding:12px;border-radius:13px;background:var(--soft,#e9efdf);color:var(--brand,#355447)}.analysis-energy-result[data-balance-tone=surplus]{background:var(--brand,#355447);color:var(--paper,#fffefa)}.analysis-energy-result[data-balance-tone=surplus] small{color:inherit}.analysis-energy-result small,.analysis-energy-result b{display:block}.analysis-energy-result b{font-size:12px}.analysis-energy-result strong{font-size:clamp(21px,5vw,30px);font-variant-numeric:tabular-nums;white-space:nowrap}.analysis-energy-equivalent{display:grid;grid-template-columns:1fr auto;gap:3px 8px;padding-top:14px;font-size:12px;align-items:baseline}.analysis-energy-equivalent>b{font-size:15px}.analysis-energy-equivalent small{grid-column:1/-1}.analysis-observed{margin-top:10px}.analysis-observed small{display:block}.analysis-energy-method{margin-top:12px;padding-top:10px;border-top:1px solid var(--line,#d8e3cf)}.analysis-energy-method summary{font-size:12px;cursor:pointer;min-height:32px;line-height:1.6;padding-top:4px}.analysis-energy-method>small{display:block}.analysis-energy-method a{font-size:12px}.analysis-period-energy+.review-energy{border-top:0;margin-top:0;padding-top:12px}.analysis-period-energy+.review-energy strong{font-size:clamp(18px,4vw,24px)}.analysis-recognition{font-weight:600}
@media(max-width:350px){.analysis-period-energy{padding:12px}.analysis-energy-result{display:block}.analysis-energy-result strong{display:block;text-align:right}.analysis-energy-equivalent{display:block}.analysis-energy-equivalent>b,.analysis-energy-equivalent>small{display:block}}
