/* The Vitals — chart marks (§8): every SVG mark takes its colour from a class on the --v-* tokens, so a theme
   change needs no redraw. Desk blue for data, clay only for data trouble, never green; sleep stages carry their
   meaning by position or a fixed order with text labels (§8.4). Charts never animate. */

/* ---- Charts: frame, a11y wrapper, marks (spec 8) ------------------------------------ */
.v-chart{position:relative;width:100%;min-width:0;touch-action:pan-y;-webkit-user-select:none;user-select:none;outline:none}
.v-chart svg{display:block;overflow:visible}
.v-chart:focus-visible{outline:2px solid var(--desk-blue);outline-offset:3px}
.v-chart .vc-hit{fill:transparent;cursor:crosshair}
figure.v-fig{margin:0;display:flex;flex-direction:column;gap:6px;min-width:0}
figure.v-fig figcaption{font:400 15px/1.5 var(--desk-font);min-height:3em}
/* A summary sentence with its ⓘ (D39): sentence left, ⓘ beside it, the chart full width below. */
figure.v-fig.has-info{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;row-gap:6px;align-items:start}
figure.v-fig.has-info>*{grid-column:1/-1}
figure.v-fig.has-info>figcaption{grid-column:1;grid-row:1}
figure.v-fig.has-info>.v-info{grid-column:2;grid-row:1;margin-top:2px}
.vc-axis text,.vc-tick{font:400 10.5px/1 var(--desk-mono);fill:var(--desk-muted)}
.vc-axis line,.vc-axis path{stroke:var(--v-grid);stroke-width:1;shape-rendering:crispEdges}
.vc-unit{font:500 10.5px/1 var(--desk-mono);fill:var(--desk-muted)}
.vc-grid{stroke:var(--v-grid);stroke-width:1;shape-rendering:crispEdges;opacity:.7}
.vc-band{fill:var(--v-band);stroke:none}
.vc-band-edge{stroke:var(--v-ref);stroke-width:1;fill:none;opacity:.6}
.vc-dot{fill:var(--v-series);stroke:var(--v-paper);stroke-width:.75}
.vc-dot.hollow{fill:var(--v-paper);stroke:var(--v-series);stroke-width:1.25}
/* D48: one continuous series per metric — the old Fitbit styling now draws exactly like the series. */
.vc-dot.fitbit{fill:var(--v-series);stroke:var(--v-paper);stroke-width:.75}
.vc-dot.ghost{fill:var(--v-paper);stroke:var(--v-ref);stroke-width:1}
.vc-line{fill:none;stroke:var(--v-series);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.vc-line.fitbit{stroke:var(--v-series);stroke-dasharray:none}
.vc-line.thin{stroke-width:1.25}
.vc-halo{fill:none;stroke:var(--v-paper);stroke-width:4;stroke-linejoin:round;stroke-linecap:round}
.vc-ghost{fill:none;stroke:var(--v-ref);stroke-width:1.5;stroke-dasharray:4 3}
.vc-ref{fill:none;stroke:var(--v-ref);stroke-width:1.25;stroke-dasharray:4 3}
.vc-whisker{stroke:var(--v-series);stroke-width:1.25}
.vc-bar{fill:var(--v-series)}
.vc-bar.hollow{fill:var(--v-paper);stroke:var(--v-ink);stroke-width:1}
.vc-bar.outline{fill:none;stroke:var(--v-series);stroke-width:1}
.vc-bar.inbed{fill:var(--v-band);stroke:var(--v-series);stroke-width:1}
.vc-bar.partial{stroke:var(--v-series);stroke-width:1}
.vc-stub{stroke:var(--v-ref);stroke-width:2;stroke-dasharray:2 2}
.vc-step{fill:none;stroke:var(--v-ink);stroke-width:1.25;stroke-linejoin:miter}
.vc-sleep{fill:var(--v-sleep)}
.vc-workout{fill:none;stroke:var(--v-ink);stroke-width:1.25}
.vc-markbg{fill:var(--v-mark)}
.vc-select-band{fill:var(--v-select);opacity:.55}
.vc-cross{stroke:var(--v-ink);stroke-width:1;shape-rendering:crispEdges;pointer-events:none}
.vc-selring{fill:var(--v-paper);stroke:var(--v-ink);stroke-width:2;pointer-events:none}
.vc-label{font:500 10.5px/1 var(--desk-mono);fill:var(--desk-ink)}
.vc-label.muted{fill:var(--desk-muted)}
.vc-label.halo{paint-order:stroke;stroke:var(--v-paper);stroke-width:3px;stroke-linejoin:round}
.vc-now{stroke:var(--v-ink);stroke-width:1}
.vc-cov-ok{fill:var(--v-band)}
.vc-trouble{fill:var(--v-trouble)}
/* Pattern contents (inside <defs>) */
.vc-pat-blue{stroke:var(--v-series);stroke-width:1.5}
.vc-pat-muted{stroke:var(--v-ref);stroke-width:1}
.vc-pat-ink{stroke:var(--v-ink);stroke-width:1}
.vc-pat-bg{fill:var(--v-paper)}
.vc-pat-bandbg{fill:var(--v-band)}
/* Small fixed-size SVGs */
.v-spark{display:inline-block;vertical-align:middle;flex:none;overflow:visible}
.v-rangedot{display:inline-block;vertical-align:middle;flex:none;overflow:visible}
.v-rangedot .rd-band{fill:var(--v-band);stroke:none}
.v-rangedot .rd-tick{stroke:var(--v-ref);stroke-width:1}
.v-rangedot .rd-axis{stroke:var(--v-grid);stroke-width:1}
.v-rangedot .rd-dot{fill:var(--v-ink)}
.v-rangedot .rd-tri{fill:var(--v-ink)}

/* Placeholder for stubbed components (charts-extra.js, view stubs) */
.v-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:28px;padding:6px;border:1px dashed var(--desk-muted);border-radius:2px;color:var(--desk-muted);font:400 11px/1.4 var(--desk-mono);text-align:center;background:repeating-linear-gradient(135deg,transparent 0 6px,var(--hover) 6px 7px)}
.v-placeholder b{font-weight:500;color:var(--desk-ink)}
.v-error{padding:12px;border:1px solid var(--desk-clay);border-left:4px solid var(--desk-clay);font:400 12px/1.5 var(--desk-mono);white-space:pre-wrap;color:var(--desk-ink);background:var(--desk-paper)}


