/* Every stack is different — Slab's free sheet, at /stacksheet.
   Generated page: stacksheet.html. See build/generate.py.

   HAND-MAINTAINED, like styles.css and protein-number.css. Loaded after
   protein-number.css, whose .pn column, opener and close this page reuses —
   it is the same family of page. Only the sheet's own pieces live here.

   Same rule as the calculator: the site's cream and ink everywhere, Slab's
   food-family colours only on the blocks and dots, because those are the
   app's actual output. */

.ss-eyebrow {
  font: 700 12px/1.2 'JetBrains Mono', monospace; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 14px;
}
.ss .pn-top h1 { margin-bottom: 14px; }

/* ── download ───────────────────────────────────────────────── */
.ss-get { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 22px 0 0; }
.ss-download { font-size: 15px; padding: 14px 24px; box-shadow: var(--shadow-xs); }
.ss-meta { font-size: 13.5px; color: var(--muted); }
.ss-get--end { margin: 34px 0 0; }

/* ── find yours ─────────────────────────────────────────────── */
.ss-index {
  border: 2px solid var(--ink); border-radius: 14px; background: #fff;
  box-shadow: var(--shadow-sm); padding: 22px 24px 14px; margin: 34px 0 22px;
}
.ss-index h2.ss-eyebrow { color: var(--ink); font-size: 12px; margin: 0 0 8px; }
.ss-index ul { list-style: none; margin: 0; padding: 0; display: grid; column-gap: 32px; }
@media (min-width: 560px) { .ss-index ul { grid-template-columns: 1fr 1fr; } }
.ss-index a {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px solid #e6dfcf; font-weight: 600;
}
.ss-index a:hover .ss-name { text-decoration: underline; }
.ss-name { flex: 1; }
.ss-target { font: 500 13px 'JetBrains Mono', monospace; color: var(--muted); }
.ss-dot { flex: none; display: inline-block; width: 12px; height: 12px; border-radius: 3px; }

.ss-key { font-size: 15.5px; color: var(--muted); margin: 0 0 8px; }

/* ── the days ───────────────────────────────────────────────── */
.ss-day {
  display: grid; grid-template-columns: 150px 1fr; gap: 28px; align-items: end;
  padding: 30px 0; border-bottom: 2px solid var(--ink); scroll-margin-top: 84px; /* clears the sticky nav */
}
.ss-day:target .ss-head h3 { background: var(--coral-tint); box-shadow: 0 0 0 6px var(--coral-tint); border-radius: 4px; }

/* The stack. Heights and the line's position are set inline by the
   generator in px — the line has to be placed in the same pixels the blocks
   are, gaps included, or it drifts off the block that crossed it. */
.ss-stack { position: relative; margin: 0 38px 0 0; padding: 0; }
.ss-blocks { display: flex; flex-direction: column-reverse; gap: 3px; height: 100%; }
.ss-block { border-radius: 6px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.14), inset 0 0 0 1px rgba(0,0,0,.13); }
.ss-line { position: absolute; left: -6px; right: -6px; border-top: 2.5px dashed var(--ink); }
.ss-line span {
  position: absolute; left: 100%; top: -11px; margin-left: 5px;
  font: 700 11px/1 'JetBrains Mono', monospace; color: var(--cream); background: var(--ink);
  padding: 4px 7px; border-radius: 100px;
}

.ss-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.ss .ss-head h3 { margin: 0; font: 700 clamp(18px, 2.6vw, 22px)/1.1 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; }
.ss-head span { font: 500 12px 'JetBrains Mono', monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.ss-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ss-table td { padding: 5px 0; vertical-align: baseline; }
.ss-table td .ss-dot { width: 10px; height: 10px; margin-right: 9px; }
.ss-food { font-weight: 700; }
.ss-portion { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ss-g { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 12px; }
.ss-table tfoot th, .ss-table tfoot td { border-top: 2px solid var(--ink); padding-top: 9px; }
.ss-table tfoot th {
  text-align: left; font: 700 12px 'JetBrains Mono', monospace; letter-spacing: .14em; text-transform: uppercase;
}
.ss-table tfoot .ss-g { font-size: 19px; }
.ss-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ss-fine { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 24px 0 0; }
.ss-fine a, .ss .pn-fine a { text-decoration: underline; }

/* Phones: a narrower stack, and the portion drops under the food name so
   the gram column never gets squeezed. */
@media (max-width: 560px) {
  .ss-day { grid-template-columns: 78px 1fr; gap: 16px; align-items: start; }
  .ss-stack { margin-right: 0; margin-top: 30px; }
  .ss-line span { left: auto; right: 0; top: -22px; margin-left: 0; }
  .ss-portion { display: block; margin-left: 19px; }
  .ss-head { flex-direction: column; gap: 4px; }
}
