:root {
  --ink: #101713;
  --ink-2: #1a2420;
  --paper: #f4f3ed;
  --white: #ffffff;
  --muted: #6f7772;
  --line: #dfe1da;
  --lime: #6ec8ff;
  --lime-2: #2da7f7;
  --blue: #397dff;
  --orange: #ff895b;
  --yellow: #f3c84c;
  --red: #e45050;
  --green: #2f9b62;
  --shadow: 0 18px 45px rgba(17, 26, 21, .09);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a, label[for], select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .dropzone:focus-within { outline: 3px solid rgba(71, 109, 255, .25); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20;
  width: 248px; padding: 28px 20px 24px;
  background: var(--ink); color: #fff;
  display: flex; flex-direction: column;
}
.brand { border: 0; background: transparent; color: #fff; padding: 0 8px; display: flex; gap: 12px; align-items: center; cursor: pointer; text-align: left; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; color: var(--ink); background: var(--lime); font-weight: 900; font-size: 18px; transform: rotate(-4deg); }
.brand b { font-size: 23px; letter-spacing: -.7px; }
.brand small { display: block; margin-top: 2px; color: #9fa8a2; font-size: 9px; font-weight: 800; letter-spacing: 1.6px; }
.side-nav { display: grid; gap: 5px; margin-top: 55px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #8f9993; padding: 12px 13px; border-radius: 12px; display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left; font-weight: 700; font-size: 14px; transition: .2s ease; }
.nav-item:hover { color: white; background: rgba(255,255,255,.05); }
.nav-item.active { background: var(--lime); color: var(--ink); }
.nav-item svg { width: 19px; height: 19px; }
.sidebar-coach { margin-top: auto; padding: 18px; border: 1px solid rgba(255,255,255,.11); background: rgba(255,255,255,.045); }
.coach-orbit { display: grid; place-items: center; width: 36px; height: 36px; background: var(--lime); color: var(--ink); border-radius: 50%; margin-bottom: 14px; }
.coach-orbit svg { width: 18px; }
.sidebar-coach p { margin: 0 0 7px; font-weight: 800; }
.sidebar-coach small { color: #98a19c; line-height: 1.5; }
.sidebar-coach .text-button { color: var(--lime); margin-top: 15px; padding: 0; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 18px 8px 0; }
.sidebar-foot b, .sidebar-foot small { display: block; font-size: 11px; }
.sidebar-foot small { color: #7e8982; margin-top: 2px; }
.status-dot { width: 9px; height: 9px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 0 5px rgba(110,200,255,.12); }

.main-content { min-height: 100vh; margin-left: 248px; padding: 0 48px 70px; max-width: 1700px; }
.topbar { height: 112px; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 5px 0 0; font-size: 25px; letter-spacing: -.8px; }
.eyebrow { margin: 0; color: #8a918c; font-size: 10px; font-weight: 900; letter-spacing: 1.5px; text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .avatar { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.icon-button { border-radius: 50%; }
.icon-button:hover { background: var(--lime); border-color: var(--lime); }
.icon-button svg { width: 18px; }
.avatar { border-radius: 12px; background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 900; font-size: 12px; }

.view { display: none; animation: enter .28s ease both; }
.view.active { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.hero-card { position: relative; min-height: 360px; overflow: hidden; background: var(--ink); color: #fff; padding: 48px 52px; display: grid; grid-template-columns: minmax(380px, .9fr) 1.1fr; align-items: center; box-shadow: var(--shadow); }
.hero-card::before { content: ""; position: absolute; width: 240px; height: 240px; left: 34%; top: -140px; border: 65px solid rgba(110,200,255,.09); border-radius: 50%; }
.hero-copy { position: relative; z-index: 2; }
.race-label { color: var(--lime); font-size: 10px; letter-spacing: 1.8px; font-weight: 900; display: flex; align-items: center; gap: 8px; }
.race-label span { width: 22px; height: 2px; background: var(--lime); }
.hero-card h2 { margin: 18px 0 8px; font-family: Impact, "Arial Black", sans-serif; font-size: clamp(58px, 5.5vw, 88px); line-height: .86; letter-spacing: -2.5px; text-transform: uppercase; font-weight: 900; }
.hero-card h2 em { color: var(--lime); font-style: normal; }
.hero-copy > p { color: #aeb6b0; margin: 14px 0 0; }
.hero-actions { display: flex; gap: 10px; margin-top: 28px; }
.primary-button, .secondary-button, .ghost-button { border: 0; min-height: 44px; padding: 0 17px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 850; font-size: 13px; transition: .2s ease; text-decoration: none; }
.primary-button { background: var(--lime); color: var(--ink); }
.primary-button:hover { background: #e4ff90; transform: translateY(-1px); }
.secondary-button { background: var(--ink); color: #fff; }
.secondary-button:hover { background: #27342e; }
.ghost-button { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.ghost-button:hover { background: rgba(0,0,0,.035); }
.ghost-button.light { border-color: rgba(255,255,255,.22); color: #fff; }
.primary-button svg, .secondary-button svg, .ghost-button svg { width: 16px; height: 16px; }
.hero-visual { position: relative; align-self: stretch; color: var(--lime); }
.route-line { position: absolute; inset: 35px 0 10px 30px; }
.route-line svg { width: 100%; height: 100%; }
.race-number { position: absolute; right: 10%; top: 12%; width: 142px; height: 166px; background: var(--lime); color: var(--ink); padding: 14px; transform: rotate(5deg); box-shadow: 0 22px 45px rgba(0,0,0,.28); text-align: center; }
.race-number::before, .race-number::after { content: ""; position: absolute; top: 9px; width: 13px; height: 5px; background: var(--ink); }
.race-number::before { left: 12px; }.race-number::after { right: 12px; }
.race-number small { display: block; font-size: 9px; font-weight: 900; letter-spacing: 2px; }
.race-number b { display: block; font: 94px/.98 Impact, "Arial Black", sans-serif; letter-spacing: -3px; }
.race-number span { display: block; font-weight: 900; font-size: 12px; letter-spacing: 3px; }
.route-point { position: absolute; width: 9px; height: 9px; background: var(--lime); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 3px var(--lime); }
.route-point.p1 { left: 1%; bottom: 6%; }.route-point.p2 { left: 47%; bottom: 12%; }.route-point.p3 { right: 2%; top: 3%; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(290px, .72fr); gap: 34px; margin-top: 42px; }
.left-column, .right-column { min-width: 0; }
.right-column { display: grid; gap: 18px; align-content: start; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading.compact { align-items: center; }
.section-heading h3 { margin: 5px 0 0; font-size: 21px; letter-spacing: -.5px; }
.text-button { display: inline-flex; align-items: center; gap: 5px; background: transparent; border: 0; padding: 6px; cursor: pointer; font-size: 12px; font-weight: 850; }
.text-button svg { width: 15px; height: 15px; }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-bottom: 12px; }
.day-cell { position: relative; min-height: 86px; padding: 13px 10px; background: #fff; border: 1px solid transparent; cursor: pointer; text-align: center; transition: .18s ease; }
.day-cell:hover { transform: translateY(-2px); border-color: #cdd2ca; }
.day-cell.active { background: var(--lime); }
.day-cell.today { border-color: var(--ink); }
.day-cell small, .day-cell b { display: block; }
.day-cell small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: 1px; text-transform: uppercase; }
.day-cell b { font-size: 18px; margin-top: 4px; }
.day-cell i { display: inline-flex; margin-top: 9px; padding: 3px 6px; background: var(--ink); color: #fff; font-size: 8px; font-style: normal; font-weight: 900; letter-spacing: .5px; }
.day-cell.rest i { background: transparent; color: #a7aca8; }

.next-session-card { background: #fff; min-height: 166px; display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 20px; padding: 22px; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(17,26,21,.045); }
.session-accent { width: 5px; align-self: stretch; background: var(--lime); }
.session-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.type-badge { flex: 0 0 auto; display: grid; place-items: center; width: 62px; height: 62px; background: var(--ink); color: var(--lime); font: 25px Impact, "Arial Black", sans-serif; }
.session-copy h3 { margin: 5px 0 6px; font-size: 20px; }
.session-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.session-meta { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.session-meta span { color: var(--muted); font-size: 11px; }
.session-meta b { color: var(--ink); }
.session-actions { display: flex; align-items: center; gap: 8px; }
.session-actions .primary-button { white-space: nowrap; }

.signal { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; background: #fff; border: 1px solid var(--line); font-size: 10px; font-weight: 850; }
.signal i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.signal-yellow i { background: var(--yellow); }.signal-red i { background: var(--red); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.metric-card { background: #fff; padding: 17px; min-height: 118px; border: 1px solid var(--line); }
.metric-card span { color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .7px; }
.metric-card strong { display: block; margin-top: 10px; font-size: 25px; letter-spacing: -1px; }
.metric-card strong small { color: #9ca29e; font-size: 12px; letter-spacing: 0; }
.metric-card .metric-progress { height: 4px; background: #eceee9; margin-top: 12px; overflow: hidden; }
.metric-card .metric-progress i { display: block; height: 100%; background: var(--lime-2); }

.phase-card, .coach-card, .mini-chart-card, .compare-card, .info-card, .profile-card, .large-chart-card, .pb-card, .training-mix-card { background: #fff; border: 1px solid var(--line); padding: 23px; }
.phase-card { background: var(--lime); border-color: var(--lime); }
.phase-card .eyebrow { color: #24516c; }.phase-number { color: rgba(16,23,19,.22); font: 39px Impact, sans-serif; }
.phase-card > p { color: #344f60; font-size: 13px; line-height: 1.55; }
.phase-progress { height: 5px; background: rgba(16,23,19,.16); margin-top: 22px; overflow: hidden; }
.phase-progress span { display: block; height: 100%; width: 25%; background: var(--ink); }
.phase-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10px; font-weight: 850; }
.coach-card { background: var(--ink-2); color: #fff; border-color: var(--ink-2); }
.coach-card-head { display: flex; align-items: center; gap: 12px; }
.coach-card .eyebrow { color: #94a098; }.coach-card h3 { margin: 4px 0 0; }.coach-card > p { color: #aeb7b1; font-size: 12px; line-height: 1.6; }
.coach-card .secondary-button { width: 100%; margin-top: 6px; background: var(--lime); color: var(--ink); }
.coach-icon { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: var(--lime); color: var(--ink); }
.coach-icon svg { width: 18px; }
.mini-chart-card b { font-size: 12px; }
.mini-bars { height: 86px; display: flex; align-items: end; gap: 4px; border-bottom: 1px solid var(--line); padding-top: 8px; }
.mini-bars i { flex: 1; display: block; min-height: 5px; background: #d9ddd6; }.mini-bars i.hot { background: var(--lime-2); }.mini-bars i.taper { background: #99a59e; }
.chart-caption { display: flex; justify-content: space-between; color: #9a9f9c; font-size: 8px; font-weight: 900; letter-spacing: 1px; margin-top: 8px; }

.view-intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 15px 0 28px; }
.view-intro h2 { margin: 7px 0 8px; font-size: clamp(34px, 4vw, 56px); letter-spacing: -2px; line-height: 1; }
.view-intro > div > p:last-child { color: var(--muted); margin: 0; max-width: 690px; line-height: 1.5; }
.intro-actions { flex: none; }

.plan-toolbar { position: sticky; top: 0; z-index: 12; background: rgba(244,243,237,.94); backdrop-filter: blur(12px); display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); padding: 0 12px; min-width: 220px; height: 42px; }
.search-field svg { width: 16px; color: var(--muted); }
.search-field input { border: 0; outline: 0; background: transparent; min-width: 0; width: 100%; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip { border: 1px solid var(--line); background: #fff; padding: 8px 12px; cursor: pointer; font-size: 11px; font-weight: 800; }
.filter-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.plan-overview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 25px 0; }
.overview-phase { border-top: 5px solid var(--phase-color); background: #fff; padding: 14px; cursor: pointer; text-align: left; }
.overview-phase span, .overview-phase b, .overview-phase small { display: block; }.overview-phase span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 1px; }.overview-phase b { margin-top: 5px; }.overview-phase small { margin-top: 5px; color: var(--muted); }
.plan-list { display: grid; gap: 12px; }
.week-card { background: #fff; border: 1px solid var(--line); }
.week-card.current { border: 2px solid var(--ink); }
.week-summary { width: 100%; border: 0; background: transparent; padding: 19px 20px; display: grid; grid-template-columns: 70px minmax(160px, .7fr) 1fr auto; align-items: center; gap: 20px; cursor: pointer; text-align: left; }
.week-number { font: 31px Impact, sans-serif; letter-spacing: -1px; }.week-number small { display: block; font: 8px "Segoe UI", sans-serif; color: var(--muted); letter-spacing: 1px; }
.week-title b, .week-title small { display: block; }.week-title b { font-size: 14px; }.week-title small { color: var(--muted); margin-top: 5px; font-size: 11px; }
.week-volume { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.week-volume > span { font-size: 11px; color: var(--muted); }.week-volume > b { font-size: 13px; }
.volume-track { height: 5px; background: #e9ebe6; }.volume-track i { display: block; height: 100%; background: var(--phase-color); }
.week-focus { display: flex; align-items: center; gap: 12px; }.week-focus > span { font-size: 11px; font-weight: 800; }.chevron { transition: transform .2s; }.chevron svg { width: 18px; }
.week-card.open .chevron { transform: rotate(180deg); }
.week-sessions { display: none; border-top: 1px solid var(--line); }
.week-card.open .week-sessions { display: block; }
.session-row { display: grid; grid-template-columns: 96px 58px 1.1fr .75fr .5fr auto; gap: 14px; align-items: center; padding: 13px 20px; border-bottom: 1px solid #eceee9; }
.session-row:last-child { border-bottom: 0; }
.session-date small, .session-date b { display: block; }.session-date small { font-size: 9px; color: var(--muted); text-transform: uppercase; }.session-date b { font-size: 11px; margin-top: 3px; }
.session-type { display: grid; place-items: center; width: 42px; height: 42px; background: #edf0eb; font-weight: 900; font-size: 11px; }
.session-type.quality { background: var(--ink); color: var(--lime); }
.session-name b, .session-name small { display: block; }.session-name b { font-size: 13px; }.session-name small { display: none; }
.session-target { color: var(--muted); font-size: 11px; }.session-target b { color: var(--ink); }
.session-rpe { font-size: 11px; color: var(--muted); }
.row-actions { display: flex; gap: 6px; }
.calendar-button, .detail-button { border: 0; min-height: 36px; padding: 0 10px; cursor: pointer; font-size: 10px; font-weight: 850; display: inline-flex; align-items: center; gap: 6px; }
.calendar-button { background: var(--lime); }.detail-button { background: #edf0eb; }
.calendar-button svg, .detail-button svg { width: 14px; }
.rest-row { opacity: .68; }

.privacy-note { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.privacy-note svg { width: 16px; }
.log-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 26px; align-items: start; }
.activity-form { background: #fff; border: 1px solid var(--line); }
.form-section { padding: 26px 28px; border-bottom: 1px solid var(--line); }
.form-section-head { display: flex; gap: 13px; margin-bottom: 18px; }.form-section-head > span { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 auto; background: var(--ink); color: var(--lime); font-size: 10px; font-weight: 900; }.form-section-head h3 { margin: 5px 0 0; font-size: 17px; }.form-section-head p { display: none; }
.field-grid { display: grid; gap: 14px; margin-top: 14px; }.field-grid.two { grid-template-columns: 1fr 1fr; }.field-grid.three { grid-template-columns: repeat(3, 1fr); }
label > span, .range-field > div:first-child > span { display: block; margin-bottom: 7px; color: #5d6660; font-size: 10px; font-weight: 850; letter-spacing: .35px; text-transform: uppercase; }
input, select, textarea { width: 100%; border: 1px solid #d7dbd4; background: #fbfcf9; padding: 11px 12px; color: var(--ink); border-radius: 0; }
textarea { resize: vertical; }
.input-suffix { position: relative; }.input-suffix input { padding-right: 50px; }.input-suffix i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 10px; font-style: normal; font-weight: 800; }
.time-input { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: start; gap: 5px; }.time-input > div { min-width: 0; }.time-input input { padding: 10px 5px; text-align: center; font-size: 16px; font-weight: 850; font-variant-numeric: tabular-nums; }.time-input > i { padding-top: 10px; color: #8c938e; font-size: 16px; font-style: normal; font-weight: 900; }.time-input small { display: block; margin-top: 4px; color: #9ba19d; font-size: 8px; font-weight: 800; text-align: center; text-transform: uppercase; }.time-input input.invalid { border-color: var(--red); background: #fff2f2; }
.range-field { margin: 18px 0; }.range-field > div:first-child { display: flex; justify-content: space-between; }.range-field output { font-size: 11px; font-weight: 900; }
input[type="range"] { appearance: none; border: 0; padding: 0; height: 6px; background: linear-gradient(90deg,var(--lime-2) 0 44%,#e7eae4 44%); }.pain-range { background: linear-gradient(90deg,var(--green),var(--yellow),var(--red)) !important; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 19px; height: 19px; border-radius: 50%; background: var(--ink); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ink); cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; color: #a1a7a3; font-size: 9px; margin-top: 7px; }
.dropzone { display: flex; min-height: 150px; border: 1px dashed #bfc5bd; background: #f8f9f5; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; transition: .2s; }
.dropzone:hover, .dropzone.dragover { background: #eef7ff; border-color: #5aaee5; }.dropzone input { display: none; }.upload-icon { color: var(--blue); margin-bottom: 10px; }.upload-icon svg { width: 25px; height: 25px; }.dropzone b { font-size: 13px; }.dropzone small { color: var(--muted); margin-top: 5px; text-align: center; }
.file-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }.file-chip { display: flex; align-items: center; gap: 7px; padding: 7px 9px; background: #edf0eb; font-size: 10px; }.file-chip img { width: 28px; height: 28px; object-fit: cover; }.file-chip button { border: 0; background: transparent; cursor: pointer; padding: 1px; }.file-chip svg { width: 13px; }
.form-actions { padding: 20px 28px; display: flex; justify-content: flex-end; gap: 9px; background: #f9faf7; }
.log-aside { position: sticky; top: 75px; display: grid; gap: 14px; }.compare-card { min-height: 260px; background: var(--ink); color: #fff; }.compare-card .eyebrow { color: var(--lime); }.compare-card h3 { margin: 7px 0; font-size: 22px; }.compare-card > p { color: #9da7a0; font-size: 12px; line-height: 1.55; }.compare-metric { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }.compare-metric div { padding: 11px; background: rgba(255,255,255,.07); }.compare-metric span, .compare-metric b { display: block; }.compare-metric span { color: #97a29a; font-size: 9px; text-transform: uppercase; }.compare-metric b { margin-top: 6px; font-size: 15px; }.compare-result { margin-top: 14px; padding: 12px; background: var(--lime); color: var(--ink); font-size: 11px; line-height: 1.45; }
.info-card { display: flex; gap: 12px; background: #e9edff; border-color: #d2d9ff; }.info-card > span { color: var(--blue); }.info-card svg { width: 20px; }.info-card h3 { margin: 0 0 5px; font-size: 13px; }.info-card p { margin: 0; color: #59616e; font-size: 10px; line-height: 1.55; }
.recent-section { margin-top: 42px; }.activity-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); }.activity-table { width: 100%; border-collapse: collapse; min-width: 760px; }.activity-table th { text-align: left; padding: 11px 14px; color: var(--muted); font-size: 9px; letter-spacing: .7px; text-transform: uppercase; background: #f8f9f6; }.activity-table td { padding: 14px; border-top: 1px solid var(--line); font-size: 11px; }.activity-table td b { font-size: 12px; }.table-status { display: inline-flex; align-items: center; gap: 5px; font-weight: 800; }.table-status i { width: 7px; height: 7px; border-radius: 50%; }.table-status.green i { background: var(--green); }.table-status.yellow i { background: var(--yellow); }.table-status.red i { background: var(--red); }.table-action { border: 0; background: transparent; cursor: pointer; color: var(--muted); }.table-action svg { width: 15px; }

.period-toggle { display: inline-flex; background: #e7e9e3; padding: 3px; }.period-toggle button { border: 0; background: transparent; padding: 8px 12px; font-size: 10px; font-weight: 850; cursor: pointer; }.period-toggle button.active { background: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.06); }
.progress-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }.progress-kpi { background: #fff; border: 1px solid var(--line); padding: 20px; }.progress-kpi span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; letter-spacing: .7px; }.progress-kpi b { display: block; margin-top: 8px; font-size: 30px; letter-spacing: -1px; }.progress-kpi small { display: block; color: var(--muted); margin-top: 3px; font-size: 10px; }
.chart-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }.large-chart-card { min-width: 0; }.legend { display: flex; gap: 13px; font-size: 9px; color: var(--muted); }.legend span { display: flex; align-items: center; gap: 5px; }.legend i { width: 9px; height: 9px; }.legend .planned { background: #d9ddd7; }.legend .actual { background: var(--lime-2); }
.weekly-chart { height: 230px; display: flex; align-items: end; gap: 6px; padding: 15px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; }.week-bar { height: 100%; min-width: 13px; flex: 1; display: flex; align-items: end; gap: 2px; position: relative; }.week-bar i { width: 48%; min-height: 2px; display: block; }.week-bar .plan { background: #d9ddd7; }.week-bar .actual { background: var(--lime-2); }.week-bar small { position: absolute; bottom: -19px; left: 0; color: #a4aaa5; font-size: 7px; }
.line-chart { height: 230px; }.line-chart svg { width: 100%; height: 100%; overflow: visible; }.line-grid { stroke: #e6e8e3; stroke-width: 1; }.line-plan-path { fill: none; stroke: #b8c1c8; stroke-width: 2; stroke-dasharray: 6 5; }.line-path { fill: none; stroke: var(--lime-2); stroke-width: 3; }.line-area { fill: rgba(45,167,247,.15); }.line-dot { fill: var(--ink); stroke: var(--lime); stroke-width: 3; }.axis-label { fill: #9ba19d; font-size: 8px; }
.progress-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }.pb-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.pb-item { padding: 14px 11px; background: #f4f5f1; border-top: 3px solid var(--ink); }.pb-item span, .pb-item b, .pb-item small { display: block; }.pb-item span { font-size: 9px; color: var(--muted); font-weight: 900; }.pb-item b { margin-top: 5px; font-size: 18px; }.pb-item small { color: var(--muted); margin-top: 3px; font-size: 9px; }
.type-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }.type-item { display: flex; align-items: center; gap: 8px; padding: 8px; background: #f4f5f1; }.type-item b { display: grid; place-items: center; min-width: 33px; height: 33px; background: var(--ink); color: var(--lime); font-size: 10px; }.type-item span { font-size: 10px; font-weight: 750; }

.profile-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.athlete-card { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; background: var(--ink); color: #fff; }.athlete-avatar { display: grid; place-items: center; width: 75px; height: 75px; background: var(--lime); color: var(--ink); font: 22px Impact, sans-serif; }.athlete-card h3 { margin: 6px 0; font-size: 24px; }.athlete-card p:last-child { color: #a7b0aa; margin: 0; font-size: 11px; }.athlete-stats { display: flex; gap: 30px; }.athlete-stats span { min-width: 75px; }.athlete-stats b, .athlete-stats small { display: block; }.athlete-stats b { color: var(--lime); font-size: 20px; }.athlete-stats small { color: #929d96; font-size: 9px; margin-top: 3px; }
.pace-list { display: grid; gap: 1px; }.pace-row { display: grid; grid-template-columns: 55px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }.pace-row b:first-child { display: grid; place-items: center; width: 40px; height: 28px; background: var(--ink); color: var(--lime); font-size: 10px; }.pace-row span { font-size: 11px; }.pace-row b:last-child { font-size: 11px; }.card-footnote { color: var(--muted); font-size: 9px; line-height: 1.5; margin: 14px 0 0; }
.outlook-card { display: grid; grid-template-columns: auto 1fr; gap: 15px; }.outlook-logo { display: grid; place-items: center; width: 48px; height: 48px; background: var(--blue); color: #fff; }.outlook-logo svg { width: 24px; }.outlook-card h3 { margin: 5px 0 7px; }.outlook-card p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; }.oauth-note { grid-column: 1 / -1; display: flex; gap: 11px; padding: 12px; background: #eef1ff; color: #3d4e87; }.oauth-note svg { width: 18px; }.oauth-note p { color: #3d4e87; font-size: 10px; }
.mobile-card-head { display: flex; align-items: center; gap: 12px; }.mobile-card-head > span { display: grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; background: var(--lime); }.mobile-card-head svg { width: 21px; }.mobile-card-head h3 { margin: 5px 0 0; }.mobile-card ol { list-style: none; padding: 0; margin: 18px 0 0; }.mobile-card li { display: grid; grid-template-columns: 25px 1fr; gap: 9px; padding: 9px 0; border-bottom: 1px solid var(--line); }.mobile-card li > b { display: grid; place-items: center; width: 21px; height: 21px; background: var(--ink); color: var(--lime); font-size: 9px; }.mobile-card li span { color: #59615c; font-size: 11px; line-height: 1.45; }.mobile-note { display: flex; gap: 9px; margin: 14px 0 0; padding: 11px; background: #f1f3ee; color: #687069; font-size: 9px; line-height: 1.5; }.mobile-note svg { flex: 0 0 auto; width: 16px; }.fuel-card > p { color: var(--muted); font-size: 11px; line-height: 1.6; }.fuel-basis { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 16px 0 10px; }.fuel-basis span { color: var(--muted); font-size: 9px; font-weight: 850; text-transform: uppercase; }.fuel-basis a { padding: 6px 8px; background: #f2f4ef; color: var(--ink); font-size: 9px; font-weight: 800; text-decoration: none; }.fuel-card > small { display: block; color: #909691; font-size: 9px; line-height: 1.5; }
.rules-card ol { list-style: none; padding: 0; margin: 0; counter-reset: rules; }.rules-card li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); counter-increment: rules; }.rules-card li::before { content: counter(rules, decimal-leading-zero); color: #9ba19d; font-size: 9px; font-weight: 900; margin-top: 2px; }.rules-card li b, .rules-card li span { display: block; font-size: 11px; }.rules-card li span { color: var(--muted); margin-top: 2px; }
.data-card > p { color: var(--muted); font-size: 11px; line-height: 1.55; }.data-actions { display: flex; gap: 8px; flex-wrap: wrap; }.file-button input { display: none; }.danger-link { margin-top: 18px; border: 0; background: transparent; color: var(--red); padding: 0; font-size: 10px; text-decoration: underline; cursor: pointer; }

.mobile-nav { display: none; }
.session-dialog { width: min(720px, calc(100vw - 34px)); max-height: calc(100vh - 34px); overflow-y: auto; padding: 0; border: 0; box-shadow: 0 40px 100px rgba(0,0,0,.28); background: #fff; color: var(--ink); }
.session-dialog::backdrop { background: rgba(10,16,12,.72); backdrop-filter: blur(4px); }.dialog-close { position: absolute; z-index: 3; right: 16px; top: 16px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; border: 0; background: rgba(255,255,255,.16); color: #fff; cursor: pointer; }.dialog-close svg { width: 17px; }
.detail-hero { background: var(--ink); color: #fff; padding: 35px 36px 30px; }.detail-hero .eyebrow { color: var(--lime); }.detail-hero h2 { margin: 10px 0 7px; font-size: 34px; letter-spacing: -1.3px; }.detail-hero > p { color: #aab4ad; margin: 0; font-size: 12px; }.detail-tags { display: flex; gap: 7px; margin-top: 20px; flex-wrap: wrap; }.detail-tags span { padding: 6px 9px; background: rgba(255,255,255,.08); color: #cbd2cd; font-size: 9px; font-weight: 800; }.detail-body { padding: 26px 36px 34px; }.detail-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.detail-metric { background: #f2f4ef; padding: 13px; }.detail-metric span, .detail-metric b { display: block; }.detail-metric span { color: var(--muted); font-size: 8px; text-transform: uppercase; font-weight: 850; }.detail-metric b { margin-top: 6px; font-size: 14px; }.detail-block { display: grid; grid-template-columns: 120px 1fr; gap: 15px; padding: 18px 0; border-bottom: 1px solid var(--line); }.detail-block h3 { margin: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; }.detail-block p { margin: 0; color: #58615b; font-size: 12px; line-height: 1.55; }.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }.detail-actions .primary-button, .detail-actions .secondary-button, .detail-actions .ghost-button { flex: 1; }
.nutrition-section { margin: 20px -36px 0; padding: 24px 36px 20px; background: #eef7ff; border-top: 1px solid #cfe7f7; border-bottom: 1px solid #cfe7f7; }.nutrition-head { display: flex; align-items: end; justify-content: space-between; gap: 14px; }.nutrition-head h3 { margin: 5px 0 0; font-size: 19px; }.nutrition-head > span { padding: 6px 8px; background: var(--ink); color: var(--lime); font-size: 8px; font-weight: 900; letter-spacing: .7px; }.nutrition-timeline { display: grid; gap: 0; margin-top: 18px; }.nutrition-timeline article { position: relative; display: grid; grid-template-columns: 31px 1fr; gap: 11px; padding: 0 0 16px; }.nutrition-timeline article:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 27px; bottom: 2px; width: 1px; background: #b8d8ed; }.nutrition-timeline i { position: relative; z-index: 1; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: var(--lime); color: var(--ink); font-size: 8px; font-style: normal; font-weight: 900; }.nutrition-timeline b { display: block; padding-top: 2px; font-size: 11px; }.nutrition-timeline p { margin: 4px 0 0; color: #415d70; font-size: 11px; line-height: 1.55; }.nutrition-source { margin: 5px 0 0; padding-top: 12px; border-top: 1px solid #cfe7f7; color: #6f8798; font-size: 8px; line-height: 1.5; }.nutrition-source a { color: #145b88; font-weight: 800; }
.toast { position: fixed; z-index: 100; right: 25px; bottom: 25px; display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 16px; box-shadow: var(--shadow); transform: translateY(120px); opacity: 0; transition: .25s ease; }.toast.show { transform: none; opacity: 1; }.toast > span { color: var(--lime); }.toast svg { width: 17px; }.toast p { margin: 0; font-size: 11px; font-weight: 800; }
.empty-state { text-align: center; padding: 45px; color: var(--muted); }.empty-state svg { width: 30px; }

@media (max-width: 1180px) {
  .main-content { padding-left: 30px; padding-right: 30px; }
  .hero-card { grid-template-columns: 1fr .8fr; padding: 42px; }
  .race-number { right: 3%; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: repeat(3, 1fr); }
  .session-row { grid-template-columns: 80px 48px 1fr .7fr auto; }.session-rpe { display: none; }
  .log-layout { grid-template-columns: minmax(0,1fr) 285px; }
  .pb-list { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
  .sidebar { width: 82px; padding: 26px 14px; align-items: center; }
  .brand { padding: 0; }.brand > span:last-child, .nav-item span:last-child, .sidebar-coach, .sidebar-foot span:last-child { display: none; }
  .side-nav { width: 100%; }.nav-item { justify-content: center; padding: 14px; }
  .sidebar-foot { margin-top: auto; }
  .main-content { margin-left: 82px; }
  .hero-card { min-height: 320px; }
  .hero-card h2 { font-size: 58px; }
  .right-column { grid-template-columns: 1fr 1fr; }.mini-chart-card { grid-column: 1 / -1; }
  .plan-toolbar { align-items: flex-start; flex-direction: column; }.search-field { width: 100%; }.filter-row { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }.filter-chip { flex: none; }
  .plan-overview { overflow-x: auto; grid-template-columns: repeat(5, 160px); }
  .week-summary { grid-template-columns: 60px 1fr auto; }.week-volume { display: none; }
  .session-row { grid-template-columns: 75px 43px 1fr auto; }.session-target { display: none; }
  .log-layout { grid-template-columns: 1fr; }.log-aside { position: static; grid-template-columns: 1fr 1fr; order: -1; }.compare-card { min-height: 0; }
  .chart-grid { grid-template-columns: 1fr; }.progress-bottom { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }.athlete-card { grid-column: auto; grid-template-columns: auto 1fr; }.athlete-stats { grid-column: 1 / -1; justify-content: space-between; }
}

@media (max-width: 680px) {
  body { padding-bottom: 74px; }
  .sidebar { display: none; }
  .main-content { margin: 0; padding: 0 16px 35px; }
  .topbar { height: 83px; }.topbar h1 { font-size: 19px; }.topbar .eyebrow { font-size: 8px; }.top-actions .icon-button { display: none; }
  .mobile-nav { position: fixed; z-index: 50; inset: auto 0 0; height: 67px; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--ink); color: #849087; box-shadow: 0 -10px 30px rgba(0,0,0,.15); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav button { border: 0; background: transparent; color: inherit; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; padding: 7px 2px; cursor: pointer; }.mobile-nav button.active { color: var(--lime); }.mobile-nav svg { width: 19px; height: 19px; }.mobile-nav small { font-size: 8px; font-weight: 750; }
  .mobile-nav .mobile-add { width: 54px; height: 54px; align-self: center; justify-self: center; margin-top: -21px; background: var(--lime); color: var(--ink); border-radius: 50%; box-shadow: 0 0 0 6px var(--ink); }.mobile-nav .mobile-add small { display: none; }
  .hero-card { min-height: 460px; padding: 32px 25px; grid-template-columns: 1fr; align-items: start; }.hero-card::before { left: 50%; }.hero-card h2 { font-size: 55px; }.hero-visual { position: absolute; inset: 205px -20px -30px 25%; opacity: .85; }.race-number { width: 108px; height: 128px; right: 16%; top: 13%; padding: 11px; }.race-number b { font-size: 70px; }.hero-actions { position: relative; z-index: 4; margin-top: 19px; }.hero-actions .primary-button, .hero-actions .ghost-button { padding: 0 12px; font-size: 11px; }
  .view-intro > div > p:last-child { display: none; }
  .next-session-card .session-copy > p:not(.eyebrow) { display: none; }
  .dashboard-grid { margin-top: 28px; gap: 25px; }.week-strip { gap: 3px; }.day-cell { min-height: 72px; padding: 10px 3px; }.day-cell b { font-size: 15px; }.day-cell i { font-size: 7px; padding: 3px; }.next-session-card { grid-template-columns: 6px 1fr; padding: 16px; }.session-main { gap: 12px; }.type-badge { width: 49px; height: 49px; font-size: 19px; }.session-copy h3 { font-size: 16px; }.session-meta { gap: 10px; }.session-actions { grid-column: 2; width: 100%; }.session-actions button { flex: 1; }.metric-grid { grid-template-columns: 1fr 1fr; }.right-column { grid-template-columns: 1fr; }.mini-chart-card { grid-column: auto; }
  .view-intro { align-items: flex-start; flex-direction: column; gap: 18px; padding-top: 8px; }.view-intro h2 { font-size: 38px; }.intro-actions { width: 100%; }.intro-actions button { width: 100%; }
  .plan-toolbar { margin: 0 -16px; padding: 12px 16px; }.plan-overview { margin-right: -16px; }.week-summary { grid-template-columns: 47px 1fr auto; gap: 10px; padding: 15px 13px; }.week-number { font-size: 25px; }.week-focus > span { display: none; }.session-row { grid-template-columns: 63px 38px 1fr; padding: 12px; gap: 8px; }.session-type { width: 35px; height: 35px; }.session-name small { max-width: 160px; }.row-actions { grid-column: 3; }.calendar-button, .detail-button { min-height: 32px; }.calendar-button span { display: none; }
  .log-aside { grid-template-columns: 1fr; }.form-section { padding: 22px 17px; }.field-grid.two, .field-grid.three { grid-template-columns: 1fr; }.form-actions { padding: 16px; flex-direction: column-reverse; }.form-actions button { width: 100%; }.dropzone { min-height: 130px; }.recent-section { margin-top: 28px; }
  .progress-kpis { grid-template-columns: 1fr 1fr; }.progress-kpi { padding: 15px; }.progress-kpi b { font-size: 24px; }.large-chart-card { padding: 17px; }.weekly-chart { overflow-x: scroll; }.week-bar { min-width: 11px; }.pb-list { grid-template-columns: 1fr 1fr; }.type-legend { grid-template-columns: 1fr 1fr; }
  .profile-card { padding: 19px; }.athlete-card { grid-template-columns: auto 1fr; }.athlete-avatar { width: 58px; height: 58px; }.athlete-card h3 { font-size: 19px; }.athlete-stats { gap: 8px; }.athlete-stats span { min-width: 0; }.outlook-card { grid-template-columns: auto 1fr; }.data-actions { flex-direction: column; }.data-actions > * { width: 100%; }
  .detail-hero { padding: 28px 22px 24px; }.detail-hero h2 { font-size: 28px; padding-right: 28px; }.detail-body { padding: 20px 22px 28px; }.detail-metrics { grid-template-columns: 1fr 1fr; }.detail-block { grid-template-columns: 1fr; gap: 6px; }.nutrition-section { margin-left: -22px; margin-right: -22px; padding: 22px; }.nutrition-head { align-items: flex-start; flex-direction: column; }.detail-actions { flex-direction: column; }.toast { left: 16px; right: 16px; bottom: 83px; }
}

/* Cinematic redesign — inspired by the calm pacing of premium product pages. */
:root {
  --ink: #070807;
  --ink-2: #111311;
  --paper: #f5f5f7;
  --white: #fff;
  --muted: #6e6e73;
  --line: #d9d9de;
  --lime: #6ec8ff;
  --lime-2: #2da7f7;
  --shadow: 0 24px 70px rgba(0,0,0,.09);
  --radius: 24px;
  --ease-cinematic: cubic-bezier(.22,1,.36,1);
}

html { background: #000; }
body { background: #000; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", sans-serif; }
.main-content { max-width: none; margin-left: 230px; padding: 0 42px 88px; background: var(--paper); transition: background-color .55s ease, color .55s ease; }
body[data-view="dashboard"] .main-content { background: #000; color: #f5f5f7; }

.sidebar {
  width: 230px;
  padding: 24px 18px 22px;
  background: rgba(4,5,4,.94);
  border-right: 1px solid rgba(255,255,255,.09);
  backdrop-filter: saturate(140%) blur(26px);
}
.brand-mark { border-radius: 12px; transform: none; box-shadow: 0 8px 30px rgba(110,200,255,.2); }
.brand b { letter-spacing: -.9px; }
.side-nav { margin-top: 48px; }
.nav-item { border-radius: 999px; padding: 11px 13px; transition: color .3s ease, background-color .3s ease, transform .3s var(--ease-cinematic); }
.nav-item:hover { transform: translateX(3px); }
.nav-item.active { box-shadow: 0 8px 30px rgba(110,200,255,.16); }
.sidebar-coach { border-radius: 20px; background: #111411; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 32;
  height: 76px;
  margin: 0 -42px;
  padding: 0 42px;
  background: rgba(245,245,247,.78);
  border-bottom: 1px solid rgba(29,29,31,.08);
  backdrop-filter: saturate(180%) blur(24px);
  transition: background-color .45s ease, border-color .45s ease, color .45s ease;
}
.topbar h1 { font-size: 20px; letter-spacing: -.45px; }
.topbar .eyebrow { color: #86868b; }
body[data-view="dashboard"] .topbar { background: rgba(0,0,0,.72); border-color: rgba(255,255,255,.1); }
body[data-view="dashboard"] .topbar h1 { color: #f5f5f7; }
body[data-view="dashboard"] .topbar .eyebrow { color: #86868b; }
.icon-button, .avatar { border-radius: 999px; transition: transform .35s var(--ease-cinematic), background-color .25s ease, border-color .25s ease; }
.icon-button:hover, .avatar:hover { transform: scale(1.06); }
body[data-view="dashboard"] .icon-button { background: rgba(255,255,255,.09); color: #fff; border-color: rgba(255,255,255,.13); }
body[data-view="dashboard"] .avatar { background: #f5f5f7; color: #111; border-color: #f5f5f7; }

.view { animation: view-in .58s var(--ease-cinematic) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(18px) scale(.995); } to { opacity: 1; transform: none; } }
::view-transition-old(root) { animation: view-old .22s ease both; }
::view-transition-new(root) { animation: view-new .55s var(--ease-cinematic) both; }
@keyframes view-old { to { opacity: 0; transform: scale(.992); } }
@keyframes view-new { from { opacity: 0; transform: translateY(14px); } }

.hero-stage {
  --hero-progress: 0;
  min-height: 116vh;
  padding-top: 16px;
  position: relative;
}
.hero-card {
  --pointer-x: 0;
  --pointer-y: 0;
  position: sticky;
  top: 92px;
  min-height: 640px;
  height: calc(100vh - 116px);
  max-height: 840px;
  padding: clamp(52px,6vw,92px);
  grid-template-columns: minmax(480px,.96fr) 1.04fr;
  background: #050505;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 34px;
  box-shadow: none;
  isolation: isolate;
}
.hero-card::before {
  width: 430px;
  height: 430px;
  left: auto;
  right: 8%;
  top: 8%;
  border: 0;
  background: var(--lime);
  opacity: calc(.13 - var(--hero-progress) * .05);
  filter: blur(115px);
  transform: translate(calc(var(--pointer-x) * 34px),calc(var(--pointer-y) * 24px)) scale(calc(1 + var(--hero-progress) * .18));
  transition: transform .8s var(--ease-cinematic);
}
.hero-card::after {
  content: "42.195";
  position: absolute;
  z-index: -1;
  right: -2vw;
  bottom: -6vw;
  color: rgba(255,255,255,.038);
  font-size: clamp(160px,22vw,390px);
  line-height: .72;
  font-weight: 750;
  letter-spacing: -.09em;
  transform: translateY(calc(var(--hero-progress) * 26px));
}
.hero-copy { transform: translateY(calc(var(--hero-progress) * -22px)); opacity: calc(1 - var(--hero-progress) * .28); }
.race-label { font-size: 11px; letter-spacing: 1.9px; }
.hero-card h2 {
  max-width: 820px;
  margin: 24px 0 16px;
  font-family: inherit;
  font-size: clamp(72px,8.5vw,142px);
  font-weight: 720;
  line-height: .86;
  letter-spacing: -.075em;
  text-transform: none;
}
.hero-card h2 em { color: var(--lime); }
.hero-copy > p { color: #a1a1a6; font-size: 17px; letter-spacing: -.2px; }
.hero-actions { margin-top: 34px; }
.primary-button, .secondary-button, .ghost-button { border-radius: 999px; min-height: 46px; padding: 0 20px; transition: transform .35s var(--ease-cinematic), background-color .25s ease, box-shadow .35s ease; }
.primary-button:hover, .secondary-button:hover, .ghost-button:hover { transform: translateY(-2px); }
.primary-button:hover { box-shadow: 0 12px 32px rgba(110,200,255,.22); }
.hero-visual {
  transform: translate3d(calc(var(--pointer-x) * -18px),calc(var(--hero-progress) * -38px + var(--pointer-y) * -14px),0) scale(calc(1 + var(--hero-progress) * .08));
  transition: transform .75s var(--ease-cinematic);
}
.route-line { inset: 14% -3% 8% 2%; opacity: calc(1 - var(--hero-progress) * .2); }
.route-line svg path:first-child { stroke-dasharray: 1 10; animation: route-flow 11s linear infinite; }
@keyframes route-flow { to { stroke-dashoffset: -110; } }
.race-number {
  right: 12%;
  top: 18%;
  width: 160px;
  height: 190px;
  padding: 18px;
  border-radius: 5px;
  transform: rotate(calc(4deg + var(--pointer-x) * 3deg)) translateY(calc(var(--hero-progress) * -16px));
  box-shadow: 0 32px 85px rgba(0,0,0,.5);
  transition: transform .75s var(--ease-cinematic);
}
.race-number b { font-size: 105px; }
.hero-scroll { position: absolute; left: 50%; bottom: 22px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 7px; color: #86868b; font-size: 9px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; opacity: calc(1 - var(--hero-progress) * 2); transform: translateX(-50%); }
.hero-scroll i { width: 1px; height: 28px; overflow: hidden; background: rgba(255,255,255,.18); }
.hero-scroll i::after { content: ""; display: block; width: 100%; height: 50%; background: var(--lime); animation: scroll-cue 1.8s ease-in-out infinite; }
@keyframes scroll-cue { 0% { transform: translateY(-120%); } 65%,100% { transform: translateY(220%); } }

#view-dashboard .dashboard-grid {
  position: relative;
  z-index: 3;
  margin: 0 -42px -88px;
  padding: 108px 42px 110px;
  background: var(--paper);
  color: #1d1d1f;
  border-radius: 42px 42px 0 0;
  box-shadow: 0 -28px 80px rgba(0,0,0,.35);
}
.section-heading h3 { letter-spacing: -.65px; }
.day-cell, .next-session-card, .metric-card, .phase-card, .coach-card, .mini-chart-card,
.compare-card, .info-card, .profile-card, .large-chart-card, .pb-card, .training-mix-card,
.activity-form, .activity-table-wrap, .overview-phase, .week-card {
  border-radius: var(--radius);
}
.day-cell { border-color: #e7e7ea; transition: transform .4s var(--ease-cinematic), box-shadow .4s ease, border-color .25s ease; }
.day-cell:hover { transform: translateY(-5px); box-shadow: 0 16px 35px rgba(0,0,0,.08); }
.day-cell.active { border-color: var(--lime); }
.day-cell i, .signal, .type-badge, .session-type, .form-section-head > span, .athlete-avatar, .outlook-logo, .pace-row b:first-child, .type-item b { border-radius: 12px; }
.next-session-card { border-color: transparent; box-shadow: 0 18px 60px rgba(0,0,0,.08); transition: transform .45s var(--ease-cinematic), box-shadow .45s ease; }
.next-session-card:hover { transform: translateY(-4px); box-shadow: 0 24px 70px rgba(0,0,0,.11); }
.session-accent { border-radius: 999px; }
.metric-card { border-color: transparent; min-height: 130px; padding: 20px; box-shadow: 0 10px 32px rgba(0,0,0,.045); }
.metric-card strong { font-size: 29px; }
.metric-card .metric-progress, .phase-progress, .volume-track { border-radius: 999px; }
.phase-card { box-shadow: 0 18px 50px rgba(45,167,247,.2); }
.coach-card { background: #090a09; border-color: #090a09; }
.mini-chart-card { border-color: transparent; box-shadow: 0 10px 32px rgba(0,0,0,.045); }
.mini-bars i { border-radius: 4px 4px 0 0; }

.view-intro { min-height: 245px; padding: 72px 0 42px; }
.view-intro h2 { max-width: 920px; margin: 12px 0 14px; font-size: clamp(52px,6.5vw,94px); font-weight: 720; line-height: .92; letter-spacing: -.065em; }
.view-intro > div > p:last-child { font-size: 16px; }
.plan-toolbar { top: 76px; margin: 0 -42px; padding: 14px 42px; background: rgba(245,245,247,.82); backdrop-filter: saturate(180%) blur(24px); }
.search-field { border-radius: 999px; padding: 0 16px; }
.filter-chip, .period-toggle, .period-toggle button { border-radius: 999px; }
.filter-chip { transition: transform .3s var(--ease-cinematic), background-color .25s ease, color .25s ease; }
.filter-chip:hover { transform: translateY(-2px); }
.plan-overview { gap: 12px; padding: 34px 0; }
.overview-phase { border: 0; box-shadow: inset 0 4px 0 var(--phase-color); transition: transform .4s var(--ease-cinematic), box-shadow .35s ease; }
.overview-phase:hover { transform: translateY(-5px); box-shadow: inset 0 4px 0 var(--phase-color), 0 18px 45px rgba(0,0,0,.08); }
.plan-list { gap: 14px; }
.week-card { overflow: hidden; border-color: #e1e1e5; transition: transform .4s var(--ease-cinematic), box-shadow .4s ease, border-color .25s ease; }
.week-card:hover { transform: translateY(-2px); box-shadow: 0 16px 45px rgba(0,0,0,.07); }
.week-card.current { border: 2px solid #1d1d1f; }
.week-summary { padding: 22px 24px; }
.week-sessions {
  display: block !important;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
  border-top-color: transparent;
  transform: translateY(-10px);
  transition: max-height .72s var(--ease-cinematic), opacity .35s ease, transform .6s var(--ease-cinematic), visibility 0s linear .72s, border-color .25s ease;
}
.week-card.open .week-sessions { max-height: 1200px; opacity: 1; visibility: visible; border-top-color: var(--line); transform: none; transition-delay: 0s; }
.chevron { transition: transform .55s var(--ease-cinematic); }
.session-row { transition: background-color .25s ease; }
.session-row:hover { background: #f7f7f9; }
.calendar-button, .detail-button { border-radius: 999px; transition: transform .3s var(--ease-cinematic), background-color .25s ease; }
.calendar-button:hover, .detail-button:hover { transform: translateY(-2px); }

.activity-form { overflow: hidden; box-shadow: 0 18px 55px rgba(0,0,0,.055); }
.form-section { padding: 32px; }
input, select, textarea { border-radius: 13px; background: #fff; min-height: 44px; transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease; }
input:focus, select:focus, textarea:focus { border-color: #86868b; box-shadow: 0 0 0 4px rgba(0,0,0,.055); }
.time-input input { border-radius: 13px; }
.dropzone { border-radius: 18px; }
.form-actions { border-radius: 0 0 var(--radius) var(--radius); }
.log-aside > *, .progress-kpi, .large-chart-card, .progress-bottom > *, .profile-card { box-shadow: 0 14px 45px rgba(0,0,0,.05); }
.progress-kpi { border-radius: 20px; }
.weekly-chart, .line-chart { margin-top: 10px; }
.profile-card { border-color: transparent; }

.session-dialog { border-radius: 28px; box-shadow: 0 44px 140px rgba(0,0,0,.42); }
.session-dialog[open] { animation: dialog-in .55s var(--ease-cinematic) both; }
.session-dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(16px); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(30px) scale(.96); } to { opacity: 1; transform: none; } }
.detail-hero { padding-top: 48px; border-radius: 28px 28px 0 0; }
.detail-hero h2 { font-size: 40px; letter-spacing: -.045em; }
.detail-tags span, .nutrition-head > span { border-radius: 999px; }
.detail-metric { border-radius: 15px; }
.nutrition-section { background: #eef7ff; }
.toast { border-radius: 999px; }

.reveal-item { opacity: 0; transform: translateY(42px) scale(.985); transition: opacity .8s var(--ease-cinematic) var(--reveal-delay,0ms), transform .8s var(--ease-cinematic) var(--reveal-delay,0ms); }
.reveal-item.is-visible { opacity: 1; transform: none; }

@media (max-width: 1180px) and (min-width: 681px) {
  .sidebar { width: 82px; padding: 26px 14px; }
  .main-content { margin-left: 82px; padding-left: 32px; padding-right: 32px; }
  .topbar { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
  .hero-card { grid-template-columns: minmax(400px,.95fr) 1fr; padding: 54px; }
  #view-dashboard .dashboard-grid { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
  .plan-toolbar { margin-left: -32px; margin-right: -32px; padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 900px) {
  .hero-stage { min-height: 108vh; }
  .hero-card { min-height: 600px; grid-template-columns: 1fr .72fr; padding: 46px; }
  .hero-card h2 { font-size: clamp(68px,10vw,100px); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .view-intro { min-height: 215px; }
}

@media (max-width: 680px) {
  body { background: var(--paper); }
  body[data-view="dashboard"] { background: #000; }
  .main-content { margin: 0; padding: 0 16px 38px; }
  .topbar { top: 0; height: 66px; margin: 0 -16px; padding: 0 16px; }
  .topbar h1 { font-size: 17px; }
  .mobile-nav { height: 72px; background: rgba(7,8,7,.9); border-top: 1px solid rgba(255,255,255,.1); backdrop-filter: saturate(160%) blur(22px); box-shadow: 0 -14px 42px rgba(0,0,0,.22); }
  .mobile-nav .mobile-add { box-shadow: 0 0 0 6px rgba(7,8,7,.95), 0 10px 28px rgba(110,200,255,.24); }
  .hero-stage { min-height: auto; padding-top: 4px; }
  .hero-card { position: relative; top: auto; height: auto; min-height: 650px; max-height: none; padding: 42px 24px; border-radius: 28px; grid-template-columns: 1fr; }
  .hero-card::before { width: 270px; height: 270px; right: -12%; top: 45%; filter: blur(82px); }
  .hero-card::after { right: -4%; bottom: 1%; font-size: 42vw; }
  .hero-card h2 { max-width: 320px; margin-top: 22px; font-size: clamp(60px,18vw,78px); line-height: .89; letter-spacing: -.075em; }
  .hero-copy > p { font-size: 14px; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .primary-button, .hero-actions .ghost-button { min-height: 44px; padding: 0 14px; font-size: 11px; }
  .hero-visual { inset: 300px -40px -20px 18%; }
  .route-line { inset: 15% -8% 3% 0; }
  .race-number { width: 112px; height: 134px; right: 16%; top: 28%; padding: 12px; }
  .race-number b { font-size: 73px; }
  .hero-scroll { bottom: 18px; }
  #view-dashboard .dashboard-grid { margin: 62px -16px -38px; padding: 72px 16px 92px; border-radius: 30px 30px 0 0; }
  .dashboard-grid { gap: 30px; }
  .next-session-card { border-radius: 22px; }
  .metric-card { min-height: 124px; border-radius: 20px; }
  .right-column > * { border-radius: 22px; }
  .view-intro { min-height: 0; padding: 48px 0 34px; }
  .view-intro h2 { margin-top: 10px; font-size: clamp(44px,14vw,62px); line-height: .94; }
  .plan-toolbar { top: 66px; margin: 0 -16px; padding: 12px 16px; }
  .plan-overview { gap: 10px; padding: 26px 0; }
  .week-summary { padding: 17px 15px; }
  .week-card { border-radius: 20px; }
  .form-section { padding: 24px 18px; }
  .activity-form, .profile-card, .large-chart-card, .pb-card, .training-mix-card { border-radius: 22px; }
  .session-dialog { width: calc(100vw - 20px); max-height: calc(100vh - 20px); border-radius: 24px; }
  .detail-hero { border-radius: 24px 24px 0 0; }
  .reveal-item { transform: translateY(28px) scale(.99); }
}

/* Run-only training plan */
#view-plan .view-intro h2 { max-width: 760px; }
.plan-list { gap: 14px; padding-top: 30px; }
.plan-list-header { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 6px; color: var(--muted); }
.plan-list-header > span { display: inline-flex; align-items: center; gap: 8px; color: #1d1d1f; font-size: 12px; font-weight: 800; }
.plan-list-header i { width: 9px; height: 9px; border-radius: 50%; background: var(--lime-2); box-shadow: 0 0 0 5px rgba(45,167,247,.12); }
.plan-list-header small { font-size: 11px; }
.week-card { border-left: 4px solid var(--phase-color); }
.week-summary { grid-template-columns: 68px minmax(210px,1fr) auto 32px; gap: 18px; }
.week-stats { min-width: 190px; text-align: right; }
.week-stats b, .week-stats small { display: block; }
.week-stats b { font-size: 13px; }
.week-stats small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.week-focus { justify-content: flex-end; }
.session-row { grid-template-columns: 96px 48px minmax(220px,1fr) auto; gap: 16px; padding: 17px 24px; }
.session-type { background: #eaf5fc; color: #176693; }
.session-type.quality { background: #0d2330; color: var(--lime); }
.time-button { border: 0; min-height: 36px; padding: 0 11px; border-radius: 999px; background: #eaf5fc; color: #175f88; cursor: pointer; font-size: 10px; font-weight: 850; display: inline-flex; align-items: center; gap: 6px; transition: transform .3s var(--ease-cinematic), background-color .25s ease; }
.time-button:hover { transform: translateY(-2px); background: #d7efff; }
.time-button svg { width: 14px; }

.time-dialog { width: min(430px,calc(100vw - 28px)); padding: 0; border: 0; border-radius: 26px; background: #fff; color: var(--ink); box-shadow: 0 40px 130px rgba(0,0,0,.38); }
.time-dialog[open] { animation: dialog-in .45s var(--ease-cinematic) both; }
.time-dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(14px); }
.time-dialog form { position: relative; padding: 34px; }
.time-dialog-close { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #edf1f4; cursor: pointer; display: grid; place-items: center; }
.time-dialog-close svg { width: 16px; }
.time-dialog h2 { margin: 8px 42px 8px 0; font-size: 31px; letter-spacing: -1.2px; }
.time-dialog form > p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.time-field { display: block; margin-top: 25px; }
.time-field input { height: 64px; padding: 10px 14px; background: #f4f7f9; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.time-dialog-actions { display: flex; gap: 8px; margin-top: 24px; }
.time-dialog-actions > * { flex: 1; }

.progress-kpis { grid-template-columns: repeat(3,1fr); }
.signal-stats { display: grid; gap: 10px; }
.signal-stat { padding: 15px; border-radius: 16px; background: #f4f7f9; }
.signal-stat > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.signal-stat span { color: #424a50; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .5px; }
.signal-stat b { font-size: 20px; letter-spacing: -.6px; }
.signal-stat p { margin: 5px 0 11px; color: var(--muted); font-size: 10px; }
.signal-stat-track { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: #dfe6ea; }
.signal-stat-track i { display: block; height: 100%; border-radius: inherit; background: var(--lime-2); }

@media (max-width: 900px) {
  .week-summary { grid-template-columns: 60px minmax(160px,1fr) auto 30px; }
  .week-stats { min-width: 150px; }
  .session-row { grid-template-columns: 76px 44px minmax(160px,1fr) auto; }
}

@media (max-width: 680px) {
  .plan-list { padding-top: 22px; }
  .plan-list-header { padding: 0 3px 2px; }
  .plan-list-header small { font-size: 9px; }
  .week-summary { grid-template-columns: 48px minmax(0,1fr) 28px; gap: 11px; }
  .week-number { grid-row: 1 / span 2; }
  .week-title { min-width: 0; }
  .week-stats { grid-column: 2; min-width: 0; text-align: left; }
  .week-stats b { font-size: 11px; }
  .week-stats small { font-size: 9px; white-space: normal; }
  .week-focus { grid-column: 3; grid-row: 1 / span 2; }
  .session-row { grid-template-columns: 58px 40px minmax(0,1fr); gap: 10px; padding: 15px 13px; }
  .row-actions { grid-column: 2 / -1; width: 100%; margin-top: 3px; }
  .row-actions .time-button, .row-actions .detail-button, .row-actions .calendar-button { flex: 1; justify-content: center; }
  .row-actions .time-button span, .row-actions .detail-button span, .row-actions .calendar-button span { display: inline; }
  .time-dialog form { padding: 30px 22px 24px; }
  .progress-kpis { grid-template-columns: 1fr 1fr; }
  .progress-kpi:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal-item { opacity: 1 !important; transform: none !important; }
  .hero-copy, .hero-visual, .race-number { transform: none !important; opacity: 1 !important; }
}
