/* Production overrides — strip the designer's 360×780 phone frame so the
   app fills the actual device viewport. styles.css ships unchanged so a
   future designer-canvas review reproduces the original render. */

:root {
  /* In-gym type scale (client-zero formatting pass). Hierarchy: data
     (18-22px mono 500, ink) > names (20px sans 600) > dose (15px mono) >
     meta/eyebrows (10-11px mono ink-3). Nothing read mid-set goes below
     15px or lighter than ink-2. Loaded weights cap at sans 600 / mono 500. */
  --t-ex-name: 20px;
  --t-dose: 15px;
  --t-data: 18px;
  --t-data-ramp: 15px;
  --t-num-lg: 22px;
  --t-meta: 11px;
  --t-label: 10px;
  --row-h: 48px;
  --row-h-ramp: 40px;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

body {
  /* iOS safe-area: respect the notch + home indicator. */
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
}

#root {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Mobile-first PWA — phone-shaped column. On a wider viewport (desktop
   browser, iPad landscape) we constrain to a phone-ish width so the
   layout matches the design intent. 420px is wide enough for a Pro Max,
   narrow enough that two thumbs can still reach the tab bar. */
.app-shell,
.app-shell-chromeless {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  padding: 0 var(--pad);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  padding-bottom: 64px;  /* room for the fixed tab bar */
  /* No overflow here: the DOCUMENT is the scroll container (the shell is
     min-height, not height). An overflow-y:auto that never actually
     scrolled would become the resolution root for position:sticky — so
     .session-topbar would scroll away with the page — and would force an
     overflow-x clip that cuts the topbar's edge bleed. */
  min-height: 0;
}

/* Tab bar pinned to viewport bottom on phones, but constrained inside the
   max-width column on desktop so it lines up with the body content. */
.app-shell .tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  background: var(--paper);
  border-top: 1px solid var(--hair);
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
}

/* Tabs are tap targets in production — bigger hit area than the canvas had. */
.app-shell .tab {
  padding: 8px 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Buttons are tappable. */
.btn {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

/* Wordmark — uses Iowan Old Style serif italic. The trace7_logos_v5
   exploration is the source of truth; dx=2 is the picked balance. */
.t7-wordmark-svg {
  display: block;
  margin: 0 auto;
  color: var(--ink);
}

/* Markdown-rendered Boundaries body. Mirrors the designer's .bnd-h2 /
   .bnd-body hooks for parity with the canvas render. */
.md-rendered h2 {
  font-family: var(--body);
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 8px 0;
  letter-spacing: -0.01em;
}
.md-rendered h2:first-child { margin-top: 8px; }
.md-rendered p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 12px 0;
}
.md-rendered ul {
  list-style: none;
  padding-left: 0;
  margin: 0 0 16px 0;
}
.md-rendered li {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  padding-left: 18px;
  position: relative;
  margin: 4px 0;
}
.md-rendered li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--ink-3);
}
.md-rendered code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--paper-2);
  padding: 1px 4px;
  border-radius: 3px;
}

/* The designer set .tagline italic in styles.css; user feedback was that
   the italic reads off on the auth screen. Override to upright — keeps
   the wordmark as the only italic surface, which is the brand intent. */
.tagline {
  font-style: normal;
}

/* Inline error/loading states. Quiet — no spinners. */
.app-loading,
.app-error {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: lowercase;
}

/* The weekly safety-flag card on the Now tab. */
.safety-card {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.safety-card .sf-eb {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: lowercase;
  margin-bottom: 8px;
}
.safety-card .sf-q {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
}
.safety-card textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--body);
  /* iOS Safari auto-zooms on focus when font-size < 16px. Match all
     three textareas in the app for the same reason. */
  font-size: 16px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
  min-height: 64px;
  margin-bottom: 10px;
}
.safety-card .sf-actions {
  display: flex;
  gap: 8px;
}
.safety-card .sf-sent {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 8px;
}

/* ─────────────────────────────────────────────────────────────
   Slice 4b — session-logging flow
   ───────────────────────────────────────────────────────────── */

.hero-done {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  padding: 8px 0;
}

