/* hhome's site: readable on a phone in the kitchen, light and dark. */
:root {
  --bg: #fdfcf9; --ink: #1d1d1b; --soft: #6b6a66; --faint: #d9d6cf; --accent: #8a2b1e; --chip: #efece5;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #171716; --ink: #e9e7e1; --soft: #a3a19b; --faint: #3a3936; --accent: #e08a74; --chip: #262523; }
}
* { box-sizing: border-box; }
body {
  margin: 0 auto; max-width: 64rem; padding: 1rem 1rem 3rem; background: var(--bg); color: var(--ink);
  font: 1.05rem/1.45 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}
a { color: var(--accent); }
h1 { font-size: 1.9rem; line-height: 1.15; margin: 0.2rem 0 0.4rem; }
h2 { font-size: 1.1rem; margin: 1.6rem 0 0.4rem; }
.muted, .crumbs, .facts, .legend, footer, .detail, .pct, .unweighed { color: var(--soft); }
.crumbs { margin: 0; font-size: 0.9rem; }
.credit { margin: 0.2rem 0; font-style: italic; }
.facts { margin: 0.2rem 0; font-size: 0.95rem; }
.tag {
  display: inline-block; margin: 0 0.3rem 0.3rem 0; padding: 0.05rem 0.55rem; border-radius: 1rem;
  background: var(--chip); color: var(--ink); text-decoration: none; font-size: 0.85rem; border: 1px solid transparent;
}
button.tag { font: inherit; font-size: 0.85rem; cursor: pointer; }
button.tag[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.count { color: var(--soft); font-size: 0.75rem; }
.status { margin-left: 0.4rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
#search { width: 100%; font: inherit; padding: 0.55rem 0.7rem; margin: 0.4rem 0 0.8rem; border: 1px solid var(--faint);
  border-radius: 0.4rem; background: var(--bg); color: var(--ink); }
.facet { margin-bottom: 0.3rem; }
.facet-name { display: inline-block; min-width: 5.5rem; font-size: 0.8rem; color: var(--soft); text-transform: uppercase; }
.recipes { list-style: none; padding: 0; columns: 2 18rem; column-gap: 2rem; }
.recipes li { break-inside: avoid; padding: 0.3rem 0; border-bottom: 1px solid var(--faint); }
.recipes .tags { display: block; font-size: 0.8rem; color: var(--soft); }
.recipes li[hidden] { display: none; }
.facts span + span { margin-left: 1.2rem; }
/* Each step: number, ingredients at a fixed width so numbers line up down the page, method beside. */
.steps { font-variant-numeric: tabular-nums; margin-top: 0.8rem; }
.step { display: grid; grid-template-columns: 1.6rem minmax(0, 30rem) 1fr; column-gap: 1rem; padding: 0.45rem 0;
  border-top: 1px solid var(--faint); }
.step.head { border-top: none; font-size: 0.75rem; color: var(--soft); text-transform: uppercase; letter-spacing: 0.04em; }
.step.head th { font-weight: normal; }
/* Letter-spacing also follows the last letter, which pushes right-aligned headings off their column. */
.step.head th.num { letter-spacing: 0; }
.step.total { border-top: 1px solid var(--faint); }
.step .n { font-weight: bold; text-align: right; }
/* The ingredient cells' top padding, so the step number and the method sit on the first row's baseline. */
.step .n, .step .method { padding-top: 0.1rem; }
table.ing { width: 100%; border-collapse: collapse; table-layout: fixed; align-self: start; }
.ing td, .ing th { padding: 0.1rem 0; vertical-align: top; text-align: left; }
.ing .num { width: 4.4rem; text-align: right; white-space: nowrap; }
.ing .pct { width: 4.6rem; }
.unweighed { font-style: italic; }
.mark { color: var(--accent); font-weight: bold; }
/* Zero width, so the number keeps its column's right edge and the mark hangs into the gutter. */
.ing .g .mark { display: inline-block; width: 0; }
.time, .temp { font-weight: 600; font-style: italic; }
#temp-toggle { cursor: pointer; font: inherit; font-size: 0.8rem; }
a.term { color: inherit; text-decoration: underline dotted var(--accent); text-underline-offset: 0.2em; }
/* An ingredient with a footnote (alternatives, a tip): dotted underline, the note on hover, listed for touch screens. */
.footed { text-decoration: underline dotted var(--accent); text-underline-offset: 0.2em; cursor: help; }
sup.fn { font-size: 0.7em; margin-left: 0.1em; }
sup.fn a { color: var(--accent); text-decoration: none; }
.footnotes ol { margin: 0.3rem 0 0; padding-left: 1.4rem; }
.terms dt { font-weight: bold; margin-top: 1rem; }
.terms dt:target { color: var(--accent); }
.terms dd { margin: 0.2rem 0 0; }
.credit-note { color: var(--soft); font-size: 0.85rem; }
.legend { font-size: 0.85rem; margin: 0.3rem 0; }
.scaler { margin: 0.8rem 0 0.2rem; font-size: 0.95rem; }
.scaler input, .scaler select, .scaler button { font: inherit; padding: 0.15rem 0.35rem; background: var(--bg); color: var(--ink);
  border: 1px solid var(--faint); border-radius: 0.3rem; }
.scaled { color: var(--accent); font-weight: bold; margin: 0.2rem 0; min-height: 1.2em; }
.notes p { white-space: pre-line; }
footer { margin-top: 2.5rem; font-size: 0.8rem; }
/* On a phone the method moves under its ingredients. */
@media (max-width: 40rem) {
  .step { grid-template-columns: 1.4rem minmax(0, 1fr); column-gap: 0.5rem; }
  .step .method { grid-column: 2; padding-top: 0.3rem; }
  .step.head .method { display: none; }
  .ing .num { width: 3.6rem; }
  .ing .pct { width: 3.4rem; font-size: 0.8rem; }
}
@media print { header input, nav { display: none; } }
