.health-report, .hs-detail, .health-overview, .health-detail, .performance-overview { --hs-sleep:#56cbd4; --hs-hrv:#78d8b2; --hs-pulse:#ff8491; --hs-weight:#ebd36d; --hs-load:#ffb15c; --hs-sessions:#7fb2ff; --hs-sport:#c8ff31; }
:root[data-theme="light"] .health-report, :root[data-theme="light"] .hs-detail, :root[data-theme="light"] .health-overview, :root[data-theme="light"] .health-detail, :root[data-theme="light"] .performance-overview { --hs-sleep:#08757e; --hs-hrv:#196e50; --hs-pulse:#b52c43; --hs-weight:#806400; --hs-load:#9a4a00; --hs-sessions:#1f56b3; --hs-sport:#3f6b00; }
.hs-periods { display:flex; align-items:center; min-width:0; position:relative; }
.hs-periods .tab-row { display:flex; overflow-x:auto; gap:8px; padding:8px 0; scrollbar-width:none; flex:1; min-width:0; }
.hs-periods .chip { flex:none; min-height:44px; }
.hs-periods .chip[aria-pressed="true"] { background:var(--accent); color:var(--on-accent); border-color:var(--accent); }
.hs-arrow { flex:none; font-size:26px; min-width:44px; }
.hs-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.hs-grid .card { margin:0; min-width:0; }
.hs-card { padding:18px; text-align:left; overflow-wrap:anywhere; }
.hs-card h3 { margin:0 0 10px; font-size:16px; }
/* The personal key figures are compact cards (compact-card.css); their icons keep these colours. */
.hs-card.sleep h3 { color:var(--hs-sleep); }
.hs-card.hrv h3 { color:var(--hs-hrv); }
.hs-card.weight h3 { color:var(--hs-weight); }
.hs-card.sport h3 { color:var(--hs-sport); }
.hs-m-acute_load > strong, .hs-m-intensity_min > strong { color:var(--hs-load); }
.hs-m-vo2max_run > strong, .hs-m-vo2max_bike > strong { color:var(--hs-pulse); }
.hs-m-recovery_min > strong { color:var(--hs-hrv); }
.hs-m-sessions > strong { color:var(--hs-sessions); }
.hs-m-plan > strong { color:var(--hs-sport); }
.hs-number { display:block; font-size:28px; line-height:1.2; margin:4px 0; }
.hs-word { margin-top:auto; font-weight:600; }  /* still used by the Informe completo (full-report.js) */
.hs-lead { margin:18px 0; }
.hs-lead p:first-child { font-size:22px; font-weight:650; margin-bottom:5px; }
.hs-lead p { margin:0; }
.hs-section { font-size:19px; margin:24px 0 12px; }
.hs-rows { list-style:none; margin:0; padding:0; }
.hs-rows li { display:flex; justify-content:space-between; gap:12px; padding:10px 0; border-bottom:1px solid var(--sep); }
.hs-rows small, .hs-soon small { display:block; }
.hs-source, .hs-rows small.hs-source { display:inline; font-size:12px; font-weight:400; color:var(--muted); }
.hs-rows li > span { min-width:0; }
.hs-rows li > strong { flex-shrink:0; max-width:60%; overflow-wrap:anywhere; }
.hs-rows strong { text-align:right; font-size:14px; }
.hs-recovery { display:block; font-size:21px; margin-bottom:12px; }
.hs-card details { margin-top:14px; }
.hs-chart { margin-top:20px; }
.hs-bars { position:relative; height:120px; display:flex; gap:6px; align-items:stretch; padding-top:10px; }
.hs-column { flex:1; display:flex; align-items:flex-end; min-width:0; }
.hs-column > span { width:100%; background:var(--hs-hrv); border-radius:4px 4px 0 0; }
.sleep .hs-column > span { background:var(--hs-sleep); }
.hs-reference { position:absolute; left:0; right:0; border-top:1px dashed var(--text); z-index:1; pointer-events:none; }
.hs-reference span { position:absolute; right:0; bottom:0; font-size:11px; background:var(--card); }
.hs-axis { display:flex; gap:6px; margin-top:5px; }
.hs-axis small { flex:1; min-width:0; text-align:center; font-size:10px; overflow-wrap:anywhere; }
.hs-phases { display:flex; height:24px; border-radius:6px; overflow:hidden; margin-top:16px; }
.hs-phases .phase-0 { background:#138795; }.hs-phases .phase-1 { background:#56cbd4; }.hs-phases .phase-2 { background:#9de5d5; }.hs-phases .phase-3 { background:#b8c5cf; }
.hs-soon { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-top:20px; }
.hs-soon button { opacity:.55; cursor:default; }
.hs-ask { margin:20px 0; padding:16px 0; }
.hs-menu { position:relative; margin-left:auto; }
.hs-menu > summary { cursor:pointer; font-size:28px; min-width:44px; list-style:none; text-align:center; }
.hs-menu > summary::after { content:none; }
.hs-menu[open] > button { position:absolute; right:0; min-width:180px; z-index:4; background:var(--card); border:1px solid var(--sep); }
.hs-pdf { display:grid; gap:14px; }.hs-check { display:flex; gap:12px; align-items:center; min-height:44px; }.hs-check input { width:auto; }.hs-pdf input { font-size:16px; }
@media(min-width:600px) { .hs-blocks > :last-child:nth-child(odd) { grid-column:1/-1; } }
@media(max-width:599px) { .hs-blocks { grid-template-columns:minmax(0,1fr); }.hs-number { font-size:25px; } }

.hs-periods:has(.hs-arrow:not([hidden])) .tab-row { mask-image:linear-gradient(to right,#000 85%,transparent); }
/* Space between the compact cards and the blocks under them, as between the blocks. */
.health-report .hs-keys { margin-bottom:12px; }
/* Detail of a compact card (r2Dialog): the figure, what it means, its block or chart and the way to the full screen. */
.hs-detail { display:grid; gap:8px; min-width:min(520px,calc(100vw - 64px)); }
.hs-detail > p { margin:0; }
.hs-detail .hs-card { padding:0; }
.hs-detail .goal-chart { margin:4px 0 0; }
.hs-detail-links { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:center; margin-top:8px; }
.hs-detail-links > * { min-height:44px; display:inline-flex; align-items:center; }
.hs-recovery-note { margin:0 0 12px; }

/* Empty compact card (Marketing permissions guide §4): same box as the shared component, text instead of the figure. */
.compact-card-empty { gap:2px; }
.compact-card-empty .compact-card-note { font-size:13px; line-height:1.25; color:var(--muted); }
.compact-card-empty .compact-card-action { font-size:13px; line-height:1.25; font-weight:600; color:var(--accent); }

/* «i» per metric (Pablo, 18 Nov): the sheet with the explanation, and the «i» beside the figure in each detail. */
.hs-detail-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.hs-detail-info { position:relative; flex:none; }
.hs-detail-info::after { content:''; position:absolute; inset:-10px; }   /* 44 px touch area, same 24 px look */
.hs-info-text { margin:0; line-height:1.5; }

/* Rendimiento: the single explanation on top, with each piece of news as one line and its actions (Pablo, 18 Nov). */
.performance-today .performance-why { margin:0 0 8px; }
.performance-alert-line { padding:6px 0 6px 10px; margin-top:8px; }
.performance-alert-line p { margin:0; font-size:14px; }
.performance-alert-line .actions { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:4px; }

/* A metric's full page (Pablo, 18 Nov): title with its «i», period average/min/max, reference, origin and related data. */
.health-detail-title { display:flex; align-items:center; gap:10px; }
.health-detail-title h1 { margin:0; }
.health-detail-title .hs-detail-info { position:relative; }
.health-stats { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px; margin:12px 0; }
.health-stats dd { font-size:18px; font-weight:600; margin:2px 0 0; }
.health-reference, .health-origin { margin:4px 0; }
.health-related { margin:16px 0; }
.health-related .chips { display:flex; flex-wrap:wrap; gap:8px; }
.health-empty { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; }

/* Sheet G: header with back, title and «i»; the state line and the 30-day change; «Qué lo ha movido». */
.health-detail-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px; }
.health-detail-head h1 { margin:0; font-size:20px; text-align:center; }
.health-detail-head .hs-detail-info { position:relative; }
.health-hero-top { display:flex; justify-content:space-between; align-items:center; gap:8px; flex-wrap:wrap; }
.health-hero-state { font-size:12px; font-weight:600; letter-spacing:.06em; text-transform:uppercase; color:var(--green); }
.health-hero-state.out { color:var(--orange); }
.health-hero-tag { font-size:12px; font-weight:600; padding:3px 9px; border-radius:10px; background:color-mix(in srgb, var(--green) 22%, transparent); }
.health-causes { margin:16px 0; }
.health-cause-list { display:flex; flex-direction:column; padding:0; }
.health-cause { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; min-height:46px; padding:6px 12px; border-bottom:1px solid var(--sep); }
.health-cause:last-child { border-bottom:0; }
