/* indar.app's free tools: the workout plan generator, the plate and
   one-rep max calculator, the protein calculator, the weight-loss timeline
   and the tools index.
   Colours are the app's Spectrum tokens (src/theme/tokens.ts), named here
   so these pages don't depend on how the rest of the site names them. */
:root {
  --t-bg: #0b0b0d;
  --t-surface: #151518;
  --t-raised: #1f1f23;
  --t-track: #26262b;
  --t-ink: #f4f4f6;
  --t-ink-2: #a7a7b0;
  --t-ink-3: #88888f;
  --t-line: rgba(255, 255, 255, 0.08);
  --t-edge: rgba(255, 255, 255, 0.06);
  --t-protein: #6e8bff;
  --t-protein-text: #8fa6ff;
  --t-carbs: #ffc857;
  --t-fat: #ff7eb0;
  --t-steel: #56565e;
}

.t-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--t-raised);
  color: var(--t-ink);
  font: 600 15px var(--text);
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .t-btn:hover {
    border-color: rgba(255, 255, 255, 0.28);
  }
}
.t-btn:focus-visible {
  outline: 2px solid var(--t-ink);
  outline-offset: 3px;
}
.t-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
.t-status {
  color: var(--t-ink-2);
  font-size: 14px;
  min-height: 1em;
}
/* Until it has something to say it takes no place in the row of buttons. */
.t-status:empty {
  position: absolute;
}

/* ---------- Workout plan generator ---------- */

/* Training days: the app's round day buttons, Monday first. Seven equal
   cells, each at least 44px to tap, the circle as big as fits in it (46px at
   most), so the row never runs past a phone's edge. */
.t-days-pick {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  max-width: 380px;
}
.t-days-pick label {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
}
.t-days-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.t-days-pick span {
  display: grid;
  place-items: center;
  width: min(46px, 100% - 4px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--t-raised);
  color: var(--t-ink);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  user-select: none;
}
.t-days-pick input:checked + span {
  background: var(--t-ink);
  color: var(--t-bg);
}
.t-days-pick input:disabled:not(:checked) + span {
  opacity: 0.4;
  cursor: not-allowed;
}
.t-days-pick input:focus-visible + span {
  outline: 2px solid var(--t-ink);
  outline-offset: 2px;
}

.t-plan {
  min-width: 0;
}
.t-plan-head {
  border-radius: 24px;
  background: var(--t-surface);
  box-shadow: var(--card);
  padding: var(--pad-card);
}
.t-plan-head h2 {
  font: 700 clamp(28px, 4vw, 36px) / 1.1 var(--title);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-2xs);
}
.t-plan-sub {
  color: var(--t-ink-2);
  margin: 0;
}
.t-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-s);
}
/* On a phone the three don't fit in one row: they fill two rows evenly
   (Copy link and Print, then Get it in Indar the whole width), even at
   360px, never one button left beside a gap. */
@media (max-width: 599px) {
  .t-actions .t-btn {
    flex: 1 1 8rem;
    justify-content: center;
  }
}

/* The week at a glance: seven days, the training ones lit. A day's name
   wraps rather than being cut to a letter and dots. */
.t-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  list-style: none;
  margin: var(--space-m) 0 0;
  padding: 0;
}
.t-week li {
  position: relative;
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: center;
  padding: 10px 3px;
  border-radius: 14px;
  background: var(--t-bg);
  border: 1px solid var(--t-line);
  color: var(--t-ink-3);
  font-size: 13px;
  text-align: center;
  min-width: 0;
}
.t-week li b {
  color: var(--t-ink-2);
  font-weight: 600;
  font-size: 13px;
}
.t-week li.on {
  background: var(--t-raised);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--t-ink);
}
.t-week li.on b {
  color: var(--t-ink);
}
/* Seven days across a phone leave each day about 40 px: the session's name steps down a size to keep off the edges. */
@media (max-width: 479px) {
  .t-week {
    gap: 3px;
  }
  .t-week li {
    padding-inline: 2px;
  }
  .t-week a,
  .t-week li > span {
    font-size: 11px;
    letter-spacing: -0.01em;
  }
}
.t-week a,
.t-week li > span {
  max-width: 100%;
  line-height: 1.25;
  overflow-wrap: break-word;
}
.t-week a {
  color: inherit;
  text-decoration: none;
}
/* The whole day is the link's tap area. */
.t-week a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
}
.t-week a:focus-visible {
  outline: none;
}
.t-week a:focus-visible::after {
  outline: 2px solid var(--t-ink);
  outline-offset: 2px;
}
@media (max-width: 380px) {
  .t-week li {
    font-size: 12px;
  }
}

.t-legend {
  color: var(--t-ink-3);
  font-size: 14px;
  margin: var(--space-s) 0 0;
}

