:root {
  --paper: #f4f1ea;
  --paper-deep: #ebe6da;
  --paper-soft: #f8f5ee;
  --white: #fffdf8;
  --ink: #111310;
  --ink-soft: #3f433c;
  --muted: #62665c;
  --line: #ded8ca;
  --line-strong: #c8c1b2;
  --lime: #cbff4d;
  --lime-deep: #a8df21;
  --lime-soft: #efffc9;
  --orange: #ff6a3d;
  --orange-dark: #a73b1a;
  --orange-soft: #fff0e9;
  --blue: #2d58ff;
  --danger: #b53620;
  --font-sans: "Inter", "SF Pro Display", "Segoe UI Variable", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", "Consolas", monospace;
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 17px;
  --shadow-hard: 0 3px 0 rgba(17, 19, 16, 0.12);
  --shadow-soft: 0 18px 54px rgba(44, 39, 28, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 300px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 96% -4%, rgba(203, 255, 77, 0.34), transparent 27rem),
    radial-gradient(circle at -8% 40%, rgba(255, 106, 61, 0.08), transparent 24rem),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.3;
  background-image: radial-gradient(rgba(17, 19, 16, 0.18) 0.55px, transparent 0.55px);
  background-size: 19px 19px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.28), transparent 65%);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--lime);
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

svg {
  display: block;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow-sep {
  padding: 0 7px;
  color: var(--line-strong);
}

.mark {
  display: inline;
  padding: 0 0.09em 0.02em;
  border-radius: 0.11em;
  background: var(--lime);
  white-space: nowrap;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.muted {
  color: var(--muted);
}

.nowrap {
  white-space: nowrap;
}

/* Brand and top bar */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 14px;
  color: var(--lime);
  background: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.08em;
}

.brand-mark::after {
  position: absolute;
  right: -7px;
  bottom: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  content: "";
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.brand-caption {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.13em;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 32px 14px;
  background: rgba(244, 241, 234, 0.94);
  backdrop-filter: blur(14px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-week {
  margin-right: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.76);
  font-size: 11px;
  font-weight: 650;
  transition: border-color 160ms ease, background 160ms ease;
}

.sync-pill:hover {
  border-color: var(--ink);
  background: var(--white);
}

.sync-pill.is-error {
  color: var(--orange-dark);
  border-color: rgba(255, 106, 61, 0.55);
  background: var(--orange-soft);
}

.sync-pill.is-local {
  color: var(--ink-soft);
  border-style: dashed;
}

.signal-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime-deep);
  box-shadow: 0 0 0 3px rgba(203, 255, 77, 0.26);
}

.sync-pill.is-saving .signal-dot {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.17);
}

.sync-pill.is-error .signal-dot {
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 61, 0.14);
}

.sync-pill.is-local .signal-dot {
  background: var(--muted);
  box-shadow: none;
}

.icon-btn {
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.76);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.icon-btn:hover {
  color: var(--lime);
  border-color: var(--ink);
  background: var(--ink);
  transform: translateY(-1px);
}

/* Main layout */

.app-screen {
  min-height: 100vh;
}

.page {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 32px 50px;
}

.week-section {
  margin-bottom: 22px;
}

.week-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.week-heading h1 {
  margin: 7px 0 0;
  font-size: clamp(28px, 3.2vw, 40px);
  font-weight: 860;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}

.week-goal {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.46);
  font-size: 11px;
  white-space: nowrap;
}

.week-goal span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.week-goal b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
}

.week-goal i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.week-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 13px;
}

.week-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.week-arrow,
.week-current-btn,
.week-stats-btn {
  display: inline-flex;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: rgba(255, 253, 248, 0.64);
  font-size: 10px;
  font-weight: 700;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.week-arrow {
  width: 32px;
  padding: 0;
  border-radius: 50%;
}

.week-current-btn {
  padding: 0 12px;
  border-radius: 999px;
}

.week-stats-btn {
  padding: 0 13px;
  flex: 0 0 auto;
  border-color: var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
}

.week-arrow:hover:not(:disabled),
.week-current-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--white);
}

.week-stats-btn:hover {
  color: var(--ink);
  background: var(--lime);
}

.week-arrow:disabled,
.week-current-btn:disabled {
  opacity: 0.36;
  cursor: not-allowed;
  background: transparent;
}

