/* ============================================================
   Mise — design tokens
   Instrument, not cookbook. Warm paper, ink, one signal.
   ============================================================ */

:root {
  /* Surfaces — warm-tinted neutrals, never pure white */
  --paper:        oklch(98.6% 0.004 75);
  --paper-sunk:   oklch(96.0% 0.006 75);
  --paper-raised: oklch(99.6% 0.003 75);

  /* Lines */
  --line:         oklch(90.0% 0.007 75);
  --line-strong:  oklch(80.0% 0.010 75);

  /* Ink — warm near-black, never #000 */
  --ink:          oklch(22% 0.012 70);
  --ink-2:        oklch(47% 0.010 70);
  --ink-3:        oklch(63% 0.008 70);

  /* Signal — the one accent */
  --signal:       oklch(63% 0.180 45);
  --signal-deep:  oklch(45% 0.145 45);
  --signal-wash:  oklch(95% 0.030 45);

  --danger:       oklch(53% 0.190 25);
  --danger-wash:  oklch(95.5% 0.028 25);

  /* Macro hues — protein carries the accent on purpose */
  --m-protein:    oklch(63% 0.180 45);
  --m-carb:       oklch(68% 0.125 128);
  --m-fat:        oklch(60% 0.100 248);

  /* Type */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Motion — ease-out-quint, no bounce */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms;
  --base: 260ms;
  --slow: 420ms;

  /* Chrome */
  --tabbar-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ============================================================ reset */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  /* standalone webapp: no text selection callouts on chrome */
  -webkit-touch-callout: none;
}

/* [hidden] must beat every display rule below it, or elements with an
   explicit display (.sheet, .tabbar) refuse to hide. */
[hidden] { display: none !important; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
}
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* every number in this app is tabular */
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ============================================================ app shell */

#app {
  min-height: 100dvh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}

.view { display: none; }
.view.is-active { display: block; }

/* ---- header: title sits left, never centered ---- */

.vhead {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(var(--safe-t) + 14px) 18px 10px;
  background: color-mix(in oklch, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--fast) linear;
}
.vhead.is-stuck { border-bottom-color: var(--line); }

.vhead-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.vtitle {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.024em;
  line-height: 1.05;
}

/* ---- search ---- */

.search {
  margin: 10px 18px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  background: var(--paper-sunk);
  border-radius: 10px;
  color: var(--ink-3);
}
.search input {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search svg { flex: none; }

/* ============================================================ rows
   Hairline-separated rows. No cards. Cards are the lazy answer.
   ============================================================ */

.rows { padding: 4px 0 28px; }

.row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 18px;
  text-align: left;
  transition: background var(--fast) linear, transform var(--fast) var(--ease);
}
.row + .row::before {
  content: "";
  position: absolute;
  top: 0; left: 18px; right: 0;
  height: 1px;
  background: var(--line);
}
.row:active { background: var(--paper-sunk); transform: scale(0.988); }

.row-main { flex: 1; min-width: 0; }
.row-title {
  font-size: 17px;
  font-weight: 550;
  letter-spacing: -0.012em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row-sub .num { font-size: 12.5px; }
.row-end {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-3);
}
.row-kcal {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.row-kcal span { font-size: 10.5px; font-weight: 500; color: var(--ink-3); margin-left: 2px; }

/* staggered mount */
.rows .row { animation: rowin var(--base) var(--ease) backwards; animation-delay: calc(var(--i, 0) * 18ms); }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } }

/* ---- section label ---- */

.slabel {
  position: sticky;
  top: calc(var(--safe-t) + 58px);
  z-index: 10;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 6px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.slabel .num { font-size: 11.5px; letter-spacing: 0; color: var(--ink-3); }
#v-log .slabel { top: calc(var(--safe-t) + 57px); }
#v-list .slabel { position: static; }

/* ============================================================ macro bar */

.mbar {
  display: flex;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--paper-sunk);
}
.mbar i { display: block; transition: flex-basis var(--slow) var(--ease); }
.mbar .p { background: var(--m-protein); }
.mbar .c { background: var(--m-carb); }
.mbar .f { background: var(--m-fat); }