.t-daylist {
  display: grid;
  gap: var(--gap-cards);
  margin-top: var(--space-s);
}
.t-day {
  border-radius: 24px;
  background: var(--t-surface);
  box-shadow: var(--card);
  padding: var(--pad-card) var(--pad-card) var(--space-xs);
  scroll-margin-top: var(--space-m);
}
.t-day-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.t-day-when {
  color: var(--t-ink);
  font-size: 14px;
  font-weight: 600;
}
.t-day-min {
  color: var(--t-ink-2);
  font-size: 14px;
  white-space: nowrap;
}
.t-day h3 {
  font: 700 24px/1.2 var(--title);
  letter-spacing: -0.01em;
  margin: 2px 0 0;
}
.t-day-focus {
  color: var(--t-ink-2);
  font-size: 14px;
  margin: 2px 0 var(--space-xs);
}
.t-ex {
  list-style: none;
  margin: 0;
  padding: 0;
}
.t-ex li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--t-line);
}
.t-ex-name {
  font-weight: 600;
  min-width: 0;
}
.t-ex-sets {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-align: right;
}
.t-ex-meta {
  grid-column: 1 / -1;
  color: var(--t-ink-2);
  font-size: 14px;
}
/* A superset: the two exercises joined by a line in the protein colour. */
.t-ex li.ss {
  position: relative;
  padding-left: 16px;
}
.t-ex li.ss::before {
  content: '';
  position: absolute;
  left: 0;
  top: 14px;
  bottom: -1px;
  width: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--t-ink-2);
}
.t-ex li.ss.ss-end::before {
  top: 0;
  bottom: 14px;
  border-radius: 0 0 2px 2px;
}
.t-ex li.ss .t-ss {
  color: var(--t-ink);
}

/* Hard sets a week per muscle: a labelled bar list. */
.t-card {
  margin-top: var(--gap-cards);
  border-radius: 24px;
  background: var(--t-surface);
  box-shadow: var(--card);
  padding: var(--pad-card);
}
.t-card h3 {
  font: 600 16px/1.4 var(--text);
  margin: 0 0 var(--space-2xs);
}
.t-card > p {
  color: var(--t-ink-2);
  font-size: 14px;
  margin: 0 0 var(--space-s);
}
.t-card > h3 + .t-why {
  margin-top: var(--space-s);
}
.t-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.t-bars li {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.t-bars .t-bar-name {
  color: var(--t-ink-2);
  white-space: nowrap;
}
.t-bars .t-bar-name em {
  font-style: normal;
  color: var(--t-ink);
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
}
.t-bar {
  display: block;
  height: 10px;
  border-radius: 0 4px 4px 0;
  background: var(--t-steel);
  min-width: 2px;
}
.t-bars li.focus .t-bar {
  background: var(--t-ink-2);
}
.t-bars .t-bar-n {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.t-why {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.t-why li {
  position: relative;
  padding-left: 18px;
  color: var(--ink-body);
  font-size: 15px;
}
.t-why li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t-ink);
}
.t-weights {
  margin-top: var(--gap-cards);
  border-radius: 24px;
  padding: var(--pad-card);
  box-shadow: var(--card);
  background: var(--t-surface);
}
:where(.t-weights) p {
  margin: 0 0 var(--space-s);
  color: var(--ink-body);
  font-size: 15px;
}
.t-weights a {
  font-weight: 600;
}
/* Under the week it's the plan's next step (style.css .r-next), in its own box. */
.t-weights.r-next {
  border-top: 1px solid var(--line);
}
.t-weights .join {
  max-width: 460px;
}
.t-stop {
  border-radius: 24px;
  background: var(--t-surface);
  box-shadow: var(--card);
  padding: var(--pad-card);
  color: var(--t-ink-2);
}
.t-printed {
  display: none;
}

@media (min-width: 900px) {
  .t-calc-wide {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  }
  /* The form is taller than a screen and the week beside it far taller: the
     form scrolls with the page until its last choices are in view, then
     stays there next to the plan instead of leaving an empty column. */
  .t-calc-wide > .calc-form {
    position: sticky;
    bottom: var(--space-m);
    align-self: end;
  }
  .t-calc-wide .cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- Plate and one-rep max calculator ---------- */

/* A hint under the row of fields above it: the same 8px as a hint inside a field. */
.calc-form p.t-hint-tight {
  margin: calc(var(--space-xs) - var(--space-m)) 0 0;
}
.t-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.t-chips label {
  position: relative;
}
.t-chips input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.t-chips span {
  display: block;
  min-width: 52px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--t-line);
  background: var(--t-surface);
  color: var(--t-ink-3);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  text-align: center;
  cursor: pointer;
  user-select: none;
  text-decoration: line-through;
}
.t-chips input:checked + span {
  background: var(--t-raised);
  color: var(--t-ink);
  border-color: rgba(255, 255, 255, 0.16);
  text-decoration: none;
}
.t-chips input:focus-visible + span {
  outline: 2px solid var(--t-ink);
  outline-offset: 2px;
}

.t-bar-draw {
  display: block;
  width: 100%;
  height: auto;
  margin: 8px 0 4px;
}
.t-side {
  font: 700 40px/1.05 var(--title);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 4px;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.t-sub {
  color: var(--t-ink-2);
  font-size: 15px;
  margin: 0;
}
.t-near {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-s);
}
/* Under a rule like the next step (style.css .r-next): 24px either side. */
.t-warm {
  margin-top: var(--space-m);
  padding-top: var(--space-m);
  border-top: 1px solid var(--t-line);
}
/* A small heading belongs to what's under it: 24px above, 8px below. */
.t-warm h2,
.t-warm h3,
.t-small-h {
  font: 600 15px/1.4 var(--text);
  color: var(--t-ink-2);
  margin: 0 0 var(--space-xs);
}
/* The warm-up sets in even columns: two on a phone, never three and one. */
.t-warm ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-xs);
}
/* With room, every step in one row: three and one would leave a hole. */
@media (min-width: 720px) {
  .t-warm ol {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }
}
.t-warm li {
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--t-raised);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.t-warm li b {
  font-weight: 600;
}
.t-warm li span {
  display: block;
  color: var(--t-ink-2);
  font-size: 12px;
}