.ex-card {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.ex-card-title {
  font-size: var(--t-ex-name);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.ex-pair-tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent, var(--rust));
  letter-spacing: 0.06em;
  margin-right: 8px;
  vertical-align: 3px;
}
.ex-card-dose {
  font-family: var(--mono);
  font-size: var(--t-dose);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.ex-card-meta {
  font-family: var(--mono);
  font-size: var(--t-meta);
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
}
.pair-group {
  margin: 16px 0;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--paper);
  overflow: hidden;
}
.pair-group-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-transform: lowercase;
  letter-spacing: 0.05em;
}
.ex-card-grouped {
  margin: 0;
  border: none;
  border-radius: 0;
}
.ex-card-grouped + .ex-card-grouped {
  border-top: 1px solid var(--hair);
}
.precheck-block {
  margin: 18px 0 4px;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
}
.precheck-eb {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 8px;
}
.precheck-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 9px 0;
  background: none;
  border: none;
  border-bottom: 1px solid var(--hair);
  cursor: pointer;
  text-align: left;
}
.precheck-name {
  font-family: var(--body);
  font-size: 14px;
  color: var(--ink);
}
.precheck-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.precheck-sheet {
  padding: 10px 0 4px;
}
.precheck-pos {
  margin-bottom: 10px;
}
.precheck-pos-label {
  font-size: 12.5px;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.precheck-seg {
  display: flex;
  gap: 6px;
}
.precheck-seg button {
  flex: 1;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: lowercase;
  padding: 8px 0;
  min-height: 36px;
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 4px;
  color: var(--ink-3);
  cursor: pointer;
}
.precheck-seg button.on {
  border-color: var(--ink-2);
  color: var(--ink);
}
.precheck-note {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--body);
  font-size: 16px;
  padding: 9px 10px;
  margin: 4px 0 10px;
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
}
.precheck-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 6px;
}

/* Items/intervals display cards — warm-up, cool-down, the gym-day swim. */
.block-card {
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--paper);
}
.block-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.block-card-meta {
  font-family: var(--mono);
  font-size: var(--t-meta);
  font-weight: 400;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.block-items {
  margin: 8px 0 0;
  padding-left: 18px;
}
.block-items li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
  margin-bottom: 4px;
}
.interval {
  margin-top: 10px;
}
.interval-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.interval-target {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
  text-transform: lowercase;
}
.interval-cue {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-2);
  margin-top: 4px;
}

.up-next {
  margin: 14px 2px 0;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-2);
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

/* Carry-over: a recent session that never got completed. */
.outstanding-card {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--hair);
  border-left: 2px solid var(--accent, var(--rust));
  border-radius: var(--radius-sm);
  background: var(--paper-2);
}
.outstanding-eb {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent, var(--rust));
  text-transform: lowercase;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 5px;
}
.outstanding-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.outstanding-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.outstanding-hint {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  text-transform: lowercase;
}

