/* Adi Begleiter. Ruhige Tageskarte: petrol header band, warm ivory page, apricot meal action, blue and lilac support surfaces.
   Order: tokens, base, shell, shared components, views, dialogs, one tablet block, one mobile block, small screens, print. */
:root{--bg:#f6f3ec;--surface:#fff;--ink:#14283b;--dark:#14283b;--muted:#46586b;--line:#ccd6db;--line-strong:#7d97a8;--green:#0b5f66;--petrol:#0b5f66;--petrol-deep:#084a50;--petrol-soft:#dcefeb;--on-petrol:#d8eeeb;--sage:#dcefeb;--apricot:#f7d2ae;--apricot-line:#e2a66f;--water:#e3eef8;--water-ink:#1f5f99;--lilac:#ece6f7;--lilac-ink:#4a3a78;--orange:#9a4b08;--cream:#fff1cb;--white:#fff;--radius:20px;--shadow:0 1px 2px #14283b14,0 4px 14px #14283b0a;--shadow-lg:0 8px 24px #14283b1f;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:18px;line-height:1.55;font-synthesis:none}
*{box-sizing:border-box}
body{margin:0;font-size:18px;font-weight:500;background:var(--bg)}
button,input,select,textarea{font:inherit;touch-action:manipulation}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;border:0}
button:disabled{cursor:default;opacity:.55}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #7c3aed;outline-offset:4px}
:is(.page-heading,.team-context) :focus-visible{outline-color:#fff}
a{color:var(--petrol)}
svg{width:24px;height:24px;flex:none}
h1,h2,h3,p{margin:0}
h1{font-size:36px;line-height:1.2;letter-spacing:-.8px}
h2{font-size:24px;line-height:1.3;letter-spacing:-.3px}
h3{font-size:20px;line-height:1.4}
h1,h2,h3,strong{font-weight:700}
.muted{color:var(--muted)}
.eyebrow{text-transform:uppercase;font-weight:700;color:var(--muted);font-size:14px;letter-spacing:1.4px}
.small,small{font-size:14px}
.skip-link{position:fixed;left:16px;top:-100px;z-index:50;background:#fff;padding:14px}
.skip-link:focus{top:10px}
[hidden]{display:none!important}
.print-only{display:none}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Shell */
.shell{display:grid;grid-template-columns:244px minmax(0,1fr);min-height:100vh}
.sidebar{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;padding:32px 20px 24px;border-right:1px solid var(--line);background:var(--surface)}
.brand{display:flex;gap:10px;align-items:center;margin:0 10px 44px}
.brand-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:14px 14px 14px 4px;background:var(--petrol);color:#fff}
.brand-icon svg{width:26px;height:26px}
.brand strong{font-size:25px;letter-spacing:-1px;line-height:1}
.brand span{display:block;margin-top:6px;font-size:14px;letter-spacing:1.4px}
.nav{display:flex;flex-direction:column;gap:8px}
.nav button{display:flex;align-items:center;gap:14px;min-height:56px;padding:14px 16px;border-radius:14px;background:none;color:var(--muted);text-align:left;font-size:17px;font-weight:700}
.nav button.active{background:var(--petrol);color:#fff}
.nav button:hover:not(.active){background:var(--petrol-soft)}
.sidebar-footer{margin-top:auto;padding:24px 10px 0}
.sidebar-note{border-top:1px solid var(--line);padding-top:20px;color:var(--muted);font-size:16px}
.sidebar-note strong{display:block;color:var(--ink);margin-bottom:6px}
.profile{display:flex;align-items:center;gap:11px;margin-top:24px;font-size:16px}
.avatar{width:42px;height:42px;display:grid;place-items:center;flex:none;border-radius:50%;background:var(--petrol-soft);color:var(--petrol);font-weight:700;font-size:14px}
.profile small{display:block;color:var(--muted)}
.workspace{width:100%;max-width:1500px;margin:auto;padding:0 40px 36px}
.topbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px 18px;min-height:76px;padding:14px 0}
.breadcrumb{display:flex;align-items:center;gap:8px;color:var(--petrol);font-size:17px;font-weight:700}
.breadcrumb svg{width:22px;height:22px}
.demo-label{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;flex:1 1 18rem;min-width:0;margin:0;color:var(--muted);font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.demo-pill{display:inline-flex;align-items:center;min-height:30px;padding:3px 12px;border-radius:999px;background:var(--apricot);color:var(--ink);font-size:15px}
.topbar-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;min-width:0;margin-left:auto}
.record-scope{max-width:520px;color:var(--muted);font-size:16px;line-height:1.5;min-width:0;overflow-wrap:anywhere}
.roles{display:inline-flex;flex-wrap:wrap;flex-shrink:0;max-width:100%;align-items:center;gap:3px;padding:4px;border-radius:14px;background:var(--petrol-soft)}
.roles button{min-height:48px;padding:9px 14px;border-radius:10px;background:transparent;color:var(--muted);font-size:16px;font-weight:700;white-space:normal}
.roles .active{background:var(--petrol);color:#fff}
.page-end{margin-top:28px}
.demo-options{min-width:0;max-width:100%}
.demo-person{color:var(--ink);font-weight:700}
.demo-note{margin:0 0 12px;color:var(--muted);font-size:16px;line-height:1.5;overflow-wrap:anywhere}
.demo-options>summary{display:flex;align-items:center;min-height:48px;padding:10px 16px;border:2px solid var(--line);border-radius:14px;background:var(--surface);color:var(--petrol);font-size:16px;font-weight:700;cursor:pointer}
.demo-options[open]>summary{margin-bottom:12px}
.demo-options .topbar-actions{justify-content:flex-start;margin:0;padding:16px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.demo-person-control{min-width:145px}
.demo-person-control select{min-height:48px;padding:6px 10px}
.page-footer{display:flex;flex-wrap:wrap;justify-content:space-between;gap:15px;margin-top:30px;color:var(--muted);font-size:14px}
.page-footer span{display:flex;gap:6px;align-items:center;min-width:0;overflow-wrap:anywhere}
.page-footer svg{width:14px;height:14px;flex-shrink:0}
.page-footer .demo-revision{flex-basis:100%;font-size:13px}
.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);z-index:60;display:none;align-items:center;gap:16px;max-width:calc(100vw - 32px);padding:14px 20px;border-radius:16px;background:var(--ink);color:#fff;font-size:18px;box-shadow:var(--shadow-lg)}
.toast.visible{display:flex}
.toast>span{min-width:0;overflow-wrap:anywhere}
.toast button{min-height:44px;padding:0;background:transparent;color:#fff;text-decoration:underline;font-size:18px}

/* Header band shared by every patient page and the team header */
.page-heading,.team-context{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:14px 20px;margin-bottom:24px;padding:24px 28px;border-radius:28px;background:radial-gradient(circle at 100% 0,#16747b 0 110px,transparent 111px),var(--petrol);color:#fff}
.page-heading>div,.panel-header>div,.team-context-title{min-width:0;overflow-wrap:anywhere}
.page-heading h1{max-width:700px}
.greeting{margin-bottom:4px;color:var(--muted);font-size:17px;min-width:0;overflow-wrap:anywhere}
:is(.page-heading,.team-context) .greeting{color:var(--on-petrol)}
.date-control{display:flex;align-items:center;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:16px}
.date-control input{width:170px;max-width:100%;min-height:48px;padding:8px 10px;border:2px solid var(--line-strong);border-radius:12px;background:#fff;color:var(--ink);font-size:17px}
:is(.page-heading,.team-context) .date-control{color:#fff;font-weight:700}
:is(.page-heading,.team-context) .date-control input{border-color:#fff}

/* Shared components */
.panel{padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.panel-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-bottom:22px}
.panel-header h2{font-size:23px}
.panel-header p{margin-top:5px;color:var(--muted);font-size:16px}
.button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:0;max-width:100%;min-height:52px;padding:11px 18px;border-radius:14px;background:var(--petrol);color:#fff;font-size:18px;font-weight:700;line-height:1.4;white-space:normal;overflow-wrap:normal;word-break:normal}
.button:hover{background:var(--petrol-deep)}
.button.outline{border:2px solid var(--line-strong);background:#fff}
.button.secondary{background:#d1f2eb}
.button.outline:hover,.button.secondary:hover{background:var(--petrol-soft)}
.button.wide{width:100%}
.button.orange{background:var(--orange)}
.button.secondary,.button.outline,.button.outline:hover,.button.secondary:hover,.text-button,.entry-actions .edit-entry,.meal-simple-hint,.candidate-amount,.candidate-estimate-hint,.candidate-source summary,.preset,.dashboard-disclosure>summary{color:var(--petrol)}
.text-button{display:inline-flex;align-items:center;gap:6px;min-height:52px;padding:8px 0;background:transparent;font-size:18px;font-weight:700;line-height:1.4;white-space:normal}
.text-button svg{width:18px;height:18px}
.icon-button{display:inline-grid;place-items:center;width:48px;min-width:48px;height:48px;border-radius:12px;background:transparent;color:var(--muted)}
.icon-button:hover{background:var(--petrol-soft)}
.icon-button svg{width:20px;height:20px}
.icon-box{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:var(--lilac);color:var(--lilac-ink)}
.icon-box svg{width:21px;height:21px}
.icon-box.blue{background:var(--water);color:var(--water-ink)}
.icon-box.orange{background:#fbe6d2;color:#854d0e}
.notice{margin:21px 0;padding:16px 19px;border:1px solid #e0b464;border-radius:14px;background:var(--cream);color:#704315;font-size:16px}
.tag{display:inline-flex;align-items:center;gap:5px;margin-top:7px;padding:3px 9px;border-radius:8px;background:var(--petrol-soft);color:var(--ink);font-size:16px}
.tag.neutral{background:#f0efe9;color:var(--muted)}
.empty{text-align:center;padding:35px 15px;color:var(--muted)}
.empty .icon-box{margin:0 auto 14px}
.empty p{max-width:450px;margin:9px auto 18px}
.chart-note{margin-top:16px;color:var(--muted);font-size:16px;line-height:1.55}
.progress-switch,.week-metric-select{display:flex;flex-wrap:wrap;gap:5px;width:fit-content;max-width:100%;margin:0 0 23px;padding:5px;border-radius:16px;background:var(--petrol-soft)}
.progress-switch button,.week-metric-select button{min-height:52px;padding:10px 20px;border-radius:12px;background:transparent;color:var(--muted);font-size:18px;font-weight:700;line-height:1.4;white-space:normal}
.progress-switch button[aria-pressed=true],.week-metric-select button[aria-pressed=true],.progress-switch button.active,.week-metric-select button.active{background:var(--petrol);color:#fff}
.progress-switch button:hover:not([aria-pressed=true]),.week-metric-select button:hover:not([aria-pressed=true]){background:#fff}

/* Start */
.view-today,.view-more{max-width:760px;margin:0 auto}
.day-band{margin-bottom:20px;padding:24px 28px 22px;border-radius:28px;background:radial-gradient(circle at 100% 0,#16747b 0 120px,transparent 121px),var(--petrol);color:#fff;box-shadow:var(--shadow-lg)}
.day-band .page-heading{margin:0 0 18px;padding:0;border-radius:0;background:none}
.day-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,5em),1fr));gap:8px;margin:0}
.day-facts>div{min-width:0;padding:12px 14px;border-radius:16px;background:var(--petrol-deep)}
.day-facts dt{color:var(--on-petrol);font-size:16px;font-weight:600}
.day-facts dd{margin:2px 0 0;font-size:30px;font-weight:700;line-height:1.2}
.day-facts dd small{font-size:16px;font-weight:600}
.fact-open{display:block;font-size:18px;line-height:1.3}
.day-band-note{margin-top:14px;color:var(--on-petrol);font-size:16px}
.day-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,8.5em),1fr));gap:12px;margin-bottom:20px}
.day-action{display:flex;align-items:center;gap:14px;min-width:0;min-height:80px;padding:14px 16px;border:2px solid transparent;border-radius:20px;color:var(--ink);text-align:left;box-shadow:var(--shadow)}
.day-action:hover{border-color:var(--petrol)}
.day-action>svg{width:44px;height:44px;padding:10px;border-radius:14px;background:#fff}
.day-action>span{display:flex;flex-direction:column;min-width:0}
.day-action strong{font-size:20px;line-height:1.25}
.day-action small{margin-top:3px;color:var(--muted);font-size:16px;line-height:1.4}
.day-action-water,.day-action-values{flex-direction:column;align-items:flex-start;gap:8px;padding:12px 14px}
.day-action-water>svg,.day-action-values>svg{width:40px;height:40px;padding:9px;border-radius:12px}
.day-action-meal{grid-column:1/-1;min-height:104px;border-color:var(--apricot-line);background:var(--apricot)}
.day-action-meal>svg{width:54px;height:54px;padding:12px;color:#8a4a12}
.day-action-meal strong{font-size:24px}
.day-action-water{background:var(--water)}
.day-action-water>svg{color:var(--water-ink)}
.day-action-values{background:var(--lilac)}
.day-action-values>svg{color:var(--lilac-ink)}
.day-latest{margin-bottom:20px}
.day-latest .panel-header{margin-bottom:10px}
.day-latest .panel-header>.small{color:var(--muted)}
.day-latest-list{display:grid;margin:0 0 18px;padding:0;list-style:none}
.day-latest-list li{display:grid;grid-template-columns:auto 40px minmax(0,1fr);align-items:center;gap:12px;min-height:56px;padding:6px 0;border-bottom:1px solid var(--line);font-weight:600}
.day-latest-list li>.day-latest-time{grid-column:1;grid-row:1}
.day-latest-list li>.timeline-icon{grid-column:2;grid-row:1}
.day-latest-list li>.day-latest-label{grid-column:3;grid-row:1;min-width:0;overflow-wrap:anywhere}
.day-latest-time{color:var(--muted);font-size:16px;font-variant-numeric:tabular-nums;white-space:nowrap}
.day-latest-empty{margin-bottom:18px;color:var(--muted)}
.day-latest-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10em),1fr));gap:10px}

/* Fat points card (Start, progress and meal dialog) */
.fat-points-card,.meal-pie-card,.progress-energy{padding:24px;border:1px solid var(--line);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow);min-width:0}
.fat-points-card h2,.meal-pie-card h2,.progress-energy h2{font-size:20px;line-height:1.35}
.fat-points-card .panel-header{align-items:baseline;gap:5px 12px;margin-bottom:12px}
.fat-points-card .panel-header>.small{color:var(--muted);font-size:13px}
.fat-points-card>p,.meal-pie-card>p{margin-top:9px;color:var(--muted);font-size:15px;line-height:1.5}
.fat-point-total{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 10px;margin:13px 0 10px;color:var(--muted);font-size:17px}
.fat-point-total strong{color:var(--ink);font-size:44px;line-height:1.15;letter-spacing:-1.3px}
.fat-dots{display:block;width:100%;max-width:390px;height:auto;margin:14px auto 10px;overflow:visible}
.fat-dot-track{fill:#eef2f4;stroke:#bccad3;stroke-width:1}
.fat-dot-fill.band-green{fill:#21916b}
.fat-dot-fill.band-blue{fill:#3186c9}
.fat-dot-fill.band-pink{fill:#d968a8}
.fat-dot-fill.band-red{fill:#ce414d}
.fat-dot-fill.band-black{fill:#24313e}
.fat-legend{display:flex;flex-wrap:wrap;gap:5px 11px;margin-top:10px;padding-top:13px;border-top:1px solid #e2e8eb;color:var(--muted);font-size:14px;line-height:1.6}
.fat-legend>span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.fat-legend>span::before{content:'';display:inline-block;width:8px;height:8px;flex:none;border-radius:50%;background:currentColor}
.fat-legend .band-green{color:#18714f}
.fat-legend .band-blue{color:#196baf}
.fat-legend .band-pink{color:#aa3376}
.fat-legend .band-red{color:#b32b3b}
.fat-legend .band-black{color:#24313e}

/* Diary */
.view-diary,.view-balance{max-width:960px;margin:0 auto}
.diary-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,9em),1fr));gap:10px;margin-bottom:24px}
.diary-actions .button{min-height:56px;padding:11px 12px;border-radius:16px;font-size:17px}
.diary-actions .food-action{grid-column:1/-1;border:2px solid var(--apricot-line);background:var(--apricot);color:var(--ink);font-size:20px}
.diary-actions .water-action{border:2px solid #a9c7e2;background:var(--water);color:var(--water-ink)}
.diary-actions .movement-action{border:2px solid #cdbfe8;background:var(--lilac);color:var(--lilac-ink)}
.diary-actions .button:hover{border-color:var(--petrol)}
.diary-panel{background:transparent;border:0;box-shadow:none;padding:0}
.diary-panel .panel-header{margin-bottom:16px}
.entry-count{display:inline-flex;justify-content:center;align-items:center;min-width:30px;height:30px;margin-left:8px;padding:0 8px;border-radius:999px;background:var(--petrol);color:#fff;font-size:16px;vertical-align:middle}
.timeline{display:flex;flex-direction:column;gap:12px}
.timeline-item{display:grid;grid-template-columns:40px minmax(0,1fr);gap:8px 12px;align-items:center;padding:16px 18px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow)}
.time{grid-column:2;grid-row:1;color:var(--ink);font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
.timeline-icon{grid-column:1;grid-row:1;position:relative;z-index:1;width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:var(--apricot);color:#8a4a12}
.timeline-icon svg{width:20px;height:20px}
.timeline-icon.drink{background:var(--water);color:var(--water-ink)}
.timeline-icon.movement,.timeline-icon.steps{background:var(--petrol-soft);color:var(--petrol)}
.timeline-icon.reflection,.timeline-icon.measurement,.timeline-icon.vitals{background:var(--lilac);color:var(--lilac-ink)}
.timeline-content{grid-column:1/-1;min-width:0}
.timeline-content h3{margin:2px 0 3px;font-size:20px;line-height:1.5}
.timeline-content p{color:var(--muted);font-size:18px;line-height:1.6}
.timeline-content h3,.timeline-content p{min-width:0;overflow-wrap:anywhere}
.timeline-content .entry-note{margin-top:6px;padding-left:10px;border-left:3px solid #9cc4cc;color:var(--ink)}
.timeline-content dl{margin:12px 0;overflow-wrap:anywhere}
.timeline-content dt{font-weight:600}
.timeline-content dd{margin:4px 0 12px}
.timeline-content details>summary{min-height:44px;padding:9px 0;color:var(--petrol);font-size:16px;cursor:pointer}
.entry-row{display:block}
.entry-actions{display:flex;flex-wrap:wrap;align-items:stretch;gap:12px 24px;margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.entry-actions:not(:has(button:not([hidden]))){display:none}
.entry-actions .entry-action{flex:0 1 auto;width:auto;min-width:0;max-width:100%;min-height:48px;padding:10px 14px;gap:8px;font-size:16px;overflow-wrap:normal;word-break:normal}
.entry-action svg{width:20px;height:20px}
.entry-actions .entry-action.delete-entry{border-color:#c4b0b4;background:#fff;color:#663d43}
.entry-actions .entry-action.delete-entry:hover{border-color:#9b4a52;background:#fff1f2;color:#8b2f3b}
.entry-estimate-source{margin-top:7px;color:var(--muted)}
.entry-estimate-source summary{min-height:44px;padding:7px 0;color:var(--petrol);font-size:15px;cursor:pointer}
.entry-estimate-source p{margin:5px 0;font-size:14px;overflow-wrap:anywhere}
.timeline-foot{display:flex;gap:7px;align-items:flex-start;margin-top:14px;padding-top:15px;border-top:1px dashed var(--line);color:var(--muted);font-size:16px}
.timeline-foot svg{width:16px;height:16px;margin-top:3px}

/* Progress */
.view-progress{max-width:1060px;margin:0 auto}
.progress-top{display:grid;grid-template-columns:minmax(300px,.9fr) minmax(0,1.2fr);gap:22px;align-items:start;margin-bottom:22px}
.progress-top>*,.progress-metrics>*,.meal-workspace>*{min-width:0}
.progress-energy .resting-detail{margin-top:17px;padding:14px 0 0;border-top:1px solid var(--line);color:var(--muted);font-size:15px;line-height:1.6}
.progress-energy .resting-detail strong{color:var(--ink);font-weight:600}
.progress-energy .energy-numbers{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.progress-energy .energy-numbers>div{display:flex;flex-direction:column;gap:6px;min-width:0}
.progress-energy .energy-numbers>div+div{border-left:1px solid var(--line);padding-left:14px}
.progress-energy .energy-numbers strong{display:flex;align-items:baseline;flex-wrap:wrap;gap:0 5px;font-size:28px;white-space:normal}
.progress-energy>p:not(.resting-detail){margin-top:13px;font-size:15px;line-height:1.6}
.progress-energy>.text-button{margin-top:8px;font-size:16px;text-align:left}
.progress-difference{margin-top:19px;padding:14px 0 0;border-top:1px solid var(--line)}
.progress-difference span,.progress-difference strong{display:block}
.progress-difference span{color:var(--muted);font-size:14px;line-height:1.5}
.progress-difference strong{margin-top:5px;color:var(--ink);font-size:22px;line-height:1.3}
.progress-target{margin:18px 0}
.progress-target #today-remaining{display:block;margin:4px 0;color:var(--ink);font-size:36px;line-height:1.2}
.progress-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13em),1fr));gap:18px;margin:0 0 24px}
.progress-metric{display:flex;flex-direction:column;align-items:stretch;padding:22px}
.progress-metric>svg{order:0;width:48px;height:48px;margin-bottom:12px;padding:11px;border-radius:14px;background:var(--water);color:var(--water-ink)}
.progress-metric:nth-child(2)>svg{background:var(--petrol-soft);color:var(--petrol)}
.progress-metric:nth-child(3)>svg{background:var(--lilac);color:var(--lilac-ink)}
.progress-metric h2,.progress-metric h3{order:1;margin-bottom:6px;font-size:20px}
.progress-metric>strong{order:2;color:var(--ink);font-size:36px;line-height:1.25;letter-spacing:-.8px}
.progress-metric strong small{font-size:17px;font-weight:500;letter-spacing:0}
.progress-metric p{order:3;margin:8px 0 4px;color:var(--muted);font-size:16px;line-height:1.55}
.progress-metric .button,.progress-metric .text-button{order:4;width:100%;max-width:100%;margin:14px 0 0;padding:12px;flex-wrap:wrap;justify-content:center;font-size:17px;overflow-wrap:normal;word-break:normal}
.progress-metric .button,.progress-metric .button.outline{border:0;background:var(--petrol);color:#fff}
.progress-metric .button:hover{background:var(--petrol-deep);color:#fff}
.progress-metric>.text-button{order:5;margin-top:6px;padding:12px 0}
.reflection-history{margin-top:24px}
.reflection-history details{border-top:1px solid var(--line)}
.reflection-history summary{min-height:54px;padding:15px 0;color:var(--ink);font-size:17px;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
.reflection-history dl{display:grid;gap:6px;margin:0 0 20px;padding:15px 18px;border-radius:14px;background:#f2f6f8}
.reflection-history dt{margin-top:9px;color:var(--muted);font-size:14px}
.reflection-history dt:first-child{margin-top:0}
.reflection-history dd{margin:0;color:var(--ink);font-size:17px;overflow-wrap:anywhere}
.vitals-summary{margin-top:24px}
.vitals-summary .panel-header{margin-bottom:18px}
.vitals-summary .panel-header p,.vitals-summary>p{color:var(--muted);font-size:16px;line-height:1.5}
.vitals-values{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,11em),1fr));gap:16px}
.vitals-values>div{min-width:0;padding:16px 18px;border-radius:14px;background:var(--lilac)}
.vitals-values span{display:block;margin-bottom:5px;color:var(--muted);font-size:16px}
.vitals-values strong{font-size:26px;line-height:1.4;overflow-wrap:anywhere}
.vitals-values small{color:var(--muted);font-size:16px;font-weight:400}

/* Week, chart and tables */
.week-control{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:14px 0 25px}
.week-control strong{font-size:18px;font-weight:600}
.week-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px;margin-bottom:28px}
.day-button{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0;min-height:81px;padding:9px 4px;border:1px solid var(--line);border-radius:14px;background:#fff;color:var(--muted);font-size:14px}
.day-button strong{color:var(--ink);font-size:22px;font-weight:600}
.day-button.active{border-color:var(--petrol);background:var(--petrol);color:#fff}
.day-button.active strong{color:#fff}
.day-dot{width:6px;height:6px;margin-top:3px;border-radius:50%;background:#5f8f7a}
.day-dot.gap{border:1px solid #8c9a85;background:transparent}
.chart{display:flex;align-items:stretch;gap:12px;height:210px;padding:8px 10px 0}
.chart-col{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;color:var(--muted);font-size:16px}
.chart-bar-space{width:100%;height:140px;display:flex;align-items:flex-end;justify-content:center;border-bottom:1px solid var(--line)}
.chart-bar{width:35px;max-width:90%;min-height:4px;border-radius:8px 8px 0 0;background:#a9c7cb}
.chart-col.selected .chart-bar{background:var(--petrol)}
.chart-missing{align-self:center;color:var(--muted);font-size:20px}
.chart-value{min-height:26px;color:var(--ink);font-size:16px}
.table-wrap{overflow-x:auto}
.week-table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:18px}
.week-table th{padding:13px 12px;border-bottom:1px solid var(--line);color:var(--muted);font-size:14px;font-weight:600;text-align:left}
.week-table td{padding:16px 12px;border-bottom:1px solid #e3e9ec}
.week-table tr:last-child td{border-bottom:0}
.week-table .selected-row td{background:var(--petrol-soft)}
.observation{margin-top:19px;padding:18px 19px;border-radius:14px;background:var(--petrol-soft);color:var(--petrol-deep);font-size:16px}
.observation strong{display:block;margin-bottom:7px}

/* More, learn and goal */
.more-menu{display:grid;gap:12px}
.more-item{display:flex;align-items:center;gap:18px;min-height:100px;padding:22px;border:1px solid var(--line);border-radius:20px;background:#fff;color:var(--ink);text-align:left;box-shadow:var(--shadow)}
.more-item:hover{border-color:var(--petrol);background:#f4faf9}
.more-item>span:nth-child(2){flex:1;min-width:0}
.more-item strong,.more-item small{display:block}
.more-item strong{font-size:21px}
.more-item small{margin-top:3px;color:var(--muted);font-size:16px;line-height:1.4}
.more-symbol{width:48px;height:48px;display:grid;place-items:center;flex:none;border-radius:14px;background:var(--apricot);color:#8a4a12}
.more-item:nth-child(2) .more-symbol{background:var(--water);color:var(--water-ink)}
.more-item:nth-child(3) .more-symbol{background:var(--petrol-soft);color:var(--petrol)}
.more-item:nth-child(4) .more-symbol{background:var(--lilac);color:var(--lilac-ink)}
.more-item>svg{width:21px;height:21px;color:var(--petrol)}
.back-to-more{margin-bottom:18px;font-size:17px}
.back-to-more>svg{transform:rotate(180deg)}
.page-intro{margin-bottom:29px}
.page-intro h1{margin-bottom:12px;color:var(--petrol-deep);font-size:37px}
.page-intro p{max-width:690px;color:var(--muted);font-size:18px}
.learning-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:20px;margin-bottom:27px}
.learning-list{display:flex;flex-direction:column;gap:16px}
.lesson{overflow:hidden;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:var(--shadow)}
.lesson summary{display:flex;align-items:center;gap:20px;min-height:64px;padding:23px 26px;list-style:none;cursor:pointer}
.lesson summary::-webkit-details-marker{display:none}
.lesson-number{width:48px;height:48px;display:grid;place-items:center;flex:none;border-radius:15px;background:var(--petrol-soft);color:var(--petrol);font-size:18px}
.lesson.done .lesson-number{background:var(--petrol);color:#fff}
.lesson-title{flex:1}
.lesson-title strong{display:block;font-size:18px}
.lesson-title span{color:var(--muted);font-size:16px}
.lesson-body{padding:0 26px 25px 94px}
.lesson-body p{margin-bottom:16px;color:var(--muted);font-size:18px;line-height:1.75}
.practice{margin:19px 0;padding:19px;border-radius:14px;background:var(--cream);color:#704315;font-size:16px}
.practice strong{display:block;margin-bottom:6px}
.goal-page{max-width:870px}
.goal-feature{margin:25px 0;padding:35px;border-radius:28px;background:var(--petrol-soft)}
.goal-feature h2{max-width:600px;margin:13px 0 17px;font-size:30px;line-height:1.45}
.goal-feature p{color:var(--petrol-deep)}
.goal-details{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,15em),1fr));gap:20px;margin:25px 0}
.goal-details .panel h3{margin-bottom:11px}
.goal-details p{color:var(--muted);font-size:17px}
.reflection-card{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:20px}
.reflection-card p{margin-top:6px;color:var(--muted);font-size:18px}

/* Balance (energy card, donut, distribution) */
.energy-card{--energy-color:#3e856b;margin:0 0 28px;padding:24px 26px 10px;border:1px solid var(--line);border-radius:24px;background:#fff;box-shadow:var(--shadow)}
.energy-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:15px;margin-bottom:16px}
.energy-heading h2{font-size:25px}
.energy-heading .button{min-height:48px;padding:10px 13px;font-size:16px}
.energy-scope{margin-top:6px;color:var(--muted);font-size:14px}
.energy-range{color:var(--petrol);font-size:17px;line-height:1.5;margin-bottom:10px}
.energy-range:empty{display:none}
.energy-status{color:var(--muted);font-size:15px;line-height:1.5}
.energy-numbers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding:14px 0 0;border-top:1px solid var(--line)}
.energy-numbers>div{display:flex;flex-direction:column;gap:3px}
.energy-numbers>div+div{border-left:1px solid var(--line);padding-left:20px}
.energy-numbers span{color:var(--muted);font-size:16px}
.energy-numbers strong{font-size:26px;line-height:1.4}
.energy-numbers strong small{font-size:16px;font-weight:400}
.energy-numbers small{color:var(--muted);font-size:13px;line-height:1.45}
.energy-plan-note{margin:7px 0 16px;color:var(--muted);font-size:14px}
.budget-overview{display:grid;grid-template-columns:190px minmax(0,1fr);align-items:center;gap:29px;margin:0 0 15px}
.budget-visual{position:relative;width:190px;height:190px}
#energy-donut{display:block;width:100%;height:100%;overflow:visible}
.donut-track,.donut-progress{fill:none;stroke-width:12px}
.donut-track{stroke:#dfe7eb}
.donut-progress{stroke:var(--energy-color);stroke-linecap:butt}
.donut-center{position:absolute;inset:35px 23px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;line-height:1.3;pointer-events:none}
.donut-center>span{color:var(--muted);font-size:16px}
.donut-center>strong{margin:2px 0;color:var(--energy-color);font-size:37px;font-weight:600;letter-spacing:-1.5px}
.budget-copy h3{margin-bottom:9px;font-size:25px;line-height:1.3}
.budget-ring-caption{margin:0 0 14px;color:var(--ink);font-size:16px;line-height:1.45}
.budget-ring-caption::before{content:'';display:inline-block;width:10px;height:10px;margin-right:7px;border-radius:50%;background:var(--energy-color)}
.energy-scale{position:relative;height:28px;margin:25px 9px 7px}
.energy-track{position:absolute;left:0;right:0;top:9px;height:13px;border-radius:20px;background:linear-gradient(90deg,#cde4d6 0%,#3e856b var(--target-position,65%),#417fc6 var(--maintenance-position,83%),#c54b55 100%)}
.energy-mark{position:absolute;top:5px;width:3px;height:22px;border-radius:2px;background:#233f35;transform:translateX(-50%)}
.maintenance-mark{background:#264f8f}
.energy-pointer{position:absolute;top:2px;width:27px;height:27px;border:5px solid #fff;border-radius:50%;background:var(--energy-color);box-shadow:0 0 0 2px var(--energy-color),0 2px 7px #27453625;transform:translateX(-50%)}
.energy-legend{display:flex;flex-wrap:wrap;justify-content:space-between;gap:9px;margin:4px 0 19px;color:var(--muted);font-size:14px}
.energy-legend span{display:flex;align-items:center;gap:7px}
.energy-legend i{display:inline-block;width:9px;height:9px;border-radius:50%}
.legend-target{background:#3e856b}
.legend-balance{background:#417fc6}
.legend-surplus{background:#c54b55}
.maintenance-buffer{margin-top:8px;color:var(--muted);font-size:15px}
.energy-neutral .energy-track,.energy-neutral .donut-track{background:#dce2df;stroke:#dde4df}
.energy-neutral .donut-track{stroke-dasharray:4 2}
.energy-neutral .energy-mark{background:#84908b}
.energy-neutral .energy-legend{opacity:.7}
.energy-card+.notice{margin-bottom:20px}
.compact-metrics{margin:0 0 8px}
.compact-metrics .stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,6em),1fr));gap:10px;margin:0}
.compact-metrics .stat{min-width:0;padding:14px 16px;border-radius:16px;background:var(--lilac);color:var(--lilac-ink)}
.compact-metrics .stat:nth-child(2){background:var(--water);color:var(--water-ink)}
.compact-metrics .stat:nth-child(3){background:#fbe6d2;color:#7a4410}
.compact-metrics .stat-top{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:6px;font-size:16px;font-weight:600}
.compact-metrics .icon-box{width:24px;height:24px;background:transparent;color:inherit}
.compact-metrics .icon-box svg{width:22px;height:22px}
.compact-metrics .stat-value{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 6px;margin:0;font-size:29px;line-height:1.25;letter-spacing:-.5px}
.compact-metrics .stat-value span{font-size:16px;letter-spacing:0}
.compact-metrics .stat-caption{margin-top:5px;font-size:14px;line-height:1.4}
.dashboard-disclosure{margin:0;padding:0;border-top:1px solid var(--line)}
.dashboard-disclosure>summary{display:flex;align-items:center;gap:10px;min-height:49px;padding:11px 1px;font-size:16px;line-height:1.4;list-style:none;cursor:pointer}
.dashboard-disclosure>summary::-webkit-details-marker{display:none}
.dashboard-disclosure>summary::after{content:'+';margin-left:auto;font-size:23px;line-height:1}
.dashboard-disclosure[open]>summary::after{content:'−'}
.dashboard-disclosure>summary svg{width:21px;height:21px}
.dashboard-disclosure .energy-explanation,.distribution-content{padding:0 0 16px}
.dashboard-disclosure p{margin:0 0 10px;font-size:16px;line-height:1.55}
.distribution-summary{font-weight:600}
.distribution-caption{color:var(--muted)}
.distribution-rows{display:grid;gap:15px;padding:5px 0 15px}
.distribution-row{min-width:0}
.distribution-label{display:flex;justify-content:space-between;align-items:baseline;gap:9px 16px;margin-bottom:6px;font-size:16px}
.distribution-label>span:first-child{overflow-wrap:anywhere}
.distribution-kcal{font-weight:600;white-space:nowrap}
.distribution-track{height:10px;border-radius:20px;background:#e3ecef}
.distribution-bar{display:block;height:100%;border-radius:inherit;background:var(--petrol)}
.distribution-unknown{display:block;width:100%;height:100%;border:1px dashed #a6b1a8;border-radius:inherit;font-size:0}
.distribution-water{display:flex;align-items:center;gap:8px;color:var(--muted)}

/* Team (read only) */
.view-team{max-width:960px;margin:0 auto}
.view-team-overview{max-width:820px}
.view-team-history>.panel{margin-bottom:20px}
.team-context{align-items:flex-end;gap:18px}
.team-context h1{font-size:34px;line-height:1.2}
.team-context .greeting{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;margin-bottom:4px}
.team-context .greeting>span{min-width:0;overflow-wrap:anywhere}
.team-role-label{padding:2px 12px;border-radius:999px;background:var(--petrol-deep);color:#fff;font-weight:700}
.team-readonly-note{margin:0 0 10px;color:var(--on-petrol);font-size:16px}
.team-context-controls{display:flex;align-items:flex-end;gap:14px;max-width:100%}
.team-person-control,.team-context .date-control{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0;font-size:16px}
.team-context .team-person-control{color:#fff;font-weight:700}
.team-person-control select,.team-context .date-control input{min-height:48px;padding:9px 11px;border:2px solid #7093a8;border-radius:12px;background:#fff;color:var(--ink);font-size:17px}
.team-context .team-person-control select{border-color:#fff}
.team-person-control select{min-width:145px;max-width:100%}
.team-context .date-control input{width:172px}
.team-overview .panel-header{margin-bottom:15px;gap:12px}
.team-overview .panel-header .text-button{font-size:16px}
.team-intake-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,.7fr);align-items:center;gap:20px;margin-bottom:20px;padding:2px 0 19px;border-bottom:1px solid var(--line)}
.team-intake-summary p{color:var(--muted);font-size:16px}
.team-intake-value{display:flex;align-items:baseline;gap:8px}
.team-intake-value strong{color:var(--ink);font-size:46px;line-height:1.3;letter-spacing:-1px}
.team-intake-value>span{font-size:18px}
.team-meal-summary{padding-left:24px;border-left:1px solid var(--line)}
.team-meal-summary strong,.team-meal-summary span{display:block}
.team-meal-summary strong{font-size:31px;line-height:1.3}
.team-meal-summary span{color:var(--muted);font-size:16px}
.team-summary-note,.team-profile-note{margin-top:14px;color:var(--muted);font-size:16px;line-height:1.55}
.team-profile-note{padding-left:12px;border-left:3px solid #7093a8}
.team-overview-links{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12em),1fr));gap:12px;margin-top:22px}
.team-overview-links .button{min-height:54px;font-size:17px}
.team-overview-links .button>svg:last-child{width:18px;height:18px}
.team-overview .compact-metrics .stat{background:#f2f5f7;color:var(--ink)}
#team-monitor{margin-top:20px}
.team-monitor-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,13em),1fr));gap:1px;margin:16px 0 0;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--line)}
.team-monitor-card{min-width:0;padding:18px 20px;background:#fff;overflow-wrap:anywhere}
.team-monitor-card h3{margin:0 0 6px;color:var(--muted);font-size:17px}
.team-monitor-card strong{display:block;margin:4px 0 6px;color:var(--ink);font-size:22px;line-height:1.3}
.team-monitor-card p,.team-monitor-card small{display:block;color:var(--muted);font-size:16px;line-height:1.5}
.team-day-editor{margin:0 0 25px;padding:24px;border:1px solid var(--line);background:#fff;box-shadow:var(--shadow)}
.team-goal-draft{padding-top:9px;padding-bottom:9px}
.team-goal-draft summary{min-height:48px;padding:10px 0;color:var(--petrol);font-size:17px;font-weight:600;cursor:pointer}
.team-goal-draft>div{padding:9px 0}
.team-goal-draft p,.team-print-goal p{margin-top:10px}

/* Dialogs and forms */
dialog{width:min(650px,calc(100% - 28px));max-height:calc(100dvh - 24px);overflow-y:auto;overscroll-behavior:contain;padding:28px;border:1px solid var(--line);border-radius:28px;background:#fff;color:var(--ink);box-shadow:0 30px 100px #14283b33}
dialog::backdrop{background:#14283b80;backdrop-filter:blur(4px)}
dialog .field,dialog .field input,dialog .field select,dialog .field textarea{min-width:0}
.dialog-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:6px}
.dialog-header h2{min-width:0;font-size:27px;overflow-wrap:anywhere}
.dialog-header .icon-button{flex-shrink:0}
.dialog-intro{margin-bottom:22px;color:var(--muted);font-size:16px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:17px}
.field{display:flex;flex-direction:column;gap:7px;margin-bottom:18px;font-size:18px;font-weight:600}
.field input,.field select,.field textarea{width:100%;min-height:52px;padding:12px;border:2px solid #7093a8;border-radius:12px;background:#fff;color:var(--ink);font-size:18px}
.field textarea{resize:vertical}
.field small{color:var(--muted);font-size:16px;font-weight:400}
.field input::placeholder,.field textarea::placeholder{color:#52697c;opacity:1}
.check-row{display:flex;align-items:center;gap:10px;min-height:48px;margin-bottom:15px;font-size:18px;font-weight:600}
.check-row input,.field input[type=checkbox]{width:24px;height:24px;min-height:24px;flex-shrink:0;accent-color:var(--petrol)}
.preset-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12em),1fr));gap:9px;margin:13px 0 22px}
.preset{display:flex;align-items:center;gap:9px;min-height:80px;padding:13px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:16px;text-align:left}
.preset:hover,.preset.active{border-color:var(--petrol);background:var(--petrol-soft)}
.preset svg{width:21px}
.preset small{display:block;color:var(--muted);font-size:14px}
.form-section{margin-top:0;padding-top:0;border-top:1px solid var(--line)}
.form-section summary{min-height:50px;padding:13px 2px;color:var(--petrol);font-size:16px;line-height:1.5;cursor:pointer}
.form-section[open]{padding-bottom:14px}
.form-section[open]>summary{margin-bottom:10px}
#meal-examples .preset-list{margin-bottom:15px}
#meal-examples .dialog-intro{margin-bottom:12px}
.details-value{display:block;margin-left:20px;color:var(--muted);font-size:15px;font-weight:400}
.form-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:15px;padding-top:21px;border-top:1px solid var(--line)}
.form-actions .button{min-width:0;min-height:52px;font-size:18px}
#entry-form>.field{font-size:18px}
#entry-form>.field input{min-height:54px;font-size:18px}
#entry-form .form-actions{position:sticky;bottom:-30px;z-index:2;gap:12px;margin-top:8px;padding:16px 0 3px;background:#fff}
#entry-form .form-actions [type=submit]{flex:1}
#entry-form .form-error{margin-top:12px}
#entry-form .form-actions [hidden]{display:none}
.form-error{padding:10px 14px;border-radius:12px;background:#f4e8db;color:#7e472c}
.form-error:empty{display:none}
.calculation{margin-bottom:17px;padding:12px 16px;border-radius:12px;background:var(--petrol-soft);font-size:16px}
.drink-amount-picker{min-width:0;margin:0 0 20px;padding:0;border:0}
.drink-amount-picker legend{width:100%;margin-bottom:4px;padding:0;font-size:18px;font-weight:700}
.drink-amount-picker>p{margin-bottom:12px}
.drink-amount-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,6.5em),1fr));gap:10px}
.drink-amount-choice{display:flex;align-items:center;gap:12px;min-width:0;min-height:64px;padding:12px 14px;border:2px solid #9ebccf;border-radius:16px;background:var(--water);color:var(--ink);font-size:20px;font-weight:700;cursor:pointer}
.drink-amount-choice input[type=radio]{appearance:auto;width:24px;height:24px;min-height:24px;flex:none;margin:0;accent-color:var(--petrol)}
.drink-amount-choice:has(input:checked){padding:11px 13px;border:3px solid var(--petrol);background:var(--petrol-soft)}
.drink-amount-choice:focus-within{outline:3px solid #7c3aed;outline-offset:3px}
.drink-amount-choice>span{min-width:0;overflow-wrap:anywhere}
.drink-amount-choice small{display:block;font-size:14px}
.drink-amount-choice:last-child{grid-column:1/-1;background:#fff;font-size:18px}
.drink-custom{margin-top:16px}
.profile-suitability{align-items:flex-start;gap:12px;margin:8px 0 22px;font-size:17px}
.profile-suitability input{flex:none;margin-top:4px}
.profile-suitability small{display:block;margin-top:7px;color:var(--muted);font-size:14px;font-weight:400}
.profile-target{margin-bottom:18px;padding:16px 18px;border-radius:14px;background:var(--petrol-soft)}
.profile-target strong{font-size:18px}
.profile-target p{margin-top:5px;color:var(--muted);font-size:15px}

/* Meal dialog and food assistant */
dialog.journey-dialog{width:min(1100px,calc(100% - 32px));max-width:1100px;max-height:calc(100dvh - 32px);padding:28px}
.journey-dialog .dialog-header{margin-bottom:8px}
.journey-dialog .dialog-intro{margin-bottom:25px;font-size:16px}
.journey-dialog .meal-intro,.journey-dialog .meal-simple-hint,.journey-dialog.new-meal #ai-estimate{display:none}
.meal-intro{margin-bottom:20px;font-size:18px;line-height:1.6}
.meal-simple-hint{display:flex;align-items:flex-start;gap:9px;margin:0 0 16px;padding:12px 14px;border-radius:12px;background:var(--petrol-soft);font-size:15px}
.meal-simple-hint svg{width:20px;height:20px;margin-top:2px}
.meal-workspace,.meal-reflection-fields{min-width:0;margin:0;padding:0;border:0}
.meal-workspace{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(290px,.85fr);align-items:start;gap:26px}
.meal-workspace[hidden],.meal-reflection-fields[hidden]{display:none}
.meal-entry-main{padding:6px 0}
.meal-entry-main .field{margin-bottom:21px;font-size:17px}
.meal-entry-main .field input,.meal-entry-main .field textarea,.meal-entry-main .field select{min-height:52px;font-size:18px}
.meal-entry-main .field small{font-size:14px;line-height:1.5}
.meal-entry-main .button{min-height:50px;font-size:17px}
.meal-entry-aside{display:grid;gap:18px}
.meal-entry-aside .fat-points-card,.meal-entry-aside .meal-pie-card{padding:21px;border-radius:20px;box-shadow:none}
.journey-dialog .fat-points-card .chart-note{font-size:12px}
.meal-step{margin:8px 0 18px;color:var(--petrol);font-size:15px;font-weight:600}
.meal-stepbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:4px 14px;margin-bottom:14px}
.meal-stepbar .meal-step{margin:4px 0}
.meal-stepbar .text-button{min-height:44px;font-size:14px}
.meal-pie{display:grid;justify-items:center;gap:14px;margin-top:16px}
.meal-pie>svg,svg.meal-pie{display:block;width:min(100%,180px);height:auto;margin-left:auto;margin-right:auto}
.meal-pie text{fill:var(--ink);font-family:inherit}
.journey-dialog .meal-pie{grid-template-columns:106px minmax(0,1fr);gap:12px}
.journey-dialog .meal-pie>svg{width:106px}
.pie-legend,.meal-pie .legend,.meal-pie-card .legend{display:grid;width:100%;gap:8px;margin-top:12px}
.pie-legend>div,.meal-pie .legend>div,.meal-pie-card .legend>div{display:flex;align-items:center;gap:8px;font-size:14px;line-height:1.5}
.pie-legend strong{flex:none;font-size:14px;font-weight:600}
.pie-legend span{flex:1;min-width:0;overflow-wrap:anywhere}
.pie-legend i{display:inline-block;width:9px;height:9px;flex:none;border-radius:50%;background:currentColor}
.journey-dialog .pie-legend{margin:0}
.journey-dialog .pie-legend>div{flex-wrap:wrap;gap:5px;font-size:12px}
.journey-dialog .pie-legend strong{font-size:12px}
.pie-track{stroke:#eef2f4}
.pie-slice{stroke:currentColor}
.pie-0{color:#167e86}
.pie-1{color:#5689c9}
.pie-2{color:#b478b9}
.pie-3{color:#cc9142}
.food-assistant{margin:3px 0 18px}
.journey-dialog .food-assistant{padding:12px 0}
.ai-button{width:100%;justify-content:center;gap:10px;min-height:56px;border-radius:12px;background:var(--petrol);font-size:18px}
.ai-button[aria-busy=true]{background:#647c70}
.food-assistant .ai-button{min-height:48px;border:2px solid #7093a8;background:transparent;color:var(--petrol);font-size:16px;font-weight:600}
.food-assistant .ai-button[aria-busy=true]{background:var(--petrol-soft)}
.food-assistant>p{margin:11px 0 5px;color:var(--petrol);font-size:16px;line-height:1.5}
.food-assistant>small{display:block;color:var(--muted);font-size:13px;line-height:1.5}
.food-assistant>.amount-extraction{padding:12px 14px;border:1px solid #75b6b0;border-radius:12px;background:var(--petrol-soft);font-size:15px;line-height:1.5}
.ai-results{scroll-margin-top:12px}
.ai-results:not(:empty){display:grid;grid-template-columns:minmax(0,1fr);gap:13px;min-width:0;margin-top:18px}
.ai-results>*{min-width:0;max-width:100%}
.ai-candidate{padding:19px;border:1px solid #75b6b0;border-radius:18px;background:#e8f6f3;color:var(--ink)}
.ai-candidate>.eyebrow{font-size:12px}
.ai-candidate h3{margin:5px 0;font-size:21px;overflow-wrap:anywhere}
.ai-candidate>p:not(.candidate-amount){font-size:15px}
.ai-candidate .button{width:100%;min-width:0;max-width:100%;min-height:49px;margin-top:16px;justify-content:center;font-size:18px;text-align:center;overflow-wrap:anywhere}
.ai-candidate [data-ai-candidate]{scroll-margin-bottom:100px}
.candidate-amount{font-size:18px;overflow-wrap:anywhere}
.candidate-values{display:flex;flex-wrap:wrap;gap:10px 24px;margin:15px 0 10px}
.candidate-values strong{font-size:25px}
.candidate-values small{font-size:16px;font-weight:400}
.candidate-assumption{margin-top:8px;color:var(--muted);overflow-wrap:anywhere}
.candidate-estimate-hint{margin-top:10px;font-weight:600}
.candidate-incomplete{margin-top:7px;color:#854d0e}
.candidate-source{margin-top:5px}
.candidate-source summary{min-height:44px;padding:10px 0;font-size:15px;cursor:pointer}
.candidate-source .candidate-assumption{margin:0 0 7px;font-size:14px;line-height:1.55}
.ai-original{padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--muted);font-size:15px;line-height:1.45;overflow-wrap:anywhere}
.ai-original strong{color:var(--ink)}
.nutrition-preview{margin:0 0 18px;padding:15px 17px;border:1px solid #75b6b0;border-radius:12px;background:var(--petrol-soft);color:var(--ink);font-size:18px;font-weight:600}

/* Reflection and parameter dialogs */
dialog.reflection-dialog{width:min(740px,calc(100% - 32px));max-width:740px;overflow-y:auto}
.reflection-dialog #entry-form .form-actions{position:static;margin-top:12px;padding:12px 0 0}
.reflection-dialog .reflection-question:last-of-type{margin-bottom:0}
.reflection-dialog .reflection-question .field{margin-bottom:0}
.reflection-question{min-width:0;margin:23px 0 28px;padding:0;border:0}
.reflection-question legend{margin-bottom:13px;padding:0;font-size:19px;font-weight:600;line-height:1.45}
.reflection-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.reflection-options label{display:flex;align-items:center;gap:10px;min-width:0;min-height:52px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;font-size:17px;font-weight:600;line-height:1.4;cursor:pointer}
.reflection-options label>span{min-width:0;overflow-wrap:anywhere}
.reflection-options label:hover{border-color:var(--petrol);background:#f4faf9}
.reflection-options label:has(input:checked){border-color:var(--petrol);background:var(--petrol-soft);box-shadow:inset 0 0 0 1px var(--petrol)}
.reflection-options label:has(input:focus-visible){outline:3px solid #7c3aed;outline-offset:3px}
.reflection-options input[type=radio],.reflection-options input[type=checkbox]{width:22px;height:22px;min-height:22px;flex:none;margin:0;accent-color:var(--petrol)}
.reflection-dialog .form-actions .button,.parameters-dialog .form-actions .button{min-height:50px;font-size:17px}
dialog.parameters-dialog{width:min(650px,calc(100% - 28px));max-height:calc(100dvh - 28px);overflow-y:auto}
.parameters-dialog .dialog-header{gap:12px}
.parameters-dialog .dialog-intro{margin-bottom:22px;font-size:16px;line-height:1.5}
.parameter-grid,.parameter-vitals-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12em),1fr));gap:18px 16px}
.parameters-dialog .field{min-width:0;margin-bottom:0;font-size:16px;line-height:1.4}
.parameters-dialog .field input{min-width:0;max-width:100%;min-height:50px;font-size:18px}
.parameters-dialog .field small{font-size:16px}
.parameter-hint{margin:16px 0 20px;color:var(--muted);font-size:16px;line-height:1.5}
.parameter-vitals,.parameter-when{border-top:1px solid var(--line)}
.parameter-vitals>summary,.parameter-when>summary{min-height:52px;padding:14px 0;color:var(--petrol);font-size:18px;font-weight:600;line-height:1.5;cursor:pointer;overflow-wrap:anywhere}
.parameter-vitals-grid,.parameter-when>.form-grid{padding:4px 0 20px}
.parameters-dialog .form-actions,.parameters-dialog #entry-form .form-actions{position:static;gap:12px;margin-top:12px;padding:16px 0 0}

@media(prefers-reduced-motion:no-preference){.button,.nav button,.preset,.day-action{transition:background .16s,border-color .16s,transform .16s}
.button:active,.day-action:active{transform:scale(.98)}}
@media(min-width:1500px){.workspace{padding-left:60px;padding-right:60px}}
@media(max-width:1150px){.shell{grid-template-columns:205px minmax(0,1fr)}
.sidebar{padding:30px 15px}
.brand{margin-left:5px}
.brand strong{font-size:22px}
.nav button{padding:15px 12px}
.workspace{padding:0 25px 28px}
.progress-top{grid-template-columns:minmax(0,.85fr) minmax(0,1.1fr);gap:18px}
.progress-energy .budget-overview{grid-template-columns:minmax(0,1fr)}
.progress-energy .budget-visual{justify-self:center}}
@media(max-width:760px){html{scroll-padding-bottom:calc(200px + env(safe-area-inset-bottom))}
h1{font-size:30px}
.shell{display:block}
.sidebar{position:fixed;top:auto;bottom:0;left:0;right:0;z-index:30;width:100%;height:auto;min-height:calc(82px + env(safe-area-inset-bottom));padding:6px 5px calc(6px + env(safe-area-inset-bottom));border-right:0;border-top:1px solid var(--line);background:#fff;box-shadow:0 -4px 16px #14283b12}
.brand,.sidebar-footer{display:none}
.nav{flex-direction:row;justify-content:space-around;align-items:stretch;flex-wrap:wrap;gap:3px}
.nav button{flex:1 1 auto;flex-direction:column;min-width:max-content;min-height:68px;padding:8px 2px;gap:5px;border-radius:14px;font-size:15px;line-height:1.25;text-align:center;white-space:nowrap;overflow-wrap:normal}
.nav button svg{width:24px;height:24px}
.workspace{padding:0 16px calc(max(140px,8em) + env(safe-area-inset-bottom))}
.topbar{min-height:60px;padding:10px 0;gap:8px 12px}
.demo-label{flex-basis:100%}
.topbar-actions{width:100%;margin-left:0;justify-content:space-between;align-items:stretch;gap:10px}
.topbar-actions>.button{min-height:48px;padding:10px 12px;font-size:16px}
.record-scope{flex-basis:100%}
.demo-options{width:100%}
.demo-options .topbar-actions{padding:12px}
.demo-options .roles{width:100%}
.roles button{flex:1 1 auto}
.page-heading,.team-context{gap:12px;margin-bottom:18px;padding:20px 18px;border-radius:24px}
.day-band{padding:20px 18px 18px;border-radius:24px}
.day-band .page-heading{margin-bottom:16px}
.day-facts>div{padding:10px 12px}
.day-facts dd{font-size:27px}
.day-action-meal strong{font-size:22px}
.date-control input{width:160px;font-size:16px}
.panel{padding:20px 17px}
.panel-header h2{font-size:22px}
.timeline-item{padding:14px 15px}
.entry-actions .entry-action{flex:1 1 auto}
.tag{font-size:14px}
.progress-top,.meal-workspace{grid-template-columns:minmax(0,1fr);gap:18px}
.progress-switch,.week-metric-select{margin-bottom:18px}
.progress-metrics{gap:12px}
.fat-points-card,.meal-pie-card,.progress-energy,.progress-metric{padding:20px 17px}
.fat-point-total strong{font-size:39px}
.fat-dots{max-width:350px;margin:12px auto 9px}
.view-today .fat-points-card .panel-header{margin-bottom:8px}
.view-today .fat-point-total strong{font-size:34px}
.view-today .fat-dots{max-width:300px;margin:8px auto}
.view-today .fat-legend{margin-top:8px;padding-top:8px}
.progress-energy .budget-overview,.budget-overview{grid-template-columns:136px minmax(0,1fr);gap:13px;margin-bottom:16px}
.budget-visual{width:136px;height:136px}
.donut-center{inset:22px 12px}
.donut-center>strong{font-size:30px;letter-spacing:-1px}
.budget-copy h3{margin-bottom:7px;font-size:19px;line-height:1.35}
.energy-card{padding:18px 16px 5px;margin-bottom:18px;border-radius:20px}
.energy-heading h2{font-size:22px}
.energy-heading .button{padding:9px 10px}
.energy-scope{font-size:13px;line-height:1.5}
.energy-range{font-size:16px;margin-bottom:0}
.energy-status{margin-top:8px;font-size:14px}
.energy-card:not(.energy-neutral) .budget-copy .energy-status{display:none}
.energy-numbers{gap:10px;padding-top:12px}
.energy-numbers>div+div{padding-left:10px}
.energy-numbers strong{display:flex;flex-wrap:wrap;gap:0 4px;font-size:21px;line-height:1.35}
.energy-plan-note{margin:8px 0 14px;font-size:13px;line-height:1.5}
.energy-legend{gap:5px;font-size:11px}
.compact-metrics .stats{gap:7px}
.compact-metrics .stat{padding:11px 8px;border-radius:12px}
.compact-metrics .stat-top{flex-direction:column;align-items:flex-start;gap:4px}
.compact-metrics .stat-value{font-size:25px;gap:0 4px}
.compact-metrics .stat-caption{margin-top:4px;font-size:13px}
.dashboard-disclosure>summary{gap:7px}
.dashboard-disclosure>summary svg{width:18px;height:18px}
.week-control strong{font-size:16px}
.week-calendar{gap:4px}
.day-button{min-height:75px;border-radius:10px}
.day-button strong{font-size:21px}
.chart{gap:5px;padding-left:0;padding-right:0}
.chart-col,.chart-value{font-size:14px}
.week-table{font-size:16px}
.week-table td,.week-table th{padding:12px 10px}
.more-menu{gap:10px}
.more-item{min-height:99px;padding:18px 15px;gap:13px}
.more-item strong{font-size:19px}
.more-symbol{width:42px;height:42px;border-radius:12px}
.more-item>svg{width:18px;height:18px}
.page-intro h1{font-size:30px}
.lesson summary{padding:19px 16px;gap:13px}
.lesson-title strong{font-size:20px}
.lesson-number{width:40px;height:43px;border-radius:12px}
.lesson-body{padding:0 20px 23px}
.goal-feature{padding:25px}
.goal-feature h2{font-size:26px}
.reflection-card{flex-direction:column;align-items:flex-start}
.team-context h1{font-size:29px}
.team-context-controls{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.team-person-control select,.team-context .date-control input{width:100%;min-width:0;font-size:16px}
.team-overview .panel-header h2{font-size:22px}
.team-intake-summary{grid-template-columns:minmax(0,1fr) 110px;gap:15px;margin-bottom:17px;padding-bottom:14px}
.team-intake-value strong{font-size:38px}
.team-meal-summary{padding-left:15px}
.team-meal-summary strong{font-size:28px}
.team-monitor-card{padding:16px 17px}
.team-day-editor{padding:20px 17px}
.team-week-panel .panel-header,.view-team-history .measurement-panel .panel-header{flex-wrap:wrap}
.team-week-panel .panel-header .button{width:100%}
.toast{bottom:calc(max(106px,6.5em) + env(safe-area-inset-bottom));flex-wrap:wrap;gap:10px;width:max-content;min-width:0;max-width:calc(100% - 24px);font-size:16px}
.toast button{font-size:16px}
dialog{padding:22px 18px;border-radius:22px}
dialog.journey-dialog,dialog.reflection-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px);padding:21px 18px;border-radius:22px}
.dialog-header h2{font-size:24px}
.journey-dialog .dialog-intro{margin-bottom:19px;font-size:15px}
.journey-dialog .meal-entry-aside{display:contents}
.journey-dialog .meal-entry-aside .fat-points-card{order:0}
.journey-dialog .meal-entry-main{order:1}
.journey-dialog .meal-entry-aside .meal-pie-card{order:2}
.meal-entry-aside .fat-points-card,.meal-entry-aside .meal-pie-card{padding:18px}
.form-grid{grid-template-columns:1fr;gap:0}
.form-actions .button{flex:1 1 100%}
#entry-form .form-actions{position:static;padding:16px 0 0}
.reflection-question{margin:16px 0}
.reflection-question legend{margin-bottom:8px;font-size:17px;line-height:1.35}
.reflection-dialog .dialog-intro{margin-bottom:12px;line-height:1.4}
.reflection-options{gap:8px}
.reflection-options label{padding:8px;gap:7px}
.reflection-options label:last-child:nth-child(odd){grid-column:1/-1}
.ai-candidate{padding:16px}
.candidate-values strong{font-size:23px}
.nutrition-preview{padding:13px 15px;font-size:17px}}
@media(max-width:600px){dialog.parameters-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px);padding:21px 18px;border-radius:22px}}
@media(max-width:400px){.journey-dialog .meal-pie{grid-template-columns:90px minmax(0,1fr)}
.journey-dialog .meal-pie>svg{width:90px}}
@media(max-width:380px){#entry-form .form-actions{flex-wrap:wrap}
#entry-form .form-actions .button{flex:1 1 100%;min-width:0}
.meal-entry-main .form-grid{grid-template-columns:minmax(0,1fr)}
.progress-energy .budget-overview{grid-template-columns:minmax(0,1fr)}
.progress-switch button,.week-metric-select button{padding:10px 14px}
.drink-amount-options{gap:8px}
.drink-amount-choice{gap:8px;padding:12px 10px}
.drink-amount-choice:has(input:checked){padding:11px 9px}
.week-calendar{gap:3px}
.day-button{font-size:13px}}
@media(max-width:359px){.reflection-options{grid-template-columns:minmax(0,1fr)}
.entry-actions .entry-action{flex-basis:100%}
.page-heading .date-control{width:100%}
.page-heading .date-control input{flex:1;width:100%;max-width:none}
.team-context-controls{grid-template-columns:minmax(0,1fr)}}
@media(max-width:280px){.workspace{padding:0 10px calc(180px + env(safe-area-inset-bottom))}
.drink-amount-options,.reflection-options,.diary-actions{grid-template-columns:minmax(0,1fr)}}
@media print{body{background:#fff;color:#000;font-size:12pt}
.shell{display:block}
.sidebar,.topbar,.page-end,.page-footer,.toast,dialog,.no-print,.page-heading,.team-context,.day-actions,.day-latest-links,.diary-actions,.back-to-more,.progress-switch,.week-metric-select,.week-calendar,.week-control,.entry-actions,.energy-details,.button,.icon-button,.text-button{display:none!important}
.workspace{max-width:none;padding:0}
.print-only{display:block}
.print-only h1,.page-intro h1{font-size:24pt}
.print-only p{margin:10px 0 20px}
.team-print-header p,.page-intro p{font-size:11pt}
.day-band{background:#fff;color:#000;box-shadow:none}
.day-facts>div{border:1px solid #aaa;background:#fff}
.day-facts dt,.day-band-note{color:#000}
.panel,.energy-card,.fat-points-card,.meal-pie-card,.progress-energy,.progress-metric,.vitals-summary,.timeline-item,.team-monitor-card{break-inside:avoid;border:1px solid #aaa;box-shadow:none}
.panel{margin-bottom:20px;padding:18px}
.observation{background:#fff}
.notice{font-size:10pt}
.week-table{white-space:normal;font-size:11pt}
.week-table th{font-size:10pt}
.week-table td{padding:8px}
.chart{height:170px}
.progress-top{grid-template-columns:repeat(2,minmax(0,1fr))}
.progress-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}
.compact-metrics .stats{display:grid!important}
.budget-overview{grid-template-columns:160px minmax(0,1fr)}
.budget-visual{width:160px;height:160px}
.view-team-history{max-width:none}
.learning-list,.goal-page,.page-intro{break-inside:avoid}}