.week-arrow .icon {
  width: 15px;
  height: 15px;
}

.week-view-status {
  margin-left: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.week-view-status.is-history {
  color: var(--orange-dark);
}

.week-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.day-tab {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 86px;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 12px 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: rgba(255, 253, 248, 0.62);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.day-tab:hover {
  border-color: var(--ink);
  background: var(--white);
  transform: translateY(-1px);
}

.day-tab[aria-selected="true"] {
  border-color: var(--ink);
  color: var(--white);
  background: var(--ink);
  box-shadow: var(--shadow-hard);
}

.day-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.day-name {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.day-tab[aria-selected="true"] .day-name {
  color: rgba(255, 255, 255, 0.58);
}

.day-state {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  white-space: nowrap;
}

.day-state.is-warn {
  color: var(--orange-dark);
}

.day-tab[aria-selected="true"] .day-state {
  color: rgba(255, 255, 255, 0.58);
}

.day-tab[aria-selected="true"] .day-state.is-warn {
  color: var(--lime);
}

.date-num {
  margin: 5px 0 6px;
  font-size: 23px;
  font-weight: 820;
  letter-spacing: -0.06em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.day-dots {
  display: flex;
  min-height: 8px;
  align-items: center;
  gap: 4px;
}

.mini-dot {
  width: 6px;
  height: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}

.mini-dot.is-done {
  border-color: var(--lime-deep);
  background: var(--lime-deep);
}

.mini-dot.is-missed {
  border-color: var(--orange);
  background: var(--orange);
}

.day-tab[aria-selected="true"] .mini-dot {
  border-color: rgba(255, 255, 255, 0.35);
}

.day-tab[aria-selected="true"] .mini-dot.is-done {
  border-color: var(--lime);
  background: var(--lime);
}

.day-tab[aria-selected="true"] .mini-dot.is-missed {
  border-color: var(--orange);
  background: var(--orange);
}

.today-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(203, 255, 77, 0.2);
}

.day-tab[aria-selected="true"] .today-flag {
  box-shadow: 0 0 0 3px rgba(203, 255, 77, 0.16);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.53fr) minmax(330px, 0.82fr);
  gap: 20px;
  align-items: start;
}

/* Day card */

.day-card {
  position: relative;
  padding: clamp(23px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  animation: card-enter 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.day-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 7px;
  background: var(--lime);
  content: "";
}

.day-card::after {
  position: absolute;
  z-index: 0;
  top: -76px;
  right: -76px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(17, 19, 16, 0.05);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.day-card > * {
  position: relative;
  z-index: 1;
}

.day-card.day-card--rest::before {
  background: var(--ink);
}

.day-card.day-card--recovery::before {
  background: var(--lime-deep);
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.day-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.day-kicker {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.kicker-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.kicker-badge.is-lime {
  color: var(--ink);
  background: var(--lime);
}

.kicker-badge.is-soft {
  color: var(--ink-soft);
  background: var(--paper-deep);
}

.kicker-date {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.day-completion {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  white-space: nowrap;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.text-button:hover {
  color: var(--orange-dark);
}

.day-title {
  max-width: 15em;
  margin: 23px 0 15px;
  font-size: clamp(34px, 4.6vw, 49px);
  font-weight: 870;
  letter-spacing: -0.03em;
  line-height: 1.12;
  text-wrap: balance;
}

.day-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.chip--dark {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.chip--lime {
  color: var(--ink);
  border-color: transparent;
  background: var(--lime);
}

.chip--warn {
  color: var(--orange-dark);
  border-color: rgba(255, 106, 61, 0.3);
  background: var(--orange-soft);
}

.chip--ghost {
  background: transparent;
}

.warmup-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 20px;
  padding: 11px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: rgba(203, 255, 77, 0.13);
}

.warmup-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.warmup-head strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.warmup-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.warmup-steps span {
  position: relative;
  padding-left: 9px;
  white-space: nowrap;
}

.warmup-steps span::before {
  position: absolute;
  top: 0.66em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.session-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.session {
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-soft);
  transition: border-color 180ms ease, background 180ms ease;
}

.session.is-complete {
  border-color: rgba(168, 223, 33, 0.8);
  background: linear-gradient(135deg, #f7ffe6, #fbfaf2 62%);
}

.session.is-future {
  background: #faf8f2;
}

.session-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.session-number {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  color: var(--lime);
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.session-title-wrap {
  min-width: 0;
  flex: 1;
}

.session-tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
}

.tag {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  padding: 0 7px;
  border-radius: 5px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.tag--ink {
  color: var(--white);
  background: var(--ink);
}

.tag--lime {
  color: var(--ink);
  background: var(--lime);
}

.tag--warn {
  color: var(--orange-dark);
  background: var(--orange-soft);
}

.session-title {
  margin: 0;
  font-size: 20px;
  font-weight: 830;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.session-subtitle {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.complete-toggle {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.complete-toggle:hover:not(:disabled) {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--white);
}

.complete-toggle.is-done {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--lime);
}

.complete-toggle:disabled {
  opacity: 0.46;
}

.complete-status {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.complete-status.is-done {
  color: var(--ink-soft);
  border-style: solid;
  border-color: var(--line);
  background: var(--lime-soft);
}

.complete-status .complete-check {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.complete-status.is-done .complete-check {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--lime);
}

.complete-status .icon {
  width: 11px;
  height: 11px;
}

.complete-check {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.complete-check .icon {
  width: 11px;
  height: 11px;
}

.complete-toggle.is-done .complete-check {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--lime);
}

.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.exercise-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.exercise-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.exercise-name {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.exercise-points {
  display: flex;
  max-width: 44em;
  flex-direction: column;
  gap: 3px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.exercise-points li {
  position: relative;
  padding-left: 11px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.exercise-points li::before {
  position: absolute;
  top: 0.63em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
}

.exercise-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stat {
  display: inline-flex;
  min-height: 29px;
  align-items: baseline;
  gap: 3px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.6);
  font-size: 10px;
  white-space: nowrap;
}

.stat b {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.session-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 11px;
}

.session-utility strong {
  color: var(--ink-soft);
  font-weight: 700;
}



.cardio-board {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 17px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cardio-time {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 4px;
  padding: 9px 13px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--lime);
  line-height: 1;
}

.cardio-time strong {
  font-size: 37px;
  font-weight: 900;
  letter-spacing: -0.075em;
  font-variant-numeric: tabular-nums;
}

.cardio-time span {
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.cardio-facts {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.55;
}

.cardio-facts strong {
  font-weight: 750;
}

.cardio-facts span {
  color: var(--muted);
}

.sequence-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.sequence-line {
  width: 24px;
  height: 1px;
  flex: 0 0 auto;
  background: var(--line-strong);
}

.sequence-note strong {
  color: var(--ink-soft);
  font-weight: 700;
}

.day-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  font-size: 12px;
  line-height: 1.55;
}

.day-note .icon {
  margin-top: 1px;
  color: var(--muted);
}

.day-note strong {
  color: var(--ink);
  font-weight: 750;
}

.day-note--warn {
  border-color: rgba(255, 106, 61, 0.3);
  color: var(--orange-dark);
  background: var(--orange-soft);
}

.day-note--warn .icon {
  color: var(--orange-dark);
}

.day-note--success {
  border-color: rgba(168, 223, 33, 0.55);
  color: var(--ink-soft);
  background: var(--lime-soft);
}

.day-note--success .icon {
  color: var(--ink);
}

.day-note-action {
  margin-left: auto;
  align-self: center;
}

/* Rest and recovery */

.rest-view {
  display: grid;
  grid-template-columns: minmax(150px, 0.45fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  margin-top: 22px;
}

.rest-orbit {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  width: min(100%, 230px);
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper-soft);
}

.rest-orbit::before,
.rest-orbit::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.rest-orbit::before {
  inset: 16%;
  border: 1px dashed var(--line-strong);
}

.rest-orbit::after {
  top: 8%;
  right: 8%;
  width: 24%;
  height: 24%;
  background: var(--lime);
}

.rest-orbit-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rest-orbit-copy strong {
  font-family: var(--font-mono);
  font-size: clamp(24px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.08em;
}

.rest-orbit-copy span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.rest-copy .day-title {
  margin-top: 0;
}

.rest-copy > p {
  max-width: 36em;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
}

.rest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}

.rest-tile {
  min-height: 115px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper-soft);
}

.rest-tile span {
  display: block;
  margin-bottom: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.rest-tile strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  font-weight: 750;
}

.rest-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.next-up {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 15px;
  padding: 14px 16px;
  border-radius: 15px;
  color: var(--white);
  background: var(--ink);
}

.next-up-copy span {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.56);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.next-up-copy strong {
  font-size: 12px;
  font-weight: 720;
}

.next-up .text-button {
  color: var(--lime);
}

.recovery-card {
  margin-top: 22px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper-soft);
}

.recovery-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.recovery-card h3 {
  margin: 8px 0 5px;
  font-size: 19px;
  font-weight: 820;
  letter-spacing: -0.04em;
}

.recovery-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.recovery-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.recovery-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.recovery-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 750;
}

.recovery-item p {
  font-size: 11px;
  line-height: 1.5;
}

/* Side column */

.side-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.panel h2,
.panel h3 {
  margin: 0;
  font-weight: 830;
  letter-spacing: -0.05em;
  line-height: 1.1;
}

.panel h2 {
  font-size: 23px;
}

.panel h3 {
  font-size: 22px;
}

.panel-eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.12em;
}

.panel-copy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.panel--ink {
  position: relative;
  overflow: hidden;
  border-color: var(--ink);
  color: var(--white);
  background: var(--ink);
}

.panel--ink::after {
  position: absolute;
  right: -55px;
  bottom: -80px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(203, 255, 77, 0.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.panel--ink > * {
  position: relative;
  z-index: 1;
}

.weekly-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.panel--ink .panel-eyebrow {
  color: rgba(255, 255, 255, 0.48);
}

.progress-ring {
  position: relative;
  display: grid;
  width: 78px;
  height: 78px;
  flex: 0 0 auto;
  place-items: center;
}

.progress-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 7;
}

.ring-value {
  fill: none;
  stroke: var(--lime);
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ring-label {
  display: flex;
  align-items: baseline;
  gap: 1px;
  color: var(--white);
  font-family: var(--font-mono);
  line-height: 1;
}

.ring-label strong {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -0.06em;
}

.ring-label span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
}

.weekly-total {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin: 17px 0 16px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.5);
  font-size: 10px;
}

.weekly-total strong {
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.weekly-row + .weekly-row {
  margin-top: 16px;
}

.weekly-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.weekly-row-top span {
  color: rgba(255, 255, 255, 0.65);
  font-size: 10px;
}

.weekly-row-top strong {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.weekly-row-top strong span {
  color: rgba(255, 255, 255, 0.36);
  font-size: 10px;
}

.segments {
  display: flex;
  gap: 4px;
}

.segment {
  height: 7px;
  flex: 1;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
}

.segment.is-done {
  background: var(--lime);
}

.segment.is-extra {
  background: var(--orange);
}

.weekly-row-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 10px;
}

.weekly-row-foot .is-warn {
  color: #ffb59e;
}

.weekly-row-foot .is-good {
  color: var(--lime);
}

.weekly-footnote {
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  line-height: 1.6;
}

.weekly-footnote strong {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
}

.panel--lime {
  border-color: var(--ink);
  background: var(--lime);
}

.panel--lime .panel-eyebrow {
  color: rgba(17, 19, 16, 0.52);
}

.panel--lime .panel-copy {
  color: rgba(17, 19, 16, 0.68);
}

.panel--calm {
  background: var(--paper-soft);
}

.panel--warning {
  border-color: rgba(255, 106, 61, 0.4);
  background: var(--orange-soft);
}

.panel--warning .panel-copy {
  color: var(--orange-dark);
}

.smart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.smart-glyph {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.panel--lime .smart-glyph {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.18);
}

.smart-rule {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}

.smart-rule span {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid rgba(17, 19, 16, 0.18);
  border-radius: 5px;
  color: rgba(17, 19, 16, 0.7);
  font-size: 9px;
  font-weight: 650;
}

.panel .btn {
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--ink {
  color: var(--white);
  background: var(--ink);
}

.btn--ink:hover {
  color: var(--ink);
  background: var(--lime);
}

.btn--lime {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--lime);
}

.btn--lime:hover {
  color: var(--white);
  background: var(--ink);
}

.btn--ghost {
  color: var(--ink);
  border-color: var(--line-strong);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--ink);
  background: var(--paper-soft);
}

.btn--danger {
  color: var(--danger);
  border-color: rgba(181, 54, 32, 0.3);
  background: transparent;
}

.btn--danger:hover {
  color: var(--white);
  border-color: var(--danger);
  background: var(--danger);
}

.btn--block {
  width: 100%;
}

.btn--small {
  min-height: 33px;
  padding: 0 11px;
  font-size: 10px;
}

.panel--lime .btn--ink:hover {
  color: var(--ink);
  background: var(--white);
}

.rest-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.segmented {
  display: flex;
  gap: 3px;
  margin-top: 16px;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--paper-soft);
}

.segmented button {
  min-height: 37px;
  flex: 1;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 680;
  transition: color 160ms ease, background 160ms ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button[aria-pressed="true"] {
  color: var(--white);
  background: var(--ink);
}

.rest-hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.panel--tips {
  border-color: var(--line);
  background: transparent;
}

.tip-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.tip-list li {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.tip-list .tip-index {
  color: var(--line-strong);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 650;
  line-height: 1.5;
}

.tip-list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 750;
}

.tip-list p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 9px;
}

.page-footer-meta {
  font-family: var(--font-mono);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Notices and tags */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  font-size: 10px;
  line-height: 1.55;
}

.notice strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
}

.notice p {
  margin: 0;
}

.notice .icon {
  margin-top: 1px;
  flex: 0 0 auto;
}

.notice--warning {
  border-color: rgba(255, 106, 61, 0.32);
  background: var(--orange-soft);
}

.notice--warning strong,
.notice--warning .icon {
  color: var(--orange-dark);
}

.notice--success {
  border-color: rgba(168, 223, 33, 0.55);
  background: var(--lime-soft);
}

.notice--future {
  border-style: dashed;
}

/* Dialogs */

.dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--ink);
  border-radius: 26px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 30px 90px rgba(17, 19, 16, 0.28);
}

.dialog::backdrop {
  background: rgba(17, 19, 16, 0.42);
  backdrop-filter: blur(4px);
}

.dialog-inner {
  position: relative;
  padding: 27px;
}

.dialog-close {
  position: absolute;
  top: 17px;
  right: 17px;
  display: grid;
  width: 34px;
  height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: var(--white);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.dialog-close:hover {
  color: var(--white);
  border-color: var(--ink);
  background: var(--ink);
}

.dialog-close .icon {
  width: 14px;
  height: 14px;
}

.dialog h2 {
  margin: 7px 44px 8px 0;
  font-size: 29px;
  font-weight: 870;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.dialog-lede {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 22px;
}

.dialog-actions .btn {
  margin-top: 0;
}

.dialog-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.dialog-section:first-of-type {
  border-top: 0;
}

.dialog-section-title {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 750;
}

.replan-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.replan-stat {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper-soft);
}

.replan-stat span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.replan-stat strong {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.05em;
}

.replan-stat small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.replan-stat.is-good {
  border-color: rgba(168, 223, 33, 0.55);
  background: var(--lime-soft);
}

.replan-days {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.replan-day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
}

.replan-day.is-changed {
  border-color: var(--ink);
  background: var(--paper-soft);
}

.replan-day-label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 10px;
  white-space: nowrap;
}

.replan-day-label strong {
  font-size: 11px;
  font-weight: 750;
}

.replan-day-label span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.replan-day-sessions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.replan-day-sessions .tag {
  min-height: 19px;
  font-size: 8px;
}

.replan-empty {
  color: var(--muted);
  font-size: 9px;
}

.dialog-note {
  margin-top: 16px;
}

.settings-block {
  margin-top: 22px;
}

.settings-block + .settings-block {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.settings-title {
  margin: 0 0 9px;
  font-size: 12px;
  font-weight: 780;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-soft);
  font-size: 11px;
}

.settings-row + .settings-row {
  margin-top: 7px;
}

.settings-row span {
  color: var(--muted);
}

.settings-row strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
  text-align: right;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.settings-actions .btn {
  margin-top: 0;
}

.settings-footnote {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

/* Login */

.login-screen {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
}

.login-shell {
  display: grid;
  width: min(1070px, 100%);
  grid-template-columns: minmax(0, 1.07fr) minmax(360px, 0.93fr);
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 32px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(44, 39, 28, 0.14);
  animation: card-enter 400ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.login-hero {
  position: relative;
  display: flex;
  min-height: 620px;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px;
  overflow: hidden;
  background: var(--lime);
}

.login-hero .brand {
  position: relative;
  z-index: 1;
}

.login-hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34em;
  margin: 54px 0;
}

.login-hero h1 {
  margin: 13px 0 17px;
  font-size: clamp(43px, 4.8vw, 62px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.login-hero h1 span {
  white-space: nowrap;
}

.login-lede {
  max-width: 31em;
  margin: 0;
  color: rgba(17, 19, 16, 0.7);
  font-size: 13px;
  line-height: 1.7;
}

.login-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
}

.login-foot {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(17, 19, 16, 0.56);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.login-watermark {
  position: absolute;
  right: -13px;
  bottom: -27px;
  color: rgba(17, 19, 16, 0.08);
  font-family: var(--font-mono);
  font-size: 142px;
  font-weight: 900;
  letter-spacing: -0.14em;
  line-height: 0.8;
  pointer-events: none;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px;
}

.login-panel-head h2 {
  margin: 6px 0 9px;
  font-size: 32px;
  font-weight: 870;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.login-panel-head > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.login-form {
  margin-top: 30px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.password-field {
  display: flex;
  min-height: 51px;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: var(--paper-soft);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.password-field:focus-within {
  border-color: var(--ink);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(203, 255, 77, 0.5);
}

.password-lock {
  width: 17px;
  height: 17px;
  color: var(--muted);
}

.password-field input {
  width: 100%;
  height: 49px;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.password-field input::placeholder {
  color: var(--muted);
}

.password-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
}

.password-toggle:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.password-toggle .icon {
  width: 17px;
  height: 17px;
}

.form-error {
  margin: 9px 0 0;
  padding: 9px 11px;
  border: 1px solid rgba(181, 54, 32, 0.22);
  border-radius: 8px;
  color: var(--danger);
  background: #fff4f1;
  font-size: 10px;
  line-height: 1.55;
}

.login-submit {
  min-height: 51px;
  margin-top: 13px;
  border-radius: 13px;
  font-size: 12px;
}

.login-submit:disabled {
  opacity: 0.6;
}

.login-submit.is-loading .icon {
  animation: nudge 800ms ease-in-out infinite alternate;
}

@keyframes nudge {
  to {
    transform: translateX(4px);
  }
}

.login-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

/* Boot */

.boot-screen {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: 34px;
  background:
    radial-gradient(circle at 74% 28%, rgba(203, 255, 77, 0.45), transparent 24rem),
    var(--paper);
}

.boot-copy h1 {
  margin: 12px 0 20px;
  font-size: clamp(43px, 7vw, 86px);
  font-weight: 920;
  letter-spacing: -0.085em;
  line-height: 0.94;
}

.boot-loader {
  display: flex;
  gap: 5px;
}

.boot-loader span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  animation: boot-dot 900ms ease-in-out infinite alternate;
}

.boot-loader span:nth-child(2) {
  animation-delay: 160ms;
}

.boot-loader span:nth-child(3) {
  animation-delay: 320ms;
}

@keyframes boot-dot {
  to {
    opacity: 0.25;
    transform: translateY(-5px);
  }
}

/* Toast */

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  max-width: min(92vw, 520px);
  align-items: center;
  gap: 9px;
  padding: 12px 16px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 12px 36px rgba(17, 19, 16, 0.22);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  transform: translate(-50%, 8px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.toast::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--lime);
  content: "";
}

.toast.is-warn::before {
  background: var(--orange);
}

.toast.is-error::before {
  background: var(--danger);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.stats-metric {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper-soft);
}

.stats-metric > span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.stats-metric strong {
  display: inline-block;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 750;
  letter-spacing: -0.06em;
  line-height: 1.05;
}

.stats-metric small {
  margin-left: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
}

.stats-section {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.stats-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.stats-section-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 780;
}

.stats-section-head > span {
  color: var(--muted);
  font-size: 9px;
}

.stats-legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.stats-swatch {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-left: 4px;
}

.stats-swatch:first-child {
  margin-left: 0;
}

.stats-swatch--strength {
  background: var(--ink);
}

.stats-swatch--cardio {
  background: var(--lime-deep);
}

.stats-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 3px;
  overflow: visible;
}

.chart-grid-line {
  stroke: var(--line);
  stroke-dasharray: 3 4;
  stroke-width: 1;
}

.chart-axis-label,
.chart-week-label {
  fill: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.chart-bar-strength {
  fill: var(--ink);
}

.chart-bar-cardio {
  fill: var(--lime-deep);
}

.chart-bar-empty {
  fill: var(--line-strong);
}

.stats-caption {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-soft);
}

.history-row.is-current {
  border-color: var(--line-strong);
  background: var(--white);
}

.history-week {
  min-width: 115px;
  flex: 1 1 115px;
}

.history-week strong {
  display: block;
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
}

.history-week span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.history-counts {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.history-counts b {
  color: var(--ink-soft);
  font-weight: 750;
}

.history-current-label {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  white-space: nowrap;
}

.history-view {
  margin-left: auto;
}

/* Responsive */

@media (max-width: 1040px) {
  .page,
  .topbar {
    max-width: 100%;
  }

  .content-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, 0.85fr);
  }

  .login-shell {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.86fr);
  }

  .login-hero {
    padding: 36px;
  }

  .login-panel {
    padding: 36px;
  }
}

@media (max-width: 900px) {
  .topbar {
    padding: 16px 24px 12px;
  }

  .page {
    padding: 8px 24px 44px;
  }

  .topbar-week {
    display: none;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .side-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .panel--ink {
    grid-column: span 1;
  }

  .page-footer {
    margin-top: 20px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .login-hero {
    min-height: 0;
    padding: 30px;
  }

  .login-hero-copy {
    margin: 44px 0 38px;
  }

  .login-hero h1 {
    font-size: clamp(40px, 10vw, 62px);
  }

  .login-panel {
    padding: 32px 30px 36px;
  }

  .login-watermark {
    font-size: 110px;
  }
}

@media (max-width: 680px) {
  body {
    font-size: 14px;
  }

  .topbar {
    gap: 10px;
    padding: 13px 16px 10px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 12px;
    font-size: 16px;
  }

  .brand-name {
    font-size: 17px;
  }

  .brand-caption {
    font-size: 7px;
  }

  .sync-pill {
    min-height: 36px;
    max-width: 142px;
    overflow: hidden;
    padding: 0 10px;
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .page {
    padding: 6px 16px 40px;
  }

  .week-section {
    margin-bottom: 16px;
  }

  .week-heading {
    display: block;
    margin-bottom: 14px;
  }

  .week-heading h1 {
    margin-top: 6px;
    font-size: clamp(25px, 7.2vw, 33px);
    line-height: 1.14;
  }

  .week-goal {
    width: fit-content;
    margin-top: 12px;
    padding: 8px 12px;
    gap: 10px;
  }

  .chart-axis-label,
  .chart-week-label {
    font-size: 12px;
  }

  .week-toolbar {
    margin-bottom: 11px;
  }

  .week-view-status {
    max-width: 74px;
    font-size: 8px;
  }

  .week-tabs {
    gap: 5px;
  }

  .day-tab {
    min-height: 70px;
    padding: 9px 6px 7px;
    border-radius: 12px;
  }

  .day-name {
    font-size: 9px;
    letter-spacing: 0.02em;
  }

  .day-state {
    display: none;
  }

  .date-num {
    margin: 5px 0 5px;
    font-size: 18px;
  }

  .today-flag {
    top: 8px;
    right: 7px;
    width: 5px;
    height: 5px;
  }

  .mini-dot {
    width: 5px;
    height: 5px;
  }

  .day-card {
    padding: 22px 18px 20px;
    border-radius: 24px;
  }

  .day-card::before {
    height: 6px;
  }

  .day-topline {
    align-items: flex-start;
  }

  .day-top-actions {
    gap: 7px;
  }

  .day-completion {
    display: none;
  }

  .day-title {
    margin: 18px 0 13px;
    font-size: clamp(29px, 8.8vw, 38px);
    line-height: 1.14;
  }

  .warmup-strip {
    gap: 7px 10px;
    margin-top: 16px;
    padding: 10px 11px;
  }

  .warmup-head strong {
    font-size: 10px;
  }

  .warmup-steps {
    gap: 3px 9px;
    font-size: 10px;
  }

  .session-stack {
    margin-top: 12px;
  }

  .session {
    padding: 15px;
    border-radius: 18px;
  }

  .session-head {
    flex-wrap: wrap;
    gap: 10px;
  }

  .session-number {
    width: 35px;
    height: 35px;
    border-radius: 11px;
  }

  .session-title {
    font-size: 18px;
  }

  .session-subtitle {
    font-size: 11px;
  }

  .complete-toggle {
    width: 100%;
    min-height: 38px;
    justify-content: center;
    order: 4;
    margin-top: 2px;
  }

  .complete-status {
    width: 100%;
    min-height: 36px;
    justify-content: center;
    order: 4;
    margin-top: 2px;
  }

  .exercise-name {
    font-size: 15px;
  }

  .exercise-points li {
    font-size: 11px;
  }

  .exercise-stats {
    gap: 5px;
  }

  .stat {
    min-height: 28px;
    padding: 0 8px;
  }

  .stat b {
    font-size: 13px;
  }


  .session-utility {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cardio-board {
    align-items: flex-start;
    gap: 12px;
  }

  .cardio-time {
    padding: 8px 10px;
  }

  .cardio-time strong {
    font-size: 32px;
  }

  .cardio-facts {
    font-size: 11px;
  }

  .sequence-note {
    align-items: flex-start;
    font-size: 9px;
  }

  .sequence-line {
    margin-top: 7px;
  }

  .rest-view {
    grid-template-columns: 1fr;
    gap: 19px;
  }

  .rest-orbit {
    width: min(68vw, 200px);
    justify-self: center;
  }

  .rest-grid {
    gap: 6px;
  }

  .rest-tile {
    min-height: 108px;
    padding: 11px;
  }

  .rest-tile span {
    margin-bottom: 18px;
  }

  .rest-tile strong {
    font-size: 11px;
  }

  .rest-tile p {
    font-size: 10px;
  }

  .recovery-list {
    grid-template-columns: 1fr;
  }

  .side-column {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 19px;
    border-radius: 20px;
  }

  .panel h2 {
    font-size: 21px;
  }

  .panel h3 {
    font-size: 21px;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 0 3px;
  }

  .page-footer-meta {
    font-size: 8px;
  }

  .dialog {
    width: calc(100vw - 22px);
    border-radius: 22px;
  }

  .dialog-inner {
    padding: 22px 18px;
  }

  .dialog h2 {
    font-size: 25px;
  }

  .dialog-actions {
    position: sticky;
    z-index: 2;
    bottom: 0;
    flex-direction: column-reverse;
    margin: 18px -18px -22px;
    padding: 12px 18px calc(13px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    border-radius: 0 0 21px 21px;
    background: var(--white);
    box-shadow: 0 -14px 24px rgba(255, 253, 248, 0.92);
  }

  .dialog-actions .btn {
    width: 100%;
  }

  .replan-day {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .replan-day-sessions {
    justify-content: flex-start;
  }

  .login-screen {
    padding: 12px;
  }

  .login-shell {
    border-radius: 24px;
  }

  .login-hero {
    padding: 25px 22px 28px;
  }

  .login-hero-copy {
    margin: 36px 0 28px;
  }

  .login-hero h1 {
    font-size: clamp(37px, 11vw, 52px);
  }

  .login-lede {
    font-size: 12px;
  }

  .login-foot {
    display: none;
  }

  .login-watermark {
    font-size: 85px;
  }

  .login-panel {
    padding: 27px 22px 30px;
  }

  .login-panel-head h2 {
    font-size: 28px;
  }

  .login-form {
    margin-top: 23px;
  }

  .toast {
    max-width: calc(100vw - 28px);
    border-radius: 14px;
    text-align: center;
  }

  .boot-screen {
    padding: 25px;
  }

  .boot-copy h1 {
    font-size: clamp(39px, 13vw, 64px);
  }
}

@media (max-width: 390px) {
  .day-name {
    font-size: 7px;
  }

  .day-tab {
    min-height: 67px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .date-num {
    font-size: 17px;
  }

  .day-card {
    padding-right: 15px;
    padding-left: 15px;
  }

  .kicker-date {
    font-size: 10px;
  }

  .day-title {
    font-size: 31px;
    line-height: 1.15;
  }

  .sync-pill {
    max-width: 120px;
  }

  .login-hero h1 {
    font-size: 36px;
  }
}

@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;
  }
}

@media (max-width: 360px) {
  .week-view-status.is-history {
    display: none;
  }

  .login-hero h1 {
    font-size: 32px;
  }

  .login-hero {
    padding-right: 18px;
    padding-left: 18px;
  }

  .login-panel {
    padding-right: 18px;
    padding-left: 18px;
  }
}
