/* ── Logged by Tucker ─────────────────────────────────────────────── */

:root {
  /* Declares that both themes are handled here. Without it Chrome's auto-dark
     mode force-repaints the page and flattens every background to one grey. */
  color-scheme: light dark;

  --bg:        #faf7f2;
  --surface:   #ffffff;
  --surface-2: #f2ede5;
  --ink:       #17140f;
  --ink-2:     #4a443c;
  --muted:     #685f55;
  --line:      #e4ddd2;
  /* --accent fills shapes; --accent-text is the darker tint used when the
     accent has to be readable *as text* on the page background (AA at 13px). */
  --accent:    #c8400b;
  --accent-text:#a83206;
  --accent-ink:#ffffff;

  --protein:   #d8452c;
  --carbs:     #eda033;
  --fat:       #5581c9;

  /* Cut vs bulk. Both are mixes of theme colours, so one definition covers
     light and dark — var() resolves at use, not here. */
  --phase-cut:  color-mix(in srgb, var(--ink) 24%, transparent);
  --phase-bulk: color-mix(in srgb, var(--accent) 55%, transparent);

  --radius:    14px;
  --radius-lg: 22px;
  --shadow:    0 1px 2px rgba(23,20,15,.05), 0 8px 24px -12px rgba(23,20,15,.12);
  --shadow-lg: 0 2px 4px rgba(23,20,15,.05), 0 24px 48px -24px rgba(23,20,15,.25);

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #12100e;
    --surface:   #1b1815;
    --surface-2: #232019;
    --ink:       #f6f2eb;
    --ink-2:     #cec6ba;
    --muted:     #948a7c;
    --line:      #2e2921;
    --accent:    #ff6a2b;
    --accent-text:#ff8552;
    --accent-ink:#1a1109;
    --protein:   #ef5f45;
    --carbs:     #f2b154;
    --fat:       #7ba0e0;
    --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -24px rgba(0,0,0,.8);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 82px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.05; letter-spacing: -.03em; margin: 0; font-weight: 800; }
p { margin: 0; }
a { color: inherit; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }

/* ── Nav ──────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in { display: flex; align-items: center; gap: 28px; height: 66px; }

.brand {
  display: flex; align-items: baseline; gap: 6px;
  text-decoration: none; font-weight: 800;
  letter-spacing: -.02em; font-size: 15px; white-space: nowrap;
}
.brand-mark { text-transform: uppercase; }
.brand-by { color: var(--muted); font-weight: 500; font-size: 12px; font-style: italic; }

.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  text-decoration: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500;
  transition: color .15s;
}
.nav-links a:hover { color: var(--accent-text); }

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid transparent; border-radius: 999px;
  padding: 12px 24px; font: inherit; font-weight: 650; font-size: 15px;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }
.btn-ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-text); filter: none; }

/* ── Social icon links ────────────────────────────────────────────── */

.nav-social { display: flex; align-items: center; gap: 8px; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
  transition: color .15s ease, background .15s ease,
              border-color .15s ease, transform .12s ease;
}
.social-btn svg { width: 18px; height: 18px; fill: currentColor; display: block; }
.social-btn:hover {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  transform: translateY(-1px);
}
.social-btn:active { transform: translateY(0); }
.social-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero { padding: 96px 0 72px; }

.eyebrow {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-text); margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(46px, 8.2vw, 92px);
  letter-spacing: -.045em;
}
.hero-sub {
  margin-top: 26px; max-width: 46ch;
  font-size: clamp(16.5px, 2vw, 19px); color: var(--ink-2);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* ── Stat strip ───────────────────────────────────────────────────── */

.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-in {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; padding-block: 30px;
}
.stat-n {
  font-family: var(--mono); font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
}
.stat-n small { font-size: .5em; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-l {
  font-size: 13px; color: var(--muted); margin-top: 4px;
  letter-spacing: .01em;
}

/* ── Sections ─────────────────────────────────────────────────────── */

.sec { padding: 84px 0; }
.sec-alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec-head { margin-bottom: 32px; }
.sec-title { font-size: clamp(30px, 4.6vw, 44px); }
.sec-sub { margin-top: 12px; color: var(--ink-2); max-width: 58ch; font-size: 16.5px; }

/* ── Controls ─────────────────────────────────────────────────────── */

.controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px;
  padding: 16px 20px; margin-bottom: 26px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sec-alt .controls { background: var(--bg); }
.ctrl { display: flex; align-items: center; gap: 10px; }
.ctrl-label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ctrl-label b { color: var(--ink); font-family: var(--mono); font-variant-numeric: tabular-nums; }

select {
  font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 9px; padding: 7px 10px; cursor: pointer;
}
.sec-alt select { background: var(--surface); }

input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 150px; height: 4px; border-radius: 3px;
  background: var(--line); cursor: pointer;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}
input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface);
  background: var(--accent);
}