.t-section {
  margin-top: var(--section);
}
.t-section > h2 {
  font: 700 clamp(28px, 4.4vw, 40px) / 1.1 var(--title);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-s);
}
.t-section > .lede {
  max-width: 60ch;
  margin-bottom: var(--space-l);
}

.t-pct {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
.t-pct th {
  color: var(--t-ink-3);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  padding: 0 8px 8px 0;
  border-bottom: 1px solid var(--t-line);
}
.t-pct td {
  padding: 9px 8px 9px 0;
  border-bottom: 1px solid var(--t-line);
  color: var(--t-ink);
  vertical-align: top;
}
.t-pct td small {
  display: block;
  color: var(--t-ink-3);
  font-size: 12px;
}
.t-pct th:last-child,
.t-pct td:last-child {
  text-align: right;
  padding-right: 0;
}
.t-pct button {
  position: relative;
  border: 0;
  background: none;
  color: var(--t-ink);
  font: 600 14px var(--text);
  cursor: pointer;
  padding: 2px 0;
}
/* A 44px tap area around the small word, without moving the table. */
.t-pct button::after {
  content: '';
  position: absolute;
  inset: -12px -12px;
}
.t-pct button:focus-visible {
  outline: 2px solid var(--t-ink);
  outline-offset: 2px;
  border-radius: 4px;
}
.t-pct tr.t-pct-max td {
  font-weight: 600;
}
.t-pct th {
  white-space: nowrap;
}
.t-pct td:first-child {
  width: 3.2em;
}
.t-pct td:nth-child(3) {
  width: 3.5em;
}

/* The percentages under the estimate: their own panel, so the form and the estimate beside it are the same short
   height and nothing is left empty beside a long table. A table on a phone; from 900px a grid of cards across the
   page, three to a row. */
.t-ladder {
  border-radius: 32px;
  background: var(--surface);
  padding: 24px 22px;
  box-shadow: var(--card-raised);
}
.t-ladder[hidden] {
  display: none;
}
.t-ladder .t-pct {
  margin: 0;
}
.t-pct-reps {
  display: none;
}
@media (min-width: 720px) {
  .t-ladder {
    padding: 28px;
    border-radius: 40px;
  }
}
@media (min-width: 900px) {
  .t-rm > .t-ladder {
    grid-column: 1 / -1;
  }
  .t-rm > .calc-form,
  .t-rm > .result {
    position: static;
  }
  .t-ladder thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .t-ladder table,
  .t-ladder tbody {
    display: block;
  }
  .t-ladder tbody {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-xs);
  }
  .t-ladder tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'pct go' 'wt reps';
    align-items: end;
    column-gap: var(--space-s);
    row-gap: 4px;
    padding: 14px 18px 16px;
    border-radius: 18px;
    background: var(--t-raised);
    box-shadow: var(--edge);
  }
  .t-ladder tr.t-pct-max {
    box-shadow: var(--edge), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  }
  .t-ladder td {
    display: block;
    width: auto !important;
    padding: 0;
    border: 0;
  }
  .t-ladder td:nth-child(1) {
    grid-area: pct;
    align-self: center;
    color: var(--t-ink-2);
    font-weight: 600;
  }
  .t-ladder td:nth-child(2) {
    grid-area: wt;
    font: 700 24px/1.15 var(--title);
  }
  .t-ladder td:nth-child(2) small {
    margin-top: 2px;
    font: 400 13px/1.4 var(--text);
  }
  .t-ladder td:nth-child(3) {
    grid-area: reps;
    color: var(--t-ink-2);
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
  }
  .t-ladder td:nth-child(4) {
    grid-area: go;
    text-align: right;
  }
  .t-ladder .t-pct-reps {
    display: inline;
  }
  .t-ladder tr.t-pct-max td {
    font-weight: inherit;
  }
  .t-ladder tr.t-pct-max td:nth-child(2) {
    font-weight: 700;
  }
}

/* ---------- Protein calculator ---------- */