.mlegend {
  display: flex;
  gap: 14px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-2);
}
.mlegend b { font-weight: 600; color: var(--ink); }
.mlegend i { font-style: normal; }
.mlegend .k { display: inline-block; width: 7px; height: 7px; border-radius: 2px; margin-right: 5px; vertical-align: 1px; }
.k-p { background: var(--m-protein); }
.k-c { background: var(--m-carb); }
.k-f { background: var(--m-fat); }

/* ---- the day totals strip (elevation is functional here) ---- */

.totals {
  margin: 8px 18px 4px;
  padding: 14px 16px 13px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 1px 2px oklch(22% 0.012 70 / 0.04), 0 8px 24px -12px oklch(22% 0.012 70 / 0.10);
}
.totals-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}
.totals-kcal {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 27px;
  font-weight: 620;
  letter-spacing: -0.035em;
  line-height: 1;
}
.totals-kcal span { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.totals-day { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.totals .mbar { margin-bottom: 9px; }

/* ============================================================ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform var(--fast) var(--ease), background var(--fast) linear, opacity var(--fast) linear;
}
.btn:active { transform: scale(0.972); }
.btn[disabled] { opacity: 0.38; pointer-events: none; }

.btn-primary { background: var(--signal); color: oklch(99% 0.01 75); }
.btn-ghost { background: var(--paper-sunk); color: var(--ink); }
.btn-quiet { color: var(--signal-deep); padding: 0 6px; height: 34px; font-size: 15px; }
.btn-danger { background: var(--danger-wash); color: var(--danger); }
.btn-wide { width: 100%; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  margin: -6px -6px -6px 0;
  border-radius: 9px;
  color: var(--ink-3);
  transition: background var(--fast) linear, transform var(--fast) var(--ease), color var(--fast) linear;
}
.btn-icon:active { background: var(--paper-sunk); transform: scale(0.9); }

/* header add button */
.add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--signal);
  color: oklch(99% 0.01 75);
  transition: transform var(--fast) var(--ease);
}
.add-btn:active { transform: scale(0.88); }

/* ============================================================ empty + skeleton */

.empty {
  padding: 72px 34px 40px;
  text-align: center;
}
.empty-mark {
  display: block;
  margin: 0 auto 18px;
  color: var(--line-strong);
}
.empty h3 {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.018em;
  margin-bottom: 6px;
}
.empty p {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 34ch;
  margin: 0 auto 20px;
}

.skel { padding: 6px 18px; }
.skel-row {
  height: 17px;
  border-radius: 5px;
  margin: 17px 0;
  background: linear-gradient(100deg, var(--paper-sunk) 30%, oklch(98% 0.005 75) 50%, var(--paper-sunk) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.4s linear infinite;
}
.skel-row:nth-child(2n) { width: 62%; }
.skel-row:nth-child(3n) { width: 78%; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -150% 0; } }

/* ============================================================ tab bar */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: color-mix(in oklch, var(--paper) 84%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--ink-3);
  transition: color var(--fast) linear;
}
.tab span {
  font-size: 10.5px;
  font-weight: 560;
  letter-spacing: 0.005em;
}
.tab svg { transition: transform var(--base) var(--ease); }
.tab:active svg { transform: scale(0.86); }
.tab.is-active { color: var(--signal-deep); }
.tab.is-active svg { transform: translateY(-1px); }

.tab-badge {
  position: absolute;
  transform: translate(13px, -9px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--signal);
  color: oklch(99% 0.01 75);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
}

/* ============================================================ sheet
   Bottom sheet, not a centered modal. Correct affordance on a phone.
   ============================================================ */

.scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: oklch(22% 0.012 70 / 0.34);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--base) linear;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -1px 0 var(--line), 0 -20px 60px -20px oklch(22% 0.012 70 / 0.28);
  transform: translateY(101%);
  transition: transform var(--slow) var(--ease);
  will-change: transform;
}
.sheet.is-open { transform: translateY(0); }

.sheet-grab {
  flex: none;
  width: 36px; height: 4px;
  margin: 8px auto 0;
  border-radius: 2px;
  background: var(--line-strong);
}
/* Three columns, not space-between: the title stays centred whether or
   not the confirm button is present. */
.sheet-head {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.sheet-head > :first-child { justify-self: start; }
.sheet-head > :last-child { justify-self: end; }
.sheet-title {
  grid-column: 2;
  text-align: center;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.016em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(18px + var(--safe-b));
  overscroll-behavior: contain;
}

/* ============================================================ forms */

.field { margin: 16px 0; }
.field > label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 640;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field .hint {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-3);
}
/* also used on its own inside sheet bodies, not just under a field */
.err {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 540;
  line-height: 1.45;
  color: var(--danger);
}
.field .err { font-size: 12.5px; font-weight: 550; }

.input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  background: var(--paper-sunk);
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 16.5px;
  transition: border-color var(--fast) linear, background var(--fast) linear;
}
.input:focus {
  outline: none;
  background: var(--paper-raised);
  border-color: var(--signal);
}
.input.is-bad { border-color: var(--danger); background: var(--danger-wash); }
.input::placeholder { color: var(--ink-3); }
textarea.input { height: auto; min-height: 104px; padding: 12px 13px; line-height: 1.5; resize: vertical; }
input.input.num, .input .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* 4-up macro grid — protein/carbs/fat/kcal.
   Four cells across a phone leaves very little room, and real label values
   run to four characters (536 kcal), so this grid tightens the suffix and
   the padding rather than clipping the number. */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.grid4 .unit .input { padding: 0 22px 0 9px; font-size: 15px; }
.grid4 .unit::after { right: 7px; font-size: 9.5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.unit {
  position: relative;
}
.unit .input { padding-right: 34px; }
.unit::after {
  content: attr(data-unit);
  position: absolute;
  right: 11px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  pointer-events: none;
}

/* segmented control */
.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 2px;
  padding: 2px;
  background: var(--paper-sunk);
  border-radius: 10px;
}
.seg button {
  height: 32px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--ink-2);
  transition: background var(--fast) linear, color var(--fast) linear;
}
.seg button.is-on {
  background: var(--paper-raised);
  color: var(--ink);
  box-shadow: 0 1px 3px oklch(22% 0.012 70 / 0.10);
}

/* ============================================================ ingredient lines (in recipe/log editor) */

.iline {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
}
.iline + .iline::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--line);
}
.iline-main { flex: 1; min-width: 0; }
.iline-name { font-size: 15.5px; font-weight: 520; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.iline-macro {
  margin-top: 1px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--ink-3);
}
.iline .gin {
  flex: none;
  width: 78px;
  height: 36px;
  padding: 0 26px 0 9px;
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  background: var(--paper-sunk);
  border: 1px solid transparent;
  border-radius: 9px;
}
.iline .gin:focus { outline: none; background: var(--paper-raised); border-color: var(--signal); }
.gwrap { position: relative; flex: none; }
.gwrap::after {
  content: "g";
  position: absolute;
  right: 9px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-3);
  pointer-events: none;
}

/* typeahead */
.ta-row { display: flex; align-items: flex-start; gap: 8px; }
.ta-row .ta { flex: 1; min-width: 0; }
.ta-scan {
  flex: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 11px;
}
.ta { position: relative; }
.ta-list {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  z-index: 5;
  max-height: 208px;
  overflow-y: auto;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: 0 10px 30px -10px oklch(22% 0.012 70 / 0.22);
  animation: rowin var(--fast) var(--ease);
}
.ta-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 13px;
  text-align: left;
  font-size: 15.5px;
}
.ta-item + .ta-item { border-top: 1px solid var(--line); }
.ta-item:active { background: var(--paper-sunk); }
.ta-item em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.ta-item.is-new { color: var(--signal-deep); font-weight: 600; }