/* ---- Shared SVG text and rules ------------------------------------------------------ */
.vc-lanetitle{font:500 10.5px/1 var(--desk-mono);fill:var(--desk-muted)}
.vc-lanetitle.ink{fill:var(--desk-ink)}
.vc-label.small{font-size:10px}
.vc-label.blue{fill:var(--v-series)}
.vc-label.strong{font-weight:600}
.vc-boxbg{fill:var(--v-paper);stroke:var(--v-grid);stroke-width:1}
.vc-rowrule{stroke:var(--v-grid);stroke-width:1;shape-rendering:crispEdges;opacity:.55}
.vc-lanebase{stroke:var(--v-grid);stroke-width:1;shape-rendering:crispEdges}

/* ---- Sleep stages (spec 8.4): position or fixed order + text labels carry the meaning */
.vc-st-deep{fill:var(--v-series);stroke:var(--v-series);stroke-width:1}
.vc-st-rem{stroke:var(--v-series);stroke-width:1}
.vc-st-light{fill:var(--v-band);stroke:var(--v-series);stroke-width:1}
.vc-st-awake{fill:var(--v-paper);stroke:var(--v-ink);stroke-width:1}
.vc-st-unknown{fill:var(--v-paper);stroke:var(--v-ink);stroke-width:1;stroke-dasharray:1.5 1.5}
.vc-hyp-step{fill:none;stroke:var(--v-ref);stroke-width:1;opacity:.6}
.vc-inbed{fill:var(--v-band);stroke:var(--v-series);stroke-width:1}
.vc-asleep{fill:var(--v-series)}
.vc-stagering{fill:none;stroke:var(--v-ink);stroke-width:2;pointer-events:none}

