/* The public recipe share, /s/<code>. (project.md D330)
   Page-scoped: nothing here may restyle the app (DESIGN.md, site.css is shared).
   Phone first; the desk gets two columns; print gets one page. */

.sh-main { background: var(--c-paper); }
.sh-sheet {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 0 clamp(2.5rem, 6vw, 4.5rem);
}
.sh-printmark, .sh-printfoot { display: none; }

/* ── the head: photo, then the card's title block ─────────────────────── */
.sh-head { display: grid; gap: 1.25rem; }
.sh-photo { margin: 0; }
.sh-photo img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 640 / 453; object-fit: cover;
  background: var(--c-paper-warm);
}
.sh-intro { padding: 0 var(--kgut); }

.sh-by {
  margin: 0 0 .6rem;
  font-size: .875rem; font-weight: 600;
  color: var(--c-ink-muted);
  display: flex; align-items: center; gap: .5rem;
}
.sh-by::before {
  content: ''; width: .5rem; height: .5rem; border-radius: 50%;
  background: var(--c-tomato); flex: none;
}
.sh h1 {
  font-family: 'Gabarito', var(--f-display);
  font-weight: 800;
  font-size: clamp(2rem, 6.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 0 0 .75rem;
  text-wrap: balance;
}
.sh-desc {
  margin: 0 0 1.25rem;
  font-size: 1.125rem; line-height: 1.55;
  color: var(--c-ink-muted);
  max-width: 58ch;
}

/* The ledger row (DESIGN.md: DM Mono is for quantities, times, servings and
   counts, which is exactly what this row is). */
.sh-meta {
  list-style: none; margin: 0 0 1.25rem; padding: .85rem 0;
  display: flex; flex-wrap: wrap; gap: .75rem 0;
  border-block: 1px solid var(--c-rule);
}
.sh-meta li {
  display: grid; gap: .15rem;
  padding: 0 1.25rem;
  border-left: 1px solid var(--c-rule);
}
.sh-meta li:first-child { padding-left: 0; border-left: 0; }
/* Phones: the four facts stay on one line rather than orphaning the last. */
@media (max-width: 39.99rem) {
  .sh-meta { flex-wrap: nowrap; }
  .sh-meta li { flex: 1 1 auto; padding: 0 .7rem; min-width: 0; }
  .sh-meta span { font-size: .6875rem; letter-spacing: .02em; }
  .sh-meta b { font-size: 1.05rem; }
}
.sh-meta span {
  font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--c-ink-muted);
}
.sh-meta b { font-family: var(--f-numeric); font-weight: 500; font-size: 1.15rem; }

.sh-tools { display: flex; flex-wrap: wrap; gap: .6rem; }
.sh-tools .btn { min-height: 48px; }
.sh-tools svg { flex: none; }

/* Share choices open in place, under the button: no modal (impeccable). */
.sh-panel { margin-top: .9rem; }
.sh-links {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .5rem;
}
.sh-links a, .sh-links button {
  display: flex; align-items: center; gap: .6rem;
  width: 100%; min-height: 48px; padding: .55rem .85rem;
  border: 1px solid var(--c-rule); border-radius: var(--r-md);
  background: var(--c-paper-warm); color: var(--c-ink);
  font: 600 .9375rem/1.2 var(--f-body);
  text-decoration: none; cursor: pointer;
  transition: border-color var(--m-quick), background var(--m-quick);
}
.sh-links a:active, .sh-links button:active { background: var(--c-rule); }
@media (hover: hover) {
  .sh-links a:hover, .sh-links button:hover { border-color: var(--c-ink-muted); }
}
.sh-links a:focus-visible, .sh-links button:focus-visible { outline: 3px solid var(--c-tomato); outline-offset: 2px; }
.sh-links [data-k="facebook"] svg { color: oklch(52% .17 262); }
.sh-links [data-k="pinterest"] svg { color: oklch(50% .2 25); }
.sh-copied { margin: .5rem 0 0; min-height: 1.25rem; font-size: .875rem; color: var(--c-ink-muted); }

/* ── the hook: built from this recipe's own list and pans ─────────────── */
.sh-hook {
  margin: 2rem var(--kgut) 0;
  padding: 1.25rem 1.25rem 1.35rem;
  border: 1px solid oklch(57.5% .182 33.1 / .28);
  border-radius: var(--r-lg);
  background: oklch(57.5% .182 33.1 / .06);
  display: grid; gap: .65rem; justify-items: start;
}
.sh-hook-q {
  margin: 0;
  font-family: 'Gabarito', var(--f-display); font-weight: 800;
  font-size: clamp(1.3rem, 3.6vw, 1.6rem); line-height: 1.15; letter-spacing: -.015em;
  color: var(--c-tomato-text);
}
.sh-hook-a { margin: 0; line-height: 1.55; max-width: 60ch; }
.sh-hook-cta { display: grid; gap: .45rem; justify-items: start; margin-top: .25rem; }
.sh-hook .btn { min-height: 48px; }
.sh-hook-fine { font-size: .875rem; color: var(--c-ink-muted); }