/* ============================================================ grocery check */

.check {
  flex: none;
  width: 23px; height: 23px;
  border: 1.75px solid var(--line-strong);
  border-radius: 7px;
  transition: background var(--fast) linear, border-color var(--fast) linear, transform var(--fast) var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.check:active { transform: scale(0.85); }
.row.is-done .check { background: var(--signal); border-color: var(--signal); color: oklch(99% 0.01 75); }
.row.is-done .row-title { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1.25px; }
.check svg path { stroke-dasharray: 20; stroke-dashoffset: 20; }
.row.is-done .check svg path { animation: draw 280ms var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ============================================================ detail sheet bits */

.dstat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 14px 0 18px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.dstat > div { padding: 11px 8px 10px; background: var(--paper); text-align: center; }
.dstat b {
  display: block;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 620;
  letter-spacing: -0.03em;
}
.dstat span {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  font-weight: 620;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.dstat .p b { color: var(--m-protein); }
.dstat .c b { color: var(--m-carb); }
.dstat .f b { color: var(--m-fat); }

.dhead {
  margin: 22px 0 8px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.steps { counter-reset: s; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 10px 0 10px 32px;
  font-size: 15.5px;
  line-height: 1.5;
}
.steps li + li { border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0; top: 11px;
  width: 21px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 620;
  color: var(--signal-deep);
  text-align: center;
}

/* ============================================================ toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 36px);
  padding: 10px 15px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 540;
  box-shadow: 0 10px 30px -8px oklch(22% 0.012 70 / 0.4);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--base) var(--ease), opacity var(--base) linear;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* Sync state is silent when healthy. The bar shows up only when there
   is something the user would actually want to know. */
.syncbar {
  position: fixed;
  left: 12px; right: 12px;
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px);
  z-index: 55;
  padding: 7px 12px;
  border-radius: 9px;
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 540;
  color: var(--ink-2);
  text-align: center;
  animation: rowin var(--base) var(--ease);
}

/* ============================================================ a11y */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    transition-duration: 1ms !important;
  }
}

.sr {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ============================================================
   Lifting — added with the Today / Train restructure
   ============================================================ */

.vhead-title { min-width: 0; }
.vsub {
  margin-top: 1px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -0.005em;
}
.head-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.head-actions .btn-icon { margin: 0; }
.head-actions .btn-icon[disabled] { opacity: 0.3; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }
.btn-icon.is-spinning { color: var(--signal); }
.btn-icon.is-spinning svg { animation: spin 700ms linear infinite; }

/* segmented control promoted to a page-level control under a header */
.seg-page { margin: 12px 18px 0; }
.seg-page button { height: 34px; font-size: 14px; }

/* a badge with no number — just "something is happening in here" */
.tab-dot {
  min-width: 7px; width: 7px; height: 7px;
  padding: 0;
  border-radius: 50%;
  transform: translate(11px, -7px);
}

/* ---- Today sections ---- */

.tsec { padding: 0 0 6px; }
.tsec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 22px 18px 6px;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tsec-head .num { font-size: 11.5px; letter-spacing: 0; }

/* the quiet "+ add" line that closes a section */
.addline {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 13px 18px;
  text-align: left;
  font-size: 15.5px;
  font-weight: 540;
  color: var(--signal-deep);
  transition: background var(--fast) linear;
}
.addline:active { background: var(--paper-sunk); }

/* the quieter second option under a primary suggestion */
.addline-sub {
  padding-top: 0;
  padding-bottom: 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-3);
}

.tnote {
  padding: 4px 18px 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---- resume strip: a workout left running ---- */

.resume {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 18px 2px;
  padding: 13px 14px;
  background: var(--signal-wash);
  border: 1px solid color-mix(in oklch, var(--signal) 26%, transparent);
  border-radius: 13px;
}
.resume-main { flex: 1; min-width: 0; }
.resume-title { font-size: 15.5px; font-weight: 620; letter-spacing: -0.012em; }
.resume-sub {
  margin-top: 1px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--signal-deep);
}
.resume .btn { height: 36px; padding: 0 14px; font-size: 14.5px; }

/* ---- session runner ---- */

.shead {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(var(--safe-t) + 12px) 16px 11px;
  background: color-mix(in oklch, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.shead > :first-child { justify-self: start; }
.shead > :last-child { justify-self: end; }
.shead-mid { text-align: center; min-width: 0; }
.shead-name {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.015em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shead-meta {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--ink-3);
}

.exblock { padding: 16px 18px 14px; }
.exblock + .exblock { border-top: 1px solid var(--line); }
.exblock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 3px;
}
.exblock-name {
  font-size: 16.5px;
  font-weight: 620;
  letter-spacing: -0.015em;
  text-align: left;
}
.exblock-target {
  flex: none;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-3);
  padding-top: 2px;
}
/* Last time and all time, mid-set. Labels share a column so the two numbers
   line up and can be compared without reading the sentence. */
.reflines {
  margin-bottom: 10px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-3);
}
.ref {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 6px;
  line-height: 1.55;
}
.ref i {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 2px;
}
.ref span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ref b { font-weight: 600; color: var(--ink-2); }
.ref-best i { color: var(--signal-deep); }
.ref-best b { color: var(--signal-deep); }

