:root {
  --bg: #0b0e0c;
  --bg-soft: #101411;
  --surface: #151a16;
  --surface-raised: #1a201b;
  --surface-hover: #202720;
  --text: #f2f5ed;
  --muted: #8d978d;
  --muted-2: #646e65;
  --line: rgba(231, 242, 227, 0.1);
  --line-strong: rgba(231, 242, 227, 0.18);
  --accent: #d7ff65;
  --accent-soft: rgba(215, 255, 101, 0.12);
  --accent-dark: #9bbd3b;
  --orange: #ff7b5d;
  --orange-soft: rgba(255, 123, 93, 0.12);
  --blue: #70b7ff;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --sidebar-width: 246px;
  color-scheme: dark;
  font-family:
    "Bahnschrift", "DIN Alternate", "PingFang SC", "Microsoft YaHei",
    "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 84% -10%, rgba(215, 255, 101, 0.055), transparent 32%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  padding: 28px 20px 22px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(12, 15, 13, 0.92);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: #10140c;
  transform: rotate(-2deg);
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  stroke-width: 2;
}

.brand strong {
  display: block;
  letter-spacing: 0.12em;
  font-size: 16px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.main-nav {
  display: grid;
  gap: 7px;
  margin-top: 56px;
}

.nav-item,
.mobile-nav-item {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  color: var(--muted);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  transition:
    color 160ms ease,
    background 160ms ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.nav-item.active {
  color: #11150d;
  background: var(--accent);
  box-shadow: 0 10px 30px rgba(191, 236, 84, 0.12);
}

.nav-item.active::after {
  position: absolute;
  right: -24px;
  width: 3px;
  height: 20px;
  border-radius: 4px 0 0 4px;
  background: var(--accent);
  content: "";
}

.nav-icon {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
}

.sidebar-note {
  display: flex;
  gap: 11px;
  margin-top: auto;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(215, 255, 101, 0.055), transparent 70%),
    var(--surface);
}

.pulse-dot,
.live-dot {
  display: inline-block;
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(215, 255, 101, 0.08);
}

.pulse-dot {
  margin-top: 5px;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(215, 255, 101, 0.07);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(215, 255, 101, 0.02);
  }
}

.sidebar-note strong {
  font-size: 11px;
  letter-spacing: 0.03em;
}

.sidebar-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 7px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease;
}

.profile-chip:hover {
  background: rgba(255, 255, 255, 0.035);
}

.avatar {
  display: grid;
  flex: 0 0 auto;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(215, 255, 101, 0.12), transparent),
    var(--surface-raised);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.profile-copy {
  min-width: 0;
}

.profile-copy strong,
.profile-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy strong {
  font-size: 12px;
}

.profile-copy small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 9px;
}

.profile-edit {
  display: grid;
  width: 17px;
  height: 17px;
  margin-left: auto;
  place-items: center;
  color: var(--muted-2);
}

.profile-edit svg {
  width: 14px;
  height: 14px;
}

.main-content {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding: 0 42px 52px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 0.6px, transparent 0.6px);
  background-size: 19px 19px;
  background-position: 3px 3px;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  min-height: 122px;
  margin: 0 auto;
  padding: 27px 0 20px;
  background: linear-gradient(var(--bg) 60%, transparent);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  font-weight: 650;
  letter-spacing: -0.045em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.today-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 26, 22, 0.74);
  color: var(--muted);
  font-size: 12px;
}

