/* Detailed analytics uses compact rows without shrinking chart or touch targets. */
#analytics_more { overflow: hidden; }
#analytics_more > summary { font-size: 12px; line-height: 1.35; padding: 12px 10px; }
#analytics_more .factor-details-content { padding: 0 7px 7px; }
#analytics_more .analytics-details-note { margin: 0 3px 8px; font-size: 10px; line-height: 1.4; }
#analytics_more .analytics-detail-card { min-width: 0; padding: 10px; margin: 0 0 8px; border: 1px solid #dce9e2; border-radius: 10px; background: #fff; box-shadow: none; }
#analytics_more .analytics-detail-card:last-child { margin-bottom: 0; }
#analytics_more .wellbeing-heading, #analytics_more .analytics-title { gap: 4px; margin: -5px -4px 3px 0; }
#analytics_more .wellbeing-heading h3, #analytics_more .analytics-title h3 { min-width: 0; margin: 0; color: #173f29; font-size: 14px; font-weight: 700; line-height: 1.3; font-family: var(--font-suisseintl); }
.analytics-heading-actions { display: flex; flex-shrink: 0; }
#analytics_more .metric-help, .analytics-refresh { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 40px; width: 40px; height: 44px; min-height: 44px; border: 0; padding: 0; border-radius: 8px; background: transparent; color: #397250; font: inherit; font-size: 18px; cursor: pointer; }
.analytics-refresh:hover { background: #f0f7f3; }
#analytics_more button:focus-visible, #analytics_more summary:focus-visible, .analytics-phase-scroll:focus-visible { outline: 2px solid #397250; outline-offset: 2px; }
#analytics_more .wellbeing-period-nav { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 3px; margin: 0 0 6px; background: #f3f8f5; border: 1px solid #e6eee9; border-radius: 9px; }
#analytics_more .wellbeing-period-nav button { min-height: 44px; border: 0; background: transparent; border-radius: 8px; font-size: 22px; line-height: 1; }
#analytics_more .wellbeing-period-nav strong { min-width: 0; font-size: 12px; font-weight: 600; color: #31563e; line-height: 1.3; }
#analytics_more .wellbeing-note { margin: 6px 0; font-size: 10.5px; line-height: 1.4; overflow-wrap: break-word; }
#analytics_more .wellbeing-stats { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid #e2ece5; border-radius: 9px; overflow: hidden; margin: 8px 0; }
#analytics_more .wellbeing-stat { display: grid; grid-template-columns: 25px minmax(0, 1fr) max-content; gap: 7px; align-items: center; padding: 9px 8px; border: 0; border-bottom: 1px solid #e7eee9; border-radius: 0; background: #f6faf8; }
#analytics_more .wellbeing-stat:last-child { border-bottom: 0; }
.wellbeing-stat-icon { display: grid; place-items: center; width: 25px; height: 25px; color: #3c7b54; background: #e1f1e7; border-radius: 8px; font-size: 17px; }
.wellbeing-stat-copy { min-width: 0; }
#analytics_more .wellbeing-stat h4 { margin: 0; font-size: 12px; font-weight: 600; color: #31563e; line-height: 1.25; }
#analytics_more .wellbeing-stat-copy p { margin: 3px 0 0; color: #6e7b72; font-size: 10px; line-height: 1.35; overflow-wrap: break-word; }
.wellbeing-stat-value { text-align: right; }
#analytics_more .wellbeing-stat-value strong { margin: 0; color: #173f29; font-size: 17px; font-weight: 700; line-height: 1.25; white-space: nowrap; }
.wellbeing-stat-value small { display: block; margin-top: 3px; color: #738178; font-size: 9px; line-height: 1.2; white-space: nowrap; }
#analytics_more .wellbeing-breakdown { border-top: 1px solid #e5ede7; margin-top: 8px; }
#analytics_more .wellbeing-breakdown > summary { min-height: 44px; padding: 12px 2px; color: #31563e; font-size: 12px; line-height: 1.4; }
#analytics_more .wellbeing-table th, #analytics_more .wellbeing-table td { padding: 7px 4px; }
#analytics_more .wellbeing-table caption { font-size: 10px; line-height: 1.4; }
.wellbeing-breakdown-group { margin-top: 10px; }
.wellbeing-breakdown-group h4 { margin: 0 0 6px; font-size: 11px; font-weight: 600; color: #31563e; }
.wellbeing-breakdown-group dl { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 5px 10px; margin: 0; color: #647369; font-size: 11px; line-height: 1.4; }
.wellbeing-breakdown-group dt, .wellbeing-breakdown-group dd { margin: 0; }
.wellbeing-breakdown-group dd { color: #31563e; white-space: nowrap; }
#analytics_more .symptom-calendar { gap: 3px; }
#analytics_more .symptom-weekday { padding: 5px 0; font-size: 10px; }
#analytics_more .symptom-day { min-height: 44px; border-radius: 7px; font-size: 12px; padding: 3px 0; }
#analytics_more .symptom-day small { font-size: 8px; line-height: 10px; min-height: 10px; }
#analytics_more .symptom-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 8px; margin: 9px 0; font-size: 10px; }
#analytics_more .symptom-legend span { white-space: nowrap; }
#analytics_more .symptom-day-detail { margin-top: 9px; padding-top: 9px; font-size: 11px; line-height: 1.4; }
#analytics_more .symptom-day-detail p { margin: 5px 0 0; }
#analytics_more .symptom-day-detail > strong { display: block; color: #31563e; font-size: 12px; }
#analytics_more .symptom-day-detail .btn, #analytics_more .period-history-row > button, #analytics_more .wellbeing-breakdown > .btn { width: auto; padding: 9px 12px; min-height: 44px; margin-top: 8px; font-size: 11px; border-radius: 8px; }
#analytics_more .period-history { gap: 8px; }
#analytics_more .period-history-row { padding-top: 8px; }
#analytics_more .period-history-row p { margin: 0; font-size: 11px; line-height: 1.4; }
.analytics-phase-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; border-radius: 6px; }
#analytics_more .analytics-phase-table { min-width: 250px; margin: 0; table-layout: fixed; }
#analytics_more .analytics-phase-table th { padding: 7px 3px; font-size: 9px; line-height: 1.3; text-transform: none; white-space: nowrap; }
#analytics_more .analytics-phase-table th:first-child { width: 40%; }
#analytics_more .analytics-phase-table td { padding: 8px 3px; font-size: 12px; }
#analytics_more .analytics-phase-table .table-badge { padding: 3px 4px; font-size: 9px; font-weight: 500; text-transform: none; white-space: nowrap; overflow-wrap: normal; }
#analytics_more .analytics-phase-count { margin-top: 3px; font-size: 9px; white-space: nowrap; }
#analytics_more .analytics-unit { font-size: 9px; margin-top: 2px; }
#analytics_more .analytics-caption { margin: 4px 0 8px; font-size: 10px; line-height: 1.4; }
#analytics_more .hourly-chart-wrapper { height: 215px; }
#analytics_more .hourly-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
#analytics_more .hourly-legend-button { min-width: 0; min-height: 44px; padding: 7px; gap: 5px; border-color: #dce7df; background: #f7faf8; font-size: 10px; white-space: nowrap; }
#analytics_more .hourly-swatch { width: 16px; }
#analytics_more .analytics-empty { padding: 15px 5px; font-size: 11px; line-height: 1.4; }
@container patient-analytics (min-width: 650px) { #analytics_more .factor-details-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: start; } #analytics_more .analytics-details-note { grid-column: 1 / -1; margin-bottom: 0; } #analytics_more .analytics-detail-card { margin: 0; } }