/* Where the target sits on the range studies support. */
.t-range {
  position: relative;
  margin: var(--space-m) 0 var(--space-s);
  height: 46px;
}
.t-range-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 8px;
  border-radius: 4px;
  background: var(--t-track);
}
.t-range-band {
  position: absolute;
  top: 18px;
  height: 8px;
  background: rgba(110, 139, 255, 0.45);
  border-radius: 4px;
}
.t-range-dot {
  position: absolute;
  top: 12px;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  border-radius: 50%;
  background: var(--t-protein-text);
  box-shadow: 0 0 0 3px var(--t-surface), 0 0 18px rgba(110, 139, 255, 0.7);
}
.t-range-tick {
  position: absolute;
  top: 32px;
  transform: translateX(-50%);
  color: var(--t-ink-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.t-range-tick.start {
  transform: none;
}
.t-range-tick.end {
  transform: translateX(-100%);
}
.t-range-label {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  color: var(--t-protein-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.t-meals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-xs);
  margin: 0;
  padding: 0;
  list-style: none;
}
.t-meals li {
  border-radius: 16px;
  background: var(--t-raised);
  padding: 12px;
  font-size: 13px;
  color: var(--t-ink-2);
}
.t-meals b {
  display: block;
  color: var(--t-ink);
  font: 700 22px/1.2 var(--title);
  font-variant-numeric: tabular-nums;
}
.t-gap {
  margin-top: var(--space-m);
}
.t-foods td:last-child,
.t-foods th:last-child {
  text-align: right;
  white-space: nowrap;
}

/* ---------- Weight-loss timeline ---------- */

/* The three paces: stacked on a phone, side by side from 560px. */
.cards.t-pace-pick {
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 560px) {
  .cards.t-pace-pick {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.t-pace-pick em {
  display: block;
  font-style: normal;
}
.t-date {
  margin: var(--space-xs) 0 0;
  color: var(--t-ink-2);
  font-size: 15px;
  text-wrap: pretty;
}
.t-date b {
  color: var(--t-ink);
  font-weight: 600;
}
.t-balance {
  text-wrap: balance;
}
/* A long value wraps on a phone instead of pushing the result wider than the screen. */
.t-lines li span:last-child {
  white-space: normal;
  text-align: right;
}
/* Wherever there's room the value stays on one line and the label wraps instead. */
@media (min-width: 420px) {
  .t-lines li span:last-child {
    flex: none;
    white-space: nowrap;
  }
}
.result .r-stop p {
  margin: 0 0 12px;
}
.result .r-stop p:last-child {
  margin-bottom: 0;
}

/* The line, drawn at its real width so the labels keep their size. */
.t-chart {
  position: relative;
  margin: var(--space-m) 0 0;
}
.t-chart-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  touch-action: pan-y;
}
.t-chart-svg text {
  fill: var(--t-ink-3);
  font: 400 12px var(--text);
  font-variant-numeric: tabular-nums;
}
.t-chart-grid {
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
}
.t-chart-line {
  fill: none;
  stroke: var(--t-ink-2);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.t-chart-dot {
  fill: var(--t-ink);
  stroke: var(--t-surface);
  stroke-width: 2;
}
.t-chart-hair {
  stroke: rgba(255, 255, 255, 0.3);
  stroke-width: 1;
}
.t-chart-tip {
  position: absolute;
  top: 0;
  left: 0;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--t-raised);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--t-ink-2);
  font-size: 13px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  pointer-events: none;
}
.t-chart-tip[hidden] {
  display: none;
}
.t-chart-tip b {
  display: block;
  color: var(--t-ink);
  font-weight: 600;
}

/* Each pace side by side: tap one to pick it. */
.t-pace-cmp {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.t-pace-cmp button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 6px 12px;
  width: 100%;
  padding: 10px 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--t-line);
  background: none;
  color: var(--t-ink);
  font: 400 14px/1.4 var(--text);
  text-align: left;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .t-pace-cmp button:hover {
    border-color: rgba(244, 244, 246, 0.5);
  }
}
.t-pace-cmp button.on {
  border-color: rgba(244, 244, 246, 0.7);
  background: var(--t-raised);
}
.t-pace-name {
  font-weight: 600;
  font-size: 15px;
}
.t-pace-weeks {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.t-pace-bar {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 4px;
  background: var(--t-track);
  overflow: hidden;
}
.t-pace-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--t-steel);
}
.t-pace-cmp .on .t-pace-bar i {
  background: var(--t-ink-2);
}
.t-pace-sub {
  grid-column: 1 / -1;
  color: var(--t-ink-3);
  font-size: 13px;
}

/* Every week as a table, scrolling inside itself when it's long. */
.t-weeks {
  margin-top: var(--space-m);
}
.t-weeks summary {
  font-size: 15px;
}
.t-weeks .scroll {
  max-height: 420px;
  overflow-y: auto;
  margin-bottom: var(--space-s);
}
.t-weeks .t-pct thead th {
  position: sticky;
  top: 0;
  background: var(--t-surface);
}
.t-weeks .t-pct td:nth-child(3) {
  width: auto;
}
.t-weeks .t-pct {
  font-size: 14px;
}
.t-weeks .t-pct td,
.t-weeks .t-pct th {
  white-space: nowrap;
}

@media (prefers-reduced-motion: no-preference) {
  .t-pace-cmp button {
    transition: border-color 160ms, background-color 160ms;
  }
}

/* ---------- Tools index and the links between pages ----------
   A list, not a grid of cards (docs/site-redesign.md): each row is the page's name, what it answers, and the answer
   it gives set in type (build.py tool_art), so the number is the picture. The whole row is the link. */

.t-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--line);
}
.t-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'title' 'text' 'eg' 'go';
  row-gap: 6px;
  padding: var(--space-m) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background-color 120ms;
}
.t-tool-title {
  grid-area: title;
  font: 700 22px/1.2 var(--title);
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}
.t-tool-text {
  grid-area: text;
  max-width: 56ch;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}
.t-eg {
  grid-area: eg;
  margin-top: var(--space-xs);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.35;
}
.t-eg b {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font: 800 30px/1 var(--display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.t-tool-go {
  grid-area: go;
  margin-top: var(--space-2xs);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: rgba(244, 244, 246, 0.35);
  text-underline-offset: 3px;
}
.t-tool-dot {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .t-tool:hover .t-tool-go {
    text-decoration-color: var(--ink);
  }
}
@media (min-width: 760px) {
  .t-tool {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 11.5rem;
    grid-template-areas: 'title eg go' 'text eg go';
    column-gap: var(--space-l);
    align-items: start;
    padding: var(--space-m) var(--space-s);
    margin: 0 calc(-1 * var(--space-s));
    border-radius: var(--radius-s);
    /* The rule under each row is drawn inside the row's padding, so the hover's rounded corners can't bend it. */
    border-bottom: 0;
    background: linear-gradient(var(--line), var(--line)) bottom / calc(100% - 2 * var(--space-s)) 1px no-repeat;
  }
  @media (hover: hover) and (pointer: fine) {
    .t-tool:hover {
      background-color: var(--surface);
    }
  }
  .t-eg {
    grid-row: 1 / span 2;
    margin-top: 2px;
  }
  .t-tool-go {
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    margin: 0;
  }
}
.t-more {
  margin-top: var(--section);
}
/* Section heads at the home page's size (home.css .sec-head): where the page turns from one job to the next. */
.t-more h2,
.method.doc-flow > h2:first-child {
  font: 700 clamp(32px, 1.7vw + 25px, 52px) / 1.04 var(--title);
  letter-spacing: -0.022em;
  text-wrap: balance;
  margin: 0 0 var(--space-m);
}
.t-more .all {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--space-xs);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}

.faq {
  margin-top: var(--space-xs);
}

/* The tools index in groups: calories and macros, weight loss, training. */
.t-group {
  margin-top: var(--space-2xl);
}
.t-group:first-of-type {
  margin-top: 0;
}
.t-group > h2 {
  font: 700 var(--type-h2) / 1.1 var(--title);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-m);
}