.setrow {
  display: grid;
  grid-template-columns: 22px 1fr 1fr 38px;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
}
.setnum {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-3);
  text-align: center;
}
.setin {
  position: relative;
}
.setin input {
  width: 100%;
  height: 40px;
  padding: 0 30px 0 11px;
  text-align: left;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 16px;
  background: var(--paper-sunk);
  border: 1px solid transparent;
  border-radius: 10px;
  transition: background var(--fast) linear, border-color var(--fast) linear;
}
.setin input:focus { outline: none; background: var(--paper-raised); border-color: var(--signal); }
.setin::after {
  content: attr(data-unit);
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  pointer-events: none;
}
.setrow.is-done .setin input { background: var(--signal-wash); color: var(--signal-deep); }
.setrow.is-done .setnum { color: var(--signal-deep); }

.setdone {
  width: 34px; height: 34px;
  justify-self: center;
  border: 1.75px solid var(--line-strong);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: background var(--fast) linear, border-color var(--fast) linear, transform var(--fast) var(--ease);
}
.setdone:active { transform: scale(0.88); }
.setrow.is-done .setdone { background: var(--signal); border-color: var(--signal); color: oklch(99% 0.01 75); }

.setadd {
  margin-top: 6px;
  padding: 7px 0 2px;
  font-size: 14px;
  font-weight: 560;
  color: var(--signal-deep);
}

/* the session's trailing action sits inline — a sticky footer here
   collided with the offline bar and pinned chrome he rarely needs */
/* ---- PR / stat chips ---- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 7px;
  background: var(--paper-sunk);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.chip-pr { background: var(--signal-wash); color: var(--signal-deep); }

.chiprow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ---- history / set readback ---- */

.setlist {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.setlist span {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--paper-sunk);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--ink-2);
}
.setlist span.pr { background: var(--signal-wash); color: var(--signal-deep); font-weight: 620; }

/* generic unit-suffixed small input (routine sets x reps) */
.uwrap { position: relative; flex: none; }
.uwrap input {
  width: 72px;
  height: 36px;
  padding: 0 28px 0 9px;
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  background: var(--paper-sunk);
  border: 1px solid transparent;
  border-radius: 9px;
}
.uwrap input:focus { outline: none; background: var(--paper-raised); border-color: var(--signal); }
.uwrap::after {
  content: attr(data-u);
  position: absolute;
  right: 9px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  pointer-events: none;
}
.uwrap-sm input { width: 58px; }

