/* Recipe Bandit — light-hearted bandit theme: warm paper, deep green, gold. */
:root {
  --bg: #fdf8f0;
  --surface: #ffffff;
  --ink: #26221c;
  --muted: #6f675c;
  --line: #e8ddcd;
  --accent: #2f6b3a;
  --accent-soft: #e6f0e4;
  --accent-ink: #1e4a26;
  --gold: #a67c00;
  --gold-bright: #c9a227;
  --warn: #8a5a00;
  --warn-bg: #fdf3dd;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
}
body, button, input, select { font-family: Georgia, "Times New Roman", serif; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { font-size: 24px; font-weight: bold; text-decoration: none; color: var(--ink); }
.brand span { color: var(--accent); }
.brand-mark { height: 24px; width: auto; vertical-align: -4px; margin-right: 4px; }
.hero-mask { width: 96px; height: auto; display: block; margin-bottom: 10px; }
.gold { color: var(--gold); }
.topbar nav { display: flex; gap: 18px; margin-left: auto; }
.topbar nav a { text-decoration: none; color: var(--ink); font-size: 16px; }
.topbar nav a:hover { color: var(--accent); }
.topbar nav a .count {
  background: var(--accent); color: #fff; border-radius: 10px;
  font-size: 12px; padding: 1px 7px; margin-left: 3px;
}
.topbar nav a .count:empty { display: none; }

.wrap { max-width: 920px; margin: 0 auto; padding: 24px 20px 64px; }
.wrap.wide { max-width: 1100px; }

.hero { margin: 8px 0 20px; }
.hero h1 { font-size: 34px; margin: 0 0 6px; line-height: 1.2; }
.hero p { margin: 0; color: var(--muted); font-size: 18px; }

.searchbar { display: flex; gap: 10px; margin: 18px 0 12px; }
.searchbar input[type="search"] {
  flex: 1; padding: 12px 14px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.searchbar input[type="search"]:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.filters select, .filters label.check {
  padding: 8px 10px; font-size: 15px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--ink);
}
.filters label.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.result-count { color: var(--muted); font-size: 15px; margin: 10px 0 16px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
}
.card h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card .meta { color: var(--muted); font-size: 14px; }
.card .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 12px; background: var(--accent-soft); color: var(--accent-ink);
  border-radius: 20px; padding: 2px 9px; white-space: nowrap;
}
.card .actions { display: flex; gap: 8px; margin-top: auto; padding-top: 10px; }
button, .btn {
  cursor: pointer; border: 1px solid var(--accent); background: var(--surface);
  color: var(--accent); border-radius: 8px; padding: 7px 12px; font-size: 15px;
  text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--accent-soft); }
