@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root { color-scheme: dark; --bg: #10171b; --panel: #192328; --line: #354246; --ink: #f0f2eb; --muted: #a1ada9; --accent: #d8fc64; font-family: 'DM Sans', system-ui, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); min-height: 100vh; }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.shell, .header-inner { width: min(100% - 80px, 1180px); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; letter-spacing: -.04em; font-size: 18px; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 31px; height: 31px; background: var(--accent); color: var(--bg); border-radius: 4px; font-size: 24px; line-height: 1; }
.brand-muted { color: var(--accent); margin: 0 2px; }
.top-nav { display: flex; gap: 9px; align-items: center; }
.top-nav a { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 700; color: var(--muted); padding: 12px 15px; border-radius: 5px; transition: color .2s, background .2s; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--bg); background: var(--accent); }
.account-area { display: flex; align-items: center; gap: 12px; min-width: 0; flex-wrap: wrap; justify-content: flex-end; }
.account-email { color: var(--muted); font-size: 12px; max-width: 170px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-button, .subtle-button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 10px 12px; cursor: pointer; font-size: 12px; font-weight: 700; white-space: nowrap; }
.account-button:hover, .subtle-button:hover { border-color: var(--accent); color: var(--accent); }
.eyebrow, .section-top, .list-top, .tile-index, .back-link, .site-footer, .progress-block > span, .detail-body small, .reset-button, .home-footnote { font-size: 11px; letter-spacing: .17em; font-weight: 700; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.eyebrow-line { width: 28px; border-top: 2px solid var(--accent); }
.home { padding-block: 86px 96px; }
.home-hero { display: flex; justify-content: space-between; gap: 40px; align-items: center; padding-bottom: 92px; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: 'Space Grotesk', sans-serif; }
.home h1 { font-size: clamp(56px, 8vw, 112px); line-height: .98; letter-spacing: -.085em; margin: 32px 0 26px; }
.home h1 em { font-style: normal; color: var(--accent); }
.home-hero p, .workout-hero p { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 540px; }
.hero-symbol { color: var(--accent); font-family: 'Space Grotesk', sans-serif; font-size: clamp(160px, 24vw, 330px); line-height: .7; font-weight: 400; transform: translateY(30px); opacity: .9; }
.section-top, .list-top { display: flex; justify-content: space-between; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.split-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-top: 24px; }
.split-tile { position: relative; min-height: 270px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px 32px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .2s, transform .2s, background .2s; }
.split-tile:hover { border-color: var(--accent); transform: translateY(-3px); background: #202d31; }
.tile-index { color: var(--accent); }
.split-tile h2 { font-size: clamp(45px, 5vw, 70px); line-height: 1; letter-spacing: -.07em; }
.split-tile p { color: var(--muted); margin-top: 12px; font-size: 14px; }
.tile-arrow { position: absolute; right: 30px; bottom: 25px; font-size: 38px; color: var(--accent); line-height: 1; transition: transform .2s; }
.split-tile:hover .tile-arrow { transform: translate(4px,-4px); }
.home-footnote { margin-top: 27px; color: var(--muted); letter-spacing: .04em; font-weight: 500; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; padding-block: 28px; }
.workout { padding-block: 38px 90px; }
.back-link { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; transition: color .2s; }
.back-link:hover { color: var(--accent); }
.back-link span { font-size: 19px; line-height: .5; }
.cloud-error { margin-top: 24px; padding: 14px 16px; border: 1px solid #ab776d; color: #ffd8cf; background: #2b2223; line-height: 1.5; font-size: 13px; }
.workout-hero { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: 88px 0 84px; }
.workout-hero h1 { font-size: clamp(78px, 13vw, 160px); line-height: .95; letter-spacing: -.09em; margin: 19px 0 23px; }
.headline-dot { color: var(--accent); }
.progress-block { min-width: 160px; display: flex; flex-direction: column; align-items: center; gap: 17px; color: var(--muted); text-align: center; padding-bottom: 6px; }
.progress-ring { width: 128px; height: 128px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) var(--progress), var(--line) 0); position: relative; }
.progress-ring::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg); }
.progress-number { position: relative; color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 43px; line-height: 1; letter-spacing: -.07em; }
.progress-number small { font-size: 17px; color: var(--muted); letter-spacing: 0; }
.exercise-list { border-bottom: 1px solid var(--line); }
.exercise-card { border-top: 1px solid var(--line); transition: background .2s; }
.exercise-card:hover { background: #172126; }
.exercise-card.is-done { background: #182523; }
.card-row { display: grid; grid-template-columns: 54px 43px minmax(0, 1fr); align-items: start; padding: 25px 15px 25px 3px; }
.exercise-index { font-family: 'Space Grotesk', sans-serif; color: #6f807e; font-size: 14px; margin-top: 6px; }
.exercise-check { appearance: none; width: 24px; height: 24px; border: 1.5px solid #84958d; border-radius: 4px; cursor: pointer; margin: 3px 0 0; display: grid; place-items: center; transition: background .2s, border-color .2s; }
.exercise-check:hover { border-color: var(--accent); }
.exercise-check:checked { background: var(--accent); border-color: var(--accent); }
.exercise-check:checked::after { content: '✓'; color: var(--bg); font-size: 17px; font-weight: 800; line-height: 1; }
.exercise-details { min-width: 0; }
.exercise-details summary { list-style: none; display: flex; align-items: start; justify-content: space-between; gap: 15px; cursor: pointer; }
.exercise-details summary::-webkit-details-marker { display: none; }
.exercise-main { display: flex; justify-content: space-between; gap: 24px; width: 100%; align-items: baseline; }
.exercise-main strong { font-family: 'Space Grotesk', sans-serif; font-size: 22px; letter-spacing: -.035em; line-height: 1.32; font-weight: 600; }
.is-done .exercise-main strong { color: #93a49d; }
.prescription { color: var(--accent); font-family: 'Space Grotesk', sans-serif; font-size: 18px; font-weight: 600; white-space: nowrap; }
.expand-icon { color: var(--muted); font-size: 25px; line-height: 1; font-weight: 300; transition: transform .2s; }
details[open] .expand-icon { transform: rotate(45deg); }
.detail-body { margin-top: 24px; padding: 25px 28px 27px; background: #233034; border-left: 2px solid var(--accent); }
.detail-meta { display: grid; grid-template-columns: 120px 1fr; gap: 20px; padding-bottom: 23px; border-bottom: 1px solid #455356; }
.detail-meta span { display: flex; flex-direction: column; gap: 8px; }
.detail-body small { color: var(--accent); }
.detail-meta strong { font-size: 14px; font-weight: 600; }
.technique { padding-top: 22px; }
.technique p { margin-top: 9px; color: #d3dad5; line-height: 1.6; max-width: 740px; font-size: 14px; }
.session-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 18px 20px; margin-bottom: 35px; border: 1px solid var(--line); background: var(--panel); }
.session-controls { display: flex; flex-direction: column; gap: 7px; min-width: min(100%, 290px); }
.session-controls label, .set-heading small { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.session-controls select { width: 100%; border: 1px solid var(--line); border-radius: 2px; background: var(--bg); color: var(--ink); padding: 10px; }
.session-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.set-logger { margin-top: 26px; border-top: 1px solid #455356; padding-top: 22px; }
.set-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.set-heading p { color: var(--muted); font-size: 12px; margin-top: 7px; }
.side-toggle { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; cursor: pointer; white-space: nowrap; }
.side-toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.set-table { display: grid; gap: 7px; }
.set-row { display: grid; grid-template-columns: 90px minmax(0, 130px) minmax(0, 110px); gap: 10px; align-items: end; }
.set-label { padding-bottom: 11px; font-size: 13px; color: var(--ink); }
.set-label b { display: inline-grid; place-items: center; width: 22px; height: 22px; background: var(--bg); color: var(--accent); margin-right: 5px; font-size: 11px; }
.set-row label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; }
.set-row input { width: 100%; border: 1px solid #607073; border-radius: 2px; background: var(--bg); color: var(--ink); padding: 9px 10px; }
.set-row input:focus { border-color: var(--accent); }
.add-set, .inline-link { background: none; border: 0; padding: 0; color: var(--accent); font-size: 12px; font-weight: 700; cursor: pointer; }
.add-set { margin-top: 15px; }
.save-status { margin-left: 14px; color: var(--muted); font-size: 12px; }
.log-prompt { margin-top: 24px; border-top: 1px solid #455356; padding-top: 20px; }
.auth-dialog { width: min(100% - 32px, 440px); border: 1px solid var(--line); background: var(--panel); color: var(--ink); padding: 32px; }
.auth-dialog::backdrop { background: rgb(0 0 0 / .72); }
.auth-dialog form { display: flex; flex-direction: column; gap: 13px; position: relative; }
.auth-dialog h2 { font-size: 34px; letter-spacing: -.05em; margin-top: 12px; }
.auth-dialog p { color: var(--muted); line-height: 1.5; font-size: 14px; }
.auth-dialog label { font-size: 12px; font-weight: 700; margin-top: 10px; }
.auth-dialog input { border: 1px solid var(--line); background: var(--bg); color: var(--ink); padding: 12px; }
.auth-submit { border: 0; background: var(--accent); color: var(--bg); padding: 13px; font-weight: 700; cursor: pointer; }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-dialog .auth-feedback, .auth-dialog .auth-error { color: var(--accent); min-height: 20px; }
.auth-divider { position: relative; display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; margin-top: 5px; }
.auth-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.auth-divider span { position: relative; background: var(--panel); padding: 0 12px; }
.auth-passkey { border: 1px solid var(--accent); background: transparent; color: var(--accent); padding: 13px; font-weight: 700; cursor: pointer; }
.auth-passkey:hover { background: var(--accent); color: var(--bg); }
.auth-passkey:disabled { opacity: .6; cursor: wait; }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 2px; }
.auth-links button { border: 0; background: none; color: var(--accent); padding: 3px 0; text-decoration: underline; cursor: pointer; font: inherit; font-size: 12px; }
.auth-dialog .passkey-hint { font-size: 12px; }
.dialog-close { position: absolute; top: -13px; right: -10px; border: 0; background: none; color: var(--muted); font-size: 28px; cursor: pointer; }
.reset-button:disabled { opacity: .45; cursor: default; }
.workout-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 29px; min-height: 70px; }
.completion { display: none; align-items: center; gap: 16px; }
.completion.visible { display: flex; }
.completion-icon { display: grid; place-items: center; width: 47px; height: 47px; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 25px; }
.completion div { display: flex; flex-direction: column; gap: 4px; }
.completion strong { font-family: 'Space Grotesk', sans-serif; font-size: 19px; }
.completion div span { color: var(--muted); font-size: 13px; }
.reset-button { border: 1px solid var(--line); background: transparent; color: var(--ink); padding: 15px 18px; cursor: pointer; display: flex; gap: 11px; align-items: center; margin-left: auto; transition: border-color .2s, color .2s; }
.reset-button:hover { border-color: var(--accent); color: var(--accent); }
.reset-button::first-letter { font-size: 20px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 20; }
.load-error { max-width: 600px; margin: 20vh auto; padding: 30px; text-align: center; }
.load-error h1 { font-size: 30px; }
.load-error p { margin-top: 12px; color: var(--muted); }
.history-page { padding-block: 75px 100px; }
.history-hero { display: flex; justify-content: space-between; align-items: end; gap: 40px; padding: 26px 0 65px; }
.history-hero h1 { font-size: clamp(56px, 8vw, 104px); line-height: .98; letter-spacing: -.08em; }
.history-hero h1 em { color: var(--accent); font-style: normal; }
.history-hero p { max-width: 460px; margin-top: 24px; color: var(--muted); line-height: 1.6; }
.history-stats { display: flex; gap: 28px; padding-bottom: 8px; }
.history-stats div { display: flex; flex-direction: column; gap: 5px; min-width: 78px; }
.history-stats strong { font-family: 'Space Grotesk', sans-serif; font-size: 36px; line-height: 1; letter-spacing: -.06em; }
.history-stats span, .history-kicker, .progress-controls label, .progress-chart-summary span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.history-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.history-tabs button, .metric-tabs button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: 11px 16px; text-transform: uppercase; font-size: 11px; font-weight: 700; letter-spacing: .1em; cursor: pointer; }
.history-tabs button[aria-pressed="true"], .metric-tabs button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--bg); }
.history-tabs button:hover, .metric-tabs button:hover { border-color: var(--accent); }
.history-section { padding-top: 48px; }
.history-section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 24px; }
.history-section-head h2 { font-size: clamp(30px, 4vw, 49px); letter-spacing: -.06em; margin-top: 7px; }
.history-section-head p { color: var(--muted); font-size: 12px; }
.history-kicker { color: var(--accent); }
.progress-controls { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 23px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; }
.progress-controls label { display: flex; flex-direction: column; gap: 9px; min-width: min(100%, 340px); }
.progress-controls select { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font-size: 14px; }
.metric-tabs { display: flex; gap: 7px; }
.progress-chart { padding: 22px 26px 17px; border: 1px solid var(--line); background: var(--panel); }
.progress-chart-summary { display: flex; gap: 50px; flex-wrap: wrap; }
.progress-chart-summary div { display: flex; flex-direction: column; gap: 9px; }
.progress-chart-summary strong { font-family: 'Space Grotesk', sans-serif; font-size: 30px; letter-spacing: -.05em; }
.progress-chart-summary strong.positive { color: var(--accent); }
.progress-chart-summary small { color: var(--muted); font-size: 13px; letter-spacing: 0; }
.chart-scroll { overflow-x: auto; }
.trend-chart { width: 100%; min-width: 540px; height: auto; margin-top: 22px; overflow: visible; }
.trend-chart line { stroke: var(--line); stroke-width: 1; }
.trend-chart polyline { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.trend-chart circle { fill: var(--accent); stroke: var(--panel); stroke-width: 2; }
.trend-chart text { fill: var(--muted); font: 13px 'DM Sans', sans-serif; }
.chart-caption { color: var(--muted); font-size: 12px; line-height: 1.5; }
.session-history { border-bottom: 1px solid var(--line); }
.history-session { border-top: 1px solid var(--line); }
.history-session summary { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 8px; list-style: none; cursor: pointer; }
.history-session summary::-webkit-details-marker { display: none; }
.history-session summary:hover { background: #172126; }
.history-session-main { display: grid; grid-template-columns: minmax(155px, 1fr) minmax(80px, .7fr) minmax(125px, 1fr); gap: 18px; align-items: center; width: 100%; }
.history-session-main strong { font-family: 'Space Grotesk', sans-serif; font-size: 23px; text-transform: capitalize; letter-spacing: -.04em; }
.history-session-main > span:last-child { color: var(--muted); font-size: 13px; }
.history-session-date { display: flex; flex-direction: column; gap: 5px; font-size: 13px; }
.history-session-status { color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.history-session-arrow { color: var(--accent); font-size: 25px; }
.history-session[open] .history-session-arrow { transform: rotate(45deg); }
.history-session-body { padding: 5px 22px 22px; background: var(--panel); border-left: 2px solid var(--accent); }
.history-exercise { padding: 18px 0; border-bottom: 1px solid var(--line); }
.history-exercise-head { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 11px; }
.history-exercise-head strong { font-family: 'Space Grotesk', sans-serif; font-size: 18px; }
.history-exercise-head span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.history-set-list { display: grid; gap: 5px; }
.history-set { display: grid; grid-template-columns: minmax(115px, 1fr) minmax(80px, .6fr) minmax(70px, .6fr); gap: 8px; align-items: center; padding: 8px 12px; background: var(--bg); font-size: 13px; }
.history-set span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.history-set strong { font-weight: 600; }
.history-open { display: inline-block; color: var(--accent); font-size: 12px; font-weight: 700; margin-top: 18px; text-transform: uppercase; letter-spacing: .08em; }
.history-empty { padding: 36px; border: 1px solid var(--line); background: var(--panel); }
.history-empty h2 { font-size: 31px; letter-spacing: -.05em; }
.history-empty p, .history-no-sets { color: var(--muted); line-height: 1.6; margin-top: 8px; }
.history-empty button { margin-top: 20px; cursor: pointer; }
.history-empty.compact { padding: 26px; }
.history-empty.compact p { margin: 0; }
@media (max-width: 760px) {
  .shell, .header-inner { width: min(100% - 36px, 1180px); }
  .header-inner { min-height: 68px; flex-wrap: wrap; padding-block: 15px; }
  .top-nav { width: 100%; overflow-x: auto; gap: 4px; }
  .top-nav a { padding: 9px 12px; }
  .account-area { margin-left: auto; }
  .account-email { max-width: 110px; }
  .home { padding-block: 62px 70px; }
  .home-hero { padding-bottom: 65px; }
  .hero-symbol { display: none; }
  .home h1 { font-size: clamp(52px, 12vw, 84px); }
  .split-grid { grid-template-columns: 1fr; }
  .split-tile { min-height: 208px; padding: 25px; }
  .workout { padding-block: 30px 65px; }
  .workout-hero { padding: 60px 0 55px; align-items: center; }
  .workout-hero h1 { font-size: clamp(70px, 15vw, 110px); }
  .progress-block { min-width: 110px; font-size: 10px; }
  .progress-ring { width: 96px; height: 96px; }
  .progress-number { font-size: 34px; }
  .card-row { grid-template-columns: 35px 39px minmax(0, 1fr); padding: 22px 2px; }
  .exercise-main { flex-direction: column; gap: 5px; }
  .exercise-main strong { font-size: 19px; }
  .prescription { font-size: 15px; }
  .detail-body { padding: 20px; }
  .session-toolbar { align-items: stretch; flex-direction: column; }
  .set-heading { flex-direction: column; }
  .history-page { padding-block: 53px 70px; }
  .history-hero { flex-direction: column; align-items: stretch; gap: 30px; }
  .history-stats { justify-content: space-between; }
  .history-section-head { align-items: start; flex-direction: column; gap: 7px; }
}
@media (max-width: 520px) {
  .header-inner { gap: 10px; }
  .account-area { order: 2; width: 100%; }
  .top-nav { order: 3; }
  .set-row { grid-template-columns: 74px minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  .side-label { white-space: nowrap; }
  .workout-hero { align-items: start; flex-direction: column; gap: 30px; }
  .progress-block { flex-direction: row; gap: 17px; }
  .workout-bottom { flex-direction: column; align-items: stretch; }
  .reset-button { margin-left: 0; justify-content: center; }
  .footer-inner { gap: 10px; font-size: 9px; }
  .history-session-main { grid-template-columns: 1fr auto; gap: 7px; }
  .history-session-main > span:last-child { grid-column: 1 / -1; }
  .progress-chart-summary { gap: 18px; }
  .progress-chart-summary strong { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