/* ============================================================
   Daily targets on Today
   ============================================================ */

.totals-tgt { padding-bottom: 15px; }
.totals-kcal .of {
  font-style: normal;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: -0.02em;
  margin-left: 5px;
}
.totals-day.is-over { color: var(--signal-deep); }

.tgt-bar {
  height: 5px;
  border-radius: 3px;
  background: var(--paper-sunk);
  overflow: hidden;
}
.tgt-bar-lg { height: 7px; border-radius: 4px; margin-bottom: 14px; }
.tgt-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width var(--slow) var(--ease);
}
.tgt-bar i.k { background: var(--ink); }
.tgt-bar i.p { background: var(--m-protein); }
.tgt-bar i.c { background: var(--m-carb); }
.tgt-bar i.f { background: var(--m-fat); }

.tgt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tgt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  margin-bottom: 5px;
}
.tgt-label {
  font-size: 10.5px;
  font-weight: 620;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tgt-num {
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -0.02em;
}
.tgt-num i { font-style: normal; font-weight: 500; color: var(--ink-3); }
.tgt-left {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-3);
}
.tgt-left.is-over { color: var(--signal-deep); }

/* ============================================================
   The day's plan — week strip, timeline, warnings

   The timeline is a rail, not a stack of cards: a 1px line down the left
   with a node per slot, times in the gutter. Slots are rows on a shared
   grid so every meal name, macro line and calorie figure lines up down
   the column, which is the whole reason to read it at a glance.
   ============================================================ */

/* ---- week strip ---- */

.wkstrip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  padding: 10px 14px 2px;
}
.wkday {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 7px 0 6px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font: inherit;
  color: var(--ink-3);
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.wkday:active { transform: scale(0.94); }
.wkday-d {
  font-style: normal;
  font-size: 10px;
  font-weight: 620;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.wkday-n {
  font-size: 14.5px;
  font-weight: 560;
  letter-spacing: -0.02em;
  color: var(--ink-2);
}
.wkday-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  text-decoration: none;
  background: transparent;
  box-shadow: inset 0 0 0 1.25px var(--line-strong);
}
.wkday.is-eaten .wkday-dot { background: var(--signal); box-shadow: none; }
.wkday.is-blank .wkday-dot { box-shadow: none; background: var(--line); width: 7px; height: 1.5px; border-radius: 1px; }
.wkday.is-today .wkday-d { color: var(--signal-deep); }
.wkday.is-on {
  background: var(--paper-sunk);
}
.wkday.is-on .wkday-n { color: var(--ink); font-weight: 650; }
.wkday.is-on .wkday-d { color: var(--ink-2); }
.wkday.is-on.is-today .wkday-d { color: var(--signal-deep); }

/* ---- targets card, now tappable ---- */

button.totals {
  display: block;
  width: calc(100% - 36px);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
button.totals:active { transform: scale(0.994); }

/* Where eating the rest of the plan lands, as a notch on the bar. */
.tgt-bar { position: relative; }
.tgt-bar s {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 2px;
  margin-left: -1px;
  text-decoration: none;
  background: var(--ink-3);
  opacity: 0.5;
  border-radius: 1px;
}
.tgt-plan {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.tgt-plan b { color: var(--ink-2); font-weight: 620; }

/* ---- warnings ---- */

.warns { display: grid; gap: 6px; padding: 10px 18px 2px; }
.warn {
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-sunk);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.warn-late, .warn-protein { background: var(--signal-wash); border-color: oklch(88% 0.035 45); color: var(--signal-deep); }

/* ---- the timeline ---- */

.tsec-act {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 620;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--signal-deep);
  padding: 2px 0 2px 10px;
  -webkit-tap-highlight-color: transparent;
}
.tsec-act:active { opacity: 0.55; }

.tl { list-style: none; padding: 2px 18px 4px; }
.tlrow {
  display: grid;
  grid-template-columns: 44px 16px 1fr auto;
  align-items: stretch;
  min-height: 56px;
}
.tl-time {
  padding-top: 15px;
  font-size: 12px;
  font-weight: 580;
  letter-spacing: -0.02em;
  color: var(--ink-2);
  text-align: right;
  padding-right: 2px;
  line-height: 1.1;
}
.tl-time i {
  display: block;
  font-style: normal;
  font-size: 9px;
  font-weight: 620;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}

/* The rail: a continuous hairline with the node sitting on it. */
.tl-rail { position: relative; }
.tl-rail::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: var(--line);
}
.tlrow:first-child .tl-rail::before { top: 19px; }
.tlrow:last-child .tl-rail::before { bottom: calc(100% - 19px); }
.tl-node {
  position: absolute;
  left: 50%;
  top: 19px;
  width: 9px;
  height: 9px;
  margin-left: -4.5px;
  border-radius: 50%;
  text-decoration: none;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line-strong);
  transition: box-shadow var(--base) var(--ease), background var(--base) var(--ease);
}