/* The macro calculator's three numbers side by side, in the macro colours. */
.r-big.three {
  gap: 20px;
}
.r-big.three .r-num {
  font-size: 44px;
}
.r-num.carbs {
  color: var(--t-carbs);
}
.r-num.fat {
  color: var(--fat);
}

/* ---------- Guides and food pages ---------- */

/* Where a page sits: the hub it's listed on, then the page. A 44px row to tap. */
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-xs);
  padding-top: var(--space-s);
  color: var(--t-ink-3);
  font-size: 14px;
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--t-ink-2);
}
.crumbs + .tool-head {
  padding-top: var(--space-xs);
}
/* A guide's text starts under its header, not a section's width further down. */
.doc-flow.flush {
  margin-top: 0;
}
.doc-flow.flush > h2:first-child {
  margin-top: 0;
}
/* The short answer at the top of a guide: the numbers first. */
.answer {
  margin: 0 0 var(--space-l);
  padding: var(--pad-card);
  border-radius: 24px;
  background: var(--t-surface);
  box-shadow: var(--card);
}
.answer > :first-child {
  margin-top: 0;
}
.answer > :last-child {
  margin-bottom: 0;
}
.doc-flow .answer h2 {
  margin: 0 0 var(--space-xs);
  font-size: 22px;
}
/* A comparison's short answer ends with Indar's own badges, so its install comes before any other app's link. */
.answer > .get,
.answer > .join {
  margin-top: var(--space-m);
}
/* The next step in a guide: the calculator that does it for you. */
.next-step {
  margin: var(--space-l) 0;
}
.next-step .contact {
  margin: 0;
}
:where(.next-step) p {
  margin: 0 0 var(--space-s);
}
.doc-flow table {
  font-variant-numeric: tabular-nums;
}
/* A table of numbers keeps each number on one line; the first column takes what's left. */
.num-table td {
  white-space: nowrap;
}
.doc-flow .scroll {
  margin: var(--space-s) 0;
}
/* On a phone a table of numbers keeps its headings to two lines and scrolls sideways inside the text column, with its
   first column (what each row is) staying put. */
@media (max-width: 719px) {
  .doc-flow .num-table {
    min-width: 500px;
  }
  .num-table tbody th,
  .num-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--bg);
  }
}
.doc-flow .scroll table {
  margin: 0;
}
.doc-flow td small,
.doc-flow th small {
  display: block;
  color: var(--t-ink-3);
  font-size: 13px;
  font-weight: 400;
}
/* The app comparison: wide enough to read on a phone, scrolling inside its box. */
.doc-flow table.cmp {
  min-width: 640px;
}
.cmp tbody th {
  color: var(--t-ink);
}
@media (min-width: 720px) {
  .cmp-hint {
    display: none;
  }
}
.guide-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--gap-cards);
}

/* A food page: the main portion's numbers in a card, with the tables beside
   it from 900px (the card stays in view). */
