/* food.chhlee.com — warmed-Concrete recipe system (direction C)
   Anchored to the IDL "Concrete" doctrine, warmed for food:
   softer paper ground, generous reading measure, one signal kept.
   This is a hand-built preview of what the generator will emit. */

/* ---- Cast (light, default): warmed concrete / paper ---- */
:root {
  --ground:      #cbc8c2;   /* muted concrete, the outer margin (matched to desk v3.1) */
  --panel:       #efebe4;
  --raised:      #f8f5ef;   /* the reading surface for the recipe body */
  --band:        #1c1b18;   /* slab header band */
  --band-ink:    #ecebe5;   /* bone on the band */
  --rule:        #16150f;   /* 2px structural rule */
  --divider:     #c2bdb2;   /* 1px inner divider */
  --ink:         #16150f;
  --muted:       #5b594f;
  --faint:       #8c897e;
  --signal:      #e0521f;
  --signal-deep: #b8421a;   /* deep signal for small orange text on light */
  --on-signal:   #16150f;

  --grotesque: "Helvetica Neue", Helvetica, Arial, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Roboto Mono", monospace;

  --measure: 64ch;          /* generous reading measure for steps */
}

[data-theme="slab"] {
  --ground:      #161512;
  --panel:       #1f1e1a;
  --raised:      #272620;
  --band:        #0f0e0b;
  --band-ink:    #ecebe5;
  --rule:        #403d36;
  --divider:     #2c2a25;
  --ink:         #ecebe5;
  --muted:       #9b988e;
  --faint:       #6a675e;
  --signal:      #f2682f;
  --signal-deep: #f2682f;
  --on-signal:   #161512;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--ground);
  color: var(--ink);
  font-family: var(--grotesque);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: "tnum" 0;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums lining-nums; }

a { color: inherit; }

/* ---- outer frame: the board sits inside a margin of raw ground ---- */
.frame {
  max-width: 1040px;
  margin: 0 auto;
  padding: 24px;
}
@media (max-width: 640px) { .frame { padding: 12px; } }

/* ---- top bar: kicker + theme toggle ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 12px;
}
.crumb {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
}
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--signal-deep); }

.toggle {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 7px 12px;
  min-height: 28px;
  cursor: pointer;
}
.toggle:hover { color: var(--signal-deep); border-color: var(--signal); }
.toggle:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ---- header band (slab) — typographic header + a reserved photo slot ---- */
.band {
  background: var(--band);
  color: var(--band-ink);
  border: 2px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr;          /* single column by default (e.g. the index) */
  align-items: stretch;
}
.band.has-photo { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.band-text { padding: 40px 36px 32px; min-width: 0; }

/* photo slot: holds a hero <img> when present, a calm placeholder until then.
   Reserved at a fixed footprint so adding a real photo never reflows the page. */
.band-photo { position: relative; border-left: 2px solid var(--rule); min-height: 340px; }
.band-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.band-photo .ph {
  position: absolute; inset: 0;
  display: grid; place-content: center; place-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.025);
  text-align: center;
}
.band-photo .ph::before {
  content: ""; position: absolute; inset: 14px;
  border: 1px solid rgba(236, 235, 229, 0.12);
}
.ph-mark { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: #8a877d; }
.ph-hint { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: #5f5c54; }

@media (max-width: 720px) {
  .band.has-photo { grid-template-columns: 1fr; }
  .band-photo { border-left: 0; border-top: 2px solid var(--rule); min-height: 200px; }
}
.band .kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 16px;
}
.band h1 {
  font-family: var(--grotesque);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.02;
  font-size: clamp(40px, 8vw, 60px);
  max-width: 18ch;
}
.band .sub {
  font-style: italic;
  color: var(--band-ink);
  opacity: 0.82;
  font-size: 18px;
  max-width: 56ch;
  margin-top: 16px;
}

/* meta row on the band */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px solid #34322c;
}
[data-theme="slab"] .meta { border-top-color: #34322c; }
.meta .stat { display: flex; flex-direction: column; gap: 3px; }
.meta .stat .k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9b988e;
}
.meta .stat .v {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums lining-nums;
}

/* tag chips — hard rectangles, never pills */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--band-ink);
  border: 1px solid #4a473f;
  border-radius: 0;
  padding: 5px 9px;
}

/* ---- body: the reading surface ---- */
.body {
  background: var(--raised);
  border: 2px solid var(--rule);
  border-top: 0;
  padding: 36px;
}
@media (max-width: 640px) { .band-text { padding: 28px 20px; } .body { padding: 22px 18px; } }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--rule);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--grotesque);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 15px;
}
.section-head .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ---- scaler (serves) — segmented control, one filled ---- */
.scaler { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.scaler .lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.seg { display: inline-flex; border: 1px solid var(--ink); }
.seg button {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  background: transparent;
  color: var(--ink);
  border: 0;
  border-right: 1px solid var(--ink);
  border-radius: 0;
  padding: 6px 13px;
  min-height: 28px;
  cursor: pointer;
}
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--signal); color: var(--on-signal); }
.seg button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }

/* ---- ingredients: ruled list, two columns past ~12 ---- */
.ings {
  list-style: none;
  columns: 1;
  column-gap: 48px;
}
.ings.two { columns: 2; }
@media (max-width: 600px) { .ings.two { columns: 1; } }
.ing {
  break-inside: avoid;
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--divider);
}
.ing .qty {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: 500;
  color: var(--signal-deep);
  white-space: nowrap;
  flex: 0 0 auto;
  min-width: 5.5em;
}
.ing.no-qty .qty { color: var(--faint); }
.ing .name { flex: 1 1 auto; }
.ing .alt { color: var(--faint); font-style: italic; }
.ing .note { color: var(--muted); }
.ing .finish {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  border: 1px solid var(--divider);
  padding: 1px 6px;
  margin-left: 6px;
}

/* ---- steps: mono index + readable measure ---- */
.steps { list-style: none; counter-reset: step; margin-top: 8px; }
.step {
  display: grid;
  grid-template-columns: 3.2em 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--divider);
}
.step:last-child { border-bottom: 0; }
.step .n {
  counter-increment: step;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums lining-nums;
  color: var(--muted);
  line-height: 1.2;
}
.step .n::before { content: counter(step, decimal-leading-zero); }
.step .txt { max-width: var(--measure); font-size: 16px; line-height: 1.62; }

/* the one critical move = the one signal (replaces vault's yellow highlight) */
.step.key .txt { border-left: 3px solid var(--signal); padding-left: 14px; margin-left: -17px; }
.step.key mark {
  background: transparent;
  color: inherit;
  font-weight: 600;
}

/* ---- footer / related ---- */
.foot {
  margin-top: 28px;
  border-top: 2px solid var(--rule);
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.foot a { color: var(--signal-deep); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.related { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- index page ---- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 2px solid var(--rule);
  border-bottom: 0;
}
@media (max-width: 600px) { .grid { grid-template-columns: 1fr; } }
.card {
  background: var(--raised);
  border-bottom: 2px solid var(--rule);
  border-right: 2px solid var(--rule);
  padding: 26px 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.grid .card:nth-child(2n) { border-right: 0; }
@media (max-width: 600px) { .card { border-right: 0; } }
.card:hover { background: var(--panel); }
.card:hover h3 { color: var(--signal-deep); }
.card .idx {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.card h3 {
  font-family: var(--grotesque);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1.06;
}
.card .csub {
  font-style: italic;
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
  flex: 1 1 auto;
}
.card .cmeta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--divider);
  display: flex;
  gap: 16px;
}