.count { margin-left: auto; font-size: 13px; color: var(--muted); font-family: var(--mono); }
.empty { text-align: center; color: var(--muted); padding: 48px 0; }

/* ── Fuel log grid ────────────────────────────────────────────────── */

.log-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
}

.day {
  display: block; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 16px 14px;
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.sec-alt .day { background: var(--bg); }
.day:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.day-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.day-date {
  font-size: 12px; color: var(--muted); font-family: var(--mono);
  letter-spacing: .04em; text-transform: uppercase;
}
.day-phase {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px;
}
.day-phase--bulk {
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
}

.day-cal {
  font-family: var(--mono); font-size: 30px; font-weight: 700;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
  margin-top: 8px; line-height: 1;
}
.day-cal small { font-size: .42em; color: var(--muted); font-weight: 600; margin-left: 4px; }

.macro-bar {
  display: flex; height: 7px; border-radius: 4px; overflow: hidden;
  margin-top: 13px; background: var(--surface-2);
}
.macro-bar span { display: block; height: 100%; }
.macro-bar-lg { height: 11px; border-radius: 6px; margin-top: 18px; }

.day-macros {
  display: flex; gap: 12px; margin-top: 11px;
  font-family: var(--mono); font-size: 12.5px; font-variant-numeric: tabular-nums;
}
.day-macros span { display: flex; align-items: center; gap: 5px; color: var(--ink-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.dot-p { background: var(--protein); }
.dot-c { background: var(--carbs); }
.dot-f { background: var(--fat); }

.day-tag {
  display: inline-block; margin-top: 12px;
  font-size: 11px; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted);
}

/* ── Numbers ──────────────────────────────────────────────────────── */

.numbers-grid {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 18px;
}

.avg-card, .range-card, .chart-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 28px;
}
.avg-label, .range-label, .chart-title {
  font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); font-family: var(--mono);
}
.avg-cal {
  font-family: var(--mono); font-size: clamp(48px, 7vw, 68px); font-weight: 700;
  letter-spacing: -.045em; line-height: 1; margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.avg-cal small { font-size: .3em; color: var(--muted); font-weight: 600; margin-left: 6px; }

.avg-macros { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.avg-macros li {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 14.5px; font-variant-numeric: tabular-nums;
}
.avg-macros .m-name { color: var(--ink-2); min-width: 66px; }
.avg-macros .m-val { font-weight: 700; }
.avg-macros .m-pct { color: var(--muted); margin-left: auto; font-size: 13px; }

.avg-note { margin-top: 18px; font-size: 13.5px; color: var(--muted); }

.range-stack { display: grid; gap: 18px; align-content: start; }
.range-card { padding: 20px 24px; }
.range-val {
  font-family: var(--mono); font-size: 30px; font-weight: 700;
  letter-spacing: -.035em; margin-top: 6px; font-variant-numeric: tabular-nums;
}
.range-meta { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── Cutting vs bulking ───────────────────────────────────────────── */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.cmp-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px 24px 24px; box-shadow: var(--shadow);
}
.cmp-label {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.key {
  display: inline-block; width: 11px; height: 11px; border-radius: 3px;
  background: var(--phase-cut); flex: none;
}
.key-bulk { background: var(--phase-bulk); }
.cmp-range { font-size: 13px; color: var(--muted); margin-top: 7px; }
.cmp-cal {
  font-family: var(--mono); font-size: 38px; font-weight: 700;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums;
  margin: 14px 0 16px; line-height: 1;
}
.cmp-cal small { font-size: 15px; font-weight: 500; color: var(--muted); margin-left: 5px; }
.cmp-macros {
  list-style: none; display: flex; flex-wrap: wrap; gap: 7px 20px;
  margin-top: 15px; font-size: 14px; color: var(--ink-2);
}
.cmp-macros li { display: flex; align-items: center; gap: 7px; }
.cmp-note { grid-column: 1 / -1; font-size: 14.5px; color: var(--ink-2); }

.chart-card { margin-top: 18px; }
.chart {
  display: flex; align-items: stretch; gap: 2px;
  height: 210px; margin-top: 20px;
  overflow-x: auto; overflow-y: hidden;
}
/* Two bands: a fixed one for the dates, the rest for the bars — so every label
   sits on the same line instead of riding up and down with its bar. */
.chart-col {
  flex: 1 0 11px; min-width: 0;
  display: grid; grid-template-rows: 42px 1fr; align-items: end;
  text-decoration: none;
}
.chart-date {
  font-family: var(--mono); font-size: 9.5px; color: var(--muted);
  writing-mode: vertical-rl; transform: rotate(180deg);
  justify-self: center; padding-bottom: 5px;
  /* Rotated, the line box is the label's *width* — at the default line-height it
     is wider than the 13px a bar gets and neighbouring dates collide. */
  line-height: 1; letter-spacing: .02em; white-space: nowrap;
}
.chart-bar {
  border-radius: 3px 3px 0 0;
  background: var(--phase-bulk);
  transition: background .15s;
}
.chart-bar--cut { background: var(--phase-cut); }
.chart-col:hover .chart-bar,
.chart-col:focus-visible .chart-bar { background: var(--accent); }
.chart-col:hover .chart-date { color: var(--accent-text); }
.chart-legend {
  display: flex; gap: 20px; font-size: 12.5px; color: var(--muted); margin-top: 14px;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ── Cards (reviews / stack) ──────────────────────────────────────── */

.card-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
}
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(228px, 1fr)); margin-top: 26px; }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; text-decoration: none;
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.sec-alt .card { background: var(--bg); }
.card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
/* Shorts thumbnails come back pillarboxed inside a 16:9 frame, so a 9:16 box
   with object-fit:cover crops the padding away and recovers the real frame. */
.card-thumb {
  aspect-ratio: 9 / 16; width: 100%; object-fit: cover;
  background: var(--surface-2); display: block;
}
.card-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -.015em; line-height: 1.28; }
.card-meta {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px;
}
.pill {
  display: inline-block; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--accent-text);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 999px; padding: 3px 9px; width: fit-content;
}