@media (min-width: 900px) {
  .calc.f-calc {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  }
}
.f-more h2 {
  font: 700 22px/1.2 var(--title);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2xs);
}
.f-more h2 ~ h2 {
  margin-top: var(--space-l);
}
.f-src {
  margin: 0;
  color: var(--t-ink-3);
  font-size: 14px;
}
.f-src a {
  color: var(--t-ink-2);
}
.f-table tbody th {
  padding: 9px 8px 9px 0;
  border-bottom: 1px solid var(--t-line);
  color: var(--t-ink);
  font-size: 15px;
  font-weight: 600;
  white-space: normal;
  vertical-align: top;
}
.f-table th small,
.f-table td small {
  display: block;
  color: var(--t-ink-3);
  font-size: 12px;
  font-weight: 400;
}
.f-table td,
.f-table thead th {
  text-align: right;
  white-space: nowrap;
}
.f-table thead th:first-child {
  text-align: left;
}
.f-table td:nth-child(3) {
  width: auto;
}
/* The hub's tables line up group to group: the same column widths in each. */
.f-hub {
  table-layout: fixed;
}
.f-hub thead th:nth-child(1) {
  width: 42%;
}
.f-hub thead th:nth-child(2) {
  width: 13%;
}
.f-hub thead th:nth-child(3) {
  width: 17%;
}
.f-hub thead th:nth-child(4) {
  width: 28%;
}
.f-hub thead th {
  white-space: normal;
  vertical-align: bottom;
}
.f-hub tbody th a {
  color: var(--t-ink);
}
.f-hub-wrap {
  margin-top: 0;
}
.f-hub-wrap h2:first-child {
  margin-top: 0;
}
/* The hub's search and the jump links to each group. */
.f-find {
  margin: 0 0 var(--space-m);
}
.f-find .num {
  display: block;
}
.f-find[hidden],
.f-none[hidden],
.f-group[hidden],
.f-hub tbody tr[hidden] {
  display: none;
}
.f-none {
  margin: var(--space-s) 0 0;
  color: var(--t-ink-2);
}
/* One row that scrolls sideways on its own, so the foods start near the top on a phone. */
.f-jump {
  display: flex;
  gap: 8px;
  margin: 0 0 var(--space-l);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.f-jump::-webkit-scrollbar {
  display: none;
}
.f-jump[hidden] {
  display: none;
}
.f-jump a {
  flex: none;
  display: inline-block;
  padding: 12px 14px;
  white-space: nowrap;
  border: 1px solid var(--t-line);
  border-radius: 999px;
  color: var(--t-ink-2);
  font-size: 14px;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  .f-jump a:hover {
    color: var(--t-ink);
  }
}
/* Until the groups move to the rail, the row runs to the screen's edges, so a cut-off name reads as "scroll". */
@media (max-width: 1179px) {
  .f-jump {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
}
.f-group > h2 {
  scroll-margin-top: 80px;
}
/* From 720px the tables are data, so they take the page's width. From 1180px the hub is on the reading grid: the
   search and the groups are its contents rail, in the left margin and staying in view; the tables fill the rest. */
@media (min-width: 720px) {
  .doc-flow.f-hub-wrap {
    max-width: none;
  }
}
@media (min-width: 1180px) {
  .f-hub-wrap {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    column-gap: var(--rail-gap);
    align-items: start;
  }
  .f-find input {
    font-size: 14px; /* the whole placeholder fits the rail */
  }
  .f-side {
    position: sticky;
    top: var(--space-m);
    max-height: calc(100vh - 2 * var(--space-m));
    overflow-y: auto;
  }
  .f-jump {
    flex-direction: column;
    gap: 0;
    margin: 0;
    overflow: visible;
    border-left: 1px solid var(--t-line);
    font-size: 14px;
    line-height: 1.4;
  }
  .f-jump a {
    margin-left: -1px;
    padding: 6px 0 6px 14px;
    white-space: normal;
    border: 0;
    border-left: 2px solid transparent;
    border-radius: 0;
  }
  @media (hover: hover) and (pointer: fine) {
    .f-jump a:hover {
      border-left-color: var(--t-ink-2);
    }
  }
}
.f-group:first-of-type > h2 {
  margin-top: 0;
}
.f-amount {
  margin-top: var(--space-m);
  padding-top: var(--space-m);
  border-top: 1px solid var(--t-line);
}
.f-amount[hidden] {
  display: none;
}
.f-out {
  margin: var(--space-s) 0 0;
  color: var(--t-ink);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.f-notes {
  margin-top: var(--space-xl);
}
.f-notes > h2:first-child {
  margin-top: 0;
}

/* ---------- Print: the plan on paper, nothing else ---------- */
/* ---------- Calorie counter from a photo (/calorie-counter-from-photo, tools/scan.js) ---------- */

/* The photo: a dashed card to tap or drop on, then the photo itself in its place. */
.s-drop {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 300px;
  border-radius: 24px;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  background: var(--t-surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 160ms, background-color 160ms;
}
.s-drop.over {
  border-color: rgba(244, 244, 246, 0.6);
}
@media (hover: hover) and (pointer: fine) {
  .s-drop:hover {
    border-color: rgba(244, 244, 246, 0.6);
  }
}
.s-drop.over {
  background: var(--t-raised);
}
.s-drop:focus-within {
  outline: 2px solid var(--t-ink);
  outline-offset: 3px;
}
.s-drop.has-photo {
  border-style: solid;
  border-color: var(--t-line);
  min-height: 0;
}
.s-drop-empty {
  display: grid;
  justify-items: center;
  gap: var(--space-xs);
  padding: var(--space-l) var(--pad-card);
  text-align: center;
}
.s-drop-empty[hidden],
.s-preview[hidden] {
  display: none;
}
.s-drop svg {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-xs);
  fill: none;
  stroke: var(--t-ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
}
.s-drop-title {
  font: 700 22px/1.25 var(--title);
  color: var(--t-ink);
}
.s-drop-text {
  color: var(--t-ink-2);
  font-size: 15px;
  max-width: 30ch;
}
.s-preview {
  display: block;
  width: 100%;
  height: 360px;
  object-fit: contain;
  background: var(--t-bg);
}
@media (max-width: 520px) {
  .s-preview {
    height: 280px;
  }
  .s-drop {
    min-height: 240px;
  }
}
/* Phones and tablets can't drag a file onto the page. */
@media (hover: none) {
  .s-drag {
    display: none;
  }
}
.s-photo-msg {
  color: var(--t-carbs);
}
.s-send {
  display: grid;
  gap: var(--space-s);
}
.s-send[hidden] {
  display: none;
}
.s-consent {
  margin: 0;
  color: var(--t-ink-2);
  font-size: 14px;
  line-height: 1.5;
}
.s-consent a {
  color: var(--t-ink);
}
.s-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.s-go {
  height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--t-ink);
  color: var(--t-bg);
  font: 600 16px var(--text);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .s-go:hover {
    background: #fff;
  }
}
.s-go:focus-visible {
  outline: 2px solid var(--t-ink);
  outline-offset: 3px;
}
.s-go:disabled {
  opacity: 0.5;
  cursor: progress;
}
.s-buttons .t-btn {
  height: 50px;
  padding: 0 20px;
}
.calc-form p.s-free {
  margin: 0;
}

/* The wait: the app's four steps, one lit at a time. */
.s-steps {
  list-style: none;
  margin: var(--space-s) 0 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.s-steps li {
  position: relative;
  padding-left: 28px;
  color: var(--t-ink-3);
  font-size: 15px;
}
.s-steps li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.15em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--t-track);
  box-sizing: border-box;
}
.s-steps li.on {
  color: var(--t-ink);
}
.s-steps li.on::before {
  border-color: var(--t-track);
  border-top-color: var(--t-ink);
  animation: s-spin 0.9s linear infinite;
}
.s-steps li.ok {
  color: var(--t-ink-2);
}
.s-steps li.ok::before {
  border: 0;
  background: var(--t-ink-2);
}
@keyframes s-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .s-steps li.on::before {
    animation: none;
    border-color: var(--t-protein-text);
  }
}

/* Each food: its name and portion, its calories, then its macros. */
.s-items {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--t-line);
}
.s-items li {
  padding: 12px 0;
  border-bottom: 1px solid var(--t-line);
}
.s-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}
.s-name {
  min-width: 0;
  color: var(--t-ink);
  font-size: 16px;
  font-weight: 600;
}
.s-name small {
  display: block;
  margin-top: 2px;
  color: var(--t-ink-2);
  font-size: 14px;
  font-weight: 400;
}
.s-name small.rough {
  color: var(--t-carbs);
}
.s-kcal {
  flex: none;
  color: var(--t-ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.s-macros {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.s-macros .protein {
  color: var(--t-protein-text);
}
.s-macros .carbs {
  color: var(--t-carbs);
}
.s-macros .fat {
  color: var(--fat);
}
.s-note {
  margin: var(--space-s) 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--t-bg);
  color: var(--t-ink);
  font-size: 15px;
}
.s-note[hidden] {
  display: none;
}
.s-result .r-why a {
  color: var(--t-ink);
}
/* Focus moves to the answer for screen readers; it isn't a control, so no ring. */
.s-result [tabindex='-1']:focus {
  outline: none;
}
.s-stop .t-btn {
  margin-top: var(--space-s);
}
.s-stop > p:not(.r-kicker) {
  margin: 0;
}
.s-result [hidden],
.s-form [hidden] {
  display: none;
}
/* While it reads the photo the steps light one at a time, each easing in as it's reached. When the answer arrives
   it builds the way the app's does: the meal and its calories, the split, then each food in turn, then the notes. */
@media (prefers-reduced-motion: no-preference) {
  .s-wait {
    animation: m-rise 300ms var(--ease) both;
  }
  .s-steps li.on {
    animation: m-lit 360ms var(--ease) both;
  }
  .s-result #r-body > :is(.r-kicker, .r-big) {
    animation: m-rise 360ms var(--ease) both;
  }
  .s-result #r-body > .r-split {
    transform-origin: 0 50%;
    animation: m-grow 480ms var(--ease) 120ms both;
  }
  .s-result #r-body > .r-macros {
    animation: m-rise 360ms var(--ease) 160ms both;
  }
  .s-result #r-items > li {
    animation: m-rise 360ms var(--ease) both;
  }
  .s-result #r-items > li:nth-child(1) {
    animation-delay: 220ms;
  }
  .s-result #r-items > li:nth-child(2) {
    animation-delay: 300ms;
  }
  .s-result #r-items > li:nth-child(3) {
    animation-delay: 380ms;
  }
  .s-result #r-items > li:nth-child(4) {
    animation-delay: 460ms;
  }
  .s-result #r-items > li:nth-child(n + 5) {
    animation-delay: 540ms;
  }
  .s-result #r-body > :is(.s-note, .r-why, .r-start, .r-next) {
    animation: m-rise 360ms var(--ease) 600ms both;
  }
  @keyframes m-rise {
    from {
      opacity: 0;
      transform: translateY(10px);
    }
  }
  @keyframes m-grow {
    from {
      transform: scaleX(0);
    }
  }
  @keyframes m-lit {
    from {
      opacity: 0.4;
    }
  }
}

