/*
 * afl.css -- afoodlover.com on Volt.
 *
 * The WordPress site wore Twenty Twenty-One plus Elementor's framework plus
 * WooCommerce's stylesheet: roughly 300KB of CSS to render a recipe. This is
 * the whole design, hand-written, in one file with no build step.
 *
 * Editorial rather than "blog template": generous measure, real hierarchy, and
 * the recipe itself treated as the primary object on the page.
 */

:root {
  --ink: #2b2620;
  --ink-soft: #6b6357;
  --ink-faint: #9a9184;
  --paper: #faf6ec;
  --card: #fffdf9;
  --rule: #e6e0d4;
  --accent: #c6793a;
  --accent-dark: #9a5a26;
  --measure: 34rem;
  --wide: 74rem;
  --radius: 10px;
  --font: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece5da; --ink-soft: #a89e90; --ink-faint: #7d7466;
    --paper: #17150f; --card: #1f1c15; --rule: #332e24;
    --accent: #e0954f; --accent-dark: #f0b578;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--font);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 2em; }
h3 { font-size: 1.2rem; margin-top: 1.6em; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .875em; }
pre {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 1rem 1.1rem; overflow-x: auto;
}

.afl-skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.afl-skip:focus { left: 1rem; top: 1rem; }

/* ------------------------------------------------------------------ masthead */
.afl-masthead { border-bottom: 1px solid var(--rule); background: var(--card); }
.afl-bar {
  max-width: var(--wide); margin: 0 auto;
  display: flex; align-items: center; gap: 1.25rem;
  padding: .85rem 1.25rem;
}
.afl-logo img { height: 40px; width: auto; }
.afl-burger {
  margin-left: auto; font: 600 .85rem/1 var(--sans);
  background: none; border: 1px solid var(--rule); color: var(--ink);
  padding: .5rem .8rem; border-radius: 999px; cursor: pointer;
}
.afl-list-link {
  font: 600 .8rem/1 var(--sans); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px; padding: .5rem .8rem;
  color: var(--ink);
}
.afl-list-count {
  display: inline-block; min-width: 1.4em; text-align: center;
  background: var(--accent); color: #fff; border-radius: 999px;
  font-size: .75rem; padding: 0 .35em; margin-left: .25em;
}

/* nav */
.afl-nav { list-style: none; margin: 0; padding: 0; }
.afl-nav--0 { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.afl-nav--0 > li { position: relative; }
.afl-nav--0 > li > a {
  font: 600 .9rem/1 var(--sans); text-decoration: none; color: var(--ink);
  padding: .4rem 0; display: inline-block;
}
.afl-nav--0 > li > a:hover { color: var(--accent); }
.afl-nav--1, .afl-nav--2 {
  display: none; position: absolute; top: 100%; left: 0; z-index: 20;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: .5rem; min-width: 12rem; box-shadow: 0 8px 30px rgba(0,0,0,.09);
}
.afl-nav--0 > li:hover > .afl-nav--1,
.afl-nav--0 > li:focus-within > .afl-nav--1 { display: block; }
.afl-nav--1 li { position: relative; }
.afl-nav--1 a { display: block; padding: .4rem .6rem; font: .9rem/1.3 var(--sans); text-decoration: none; color: var(--ink); border-radius: 6px; }
.afl-nav--1 a:hover { background: var(--paper); color: var(--accent); }
.afl-nav--2 { position: static; display: block; border: 0; box-shadow: none; padding: 0 0 .3rem .8rem; min-width: 0; }
.afl-nav--2 a { font-size: .84rem; color: var(--ink-soft); }

@media (max-width: 860px) {
  .afl-primary { display: none; width: 100%; order: 3; }
  .afl-primary[data-open="1"] { display: block; }
  .afl-nav--0 { flex-direction: column; gap: .2rem; }
  .afl-nav--1, .afl-nav--2 { display: block; position: static; border: 0; box-shadow: none; padding-left: 1rem; min-width: 0; background: none; }
}

/* ---------------------------------------------------------------------- main */
.afl-main { max-width: var(--wide); margin: 0 auto; padding: 2.5rem 1.25rem 3rem; }
.afl-prose { max-width: var(--measure); }
.afl-prose p, .afl-prose ul, .afl-prose ol { margin: 0 0 1.15em; }
.afl-prose > h2, .afl-prose > h3 { max-width: var(--measure); }
.afl-lede { font-size: 1.2rem; color: var(--ink-soft); max-width: var(--measure); margin: 0 0 1.5rem; }
.afl-wordmark { font-size: clamp(2.4rem, 7vw, 4rem); margin-bottom: .1em; }

.afl-hero {
  width: 100%; border-radius: var(--radius); margin: 1.5rem 0 2rem;
  aspect-ratio: 3 / 2; object-fit: cover;
}

/* -------------------------------------------------------------------- recipe */
.afl-recipe__head { max-width: var(--measure); }
.afl-facts {
  display: flex; flex-wrap: wrap; gap: 0 2rem; margin: 1.25rem 0;
  padding: .9rem 0; border-block: 1px solid var(--rule);
  font-family: var(--sans);
}
.afl-facts div { display: flex; flex-direction: column; gap: .15rem; }
.afl-facts dt { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-faint); }
.afl-facts dd { margin: 0; font-weight: 600; font-size: .95rem; }

.afl-stars { color: var(--accent); font-size: 1rem; }
.afl-stars span { color: var(--ink-faint); font-size: .82rem; font-family: var(--sans); }

.afl-two {
  display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
  gap: 3rem; align-items: start; margin-top: 2.5rem;
}
@media (max-width: 800px) { .afl-two { grid-template-columns: 1fr; gap: 2rem; } }

.afl-ingredients {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 1.25rem 1.4rem;
  position: sticky; top: 1rem;
}
@media (max-width: 800px) { .afl-ingredients { position: static; } }
.afl-ing-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.afl-ing-head h2 { margin: 0; font-size: 1.15rem; flex: 1 0 100%; }

.afl-card__ingredients { list-style: none; padding: 0; margin: 0 0 1rem; font-family: var(--sans); font-size: .93rem; }
.afl-card__ingredients li { padding: .42rem 0; border-bottom: 1px dotted var(--rule); }
.afl-card__ingredients li:last-child { border-bottom: 0; }
.afl-qty { font-variant-numeric: tabular-nums; font-weight: 700; }
.afl-unit { color: var(--ink-soft); }
.afl-ing-ref { border-bottom: 1px dotted currentColor; text-decoration: none; }

.afl-servings-control { display: inline-flex; align-items: center; gap: .4rem; font-family: var(--sans); font-size: .85rem; }
.afl-servings-control button {
  width: 1.8rem; height: 1.8rem; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink);
  font-size: 1rem; line-height: 1; display: grid; place-items: center;
}
.afl-servings-control button:hover { border-color: var(--accent); color: var(--accent); }
.afl-servings-control output { font-weight: 700; min-width: 1.6ch; text-align: center; font-variant-numeric: tabular-nums; }

