/* Health Monitor: shared ClickHouse tokens, no external assets. */
.health-heart-monitor{min-width:0;padding:20px 0 12px}
.health-heart-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:4px 0 12px}
.health-heart-summary span{display:block;color:#a0a0a0;font-size:12px;line-height:1.5}
.health-heart-summary strong{display:block;font-size:24px;font-weight:600;color:#ffffff;line-height:1.5;font-variant-numeric:tabular-nums}
.health-heart-monitor .health-body-section-heading{height:64px;flex-wrap:nowrap}
.health-heart-monitor .health-body-section-heading select{width:210px}
.health-heart-plot{height:420px;width:100%;min-width:0;overflow:hidden;background:#000000}
.health-heart-plot>span{display:block;padding:160px 12px;text-align:center;color:#a0a0a0}
.health-heart-legend{height:52px;display:flex;gap:16px;align-items:center;flex-wrap:wrap;color:#a0a0a0;font-size:12px}
.health-heart-legend span:before{content:'';display:inline-block;vertical-align:middle;margin-right:6px;width:18px;border-top:2px solid #faff69}
.health-heart-legend .heart-seven:before{border-top:1px dotted #ffffff}
.health-heart-legend .heart-thirty:before{border-top:1px dotted #9db3c9}
.health-heart-legend .heart-workout:before{border-top:8px solid rgba(72,190,113,.40)}
.health-heart-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:76px}
.health-heart-toolbar>div{display:flex;gap:6px;flex-shrink:0}
.health-heart-toolbar output{color:#a0a0a0;font-size:12px;line-height:1.5;font-variant-numeric:tabular-nums}
@media(max-width:640px){.health-heart-summary{gap:10px}.health-heart-summary span{font-size:11px}.health-heart-summary strong{font-size:20px}.health-heart-toolbar{align-items:flex-start;flex-direction:column;padding-top:8px;min-height:120px}.health-heart-monitor .health-body-section-heading>h2{flex-basis:auto}.health-heart-monitor .health-body-section-heading select{width:195px}.health-heart-legend{font-size:11px;gap:10px}}
/* Body is a flat Monitor surface, using the exact ClickHouse neutral/accent vocabulary. */
.health-body-page{background:#000000;font-family:var(--ch-font);--body-accent:#faff69}
.health-body-page .health-heading{margin-bottom:16px}
.health-body-page .health-tabs{gap:8px;margin-bottom:16px}
.health-body-page .health-range{gap:12px;margin-bottom:20px}
.health-body-page .health-panel{background:#000000;padding:0 24px;border-color:rgba(65,65,65,.8)}
.health-body-monitor{min-width:0}
.health-body-section{min-width:0;padding:20px 0 16px}
.health-body-section+.health-body-section{border-top:1px solid rgba(65,65,65,.8)}
.health-body-section-heading{height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}
.health-view .health-body-section-heading h2{margin:0;font-size:18px;font-weight:700;white-space:nowrap}
.health-body-section-heading .health-controls{gap:8px;flex-wrap:nowrap;min-width:0}
.health-body-section-heading select{width:155px;min-width:0;padding:9px 10px;font-size:13px}
.health-body-units{display:flex;align-items:center;gap:0;min-width:88px;justify-content:flex-end}
.health-body-units button{min-width:44px;padding:9px 10px}
.health-body-units>span{color:#a0a0a0;font-size:13px;padding:0 12px}
.health-body-summary-row{display:flex;gap:32px;min-width:0;height:128px;padding:12px 0}
.health-body-summary{min-width:0;display:flex;flex-direction:column;gap:4px;font-variant-numeric:tabular-nums}
.health-body-summary>span{font-size:12px;color:#a0a0a0}
.health-body-summary strong{font-size:26px;font-weight:600;line-height:1.3;color:#ffffff}
.health-body-summary small{font-size:12px;color:#ffffff;white-space:nowrap}
.health-body-summary small span{color:#a0a0a0;margin-left:4px}
.health-body-legend{height:44px;display:flex;align-content:center;align-items:center;flex-wrap:wrap;gap:4px 16px;color:#a0a0a0;font-size:12px;line-height:18px}
.health-body-key:before{content:'';display:inline-block;width:14px;height:2px;background:#faff69;margin-right:6px;vertical-align:middle}
.health-body-key-1:before{background:#ffffff}
.health-body-plot{height:300px;width:100%;min-width:0;overflow:hidden;background:#000000}
.health-body-plot>span{display:block;padding:100px 12px;text-align:center;color:#a0a0a0;font-size:13px}
.health-body-latest{min-height:58px;display:flex;flex-wrap:wrap;align-content:center;gap:4px 24px;font-size:12px;line-height:20px;color:#a0a0a0;font-variant-numeric:tabular-nums}
.health-body-latest b{font-weight:500;color:#ffffff}
.health-body-page .health-body-details{margin-top:0;padding-top:12px}
.health-body-details summary{color:#a0a0a0;font-size:13px}
.health-body-page :is(button,select):hover{border-color:#585858;background:#141414;color:#faff69}
.health-body-page button[aria-pressed=true]{background:#141414;color:#faff69;border-color:#faff69;box-shadow:0 4px 25px rgba(0,0,0,.14) inset}
.health-body-page :is(button,select,input):focus-visible{outline-color:#faff69}
@media(max-width:640px){
 .health-body-page .health-panel{padding:0 12px}
 .health-body-section{padding:12px 0}
 .health-body-section-heading{height:100px;flex-wrap:wrap;align-content:center;gap:8px}
 .health-body-section-heading>h2{flex-basis:100%}
 .health-body-section-heading>.health-fine{height:44px;display:flex;align-items:center}
 .health-body-section-heading .health-controls{width:100%;justify-content:space-between}
 .health-body-section-heading select{flex:1;max-width:210px}
 .health-body-summary-row{gap:20px;height:144px}
 .health-body-summary strong{font-size:23px}
 .health-body-summary small{white-space:normal;font-size:11px}
 .health-body-summary small span{margin-left:0;display:block}
 .health-body-legend{gap:2px 12px;font-size:11px}
 .health-body-latest{min-height:64px;gap:0 12px}
}

.health-active .training-nav{display:none!important}
.health-view{max-width:1180px;margin:0 auto;padding:24px 0;color:var(--ink)}
.health-heading,.health-tabs,.health-controls{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.health-heading{justify-content:space-between;margin-bottom:24px}.health-view h1{font-size:30px;margin:0}.health-view h2{font-size:20px;margin:0 0 20px}.health-view h3{font-size:16px}
.health-tabs{margin-bottom:24px}.health-view button,.health-view select,.health-view input{min-height:44px;border:1px solid var(--line);border-radius:4px;background:var(--surface);color:var(--ink);padding:9px 14px;max-width:100%}
.health-view button[aria-pressed=true]{background:var(--cyan);color:var(--ch-on-accent);border-color:var(--cyan)}
.health-view :is(button,select,input):focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.health-range{align-items:end;margin-bottom:20px}.health-view label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:var(--muted)}
.health-panel{padding:24px;border:1px solid var(--line);border-radius:8px;background:var(--surface);min-width:0}
.health-record{margin-bottom:24px}.health-record select{width:100%;text-overflow:ellipsis}
.health-metrics{display:flex;gap:32px;flex-wrap:wrap;margin:24px 0}.health-metrics span{color:var(--muted);font-size:14px}.health-metrics strong{display:block;font-size:24px;margin-top:8px;font-variant-numeric:tabular-nums}
.health-fine{color:var(--muted);font-size:13px;line-height:1.6}.health-empty{min-height:210px;display:grid;place-content:center;text-align:center;color:var(--muted);line-height:1.6}
.health-chart-scroll,.health-table-scroll{overflow:auto;max-width:100%}.health-chart-scroll svg{width:100%;height:280px;display:block}.health-chart-scroll text{fill:var(--muted);font:12px var(--font)}.health-grid{stroke:var(--line);stroke-width:1}
.health-series-0{fill:var(--cyan);background:var(--cyan)}.health-series-1{fill:#ccc;background:#ccc}.health-legend{display:flex;flex-wrap:wrap;gap:20px;margin:20px 0;color:var(--muted);font-size:13px}.health-legend i{display:inline-block;width:10px;height:10px;margin-right:8px}
.health-detail{border-top:1px solid var(--line);padding-top:18px;margin-top:20px}.health-detail summary{cursor:pointer;min-height:44px;line-height:1.6}.health-detail pre{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6}.health-detail li{margin:12px 0;overflow-wrap:anywhere}
.health-view table{width:100%;border-collapse:collapse;font-size:13px;font-variant-numeric:tabular-nums}.health-view th,.health-view td{text-align:left;border-bottom:1px solid var(--line);padding:12px;min-width:100px}.health-view th{color:var(--muted)}
.health-stage{display:grid;grid-template-columns:minmax(70px,150px) 1fr;gap:12px;margin:12px 0;font-size:13px}.health-stage-track{height:24px;position:relative;background:var(--bg)}.health-stage-track>span{position:absolute;height:100%;background:var(--cyan)}
@media(max-width:640px){.health-view{padding:16px 0}.health-panel{padding:16px}.health-heading{align-items:flex-start}.health-tabs{gap:8px}.health-tabs button{flex:1 0 auto}.health-range label{flex:1 1 130px}.health-range input,.health-range select{width:100%}.health-metrics{gap:24px}.health-metrics strong{font-size:21px}.health-active .site-header{flex-wrap:wrap}.health-active .app-switch{flex-wrap:wrap}.health-stage{grid-template-columns:100px 1fr}}

.health-heart-plot .nsewdrag{touch-action:pan-y!important}

/* Sleep: uniform month cells, real stage intervals, one stable detail surface. */
.health-sleep-monitor{padding:20px 0;min-width:0}
.sleep-month-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.health-view .sleep-month-heading h2{margin:0;font-size:22px}
.sleep-month-heading button{width:44px;font-size:24px;line-height:1}
.sleep-calendar-policy{margin:12px 0 6px}
.sleep-legend{display:flex;gap:20px;flex-wrap:wrap;align-items:center;min-height:42px;font-size:12px;color:#bcbcbc}
.sleep-legend span:before{content:'';display:inline-block;width:12px;height:6px;border-radius:2px;margin-right:7px;background:#8a70d6}
.sleep-legend .sleep-key-awake:before{background:#f39db6}.sleep-legend .sleep-key-rem:before{background:#bceafa}.sleep-legend .sleep-key-light:before{background:#63a4ee}
.sleep-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;min-width:0}
.sleep-weekday{text-align:center;font-size:12px;color:#a0a0a0;padding:8px 0}
.health-view .sleep-day{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:6px;border:1px solid #292929;border-radius:4px;background:#090909;padding:10px 8px;height:152px;min-width:0;color:#ffffff;text-align:left;position:relative;font-variant-numeric:tabular-nums}
.health-view .sleep-day[aria-pressed=true]{background:#141414;color:#ffffff;border-color:#faff69;box-shadow:inset 0 0 0 1px #faff69}
.sleep-day-number{font-size:13px;color:#bcbcbc}.sleep-day strong{font-size:18px;font-weight:600;white-space:nowrap}.sleep-day-efficiency{color:#a0a0a0;font-size:11px;white-space:nowrap}
.sleep-mini-wrap{display:block;width:100%;height:44px;margin-top:auto}.sleep-mini{display:block;width:100%;height:44px}.sleep-mini-missing{font-size:10px;color:#808080}
.sleep-session-count{position:absolute;right:5px;top:8px;font-size:9px;color:#a0a0a0}
.sleep-selected{margin-top:28px;padding-top:24px;border-top:1px solid #414141;min-height:960px;min-width:0}
.sleep-detail-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:54px;flex-wrap:wrap}
.health-view .sleep-detail-heading :is(h2,h3){margin:0}.sleep-detail-heading select{font-size:12px;max-width:100%}
.sleep-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:20px 0}
.sleep-summary span{font-size:12px;color:#a0a0a0;display:block;line-height:1.5}.sleep-summary strong{font-size:26px;font-weight:600;display:block;line-height:1.5;white-space:nowrap}
.sleep-window{margin:0 0 24px}.sleep-stage-detail{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;min-width:0}
.sleep-stage-labels{display:flex;flex-direction:column;height:250px;font-size:12px;color:#bcbcbc}.sleep-stage-labels span{display:flex;align-items:center;height:50px;line-height:1.4}
.sleep-stage-graphic{min-width:0}.sleep-timeline{display:block;width:100%;height:250px;overflow:visible}.sleep-timeline rect{cursor:pointer;outline-offset:3px}.sleep-timeline rect:focus{outline:2px solid #faff69}
.sleep-clock{display:flex;justify-content:space-between;font-size:11px;color:#a0a0a0;margin-top:6px}
.sleep-stage-readout{display:block;min-height:56px;padding-top:16px;font-size:13px;line-height:1.5;color:#ffffff}
.sleep-heart{border-top:1px solid #292929;padding-top:16px;margin-top:24px;min-width:0}.sleep-heart .sleep-detail-heading strong{color:#b19ae8;font-size:24px;font-weight:600}
.sleep-heart-plot{height:360px;width:100%;overflow:hidden;min-width:0}.sleep-heart-plot .nsewdrag{touch-action:pan-y!important}
.sleep-heart-toolbar{display:flex;gap:6px;padding:12px 0}.sleep-heart output{font-size:12px;color:#a0a0a0;display:block;min-height:44px;line-height:1.5}
@media(max-width:640px){
 .health-body-page:has(.health-sleep-monitor) .health-panel{padding:0 6px}
 .sleep-calendar{gap:3px}.health-view .sleep-day{height:110px;padding:6px 3px;gap:5px}.sleep-day-number{font-size:11px}.sleep-day strong{font-size:10px;line-height:1.5}.sleep-day-efficiency{font-size:10px}.sleep-day-efficiency>span{display:none}.sleep-mini-wrap,.sleep-mini{height:34px}.sleep-mini-missing{font-size:8px}.sleep-session-count{font-size:8px;right:2px;top:23px}
 .sleep-weekday{font-size:10px}.sleep-legend{font-size:11px;gap:12px}.sleep-calendar-policy{font-size:11px}.health-view .sleep-month-heading h2{font-size:19px}
 .sleep-selected{min-height:1060px;margin-top:20px;padding-top:16px}.sleep-detail-heading{gap:8px}.sleep-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}.sleep-summary strong{font-size:22px}.sleep-summary span{font-size:11px}
 .sleep-stage-detail{grid-template-columns:67px minmax(0,1fr);gap:6px}.sleep-stage-labels{font-size:10px}.sleep-clock{font-size:10px}.sleep-stage-readout{font-size:12px}.sleep-window{font-size:11px}.sleep-heart .sleep-detail-heading strong{font-size:20px}
}

.health-bp-legend .bp-secondary:before{border-color:#88c9eb}
.health-bp-monitor small{color:#a0a0a0;font-size:11px}
.health-bp-readings{margin-top:24px}
.health-bp-readings summary{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13px;cursor:pointer;list-style:disclosure-closed}
.health-bp-readings summary strong{font-weight:500;font-variant-numeric:tabular-nums}
.health-bp-readings ul{padding-left:20px;font-size:13px}
@media(max-width:640px){.health-bp-monitor .health-body-section-heading select{width:180px}.health-bp-monitor h2{font-size:18px}.health-bp-readings summary{font-size:12px}}