/* ── the recipe itself ────────────────────────────────────────────────── */
.sh-body {
  display: grid; gap: 2.25rem;
  padding: 2.25rem var(--kgut) 0;
}
.sh h2 {
  font-family: 'Gabarito', var(--f-display); font-weight: 800;
  font-size: 1.5rem; letter-spacing: -.015em;
  margin: 0 0 .75rem;
}

.sh-inglist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-rule); }
.sh-inglist li { border-bottom: 1px solid var(--c-rule); }
.sh-inglist label {
  display: grid; grid-template-columns: 1.4rem minmax(0, 8.5rem) 1fr; gap: .25rem .75rem;
  align-items: baseline;
  padding: .7rem 0; min-height: 44px;
  cursor: pointer;
}
.sh-inglist input {
  appearance: none; margin: 0; align-self: center;
  width: 1.3rem; height: 1.3rem; border: 1.5px solid var(--c-ink-muted); border-radius: 5px;
  background: var(--c-paper-warm); display: grid; place-content: center; cursor: pointer;
}
.sh-inglist input::after {
  content: ''; width: .7rem; height: .4rem; margin-top: -.15rem;
  border: solid var(--c-on-tomato); border-width: 0 0 2px 2px; transform: rotate(-45deg) scale(0);
  transition: transform var(--m-quick);
}
.sh-inglist input:checked { background: var(--c-tomato); border-color: var(--c-tomato); }
.sh-inglist input:checked::after { transform: rotate(-45deg) scale(1); }
.sh-inglist input:focus-visible { outline: 3px solid var(--c-tomato); outline-offset: 2px; }
.sh-amt { font-family: var(--f-numeric); font-weight: 500; font-size: .9375rem; }
.sh-item { line-height: 1.4; }
.sh-inglist input:checked ~ span { color: var(--c-ink-muted); text-decoration: line-through; text-decoration-thickness: 1px; }
/* No amount (salt, pepper "to taste"): the item takes both columns. */
.sh-amt:empty { display: none; }
.sh-amt:empty + .sh-item { grid-column: 2 / -1; }
.sh-ingnote { margin: .9rem 0 0; font-weight: 600; }
.sh-ingnote a { color: var(--c-tomato-text); text-underline-offset: .2em; }

.sh-steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.sh-steps li {
  counter-increment: st;
  display: grid; grid-template-columns: 2.4rem 1fr; gap: .9rem;
  padding: 0 0 1.35rem;
}
.sh-steps li::before {
  content: counter(st);
  font-family: var(--f-numeric); font-weight: 500; font-size: 1.05rem;
  color: var(--c-on-tomato); background: var(--c-tomato);
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-content: center;
}
.sh-steps p { margin: .2rem 0 0; font-size: 1.0625rem; line-height: 1.65; max-width: 68ch; }

.sh-tips {
  margin-top: .75rem; padding: 1.1rem 1.25rem;
  background: var(--c-paper-warm); border: 1px solid var(--c-rule); border-radius: var(--r-lg);
}
.sh-tips h3 { margin: 0 0 .5rem; font-family: var(--f-display); font-size: 1rem; }
.sh-tips ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; }
.sh-tips li { line-height: 1.5; max-width: 68ch; }

/* ── the close: the product, working, no account ──────────────────────── */
.sh-try h2 {
  color: var(--on-ink);
  font-size: clamp(1.7rem, 4.6vw, 2.6rem); line-height: 1.08;
  margin: 0 0 .6rem;
}
.sh-try p { color: var(--on-ink-muted); margin: 0; max-width: 56ch; line-height: 1.55; }

/* ── the desk ─────────────────────────────────────────────────────────── */
@media (min-width: 56rem) {
  .sh-sheet { padding-top: 2.5rem; }
  .sh-head {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 3.5rem); align-items: center;
    padding: 0 var(--kgut);
  }
  .sh-photo img { border-radius: var(--r-lg); }
  .sh-intro { padding: 0; }
  .sh-head:not(:has(.sh-photo)) { grid-template-columns: 1fr; }
  .sh-hook {
    grid-template-columns: 1fr auto; column-gap: 2rem; align-items: center;
    padding: 1.5rem 1.75rem;
  }
  .sh-hook-q, .sh-hook-a { grid-column: 1; }
  .sh-hook-cta { grid-column: 2; grid-row: 1 / span 2; justify-items: center; margin: 0; }
  .sh-body {
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    padding-top: 3rem;
  }
  .sh-ings { position: sticky; top: 1.25rem; align-self: start; }
}