.afl-units-toggle, .afl-add-to-list {
  font: 600 .78rem/1 var(--sans); cursor: pointer;
  border: 1px solid var(--rule); background: var(--paper); color: var(--ink-soft);
  border-radius: 999px; padding: .4rem .75rem;
}
.afl-units-toggle[data-mode="imperial"] { border-color: var(--accent); color: var(--accent); }
.afl-add-to-list { width: 100%; margin-top: .5rem; padding: .6rem; }
.afl-add-to-list:hover { border-color: var(--accent); color: var(--accent); }

.afl-card__steps { padding-left: 1.2rem; }
.afl-card__steps li { margin-bottom: 1.1em; padding-left: .3rem; }
.afl-equip { font-family: var(--sans); font-size: .88rem; color: var(--ink-soft); padding-left: 1.1rem; }

.afl-timer {
  font: 600 .78rem/1 var(--sans); font-variant-numeric: tabular-nums;
  padding: .3rem .7rem; margin-left: .4rem; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 999px;
  background: var(--paper); color: var(--ink-soft);
}
.afl-timer.is-running { border-color: var(--accent); color: var(--accent); }
.afl-timer.is-done { border-color: #6f9c6f; color: #4d7a4d; }

.afl-nutrition {
  list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1.5rem;
  font-family: var(--sans); font-size: .88rem; color: var(--ink-soft);
}
.afl-nutrition b { color: var(--ink); font-size: 1.05rem; }

.afl-taxo { margin-top: 2.5rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.afl-chip {
  font: 600 .75rem/1 var(--sans); text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .35rem .75rem; color: var(--ink-soft); text-transform: capitalize;
}
.afl-chip:hover { border-color: var(--accent); color: var(--accent); }

/* --------------------------------------------------------------------- index */
.afl-facets { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.afl-facets input, .afl-facets select {
  font: .9rem var(--sans); padding: .55rem .7rem;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--card); color: var(--ink);
}
.afl-facets input { flex: 1 1 14rem; }
.afl-facets input:focus, .afl-facets select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.afl-count { font-family: var(--sans); font-size: .85rem; color: var(--ink-soft); }

#afl-results, .afl-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.75rem 1.4rem; margin: 1.5rem 0 2rem;
}
#afl-results[data-empty="1"]::after {
  content: "Nothing matches those filters."; grid-column: 1 / -1;
  color: var(--ink-faint); font-family: var(--sans); font-size: .9rem; padding: 2rem 0;
}
.afl-tile a { text-decoration: none; color: inherit; }
.afl-tile img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.afl-tile h3 { font-size: 1.05rem; margin: .6rem 0 .2rem; }
.afl-tile:hover h3 { color: var(--accent); }
.afl-tile__meta { margin: 0; font: .8rem var(--sans); color: var(--ink-faint); }