@media print {
  @page {
    margin: 14mm;
  }
  :root {
    --t-line: #d4d4d8;
  }
  html,
  body {
    background: #fff !important;
    color: #000 !important;
  }
  body * {
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  .top,
  footer,
  .tool-head,
  .calc-form,
  .doc-flow,
  .cta,
  .t-more,
  .t-actions,
  .t-weights,
  .r-mini,
  .t-noprint {
    display: none !important;
  }
  .calc {
    display: block !important;
  }
  .t-plan-head,
  .t-day,
  .t-card {
    background: #fff !important;
    border: 1px solid #d4d4d8 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    break-inside: avoid;
  }
  .t-week li {
    background: #fff !important;
    border: 1px solid #d4d4d8 !important;
  }
  .t-week li.on {
    border: 1.5px solid #000 !important;
  }
  .t-ex li {
    padding: 6px 0;
    border-top-color: #e4e4e7;
  }
  .t-ex li.ss::before,
  .t-bar,
  .t-why li::before {
    background: #000 !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .t-bars li:not(.focus) .t-bar {
    background: #9a9aa2 !important;
  }
  .t-daylist {
    display: block;
  }
  .t-day {
    margin-top: 8px;
  }
  .t-printed {
    display: block;
    margin-top: 10px;
    font-size: 12px;
  }
}

/* ---------- The scanner, as the canvas draws it (docs/site.md, "The bar") ----------
   A wide screen: the title, what you get and the byline on the left, the photo drop area on the right, held level
   with the title; the reading of a photo comes in on the left, beside the photo. A phone: the title, the drop area,
   a white button to take or choose a photo, and "Try ours". */
.s-ticks {
  display: none;
  gap: 10px;
  margin: 0 0 var(--space-m);
  padding: 0;
  list-style: none;
  color: var(--ink-body);
  font-size: 16px;
  line-height: 1.45;
}
.s-ticks li {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.s-ticks li::before {
  content: '';
  flex: none;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-3px) rotate(-45deg);
}
.s-drop {
  min-height: 300px;
  border-radius: 30px;
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.s-drop-empty {
  gap: 0;
}
.s-drop-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.s-drop .s-drop-icon svg {
  width: 32px;
  height: 32px;
  margin: 0;
  stroke: var(--bg);
  stroke-width: 1.9;
}
.s-drop-title {
  font-size: 24px;
}
.s-drop-text {
  margin-top: 6px;
}
.s-drop-btn {
  display: inline-flex;
  align-items: center;
  height: 56px;
  margin-top: 28px;
  padding: 0 28px;
  border-radius: 28px;
  background: var(--ink);
  color: var(--bg);
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}
.s-tap {
  display: none;
}
.s-pick {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 60px;
  margin-top: var(--space-m);
  border-radius: 30px;
  background: var(--ink);
  color: var(--bg);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
.s-pick svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--bg);
  stroke-width: 2;
  stroke-linejoin: round;
}
.s-pick[hidden] {
  display: none;
}
.s-try {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 10px;
  padding: 0 20px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  font: 600 15px var(--text);
  cursor: pointer;
  transition: background 120ms;
}
@media (hover: hover) and (pointer: fine) {
  .s-try:hover {
    background: var(--raised);
  }
}
.s-try img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}
.s-try[hidden] {
  display: none;
}
.s-try:disabled {
  opacity: 0.6;
  cursor: progress;
}
.calc-form p.s-free {
  margin-inline: auto;
  text-align: center;
}
/* A phone, or any screen without a mouse: snap rather than drop, and the big white button. */
@media (hover: none), (max-width: 719px) {
  .s-drag {
    display: none;
  }
  .s-tap {
    display: inline;
  }
  .s-pick {
    display: flex;
  }
}
/* Nothing to show yet: no empty panel beside the drop area. */
.s-result:has(> #s-idle:not([hidden])) {
  display: none;
}
@media (min-width: 900px) {
  .s-ticks {
    display: grid;
  }
  .tool:has(.s-form) > .tool-head + .calc:not(.t-calc-wide) > .s-form {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: var(--space-l);
  }
  .tool:has(.s-form) > .tool-head + .calc:not(.t-calc-wide) > .s-result {
    grid-column: 1;
    grid-row: 2;
    margin-top: var(--space-m);
  }
  .s-drop {
    min-height: 480px;
    border-radius: 36px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 40px 80px rgba(0, 0, 0, 0.45);
  }
  .s-drop-icon {
    width: 88px;
    height: 88px;
    margin-bottom: 24px;
    background: var(--raised);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  .s-drop .s-drop-icon svg {
    width: 38px;
    height: 38px;
    stroke: var(--ink);
    stroke-width: 1.7;
  }
  .s-drop-title {
    font-size: 32px;
  }
  .s-drop-text {
    margin-top: 8px;
    font-size: 16px;
  }
  .s-preview {
    height: 480px;
  }
  .s-try {
    width: auto;
    height: 48px;
    margin: 26px auto 0;
  }
}
@media (min-width: 1180px) {
  .tool:has(.s-form) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 580px);
  }
}