.live-dot {
  width: 5px;
  height: 5px;
  box-shadow: 0 0 0 3px rgba(215, 255, 101, 0.07);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.icon-button:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.view-root {
  max-width: 1440px;
  margin: 0 auto;
  animation: view-in 340ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.page {
  display: grid;
  gap: 20px;
}

.loading-state {
  display: grid;
  min-height: 55vh;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.loading-mark {
  width: 38px;
  height: 38px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.phase-hero {
  position: relative;
  display: grid;
  min-height: 290px;
  padding: 34px 38px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(100deg, rgba(215, 255, 101, 0.075), transparent 47%),
    linear-gradient(145deg, #171d17, #111512);
  box-shadow: var(--shadow);
}

.phase-hero::before {
  position: absolute;
  top: -160px;
  right: 12%;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(215, 255, 101, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(215, 255, 101, 0.018),
    0 0 0 140px rgba(215, 255, 101, 0.01);
  content: "";
}

.phase-hero::after {
  position: absolute;
  right: -85px;
  bottom: -105px;
  width: 290px;
  height: 260px;
  border-radius: 45%;
  background: repeating-linear-gradient(
    -45deg,
    rgba(215, 255, 101, 0.06) 0,
    rgba(215, 255, 101, 0.06) 1px,
    transparent 1px,
    transparent 12px
  );
  content: "";
  transform: rotate(-9deg);
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 7px 10px;
  border: 1px solid rgba(215, 255, 101, 0.2);
  border-radius: 999px;
  background: rgba(215, 255, 101, 0.07);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.status-pill.neutral {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.status-pill.finished {
  border-color: rgba(255, 123, 93, 0.2);
  background: var(--orange-soft);
  color: var(--orange);
}

.status-pill svg {
  width: 12px;
  height: 12px;
}

.hero-main {
  margin: 26px 0 22px;
}

.phase-label {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.05em;
}

.hero-main h2 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(28px, 4.4vw, 54px);
  font-weight: 630;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.hero-goal {
  max-width: 670px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.phase-range {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}

.range-line {
  position: relative;
  width: min(240px, 28vw);
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.range-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.phase-range strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.hero-score-wrap {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
}

.score-ring {
  --score: 0;
  --ring-color: var(--accent);
  position: relative;
  display: grid;
  width: 174px;
  height: 174px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #171d17 55%, transparent 56%),
    conic-gradient(
      from -90deg,
      var(--ring-color) calc(var(--score) * 1%),
      rgba(255, 255, 255, 0.075) 0
    );
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.score-ring::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 50%;
  content: "";
}

.score-value {
  position: relative;
  z-index: 1;
  text-align: center;
}

.score-value strong {
  display: block;
  font-size: 51px;
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 1;
}

.score-value strong small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0;
}

.score-value span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.score-caption {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.score-caption strong {
  color: var(--accent);
  font-weight: 650;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stat-card {
  min-width: 0;
  padding: 21px 23px 19px;
  background: rgba(17, 22, 18, 0.94);
}

.stat-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.stat-heading svg {
  width: 15px;
  height: 15px;
}

.stat-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 16px;
}

.stat-value strong {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.stat-value span {
  color: var(--muted-2);
  font-size: 10px;
}

.stat-foot {
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 9px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(310px, 0.85fr);
  gap: 20px;
}

.annual-hero {
  position: relative;
  display: grid;
  min-height: 235px;
  padding: 30px 32px;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.7fr);
  gap: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 7% 100%, rgba(112, 183, 255, 0.1), transparent 36%),
    linear-gradient(130deg, #171d18, #111512);
}

.annual-hero::after {
  position: absolute;
  top: -90px;
  right: 17%;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(215, 255, 101, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 50px rgba(215, 255, 101, 0.018),
    0 0 0 100px rgba(215, 255, 101, 0.008);
  content: "";
}

.annual-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.annual-copy h2 {
  max-width: 720px;
  margin: 20px 0 9px;
  font-size: clamp(27px, 3.4vw, 42px);
  font-weight: 630;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.annual-copy > p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.annual-progress {
  max-width: 590px;
  margin-top: 25px;
}

.annual-progress-label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.annual-progress-label strong {
  color: var(--accent);
  font-weight: 600;
}

.annual-metrics {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(8, 11, 9, 0.3);
}

.annual-metrics div {
  padding: 20px 15px;
  border-right: 1px solid var(--line);
  text-align: center;
}

.annual-metrics div:last-child {
  border: 0;
}

.annual-metrics strong,
.annual-metrics span {
  display: block;
}

.annual-metrics strong {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.annual-metrics span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
}

.phase-ribbon {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.phase-ribbon-item {
  display: flex;
  min-width: 145px;
  padding: 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.phase-ribbon-item:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.phase-color {
  width: 4px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 99px;
}

.phase-ribbon-item strong,
.phase-ribbon-item small {
  display: block;
  white-space: nowrap;
}

.phase-ribbon-item strong {
  font-size: 9px;
  font-weight: 550;
}

.phase-ribbon-item small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 7px;
}

.calendar-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.7fr) minmax(295px, 0.65fr);
  gap: 20px;
}

.calendar-panel {
  overflow: hidden;
}

.calendar-header {
  display: flex;
  padding: 22px 24px 17px;
  align-items: flex-end;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.calendar-header .eyebrow {
  margin-bottom: 6px;
}

.calendar-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.calendar-nav {
  display: flex;
  gap: 6px;
}

.calendar-next svg {
  transform: rotate(0);
}

.calendar-nav .round-action:first-child svg {
  transform: rotate(180deg);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.12);
}

.calendar-weekdays span {
  padding: 10px 7px;
  color: var(--muted-2);
  font-size: 8px;
  text-align: center;
}

.calendar-grid {
  padding: 10px 12px 12px;
  gap: 5px;
}

.calendar-cell {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 84px;
  padding: 9px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.018);
  color: var(--text);
  text-align: left;
}

button.calendar-cell {
  cursor: pointer;
}

.calendar-cell:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.calendar-cell.blank {
  background: transparent;
}

.calendar-cell.selected {
  border-color: var(--accent);
  background: rgba(215, 255, 101, 0.07);
  box-shadow: inset 0 0 0 1px rgba(215, 255, 101, 0.1);
}

.calendar-cell.today:not(.selected) {
  border-color: rgba(255, 123, 93, 0.4);
}

.calendar-cell.outside-plan {
  opacity: 0.33;
}

.calendar-cell.training-day::before {
  position: absolute;
  top: 0;
  right: 8px;
  left: 8px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--phase-color, var(--accent));
  content: "";
  opacity: 0.7;
}

.calendar-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.calendar-cell.today .calendar-date {
  color: var(--orange);
  font-weight: 700;
}

.assessment-mark {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 5px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 7px;
  font-style: normal;
}

.calendar-check {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #10140d;
}

.calendar-check svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.6;
}

.calendar-cell.checked .calendar-date {
  padding-right: 18px;
}

.calendar-task-dots {
  display: flex;
  gap: 3px;
  margin-top: auto;
  margin-bottom: 5px;
}

.task-dot,
.legend-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted-2);
}

.task-dot.run,
.legend-dot.run {
  background: var(--blue);
}

.task-dot.jump,
.legend-dot.jump {
  background: var(--orange);
}

.task-dot.pullup,
.legend-dot.pullup {
  background: var(--accent);
}

.task-dot.rest,
.legend-dot.rest {
  background: rgba(255, 255, 255, 0.22);
}

.legend-dot.done {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(215, 255, 101, 0.08);
}

.calendar-cell > small {
  overflow: hidden;
  color: var(--muted-2);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-legend {
  display: flex;
  padding: 13px 18px 16px;
  flex-wrap: wrap;
  gap: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 8px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.day-detail-panel {
  position: sticky;
  top: 20px;
  padding: 23px;
}

.day-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.day-detail-head h2 {
  margin: 9px 0 0;
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.load-badge {
  display: inline-flex;
  min-height: 27px;
  padding: 0 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 8px;
}

.load-high {
  border-color: rgba(255, 123, 93, 0.22);
  background: var(--orange-soft);
  color: var(--orange);
}

.load-medium {
  border-color: rgba(255, 209, 102, 0.18);
  background: rgba(255, 209, 102, 0.08);
  color: #ffd166;
}

.load-low {
  border-color: rgba(112, 183, 255, 0.18);
  background: rgba(112, 183, 255, 0.08);
  color: var(--blue);
}

.load-rest {
  color: var(--muted);
}

.day-phase {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 19px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.1);
}

.day-phase > span {
  width: 3px;
  height: 28px;
  border-radius: 99px;
}

.day-phase strong,
.day-phase small {
  display: block;
}

.day-phase strong {
  font-size: 10px;
}

.day-phase small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
}

.task-list {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.plan-task-row {
  display: grid;
  padding: 12px;
  grid-template-columns: 29px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.task-type {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.task-type.run {
  background: rgba(112, 183, 255, 0.09);
  color: var(--blue);
}

.task-type.jump {
  background: var(--orange-soft);
  color: var(--orange);
}

.task-type.pullup {
  background: var(--accent-soft);
  color: var(--accent);
}

.task-type svg {
  width: 14px;
  height: 14px;
}

.plan-task-row strong {
  display: block;
  font-size: 9px;
  font-weight: 600;
}

.plan-task-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.task-list.compact .plan-task-row {
  padding: 10px;
}

.day-complete {
  margin-bottom: 14px;
}

.day-empty {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.day-empty h3 {
  margin: 0;
  font-size: 16px;
}

.day-empty p {
  max-width: 230px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.today-task-preview {
  display: grid;
  gap: 6px;
  margin: 15px 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.11);
}

.today-task-preview div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}

.today-task-preview span {
  color: var(--muted-2);
  font-size: 8px;
}

.today-task-preview p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 24, 20, 0.92);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 0;
}

.panel-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.panel-meta {
  color: var(--muted-2);
  font-size: 9px;
  white-space: nowrap;
}

.load-chart {
  display: grid;
  height: 228px;
  margin: 24px 24px 20px;
  padding: 8px 4px 0;
  grid-template-columns: repeat(7, minmax(24px, 1fr));
  gap: clamp(9px, 1.6vw, 20px);
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% 49px;
}

.load-day {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.load-bar-wrap {
  position: relative;
  display: flex;
  width: min(30px, 72%);
  height: 155px;
  align-items: flex-end;
}

.load-bar {
  position: relative;
  width: 100%;
  min-height: 5px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(to top, #34402a, var(--accent));
  transform-origin: bottom;
  animation: grow-bar 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.load-bar.empty {
  background: rgba(255, 255, 255, 0.06);
}

.load-bar.today {
  background: linear-gradient(to top, #a33f2c, var(--orange));
  box-shadow: 0 0 22px rgba(255, 123, 93, 0.12);
}

.load-value {
  position: absolute;
  top: -19px;
  left: 50%;
  color: var(--muted);
  font-size: 8px;
  transform: translateX(-50%);
}

.load-label {
  color: var(--muted-2);
  font-size: 9px;
}

.load-day.today .load-label {
  color: var(--text);
}

@keyframes grow-bar {
  from {
    transform: scaleY(0);
  }
}

.today-panel {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  overflow: hidden;
}

.today-panel .panel-header {
  padding-bottom: 18px;
}

.date-square {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(215, 255, 101, 0.18);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  line-height: 1;
}

.date-square strong {
  font-size: 17px;
  font-weight: 650;
}

.date-square small {
  margin-top: 3px;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.checkin-state {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 24px 23px;
}

.checkin-copy h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 630;
  letter-spacing: -0.04em;
}

.checkin-copy p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.today-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 20px 0;
}

.mini-metric {
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.12);
}

.mini-metric span {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
}

.mini-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 600;
}

.mini-metric strong small {
  margin-left: 2px;
  color: var(--muted);
  font-size: 8px;
}

.completed-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 17px 0;
  padding: 14px;
  border: 1px solid rgba(215, 255, 101, 0.17);
  border-radius: 12px;
  background: rgba(215, 255, 101, 0.055);
}

.completed-mark > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #11150d;
}

.completed-mark svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.4;
}

.completed-mark strong,
.completed-mark small {
  display: block;
}

.completed-mark strong {
  font-size: 11px;
}

.completed-mark small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button svg {
  width: 15px;
  height: 15px;
}

.button-primary {
  background: var(--accent);
  color: #11150d;
}

.button-primary:hover {
  background: #e2ff8b;
}

.button-secondary {
  border-color: var(--line);
  background: var(--surface-raised);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.button-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.button-danger {
  border-color: rgba(255, 123, 93, 0.18);
  background: var(--orange-soft);
  color: var(--orange);
}

.button-block {
  width: 100%;
}

.button-small {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 10px;
}

.error-banner,
.empty-panel {
  display: grid;
  min-height: 320px;
  padding: 30px;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(21, 26, 22, 0.6);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--accent);
}

.empty-icon svg {
  width: 27px;
  height: 27px;
}

.error-banner h2,
.empty-panel h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.error-banner p,
.empty-panel p {
  max-width: 420px;
  margin: 10px auto 22px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 7px 0 1px;
}

.section-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.section-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.date-picker-wrap {
  display: block;
  flex: 0 0 auto;
}

.date-picker {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  color-scheme: dark;
  font-size: 10px;
  cursor: pointer;
}

.date-picker:focus {
  border-color: rgba(215, 255, 101, 0.42);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.checkin-layout {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.75fr);
  gap: 20px;
}

.checkin-form-panel {
  padding: 26px;
}

.checkin-plan-context {
  margin: -2px 0 25px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.checkin-plan-context .task-list {
  margin-bottom: 0;
}

.form-section {
  margin-bottom: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border: 0;
}

.form-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 17px;
}

.form-section-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 620;
}

.form-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.section-index {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  min-width: 0;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.field label span,
.field-label span {
  color: var(--muted-2);
  font-size: 8px;
}

.field input,
.field textarea,
.field select,
.input-unit input {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #101411;
  color: var(--text);
  font-size: 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.input-unit:focus-within {
  border-color: rgba(215, 255, 101, 0.42);
  box-shadow: 0 0 0 3px rgba(215, 255, 101, 0.055);
}

.field input[type="date"] {
  color-scheme: dark;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.65;
}

.input-unit {
  display: flex;
  min-height: 44px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101411;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.input-unit input {
  min-height: 42px;
  padding-right: 4px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.input-unit span {
  flex: 0 0 auto;
  padding-right: 13px;
  color: var(--muted-2);
  font-size: 9px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
}

.rpe-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 8px;
}

.segment {
  position: relative;
}

.segment input,
.weekday input,
.score-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.segment label {
  display: grid;
  height: 39px;
  margin: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101411;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  transition: all 130ms ease;
}

.segment label:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.segment input:checked + label {
  border-color: var(--accent);
  background: var(--accent);
  color: #10140d;
  font-weight: 700;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

input[type="range"] {
  width: 100%;
  height: 3px;
  min-height: 0;
  margin: 12px 0;
  padding: 0;
  border: 0;
  border-radius: 99px;
  outline: none;
  background: linear-gradient(
    to right,
    var(--accent) var(--fill, 50%),
    rgba(255, 255, 255, 0.1) var(--fill, 50%)
  );
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  background: #11150f;
  box-shadow: 0 0 0 4px rgba(215, 255, 101, 0.06);
  cursor: grab;
  appearance: none;
}

.range-value {
  min-width: 48px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

.range-value small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 400;
}

.field-help {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}

.score-summary {
  position: sticky;
  top: 20px;
  overflow: hidden;
}

.score-summary-inner {
  padding: 25px;
}

.score-summary h3 {
  margin: 0;
  font-size: 13px;
}

.score-summary > .panel-header {
  border-bottom: 1px solid var(--line);
}

.live-score {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 4px 0 23px;
}

.live-score .score-ring {
  width: 116px;
  height: 116px;
}

.live-score .score-value strong {
  font-size: 34px;
}

.live-score .score-value strong small {
  font-size: 11px;
}

.live-score .score-value span {
  margin-top: 5px;
  font-size: 7px;
}

.score-context strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.score-context p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.score-breakdown {
  display: grid;
  gap: 12px;
  padding: 18px 0;
  border-block: 1px solid var(--line);
}

.score-line {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 27px;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 9px;
}

.score-line-bar {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.075);
}

.score-line-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.score-line strong {
  color: var(--text);
  font-size: 9px;
  font-weight: 500;
  text-align: right;
}

.formula-note {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.75;
}

.formula-note strong {
  color: var(--text);
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stage-card {
  position: relative;
  display: flex;
  min-height: 280px;
  padding: 23px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition:
    transform 180ms ease,
    border-color 180ms ease;
}

.stage-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.stage-card.active {
  border-color: rgba(215, 255, 101, 0.25);
  background:
    linear-gradient(145deg, rgba(215, 255, 101, 0.065), transparent 55%),
    var(--surface);
}

.stage-card.active::after {
  position: absolute;
  top: -35px;
  right: -35px;
  width: 100px;
  height: 100px;
  border: 1px solid rgba(215, 255, 101, 0.1);
  border-radius: 50%;
  content: "";
}

.stage-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.stage-card h3 {
  margin: 24px 0 8px;
  font-size: 21px;
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.stage-card-goal {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stage-plan-meta {
  display: flex;
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 5px;
}

.stage-plan-meta span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 7px;
}

.stage-progress {
  margin-top: auto;
  padding-top: 26px;
}

.stage-progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
}

.progress-track {
  height: 4px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.stage-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 19px;
}

.stage-score {
  color: var(--muted);
  font-size: 9px;
}

.stage-score strong {
  margin-left: 5px;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.stage-score .stage-eval-score {
  display: inline;
  margin-left: 7px;
  color: var(--muted-2);
  font-size: 7px;
}

.stage-actions {
  display: flex;
  gap: 6px;
}

.round-action {
  display: grid;
  width: 31px;
  height: 31px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.1);
  color: var(--muted);
  cursor: pointer;
}

.round-action:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.round-action svg {
  width: 13px;
  height: 13px;
}

.records-hero {
  display: grid;
  padding: 25px 28px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.record-stat {
  padding: 3px 22px;
  border-right: 1px solid var(--line);
}

.record-stat:first-child {
  padding-left: 0;
}

.record-stat:last-child {
  padding-right: 0;
  border: 0;
}

.record-stat span {
  color: var(--muted);
  font-size: 9px;
}

.record-stat strong {
  display: block;
  margin-top: 9px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.record-stat strong small {
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 9px;
}

.records-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.7fr);
  gap: 20px;
}

.table-panel {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.data-table th {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.data-table td {
  color: var(--muted);
  font-size: 10px;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 150ms ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.data-table td strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 500;
}

.table-score {
  display: inline-flex;
  min-width: 42px;
  padding: 5px 7px;
  justify-content: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
}

.table-note {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.record-list {
  display: grid;
}

.record-row {
  display: grid;
  padding: 18px 22px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.record-row:last-child {
  border: 0;
}

.record-rank {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted-2);
  font-size: 9px;
}

.record-row:first-child .record-rank {
  border-color: rgba(215, 255, 101, 0.22);
  background: var(--accent-soft);
  color: var(--accent);
}

.record-row strong,
.record-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-row strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 550;
}

.record-row small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 8px;
}

.record-score {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.record-score small {
  display: inline;
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 8px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  padding: 24px;
  place-items: center;
  background: rgba(3, 5, 3, 0.76);
  backdrop-filter: blur(11px);
  animation: fade-in 180ms ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(580px, 100%);
  max-height: min(90vh, 820px);
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: #151a16;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.6);
  animation: modal-in 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
}

.modal.wide {
  width: min(680px, 100%);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 25px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 630;
  letter-spacing: -0.04em;
}

.modal-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.modal-close {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-body {
  padding: 24px 25px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 25px 24px;
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.weekday span {
  display: grid;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #101411;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
  transition: all 130ms ease;
}

.weekday input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #11150d;
  font-weight: 700;
}

.score-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.score-choice span {
  display: grid;
  height: 41px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #101411;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.score-choice input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: #11150d;
  font-weight: 700;
}

.evaluation-score-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 15px 17px;
  border: 1px dashed rgba(215, 255, 101, 0.25);
  border-radius: 12px;
  background: rgba(215, 255, 101, 0.045);
}

.evaluation-score-preview span {
  color: var(--muted);
  font-size: 9px;
}

.evaluation-score-preview strong {
  color: var(--accent);
  font-size: 24px;
  font-weight: 600;
}

.evaluation-score-preview strong small {
  margin-left: 2px;
  font-size: 10px;
}

.annual-eval-summary {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid rgba(215, 255, 101, 0.18);
  border-radius: 13px;
  background: rgba(215, 255, 101, 0.045);
}

.annual-eval-summary div {
  padding: 15px 13px;
  border-right: 1px solid var(--line);
}

.annual-eval-summary div:last-child {
  border: 0;
}

.annual-eval-summary span,
.annual-eval-summary strong {
  display: block;
}

.annual-eval-summary span {
  color: var(--muted);
  font-size: 8px;
}

.annual-eval-summary strong {
  margin-top: 7px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.annual-eval-summary strong small {
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 8px;
  letter-spacing: 0;
}

.annual-eval-note {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.65;
}

.annual-criteria {
  border-top: 1px solid var(--line);
}

.annual-criterion {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.annual-criterion-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.annual-criterion-head strong,
.annual-criterion-head span {
  display: block;
}

.annual-criterion-head strong {
  font-size: 10px;
  font-weight: 600;
}

.annual-criterion-head span {
  max-width: 430px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.6;
}

.criterion-score {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 18px;
  font-weight: 600;
}

.criterion-score span {
  display: inline;
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 8px;
}

.criterion-range {
  margin-top: 12px;
}

.evaluation-field {
  display: grid;
  gap: 11px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.evaluation-field:last-of-type {
  border-bottom: 0;
}

.evaluation-field-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.evaluation-field-top strong,
.evaluation-field-top span {
  display: block;
}

.evaluation-field-top strong {
  font-size: 11px;
  font-weight: 600;
}

.evaluation-field-top span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
}

.evaluation-field-top output {
  color: var(--accent);
  font-size: 17px;
  font-weight: 600;
}

.evaluation-range {
  margin: 4px 0 7px;
}

.onboarding-modal {
  width: min(760px, 100%);
}

.onboarding-hero {
  position: relative;
  min-height: 190px;
  padding: 31px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 84% 18%, rgba(215, 255, 101, 0.2), transparent 29%),
    linear-gradient(135deg, #1c231b, #121612);
}

.onboarding-hero::before {
  position: absolute;
  top: 22px;
  right: 38px;
  width: 125px;
  height: 125px;
  border: 1px solid rgba(215, 255, 101, 0.16);
  border-radius: 50%;
  box-shadow:
    0 0 0 25px rgba(215, 255, 101, 0.035),
    0 0 0 50px rgba(215, 255, 101, 0.018);
  content: "";
}

.onboarding-hero .eyebrow {
  margin-bottom: 18px;
}

.onboarding-hero h1 {
  max-width: 500px;
  margin: 0;
  font-size: clamp(32px, 6vw, 49px);
  font-weight: 630;
  letter-spacing: -0.06em;
  line-height: 1.04;
}

.onboarding-hero p {
  max-width: 450px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.onboarding-body {
  padding: 25px;
}

.annual-import-card {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(215, 255, 101, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(215, 255, 101, 0.055), transparent 62%),
    #101510;
}

.annual-import-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.annual-import-head span {
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.annual-import-head h3 {
  margin: 7px 0 0;
  font-size: 16px;
  font-weight: 580;
  letter-spacing: -0.03em;
}

.annual-import-head > strong {
  color: var(--accent);
  font-size: 36px;
  font-weight: 620;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.annual-import-head > strong small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0;
}

.annual-import-goals {
  display: grid;
  margin: 17px 0;
  padding: 13px 0;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
}

.annual-import-goals span {
  color: var(--muted);
  font-size: 8px;
  text-align: center;
}

.annual-import-goals span + span {
  border-left: 1px solid var(--line);
}

.annual-import-goals strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.annual-import-phases {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.annual-import-phases span {
  display: inline-flex;
  padding: 5px 7px;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 7px;
}

.annual-import-phases i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--phase-color);
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.formula-strip {
  display: grid;
  margin-top: 21px;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.formula-block {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.1);
  text-align: center;
}

.formula-block strong {
  display: block;
  color: var(--text);
  font-size: 22px;
  font-weight: 600;
}

.formula-block span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.formula-plus {
  color: var(--muted-2);
  font-size: 18px;
}

.toast-root {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  min-width: 260px;
  padding: 13px 15px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #202620;
  color: var(--text);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
  font-size: 10px;
  animation: toast-in 220ms ease both;
}

.toast::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.toast.error::before {
  background: var(--orange);
}

.toast.leaving {
  animation: toast-out 200ms ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(7px);
  }
}

.mobile-nav {
  display: none;
}

.mt-20 {
  margin-top: 20px;
}

.muted {
  color: var(--muted);
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 215px;
  }

  .main-content {
    padding-inline: 27px;
  }

  .sidebar {
    padding-inline: 16px;
  }

  .stages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phase-hero {
    padding: 29px;
  }

  .score-ring {
    width: 152px;
    height: 152px;
  }

  .score-value strong {
    font-size: 45px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(290px, 0.8fr);
  }
}

@media (max-width: 940px) {
  .sidebar {
    display: none;
  }

  .main-content {
    margin-left: 0;
    padding: 0 20px 102px;
  }

  .topbar {
    min-height: 105px;
    padding-top: 22px;
  }

  .mobile-nav {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 50;
    display: grid;
    max-width: 480px;
    min-height: 64px;
    margin: auto;
    padding: 7px;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid var(--line-strong);
    border-radius: 19px;
    background: rgba(20, 25, 21, 0.92);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(20px);
  }

  .mobile-nav-item {
    display: grid;
    padding: 5px;
    place-items: center;
    align-content: center;
    gap: 4px;
    border-radius: 12px;
    color: var(--muted);
  }

  .mobile-nav-item.active {
    background: var(--accent);
    color: #11150d;
  }

  .mobile-nav-item svg {
    width: 18px;
    height: 18px;
  }

  .mobile-nav-item small {
    font-size: 8px;
    font-weight: 650;
  }

  .dashboard-grid,
  .checkin-layout,
  .records-layout,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .score-summary {
    position: static;
  }

  .day-detail-panel {
    position: static;
  }

  .records-layout .record-list {
    min-height: 0;
  }
}

@media (max-width: 680px) {
  .main-content {
    padding-inline: 14px;
  }

  .topbar {
    min-height: 91px;
    align-items: flex-end;
    padding-bottom: 17px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .eyebrow {
    font-size: 8px;
  }

  .today-chip {
    height: 37px;
    padding: 0 11px;
    font-size: 10px;
  }

  .icon-button {
    width: 37px;
    height: 37px;
  }

  .page {
    gap: 14px;
  }

  .phase-hero {
    min-height: auto;
    padding: 23px 20px;
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .annual-hero {
    padding: 23px 20px;
    grid-template-columns: 1fr;
    gap: 21px;
  }

  .annual-metrics {
    max-width: none;
  }

  .annual-metrics div {
    padding: 15px 10px;
  }

  .calendar-header {
    padding-inline: 17px;
  }

  .calendar-weekdays {
    padding-inline: 7px;
  }

  .calendar-grid {
    padding-inline: 7px;
    gap: 3px;
  }

  .calendar-cell {
    min-height: 65px;
    padding: 6px;
    border-radius: 7px;
  }

  .calendar-cell > small {
    display: none;
  }

  .calendar-date {
    font-size: 8px;
  }

  .calendar-check {
    top: 4px;
    right: 4px;
    width: 14px;
    height: 14px;
  }

  .calendar-cell.checked .calendar-date {
    padding-right: 13px;
  }

  .assessment-mark {
    width: 13px;
    height: 13px;
    font-size: 6px;
  }

  .annual-eval-summary {
    grid-template-columns: 1fr;
  }

  .annual-eval-summary div {
    display: flex;
    padding: 11px 13px;
    align-items: center;
    justify-content: space-between;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .annual-eval-summary strong {
    margin: 0;
  }

  .hero-main {
    margin: 21px 0 18px;
  }

  .hero-main h2 {
    font-size: 36px;
  }

  .hero-score-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 21px;
    padding-top: 19px;
    border-top: 1px solid var(--line);
  }

  .score-ring {
    width: 116px;
    height: 116px;
  }

  .score-ring::before {
    inset: 7px;
  }

  .score-value strong {
    font-size: 35px;
  }

  .score-value span {
    margin-top: 5px;
    font-size: 7px;
  }

  .score-caption {
    margin: 0;
    line-height: 1.6;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    padding: 17px;
  }

  .stat-value strong {
    font-size: 23px;
  }

  .load-chart {
    height: 200px;
    margin-inline: 16px;
    gap: 8px;
  }

  .load-bar-wrap {
    height: 133px;
  }

  .panel-header {
    padding-inline: 17px;
  }

  .today-panel .panel-header {
    padding-inline: 17px;
  }

  .checkin-state {
    padding-inline: 17px;
  }

  .section-header {
    align-items: flex-start;
  }

  .section-header h2 {
    font-size: 20px;
  }

  .section-header .button {
    min-height: 38px;
    padding-inline: 12px;
  }

  .checkin-form-panel {
    padding: 19px 16px;
  }

  .form-grid,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .segment label {
    height: 38px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .form-actions .button {
    width: 100%;
  }

  .stages-grid {
    grid-template-columns: 1fr;
  }

  .records-hero {
    padding: 20px 17px;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 0;
  }

  .record-stat {
    padding: 0 15px;
  }

  .record-stat:nth-child(2) {
    border-right: 0;
  }

  .record-stat:nth-child(3) {
    padding-left: 0;
  }

  .record-stat:nth-child(4) {
    padding-right: 0;
  }

  .record-stat strong {
    font-size: 22px;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal,
  .modal.wide,
  .onboarding-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 21px 21px 0 0;
    border-bottom: 0;
  }

  .onboarding-hero {
    min-height: 170px;
    padding: 26px 21px;
  }

  .onboarding-hero h1 {
    font-size: 34px;
  }

  .onboarding-body,
  .modal-body {
    padding: 20px;
  }

  .modal-header {
    padding: 21px 20px 17px;
  }

  .modal-footer {
    padding: 16px 20px 22px;
  }

  .modal-footer .button {
    flex: 1;
  }

  .weekday-grid {
    gap: 4px;
  }

  .weekday span {
    height: 38px;
  }

  .score-choice-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .toast-root {
    right: 14px;
    bottom: 89px;
    left: 14px;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
