/* recipes.charlessieg.com: pink butcher paper by day, bark at night. The stencil is the signature (crate and
   smokehouse lettering); everything else is quiet. Tokens first; tests/test_design_tokens.py computes the contrast
   of every text pair below from these values. */

:root {
  --bg: #ebcab3;
  --bg-2: #e2bba2;
  --surface: #f5dfcf;
  --line: #c9a088;
  --ink: #21110e;
  --ink-2: #55362c;
  --ink-3: #6f4a3c;
  --accent: #9c2015;
  --accent-ink: #fff4ea;
  --accent-soft: #e6b29c;
  --hero-ink: #f6e6d6;
  --hero-bg: #2a1411;
  --stencil: "Big Shoulders Stencil", Impact, "Arial Narrow Bold", sans-serif;
  --label: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --read: "Literata", Georgia, "Times New Roman", serif;
  --gutter: 16px;
  --radius: 3px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #2a1411;
    --bg-2: #1f0e0c;
    --surface: #3a1d18;
    --line: #5a3229;
    --ink: #f6e6d6;
    --ink-2: #dcc3b0;
    --ink-3: #b99a87;
    --accent: #f6cf57;
    --accent-ink: #2a1411;
    --accent-soft: #4a2a1f;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #2a1411;
  --bg-2: #1f0e0c;
  --surface: #3a1d18;
  --line: #5a3229;
  --ink: #f6e6d6;
  --ink-2: #dcc3b0;
  --ink-3: #b99a87;
  --accent: #f6cf57;
  --accent-ink: #2a1411;
  --accent-soft: #4a2a1f;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--read);
  font-size: 1.0625rem;
  line-height: 1.7;
  font-optical-sizing: auto;
}
img, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -4rem; z-index: 20; padding: 0.6rem 1rem; background: var(--accent); color: var(--accent-ink); font-family: var(--label); font-weight: 700; }
.skip:focus { top: 0.5rem; }

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.1; color: var(--ink); text-wrap: balance; }
h2 { font-family: var(--label); font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 800; letter-spacing: 0.005em; margin-bottom: 0.75rem; }
h3 { font-family: var(--label); font-size: 1.45rem; font-weight: 700; margin-bottom: 0.5rem; }
p { margin: 0 0 1rem; max-width: 68ch; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; max-width: 68ch; }
.lede { font-size: 1.2rem; line-height: 1.6; color: var(--ink-2); }
.dek { color: var(--ink-2); font-style: italic; }
main > section, .wrap > section, .recipe > section { margin-block: 3rem; }
.optional, .filled { font-family: var(--label); font-weight: 700; font-size: 0.95rem; }
.optional { color: var(--ink-3); font-style: italic; font-weight: 500; }

/* Masthead */
.masthead { background: var(--bg-2); border-bottom: 1px solid var(--line); }
.masthead__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-block: 0.7rem; }
.brand { display: flex; align-items: baseline; gap: 0.6rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__name { font-family: var(--stencil); font-weight: 800; font-size: 2rem; line-height: 1; letter-spacing: 0.01em; }
.brand__by { font-family: var(--label); font-size: 1.05rem; color: var(--ink-2); font-weight: 500; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0.1rem 1.1rem; list-style: none; margin: 0; padding: 0; max-width: none; }
.nav a { display: inline-block; padding: 0.55rem 0; font-family: var(--label); font-weight: 600; font-size: 1.15rem; color: var(--ink); text-decoration: none; border-bottom: 3px solid transparent; }
.nav a:hover { border-bottom-color: var(--line); }
.nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.theme { display: grid; place-items: center; width: 44px; height: 44px; background: transparent; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); }
.theme svg { width: 22px; height: 22px; }
.theme__sun { display: none; }
:root[data-theme="dark"] .theme__sun { display: block; }
:root[data-theme="dark"] .theme__moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme__sun { display: block; }
  :root:not([data-theme="light"]) .theme__moon { display: none; }
}
@media (max-width: 699px) {
  .masthead__inner { padding-block: 0.5rem; }
  .nav { order: 3; width: 100%; }
}