button.primary, .btn.primary { background: var(--accent); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--accent-ink); }
button.saved { background: var(--accent); color: #fff; }
button:disabled { opacity: 0.5; cursor: default; }

/* Recipe page */
.recipe-head h1 { font-size: 32px; line-height: 1.2; margin: 0 0 8px; }
.recipe-meta { color: var(--muted); font-size: 16px; margin-bottom: 16px; }
.attribution {
  background: var(--accent-soft); border: 1px solid #cfe0cb; border-radius: var(--radius);
  padding: 12px 16px; margin: 0 0 24px; font-size: 16px;
}
.attribution strong { color: var(--accent-ink); }
.attribution .fine { color: var(--muted); font-size: 14px; display: block; margin-top: 4px; }
.recipe-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; align-items: center; }
.recipe-actions select { padding: 7px 10px; font-size: 15px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.recipe-body h2 { font-size: 22px; margin: 28px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.recipe-body h3 { font-size: 18px; margin: 18px 0 6px; color: var(--accent-ink); }
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li { padding: 5px 0 5px 22px; position: relative; }
.ingredients li::before { content: "▢"; position: absolute; left: 0; color: var(--accent); }
.steps { padding-left: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; padding: 0 0 14px 44px; position: relative; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; background: var(--accent);
  color: #fff; text-align: center; line-height: 30px; font-size: 15px; font-weight: bold;
}
.note {
  background: var(--warn-bg); border: 1px solid #ecd9a8; border-radius: var(--radius);
  padding: 12px 16px; margin-top: 24px; font-size: 15px; color: var(--warn);
}
.recipe-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

/* Week plan */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.day {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; min-height: 120px;
}
.day h3 { margin: 0 0 8px; font-size: 17px; }
.day ul { list-style: none; padding: 0; margin: 0 0 10px; }
.day li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 15px; }
.day li a { text-decoration: none; color: var(--ink); }
.day li a:hover { color: var(--accent); }
.day li button { border: none; background: none; color: var(--muted); padding: 0 4px; font-size: 15px; }
.day select { width: 100%; padding: 7px 8px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.day .empty { color: var(--muted); font-size: 14px; }

.grocery h3 { font-size: 18px; margin: 20px 0 6px; color: var(--accent-ink); }
.grocery ul { list-style: none; padding: 0; margin: 0; }
.grocery li { padding: 5px 0; display: flex; gap: 10px; align-items: baseline; }
.grocery li.have { opacity: 0.45; }
.grocery li.have .gtext { text-decoration: line-through; }
.grocery input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.grocery .from { color: var(--muted); font-size: 13px; }

.empty-state { color: var(--muted); padding: 32px 0; text-align: center; font-size: 17px; }
.about h2 { font-size: 22px; margin: 28px 0 8px; }
.about table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 15px; }
.about th, .about td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; }
.about th { background: var(--accent-soft); }
footer.site { border-top: 1px solid var(--line); margin-top: 48px; padding: 20px; text-align: center; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--muted); }
/* Tonight's picks — featured row */
.featured {
  margin: 4px 0 24px; background: var(--accent-soft);
  border: 1px solid #cfe0cb; border-radius: var(--radius);
  padding: 18px 20px 20px;
}
.featured h2 { margin: 0 0 4px; font-size: 24px; color: var(--accent-ink); }
.featured-sub { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.featured-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.featured-card { border-color: var(--gold-bright); }

/* Show more paging */
.show-more-wrap { text-align: center; margin: 24px 0 8px; }
.show-more-wrap button { padding: 10px 28px; font-size: 17px; }

/* Import form */
.import-form { display: flex; flex-direction: column; gap: 10px; max-width: 640px; margin: 20px 0 8px; }
.import-form label { font-weight: bold; }
.import-form input[type="url"] {
  padding: 12px 14px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); width: 100%;
}
.import-form input[type="url"]:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.import-form button { align-self: flex-start; padding: 10px 22px; font-size: 17px; }
.import-status { color: var(--accent-ink); font-size: 16px; min-height: 24px; }

/* Recipe photos — real reader photos, or clearly labelled stock */
.recipe-photo { margin: 0 0 24px; }
.recipe-photo img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.recipe-photo figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }
.no-photo {
  background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 12px 16px; margin: 0 0 24px; font-size: 16px; color: var(--muted);
}

/* Photo submission form */
.submit-form { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 20px 0 8px; }
.submit-form > label { font-weight: bold; }
.submit-form input[type="text"], .submit-form select {
  padding: 12px 14px; font-size: 17px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); width: 100%;
}
.submit-form input[type="text"]:focus, .submit-form select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.submit-form input[type="file"] { font-size: 15px; }
.submit-form label.terms { font-weight: normal; font-size: 15px; display: flex; gap: 8px; align-items: flex-start; }
.submit-form button { align-self: flex-start; padding: 10px 22px; font-size: 17px; }
.submit-status { color: var(--accent-ink); font-size: 16px; min-height: 24px; }

@media (max-width: 600px) {
  .hero h1, .recipe-head h1 { font-size: 26px; }
  .topbar { gap: 12px; }
  .featured-grid { grid-template-columns: 1fr; }
}