/* ---- Lines, ticks, rules -------------------------------------------------------------- */
.vc-range{fill:var(--v-series);opacity:.42}
.vc-range-area{fill:var(--v-series);opacity:.38;stroke:none}
.vc-clip{fill:var(--v-ink)}
.vc-avg{fill:none;stroke:var(--v-series);stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}
.vc-median{fill:none;stroke:var(--v-ink);stroke-width:1.25;stroke-dasharray:4 3}
.vc-rest{fill:none;stroke:var(--v-ref);stroke-width:1.25;stroke-dasharray:4 3}
.vc-cutoff{stroke:var(--v-ref);stroke-width:1;stroke-dasharray:2 3;shape-rendering:crispEdges}
.vc-enddot{fill:var(--v-series);stroke:var(--v-paper);stroke-width:1.5}
.vc-inktick{stroke:var(--v-ink);stroke-width:2}
.vc-midtick-out{stroke:var(--v-ink);stroke-width:1.5}
.vc-midtick-in{stroke:var(--v-paper);stroke-width:1.5}
.vc-midtick-out.focus{stroke-width:2.25}
.vc-cap{stroke:var(--v-ink);stroke-width:2}
.vc-band.is-quiet{opacity:.5}
.vc-hatchfill{stroke:none}
.vc-partialcol{stroke:none;opacity:.6}
.vc-lowring{fill:none;stroke:var(--v-ink);stroke-width:1.5}
.vc-spo2{fill:var(--v-series)}
.vc-hrv{fill:var(--v-series);stroke:var(--v-paper);stroke-width:.75}
.vc-diag{stroke:var(--v-ref);stroke-width:1;stroke-dasharray:4 3;fill:none}
.vc-yo-old{fill:none;stroke:var(--v-ref);stroke-width:1;opacity:.6;stroke-linejoin:round}
.vc-yo-last{fill:none;stroke:var(--v-ink);stroke-width:1.5;stroke-linejoin:round}
.vc-yo-cur{fill:none;stroke:var(--v-series);stroke-width:2.5;stroke-linejoin:round;stroke-linecap:round}
/* yearOverlay styles by recency among the SELECTED years (D40): newest blue, then ink, ink dashed, muted… */
.vc-yo-s0,.vc-yo-s1,.vc-yo-s2,.vc-yo-s3,.vc-yo-s4,.vc-yo-s5{fill:none;stroke-linejoin:round;stroke-linecap:round}
.vc-yo-s0{stroke:var(--v-series);stroke-width:2.5}
.vc-yo-s1{stroke:var(--v-ink);stroke-width:1.75}
.vc-yo-s2{stroke:var(--v-ink);stroke-width:1.5;stroke-dasharray:6 3}
.vc-yo-s3{stroke:var(--v-ref);stroke-width:1.5}
.vc-yo-s4{stroke:var(--v-ref);stroke-width:1.5;stroke-dasharray:6 3}
.vc-yo-s5{stroke:var(--v-ref);stroke-width:1.5;stroke-dasharray:1.5 3}
.vc-yo-dot{fill:var(--v-paper);stroke-width:1.5;stroke-dasharray:none}
.v-yo-legend{display:flex;flex-wrap:wrap;gap:4px 16px;margin:0 0 4px;padding:0;list-style:none;font:500 12px/1.5 var(--desk-mono);color:var(--desk-ink);font-variant-numeric:tabular-nums}
.v-yo-legend li{display:inline-flex;align-items:center;gap:6px}
.v-yo-swatch{flex:none;overflow:visible}
.vc-whisker.ink{stroke:var(--v-ink)}
.vc-bracket{fill:none;stroke:var(--v-ink);stroke-width:1.25}
.vc-bracket.b{stroke:var(--v-ref)}
.vc-medtick{stroke:var(--v-ink);stroke-width:2}
.vc-medtick.b{stroke:var(--v-ref)}
.vc-sel{stroke:var(--v-ink);stroke-width:1.5}

/* ---- Events rail and context lanes (spec 4.8) ---------------------------------------- */
.vc-ev-span{fill:var(--v-ink)}
.vc-ev-tick{stroke:var(--v-ink);stroke-width:1.5}
.vc-ev-icon{color:var(--v-ink)}
.vc-ev-select{fill:var(--v-select);opacity:.35}
.vc-ctx-tick{stroke:var(--v-ink);stroke-width:1.25;shape-rendering:crispEdges}
.vc-ctx-bar{fill:var(--v-ref)}
.vc-ctx-dot{fill:var(--v-ref)}
.vc-ctx-off{fill:none;stroke:var(--v-grid);stroke-width:1;stroke-dasharray:3 3}

