:root {
  --ink: #1f302e;
  --muted: #71807d;
  --line: #dce5e1;
  --line-strong: #b8c9c1;
  --paper: #f4f6f3;
  --panel: #fffefa;
  --teal: #1f746c;
  --teal-dark: #175b55;
  --warm: #c45a2c;
  --sleep-blue: #3d74c5;
  --date-count: 69;
  --label-width: 244px;
  --cell-width: 66px;
  --timeline-width: 4554px;
  --header-height: 92px;
  --chart-height: 220px;
  font-family: "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
}

body {
  font-size: 14px;
}

button,
select,
input {
  font: inherit;
}

button,
select {
  color: inherit;
}

.app-shell {
  width: min(100%, 1740px);
  margin: 0 auto;
  padding: 24px 28px 24px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 720;
}

.subtitle {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.header-meta #dateRange {
  color: var(--ink);
  font-weight: 700;
}

.meta-divider {
  width: 1px;
  height: 14px;
  background: var(--line-strong);
}

.control-bar {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.control-group label {
  white-space: nowrap;
}

select {
  min-width: 132px;
  height: 34px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.check-control {
  gap: 16px;
}

.check-control label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

input[type="checkbox"] {
  accent-color: var(--teal);
}

.control-spacer {
  flex: 1;
}

.data-summary {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sheet-viewport {
  overflow: auto;
  margin-top: 18px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(27, 68, 62, 0.06);
  scrollbar-color: #a9c3bd #edf2f0;
}

.sheet-grid {
  width: calc(var(--label-width) + var(--timeline-width));
  min-width: 100%;
}

.sheet-corner {
  position: sticky;
  left: 0;
  z-index: 8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: var(--label-width);
  height: var(--header-height);
  padding: 0 20px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #eff5f2;
}

.corner-kicker {
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sheet-corner strong {
  font-size: 16px;
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 7;
  width: var(--timeline-width);
  height: var(--header-height);
  border-bottom: 1px solid var(--line-strong);
  background: #fff;
}

.phase-track,
.date-track {
  display: grid;
  grid-template-columns: repeat(var(--date-count), var(--cell-width));
  width: calc(var(--timeline-width) - var(--axis-offset) - var(--timeline-right-offset));
  margin-left: var(--axis-offset);
}

.phase-track {
  height: 39px;
  border-bottom: 1px solid var(--line);
}

.phase-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.54);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.phase-cell span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-track {
  height: 53px;
}

.date-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding-left: 9px;
  border-right: 1px solid var(--line);
  background: #fbfcfb;
}

.date-cell.is-today {
  background: #e7f4ee;
  box-shadow: inset 0 -3px 0 var(--teal);
}

.date-label {
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.weekday-label {
  color: var(--muted);
  font-size: 10px;
}

.sheet-body {
  width: calc(var(--label-width) + var(--timeline-width));
}

.section-row {
  display: grid;
  grid-template-columns: var(--label-width) var(--timeline-width);
  min-height: var(--chart-height);
  border-bottom: 1px solid var(--line-strong);
}

.label-panel {
  position: sticky;
  left: 0;
  z-index: 5;
  width: var(--label-width);
  padding: 18px 16px 14px 20px;
  border-right: 1px solid var(--line-strong);
  background: #fbfdfc;
}

.section-row:nth-child(odd) .label-panel {
  background: #f5f9f7;
}

.label-title {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.label-title strong {
  font-size: 16px;
}

.unit-chip {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.series-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.series-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #4e6265;
  font-size: 11px;
}

.series-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.series-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-panel {
  position: relative;
  width: var(--timeline-width);
  height: var(--chart-height);
  overflow: hidden;
  background-color: #fff;
  background-image:
    linear-gradient(to right, rgba(214, 226, 222, 0.74) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(225, 234, 231, 0.75) 1px, transparent 1px);
  background-size: var(--cell-width) 100%, 100% 44px;
}

.section-row:nth-child(odd) .chart-panel {
  background-color: #fcfefd;
}

.chart-panel svg {
  display: block;
  width: var(--timeline-width);
  height: var(--chart-height);
  overflow: visible;
}

.text-chart-panel {
  min-height: 132px;
}

.text-section-row {
  min-height: 132px;
}

.text-chart-panel svg {
  height: 132px;
}

.text-timeline-baseline {
  stroke: rgba(76, 111, 104, 0.42);
  stroke-width: 1.1;
}

.text-timeline-value {
  fill: #8b3f5d;
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #f9fbfa;
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.text-timeline-hit-area {
  fill: transparent;
  cursor: crosshair;
}

.sleep-section-row {
  min-height: 330px;
}

.sleep-chart-panel {
  height: 330px !important;
  background-size: var(--cell-width) 100%, 100% 50px;
}

.sleep-chart-panel svg {
  height: 330px;
}

.axis-label {
  fill: #829492;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.sleep-chart-title {
  fill: #17343a;
  font-size: 20px;
  font-weight: 720;
}

.sleep-chart-subtitle {
  fill: #6d7f83;
  font-size: 13px;
  font-weight: 600;
}

.sleep-chart-count {
  fill: #829492;
  font-size: 11px;
}

.sleep-axis-label {
  fill: #829492;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.sleep-band {
  cursor: crosshair;
}

.sleep-band:hover {
  fill: #285fc8;
}

.sleep-value-label {
  fill: #3974e6;
  font-size: 10px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.sleep-value-label.compact {
  font-size: 8px;
  stroke-width: 2px;
}

.sleep-value-label.sparse {
  font-size: 7px;
  stroke-width: 1.5px;
}

.training-section-row {
  min-height: 300px;
}

.training-chart-panel {
  height: 300px !important;
  background-size: var(--cell-width) 100%, 100% 48px;
}

.training-chart-panel svg {
  height: 300px;
}

.training-chart-title {
  fill: #17343a;
  font-size: 13px;
  font-weight: 720;
}

.training-chart-subtitle {
  fill: #829492;
  font-size: 10px;
}

.training-axis-label {
  fill: #829492;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.training-lane-label {
  fill: #829492;
  font-size: 10px;
  font-weight: 700;
}

.training-cell-value {
  fill: #4e6265;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.training-formal-value {
  fill: #829492;
  font-size: 8px;
}

.axis-line {
  stroke: rgba(132, 159, 152, 0.45);
  stroke-width: 1;
}

.phase-divider {
  stroke: rgba(45, 90, 80, 0.5);
  stroke-width: 1.5;
  stroke-dasharray: 3 4;
}

.series-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.series-point {
  stroke: #fff;
  stroke-width: 1.4;
}

.hover-line {
  stroke: #17343a;
  stroke-width: 1;
  stroke-dasharray: 4 4;
  opacity: 0;
  pointer-events: none;
}

.chart-hit-area {
  fill: transparent;
  cursor: crosshair;
}

.tooltip {
  position: fixed;
  z-index: 30;
  display: none;
  min-width: 154px;
  padding: 10px 12px;
  border: 1px solid #b9cbc6;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 26px rgba(23, 52, 58, 0.14);
  pointer-events: none;
}

.tooltip-date {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.tooltip-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
  color: #4e6265;
  font-size: 11px;
}

.tooltip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.tooltip-value {
  margin-left: auto;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.page-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 800px) {
  :root {
    --date-count: 69;
    --label-width: 178px;
    --cell-width: 60px;
    --timeline-width: 4140px;
  }

  .app-shell {
    padding: 24px 14px 18px;
  }

  .page-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .header-meta {
    white-space: normal;
  }

  .control-bar {
    flex-wrap: wrap;
    gap: 12px 18px;
    padding: 14px 0;
  }

  .control-spacer {
    display: none;
  }

  .data-summary {
    width: 100%;
  }

  .page-footer {
    flex-direction: column;
    gap: 5px;
  }
}

/* Full-screen workbench treatment */
:root {
  --ink: #17333a;
  --muted: #718280;
  --line: rgba(38, 79, 75, 0.14);
  --line-strong: rgba(38, 79, 75, 0.24);
  --paper: #f4f6f5;
  --panel: #f9fbfa;
  --teal: #15766e;
  --label-width: 196px;
  --cell-width: 72px;
  --axis-offset: 52px;
  --timeline-right-offset: 0px;
  --header-height: 76px;
  --header-control-gap: 8px;
  --focus-row-height: 640px;
}

html,
body {
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: var(--paper);
}

body {
  font-size: 13px;
}

.app-shell {
  width: 100%;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  min-height: 100%;
  margin: 0;
  padding: 4px 0 0;
  display: flex;
  flex-direction: column;
}

.page-header {
  align-items: center;
  gap: 22px;
  padding: 0 28px 14px;
  border-bottom: 1px solid var(--line);
}

.page-header > .brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

h1 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.header-meta {
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}

.control-bar {
  min-height: 52px;
  padding: 8px 28px;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(249, 251, 250, 0.72);
}

.control-group {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.range-control {
  gap: 0;
}

.control-label {
  white-space: nowrap;
}

.range-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
}

.range-button {
  min-width: 34px;
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.range-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.3);
}

.range-button.is-active {
  background: rgba(255, 255, 255, 0.56);
  color: var(--teal);
  box-shadow: 0 1px 5px rgba(34, 54, 51, 0.12);
}

.zoom-control {
  min-width: 126px;
  gap: 7px;
}

.zoom-control input[type="range"] {
  width: 86px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
}

.zoom-control output {
  min-width: 34px;
  color: var(--ink);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

select {
  min-width: 148px;
  height: 30px;
  padding: 0 22px 0 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background-color: transparent;
  color: var(--ink);
  font-weight: 650;
}

.check-control {
  gap: 10px;
}

.check-control label {
  gap: 0;
  color: var(--muted);
}

input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 28px;
  height: 16px;
  margin: 0;
  border: 1px solid rgba(64, 76, 74, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 52, 50, 0.2);
  transition: transform 160ms ease;
}

input[type="checkbox"]:checked {
  border-color: var(--teal);
  background: var(--teal);
}

input[type="checkbox"]:checked::after {
  transform: translateX(12px);
}

.data-summary {
  color: var(--muted);
  font-size: 11px;
  margin-left: 2px;
}

.date-range-button {
  display: inline-flex;
  align-items: center;
  height: 32px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.date-range-button:hover,
.date-range-button:focus-visible {
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 3px 10px rgba(34, 54, 51, 0.1);
  outline: none;
}

/* Single-row control header: keep the brand, controls, and date range aligned. */
.page-header {
  gap: var(--header-control-gap);
  padding: 10px 28px 12px;
  align-items: center;
  min-height: 66px;
}

.brand-block {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-block h1 {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  width: clamp(136px, 15vw, 184px);
  margin-left: 0;
  height: auto;
  line-height: 0;
  white-space: nowrap;
}

.brand-block h1 img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-title-text {
  display: none;
  color: var(--ink);
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(24px, 2.35vw, 34px);
  font-weight: 760;
  line-height: 1;
  white-space: nowrap;
}

html[data-lang="en"] .brand-block h1 {
  width: auto;
}

html[data-lang="en"] .brand-block h1 img {
  display: none;
}

html[data-lang="en"] .brand-title-text {
  display: block;
}

.brand-block .data-summary {
  flex: 0 0 auto;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin: 0;
  color: var(--muted);
  font-family: "Avenir Next", "Helvetica Neue", "PingFang SC", sans-serif;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.site-navigation {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  gap: 1px;
  padding: 3px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(35, 52, 49, 0.08);
}

.strength-header-navigation {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  gap: 1px;
  padding: 3px;
  border: 1px solid #ffffff;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(35, 52, 49, 0.08);
}

.strength-header-navigation[hidden] {
  display: none;
}

.site-nav-button,
.site-nav-option,
.strength-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.site-nav-button:hover,
.site-nav-button:focus-visible,
.site-nav-option:hover,
.site-nav-option:focus-visible,
.strength-filter-button:hover,
.strength-filter-button:focus-visible {
  color: var(--ink);
  background: rgba(29, 29, 31, 0.06);
  outline: none;
}

.site-nav-button.is-active {
  color: var(--ink);
  background: rgba(29, 29, 31, 0.1);
}

.strength-filter-button.is-active {
  color: var(--ink);
  background: rgba(29, 29, 31, 0.1);
}

.topbar-controls {
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
  min-height: 34px;
  padding: 0;
  gap: var(--header-control-gap);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-meta {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.header-meta {
  margin-left: 0;
  align-self: center;
}

.header-meta .source-sheet-tabs {
  margin-right: 0;
}

.topbar-controls .range-switch,
.topbar-controls .zoom-control,
.topbar-controls .check-control,
.date-range-button {
  height: 38px;
  min-height: 38px;
  border: 1px solid #ffffff;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(35, 52, 49, 0.08);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.topbar-controls .range-switch {
  gap: 1px;
  padding: 3px;
  border-radius: 999px;
}

.topbar-controls .zoom-control {
  min-width: 146px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 999px;
}

.topbar-controls .check-control {
  gap: 0;
  padding: 2px;
  border-radius: 999px;
  overflow: visible;
}

.topbar-controls .check-control label {
  width: 34px;
  min-width: 34px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.topbar-controls .control-spacer {
  min-width: 8px;
}

.topbar-controls .data-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-controls .check-control {
  gap: 0;
}

.topbar-controls .check-control label {
  position: relative;
  flex: 0 0 34px;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  color: var(--muted);
  cursor: pointer;
}

.topbar-controls .check-control label + label {
  margin-left: -4px;
}

.topbar-controls .check-control label:hover,
.topbar-controls .check-control label:has(input:checked) {
  z-index: 1;
}

.topbar-controls .check-control input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
}

.topbar-controls .check-control label:has(input:focus-visible) {
  outline: 2px solid rgba(21, 118, 110, 0.42);
  outline-offset: 3px;
}

.topbar-controls .check-control label:has(input:checked) {
  color: var(--muted);
  box-shadow: inset 0 0 0 999px rgba(29, 29, 31, 0.09);
}

.topbar-controls .check-control label:hover,
.topbar-controls .range-button:hover,
.date-range-button:hover,
.date-range-button:focus-visible {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 999px rgba(29, 29, 31, 0.07);
}

.topbar-controls .check-control label span {
  line-height: 1;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.topbar-controls .check-control label:has(input:checked) span {
  font-weight: 650;
}

.page-header,
.timeline-header {
  -webkit-user-select: none;
  user-select: none;
}

.topbar-controls .range-button {
  position: relative;
  height: 30px;
  border-radius: 999px;
}

.topbar-controls .range-button:not(.is-active) + .range-button:not(.is-active)::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 50%;
  width: 1px;
  height: 14px;
  border-radius: 1px;
  background: rgba(74, 84, 86, 0.18);
  transform: translateY(-50%);
  pointer-events: none;
}

.topbar-controls .range-button:hover {
  background: transparent;
}

.topbar-controls .range-button.is-active {
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  box-shadow: inset 0 0 0 999px rgba(29, 29, 31, 0.1);
}

.topbar-controls .range-button.is-active:hover {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 999px rgba(29, 29, 31, 0.1);
}

.date-range-button {
  width: auto;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  border-radius: 999px;
  padding-inline: 14px;
  justify-content: center;
}

.source-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.source-button em {
  margin-left: 9px;
  color: var(--teal);
  font-style: normal;
}

.source-button.tab {
  min-width: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #e4efec;
  color: var(--teal);
  font-size: 14px;
  font-weight: 700;
}

.source-button:hover,
.source-button:focus-visible {
  background: #d9e9e4;
  color: var(--teal-dark);
  outline: none;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 3px;
  border: 1px solid #fff;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(35, 52, 49, 0.08);
}

.language-button {
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.language-button:hover,
.language-button:focus-visible {
  color: var(--ink);
  outline: none;
}

.language-button.is-active {
  color: var(--ink);
  box-shadow: inset 0 0 0 999px rgba(29, 29, 31, 0.1);
}

.topbar-controls .range-button.is-active,
.topbar-controls .check-control label:has(input:checked) {
  background: transparent;
}

.sheet-viewport {
  flex: 1;
  min-height: 0;
  margin-top: 0;
  scrollbar-gutter: stable;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
  scroll-padding-top: var(--header-height);
  scroll-snap-type: none;
  border: 0;
  background: var(--panel);
  box-shadow: none;
  scrollbar-color: #a5bbb4 #e7efec;
}

.sheet-viewport[hidden] {
  display: none;
}

.app-shell.is-source-mode .topbar-controls {
  display: none;
}

.app-shell.is-source-mode .date-range-button,
.app-shell.is-training-mode .date-range-button {
  display: none;
}

.app-shell.is-training-mode .topbar-controls {
  display: none;
}

.app-shell.is-training-mode > .page-header {
  justify-content: flex-start;
}

.app-shell.is-training-mode .strength-header-navigation {
  margin-left: 0;
}

.app-shell.is-training-mode .source-download-button {
  margin-left: auto;
}

.app-shell.is-source-mode {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  min-width: 0;
}

.app-shell.is-source-mode > .page-header,
.app-shell.is-source-mode > .source-view {
  min-height: 0;
  min-width: 0;
}

.app-shell.is-source-mode > .source-view {
  grid-row: 2;
  height: 100%;
}

.training-embedded-view {
  flex: 1;
  min-height: 0;
  display: flex;
  background: var(--paper);
}

.training-embedded-view[hidden] {
  display: none;
}

.training-embedded-view iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: var(--paper);
}

.source-view-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-height: 52px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 252, 250, 0.96);
}

.source-view {
  position: relative;
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: #fff;
}

.source-view[hidden] {
  display: none;
}

.source-sheet-tabs {
  display: none;
}

.source-sheet-tab {
  display: none;
}

.source-sheet-viewport {
  flex: 1;
  height: 100%;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  background: #fff;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.source-sheet-viewport.is-panning {
  cursor: grabbing;
  user-select: none;
}

.source-sheet-document {
  display: block;
  width: fit-content;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  background: #fff;
}

.source-sheet-document[hidden] {
  display: none;
}

.source-sheet-document table {
  width: auto;
  min-width: 0;
  margin: 0;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
  font-family: "Heiti SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.source-sheet-document td,
.source-sheet-document th {
  box-sizing: border-box;
}

.source-sheet-document td[data-freeze-sticky="true"] {
  position: sticky;
}

.sheet-grid {
  width: calc(var(--label-width) + var(--timeline-width));
  display: grid;
  grid-template-columns: var(--label-width) var(--timeline-width);
  grid-template-rows: var(--header-height) auto;
}

.sheet-corner {
  grid-column: 1;
  grid-row: 1;
  width: var(--label-width);
  height: var(--header-height);
  padding: 0 20px;
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #e5efec;
}

.sheet-corner {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 20;
}

.corner-kicker {
  display: none;
}

.sheet-corner strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

.timeline-header {
  grid-column: 2;
  grid-row: 1;
  width: var(--timeline-width);
  height: var(--header-height);
  border-bottom: 1px solid var(--line-strong);
  background: #f5f8f6;
}

.frozen-y-axis {
  transform: translateX(var(--y-axis-scroll, 0px));
  transform-origin: 0 0;
  transform-box: fill-box;
}

.timeline-header::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--axis-offset);
  background: linear-gradient(180deg, #e8f1ee 0%, #f1f6f4 100%);
  border-right: 1px solid rgba(38, 79, 75, 0.2);
  pointer-events: none;
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 8;
}

.phase-track {
  height: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.48);
}

.week-track {
  display: grid;
  grid-template-columns: repeat(var(--date-count), var(--cell-width));
  width: calc(var(--timeline-width) - var(--axis-offset) - var(--timeline-right-offset));
  margin-left: var(--axis-offset);
  height: 18px;
  border-bottom: 1px solid var(--line);
  background: #edf4f1;
}

.week-track[hidden] {
  display: none;
}

.week-cell {
  display: flex;
  align-items: center;
  padding: 0 8px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.phase-cell {
  padding: 0 10px;
  border-right: 0;
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.date-track {
  height: 42px;
  overflow: hidden;
}

.compact-date {
  display: none;
}

.date-track[data-density="small"] .weekday-label {
  display: none;
}

.date-track[data-density="small"] .date-cell {
  align-items: center;
  justify-content: center;
  padding-left: 0;
}

.date-track[data-density="small"] .date-label {
  font-size: 9px;
}

.date-track[data-density="compact"] .full-date,
.date-track[data-density="compact"] .weekday-label {
  display: none;
}

.date-track[data-density="compact"] .compact-date {
  display: block;
}

.date-track[data-density="compact"] .date-cell {
  align-items: center;
  justify-content: center;
  gap: 0;
  padding-left: 0;
}

.date-track[data-density="compact"] .date-label {
  font-size: 9px;
}

.date-track[data-density="tiny"] .date-label,
.date-track[data-density="tiny"] .weekday-label {
  display: none;
}

.date-track[data-density="tiny"] .date-cell {
  padding-left: 0;
}

.date-cell {
  min-width: 0;
  overflow: hidden;
  gap: 3px;
  padding-left: 10px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.date-cell.is-today {
  background: rgba(21, 118, 110, 0.12);
  box-shadow: inset 0 -2px 0 var(--teal);
}

.date-label {
  font-size: 11px;
}

.weekday-label {
  font-size: 10px;
}

.sheet-body {
  grid-column: 1 / -1;
  grid-row: 2;
  width: calc(var(--label-width) + var(--timeline-width));
}

.section-row {
  min-height: var(--chart-height);
  border-bottom: 1px solid var(--line);
}

.label-panel {
  position: sticky;
  left: 0;
  z-index: 12;
  width: var(--label-width);
  padding: 16px 18px 12px;
  border-right: 1px solid var(--line-strong);
  box-shadow: inset 4px 0 0 var(--group-accent, var(--teal)), inset 0 3px 0 var(--group-accent, var(--teal));
  background: #e5efec;
}

.section-row:nth-child(odd) .label-panel {
  background: #eff5f2;
}

.section-row {
  border-bottom: 1px solid var(--line-strong);
}

.text-section-row {
  min-height: 132px;
}

.label-title {
  gap: 6px;
  margin-bottom: 10px;
}

.label-title strong {
  font-size: 15px;
}

.series-list {
  gap: 0;
  border-top: 1px solid rgba(47, 88, 81, 0.16);
}

.series-item {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 8px;
  min-height: 29px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(47, 88, 81, 0.16);
  color: #617370;
  font-size: 11px;
}

.series-change {
  margin-left: 0;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.series-change.is-positive { color: var(--warm); }
.series-change.is-negative { color: #2f8b70; }
.series-change.is-neutral { color: var(--muted); }

.training-action-list .series-item {
  grid-template-columns: 8px minmax(0, 1fr) 58px;
}

.training-action-list .series-change {
  justify-self: center;
  min-width: 58px;
  margin: 0;
  text-align: center;
}

.training-action-list .series-change.is-positive {
  color: #c94742;
}

.training-action-list .series-change.is-negative {
  color: #2f8b70;
}

.training-action-list .series-change.is-neutral {
  color: var(--muted);
}

.chart-panel {
  overflow: visible;
  background-color: #f9fbfa;
  background-image:
    linear-gradient(to right, rgba(69, 106, 99, 0.11) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(69, 106, 99, 0.1) 1px, transparent 1px);
  background-position: var(--axis-offset) 0, 0 0;
  background-size: var(--cell-width) 100%, 100% 44px;
}

.section-row:nth-child(odd) .chart-panel {
  background-color: #fbfcfb;
}

.sleep-chart-panel {
  background-size: var(--cell-width) 100%, 100% 50px;
}

.training-chart-panel {
  background-size: var(--cell-width) 100%, 100% 48px;
}

.training-combined-row {
  min-height: var(--focus-row-height);
  scroll-snap-align: none;
}

.training-combined-panel {
  height: var(--focus-row-height) !important;
  background-size: var(--cell-width) 100%, 100% 48px;
}

.training-combined-panel svg {
  height: var(--focus-row-height);
}

.expanded-chart-row {
  min-height: var(--focus-row-height);
  scroll-snap-align: none;
}

.expanded-chart-panel {
  height: var(--focus-row-height) !important;
  background-size: var(--cell-width) 100%, 100% 52px;
}

.expanded-chart-panel svg {
  height: var(--focus-row-height);
}

.training-action-list {
  gap: 9px;
}

.training-action-list .series-item {
  grid-template-columns: 8px minmax(0, 1fr) 58px;
}

.line-value-label,
.training-value-label,
.bar-value-label {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  paint-order: stroke;
  stroke: #f9fbfa;
  stroke-width: 3px;
  stroke-linejoin: round;
  pointer-events: none;
}

.data-bar {
  opacity: 0.88;
}

.data-bar:hover {
  opacity: 1;
  filter: brightness(0.92);
}

.tooltip-training-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
}

.axis-line {
  stroke: rgba(76, 111, 104, 0.42);
  stroke-width: 1.1;
}

.axis-gutter {
  fill: #eaf3f0;
  pointer-events: none;
}

.axis-spine {
  stroke: rgba(36, 80, 73, 0.52);
  stroke-width: 1.25;
  pointer-events: none;
}

.axis-label,
.sleep-axis-label,
.training-axis-label {
  fill: #4d6864;
  font-weight: 650;
}

.phase-divider {
  stroke: rgba(45, 90, 80, 0.34);
}

.tooltip {
  padding: 10px 12px;
  border: 1px solid rgba(53, 94, 87, 0.18);
  border-radius: 8px;
  background: rgba(250, 252, 251, 0.94);
  box-shadow: 0 14px 34px rgba(23, 52, 58, 0.16);
  backdrop-filter: blur(12px);
}

@media (max-width: 800px) {
  .app-shell {
    padding-top: 12px;
  }

  .page-header,
  .control-bar {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-header {
    align-items: center;
    flex-direction: row;
  }

  .header-meta {
    margin-left: auto;
    font-size: 11px;
  }

  .app-shell.is-source-mode .header-meta {
    margin-left: auto;
  }

  .brand-block {
    gap: 8px;
  }

  .brand-block .data-summary {
    height: 22px;
    margin-bottom: 0;
    font-size: 16px;
  }

  .control-bar {
    flex-wrap: wrap;
    gap: 10px 16px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .data-summary {
    width: auto;
    margin-left: auto;
  }

  .zoom-control {
    min-width: 148px;
  }

  :root {
    --label-width: 164px;
    --cell-width: 60px;
  }

  .training-combined-row {
    min-height: var(--focus-row-height);
  }

  .expanded-chart-row {
    min-height: var(--focus-row-height);
  }

  .expanded-chart-panel,
  .expanded-chart-panel svg,
  .training-combined-panel,
  .training-combined-panel svg {
    height: var(--focus-row-height) !important;
  }
}

/* Narrow phones: keep the header usable without widening the page. */
@media (max-width: 700px) {
  :root {
    --label-width: 150px;
    --cell-width: 52px;
  }

  /*
   * Use Safari's largest layout viewport here, rather than its dynamic
   * visual viewport, so the table continues behind the bottom toolbar.
   */
  html,
  body {
    height: 100vh;
    height: 100lvh;
    min-height: 100vh;
    min-height: 100lvh;
  }

  .app-shell {
    width: 100%;
    height: 100vh;
    height: 100lvh;
    min-height: 100vh;
    min-height: 100lvh;
    padding-top: 8px;
    overflow: hidden;
    background: var(--panel);
  }

  .app-shell.is-source-mode {
    height: 100vh;
    height: 100lvh;
    min-height: 100vh;
    min-height: 100lvh;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-shell.is-source-mode > .source-view,
  .app-shell.is-source-mode > .source-view > .source-sheet-viewport {
    height: 100%;
    min-height: 0;
  }

  .app-shell.is-source-mode > .source-view > .source-sheet-viewport {
    background: #fff;
  }

  .page-header {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    column-gap: 8px;
    row-gap: 6px;
    padding: 8px 10px 10px;
    min-height: 0;
  }

  .page-header > .brand-block {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    gap: 5px;
    align-items: center;
    min-height: 32px;
  }

  .page-header > .source-download-button {
    grid-column: 2;
    grid-row: 2;
    margin-left: 16px;
    height: 32px;
    justify-self: end;
  }

  .page-header > .language-switch {
    grid-column: 3;
    grid-row: 2;
    margin-left: 4px;
    min-height: 32px;
    width: max-content;
    justify-self: end;
  }

  .page-header > .site-navigation {
    grid-column: 1;
    grid-row: 2;
    justify-self: stretch;
    width: 100%;
  }

  .brand-block h1 {
    width: clamp(108px, 34vw, 136px);
    height: 32px;
  }

  .brand-block h1 img {
    width: 100%;
    height: 26px;
    object-fit: contain;
  }

  html[data-lang="en"] .brand-block h1 {
    width: auto;
  }

  .brand-title-text {
    max-width: min(220px, 56vw);
    overflow: hidden;
    font-size: clamp(21px, 6.2vw, 25px);
    text-overflow: ellipsis;
  }

  .brand-block .data-summary {
    height: 20px;
    align-self: center;
    font-size: 12px;
  }

  .site-navigation {
    min-height: 32px;
    gap: 0;
    padding: 2px;
  }

  .site-nav-button {
    flex: 1 1 0;
    min-width: 0;
    height: 26px;
    padding-inline: 3px;
    font-size: 10px;
  }

  .page-header > .date-range-button {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    display: inline-flex;
  }

  .app-shell.is-source-mode > .page-header > .date-range-button,
  .app-shell.is-training-mode > .page-header > .date-range-button {
    display: inline-flex;
  }

  .date-range-button {
    height: 32px;
    min-height: 32px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .page-header > .topbar-controls {
    display: none;
  }

  .page-header > .site-navigation + .source-download-button,
  .page-header > .source-download-button + .topbar-controls {
    margin-left: 16px;
  }

  .page-header > .site-navigation {
    min-width: 0;
  }

  .app-shell.is-training-mode > .page-header {
    grid-template-rows: auto auto auto;
  }

  .app-shell.is-training-mode > .page-header > .strength-header-navigation {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    margin-left: 0;
    min-height: 32px;
    padding: 2px;
    overflow: hidden;
  }

  .app-shell.is-training-mode > .page-header > .source-download-button {
    grid-column: 2;
    grid-row: 2;
    margin-left: 16px;
  }

  .app-shell.is-training-mode > .page-header > .language-switch {
    grid-column: 3;
    grid-row: 2;
    margin-left: 4px;
  }

  .app-shell.is-training-mode > .page-header > .site-navigation {
    grid-column: 1;
    grid-row: 2;
  }

  .page-header > .site-navigation .site-nav-button {
    flex: 1 1 0;
  }

  .page-header > .site-navigation,
  .page-header > .date-range-button {
    align-self: center;
  }

  .page-header > .brand-block {
    align-self: center;
  }

  .page-header > .source-download-button,
  .page-header > .language-switch {
    justify-self: end;
  }

  .language-button {
    min-width: 29px;
    height: 24px;
    padding-inline: 5px;
    font-size: 10px;
  }

  .source-download-button {
    min-width: 56px;
    height: 32px;
    padding-inline: 6px;
    font-size: 10px;
  }

  .strength-filter-button {
    flex: 1 1 0;
    min-width: 0;
    height: 26px;
    padding-inline: 2px;
    font-size: 9px;
  }

  .sheet-corner,
  .label-panel {
    width: var(--label-width);
  }

  .sheet-corner {
    padding-inline: 12px;
  }

  .label-panel {
    padding-inline: 12px 10px;
  }

	  .label-title strong {
	    font-size: 14px;
	  }

  html[data-lang="en"] .series-item {
    font-size: 10px;
  }
}

@media (max-width: 360px) {
  :root {
    --label-width: 138px;
  }

  .brand-title-text {
    max-width: min(190px, 51vw);
    font-size: 20px;
  }

  .brand-block {
    gap: 4px;
  }

  .brand-block .data-summary {
    font-size: 11px;
  }

  .language-button {
    min-width: 27px;
    padding-inline: 5px;
  }

  .topbar-controls {
    gap: 4px;
  }

  .source-view-header {
    min-height: 48px;
    padding-inline: 10px;
  }

  .topbar-controls .check-control label {
    flex-basis: 31px;
    width: 31px;
    min-width: 31px;
  }

  .topbar-controls .range-button {
    min-width: 28px;
    padding-inline: 4px;
  }

  .page-header {
    column-gap: 5px;
  }

  .source-download-button {
    min-width: 58px;
    padding-inline: 8px;
  }

  .date-range-button {
    padding-inline: 6px;
  }
}

/* Shared visual system: quiet status feedback, stable controls, and lighter data surfaces. */
:root {
  --status-info-bg: #edf5f3;
  --status-info-line: #c7ddd7;
  --status-info-ink: #286b62;
  --status-error-bg: #fff4ef;
  --status-error-line: #efcdbd;
  --status-error-ink: #a64b2c;
  --focus-ring: rgba(31, 116, 108, 0.34);
}

.status-message {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 30;
  max-width: min(420px, calc(100vw - 28px));
  min-height: 32px;
  padding: 7px 11px;
  border: 1px solid var(--status-info-line);
  border-radius: 6px;
  background: var(--status-info-bg);
  color: var(--status-info-ink);
  font-size: 12px;
  line-height: 1.45;
  box-shadow: 0 6px 18px rgba(31, 72, 65, 0.08);
  transform: translate(-50%, -50%);
}

.status-message[data-state="error"] {
  border-color: var(--status-error-line);
  background: var(--status-error-bg);
  color: var(--status-error-ink);
}

.status-message[hidden] {
  display: none;
}

.topbar-controls .check-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 76px;
  min-width: 76px;
  padding: 2px;
  border-radius: 999px;
}

.topbar-controls .check-control label {
  flex: none;
  width: auto;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  border-radius: 999px;
  margin-left: 0 !important;
}

.topbar-controls .check-control label span {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.topbar-controls .check-control label:has(input:checked) {
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 999px rgba(31, 116, 108, 0.12);
}

.topbar-controls .check-control label:has(input:focus-visible),
.topbar-controls .range-button:focus-visible,
.date-range-button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.source-view-header {
  display: none;
}

.source-view {
  border-top: 0;
  background: var(--paper);
}

.source-sheet-viewport {
  position: relative;
  background: var(--paper);
}

.date-cell.is-today {
  position: relative;
  background: #e7f4ee;
  box-shadow: inset 0 -2px 0 rgba(31, 116, 108, 0.26);
}

.source-download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 62px;
  height: 30px;
  margin-left: auto;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: #e4efec;
  color: #0f5448;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: none;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.source-download-button + .topbar-controls {
  margin-left: 0;
}

/* On the overview desktop header, keep Excel beside the point/value controls. */
.app-shell:not(.is-training-mode):not(.is-source-mode) .source-download-button ~ .topbar-controls {
  margin-left: 0;
}

.source-download-button:hover,
.source-download-button:focus-visible {
  background: #d9e9e4;
  color: #0a3d34;
  box-shadow: 0 3px 10px rgba(31, 72, 65, 0.1);
  outline: none;
}

.source-download-button .download-mark {
  display: inline-block;
  font-family: Arial, "Helvetica Neue", sans-serif;
  font-size: 17px;
  font-weight: 900;
  line-height: 0.75;
  transform: translateY(-1px) scaleX(1.08);
}

.label-panel {
  background: #edf4f1;
  box-shadow: inset 3px 0 0 var(--group-accent, var(--teal)), inset 0 1px 0 var(--line);
}

.section-row:nth-child(odd) .label-panel {
  background: #f3f7f4;
}

.chart-panel {
  background-color: #fffefa;
  background-image:
    linear-gradient(to right, rgba(69, 106, 99, 0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(69, 106, 99, 0.065) 1px, transparent 1px);
}

.section-row:nth-child(odd) .chart-panel {
  background-color: #fbfcfa;
}

.axis-line {
  stroke: rgba(76, 111, 104, 0.28);
  stroke-width: 1;
}

.axis-spine {
  stroke: rgba(36, 80, 73, 0.42);
  stroke-width: 1.1;
}

.axis-gutter {
  fill: #eef5f2;
}

.axis-label,
.sleep-axis-label,
.training-axis-label {
  fill: #5c716d;
  font-weight: 600;
}

.phase-divider {
  stroke: rgba(45, 90, 80, 0.24);
}

@media (max-width: 700px) {
  .status-message {
    max-width: calc(100vw - 16px);
  }
}