/* ── Experiments ──────────────────────────────────────────────────── */

.exp-grid { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }

.exp {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform .14s ease, box-shadow .18s ease, border-color .18s ease;
}
.exp:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.exp-thumb { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--surface-2); }
.exp-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.exp-title { font-size: clamp(20px, 2.4vw, 25px); letter-spacing: -.03em; }
.exp-desc { color: var(--ink-2); font-size: 15.5px; }
.exp-meta {
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  margin-top: auto; padding-top: 10px; display: flex; gap: 12px;
}

/* ── Day page ─────────────────────────────────────────────────────── */

.day-main { padding: 40px 24px 84px; }

.back {
  display: inline-block; text-decoration: none; color: var(--muted);
  font-size: 14px; margin-bottom: 28px;
}
.back:hover { color: var(--accent-text); }

.day-hero {
  display: grid; grid-template-columns: 360px minmax(0, 470px);
  gap: 48px; align-items: start;
}

.embed {
  position: relative; aspect-ratio: 9 / 16; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: #000; border: 1px solid var(--line);
}
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.day-video-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.day-video-note a { color: var(--accent-text); text-decoration: none; white-space: nowrap; }
.day-video-note a:hover { text-decoration: underline; }

.day-h1 { font-size: clamp(32px, 5vw, 50px); }

.date-note {
  margin-top: 10px; font-size: 13px; color: var(--muted);
  border-left: 2px solid var(--line); padding-left: 10px; max-width: 42ch;
}

.day-meta {
  margin-top: 10px; font-size: 14px; color: var(--muted); letter-spacing: .01em;
}

.day-total {
  font-family: var(--mono); font-size: clamp(52px, 8vw, 76px); font-weight: 700;
  letter-spacing: -.045em; line-height: 1; margin-top: 24px;
  font-variant-numeric: tabular-nums;
}
.day-total small { font-size: .28em; color: var(--muted); font-weight: 600; margin-left: 7px; }

.day-macro-list { margin-top: 22px; }
.day-targets { margin-top: 16px; font-size: 14px; color: var(--ink-2); }
.day-vs { margin-top: 6px; font-size: 14px; color: var(--muted); }

/* ── Lifts ────────────────────────────────────────────────────────── */