/* ---- stack / stageTotals (DOM; fixed order with text labels) ------------------------- */
.v-stack{display:flex;flex-direction:column;gap:4px;min-width:0;margin:0}
.v-stack-row{display:flex;align-items:center;gap:10px;min-width:0}
.v-stack-title{flex:none;font:400 11px/1.5 var(--desk-mono);color:var(--desk-muted);white-space:nowrap}
.v-stack-bar{flex:1 1 auto;display:flex;gap:1px;min-width:0}
.v-stack-seg{flex:1 1 0;min-width:3px;height:100%}
.v-stack-seg.is-deep,.v-stack-seg.is-series{background:var(--v-series)}
.v-stack-seg.is-rem,.v-stack-seg.is-hatch{background:repeating-linear-gradient(-45deg,var(--v-series) 0 1.3px,var(--v-paper) 1.3px 4.6px);box-shadow:inset 0 0 0 1px var(--v-series)}
.v-stack-seg.is-light,.v-stack-seg.is-band{background:var(--v-band);box-shadow:inset 0 0 0 1px var(--v-series)}
.v-stack-seg.is-awake,.v-stack-seg.is-paper{background:var(--v-paper);box-shadow:inset 0 0 0 1px var(--v-ink)}
.v-stack-seg.is-unknown{background:var(--v-paper);border:1px dotted var(--v-ink)}
.v-stack-seg.is-ink{background:var(--v-ink)}
.v-stack-seg.is-muted{background:var(--v-ref)}
.v-stack-labels{margin:0;font:400 12px/16px var(--desk-mono);color:var(--desk-ink);font-variant-numeric:tabular-nums}
.v-stack-scale{position:relative;flex:1 1 auto;height:14px;margin:0;font:400 10px/14px var(--desk-mono);color:var(--desk-muted)}
.v-stack-scale span{position:absolute;top:0;transform:translateX(-50%)}
.v-stack-scale span:first-child{transform:none}
.v-stack-scale span:last-child{transform:translateX(-100%)}
.v-stack-caption{margin:0;font:400 11px/1.5 var(--desk-mono);color:var(--desk-muted)}
.v-stack.has-scale .v-stack-bar{box-shadow:0 1px 0 var(--v-grid)}



/* ---- Week strip (spec 3.7): seven 44px cells ----------------------------------------- */
.v-week{display:flex;gap:6px;margin:0;padding:0;list-style:none;min-width:0}
.v-week-day{position:relative;flex:0 1 44px;min-width:36px;height:44px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:3px 0 5px;border:1px solid transparent;border-radius:2px}
.v-week-dow{font:400 10px/12px var(--desk-mono);color:var(--desk-muted)}
.v-week-mark{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 4px;background:var(--desk-ink);color:var(--desk-paper);font:600 11px/1 var(--desk-mono);letter-spacing:.02em;border-radius:1px}
.v-week-rest{width:5px;height:5px;margin-bottom:7px;border-radius:50%;border:1px solid var(--desk-rule)}
.v-week-ahead{width:20px;height:20px}
.v-week-day.is-ahead{border:1px dashed var(--desk-rule)}
.v-week-day.is-today{border:2px solid var(--desk-ink);padding:2px 0 4px}

