/* food.slade.run shared styles */
:root {
  --ink: #3a2418;
  --muted: #7a6255;
  --bg: #fff7ec;
  --dot: #f5e2c6;
  --card: #fff;
  --coral: #ff6b57;
  --mint: #8fd3c4;
  --butter: #ffd166;
  --pink: #ffc2cf;
  --sky: #b7def2;
  --lilac: #d9c8f5;
  --radius: 22px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.6px, transparent 1.8px);
  background-size: 22px 22px;
  font: 17px/1.55 ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 720px; margin: 0 auto; padding: 22px 18px 72px; }
a { color: var(--coral); font-weight: 700; }

/* Characters */
.char { display: block; width: 56px; height: 56px; }
.bob { animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.bob:nth-child(2) { animation-delay: .25s; }
.bob:nth-child(3) { animation-delay: .5s; }
.bob:nth-child(4) { animation-delay: .75s; }
.bob:nth-child(5) { animation-delay: 1s; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-7px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) { .bob, .card .char { animation: none !important; transition: none !important; } }

.parade { display: flex; align-items: flex-end; gap: 4px; margin: 6px 0 4px; }
.parade .char { width: 58px; height: 58px; }

/* Type */
h1 { font-size: 2.6rem; line-height: 1.05; font-weight: 900; letter-spacing: -.02em; margin: 8px 0 6px; }
h1 .squiggle { background: linear-gradient(transparent 62%, var(--butter) 62%); padding: 0 4px; border-radius: 4px; }
.sub { color: var(--muted); margin: 0 0 18px; font-size: 1.05rem; }
h2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.45rem; font-weight: 900; margin: 40px 0 12px;
}
h2 .char { width: 48px; height: 48px; flex: none; }
h2 mark { color: inherit; background: linear-gradient(transparent 60%, var(--pink) 60%); padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
h3 {
  display: inline-block; margin: 20px 0 8px;
  font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  background: var(--mint); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px;
}
h3.butter { background: var(--butter); }
h3.pink { background: var(--pink); }
h3.sky { background: var(--sky); }
h3.lilac { background: var(--lilac); }

/* Sticker surfaces */
.sticker, .card, table, .checklist, input[type=search] {
  background: var(--card);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 4px 4px 0 var(--ink);
}

/* Pill links and buttons */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: .9rem; font-weight: 800; text-decoration: none; color: var(--ink);
  background: var(--card); border: 2px solid var(--ink); border-radius: 999px;
  padding: 5px 14px; box-shadow: 2px 2px 0 var(--ink); cursor: pointer;
}
.pill:active { transform: translate(2px, 2px); box-shadow: none; }
.pill[aria-pressed=true] { background: var(--coral); color: #fff; }

/* Speech bubble */
.bubble { display: flex; align-items: center; gap: 12px; margin: 18px 0 6px; }
.bubble .char { width: 76px; height: 76px; flex: none; }
.bubble p {
  position: relative; margin: 0; padding: 12px 15px;
  background: var(--butter); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink);
  font-weight: 600;
}
.bubble p::before {
  content: ""; position: absolute; left: -11px; top: 50%; width: 16px; height: 16px; margin-top: -8px;
  background: var(--butter); border-left: 2.5px solid var(--ink); border-bottom: 2.5px solid var(--ink);
  transform: rotate(45deg); border-radius: 0 0 0 4px;
}

/* Checklist */
.checklist { list-style: none; margin: 0; padding: 4px 16px; }
.checklist li { padding: 10px 0; border-bottom: 2px dashed #ecdcc6; }
.checklist li:last-child { border-bottom: 0; }
.checklist label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.checklist input {
  -webkit-appearance: none; appearance: none; flex: none;
  width: 26px; height: 26px; margin: 0; margin-top: 1px;
  border: 2.5px solid var(--ink); border-radius: 9px; background: #fff; cursor: pointer;
  transition: background-color .15s, transform .15s;
}
.checklist input:checked {
  background: var(--coral) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
  transform: rotate(-6deg) scale(1.05);
}
.checklist input:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }

/* Steps */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; }
ol.steps li { counter-increment: step; position: relative; padding: 2px 0 14px 46px; }
ol.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; display: grid; place-items: center;
  font-weight: 900; font-size: .95rem; background: var(--mint);
  border: 2.5px solid var(--ink); border-radius: 50%;
}
ol.steps.butter li::before { background: var(--butter); }
ol.steps.pink li::before { background: var(--pink); }

/* Tables */
table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; }
th, td { text-align: left; vertical-align: top; padding: 11px 13px; border-bottom: 2px dashed #ecdcc6; }
th { background: var(--butter); font-size: .8rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; border-bottom: 2.5px solid var(--ink); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 800; }
/* Timeline */
ol.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 3px dashed var(--ink); }
ol.timeline li { position: relative; margin: 0 0 16px; padding: 12px 14px 12px 16px; background: var(--card);
  border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); }
ol.timeline li::before { content: ""; position: absolute; left: -30px; top: 16px; width: 16px; height: 16px;
  background: var(--coral); border: 2.5px solid var(--ink); border-radius: 50%; }
ol.timeline li:nth-child(even)::before { background: var(--mint); }
ol.timeline .when { display: inline-block; font-size: .82rem; font-weight: 900; color: #fff; background: var(--coral);
  border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
ol.timeline p { margin: 0; }

/* Tips */
ul.tips { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
ul.tips li { padding: 13px 15px; }
ul.tips li:nth-child(4n+1) { background: #fff3d6; }
ul.tips li:nth-child(4n+2) { background: #e3f6f1; }
ul.tips li:nth-child(4n+3) { background: #ffe8ee; }
ul.tips li:nth-child(4n+4) { background: #eaf4fb; }

footer { margin-top: 44px; color: var(--muted); font-size: .88rem; text-align: center; }
footer .parade { justify-content: center; opacity: .9; }
footer .parade .char { width: 34px; height: 34px; }

/* Home page */
.tools { display: flex; flex-direction: column; gap: 12px; margin: 6px 0 24px; }
input[type=search] { width: 100%; padding: 13px 16px; font: inherit; color: var(--ink); border-radius: 16px; }
input[type=search]:focus { outline: 3px solid var(--butter); outline-offset: 2px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
a.card { display: flex; flex-direction: column; overflow: hidden; color: inherit; text-decoration: none; font-weight: 400; transition: transform .15s, box-shadow .15s; }
a.card:hover, a.card:focus-visible { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
a.card:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.card-top { display: grid; place-items: center; height: 108px; border-bottom: 2.5px solid var(--ink); background: var(--butter);
  background-image: radial-gradient(rgba(255,255,255,.55) 2px, transparent 2.2px); background-size: 16px 16px; }
.card-top .char { width: 86px; height: 86px; transition: transform .2s; }
a.card:hover .card-top .char { transform: rotate(-8deg) scale(1.08); }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.card-body h2 { margin: 0; font-size: 1.25rem; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .76rem; font-weight: 800; background: #f6ecdf; border-radius: 999px; padding: 2px 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; font-weight: 700; color: var(--muted); margin-top: auto; padding-top: 4px; }
.empty[hidden] { display: none; }
.empty { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; }
.empty .char { width: 56px; height: 56px; }

@media print {
  body { background: #fff; }
  .bob { animation: none; }
  .sticker, .card, table, .checklist { box-shadow: none; }
}
