/* GymTrack base — reset, layout shell, typography. Tokens come from tokens.css (REPS). */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg-000);color:var(--ink-000);font-family:var(--font-mono);font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums;min-height:100vh}
h1,h2,h3,h4,p{margin:0}
h1{font-size:22px;font-weight:700;letter-spacing:-.01em}
h2{font-size:16px;font-weight:700}
h3{font-size:14px;font-weight:700}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
a{color:inherit}
img{max-width:100%;display:block}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.muted{color:var(--muted)}
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum"}
.row{display:flex;align-items:center;gap:var(--space-2)}
.row.wrap{flex-wrap:wrap}
.col{display:flex;flex-direction:column;gap:var(--space-3)}
.grow{flex:1;min-width:0}
.spread{justify-content:space-between}
.grid{display:grid;gap:var(--space-3)}
.g2{grid-template-columns:repeat(2,minmax(0,1fr))}
.g3{grid-template-columns:repeat(3,minmax(0,1fr))}
.g4{grid-template-columns:repeat(4,minmax(0,1fr))}
.eyebrow{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}

/* shell */
.shell{display:grid;grid-template-columns:200px minmax(0,1fr);min-height:100vh}
.side{position:sticky;top:0;height:100vh;padding:var(--space-5) var(--space-3);border-right:1px solid var(--line);background:var(--bg-100);display:flex;flex-direction:column;gap:var(--space-4)}
.brand{display:flex;align-items:baseline;gap:var(--space-2);padding:0 var(--space-2)}
.brand b{font-size:18px}
.brand span{font-size:11px;color:var(--muted)}
.nav{display:flex;flex-direction:column;gap:2px}
.nav a{display:flex;align-items:center;gap:var(--space-2);padding:var(--space-2) var(--space-3);border-radius:var(--radius-sm);text-decoration:none;color:var(--ink-100);border:1px solid transparent}
.nav a:hover{background:var(--surface-200)}
.nav a[aria-current="page"]{background:var(--surface-000);border-color:var(--edge);box-shadow:var(--shadow-pop);font-weight:700}
.nav .ico{width:18px;text-align:center}
.side-foot{margin-top:auto;display:flex;flex-direction:column;gap:var(--space-2)}
.main{padding:var(--space-6) var(--space-8) var(--space-16);max-width:1180px;width:100%}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-4);margin-bottom:var(--space-5);flex-wrap:wrap}
.page-head p{color:var(--muted);margin-top:var(--space-1)}
.section{margin-top:var(--space-6)}
.section>h2{margin-bottom:var(--space-3)}
.offline-banner{background:var(--missed);color:var(--missed-ink);border:1px solid var(--edge);border-radius:var(--radius-md);padding:var(--space-2) var(--space-3);margin-bottom:var(--space-4)}

@media (max-width:899px){
  .shell{grid-template-columns:1fr}
  .side{position:fixed;inset:auto 0 0 0;height:auto;z-index:30;flex-direction:row;padding:var(--space-1) var(--space-2) calc(var(--space-1) + env(safe-area-inset-bottom));border-right:0;border-top:1px solid var(--line);justify-content:space-around}
  .brand,.side-foot{display:none}
  .nav{flex-direction:row;width:100%;justify-content:space-around}
  .nav a{flex-direction:column;gap:0;padding:var(--space-1) var(--space-2);font-size:10px;min-width:44px;min-height:44px;justify-content:center}
  .nav a[aria-current="page"]{box-shadow:none;border-color:var(--edge)}
  .main{padding:var(--space-4) var(--space-4) 96px}
  .mobile-top{display:flex!important}
  .g4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .g3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.mobile-top{display:none;justify-content:space-between;align-items:center;margin-bottom:var(--space-3)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
/* mobile: larger touch targets (>=44px) */
@media (max-width:899px){
  .btn{min-height:44px;padding-inline:16px;font-size:15px}
  .btn.sm{min-height:40px;min-width:40px}
  .btn.icon{min-width:44px;min-height:44px}
  .input,.select{min-height:46px;font-size:16px}
  .chip,.seg button,.tabs button,.tab{min-height:44px}
  .chk{width:44px;height:44px}
  .sets td .input{min-width:64px}
  .nav a,.bottom-nav a,nav a{min-height:52px}
}
@media (max-width:899px){
  .mobile-top{position:sticky;top:0;z-index:40;height:52px;margin:0 calc(-1*var(--space-4)) var(--space-2);padding:0 var(--space-4);background:var(--bg-000);border-bottom:1px solid var(--line)}
  .main{padding-top:0}
}
.main{min-width:0}
@media (max-width:899px){
  .side{padding:6px var(--space-2) calc(6px + env(safe-area-inset-bottom))}
  .nav a{font-size:13px;font-weight:600;min-height:64px;gap:4px;flex:1;padding:6px 4px}
  .nav .ico{width:auto;font-size:24px;line-height:1}
  .nav a[aria-current="page"]{font-weight:700}
  .main{padding-bottom:120px}
  .rest-bar{bottom:80px}
}
