/* Theme tokens: one authoritative value per theme. */
:root:not([data-theme=light]){--app-bg:#171b20;--surface:var(--app-bg);--surface-raised:var(--app-bg);--line:#454f5c;--text:#f1f4f7;--secondary:#bdc7d1;--accent:#afc8db;--accent-text:#c5dcec;--accent-ink:#192b3a;--macro-cal:#b9a6ff;--macro-protein:#73d4c3;--macro-carbs:#88bdf2;--macro-fat:#edc779;--macro-fiber:#b0d28d;--tab-inactive:#202b36;--tab-inactive-text:#c3cdd7;--tab-selected:#3a4a5b;--tab-blue:#79b7ff;--quickbar-bg:#202832;--reading-bg:#101419;--gauge-track:#303a46;--header-surface:#202832}
:root[data-theme=light]{
 --app-bg:#f6f8fb;
 --surface:#fff;
 --surface-raised:#f0f4f8;
 --line:#d4dce5;
 --control-line:#8795a5;
 --text:#1e2938;
 --secondary:#47566a;
 --accent:#315e88;
 --accent-text:#254f79;
 --accent-ink:#fff;
 --macro-cal:#7257ac;
 --macro-protein:#18766b;
 --macro-carbs:#316da6;
 --macro-fat:#926019;
 --macro-fiber:#4c702e;
 --tab-inactive:var(--surface);
 --tab-inactive-text:var(--secondary);
 --tab-selected:#e7eff8;
 --tab-blue:#254f79;
 --quickbar-bg:var(--surface);
 --reading-bg:var(--surface);
 --gauge-track:#dfe6ed;
 --header-surface:var(--app-bg);
 --weight-curve:#296196;
 --weight-mean:#97325e;
 --weight-mean-14:#965014;
 --weight-mean-28:#146d61;
 --body-muscle-line:#146d61;
 --body-fat-line:#764590;
 --section-title-bg:var(--surface-raised);
 --status-low:#236b4c;
 --status-mid:#895511;
 --status-high:#a3323d;
 --chart-guide:#66788b;
 background:var(--app-bg);
 color:var(--text)
}
:root{--weight-curve:#8ab7e9;--weight-mean:#f5a5c6;--weight-mean-14:#e9a35e;--weight-mean-28:#8dded0;--body-muscle-line:#78ccbe;--body-fat-line:#cba4e6;--section-title-bg:#11151a}
/* Fusion compacte / Ardoise / IBM Plex Sans. Presentation only. */

body{font-family:"IBM Plex Sans",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:14px;line-height:1.5;background:var(--app-bg);color:var(--text)}
header,main{padding:20px 24px}
header h1{font-size:26px;font-weight:600;letter-spacing:-.5px}
header h1 span{font-weight:500}
button,input,select,textarea,summary{font-family:inherit}
button,.primary{border-radius:10px;min-height:44px;box-shadow:none}
.primary,[data-theme=light] .primary,.primary:hover{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.quickbar{border:0;border-radius:12px;padding:12px 14px}
.quickbar-options,[data-theme=light] .quickbar-options{background:var(--surface);color:var(--text);border-color:var(--line)}
body #sante-dashboard{font-family:inherit!important;color:var(--text)!important;background:var(--app-bg)!important}
body #sante-dashboard h2{font-family:inherit;font-size:25px;font-weight:600;letter-spacing:-.5px}
body #sante-dashboard h3{font-family:inherit;font-size:18px;font-weight:600;margin-bottom:14px}
body #sante-dashboard button,body #sante-dashboard input,body #sante-dashboard select{font-family:inherit!important}
body #sante-dashboard .box,body #sante-dashboard .anthracite,body #sante-dashboard .withings,body #sante-dashboard #s-today>.box{background:var(--surface);border:0;border-radius:12px;padding:16px;box-shadow:none}
body #sante-dashboard .shell{background:transparent;border:0;box-shadow:none}
body #sante-dashboard .grid{gap:8px}
body #sante-dashboard .number,body #sante-dashboard .medium{font-family:inherit;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-.5px}
body #sante-dashboard .number{font-size:25px;line-height:1.3;margin:7px 0}
body #sante-dashboard .small{line-height:1.5}
body #sante-dashboard nav{border-radius:14px}
body #sante-dashboard nav button{background:transparent;border:0;border-radius:9px;font-weight:500;min-height:44px!important;padding:9px 6px}
body #sante-dashboard nav button[aria-selected=true],[data-theme=light] body #sante-dashboard nav button[aria-selected=true]{font-weight:600}
body #sante-dashboard button[aria-pressed=true],[data-theme=light] body #sante-dashboard button[aria-pressed=true]{background:var(--accent)!important;color:var(--accent-ink)!important;border-color:var(--accent)!important}
body #sante-dashboard #s-today>.today-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important;padding:0!important;border:0;background:transparent;border-radius:0;overflow:visible}
body #sante-dashboard #s-today>.today-summary>.box:nth-child(n){background:var(--surface);padding:16px;border:0;box-shadow:none;grid-column:auto;margin:0}
body #sante-dashboard #s-today>.today-summary>.box:nth-child(-n+2){background:var(--surface-raised)}
body #sante-dashboard #s-today>.today-summary .number{font-size:25px;font-weight:600;margin:7px 0}
body #sante-dashboard #s-today>.today-summary>.box>div:first-child{font-size:12px;line-height:1.45;color:var(--text)}
body #sante-dashboard #s-today>.today-summary .small{font-size:12px;line-height:1.5;color:var(--secondary)}
body #sante-dashboard .macro{margin:14px 0;padding-bottom:4px}
body #sante-dashboard .macro .row{font-size:14px;flex-wrap:wrap;gap:4px 12px;align-items:baseline}
body #sante-dashboard .bar{height:6px;border-radius:8px;margin:8px 0 5px}
body #sante-dashboard .bar span{border-radius:8px}
body #sante-dashboard #s-today .macro:nth-of-type(1) .bar span{background:var(--macro-cal)!important}
body #sante-dashboard #s-today .macro:nth-of-type(2) .bar span{background:var(--macro-protein)!important}
body #sante-dashboard #s-today .macro:nth-of-type(3) .bar span{background:var(--macro-carbs)!important}
body #sante-dashboard #s-today .macro:nth-of-type(4) .bar span{background:var(--macro-fat)!important}
body #sante-dashboard #s-today .macro:nth-of-type(5) .bar span{background:var(--macro-fiber)!important}
body #sante-dashboard table{font-family:inherit;font-size:13px;line-height:1.6;font-variant-numeric:tabular-nums}
body #sante-dashboard td,body #sante-dashboard th{border-color:var(--line);padding:11px 6px}
body #sante-dashboard .withings .anthracite{background:var(--surface-raised)}
body #sante-dashboard .body-reading p{font-size:14px}
body #sante-dashboard .body-reading .body-reading-note{font-size:12px}
body #sante-dashboard .gly-meal-group{padding:16px 0}
body #sante-dashboard .gly-food-detail{background:var(--surface-raised)}
body #sante-dashboard .status{background:var(--surface-raised);color:var(--secondary)}
#data-actions{border:0;background:var(--surface);border-radius:12px;padding:14px}
dialog,[data-theme=light] dialog{background:var(--surface);color:var(--text);border-radius:14px}
@media(max-width:600px){header,main{padding:17px}header{gap:10px}header h1{font-size:23px}body #sante-dashboard h2{font-size:24px}body #sante-dashboard .box,body #sante-dashboard .anthracite,body #sante-dashboard .withings,body #sante-dashboard #s-today>.box{padding:14px;border-radius:12px}body #sante-dashboard #s-today>.today-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}body #sante-dashboard #s-today>.today-summary>.box:nth-child(n){padding:14px;border:0}body #sante-dashboard #s-today>.today-summary .number{font-size:22px!important}body #sante-dashboard #s-today>.today-summary .small{font-size:11px!important}body #sante-dashboard #s-today>.today-summary>.box>div:first-child{font-size:12px}body #sante-dashboard nav{grid-template-columns:repeat(3,minmax(0,1fr))}body #sante-dashboard nav button{font-size:12px!important;padding:9px 3px}body #sante-dashboard .macro .row{flex-wrap:wrap}body #sante-dashboard td{padding:10px 5px!important}}
@media(max-width:360px){header,main{padding:14px}body #sante-dashboard #s-today>.today-summary>.box:nth-child(n){padding:12px}body #sante-dashboard #s-today>.today-summary .number{font-size:21px!important}body #sante-dashboard .macro .row{gap:3px}body #sante-dashboard nav button{flex-direction:row;font-size:11px!important}}

/* Navigation states. */

body #sante-dashboard nav{background:transparent!important;border:0;padding:0!important;gap:7px!important}
body #sante-dashboard nav button[aria-selected=false]{background:var(--tab-inactive)!important;color:var(--tab-inactive-text)!important;border:2px solid transparent!important;box-shadow:none}
body #sante-dashboard nav button[aria-selected=true],[data-theme=light] body #sante-dashboard nav button[aria-selected=true]{background:var(--tab-selected)!important;color:var(--text)!important;box-shadow:none}

/* Body charts and biomarkers share the nutrition panel surface. */
body #sante-dashboard #s-body .withings>.anthracite:not(.body-reading){background:var(--surface)}

/* Quieter surfaces and streamlined display. */

body #sante-dashboard #s-progress .lafay-alert{border-radius:0 10px 10px 0}
body #sante-dashboard #s-progress .lafay-alert[data-state=review],body #sante-dashboard #s-progress .lafay-alert[data-state=soon]{border-left-color:var(--accent)}
body #sante-dashboard .lafay-deadline{font-weight:600;font-size:15px}
body #sante-dashboard .lafay-notes{padding-left:18px;line-height:1.6}
body #sante-dashboard .lafay-notes li{margin:7px 0}
body #sante-dashboard .lafay-alert summary{min-height:44px;padding:12px 0;font-size:13px;cursor:pointer}

body #sante-dashboard #s-gly,body #sante-dashboard #s-gly>.box,body #sante-dashboard #s-gly-scroll{width:100%;max-width:none;min-width:0}
body #sante-dashboard #s-gly-scroll{overflow-x:hidden!important}
body #sante-dashboard #s-gly-chart{display:block;width:100%!important;max-width:100%!important;height:275px!important;min-width:0}
body #sante-dashboard #s-body .withings>.body-reading{background:var(--reading-bg)}
body #sante-dashboard nav button[aria-selected=true],[data-theme=light] body #sante-dashboard nav button[aria-selected=true]{border:2px solid transparent!important}
body #sante-dashboard>h2{font-size:28px;line-height:1.25}
body #sante-dashboard .energy-breakdown table{font-size:15px;line-height:1.6}
body #sante-dashboard #source-label{display:none}
#status:empty{display:none}
.date-row{margin:16px 0}
.day-selector{position:relative;display:inline-flex;align-items:center;gap:14px;max-width:100%;min-height:46px;padding:10px 14px;background:var(--surface);border:1px solid var(--line);border-radius:10px;color:var(--text);font-size:16px}
.day-selector:focus-within{outline:3px solid var(--accent);outline-offset:3px}
body #sante-dashboard .day-selector input[type=date]{position:absolute;inset:0;width:100%;height:100%;max-width:100%;opacity:0;margin:0;cursor:pointer;font-size:16px!important}
.day-selector input::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:auto;height:auto;margin:0;padding:0;cursor:pointer}
body #sante-dashboard .average-panel{min-width:0;max-width:100%}
body #sante-dashboard .week-overview .grid>.box,body #sante-dashboard .nutrition-regularity .grid>.box,body #sante-dashboard .energy-balance .grid>.box,body #sante-dashboard .expense-comparison .grid>.box{background:transparent;border-radius:0;border-bottom:1px solid color-mix(in srgb,var(--line) 55%,transparent);padding:14px 10px}
@media(max-width:600px){body #sante-dashboard>h2{font-size:27px}body #sante-dashboard .energy-breakdown td{font-size:15px;padding:12px 5px!important}body #sante-dashboard .week-overview .grid>.box,body #sante-dashboard .nutrition-regularity .grid>.box,body #sante-dashboard .energy-balance .grid>.box,body #sante-dashboard .expense-comparison .grid>.box{padding:14px 2px}}

/* Shared page/panel background, as selected in the unified preview. */

body #sante-dashboard .bar{background:var(--gauge-track)}
body #sante-dashboard #s-today>.today-summary>.box:nth-child(n){border-radius:0;border-bottom:1px solid var(--line)}
/* Only the session date containers retain their separators. */
body #sante-dashboard #s-progress .bio table td,body #sante-dashboard #s-progress .bio table th{border:0}

/* Expand the usable page width and remove stacked mobile gutters. */
header,main{max-width:1280px;padding-left:16px;padding-right:16px}
body #sante-dashboard .shell{padding:0!important}
body #sante-dashboard #s-body>.withings{padding:0!important}
@media(max-width:600px){header,main{padding-left:10px;padding-right:10px}body #sante-dashboard .box,body #sante-dashboard .anthracite,body #sante-dashboard #s-today>.box{padding-left:12px;padding-right:12px}body #sante-dashboard #s-body .body-reading{padding-left:14px;padding-right:14px}}

/* Keep meal times intact even beside long food names on narrow screens. */
body #sante-dashboard .meal-log table{table-layout:auto}
body #sante-dashboard .meal-log td:first-child{width:7ch;min-width:7ch;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:normal;font-variant-numeric:tabular-nums;padding-right:12px!important}
body #sante-dashboard .meal-log td:nth-child(2){white-space:normal;overflow-wrap:anywhere;word-break:normal}

/* Biomarker gauges scale with their panel instead of stopping at 450px. */
body #sante-dashboard #s-body .body-biomarkers .gauge{width:100%;max-width:none;min-width:0;margin-left:0;margin-right:0}
body #sante-dashboard #s-body .body-biomarkers .segments,body #sante-dashboard #s-body .body-biomarkers .glabels{width:100%;min-width:0}
body #sante-dashboard #s-body .body-biomarkers .glabels span{min-width:0;overflow-wrap:anywhere}

body #sante-dashboard #s-body .body-biomarkers .segments{height:9px;gap:2px}
body #sante-dashboard #s-body .body-biomarkers .pointer{font-size:18px;line-height:16px;top:-17px}
body #sante-dashboard #s-body .body-biomarkers .gauge{margin-top:24px;margin-bottom:7px}
body #sante-dashboard #s-body .body-biomarkers .medium{font-size:22px}

/* A lighter application header and clearer navigation blocks. */

body>header{background:var(--header-surface);border-bottom:0;border-radius:0 0 12px 12px}
.quickbar{background:var(--quickbar-bg)}

body #sante-dashboard #s-body .weight-latest{display:flex;justify-content:flex-start;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin:7px 0}
body #sante-dashboard #s-body .weight-latest-value{font-size:29px;line-height:1.3;margin:0;white-space:nowrap}
body #sante-dashboard #s-body .weight-latest-change{font-size:clamp(12px,2.8vw,14px);white-space:nowrap}

body #sante-dashboard #s-body .body-distribution>h3{font-size:19px}
body #sante-dashboard #s-body .distribution-labels{font-size:15px;flex-wrap:wrap;gap:8px 18px}
body #sante-dashboard #s-body .distribution-labels b{font-size:16px}
body #sante-dashboard #s-body .distribution-gauge{height:14px;margin:10px 0!important}
body #sante-dashboard #s-body .distribution-bone{font-size:14px}

body #sante-dashboard .weight-average-toggle{display:flex;align-items:center;gap:9px;min-height:44px;flex-wrap:wrap;font-size:14px;margin:10px 0}
body #sante-dashboard .weight-average-toggle input{width:19px;height:19px;margin:0;accent-color:var(--weight-mean)}
body #sante-dashboard .weight-mean-swatch{width:23px;background:repeating-linear-gradient(to right,var(--weight-mean) 0 7px,transparent 7px 12px)}

body #sante-dashboard .weight-chart-tooltip{position:absolute;z-index:5;pointer-events:none;color:var(--text);line-height:1.5;max-width:calc(100% - 16px);box-sizing:border-box}
body #sante-dashboard .weight-chart-tooltip[hidden]{display:none}
body #sante-dashboard .weight-mean-swatch{height:2px;opacity:.65}

body #sante-dashboard .weight-chart-tooltip{background:none;border:0;border-radius:0;padding:0;box-shadow:none;font-size:14px;font-weight:600;white-space:nowrap}

/* Keep expanded connection options within the quickbar at every viewport width. */
.quickbar .quickbar-more[open]{flex:1 0 100%;min-width:0;max-width:100%;margin-left:0}
.quickbar .quickbar-more[open] .quickbar-options{position:static;inset:auto;width:min(320px,100%);max-width:100%;box-sizing:border-box;margin-top:4px;overflow-wrap:anywhere}
/* SVG hit targets retain keyboard focus and its weight label without a rectangular ring. */
body #sante-dashboard #s-weight-chart circle[data-chart-hit]:focus,
body #sante-dashboard #s-weight-chart circle[data-chart-hit]:focus-visible{outline:none!important;box-shadow:none!important}
body #sante-dashboard #s-weight-chart circle[data-chart-hit]{-webkit-tap-highlight-color:transparent}

body #sante-dashboard .training-history{border-top:1px solid var(--line);padding-top:12px}
body #sante-dashboard .training-history-toggle{display:flex;align-items:center;gap:8px;min-height:48px;cursor:pointer;list-style:none}
body #sante-dashboard .training-history-toggle{font-size:20px;font-weight:600}
body #sante-dashboard .training-history-toggle::-webkit-details-marker{display:none}
body #sante-dashboard .training-chevron{display:inline-block;flex:none;width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor}
body #sante-dashboard .training-chevron-down{transform:rotate(45deg);margin:0 3px 4px}
body #sante-dashboard .training-chevron-left{transform:rotate(135deg)}
body #sante-dashboard .training-chevron-right{transform:rotate(-45deg)}
body #sante-dashboard details[open]>summary>.training-chevron-down{transform:rotate(225deg);margin-bottom:0}
body #sante-dashboard .training-calendar-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:20px;margin-top:12px}
body #sante-dashboard .training-calendar-month,body #sante-dashboard .training-session-detail{min-width:0}
body #sante-dashboard .training-history-card{min-width:0;border:1px solid var(--line);border-radius:12px;background:var(--quickbar-bg)}
@container training-calendar (min-width:650px){
 body #sante-dashboard .training-calendar-layout{grid-template-columns:minmax(0,380px) minmax(0,1fr);align-items:start;gap:24px}
 body #sante-dashboard .training-session-detail{border-inline-start:1px solid var(--line);padding-inline-start:24px}
}
body #sante-dashboard .training-month-header,body #sante-dashboard .training-month-toolbar{display:flex;align-items:center;justify-content:space-between;gap:4px}
body #sante-dashboard .training-month-header h3{margin:0;text-align:center;font-size:16px;text-transform:capitalize}
body #sante-dashboard .training-month-nav{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0}
body #sante-dashboard .training-month-meta{margin-bottom:12px;color:var(--secondary);font-size:12px}
body #sante-dashboard .training-month-meta p{margin:0}
body #sante-dashboard .training-month-toolbar{margin-bottom:12px}
body #sante-dashboard .training-filters{display:flex;flex-wrap:wrap;gap:4px}
body #sante-dashboard .training-calendar .training-today{flex:none;padding:0 6px;color:var(--accent-text)!important;font-size:12px;font-weight:600}
body #sante-dashboard .training-calendar :is(.training-month-nav,.training-today),
body #sante-dashboard .training-calendar .training-day:not([aria-current=date],[aria-pressed=true]){background:transparent!important;border-color:transparent!important}
body #sante-dashboard .training-calendar .training-month-nav:hover{color:var(--accent-text)!important}
body #sante-dashboard .training-calendar .training-today:hover{text-decoration:underline;text-underline-offset:3px}
body #sante-dashboard .training-calendar .training-filter{padding:0 10px;min-height:40px;border:1px solid var(--line);border-radius:8px;background:transparent;color:var(--secondary);font-size:12px;font-weight:600}
@container training-calendar (max-width:340px){
 body #sante-dashboard .training-filters{gap:3px}
 body #sante-dashboard .training-calendar .training-filter{padding-inline:4px}
 body #sante-dashboard .training-calendar .training-today{padding-inline:3px}
}
body #sante-dashboard .training-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
body #sante-dashboard .training-weekday{text-align:center;font-size:12px;color:var(--secondary);padding-bottom:8px}
body #sante-dashboard .training-calendar .training-day{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:48px;padding:0;border-radius:8px;color:var(--text);font-size:14px;font-weight:600}
body #sante-dashboard .training-calendar .training-day[aria-current=date]{border-color:var(--line);background:var(--gauge-track)}
body #sante-dashboard .training-calendar .training-filter[aria-pressed=true]{border-color:var(--accent);background:var(--tab-selected);color:var(--text)}
body #sante-dashboard .training-calendar .training-day[aria-pressed=true]{
 background:color-mix(in srgb,var(--accent) 10%,var(--app-bg))!important;
 border-color:color-mix(in srgb,var(--accent) 50%,var(--line))!important;
 color:var(--text)!important;box-shadow:none
}
@media(hover:hover){
 body #sante-dashboard .training-calendar .training-day:hover{box-shadow:inset 0 0 0 100vmax color-mix(in srgb,var(--text) 7%,transparent);text-decoration:none}
}
body #sante-dashboard .training-calendar .training-filter:hover{background:var(--gauge-track)}
body #sante-dashboard .training-day-dots{display:flex;align-items:center;justify-content:center;gap:2px;height:6px}
body #sante-dashboard .training-session-dot{display:inline-block;flex:none;width:6px;height:6px;border-radius:50%;background:var(--training-dot)}
body #sante-dashboard .training-calendar{container:training-calendar / inline-size;--training-lafay:#a9caff;--training-legs:#b9f2cf;--training-abs:#fde7ae}
:root[data-theme=light] body #sante-dashboard .training-calendar{--training-lafay:#3976ad;--training-legs:#27654e;--training-abs:#855c1e}
body #sante-dashboard [data-training-type=lafay]{--training-dot:var(--training-lafay)}
body #sante-dashboard [data-training-type=lower-body]{--training-dot:var(--training-legs)}
body #sante-dashboard [data-training-type=abs]{--training-dot:var(--training-abs)}
body #sante-dashboard .training-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 16px;margin-top:16px;color:var(--secondary);font-size:12px}
body #sante-dashboard .training-legend-item{display:inline-flex;align-items:center;gap:6px}
body #sante-dashboard .training-legend .training-session-dot{width:8px;height:8px}
body #sante-dashboard .training-session-detail h4{font-size:14px;margin:0 0 8px;text-transform:capitalize}
body #sante-dashboard .training-session-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:48px;padding:12px 16px;cursor:pointer;list-style:none}
body #sante-dashboard .training-session-summary::-webkit-details-marker{display:none}
body #sante-dashboard .training-session-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 10px;min-width:0}
body #sante-dashboard .training-session-date{color:var(--secondary);font-size:.9em}
body #sante-dashboard .training-history-card+.training-history-card{margin-top:8px}
body #sante-dashboard .training-session-content{border-top:1px solid var(--line);padding:12px 16px 16px}
body #sante-dashboard .training-session-content>p:first-child{margin-top:0}
body #sante-dashboard .training-programme{margin:0 0 6px;font-size:1em;font-weight:700}
body #sante-dashboard .training-exercise{border-top:1px solid var(--line);margin-top:12px}
body #sante-dashboard .training-exercise-heading{margin:10px 0 8px;font-size:1em;overflow-wrap:anywhere}
body #sante-dashboard .training-exercise p{margin:6px 0 0}
body #sante-dashboard .training-series{display:flex;align-items:flex-start;gap:7px}
body #sante-dashboard .training-series-grid{display:grid;flex:1;min-width:0;grid-template-columns:repeat(auto-fit,minmax(40px,1fr));gap:7px}
body #sante-dashboard .training-series-item{min-width:0;text-align:center}
body #sante-dashboard :is(.training-series-value,.training-series-total){display:grid;min-height:42px;place-items:center;border-radius:8px;font-size:16px;font-weight:700;font-variant-numeric:tabular-nums}
body #sante-dashboard .training-series-total{min-width:42px;padding:0 5px;border:1px solid var(--accent-text);color:var(--accent-text)}
body #sante-dashboard .training-series-value{background:var(--gauge-track);color:var(--text)}
body #sante-dashboard .training-series-value[data-set-status=validated]{background:color-mix(in srgb,var(--training-legs) 14%,var(--quickbar-bg));color:var(--training-legs)}
body #sante-dashboard .training-series-value[data-set-status=entered]{background:color-mix(in srgb,var(--training-abs) 14%,var(--quickbar-bg));color:var(--training-abs)}
body #sante-dashboard .training-series-label{display:block;margin-top:4px;font-size:11px;line-height:1.2;overflow-wrap:anywhere;color:var(--secondary)}
body #sante-dashboard .training-empty{border:1px dashed var(--line);border-radius:12px;padding:16px;margin:0;color:var(--secondary)}

body #sante-dashboard .weight-average-toggle-14 input{accent-color:var(--weight-mean-14)}
body #sante-dashboard .weight-mean-swatch-14{background:repeating-linear-gradient(to right,var(--weight-mean-14) 0 7px,transparent 7px 12px)}

body #sante-dashboard .weight-average-toggle-28 input{accent-color:var(--weight-mean-28)}
body #sante-dashboard .weight-mean-swatch-28{background:repeating-linear-gradient(to right,var(--weight-mean-28) 0 7px,transparent 7px 12px)}

body #sante-dashboard .weight-average-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center;gap:4px 22px;margin:10px 0;max-width:560px}
body #sante-dashboard .weight-average-controls .weight-average-toggle{display:grid;grid-template-columns:19px 23px minmax(0,1fr);margin:0;font-size:13px;gap:7px;min-width:0}
body #sante-dashboard .composition-value{font-size:25px;font-weight:600}
body #sante-dashboard .composition-value .value-unit{font-size:.6em;font-weight:500}
body #sante-dashboard #s-body .body-biomarkers .gauge.has-gauge-value{margin-top:58px}
body #sante-dashboard #s-body .body-biomarkers .gauge-value{position:absolute;top:-48px;transform:translateX(-50%);font-size:18px;font-weight:600;line-height:1.4;white-space:nowrap;color:var(--text)}
@media(max-width:430px){body #sante-dashboard .weight-average-controls{gap:0 10px}body #sante-dashboard .weight-average-controls .weight-average-toggle{grid-template-columns:19px 16px minmax(0,1fr);font-size:12px;gap:5px}body #sante-dashboard .weight-average-controls .weight-mean-swatch{width:16px}body #sante-dashboard .composition-value{font-size:23px}}

body #sante-dashboard .body-trends-controls{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0}
.body-trends-selectors{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
body #sante-dashboard .body-trends-controls label{display:flex;align-items:center;gap:8px}
body #sante-dashboard .body-trends-controls button,body #sante-dashboard .body-trends-controls select{min-height:44px;padding:7px 10px}
body #sante-dashboard .body-trends-plot{margin-top:22px;min-width:0}
body #sante-dashboard .body-trends-plot h4{font-size:16px;margin:0 0 6px}
body #sante-dashboard .body-trends-plot svg{display:block;width:100%;height:240px;overflow:visible}
body #sante-dashboard .body-trends circle[data-body-measure]{-webkit-tap-highlight-color:transparent}
body #sante-dashboard .body-trends circle[data-body-measure]:focus{outline:none!important}

body #sante-dashboard .body-trends{padding:0;margin-top:18px;min-width:0}
body #sante-dashboard .body-trends-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
body #sante-dashboard .body-trends-grid .body-trends-plot{margin-top:12px}
body #sante-dashboard #s-body .body-biomarkers .gauge-value .gauge-unit{font-size:.65em;font-weight:500}
@media(max-width:430px){body #sante-dashboard .body-trends-grid{gap:8px}body #sante-dashboard .body-trends-grid h4{font-size:13px}body #sante-dashboard .body-trends-controls{gap:6px}body #sante-dashboard .body-trends-controls button,body #sante-dashboard .body-trends-controls select{font-size:12px;padding:7px}}

body #sante-dashboard .energy-period-controls{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:16px 0}
body #sante-dashboard .energy-period-controls label{display:grid;gap:6px;font-size:13px;min-width:0}
body #sante-dashboard .energy-period-controls input,body #sante-dashboard .energy-period-controls select{min-height:44px;max-width:100%;box-sizing:border-box}
@media(max-width:520px){body #sante-dashboard .energy-period-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}body #sante-dashboard .energy-period-controls label:first-child{grid-column:1/-1}body #sante-dashboard .energy-period-controls button{grid-column:1/-1}}

body #sante-dashboard .energy-history-toolbar{display:flex;align-items:start;justify-content:space-between;flex-wrap:wrap;gap:12px;margin-top:12px}
body #sante-dashboard .energy-period-picker{flex:1;min-width:220px}
body #sante-dashboard .energy-period-picker summary{min-height:44px;padding:10px 0;font-size:14px}
body #sante-dashboard .energy-difference-control{display:flex;align-items:center;gap:8px;min-height:44px;font-size:13px}
body #sante-dashboard .energy-difference-control input{width:18px;height:18px}
body #sante-dashboard .energy-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;margin-top:16px}
body #sante-dashboard .energy-history-table{width:100%;min-width:620px;border-collapse:collapse;font-variant-numeric:tabular-nums}
body #sante-dashboard .energy-history-table th,body #sante-dashboard .energy-history-table td{text-align:right;padding:10px 12px;border-bottom:1px solid color-mix(in srgb,currentColor 12%,transparent);font-weight:400;vertical-align:top;white-space:nowrap}
body #sante-dashboard .energy-history-table th:first-child{text-align:left;padding-left:8px;position:sticky;left:0;background:var(--surface);z-index:1;font-size:14px}
body #sante-dashboard .energy-history-table thead th{font-size:12px}
body #sante-dashboard .energy-history-table thead b{display:block;font-weight:600;font-size:14px;margin-bottom:4px}
body #sante-dashboard .energy-history-table thead span{opacity:.75}
body #sante-dashboard .energy-history-table .energy-chosen{background:color-mix(in srgb,var(--weight-curve,#8fb9ee) 9%,transparent);font-weight:600}
body #sante-dashboard .energy-unit{font-size:12px;font-weight:400;opacity:.75}
body #sante-dashboard .energy-table-difference{display:block;font-weight:400;font-size:12px;opacity:.75;margin-top:6px}
body #sante-dashboard .energy-coverage{margin-top:18px;font-size:12px;opacity:.8}
body #sante-dashboard .energy-coverage summary{min-height:44px;padding:12px 0}
body #sante-dashboard .energy-coverage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:8px}
@media(max-width:520px){body #sante-dashboard .energy-coverage-grid{grid-template-columns:minmax(0,1fr)}body #sante-dashboard .energy-period-picker{min-width:0;flex-basis:100%}}

body #sante-dashboard .energy-table-difference[hidden],body #sante-dashboard .energy-difference-legend[hidden]{display:none!important}

/* Slightly tighter spacing between sections, preserving their internal layout. */
.quickbar{margin-bottom:12px}
body #sante-dashboard .shell{margin-top:16px}
body #sante-dashboard nav{margin-bottom:16px}
body #sante-dashboard [role=tabpanel]>.box{margin-bottom:6px}
body #sante-dashboard #s-today>.box{margin-top:8px!important;margin-bottom:8px}
body #sante-dashboard .withings>.anthracite{margin-bottom:8px}

/* Compact dark background behind section titles (approved variant 2). */

body #sante-dashboard .box>h3,body #sante-dashboard .week-section-header>h3,body #sante-dashboard .anthracite>h3,body #sante-dashboard .body-reading>b:first-child{display:inline-block;max-width:100%;padding:8px 13px;background:var(--section-title-bg);border-radius:8px;margin-top:0;margin-bottom:14px;box-sizing:border-box;overflow-wrap:anywhere}
body #sante-dashboard .body-reading>b:first-child{background:#0b0e12;margin-bottom:4px}

body #sante-dashboard .average-target{display:block;font-size:12px;font-weight:400;opacity:.75;margin-top:4px}

body #sante-dashboard .balance-consumed-label{font-size:16px;font-weight:400;letter-spacing:0}

/* Move the requested complete panels closer to their preceding panels. */
body #sante-dashboard #s-today>.meal-log{margin-top:0!important}
body #sante-dashboard #s-gly>.gly-inspector,
body #sante-dashboard .withings>.body-biomarkers,
body #sante-dashboard #s-energy>.energy-breakdown,
body #sante-dashboard #s-energy>.expense-comparison,
body #sante-dashboard #s-energy>.energy-history,
body #sante-dashboard #s-week>.week-energy-balance,
body #sante-dashboard #s-week>.week-overview,
body #sante-dashboard #s-week>.nutrition-regularity,
body #sante-dashboard #s-week>.average-panel,
body #sante-dashboard #s-progress>.training-calendar{margin-top:-6px}
body #sante-dashboard .week-report-options{margin-top:-6px}
body #sante-dashboard .week-report-options>label{margin-top:6px!important;margin-bottom:6px!important}
body #sante-dashboard .gly-meal-group>.row>strong{font-size:17px;line-height:1.4;font-weight:600}
body #sante-dashboard .gly-cg-total{font-size:26px}
body #sante-dashboard .gly-ig-total{font-size:20px}
@media(max-width:360px){body #sante-dashboard .gly-meal-group>.row>strong{font-size:16px}body #sante-dashboard .gly-cg-total{font-size:23px}body #sante-dashboard .gly-ig-total{font-size:19px}}

@media(max-width:600px){body #sante-dashboard .energy-history-table th,body #sante-dashboard .energy-history-table td{padding:8px 6px!important}}

.quickbar-actions>.sheet-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:9px 12px;font:inherit;font-size:13px;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:12px;text-decoration:none;white-space:nowrap}
.quickbar-actions>.sheet-link:hover{background:var(--surface-raised)}
@media(max-width:600px){.quickbar-actions>.sheet-link{font-size:12px}}
@media(max-width:430px){.quickbar-actions>.sheet-link{flex:1;padding:9px 8px}}

/* All primary actions share the header with display and installation controls. */
body>header{flex-wrap:wrap;align-items:center}
body>header>div:first-child{flex:0 0 auto}
body>header .header-actions{display:flex;min-width:0;max-width:100%;align-items:center;flex-wrap:wrap}
body>header .header-actions>button,body>header .header-actions>.sheet-link{min-height:44px;font-size:13px;padding:9px 12px}
.google-sync-status{font-size:12px;line-height:1.4;color:var(--secondary);max-width:none;margin:6px 0 10px}

@media(max-width:600px){body>header .header-actions>button,body>header .header-actions>.sheet-link{font-size:12px;padding:9px 10px}}

body #sante-dashboard .date-row{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
body #sante-dashboard .date-row .day-selector{flex:0 1 auto;min-width:0}
body #sante-dashboard .date-row #s-day-display{min-width:0;white-space:normal}
body #sante-dashboard .date-row #today{flex:0 0 auto;white-space:nowrap;min-height:46px}

body>header{position:relative;padding-right:16px}
@media(max-width:600px){body>header{padding-right:10px}}

/* Let actual content width determine when header actions wrap. */
body>header{gap:8px;justify-content:flex-start}
body>header .header-actions{flex:0 1 auto;gap:6px}
body>header h1{white-space:nowrap}
body #sante-dashboard nav button{font-size:15px!important}
body #sante-dashboard nav button span{min-width:0;overflow-wrap:anywhere}
@media(max-width:600px){body #sante-dashboard nav button{font-size:14px!important}}
@media(max-width:360px){body #sante-dashboard nav button{font-size:13px!important}}

/* Keep the action group and every wrapped line aligned to the right. */
body>header .header-actions{margin-left:auto;justify-content:flex-end}
body>header .header-actions>button,body>header .header-actions>.sheet-link{flex:0 0 auto}

body>header.actions-wrapped .header-actions{flex:0 1 100%;margin-left:0;justify-content:flex-start}
body #sante-dashboard #update-note:empty{display:none}

body>header{column-gap:20px}
body>header .header-actions>.theme-toggle{position:static;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid var(--line);border-radius:50%;background:transparent;color:var(--text);flex:0 0 36px}
body>header .theme-toggle svg{display:block;pointer-events:none}
body>header .theme-toggle svg[hidden]{display:none!important}
@media(pointer:coarse){body>header .header-actions>.theme-toggle{width:44px;height:44px;min-height:44px;flex-basis:44px}}
.google-sync-status:empty{display:none}
body #sante-dashboard #s-gly>.gly-inspector{margin-top:-14px}
body #sante-dashboard .gly-cg-total,body #sante-dashboard .gly-ig-total{font-size:22px;font-weight:600;line-height:1.3;letter-spacing:-.3px;margin:5px 0}
@media(max-width:360px){body #sante-dashboard .gly-cg-total,body #sante-dashboard .gly-ig-total{font-size:21px}}

/* Bring the date selector closer to the application header. */
body>main{padding-top:10px}
body #sante-dashboard{padding-top:0!important}
body #sante-dashboard .date-row{margin-top:6px}

body #sante-dashboard nav .training-passage-count{white-space:nowrap}
body #sante-dashboard #s-progress .lafay-alert p.small,body #sante-dashboard #s-progress .lafay-alert ul.small{font-size:15px!important;line-height:1.6}
body #sante-dashboard #s-progress .lafay-alert .lafay-deadline{font-size:16px;font-weight:600}

body #sante-dashboard nav .training-passage-count{display:inline-flex;align-items:center;justify-content:center;min-width:19px;height:19px;margin-left:5px;padding:0 4px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-size:11px;font-weight:600;line-height:1;vertical-align:middle}
.training-opening-notice{width:calc(100% - 32px);max-width:440px;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--app-bg);color:var(--text);box-sizing:border-box}
.training-opening-notice::backdrop{background:#06090db8}
.training-opening-notice .training-notice-kicker{font-size:12px;letter-spacing:.06em;color:var(--secondary);margin-bottom:12px}
.training-opening-notice h2{font-size:23px;line-height:1.3;font-weight:600;letter-spacing:-.2px;margin:0 0 14px}
.training-opening-notice p{margin:10px 0;color:var(--text)}
.training-opening-notice .training-notice-meta{font-size:12px;color:var(--secondary)}
.training-opening-notice .training-notice-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.training-opening-notice button{min-height:44px;font-size:13px;padding:9px 14px}
@media(max-width:480px){.training-opening-notice{padding:20px}.training-opening-notice .training-notice-actions{flex-direction:column}}

/* Keep the Lafay accent aligned with its text and bring the calendar closer. */
body #sante-dashboard #s-progress .lafay-alert{position:relative;padding:0 16px;border-left:0;margin-bottom:4px}
body #sante-dashboard #s-progress .lafay-alert::before{content:"";position:absolute;left:0;top:8px;bottom:4px;width:3px;background:var(--line)}
body #sante-dashboard #s-progress .lafay-alert[data-state=review]::before,body #sante-dashboard #s-progress .lafay-alert[data-state=soon]::before{background:var(--accent)}
body #sante-dashboard #s-progress .lafay-alert>:last-child{margin-bottom:0}
body #sante-dashboard #s-progress .lafay-alert+.training-calendar{margin-top:10px;padding-top:8px}

body #sante-dashboard .lafay-passage-check{color:#39a96b;font-weight:700}

body #sante-dashboard #s-progress .lafay-alert>h3{margin-bottom:6px}
body #sante-dashboard #s-progress .lafay-alert>.lafay-passage-info{margin-top:0}

body #sante-dashboard #s-energy .energy-balance .number{font-size:22px!important}
@media(max-width:600px){body #sante-dashboard #s-energy .energy-balance .number{font-size:21px!important}}

body #sante-dashboard #s-energy .energy-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px}
body #sante-dashboard #s-energy .energy-summary>.box{min-width:0;padding-left:4px;padding-right:4px}
@media(max-width:320px){body #sante-dashboard #s-energy .energy-summary{grid-template-columns:1fr!important}}

body #sante-dashboard #s-energy .expense-comparison .number,body #sante-dashboard #s-week .week-overview .number,body #sante-dashboard #s-week .nutrition-regularity .number{font-size:22px!important}
@media(max-width:600px){body #sante-dashboard #s-energy .expense-comparison .number,body #sante-dashboard #s-week .week-overview .number,body #sante-dashboard #s-week .nutrition-regularity .number{font-size:21px!important}}

body #sante-dashboard #s-progress .lafay-mini-gauges{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 18px;max-width:300px;margin-top:10px;margin-bottom:20px}
body #sante-dashboard .lafay-mini-exercise{min-width:0}
body #sante-dashboard .lafay-mini-label{font-size:12px;line-height:1.5;color:var(--secondary);margin-bottom:3px;overflow-wrap:anywhere}
body #sante-dashboard .lafay-mini-track{height:4px;border-radius:3px;background:color-mix(in srgb,var(--accent) 15%,var(--app-bg));overflow:hidden}
body #sante-dashboard .lafay-mini-track>span{display:block;height:100%;border-radius:3px;background:var(--accent)}
body #sante-dashboard #s-progress .lafay-alert:has(.lafay-mini-gauges)>h3{margin-bottom:0}

body #sante-dashboard #s-today .macro .row>span,body #sante-dashboard #s-today .macro .small strong{font-weight:700}

body #sante-dashboard .week-section-header{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:4px 18px;margin-bottom:10px}
body #sante-dashboard .week-section-header>h3{margin-bottom:0}
body #sante-dashboard .week-section-header>label{margin:0!important;white-space:nowrap}
body #sante-dashboard .week-section-header>p{flex-basis:100%;margin:0}

/* One rolling period shared by all Bilan sections. */
body #sante-dashboard .bilan-period-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px 16px;margin:0 0 4px;padding-inline:16px;box-sizing:border-box}
body #sante-dashboard .bilan-period-toolbar label{display:flex;align-items:center;gap:10px;font-weight:600}
body #sante-dashboard .bilan-period-toolbar select{font:inherit;color:var(--text);background:var(--app-bg);border:1px solid var(--line);border-radius:9px;padding:8px 12px;min-height:42px}

body #sante-dashboard .bilan-energy-line{font-size:22px;line-height:1.5;margin:6px 0;font-variant-numeric:tabular-nums}
body #sante-dashboard .bilan-energy-line b{font-weight:600}

/* Compact shared header and persistent read timestamp. */
body>header .brand-title{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap}
.sync-state{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:400;color:var(--secondary);white-space:nowrap;letter-spacing:0}
.sync-state::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--secondary);flex:none}
.sync-state[data-state=read]::before{background:#73b5a5}
.sync-state[data-state=error]::before,.sync-state[data-state=partial]::before{background:#d6a355}
@media(max-width:600px){
 body>header{padding-top:10px;padding-bottom:10px;gap:5px}
 body>header h1{margin:2px 0;font-size:23px}
 body>header .eyebrow{font-size:9px}
 body>header>div:first-child{padding-right:42px;max-width:100%}
 body>header.actions-wrapped .header-actions{flex-wrap:nowrap;overflow-x:auto;max-width:100%;scrollbar-width:thin;gap:5px;padding-bottom:1px}
 body>header .header-actions>button,body>header .header-actions>.sheet-link{padding:8px;font-size:12px;min-height:44px}
 body>header .header-actions>.theme-toggle{position:absolute;right:10px;top:12px;width:36px;height:36px;min-height:36px;padding:0}
}
/* The indicator column stays visible while period columns scroll. */
body #sante-dashboard .energy-table-scroll .energy-history-table th:first-child{position:sticky;left:0;z-index:2;background:var(--app-bg);box-shadow:1px 0 0 var(--line)}
body #sante-dashboard .energy-table-scroll .energy-history-table thead th:first-child{z-index:3}

/* Seven tabs retain their order and use two rows on phones. */
body #sante-dashboard nav{grid-template-columns:repeat(7,minmax(0,1fr))}
@media(min-width:601px) and (max-width:900px){body #sante-dashboard nav{grid-template-columns:repeat(12,minmax(0,1fr))}body #sante-dashboard nav button:nth-child(-n+3){grid-column:span 4}body #sante-dashboard nav button:nth-child(n+4){grid-column:span 3}}
@media(max-width:600px){body #sante-dashboard nav{grid-template-columns:repeat(12,minmax(0,1fr))}body #sante-dashboard nav button:nth-child(-n+3){grid-column:span 4}body #sante-dashboard nav button:nth-child(n+4){grid-column:span 3}body #sante-dashboard nav button:nth-child(n+4){font-size:13px!important;padding-left:2px;padding-right:2px}}
@media(max-width:360px){body #sante-dashboard nav button:nth-child(n+4){font-size:12px!important}}






body #sante-dashboard .body-trends-grid{display:block}
body #sante-dashboard .body-trends-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:12px 0}
body #sante-dashboard .body-trends-legend button{background:transparent!important;border:0!important;min-height:40px;padding:5px 0;color:var(--secondary)!important;font:inherit}
body #sante-dashboard .body-trends-legend button[aria-pressed=true]{font-weight:600;color:var(--text)!important}
body #sante-dashboard .body-trends-legend .series-swatch{display:inline-block;width:18px;height:3px;margin-right:7px;vertical-align:middle}
body #sante-dashboard .body-trends-mode-note{font-size:12px;color:var(--secondary);margin:6px 0}
body #sante-dashboard .body-trends-expand{margin-left:auto}
body .body-trends-dialog{width:min(1100px,calc(100vw - 24px));max-width:none;max-height:92dvh;overflow:auto;padding:18px}
body .body-trends-dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
body .body-trends-dialog .dialog-heading h3{font-size:18px;margin:0}
body .body-trends-dialog .body-trends{margin-top:8px}
body .body-trends-dialog .body-trends-controls{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
body .body-trends-dialog .body-trends-legend{display:flex;flex-wrap:wrap;gap:12px}
body .body-trends-dialog .body-trends-legend button{background:transparent;border:0;padding:8px;font:inherit}
body .body-trends-dialog .series-swatch{display:inline-block;width:18px;height:3px;margin-right:7px}
body .body-trends-dialog .weight-average-controls{display:flex;flex-wrap:wrap;gap:12px}
body .body-trends-dialog .body-trends-plot svg{display:block;width:100%;height:400px}
body .body-trends-dialog .body-trends-mode-note{font-size:12px;color:var(--secondary)}
body .body-trends-dialog circle[data-body-measure]:focus{outline:none}
body #sante-dashboard .body-trends-controls button{min-width:44px;flex-shrink:0}
@media(max-width:360px){body #sante-dashboard nav button:nth-child(n+4){padding-left:0!important;padding-right:0!important;letter-spacing:-.2px}}

.body-trends-legend label{display:inline-flex;align-items:center;gap:8px;cursor:pointer;padding:6px 0}.body-trends-grid{width:100%;grid-template-columns:minmax(0,1fr)}.body-trends-plot{padding-inline:0}



body #sante-dashboard .body-trends-viewport,body .body-trends-dialog .body-trends-viewport{overflow-x:auto;overscroll-behavior-x:contain;margin-top:8px;min-width:0}body #sante-dashboard .body-trends-viewport svg,body .body-trends-dialog .body-trends-viewport svg{max-width:none;overflow:hidden}.body-trends-plot{min-width:0}

/* Both body charts share exactly the same scrollbar appearance. */
body #sante-dashboard .body-chart-scroll,body .body-trends-dialog .body-chart-scroll{overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#77777f #222224!important}
.body-chart-scroll::-webkit-scrollbar{height:6px}.body-chart-scroll::-webkit-scrollbar-thumb{background:#77777f;border-radius:4px}.body-chart-scroll::-webkit-scrollbar-track{background:#222224}

body #sante-dashboard .bilan-period-info{position:relative;flex:none;font-family:inherit;color:var(--secondary)}
body #sante-dashboard .bilan-period-info summary{display:inline-flex;align-items:center;justify-content:center;width:34px;height:40px;cursor:pointer;list-style:none;user-select:none;border-radius:8px}
body #sante-dashboard .bilan-period-info summary::-webkit-details-marker{display:none}
body #sante-dashboard .bilan-info-symbol{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:1.4px solid currentColor;border-radius:50%;font-family:inherit;font-size:12px;font-weight:600;line-height:1;padding:0}
body #sante-dashboard .bilan-period-info summary:hover,body #sante-dashboard .bilan-period-info[open] summary{color:var(--text);background:color-mix(in srgb,var(--text) 6%,transparent)}
body #sante-dashboard .bilan-period-info summary:focus-visible{outline:2px solid var(--weight-curve);outline-offset:2px}
body #sante-dashboard .bilan-info-tooltip{position:fixed;z-index:1000;width:max-content;max-width:min(300px,calc(100vw - 24px));box-sizing:border-box;padding:10px 13px;border:1px solid var(--line);border-radius:10px;background:var(--app-bg);color:var(--text);box-shadow:0 6px 20px #0003;font-family:inherit;font-size:13px;font-weight:400;line-height:1.5;white-space:normal;text-align:left}

/* Show the intermediate-stage marker only for the current matching programme. */
body #sante-dashboard .lafay-intermediate-level strong{color:#b8e1c0;font-weight:700}

body #sante-dashboard .body-rolling-line{display:flex;align-items:baseline;gap:4px;margin-top:6px;position:relative}
body #sante-dashboard .body-measure-info{position:relative;display:inline-block;flex:none;color:var(--secondary)}
body #sante-dashboard .body-measure-info summary{display:inline-flex;align-items:center;justify-content:center;width:30px;min-height:32px;list-style:none;cursor:pointer}
body #sante-dashboard .body-measure-info summary::-webkit-details-marker{display:none}
body #sante-dashboard .body-measure-tooltip{display:none;position:absolute;right:0;top:100%;z-index:30;width:270px;max-width:calc(100vw - 48px);padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--app-bg);color:var(--text);box-shadow:0 6px 20px #0003;line-height:1.5;font-size:13px;font-weight:400}
body #sante-dashboard .body-measure-info[open] .body-measure-tooltip{display:block}

body #sante-dashboard .body-sparse{color:var(--secondary)}

body #sante-dashboard .monthly-weight{margin-top:18px}
body #sante-dashboard .monthly-weight h4{margin:0 0 10px;font-size:16px;font-weight:600}
body #sante-dashboard .monthly-weight-scroll{overflow-x:auto;overflow-y:hidden;padding:12px 0 0}
body #sante-dashboard .monthly-weight-chart{display:flex;position:relative;min-width:260px;gap:8px;padding:0 30px;background:linear-gradient(to bottom,transparent calc(90px - .5px),var(--line) 90px,transparent calc(90px + .5px))}
body #sante-dashboard .monthly-zero{position:absolute;left:0;top:81px;color:var(--secondary);font-size:11px}
body #sante-dashboard .monthly-weight-item{flex:1;min-width:135px;text-align:center}
body #sante-dashboard .monthly-weight-item summary{list-style:none;cursor:pointer;border-radius:6px}
body #sante-dashboard .monthly-weight-item summary::-webkit-details-marker{display:none}
body #sante-dashboard .monthly-weight-item summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
body #sante-dashboard .monthly-weight-plot{display:block;height:180px;position:relative}
body #sante-dashboard .monthly-weight-bar{position:absolute;left:50%;transform:translateX(-50%);width:32px;max-width:55%;border-radius:4px;background:#45afba}
body #sante-dashboard .monthly-weight-item.is-partial .monthly-weight-bar{background:repeating-linear-gradient(135deg,transparent 0 5px,#397e8740 5px 7px),#a1cbd0}
body #sante-dashboard .monthly-weight-value{position:absolute;left:0;right:0;font-size:13px;color:var(--text);font-weight:600;white-space:nowrap}
body #sante-dashboard .monthly-weight-label{display:block;font-size:13px;margin-top:2px}
body #sante-dashboard .monthly-weight-status{display:block;font-size:11px;color:var(--secondary)}
body #sante-dashboard .monthly-weight-detail{display:block;font-size:12px;padding:7px 2px;color:var(--secondary)}
body #sante-dashboard .monthly-weight-note{margin:10px 0 0;font-size:12px}

/* Global, collapsible interpretation between date and navigation. */
body #sante-dashboard #global-reading{background:var(--reading-bg);margin:8px 0 12px;padding:14px 16px;font-size:15px;line-height:1.65}
body #sante-dashboard #global-reading summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;font-size:15px}
body #sante-dashboard #global-reading summary::-webkit-details-marker{display:none}
body #sante-dashboard #global-reading summary:focus-visible{outline:2px solid var(--accent,#8fb9ee);outline-offset:5px;border-radius:4px}
body #sante-dashboard #global-reading .reading-toggle::after{content:'Développer ⌄';font-size:12px;color:var(--secondary);white-space:nowrap}
body #sante-dashboard #global-reading[open] .reading-toggle::after{content:'Réduire ⌃'}
body #sante-dashboard #global-reading p{font-size:14px;line-height:1.65;margin:6px 0}

/* Global, collapsible interpretation between date and navigation. */
body #sante-dashboard #weight-reading{background:var(--reading-bg);margin:8px 0 12px;padding:14px 16px;font-size:15px;line-height:1.65}
body #sante-dashboard #weight-reading summary{display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;font-size:15px}
body #sante-dashboard #weight-reading summary::-webkit-details-marker{display:none}
body #sante-dashboard #weight-reading summary:focus-visible{outline:2px solid var(--accent,#8fb9ee);outline-offset:5px;border-radius:4px}
body #sante-dashboard #weight-reading .reading-toggle::after{content:'Développer ⌄';font-size:12px;color:var(--secondary);white-space:nowrap}
body #sante-dashboard #weight-reading[open] .reading-toggle::after{content:'Réduire ⌃'}
body #sante-dashboard #weight-reading p{font-size:14px;line-height:1.65;margin:6px 0}

/* Quiet disclosure controls, matching the dashboard typography. */
body #sante-dashboard :is(#global-reading,#weight-reading) summary{-webkit-tap-highlight-color:transparent;user-select:none;background:transparent;box-shadow:none}
body #sante-dashboard :is(#global-reading,#weight-reading) summary:is(:hover,:active,:focus:not(:focus-visible)){background:transparent;box-shadow:none;outline:none}
body #sante-dashboard :is(#global-reading,#weight-reading) .reading-toggle{display:inline-flex;align-items:center;gap:7px;flex-shrink:0;color:var(--secondary);font-size:12px;line-height:1.3}
body #sante-dashboard :is(#global-reading,#weight-reading) .reading-toggle::before{content:'Développer'}
body #sante-dashboard :is(#global-reading,#weight-reading)[open] .reading-toggle::before{content:'Réduire'}
body #sante-dashboard :is(#global-reading,#weight-reading) .reading-toggle::after{content:'';display:block;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg)}
body #sante-dashboard :is(#global-reading,#weight-reading)[open] .reading-toggle::after{content:'';transform:translateY(2px) rotate(225deg)}

/* Compact 7/14-day lines with a discreet information marker. */
body #sante-dashboard .body-rolling-line{margin-top:2px;line-height:1.5}
body #sante-dashboard .body-measure-info summary{width:20px;min-height:20px;height:20px;vertical-align:middle;-webkit-tap-highlight-color:transparent}
body #sante-dashboard .body-measure-info .bilan-info-symbol{width:13px;height:13px;font-size:9px;border-width:1px;font-weight:600}
body #sante-dashboard .body-measure-info summary:focus-visible{outline:2px solid var(--weight-curve);outline-offset:2px;border-radius:4px}

body #sante-dashboard #s-body .body-biomarkers .gauge.has-gauge-note{margin-top:82px}
body #sante-dashboard #s-body .body-biomarkers .has-gauge-note .gauge-value{top:auto;bottom:calc(100% + 22px);left:var(--gauge-position)!important;width:max-content;max-width:100%;text-align:center}
body #sante-dashboard #s-body .body-biomarkers .gauge-comparison{display:block;font-size:12px;font-weight:400;line-height:1.5;margin-top:1px;color:var(--secondary);white-space:normal;text-align:center}

body #sante-dashboard .monthly-trend{position:absolute;left:30px;top:0;width:calc(100% - 60px);height:180px;color:#7d969a;opacity:.5;pointer-events:none;z-index:0}
body #sante-dashboard .monthly-weight-item{position:relative;z-index:1}
body #sante-dashboard .monthly-trend-scale{position:absolute;right:0;font-size:10px;color:var(--secondary);pointer-events:none}
body #sante-dashboard .monthly-trend-high{top:8px}
body #sante-dashboard .monthly-trend-low{top:157px}
body #sante-dashboard .monthly-trend-legend{font-size:11px;color:var(--secondary);margin-bottom:6px}

body #sante-dashboard .body-muscle-title{color:var(--body-muscle-line)}
body #sante-dashboard .body-fat-title{color:var(--body-fat-line)}
body #sante-dashboard .gly-foods[open]>summary{padding-bottom:3px;min-height:36px}
body #sante-dashboard .gly-foods>.gly-food-detail:first-of-type{margin-top:2px;padding-top:8px}

body #sante-dashboard .monthly-weight{margin-bottom:22px}

body #sante-dashboard .day-selector{cursor:pointer;-webkit-tap-highlight-color:transparent}
body #sante-dashboard .day-selector:focus-within,body #sante-dashboard .day-selector input[type=date]:focus,body #sante-dashboard .day-selector input[type=date]:focus-visible{outline:none!important;box-shadow:none!important}
body #sante-dashboard .day-selector:has(input:focus-visible){border-color:var(--weight-curve)}

body #sante-dashboard .day-selector input[type=date]{display:none}
body #sante-dashboard .day-selector:focus,body #sante-dashboard .day-selector:focus-visible{outline:none!important;box-shadow:none!important}
.sante-date-calendar{width:310px;max-width:calc(100vw - 32px);padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface,#202a33);color:var(--text,#eee);font-family:inherit;font-size:14px;line-height:1.4;box-shadow:0 16px 50px #0005}
.sante-date-calendar::backdrop{background:#0005}
.sante-date-calendar button{font:inherit;color:inherit;background:transparent;border:0;border-radius:7px;cursor:pointer;-webkit-tap-highlight-color:transparent;box-shadow:none}
.sante-date-calendar button:disabled{opacity:.25;cursor:default}
.sante-date-calendar button:focus{outline:none!important;box-shadow:none!important}
.sante-date-calendar button:focus-visible{background:var(--section-title-bg,#11151a)}
.calendar-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.calendar-heading strong{text-transform:capitalize;font-weight:600}.calendar-heading button{font-size:25px;width:36px;height:36px}
.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px;text-align:center}.calendar-weekdays{color:var(--secondary,#b7c0ca);font-size:12px;margin-bottom:6px}.calendar-days button{height:34px;font-size:14px}.calendar-days button:not(:disabled):hover{background:var(--section-title-bg,#11151a)}.calendar-days button[aria-pressed=true]{background:var(--weight-curve,#8ab7e9)!important;color:#14212b;font-weight:600}.calendar-days button[aria-current=date]:not([aria-pressed=true]){box-shadow:inset 0 -2px var(--weight-curve,#8ab7e9)}
.calendar-footer{display:flex;justify-content:space-between;gap:12px;margin-top:14px}.calendar-footer button{padding:7px 9px;font-size:12px;color:var(--secondary,#b7c0ca)}

/* Compact disclosures and consistent graph controls. */
body #sante-dashboard :is(#global-reading,#weight-reading){background:#252a30}
body #sante-dashboard :is(#global-reading,#weight-reading) summary{justify-content:flex-start;gap:9px}
body #sante-dashboard :is(#global-reading,#weight-reading) .reading-toggle::before{content:none!important}
body #sante-dashboard .weight-chart-dialog{width:min(1100px,94vw);max-width:94vw;background:var(--app-bg);color:var(--text);border:1px solid var(--line);border-radius:14px;padding:20px}
body #sante-dashboard .weight-chart-dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}

body #sante-dashboard :is(#global-reading,#weight-reading):not([open]){width:fit-content;max-width:100%;display:block}
body #sante-dashboard :is(#global-reading,#weight-reading)[open]{width:100%;box-sizing:border-box}
body #sante-dashboard .chart-expand-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;color:var(--text);background:var(--surface-raised);border:1px solid var(--line);border-radius:8px}
body #sante-dashboard .chart-expand-button[hidden]{display:none}
body #sante-dashboard .chart-expand-button svg{display:block;width:20px;height:20px}
body #sante-dashboard .body-trends-expand{margin-left:0;order:0}
body #sante-dashboard .body-visible-days{color:var(--secondary)}
body #sante-dashboard .weight-chart-dialog .chart{max-height:none!important}

.sante-date-calendar[open]{animation:calendar-reveal .18s ease-out}
@keyframes calendar-reveal{from{opacity:0;transform:translateY(5px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.sante-date-calendar .calendar-days button{display:grid;place-items:center;padding:0;min-height:36px;height:36px;line-height:1;box-sizing:border-box}
@media(prefers-reduced-motion:reduce){.sante-date-calendar[open]{animation:none}}

/* Compact expansion icons aligned with chart controls. */
body #sante-dashboard .chart-zoom-controls{align-items:center}
body #sante-dashboard .chart-zoom-controls>label{display:inline-flex;align-items:center;gap:6px;margin:0}
body #sante-dashboard .chart-expand-button{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;align-self:center}
body #sante-dashboard .chart-expand-button svg{width:17px;height:17px}

body #sante-dashboard .gly-timeline-scroll{height:14px;min-height:14px;margin:4px 0 6px;overflow-y:hidden;touch-action:pan-x}
body #sante-dashboard #s-body .body-biomarkers .has-gauge-note .gauge-value{bottom:calc(100% + 26px)}

/* Both analysis panels use the weight analysis background, including nested cards. */
body #sante-dashboard :is(#global-reading,#weight-reading){background:var(--reading-bg)!important}

body #sante-dashboard :is(#global-reading,#weight-reading),body #sante-dashboard :is(#global-reading,#weight-reading) summary,body #sante-dashboard :is(#global-reading,#weight-reading) p{color:var(--text)!important}

body #sante-dashboard .lafay-mini-track.is-achieved>span{background:#a7dcb8}

body #sante-dashboard .pastel-surplus{color:#f2b2b2!important}
[data-theme=light] body #sante-dashboard .pastel-surplus{color:#a74747!important}

/* Unit styling keeps its size but inherits the highlighted total colour. */
body #sante-dashboard .pastel-surplus .value-unit{color:inherit!important}

/* Keep the weight chart close to its controls. */
body #sante-dashboard .chart-zoom-controls:has(+ #s-weight-scroll){margin-bottom:0!important}
body #sante-dashboard #s-weight-scroll{margin-top:0!important}

body #sante-dashboard .calculator-inputs{gap:12px;margin-bottom:18px}
body #sante-dashboard .calculator-result{display:flex;flex-wrap:wrap;align-items:center;gap:18px 28px}
body #sante-dashboard .calculator-factor{display:flex;flex-direction:column;gap:6px;font-size:13px}
body #sante-dashboard .calculator-factor input{width:115px;max-width:100%;padding:9px 12px;font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:8px}
@media(max-width:480px){body #sante-dashboard .calculator-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}body #sante-dashboard .calculator-result{gap:16px}}

body #sante-dashboard .maintenance-calculator .calculator-result .medium{font-size:19px;line-height:1.35;font-weight:600}

body #sante-dashboard #s-today .macro:nth-of-type(4) .bar .lipid-saturated{background:#c47a29!important;border-radius:0!important}

body #sante-dashboard .diversity-reading{width:100%;max-width:none}body #sante-dashboard .diversity-reading p{width:100%;max-width:none;margin:12px 0;line-height:1.6}body #sante-dashboard .diversity-panel details{margin-top:16px}
body #sante-dashboard .meal-moment{border-bottom:1px solid var(--line);padding:4px 0}
body #sante-dashboard .meal-moment>summary{display:flex;align-items:center;gap:10px;min-height:48px;cursor:pointer;list-style:none;font-weight:550}
body #sante-dashboard .meal-moment>summary::-webkit-details-marker{display:none}
body #sante-dashboard .meal-moment>summary::before{content:'›';display:inline-block;transition:transform .15s}
body #sante-dashboard .meal-moment[open]>summary::before{transform:rotate(90deg)}
body #sante-dashboard .meal-moment>summary>.small{margin-left:auto;font-weight:400}
body #sante-dashboard .meal-moment table{width:100%;table-layout:fixed}
body #sante-dashboard .meal-moment td:first-child{width:52px}
body #sante-dashboard .meal-moment td:last-child{width:78px;text-align:right}
body #sante-dashboard .meal-moment td{overflow-wrap:anywhere;vertical-align:top}
body #sante-dashboard .meal-quantities{margin-top:5px;color:var(--secondary)}
body #sante-dashboard .bilan-section-disclosure>summary{display:flex;align-items:center;justify-content:flex-start;gap:9px;min-height:44px;width:fit-content;max-width:100%;box-sizing:border-box;padding:12px 16px;background:var(--reading-bg);border-radius:8px;cursor:pointer;list-style:none;-webkit-tap-highlight-color:transparent;user-select:none}
body #sante-dashboard .bilan-section-disclosure>summary::-webkit-details-marker{display:none}
body #sante-dashboard .bilan-section-disclosure>summary>h3{margin:0;padding:0;background:transparent;font-size:15px;min-width:0;overflow-wrap:anywhere}
body #sante-dashboard .bilan-section-toggle{display:inline-flex;align-items:center;flex-shrink:0;color:var(--secondary)}
body #sante-dashboard .bilan-section-toggle::after{content:'';display:block;width:7px;height:7px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg)}
body #sante-dashboard .bilan-section-disclosure[open]>summary .bilan-section-toggle::after{transform:translateY(2px) rotate(225deg)}
body #sante-dashboard .bilan-section-disclosure>summary:focus-visible{outline:2px solid var(--accent);outline-offset:5px}
body #sante-dashboard .bilan-section-content{padding-top:12px}
body #sante-dashboard #s-energy .maintenance-calculator{padding:14px 16px;margin-top:16px}
body #sante-dashboard #s-energy .maintenance-calculator>h3{font-size:14px;padding:5px 8px;margin-bottom:10px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-result{gap:12px 20px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-result .medium{font-size:16px;line-height:1.3;font-weight:550}
body #sante-dashboard #s-energy .maintenance-calculator :is(.small,.calculator-factor){font-size:12px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-factor input{width:90px;min-height:40px;padding:6px 9px}
body #sante-dashboard #s-energy .maintenance-calculator>p{margin:10px 0 0}
@media(max-width:600px){body #sante-dashboard #s-energy .maintenance-calculator .calculator-factor input{font-size:16px}}

@media(max-width:600px){body #sante-dashboard .bilan-period-toolbar{padding-inline:12px}}

body #sante-dashboard .diversity-panel>.bilan-section-disclosure{margin-top:0}
body #sante-dashboard .nova-repartition{margin:12px 0 16px}
body #sante-dashboard .nova-repartition h4{margin:0 0 6px;font-size:15px}
body #sante-dashboard .nova-headline{margin:10px 0;font-size:13px}
body #sante-dashboard .nova-headline b{font-size:19px}
body #sante-dashboard .nova-stack{display:flex;height:9px;border-radius:4px;overflow:hidden;margin:10px 0}
body #sante-dashboard .nova-stack span{display:block;height:100%}
body #sante-dashboard .nova-repartition table{width:100%;table-layout:fixed}
body #sante-dashboard .nova-repartition th{font-weight:400;overflow-wrap:anywhere}
body #sante-dashboard .nova-repartition td{width:65px;text-align:right}
body #sante-dashboard .nova-dot{display:inline-block;width:9px;height:9px;border-radius:2px;margin-right:8px}

body #sante-dashboard .diversity-panel .week-section-header>.bilan-period-info{margin:0;align-self:center}
body #sante-dashboard .meal-nova-line{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:8px}
body #sante-dashboard .meal-nova-badge{display:inline-block;flex:none;padding:3px 7px;border-radius:5px;font-size:11px;line-height:1.5;font-weight:500;white-space:nowrap}
body #sante-dashboard .meal-nova-badge.nova-1{background:#2d4038;color:#d5e4da}
body #sante-dashboard .meal-nova-badge.nova-2{background:#403e2f;color:#e4ddbd}
body #sante-dashboard .meal-nova-badge.nova-3{background:#493c30;color:#efd1b4}
body #sante-dashboard .meal-nova-badge.nova-4{background:#44364a;color:#e5cce9}
body #sante-dashboard .meal-nova-badge.nova-unknown{background:#333d48;color:#cdd5de}
body #sante-dashboard .meal-nova-component{display:flex;align-items:baseline;justify-content:space-between;gap:9px;margin-top:8px;font-size:12px;color:var(--secondary)}
body #sante-dashboard .meal-nova-component>span:first-child{min-width:0;overflow-wrap:anywhere}

body #sante-dashboard .meal-record{display:grid;grid-template-columns:48px minmax(0,1fr);gap:12px;padding:18px 0;border-top:1px solid var(--line)}
body #sante-dashboard .meal-record-time{padding-top:2px;font-size:13px;font-variant-numeric:tabular-nums;color:var(--secondary)}
body #sante-dashboard .meal-record-content{min-width:0}
body #sante-dashboard .meal-food-list{list-style:none;margin:0;padding:0}
body #sante-dashboard .meal-food{margin:0;padding:0 0 16px}
body #sante-dashboard .meal-food:last-child{padding-bottom:0}
body #sante-dashboard .meal-food+.meal-food{padding-top:16px;border-top:1px solid var(--line)}
body #sante-dashboard .meal-food-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:14px;line-height:1.5}
body #sante-dashboard .meal-food-title strong{min-width:0;font-weight:550;overflow-wrap:anywhere}
body #sante-dashboard .food-calories{flex:none;font-size:12px;color:var(--secondary);white-space:nowrap}
body #sante-dashboard .meal-quantities{margin:3px 0 6px;color:var(--secondary);overflow-wrap:anywhere}
body #sante-dashboard .food-macros{font-size:12px;line-height:1.8;color:var(--secondary)}
body #sante-dashboard .food-quality{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:7px}
body #sante-dashboard .food-added-sugar{display:inline;padding:0;border-radius:0;background:none;color:#f0aeb8;font:inherit}
body #sante-dashboard .food-nova-label{font-size:11px;color:var(--secondary)}
body #sante-dashboard .food-quality>.meal-nova-line{margin:0}
body #sante-dashboard .meal-record-total{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:7px;margin-top:14px;padding:10px 12px;background:var(--panel);border:1px solid var(--line);border-radius:7px;font-size:12px}
body #sante-dashboard .meal-record-total>div{flex-basis:100%;line-height:1.7;color:var(--secondary)}
body #sante-dashboard .food-detail-note{margin-top:8px;line-height:1.6}
[data-theme=light] body #sante-dashboard .food-added-sugar{color:var(--status-high)}
@media(max-width:600px){body #sante-dashboard .meal-record{grid-template-columns:39px minmax(0,1fr);gap:8px}body #sante-dashboard .meal-food-title{gap:7px;font-size:13px}body #sante-dashboard .food-macros{font-size:11px}body #sante-dashboard .food-nova-label{display:none}body #sante-dashboard .food-calories{font-size:11px}}

body #sante-dashboard .nova-compact-layout{display:flex;align-items:center;gap:24px;margin-top:14px}
body #sante-dashboard .nova-ring{width:108px;height:108px;flex:0 0 108px;border-radius:50%;display:grid;place-items:center}
body #sante-dashboard .nova-ring-center{width:84px;height:84px;background:var(--surface);border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:12px}
body #sante-dashboard .nova-ring-center b{font-size:18px}
body #sante-dashboard .nova-compact-legend{list-style:none;padding:0;margin:0;display:grid;gap:4px;flex:1;font-size:12px}
body #sante-dashboard .nova-compact-legend li{display:block}
body #sante-dashboard .nova-compact-legend b{font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap}
@media(max-width:460px){body #sante-dashboard .nova-compact-layout{gap:12px}body #sante-dashboard .nova-ring{width:88px;height:88px;flex-basis:88px}body #sante-dashboard .nova-ring-center{width:68px;height:68px}body #sante-dashboard .nova-compact-legend{font-size:11px;gap:4px}}

body #sante-dashboard .nova-legend-item{display:flex;align-items:center;gap:8px;border:0;background:none;color:inherit;padding:2px 0;margin:0;text-align:left;font:inherit;line-height:inherit;border-radius:3px;cursor:pointer;max-width:100%}
body #sante-dashboard .nova-legend-item .nova-dot{flex:0 0 9px;margin:0}
body #sante-dashboard .nova-legend-item:hover,body #sante-dashboard .nova-legend-item:focus-visible{text-decoration:none}
body #sante-dashboard .nova-legend-item:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
body #sante-dashboard .nova-ring-center span{text-align:center;font-size:11px}

body #sante-dashboard .nova-compact-legend button.nova-legend-item,
body #sante-dashboard .nova-compact-legend button.nova-legend-item:hover,
body #sante-dashboard .nova-compact-legend button.nova-legend-item:focus,
body #sante-dashboard .nova-compact-legend button.nova-legend-item:active{background:transparent!important;border:0!important;box-shadow:none!important;min-height:0!important;height:auto;padding:1px 0!important;border-radius:0!important;line-height:1.4;color:inherit!important}

body #sante-dashboard .nova-compact-legend button.nova-legend-item:is(:hover,:focus,:active){text-decoration:none!important}
body #sante-dashboard .nova-compact-legend button.nova-legend-item:focus:not(:focus-visible){outline:none!important}
body #sante-dashboard .nova-repartition>p:empty{display:none}

body #sante-dashboard .diversity-panel p{max-width:none}

/* Meal totals stay visible when the food list is collapsed. */
body #sante-dashboard .meal-moment-heading{display:flex;flex-direction:column;gap:5px;min-width:0;padding:8px 0}
body #sante-dashboard .meal-moment-totals{display:flex;flex-wrap:wrap;column-gap:4px;row-gap:2px;font-weight:400;line-height:1.5}
body #sante-dashboard .meal-moment-totals>span{white-space:nowrap}
body #sante-dashboard .meal-moment>summary>.small{flex-shrink:0}

body #sante-dashboard .calculator-average{display:flex;align-items:center;gap:8px;font-size:12px;min-height:44px;margin:0 0 12px}
body #sante-dashboard .calculator-average input{width:18px;height:18px;flex-shrink:0}
body #sante-dashboard .calculator-factor.is-disabled{opacity:.5}
body #sante-dashboard .calculator-factor input:disabled{cursor:not-allowed}

body #sante-dashboard .calculator-period{display:flex;align-items:center;flex-wrap:wrap;gap:8px;font-size:12px;margin-bottom:16px}
body #sante-dashboard .calculator-period select{font:inherit;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:8px 12px;min-height:40px}

body #sante-dashboard .calculator-deficits{display:flex;align-items:center;gap:12px}

body #sante-dashboard .calculator-factor.is-calculated{opacity:.5}
body #sante-dashboard .calculator-factor.is-calculated:focus-within{opacity:1}

/* Maintenance calculator: consistent fields, aligned values and compact mobile rows. */
body #sante-dashboard #s-energy .maintenance-calculator .calculator-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 20px;margin-bottom:18px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-average,body #sante-dashboard #s-energy .maintenance-calculator .calculator-period{margin:0;min-height:40px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-result{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:end;gap:20px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-metric{display:flex;flex-direction:column;gap:6px;min-width:0}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-metric .medium{display:flex;align-items:center;min-height:42px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-factor{min-width:0;gap:6px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-factor input{width:100%;box-sizing:border-box;min-height:42px;border-radius:8px;padding:8px 10px}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-deficits{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-column:span 2;gap:16px;align-items:end}
body #sante-dashboard #s-energy .maintenance-calculator .calculator-target{border-top:1px solid var(--line);padding-top:12px}
body #sante-dashboard #s-energy .maintenance-calculator .bilan-section-content>p{margin:16px 0 0}
body #sante-dashboard #s-energy .energy-section-disclosure>summary>h3{font-size:14px}
@media(max-width:600px){
 body #sante-dashboard #s-energy .maintenance-calculator .calculator-result{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 body #sante-dashboard #s-energy .maintenance-calculator .calculator-result>.calculator-metric:first-child,body #sante-dashboard #s-energy .maintenance-calculator .calculator-target{grid-column:1/-1}
 body #sante-dashboard #s-energy .maintenance-calculator .calculator-toolbar{align-items:flex-start;flex-direction:column;gap:8px}
}

body #sante-dashboard .weight-rate-info{margin-left:4px;vertical-align:middle}
body #sante-dashboard .weight-rate-info .body-measure-tooltip{left:0;right:auto}

body #sante-dashboard .energy-balance-percent{font-size:13px;font-weight:400;white-space:nowrap}

body #sante-dashboard .nova-consumption-reading{margin:12px 0 0;font-size:12px;line-height:1.6;color:var(--secondary)}

body #sante-dashboard .weight-change-table-wrap{margin:12px 0 18px;max-width:680px}
body #sante-dashboard .weight-change-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:15px;font-variant-numeric:tabular-nums}
body #sante-dashboard .weight-change-table :is(th,td){padding:8px 6px!important;text-align:right;border:0;background:transparent;white-space:nowrap}
body #sante-dashboard .weight-change-table th:first-child{width:32%;text-align:left;font-weight:400}
body #sante-dashboard .weight-change-table thead th{font-size:13px;color:var(--secondary);font-weight:500;border-bottom:1px solid var(--line)}
body #sante-dashboard .weight-change-method{margin-top:8px;font-size:11px;color:var(--secondary);line-height:1.5}
body #sante-dashboard .weight-change-method p{margin:8px 0 0}
@media(max-width:460px){body #sante-dashboard .weight-change-table{font-size:14px}body #sante-dashboard .weight-change-table :is(th,td){padding:7px 3px!important}body #sante-dashboard .weight-change-table thead th{font-size:12px}}

/* Day mode keeps colour on the active controls and data, with neutral section surfaces. */
[data-theme=light] body>header{border-bottom:1px solid var(--line);border-radius:0}
[data-theme=light] .quickbar{border:1px solid var(--line)}
[data-theme=light] :focus-visible{outline-color:var(--accent)}
[data-theme=light] body #sante-dashboard{color-scheme:light}
[data-theme=light] body #sante-dashboard :is(p,.muted,.neutral,.value-unit,#update-note){color:var(--secondary)}
[data-theme=light] body #sante-dashboard :is(button,select,input[type=date],input[type=text],input[type=number]){
 color:var(--text)!important;
 border-color:var(--control-line)!important
}
[data-theme=light] body #sante-dashboard button[aria-pressed=true]{
 color:var(--accent-ink)!important;
 border-color:var(--accent)!important
}
[data-theme=light] body #sante-dashboard nav button[aria-selected=false]{
 border:1px solid var(--line)!important
}
[data-theme=light] body #sante-dashboard nav button[aria-selected=true]{
 background:var(--tab-selected)!important;
 color:var(--accent-text)!important;
 border:1px solid var(--accent)!important
}
[data-theme=light] body #sante-dashboard nav button:hover{background:var(--surface-raised)!important}
[data-theme=light] body #sante-dashboard nav button[aria-selected=true]:hover{background:var(--tab-selected)!important}
[data-theme=light] body #sante-dashboard .training-calendar :is(.training-today,.training-month-nav,.training-day:not([aria-current=date],[aria-pressed=true])){
 border-color:transparent!important
}
[data-theme=light] body #sante-dashboard .training-calendar .training-day[aria-pressed=true]{color:var(--text)!important;border-color:var(--accent)!important}
[data-theme=light] body #sante-dashboard .training-calendar .training-filter[aria-pressed=true]{color:var(--accent-ink)!important}
[data-theme=light] body #sante-dashboard :is(#global-reading,#weight-reading){border:1px solid var(--line)}
[data-theme=light] body #sante-dashboard .day-selector:focus-visible{outline:2px solid var(--accent)!important;outline-offset:3px}
[data-theme=light] body #sante-dashboard :is(.box,.anthracite,.week-section-header)>h3,
[data-theme=light] body #sante-dashboard .body-reading>b:first-child{
 background:none;
 padding:0;
 border-radius:0;
 color:var(--text)
}
[data-theme=light] body #sante-dashboard .bilan-section-disclosure>summary{
 width:100%;
 background:transparent;
 border-bottom:1px solid var(--line);
 border-radius:0;
 padding-inline:0
}
[data-theme=light] body #sante-dashboard #s-today>.today-summary>.box:nth-child(n){background:var(--surface)}
[data-theme=light] body #sante-dashboard .meal-record-total{background:var(--surface-raised)}
[data-theme=light] body #sante-dashboard .meal-nova-badge{background:var(--surface-raised);color:var(--secondary)}
[data-theme=light] body #sante-dashboard :is(.lafay-intermediate-level strong,.lafay-passage-check){color:var(--status-low)}
[data-theme=light] body #sante-dashboard .lafay-mini-track.is-achieved>span{background:var(--status-low)}
[data-theme=light] body #sante-dashboard svg text{fill:var(--secondary)}
[data-theme=light] body #sante-dashboard .body-chart-scroll,
[data-theme=light] body .body-trends-dialog .body-chart-scroll{scrollbar-color:var(--control-line) var(--surface-raised)!important}
[data-theme=light] .body-chart-scroll::-webkit-scrollbar-thumb{background:var(--control-line)}
[data-theme=light] .body-chart-scroll::-webkit-scrollbar-track{background:var(--surface-raised)}