/* The meal calculator (<!--meal-calculator-->, site/tools/meal.js): the add button is the form's one next step, so
   it's the light pill; each food in the meal is a row like the result's lines, with its own remove button. */
.m-add {
  justify-self: start;
  min-height: 50px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--t-ink);
  color: var(--t-bg);
  font: 600 16px var(--text);
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .m-add:hover {
    background: #fff;
  }
}
.m-add:focus-visible,
.m-x:focus-visible,
.m-clear:focus-visible {
  outline: 2px solid var(--t-ink);
  outline-offset: 3px;
}
.m-items {
  list-style: none;
  margin: var(--space-m) 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.m-items li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 4px 12px;
  min-height: 52px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-body);
  font-size: 15px;
}
.m-items li.m-empty {
  display: block;
  padding: 14px 0;
  color: var(--ink-2);
}
.m-what a {
  color: var(--ink);
}
.m-value {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.m-x {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--ink-2);
  font: 400 24px/1 var(--text);
  cursor: pointer;
}
.m-x::before {
  content: '\00d7';
}
@media (hover: hover) and (pointer: fine) {
  .m-x:hover {
    color: var(--ink);
    background: var(--surface);
  }
}
@media (max-width: 420px) {
  .m-items li {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .m-value {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
    font-size: 14px;
  }
  .m-x {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}
.m-actions {
  margin: var(--space-s) 0 0;
}
.m-clear {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font: 600 15px var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
@media (hover: hover) and (pointer: fine) {
  .m-clear:hover {
    color: var(--ink);
  }
}
.recipe-total {
  font-variant-numeric: tabular-nums;
}