/* Readiness — hairline-bound metric band, numbers prominent. */
.readiness {
  margin: 14px 0 4px;
  padding: 12px 0;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.readiness-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.readiness-eb {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.06em;
}
.readiness-asof {
  font-family: var(--mono);
  font-size: var(--t-label);
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
/* The interpreted read — the synthesis line the strip now leads with.
   Sized as the most prominent text in the strip (it's the meaning; the
   chips below are the supporting evidence). */
.readiness-read {
  margin-top: 10px;
}
.rd-read-lead {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.rd-read-note {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}
/* Chips: one row per signal — label · read · number. Numbers right-align on
   a tabular column so hrv/rhr/tsb stack into a clean register. */
.readiness-chips {
  margin-top: 12px;
}
.rd-chip {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.01em;
}
.rd-chip + .rd-chip {
  border-top: 1px solid var(--hair);
}
.rd-k {
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.06em;
}
.rd-v {
  color: var(--ink-2);
  text-transform: lowercase;
}
.rd-detail {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 10px;
}
.rd-n {
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rd-n.warn {
  color: var(--accent, var(--rust));
}
.rd-unit {
  font-size: 10px;
  font-weight: 400;
  color: var(--ink-3);
  margin-left: 2px;
}
.readiness-stale {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--rust, #7a4a2e);
  margin-top: 8px;
}

.ex-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.ex-card-head-main {
  flex: 1;
  min-width: 0;
}
.ex-thumb {
  flex: none;
  width: 72px;
  height: 54px;
  position: relative;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 4px;
  overflow: hidden;
  background: var(--paper-2);
  cursor: pointer;
}
.ex-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Two cacheable JPEGs flip like the classic 2-frame exercise gif (owner
   preference: the flip stays). Tap-expanded photos show both frames side
   by side instead. */
.ex-thumb-frame2 {
  animation: ex-flip 2.4s steps(1) infinite;
}
@keyframes ex-flip {
  0%, 49.9% { opacity: 0; }
  50%, 100% { opacity: 1; }
}
/* Theme experiment: settle photos toward the cream/charcoal palette.
   Softened from full grayscale — at thumb size a heavy duotone turned the
   photo into a murky rectangle and destroyed the form information. */
.ex-photo-duotone,
.ex-photo-duotone img {
  filter: grayscale(0.55) sepia(0.1) contrast(1.02);
}
.ex-photos {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.ex-photos img {
  width: calc(50% - 4px);
  border: 1px solid var(--hair);
  border-radius: 4px;
}
.ex-card-cue {
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-2);
  margin-top: 6px;
}
.set-note {
  display: block;
  font-size: 10px;
  font-family: var(--mono);
  letter-spacing: 0.03em;
  color: var(--ink-3);
  line-height: 1.2;
  max-width: 100%;
  overflow: hidden;
}
.set-grid {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.set-grid-head,
.set-row {
  display: grid;
  /* minmax(0,…) caps the columns at their fraction of the track — without it
     the inputs' large intrinsic min-width blows the grid past narrow
     viewports (375pt iPhone mini) and pushes the rpe column off-screen.
     Column 1 is FIXED — content must never widen it (the ramp-note squish). */
  grid-template-columns: 36px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 8px;
  align-items: center;
  /* Head and rows must carry identical horizontal padding or the header
     labels drift off the cell columns beneath them. */
  padding: 0;
}
/* Long override notes get their own full-width row above the set — the
   decision note is prominent instead of strangling the number column. */
.set-hint {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-2);
  padding: 2px 0 2px 8px;
  border-left: 2px solid var(--accent, var(--rust));
}
.set-grid-head {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: lowercase;
  padding-bottom: 4px;
}
.set-grid-head span:not(:first-child) {
  text-align: center;
}
.set-n {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-2);
  padding-left: 6px;
}
.set-check {
  color: var(--accent, var(--rust));
  margin-left: 4px;
  font-size: 11px;
}
.set-cell {
  font-family: var(--mono);
  /* 18px mono tabular — the numbers are the interface; iOS also needs
     >=16px to avoid auto-zoom-on-focus. */
  font-size: var(--t-data);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 8px 2px;
  min-height: var(--row-h);
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.set-cell::placeholder {
  color: var(--ink-4);
  font-weight: 400;
}
/* RPE tap-cycle — a button styled as a cell; empty state reads as ghost. */
.set-cell-rpe {
  cursor: pointer;
}
.set-row:not(.set-row-done) .set-cell-rpe {
  color: var(--ink-3);
}
.set-cell:focus {
  outline: none;
  border-color: var(--accent, var(--rust));
}
/* Seeded — carried-forward proposal, not yet a real set. */
.set-row-seeded .set-cell {
  border-style: dashed;
  color: var(--ink-3);
  font-weight: 400;
}
/* Committed — the input chrome dissolves into a typeset record. Border
   stays 1px (transparent) so nothing shifts. */
.set-row-done .set-cell {
  background: transparent;
  border-color: transparent;
  color: var(--ink);
  font-weight: 500;
}
.set-row-done .set-n {
  color: var(--ink);
}
/* Ramp — lighter prelude; the work sets are the headline. */
.set-row-ramp .set-cell {
  min-height: var(--row-h-ramp);
  font-size: var(--t-data-ramp);
  padding: 6px 2px;
}
.set-row-ramp .set-n {
  color: var(--ink-3);
}
.set-row-ramp.set-row-done .set-cell {
  color: var(--ink-2);
}
.set-row-ramp + .set-row:not(.set-row-ramp) {
  margin-top: 8px;
}

/* Sticky rest timer pinned above the tab bar. */
.rest-strip {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(64px + env(safe-area-inset-bottom));
  width: 100%;
  max-width: 420px;
  background: var(--paper-2);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  padding: 8px var(--pad) 10px;
  box-sizing: border-box;
  z-index: 5;
}
.rest-bar {
  height: 2px;
  background: var(--hair);
  border-radius: 2px;
  overflow: hidden;
}
.rest-bar-fill {
  height: 100%;
  background: var(--accent, var(--rust));
  transition: width 1s linear;
}
.rest-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
}
.rest-time {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
}
.rest-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.08em;
  flex: 1;
}

/* Reflection screen */
.reflect-q {
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 16px;
}
.rating-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.rating-btn {
  font-family: var(--body);
  font-size: 16px;
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 14px 0;
  cursor: pointer;
  color: var(--ink-2);
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}
.rating-btn-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.rating-labels {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  margin-top: 6px;
  padding: 0 4px;
}
.reflect-note,
.reflect-flag-note {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
  min-height: 72px;
}
.reflect-flag {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
  line-height: 1.5;
}
.reflect-flag input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
}
.reflect-flag-note {
  margin-top: 8px;
  min-height: 56px;
}
.reflect-saved {
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}

/* Nutrition capture */
.nutrition-capture {
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--paper);
}
.nutrition-capture textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--hair);
  border-radius: 4px;
  padding: 10px;
  resize: vertical;
  min-height: 72px;
}
.slider-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.slider-eb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  text-transform: lowercase;
}
.slider-row input[type="range"] {
  width: 100%;
  accent-color: var(--accent, var(--rust));
}
.slider-ends {
  grid-column: 2 / 3;
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}
.capture-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.capture-saved,
.capture-error {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.capture-error { color: var(--accent, var(--rust)); }

.nutrition-permission {
  font-family: var(--body);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 14px;
  line-height: 1.5;
}
.nutrition-empty {
  font-family: var(--body);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
  margin-top: 12px;
}
.nutrition-recent {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
}
.nutr-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hair);
}
.nutr-row:last-child { border-bottom: none; }
.nutr-date {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: lowercase;
  padding-top: 2px;
}
.nutr-text {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}
.nutr-marks {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  display: flex;
  gap: 10px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────────────────────────
   Session navigation — activeLog lives at Authed; the in-session
   flow gets a sticky escape hatch back to the Now feed.
   ───────────────────────────────────────────────────────────── */

.session-topbar {
  position: sticky;
  /* Sticky resolves against the document (see .app-body). top must clear
     the notch — body's safe-area padding only offsets the unpinned
     position, not the pinned one. */
  top: env(safe-area-inset-top, 0px);
  z-index: 6;
  display: flex;
  align-items: center;
  /* Bleed over app-body's top padding and the shell's gutters so the
     hairline runs edge to edge while content scrolls under it. */
  margin: -16px calc(-1 * var(--pad)) 8px;
  padding: 8px var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--hair);
}
.session-back {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  background: none;
  border: none;
  padding: 8px 12px 8px 0;
  cursor: pointer;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  -webkit-tap-highlight-color: transparent;
}

/* ─────────────────────────────────────────────────────────────
   WEEK TAB — full week at a glance
   ───────────────────────────────────────────────────────────── */
.week-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--hair);
}
.week-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--hair);
  position: relative;
}
.week-row-past { opacity: 0.55; }
.week-row-today {
  background: var(--accent-soft);
  margin: 0 -10px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border-bottom-color: transparent;
}
.week-row-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.week-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 34px;
  font-family: var(--mono);
  padding-top: 1px;
}
.week-wd {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.week-dd {
  font-size: 18px;
  color: var(--ink);
  line-height: 1.25;
}
.week-row-today .week-dd { color: var(--accent); }
.week-body { flex: 1; min-width: 0; }
.week-sess + .week-sess { margin-top: 8px; }
.week-title {
  display: block;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.35;
}
.week-rest {
  font-size: 14px;
  color: var(--ink-3);
  font-style: italic;
}
.week-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
  align-items: center;
}
.week-kind {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--hair-2);
  border-radius: 4px;
  padding: 1px 6px;
}
.week-dur {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.week-done {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
}
.week-nowtag {
  align-self: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--accent);
  border-radius: 4px;
  padding: 2px 7px;
}
.week-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  font-family: var(--mono);
}