/* Pictures and the blank shown where one has not been rendered */
picture img { border-radius: var(--radius); width: 100%; }
.photo-missing { display: block; width: 100%; border-radius: var(--radius); background: repeating-linear-gradient(135deg, var(--bg-2) 0 14px, var(--surface) 14px 28px); border: 1px solid var(--line); }

/* Hero */
.hero { position: relative; background: var(--hero-bg); color: var(--hero-ink); overflow: hidden; }
.hero__photo, .hero__photo img, .hero .photo-missing { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 0; border: 0; }
.hero .photo-missing { background: var(--hero-bg); }
.hero__photo { display: block; max-height: 62vh; }
.hero__photo img { max-height: 62vh; }
.hero__text { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(1rem, 4vw, 2.75rem); padding-inline: max(var(--gutter), calc((100% - 1180px) / 2 + var(--gutter))); background: linear-gradient(90deg, rgb(31 14 12 / 0.86), rgb(31 14 12 / 0.55) 45%, transparent 75%); max-width: none; }
.hero__title { font-family: var(--stencil); font-weight: 800; color: var(--hero-ink); font-size: clamp(2.8rem, 9vw, 6.4rem); line-height: 0.92; max-width: 11ch; }
.hero__dek { margin: 0.7rem 0 0; max-width: 34ch; font-size: clamp(1rem, 2.2vw, 1.3rem); color: var(--hero-ink); }
@media (max-width: 699px) {
  .hero__photo, .hero__photo img, .hero .photo-missing { aspect-ratio: 4 / 3; }
  .hero__dek { max-width: none; }
}

/* Tiles: the photograph, with the title set below it on the paper */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 1.5rem 1rem; list-style: none; padding: 0; margin: 1.25rem 0; max-width: none; }
.tiles--featured { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 2rem 1.5rem; }
.tile a { display: block; text-decoration: none; color: var(--ink); }
.tile__photo { display: block; overflow: hidden; border-radius: var(--radius); }
.tile__photo picture img, .tile__photo .photo-missing { aspect-ratio: 4 / 5; object-fit: cover; }
.tile__station { display: block; margin-top: 0.6rem; font-family: var(--label); font-size: 1.05rem; font-weight: 600; color: var(--ink-3); }
.tile__name { display: block; font-family: var(--label); font-weight: 800; font-size: clamp(1.25rem, 4vw, 1.55rem); line-height: 1.05; margin-top: 0.1rem; }
.tile a:hover .tile__name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; text-underline-offset: 0.15em; }
.tiles--featured .tile__name { font-size: 2rem; }

