@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-full-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-latin-full-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --linen: #efe4cf;
  --linen-2: #e6d8bd;
  --card: #fffdf5;
  --ink: #3b2f2a;
  --muted: #7a6a5c;
  --tomato: #b9432c;
  --tomato-2: #cf5338;
  --tomato-tint: #f6ddd3;
  --sage: #5f7f5a;
  --sage-tint: #e3ead8;
  --mustard: #d9a23f;
  --rule: #dce7ee;
  --margin: #eab0a6;
  --line: #e2d3b8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.18) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgb(120 90 50 / 0.05) 0 1px, transparent 1px 5px);
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--mustard); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hand { font-family: var(--hand); font-weight: 500; }
.art { display: block; width: 100%; height: auto; }

/* Demo bar */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 14px; padding: 2px 14px; background: #3b2f2a; color: #f6ecd9; font-size: 14px; font-family: system-ui, sans-serif; }
.demo-bar__note { margin: 0; display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.demo-bar__note strong { padding: 1px 10px; border-radius: 999px; background: var(--mustard); color: #2a1e10; }
.demo-bar__actions { display: flex; gap: 4px; margin-left: auto; }
.demo-bar__reset, .demo-bar__made { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border: 0; background: none; color: #f6ecd9; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.demo-bar__made { color: #f3cf8a; }

.shell { max-width: 1160px; margin: 0 auto; padding: 26px 16px 48px; }

/* Header */
.top { position: relative; display: grid; gap: 4px; margin-bottom: 22px; }
.top__from { margin: 0; font-size: 26px; color: var(--tomato); transform: rotate(-2deg); transform-origin: left; }
.top h1 {
  margin: 0;
  font-size: clamp(48px, 12vw, 86px);
  font-weight: 650;
  line-height: 0.95;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.top__lede { margin: 6px 0 0; color: var(--muted); font-size: 18px; max-width: 34ch; }
.top__stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.top__stats strong { color: var(--ink); font-size: 20px; }
.top__add { justify-self: start; margin-top: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 650;
  font-size: 16px;
  transition: transform 0.12s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn--tomato { background: var(--tomato); color: #fff; box-shadow: 0 6px 14px -8px rgb(185 67 44 / 0.9); }
.btn--tomato:hover { background: var(--tomato-2); }
.btn--sage { background: var(--sage); color: #fff; }

/* Finder */
.finder { display: grid; gap: 12px; margin-bottom: 26px; }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: inset 0 1px 2px rgb(60 40 20 / 0.06);
}
.search .icon { color: var(--muted); }
.search input { flex: 1; min-width: 0; min-height: 48px; border: 0; background: none; font-size: 17px; outline: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-family: system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
}
.chip--on { border-color: var(--ink); background: var(--ink); color: #fbf3e2; }

/* Featured */
.featured {
  display: grid;
  gap: 4px;
  margin-bottom: 30px;
  padding: 18px;
  border-radius: 6px;
  background: var(--card);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 18px 34px -24px rgb(70 45 20 / 0.6);
  border-top: 6px solid var(--tomato);
}
.featured__text {
  padding-top: 4px;
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, var(--rule) 31px 32px);
  background-position: 0 2px;
}
.featured__art { max-width: 300px; margin: -4px auto 4px; }
.featured__kicker { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--tomato); font-family: system-ui, sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.featured h2 { margin: 2px 0 0; font-size: 36px; line-height: 1.05; font-weight: 650; font-variation-settings: "SOFT" 100, "WONK" 1; }
.featured__note { margin: 6px 0 4px; font-size: 27px; line-height: 1.15; color: #2f4f7a; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0 0; font-family: system-ui, sans-serif; font-size: 14px; color: var(--muted); }
.meta span { margin-left: auto; font-weight: 650; color: var(--sage); }

/* Recipe box */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 30px; font-weight: 600; font-variation-settings: "SOFT" 100; }
.section-head p { margin: 0; font-family: system-ui, sans-serif; font-size: 14px; color: var(--muted); }
.empty { color: var(--muted); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cards li { min-width: 0; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 5px;
  background: var(--card);
  text-decoration: none;
  box-shadow: 0 1px 0 var(--line), 0 14px 26px -22px rgb(70 45 20 / 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.card:hover { transform: translateY(-3px) rotate(-0.4deg); box-shadow: 0 1px 0 var(--line), 0 22px 30px -20px rgb(70 45 20 / 0.6); }
.card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 1;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tomato);
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.card__art { padding: 10px 10px 0; background: linear-gradient(#f8efdc, var(--card)); }
.card__body {
  flex: 1;
  padding: 8px 12px 12px;
  border-top: 2px solid var(--margin);
  background-image: repeating-linear-gradient(180deg, transparent 0 23px, var(--rule) 23px 24px);
  background-position: 0 7px;
}
.card__cat { margin: 0; font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sage); }
.card h3 { margin: 2px 0 0; font-size: 19px; line-height: 1.2; font-weight: 600; }
.card__note { margin: 4px 0 0; font-size: 19px; line-height: 1.2; color: #2f4f7a; }
.card .meta { font-size: 12.5px; }

/* Family notes */
.family { margin-top: 36px; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.notes li { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 6px; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.notes__who { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--sage-tint); color: var(--sage); font-weight: 700; font-size: 18px; }
.notes__head { margin: 0; font-family: system-ui, sans-serif; font-size: 15px; display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.notes__head a { font-weight: 650; color: var(--tomato); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; min-height: 44px; align-items: center; margin: -12px 0; }
.notes__head span { color: var(--muted); font-size: 13px; margin-left: auto; }
.notes__text { margin: 2px 0 0; font-size: 23px; line-height: 1.2; color: #2f4f7a; }

/* Recipe page */
.back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 8px; font-family: system-ui, sans-serif; font-weight: 650; text-decoration: none; color: var(--tomato); }
.recipe__head { display: grid; gap: 10px; }
.recipe__art { max-width: 380px; padding: 12px; border-radius: 6px; background: var(--card); box-shadow: 0 1px 0 var(--line), 0 18px 30px -24px rgb(70 45 20 / 0.6); }
.recipe__titles h1 { margin: 2px 0 0; font-size: clamp(38px, 9vw, 64px); line-height: 1; font-weight: 650; font-variation-settings: "SOFT" 100, "WONK" 1; }
.recipe__note { margin: 10px 0 0; font-size: 28px; line-height: 1.15; color: #2f4f7a; }
.recipe__note .icon { display: inline-block; vertical-align: -3px; margin-right: 8px; color: var(--tomato); width: 22px; height: 22px; }
.recipe__note span { display: block; margin-top: 2px; font-size: 22px; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; }
.facts div { padding: 8px 10px; border-radius: 6px; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.facts dt { font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.25; }
.recipe__cols { display: grid; gap: 18px; margin-top: 22px; }
.sheet {
  padding: 18px 16px;
  border-radius: 6px;
  background: var(--card);
  box-shadow: 0 1px 0 var(--line), 0 18px 34px -26px rgb(70 45 20 / 0.6);
  border-top: 2px solid var(--margin);
}
.sheet__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet__head h2 { margin: 0; font-size: 26px; font-weight: 600; }
.sheet__head p { margin: 0; font-family: system-ui, sans-serif; font-size: 14px; color: var(--muted); }
.sheet__hint { margin: 10px 0 0; font-family: system-ui, sans-serif; font-size: 14px; color: var(--muted); }
.scale { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--linen); }
.scale__opt { position: relative; }
.scale__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.scale__opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-family: system-ui, sans-serif; font-size: 14px; font-weight: 650; color: var(--muted); }
.scale__opt--on span { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(60 40 20 / 0.2); }
.scale__opt input:focus-visible + span { outline: 3px solid var(--mustard); }
.ticks, .steps { list-style: none; margin: 0; padding: 0; display: grid; }
.tick, .step { position: relative; display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 10px 2px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.ticks li:last-child .tick, .steps li:last-child .step { border-bottom: 0; }
.tick input, .step input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tick__box { display: grid; place-items: center; width: 24px; height: 24px; flex: none; margin-top: 1px; border: 2px solid #b8a68f; border-radius: 6px; color: transparent; background: #fff; }
.tick--on .tick__box { border-color: var(--sage); background: var(--sage); color: #fff; }
.tick--on .tick__text { color: var(--muted); text-decoration: line-through; text-decoration-color: rgb(95 127 90 / 0.6); }
.tick input:focus-visible ~ .tick__box, .step input:focus-visible ~ .step__num { outline: 3px solid var(--mustard); outline-offset: 2px; }
.step__num { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--tomato-tint); color: var(--tomato); font-weight: 700; }
.step--on .step__num { background: var(--sage); color: #fff; }
.step--on .step__text { color: var(--muted); }
.family--recipe .section-head { align-items: center; }

/* Make your own */
.own { margin-top: 40px; padding: 22px; border: 2px dashed #c7b18f; border-radius: 8px; background: rgb(255 253 245 / 0.55); }
.own__label { margin: 0; font-family: system-ui, sans-serif; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--tomato); }
.own__words { margin: 8px 0; font-size: 22px; line-height: 1.35; font-style: italic; }
.own__note { margin: 0; font-family: system-ui, sans-serif; font-size: 14px; color: var(--muted); }

/* Dialog */
.dialog { width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 10px; background: var(--card); color: var(--ink); box-shadow: 0 30px 60px -20px rgb(60 40 20 / 0.55); border-top: 6px solid var(--tomato); }
.dialog::backdrop { background: rgb(59 47 42 / 0.55); }
.dialog__body { padding: 18px 18px 22px; }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.dialog__title { margin: 0; font-size: 26px; font-weight: 650; line-height: 1.15; }
.dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.dialog__close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.form { display: grid; gap: 14px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field__label { padding: 0; font-family: system-ui, sans-serif; font-weight: 650; font-size: 14px; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 16px; }
.field textarea { resize: vertical; line-height: 1.4; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--tomato); box-shadow: 0 0 0 3px rgb(185 67 44 / 0.15); }
.art-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.art-pick { position: relative; }
.art-pick input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.art-pick span { display: grid; justify-items: center; gap: 2px; padding: 6px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-family: system-ui, sans-serif; font-size: 12px; font-weight: 600; color: var(--muted); }
.art-pick input:checked + span { border: 2px solid var(--tomato); background: var(--tomato-tint); color: var(--ink); }
.art-pick input:focus-visible + span { outline: 3px solid var(--mustard); }
.form__problem { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--tomato-tint); color: var(--tomato); font-family: system-ui, sans-serif; font-weight: 650; }
.form__actions { display: flex; justify-content: flex-end; }

.toast-region { position: fixed; left: 0; right: 0; bottom: 18px; z-index: 20; display: grid; justify-items: center; pointer-events: none; }
.toast { margin: 0 16px; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fbf3e2; font-family: system-ui, sans-serif; font-weight: 600; box-shadow: 0 16px 30px -14px rgb(60 40 20 / 0.8); animation: toast-in 0.25s ease; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

@media (min-width: 700px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .featured { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: center; gap: 32px; padding: 22px 32px; }
  .featured__art { max-width: none; margin: 0; }
  .finder { grid-template-columns: minmax(260px, 1fr) auto; align-items: center; }
}

@media (min-width: 1000px) {
  .shell { padding: 40px 28px 64px; }
  .top { grid-template-columns: 1fr auto; align-items: end; }
  .top > * { grid-column: 1; }
  .top__add { grid-column: 2; grid-row: 3 / 5; align-self: end; margin: 0; }
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .featured h2 { font-size: 46px; }
  .recipe__head { grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 32px; align-items: center; }
  .recipe__cols { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: start; gap: 24px; }
  .sheet { padding: 22px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