.tl-body {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 13px 10px 13px 8px;
  border: 0;
  background: transparent;
  font: inherit;
  color: inherit;
  text-align: left;
  border-radius: 9px;
  transition: background var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tl-body:active { background: var(--paper-sunk); }
.tl-body-flat { padding-left: 8px; }
.tl-name {
  font-size: 15.5px;
  font-weight: 540;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tl-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-3);
}
.tl-sub .num { font-size: 11.5px; }
.tl-tag {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--paper-sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 4px;
  vertical-align: 1.5px;
  margin-left: 3px;
}

.tl-end {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 2px;
}
.tl-kcal {
  min-width: 30px;
  text-align: right;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink-2);
}
.tl-tick {
  flex: none;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  color: transparent;
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease),
              color var(--fast) var(--ease), transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.tl-tick:active { transform: scale(0.9); }

/* ---- slot states ---- */

.tlrow.is-eaten .tl-node { background: var(--signal); box-shadow: inset 0 0 0 1.5px var(--signal); }
.tlrow.is-eaten .tl-tick {
  background: var(--signal);
  border-color: var(--signal);
  color: oklch(99% 0.01 75);
}
.tlrow.is-eaten .tl-name { color: var(--ink-2); }
.tlrow.is-eaten .tl-kcal { color: var(--ink-3); }

.tlrow.is-skipped .tl-node { box-shadow: inset 0 0 0 1.5px var(--line); }
.tlrow.is-skipped .tl-name {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-thickness: 1.25px;
}
.tlrow.is-skipped .tl-tick { opacity: 0.35; }

.tlrow.is-next .tl-node {
  background: var(--paper-raised);
  box-shadow: inset 0 0 0 2px var(--signal), 0 0 0 3px var(--signal-wash);
}
.tlrow.is-next .tl-name { font-weight: 640; }

.tlrow.is-event .tl-node {
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  top: 20px;
  background: var(--paper-sunk);
  box-shadow: inset 0 0 0 1.25px var(--line-strong);
}
.tlrow.is-event { min-height: 42px; }
.tlrow.is-event .tl-name {
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tlrow.is-event .tl-body { padding-top: 14px; padding-bottom: 11px; }
.tlrow.is-event .tl-time { padding-top: 14px; }

/* ---- the week's one line ---- */

.wkline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 7px;
  margin: 6px 18px 0;
  padding: 12px 0 2px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--ink-3);
}
.wkline span {
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 2px;
}
.wkline b { font-size: 13px; font-weight: 620; color: var(--ink); letter-spacing: -0.02em; }
.wkline i { font-style: normal; margin-right: 6px; }

/* ---- bits the plan sheets need ---- */