.lifts {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px 8px;
}
.lifts-head {
  font-family: var(--mono); font-size: 12px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.lift-table { width: 100%; border-collapse: collapse; }
.lift-table td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.lift-table tr:last-child td { border-bottom: 0; }
.lift-name { font-size: 15px; font-weight: 600; }
.lift-pr {
  margin-left: 8px; font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .06em; color: var(--accent-ink); background: var(--accent);
  border-radius: 4px; padding: 2px 5px; vertical-align: 1px;
}
.lift-sets {
  font-family: var(--mono); font-size: 13.5px; color: var(--ink-2);
  text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  .lift-table td { display: block; border-bottom: 0; padding: 8px 0 0; }
  .lift-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .lift-sets { text-align: left; padding-top: 3px !important; }
}

.dblocks {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-top: 28px;
}
.dblock {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 17px;
}
.dblock-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.dblock-val { font-size: 16px; font-weight: 650; margin-top: 6px; letter-spacing: -.01em; }
.dblock-sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.sec-block { margin-top: 72px; }
.sec-block .sec-title { margin-bottom: 24px; }

.pending {
  color: var(--muted); font-size: 15.5px;
  background: var(--surface); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 22px 24px;
}

.meals { display: grid; gap: 14px; }
.meal {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px 8px;
}
.meal-head {
  display: flex; align-items: baseline; gap: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.meal-name { font-size: 17px; letter-spacing: -.02em; }
.meal-time { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.meal-cal {
  margin-left: auto; font-family: var(--mono); font-size: 13px;
  color: var(--muted); font-variant-numeric: tabular-nums;
}

.meal-items { width: 100%; border-collapse: collapse; }
.meal-items td { padding: 11px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.meal-items tr:last-child td { border-bottom: 0; }
.mi-emoji {
  width: 34px; font-size: 19px; line-height: 1;
  text-align: left; vertical-align: middle;
}
.mi-food { font-size: 15px; }
.mi-qty { color: var(--muted); font-size: 13px; margin-left: 8px; }
.mi-cal {
  font-family: var(--mono); font-size: 14px; text-align: right;
  white-space: nowrap; width: 78px; font-variant-numeric: tabular-nums;
}
.mi-macros {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  text-align: right; white-space: nowrap; width: 130px;
}
.meals-note { margin-top: 14px; font-size: 13px; color: var(--muted); }

.day-nav {
  display: flex; gap: 14px; margin-top: 64px;
  padding-top: 28px; border-top: 1px solid var(--line);
}
.daynav {
  display: flex; flex-direction: column; gap: 3px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 15px 20px; min-width: 190px;
  transition: transform .14s ease, border-color .18s ease;
}
.daynav:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.daynav-next { margin-left: auto; text-align: right; }
.daynav-dir {
  font-family: var(--mono); font-size: 11px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.daynav-date { font-weight: 700; letter-spacing: -.02em; }
.daynav-cal {
  font-family: var(--mono); font-size: 12.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .day-hero { grid-template-columns: 1fr; gap: 30px; }
  .embed { max-width: 330px; }
  .sec-block { margin-top: 52px; }
  .day-nav { flex-direction: column; }
  .daynav-next { margin-left: 0; text-align: left; }
}

@media (max-width: 560px) {
  .day-main { padding: 28px 18px 62px; }
  .mi-macros { display: none; }
  .embed { max-width: none; }
}

/* ── Footer ───────────────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--line); padding: 52px 0 40px; background: var(--surface); }
.foot-in {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 32px; flex-wrap: wrap;
}
.foot-brand { font-weight: 800; letter-spacing: -.02em; }
.foot-brand span { color: var(--muted); font-weight: 500; font-style: italic; font-size: 13px; }
.foot-note { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; color: var(--ink-2); font-size: 14.5px; }
.foot-links a:hover { color: var(--accent-text); }
.disclaimer {
  margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); max-width: 66ch;
}

/* ── Responsive ───────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .numbers-grid, .exp-grid, .compare { grid-template-columns: 1fr; }
  .strip-in { grid-template-columns: repeat(2, 1fr); gap: 20px 24px; }
  .nav-links { display: none; }
  /* nav-links carried the auto margin that pushed the right side over. */
  .nav-social { margin-left: auto; }
  .hero { padding: 64px 0 52px; }
  .sec { padding: 62px 0; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .log-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; }
  /* 9:16 thumbs get very tall in one column — keep two across on phones. */
  .card-grid, .card-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-title { font-size: 14px; }
  .card-body { padding: 12px 12px 14px; }
  .day { padding: 13px; }
  .day-cal { font-size: 25px; }
  .day-macros { gap: 8px; font-size: 11.5px; }
  .controls { gap: 12px; padding: 14px; }
  .count { margin-left: 0; width: 100%; }
  /* 77 bars across a phone is ~4px each — no room for a legible date. */
  .chart { height: 130px; gap: 1px; }
  /* Let them shrink to fit rather than scroll — with no labels it reads as a
     sparkline, and 4px bars aren't a tap target worth scrolling for. */
  .chart-col { flex: 1 1 0; grid-template-rows: 1fr; }
  .chart-date { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