/* ----------------------------------------------------------- embedded card */
.afl-card {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 2rem 0;
  max-width: var(--measure);
}
.afl-card__title { margin: 0 0 .3rem; font-size: 1.25rem; }
.afl-card__title a { text-decoration: none; color: inherit; }
.afl-card__meta {
  margin: 0 0 1rem; font: .84rem var(--sans); color: var(--ink-soft);
  display: flex; flex-wrap: wrap; align-items: center; gap: .9rem;
}

/* -------------------------------------------------------------- constructs */
.afl-callout {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
  padding: .9rem 1.15rem; margin: 1.6rem 0; border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--measure);
}
.afl-callout__label {
  display: block; font: 700 .68rem/1 var(--sans); letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: .45rem;
}
.afl-callout p:last-child { margin-bottom: 0; }
.afl-callout--warning { border-left-color: #b4453a; background: color-mix(in srgb, #b4453a 7%, var(--card)); }
.afl-callout--warning .afl-callout__label { color: #9a3229; }

.afl-in-season { margin: 1.5rem 0; }
.afl-in-season h4 { font: 700 .72rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.afl-in-season ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.afl-in-season a {
  display: inline-block; padding: .3rem .75rem; text-decoration: none;
  border: 1px solid var(--rule); border-radius: 999px; font: .85rem var(--sans); color: var(--ink);
}
.afl-in-season a:hover { border-color: var(--accent); color: var(--accent); }

.afl-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .8rem; margin: 1.5rem 0; }
.afl-gallery img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; }
.afl-figure { margin: 1.5rem 0; }
.afl-figure figcaption { font: .84rem var(--sans); color: var(--ink-faint); margin-top: .5rem; }
.afl-more { border: 0; border-top: 1px dashed var(--rule); margin: 2rem 0; }
.afl-reusable { border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1rem; color: var(--ink-soft); }

table { border-collapse: collapse; width: 100%; font: .9rem var(--sans); margin: 1.5rem 0; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--rule); }
thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }
tfoot td { font-weight: 600; border-top: 2px solid var(--rule); }