.chip-tap {
  border-color: var(--line-strong);
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.chip-tap:active { background: var(--paper-sunk); transform: scale(0.95); }

.grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 6px; }
.grid3 .unit .input { padding: 0 24px 0 9px; font-size: 15px; }
.grid3 .unit::after { right: 7px; font-size: 9.5px; }
.unit[data-unit="date"]::after { content: none; }
.unit[data-unit="date"] .input { padding-right: 9px; }

.tsec-name {
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 2px 10px 2px 0;
  -webkit-tap-highlight-color: transparent;
}
.tsec-name:active { opacity: 0.55; }
.tsec-name .tl-tag { letter-spacing: 0.05em; }

/* A time-boxed phase reports where it is in its run. */
.phclock {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper-sunk);
}
.phclock b { font-size: 17px; font-weight: 650; letter-spacing: -0.03em; }
.phclock i { font-style: normal; font-size: 12.5px; color: var(--ink-2); }
.phclock span { margin-left: auto; font-size: 11.5px; color: var(--ink-3); }
.phclock.is-over { background: var(--signal-wash); border-color: oklch(88% 0.035 45); }
.phclock.is-over b, .phclock.is-over i { color: var(--signal-deep); }

.unit[data-unit="wk"]::after { content: 'wk'; }

button.warn {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.45;
  cursor: pointer;
  transition: transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
button.warn:active { transform: scale(0.99); }
.warn-phase {
  background: var(--signal-wash);
  border-color: oklch(88% 0.035 45);
  color: var(--signal-deep);
  font-weight: 540;
}

/* Per-lift options, mid-session. The dots sit where the eye already is after
   reading the name and the target. */
.exblock-menu {
  flex: none;
  margin: -6px -8px -6px 0;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  border-radius: 8px;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.exblock-menu:active { background: var(--paper-sunk); transform: scale(0.9); }

.seg button[disabled] { opacity: 0.35; }
.btn-icon[disabled] { opacity: 0.28; }

/* Position marker in the reorder list. */
.ordnum {
  flex: none;
  width: 20px;
  font-size: 12px;
  font-weight: 620;
  color: var(--ink-3);
  text-align: right;
  margin-right: 2px;
}

/* ============================================================
   Planning inbox

   Sits above the day because it is the one thing on Today that came from
   outside and is waiting on a decision. It disappears completely when the
   queue is empty, so the day is not permanently shorter for a feature that
   is usually idle.
   ============================================================ */

.inbox {
  display: block;
  width: calc(100% - 36px);
  margin: 8px 18px 2px;
  padding: 12px 14px 11px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--signal-wash);
  border: 1px solid oklch(88% 0.035 45);
  border-radius: 14px;
  transition: transform var(--fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.inbox:active { transform: scale(0.994); }
.inbox-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}
.inbox-head span {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--signal-deep);
}
.inbox-head b {
  margin-left: auto;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--signal);
  color: oklch(99% 0.01 75);
  font-size: 11.5px;
  font-weight: 650;
}
.inbox-peek {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}
.inbox-peek i {
  flex: none;
  font-style: normal;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--signal-deep);
  background: oklch(100% 0 0 / 0.55);
  border-radius: 5px;
  padding: 2px 5px;
}
.inbox-peek span {
  font-size: 14.5px;
  font-weight: 540;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inbox-more {
  margin-top: 8px;
  font-size: 11.5px;
  font-weight: 620;
  color: var(--signal-deep);
}

/* One proposal in the review sheet. */
.prop { padding: 15px 0 16px; }
.prop + .prop { border-top: 1px solid var(--line); }
.prop-kind {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 4px;
}
.prop-title {
  font-size: 16.5px;
  font-weight: 620;
  letter-spacing: -0.015em;
}
.prop-sum {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--signal-deep);
}
.prop-detail, .prop-body {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
}
.prop-body { white-space: pre-wrap; }
.prop-acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}
.prop-acts .btn { height: 38px; font-size: 14.5px; }