/* ---- Calendar (spec 4.7): cell size from the width; roving tabindex ----------------- */
.v-cal{display:flex;flex-direction:column;gap:8px;min-width:0}
.v-cal-nav{display:flex;align-items:center;gap:8px}
.v-cal-nav .v-cal-year-label{font:700 18px/1.2 var(--desk-display);letter-spacing:-.3px;min-width:48px;text-align:center}
.v-cal-grid{display:grid;gap:2px;min-width:0;outline:none}
.v-cal-grid.is-year{grid-template-columns:26px repeat(var(--cal-cols,53),minmax(0,1fr))}
.v-cal-grid.is-months{grid-template-columns:28px repeat(31,minmax(0,1fr));gap:1px}
.v-cal-row{display:contents}
.v-cal-axis{font:400 10px/12px var(--desk-mono);color:var(--desk-muted);white-space:nowrap;align-self:center;overflow:visible}
.v-cal-axis.mon{align-self:end;padding-bottom:1px}
.v-cal-cell{position:relative;aspect-ratio:1/1;min-width:0;background:transparent;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--v-grid) 55%,transparent);cursor:pointer;outline:none}
.v-cal-cell.q0{background:color-mix(in srgb,var(--v-series) 16%,var(--v-paper));box-shadow:none}
.v-cal-cell.q1{background:color-mix(in srgb,var(--v-series) 34%,var(--v-paper));box-shadow:none}
.v-cal-cell.q2{background:color-mix(in srgb,var(--v-series) 54%,var(--v-paper));box-shadow:none}
.v-cal-cell.q3{background:color-mix(in srgb,var(--v-series) 76%,var(--v-paper));box-shadow:none}
.v-cal-cell.q4{background:var(--v-series);box-shadow:none}
.v-cal-cell.is-ok{background:color-mix(in srgb,var(--v-series) 45%,var(--v-paper));box-shadow:none}
.v-cal-cell.is-missing{background:transparent;box-shadow:none;border:1px dotted var(--v-ink)}
.v-cal-cell.is-gap{background:transparent;box-shadow:none}
.v-cal-cell.is-gap::before{content:"";position:absolute;left:20%;right:20%;top:50%;border-top:1px dashed var(--v-ref)}
.v-cal-cell.is-ni{background:repeating-linear-gradient(-45deg,var(--v-ink) 0 1px,var(--v-paper) 1px 3.5px);box-shadow:none;opacity:.8}
.v-cal-cell.is-future,.v-cal-cell.is-none{cursor:default;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--v-grid) 30%,transparent)}
.v-cal-cell.is-partial{background-image:repeating-linear-gradient(-45deg,var(--v-paper) 0 1px,transparent 1px 3.5px)}
.v-cal-cell.has-event::after{content:"";position:absolute;right:0;top:0;width:0;height:0;border-style:solid;border-width:0 6px 6px 0;border-color:transparent var(--v-ink) transparent transparent}
.v-cal-cell.is-record{border-radius:50%;box-shadow:0 0 0 1.5px var(--v-paper),0 0 0 3px var(--v-ink);z-index:1}
.v-cal-cell.is-selected{box-shadow:inset 0 0 0 2px var(--v-ink),0 0 0 1px var(--v-paper);z-index:2}
.v-cal-cell.is-selected.is-record{box-shadow:inset 0 0 0 2px var(--v-ink),0 0 0 1.5px var(--v-paper),0 0 0 3px var(--v-ink)}
.v-cal-cell:hover:not(.is-future):not(.is-none){box-shadow:inset 0 0 0 1px var(--v-ink)}
.v-cal-cell:focus-visible{outline:2px solid var(--desk-blue);outline-offset:1px;z-index:3}
.v-cal-blank{aspect-ratio:1/1}
.v-cal-readout{min-height:18px;margin:0;font:400 12px/1.5 var(--desk-mono);color:var(--desk-ink)}
.v-cal-readrow{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0 12px;min-width:0}
.v-cal-go.v-link{color:var(--desk-blue)}
.v-cal-go{background:none;border:0;border-bottom:1px solid transparent;border-radius:0;padding:0;cursor:pointer;text-align:left}
.v-cal-go[hidden]{display:none}
.v-cal-cell.is-preview{outline:2px solid var(--v-ink);outline-offset:1px;z-index:3}
.v-cal-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin:0;font:400 11px/1.5 var(--desk-mono);color:var(--desk-muted)}
.v-cal-key{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.v-cal-key .v-cal-cell{display:inline-block;width:11px;height:11px;cursor:default}
.v-cal-ramp{display:inline-flex;gap:2px}
@media (max-width:900px),(pointer:coarse){.v-cal-nav .iconbtn{min-width:44px;min-height:44px}}

/* ---- Dot strip, small chart wrappers ------------------------------------------------- */
.v-hypno{display:flex;flex-direction:column;gap:4px;min-width:0}
.v-nightstack{display:flex;flex-direction:column;gap:6px;min-width:0}
.v-xchart{display:flex;flex-direction:column;gap:4px;min-width:0}