/* Workout log, the sheet. Portrait Letter by default, A4 under html.a4
   (the runtime swaps the @page rule). Up to ten exercises, five sets each
   with a box for the weight and one for the reps, a cardio block and notes
   on switches. Colors only through --t-*; static font instances only. */

@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/intertight-400.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/intertight-500.woff2") format("woff2"); font-weight: 500; font-display: block; }

@page { size: Letter; margin: 0; }

:root { --t-paper: #ffffff; --t-ink: #1a1a1a; --t-accent: #8f2d2d; --t-muted: #6b7078; }
html, body { margin: 0; padding: 0; background: #fff; }
[hidden] { display: none !important; }

.sheet {
  width: 8.5in; height: 11in; padding: 0.5in 0.55in 0.6in; box-sizing: border-box; position: relative; overflow: hidden;
  background: var(--t-paper); color: var(--t-ink);
  font: 400 10pt/1.4 "Inter Tight", system-ui, sans-serif;
  display: flex; flex-direction: column; gap: 0.24in;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  --line: color-mix(in srgb, var(--t-muted) 45%, transparent);
}
html.a4 .sheet { width: 210mm; height: 297mm; }

.head { flex: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 0.3in; border-bottom: 1.5pt solid var(--t-accent); padding-bottom: 0.1in; min-height: 0.66in; }
.titles { min-width: 0; flex: 1; }
.titles h1 { margin: 0; font: 500 24pt/1.2 "Fraunces", Georgia, serif; letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; height: 1.2em; }
.titles .sub { margin: 3pt 0 0; color: var(--t-muted); font-size: 10.5pt; white-space: nowrap; overflow: hidden; height: 1.4em; }
.when { flex: none; text-align: right; }
.when-label { display: block; font-size: 8pt; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 3pt; }
.when-dated { display: block; font: 500 11.5pt/1.2 "Fraunces", Georgia, serif; color: var(--t-accent); white-space: nowrap; }
.when-blank { display: block; width: 2.2in; margin-left: auto; height: 0.2in; border-bottom: 0.6pt solid var(--t-ink); }
.label { display: block; font: 500 8pt/1 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-muted); padding-bottom: 4pt; border-bottom: 1pt solid var(--t-accent); }

.lifts { flex: none; display: flex; flex-direction: column; }
.wrow { display: flex; align-items: stretch; border-bottom: 0.5pt solid var(--line); }
.wrow.th { border-bottom: 0; }
.wrow.th b, .wrow.sub b { display: flex; justify-content: center; gap: 4pt; font: 500 7.5pt/1 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-muted); }
.wrow.sub { border-bottom: 1pt solid var(--t-accent); padding-bottom: 3pt; }
.wrow.sub b small { flex: 1; text-align: center; font-size: 6pt; letter-spacing: 0.04em; text-transform: none; }
.rows .wrow { height: 0.46in; }
.ex { flex: 0 0 1.9in; min-width: 0; display: flex; align-items: center; font-size: 10pt; white-space: nowrap; overflow: hidden; padding-right: 0.15in; }
.sets { flex: 1; display: flex; gap: 6pt; align-items: center; }
.sets b, .sets .set { flex: 1 1 0; min-width: 0; }
.set { display: flex; gap: 3pt; height: 0.3in; }
.set i { display: block; flex: 1; box-sizing: border-box; border: 0.6pt solid var(--t-muted); border-radius: 2pt; }

.cardio { flex: none; display: flex; flex-direction: column; }
.crow { display: flex; height: 0.32in; border-bottom: 0.5pt solid var(--line); }
.crow.th { height: 0.24in; border-bottom: 0; }
.crow span { flex: 1; min-width: 0; border-left: 0.5pt solid var(--line); }
.crow span:first-child { flex: 1.6; border-left: 0; }
.crow.th span { border: 0; font: 500 7.5pt/1.6 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-muted); padding-left: 4pt; }
.crow.th span:first-child { padding-left: 0; }

.notes { flex: 1; min-height: 0.8in; display: flex; flex-direction: column; }
.notes .rules { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.notes .rules i { display: block; flex: 1; min-height: 0.3in; border-bottom: 0.5pt solid var(--line); }

.foot { position: absolute; left: 0.55in; right: 0.55in; bottom: 0.42in; font-size: 7.5pt; color: var(--t-muted); display: flex; justify-content: space-between; align-items: flex-end; }
.ruler { width: 1in; border-top: 0.5pt solid var(--t-muted); font-size: 6.5pt; color: var(--t-muted); text-align: center; line-height: 1.6; }