/* ── print: the card alone, on one page ──────────────────────────────────
   share-page.js measures the sheet before printing and sets --pz so a long
   recipe shrinks to fit rather than spilling a line onto page two. */
@media print {
  @page { size: auto; margin: .45in .5in; }
  html, body { background: #fff !important; }
  body { color: oklch(20% 0 0); font-size: 10pt; }
  .masthead, .foot, .sh-tools, .sh-panel, .sh-hook, .sh-try, .sh-ingnote, .skip,
  [class^="ftfh"], [id^="ftfh"] { display: none !important; }
  .sh-sheet { max-width: none; padding: 0; zoom: var(--pz, 1); }
  .sh-printmark {
    display: block; margin: 0 0 8pt; padding-bottom: 6pt;
    border-bottom: 1.5pt solid oklch(57.5% .182 33.1);
    font: 800 13pt/1 'Gabarito', var(--f-display); letter-spacing: -.02em;
  }
  .sh-printmark span { color: oklch(52% .182 33.1); }
  .sh-head { display: block; padding: 0; }
  .sh-photo { float: right; width: 2.6in; margin: 0 0 8pt 14pt; }
  .sh-photo img { border-radius: 6pt; }
  .sh-intro { padding: 0; }
  .sh-by { font-size: 8.5pt; margin-bottom: 3pt; }
  .sh-by::before { display: none; }
  .sh h1 { font-size: 22pt; margin-bottom: 4pt; }
  .sh-desc { font-size: 10pt; margin-bottom: 6pt; color: oklch(35% 0 0); }
  .sh-meta { padding: 4pt 0; margin: 0 0 8pt; }
  .sh-meta li { padding: 0 9pt; }
  .sh-meta span { font-size: 6.5pt; }
  .sh-meta b { font-size: 10pt; }
  .sh-body {
    clear: both; display: grid; grid-template-columns: 2.35in 1fr; gap: 18pt;
    padding: 6pt 0 0;
  }
  .sh h2 { font-size: 12pt; margin-bottom: 4pt; }
  .sh-inglist label { min-height: 0; padding: 2.5pt 0; grid-template-columns: 9pt minmax(0, 1in) 1fr; gap: 1pt 5pt; }
  .sh-inglist input { width: 8pt; height: 8pt; border-width: .75pt; border-radius: 2pt; background: #fff; }
  .sh-inglist input:checked { background: #fff; border-color: oklch(30% 0 0); }
  .sh-inglist input:checked ~ span { text-decoration: none; color: inherit; }
  .sh-amt { font-size: 8.5pt; }
  .sh-item { font-size: 9pt; line-height: 1.25; }
  .sh-steps li { grid-template-columns: 14pt 1fr; gap: 6pt; padding-bottom: 5pt; break-inside: avoid; }
  .sh-steps li::before {
    width: 13pt; height: 13pt; font-size: 7.5pt;
    background: none; color: oklch(52% .182 33.1); border: 1pt solid oklch(57.5% .182 33.1);
  }
  .sh-steps p { font-size: 9.5pt; line-height: 1.38; margin: 0; max-width: none; }
  .sh-tips { padding: 5pt 8pt; margin-top: 2pt; border-radius: 4pt; background: none; }
  .sh-tips h3 { font-size: 9pt; margin-bottom: 2pt; }
  .sh-tips li { font-size: 8.5pt; line-height: 1.3; }
  .sh-printfoot {
    display: flex; justify-content: space-between; gap: 14pt; align-items: center;
    margin-top: 10pt; padding-top: 7pt; border-top: .75pt solid oklch(80% 0 0);
    font-size: 8.5pt; line-height: 1.35; break-inside: avoid;
  }
  .sh-printfoot b { display: block; color: oklch(45% .16 33.1); font-size: 9.5pt; }
  .sh-printfoot .sh-url { font-family: var(--f-numeric); }
  .sh-qr { flex: none; width: .75in; height: .75in; }
  .sh-qr svg { display: block; width: 100%; height: 100%; }
  a { color: inherit; text-decoration: none; }
}

/* The gone page. */
.sh-gone main { padding: 3rem var(--kgut); max-width: 40rem; }
.sh-gone h1 { font-family: 'Gabarito', var(--f-display); font-size: 2rem; }