/* ---------------------------------------------------- Elementor -> sections */
.afl-section { margin: 0 -1.25rem; padding: 3.5rem 1.25rem; }
.afl-section > .afl-col { max-width: var(--wide); margin: 0 auto; }
.afl-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; max-width: var(--wide); margin-inline: auto; }
@media (max-width: 760px) { .afl-cols-3 { grid-template-columns: 1fr; } }
.afl-el-image { border-radius: var(--radius); aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.afl-divider { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }
.afl-btn {
  display: inline-block; background: var(--accent); color: #fff;
  font: 600 .9rem/1 var(--sans); text-decoration: none;
  padding: .8rem 1.4rem; border-radius: 999px;
}
.afl-btn:hover { background: var(--accent-dark); color: #fff; }
.afl-btn-wrap { margin: 1.5rem 0; }

.afl-accordion details {
  border-bottom: 1px solid var(--rule); padding: .3rem 0;
  max-width: var(--measure);
}
.afl-accordion summary {
  cursor: pointer; padding: .8rem 0; font-weight: 600;
  font-family: var(--sans); font-size: .98rem; list-style-position: outside;
}
.afl-accordion summary:hover { color: var(--accent); }

/* ------------------------------------------------------------------- posts */
.afl-post, .afl-page { max-width: var(--measure); }
.afl-post-card { border-top: 1px solid var(--rule); padding: 1.25rem 0; max-width: var(--measure); }
.afl-post-card h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.afl-post-card h3 a { text-decoration: none; color: inherit; }
.afl-post-card h3 a:hover { color: var(--accent); }
.afl-post-card p { margin: .3rem 0 0; color: var(--ink-soft); font-size: .95rem; }

.afl-comments { margin-top: 3rem; max-width: var(--measure); }
.afl-comments ul { list-style: none; padding: 0; }
.afl-comment { border-left: 2px solid var(--rule); padding: .6rem 0 .6rem 1rem; margin: .8rem 0; }
.afl-comment b { font-family: var(--sans); font-size: .9rem; }
.afl-comment time { font: .78rem var(--sans); color: var(--ink-faint); margin-left: .4rem; }
.afl-comment ul { margin-left: .5rem; }

/* ---------------------------------------------------------------- sidebar */
.afl-sidebar {
  max-width: var(--wide); margin: 0 auto; padding: 2rem 1.25rem;
  border-top: 1px solid var(--rule);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 2rem;
  font-family: var(--sans); font-size: .88rem;
}
.afl-widget h4 { font: 700 .7rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .7rem; }
.afl-widget ul { list-style: none; padding: 0; margin: 0; }
.afl-widget li { padding: .2rem 0; }
.afl-widget a { text-decoration: none; }
.afl-widget a:hover { text-decoration: underline; }
.afl-tags a {
  display: inline-block; font-size: .78rem; padding: .15rem .55rem; margin: 0 .2rem .3rem 0;
  border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-soft);
}

/* ----------------------------------------------------------------- footer */
.afl-footer {
  border-top: 1px solid var(--rule); background: var(--card);
  padding: 2rem 1.25rem 3rem; font-family: var(--sans); font-size: .85rem;
}
.afl-footer nav { max-width: var(--wide); margin: 0 auto 1rem; }
.afl-footer .afl-nav--0 { gap: 1.25rem; }
.afl-footer a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.afl-footer a:hover { color: var(--accent); }
.afl-colophon { max-width: var(--wide); margin: 0 auto; color: var(--ink-faint); }

/* ----------------------------------------------------------- list dialog */
.afl-list-dialog {
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--card); color: var(--ink);
  padding: 1.5rem; max-width: 30rem; width: calc(100% - 2rem);
}
.afl-list-dialog::backdrop { background: rgba(0,0,0,.45); }
.afl-list { list-style: none; padding: 0; font-family: var(--sans); font-size: .9rem; }
.afl-list li { display: flex; gap: .5rem; align-items: center; padding: .35rem 0; border-bottom: 1px dotted var(--rule); }
.afl-list label { flex: 1; display: flex; gap: .5rem; align-items: center; }
.afl-list button { border: 0; background: none; color: var(--ink-faint); cursor: pointer; }
.afl-list-dialog menu { display: flex; gap: .6rem; justify-content: flex-end; padding: 1rem 0 0; margin: 0; }
.afl-list-dialog menu button {
  font: 600 .82rem var(--sans); cursor: pointer; padding: .5rem 1rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); color: var(--ink);
}