/* Finder: search and cooker chips */
.finder { display: grid; gap: 0.9rem 1.5rem; margin: 0.5rem 0 0.5rem; }
.finder__search { display: grid; gap: 0.25rem; max-width: 30rem; }
.finder__label { font-family: var(--label); font-weight: 700; font-size: 1.1rem; color: var(--ink-2); }
.finder input[type="search"] { width: 100%; min-height: 48px; padding: 0.5rem 0.8rem; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--ink-3); border-radius: var(--radius); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip, .calc__size, .calc__unit, .link-button { background: var(--surface); border: 2px solid var(--ink-3); border-radius: var(--radius); }
.chip { min-height: 44px; padding: 0.3rem 1.1rem; font-family: var(--label); font-weight: 700; font-size: 1.2rem; }
.chip[aria-pressed="true"], .calc__size[aria-pressed="true"], .calc__unit[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.finder__count { min-height: 1.6rem; margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.finder__none { font-size: 1.1rem; }
.link-button { min-height: 44px; padding: 0.3rem 1rem; font-family: var(--label); font-weight: 700; font-size: 1.1rem; }

/* A to Z */
.az__jump { display: flex; flex-wrap: wrap; gap: 0.2rem 0.6rem; margin-top: 1.5rem; font-family: var(--label); font-size: 1.4rem; font-weight: 700; }
.az__jump a { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; }
.az { list-style: none; padding: 0; max-width: none; }
.az li { display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; padding-block: 0.9rem; border-top: 1px solid var(--line); }
.az__name { font-family: var(--label); font-weight: 800; font-size: 1.7rem; line-height: 1.1; color: var(--ink); }
.az__station { font-family: var(--label); font-weight: 600; font-size: 1.1rem; color: var(--ink-3); align-self: center; }
.az__dek { grid-column: 1 / -1; color: var(--ink-2); max-width: 62ch; }

/* The recipe */
.recipe { padding-top: 2rem; }
.recipe-head { display: grid; gap: 1.5rem; align-items: end; }
.recipe-title, .page-title { font-family: var(--stencil); font-weight: 800; line-height: 0.92; font-size: clamp(2.9rem, 9.5vw, 6.2rem); letter-spacing: 0.005em; }
.recipe-dek { font-size: 1.25rem; line-height: 1.55; color: var(--ink-2); margin: 1rem 0 0.5rem; }
.credit { color: var(--ink-3); font-size: 0.95rem; }
.recipe-head__photo picture img, .recipe-head__photo .photo-missing { aspect-ratio: 4 / 5; object-fit: cover; }
@media (min-width: 900px) {
  .recipe-head { grid-template-columns: 1fr minmax(0, 420px); gap: 3rem; }
}

.cook-strip { margin-block: 2rem; border-block: 3px solid var(--ink); }
.cook-strip__facts { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0; }
.fact { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 1rem var(--gutter) 0.9rem; border-bottom: 1px solid var(--line); }
.fact:nth-child(odd) { border-right: 1px solid var(--line); padding-left: 0; }
.fact:nth-last-child(-n + 2):nth-child(odd), .fact:last-child { border-bottom: 0; }
.fact__num { margin: 0; font-family: var(--stencil); font-weight: 800; font-size: clamp(2.6rem, 11vw, 5.4rem); line-height: 0.95; color: var(--accent); }
.fact__num { white-space: nowrap; }
.fact__num .u { font-size: 0.42em; margin-inline: 0.12em 0.3em; font-family: var(--label); font-weight: 700; }
.fact__label { font-family: var(--label); font-weight: 600; font-size: 1.15rem; color: var(--ink-2); margin-top: 0.3rem; }
@media (min-width: 700px) {
  .cook-strip__facts { display: flex; }
  .fact { flex: 1 1 0; border-bottom: 0; border-right: 1px solid var(--line); padding: 1.25rem 1.5rem 1.1rem; }
  .fact:nth-child(odd) { padding-left: 1.5rem; }
  .fact:first-child { padding-left: 0; }
  .fact:last-child { border-right: 0; }
}

.headnote p { font-size: 1.15rem; line-height: 1.7; }

/* Calculator */
.calc { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: flex-end; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-block: 2rem; }
.calc__group { display: grid; gap: 0.4rem; }
.calc__title { font-family: var(--label); font-weight: 700; font-size: 1.1rem; color: var(--ink-2); }
.calc__sizes, .calc__units { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.calc__size { display: grid; justify-items: center; min-width: 72px; min-height: 64px; padding: 0.3rem 0.7rem; line-height: 1.05; }
.calc__x { font-family: var(--label); font-size: 0.95rem; font-weight: 600; }
.calc__n { font-family: var(--stencil); font-weight: 800; font-size: 1.8rem; }
.calc__u { font-family: var(--label); font-size: 0.95rem; font-weight: 600; }
.calc__unit { min-height: 48px; min-width: 88px; padding: 0.3rem 1rem; font-family: var(--label); font-weight: 700; font-size: 1.2rem; }
.qty, .temp, .ing__text { transition: opacity 120ms linear; }
.dip { opacity: 0.1; }

/* Ingredients, tools, method */
.recipe-body { display: grid; gap: 2rem; margin-block: 2.5rem; }
@media (min-width: 900px) {
  .recipe-body { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
  .recipe-side { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow: auto; padding-right: 0.5rem; }
}
.recipe-side section { margin-block: 0 2rem; }
.ing-group + .ing-group { margin-top: 1.25rem; }
.group-title { margin-top: 0.5rem; }
.ing-list, .tool-list, .notes { list-style: none; padding: 0; margin: 0 0 1rem; }
.ing, .tool-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.ing:last-child, .tool-list li:last-child { border-bottom: 0; }
.ing-more { font-size: 0.95rem; color: var(--ink-2); }
.filled { display: inline-block; margin-left: 0.5rem; padding: 0 0.45rem; border: 1px solid var(--ink-3); border-radius: var(--radius); background: var(--accent-soft); color: var(--ink-2); vertical-align: 0.1em; line-height: 1.4; white-space: nowrap; }
.editor-note { font-size: 0.95rem; color: var(--ink-2); max-width: 60ch; }
#method { counter-reset: step; }
.steps { list-style: none; padding: 0; margin: 0 0 1.5rem; max-width: none; }
.steps li { position: relative; counter-increment: step; padding: 0 0 1.4rem 3.6rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -0.1rem; width: 2.6rem; font-family: var(--stencil); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--accent); }
.step__body { max-width: 62ch; }
.notes li { padding: 0.5rem 0; max-width: 64ch; }
.note-group { margin-bottom: 1.25rem; }
.timer { white-space: nowrap; }

/* Tables and details */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; max-width: 100%; }
table { border-collapse: collapse; min-width: 100%; font-size: 1rem; }
caption { text-align: left; font-family: var(--label); font-weight: 700; font-size: 1.2rem; color: var(--ink-2); padding-bottom: 0.4rem; }
th, td { padding: 0.55rem 0.8rem 0.55rem 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
th { font-family: var(--label); font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.alt-unit { display: block; font-size: 0.92rem; color: var(--ink-2); }
.table-note { max-width: 64ch; margin: 0 0 0.75rem; }
.al-right { text-align: right; }
.al-center { text-align: center; }
details { margin: 1rem 0; }
summary { cursor: pointer; font-family: var(--label); font-weight: 700; font-size: 1.25rem; min-height: 44px; display: flex; align-items: center; }
.nf-notes, .sources, .facts, .look { max-width: 64ch; }

/* The Nutrition Facts label: white panel, black type, in both themes */
.nutrition { margin-block: 3rem; }
.nf { width: 100%; max-width: 330px; margin: 1rem 0 1.5rem; padding: 8px 10px 10px; background: #fff; color: #000; border: 1px solid #000; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 0.95rem; line-height: 1.25; }
.nf p, .nf ul { margin: 0; padding: 0; max-width: none; list-style: none; }
.nf b { font-weight: 800; }
.nf__title { font-size: 2.35rem; font-weight: 900; line-height: 1; letter-spacing: -0.01em; border-bottom: 1px solid #000; padding-bottom: 3px; }
.nf__servings { padding-top: 3px; }
.nf__size { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 1.05rem; padding-bottom: 3px; }
.nf__rule { background: #000; }
.nf__rule--heavy { height: 10px; }
.nf__rule--medium { height: 5px; }
.nf__amount { font-weight: 800; font-size: 0.85rem; padding-top: 2px; }
.nf__cal { display: flex; justify-content: space-between; align-items: flex-end; font-size: 1.6rem; line-height: 1.05; padding-bottom: 2px; }
.nf__calnum { font-size: 2.5rem; line-height: 1; }
.nf__dvhead { text-align: right; font-size: 0.85rem; padding: 2px 0; border-bottom: 1px solid #000; }
.nf__row { display: flex; justify-content: space-between; gap: 0.5rem; padding: 2px 0; border-bottom: 1px solid #000; }
.nf__row--1 { padding-left: 1rem; }
.nf__row--2 { padding-left: 2rem; }
.nf__rows--micros .nf__row:last-child { border-bottom: 0; }
.nf__foot { font-size: 0.8rem; line-height: 1.3; padding-top: 4px; }

/* History, related, cards */
.history .dek { font-size: 1.15rem; }
.sources { font-size: 0.97rem; }
.more h2, .history h2 { margin-bottom: 1rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 1.75rem 1.25rem; list-style: none; padding: 0; margin: 1.25rem 0; max-width: none; }
.card a { display: block; text-decoration: none; color: var(--ink); }
.card__photo { display: block; }
.card__photo picture img, .card__photo .photo-missing { aspect-ratio: 1 / 1; object-fit: cover; }
.card__name { display: block; margin-top: 0.6rem; font-family: var(--label); font-weight: 800; font-size: 1.5rem; line-height: 1.05; }
.card a:hover .card__name { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.card__dek { display: block; margin-top: 0.25rem; color: var(--ink-2); font-size: 0.97rem; line-height: 1.5; }
.prose { padding-bottom: 2rem; }

/* Ingredient and tool pages */
.item { padding-top: 2rem; }
.item__head { display: grid; gap: 1.5rem; align-items: end; }
.item__photo picture img, .item__photo .photo-missing { aspect-ratio: 1 / 1; object-fit: cover; }
@media (min-width: 900px) { .item__head { grid-template-columns: 1fr minmax(0, 420px); gap: 3rem; } }

/* The ingredients checklist */
.pantry { display: grid; gap: 2rem; padding-top: 2rem; }
@media (min-width: 900px) { .pantry { grid-template-columns: minmax(0, 1fr) 340px; gap: 3rem; align-items: start; } .ready { position: sticky; top: 1rem; } }
.pantry__aisles { columns: 2 260px; column-gap: 2.5rem; }
.aisle { break-inside: avoid; margin: 0 0 1.5rem; }
.checklist { list-style: none; padding: 0; margin: 0; }
.check { display: flex; align-items: center; gap: 0.7rem; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
.checklist li { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; border-bottom: 1px solid var(--line); }
.check__more { font-family: var(--label); font-weight: 600; font-size: 1.05rem; }
.ready { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1.25rem; }
.ready__hint { font-size: 0.95rem; color: var(--ink-2); }
.ready__list { list-style: none; padding: 0; margin: 0 0 1rem; }
.ready__list li { padding: 0.4rem 0; border-bottom: 1px solid var(--line); }
.ready__list small { display: block; color: var(--ink-2); }

/* Cookout timeline */
.timeline { list-style: none; padding: 0; margin: 2rem 0; max-width: none; }
.tl { display: grid; grid-template-columns: 7.5rem 1fr; gap: 0 1.25rem; padding: 1rem 0 1rem 1rem; border-left: 6px solid var(--line); border-bottom: 1px solid var(--line); }
.tl--smoker { border-left-color: var(--accent); }
.tl--grill { border-left-color: var(--ink-3); }
.tl__when { font-family: var(--stencil); font-weight: 800; font-size: 1.6rem; line-height: 1.05; color: var(--ink); grid-row: span 2; }
.tl__cooker { font-family: var(--label); font-weight: 700; font-size: 1.1rem; color: var(--ink-2); }
.tl__text { margin: 0; max-width: 60ch; }
@media (max-width: 520px) { .tl { grid-template-columns: 1fr; } .tl__when { grid-row: auto; } }
.back-links { list-style: none; padding: 0; font-family: var(--label); font-weight: 700; font-size: 1.6rem; }
.back-links a { display: inline-block; padding: 0.3rem 0; }
.moved { padding-block: 3rem; }

/* Footer */
.colophon { margin-top: 4rem; padding-top: 2.5rem; background: var(--bg-2); border-top: 1px solid var(--line); }
.colophon__grid { display: grid; gap: 2rem; }
@media (min-width: 700px) { .colophon__grid { grid-template-columns: 2fr 1fr 1fr; } }
.colophon h2 { font-size: 1.3rem; margin-bottom: 0.3rem; color: var(--ink-2); }
.colophon ul { list-style: none; padding: 0; margin: 0; }
.colophon li a { display: inline-block; padding: 0.3rem 0; font-family: var(--label); font-weight: 600; font-size: 1.15rem; }
.colophon__name { font-family: var(--stencil); font-weight: 800; font-size: 2.4rem; line-height: 1; margin-bottom: 0.4rem; }
.colophon__fine { padding-block: 1.5rem 2rem; color: var(--ink-2); font-size: 0.93rem; }
.colophon__fine p { max-width: 74ch; margin-bottom: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .masthead, .colophon, .calc, .hero { display: none; }
  body { background: #fff; color: #000; }
}
