:root {
  color-scheme: light dark;
  --bg: #fbf7ef;
  --fg: #2b2418;
  --muted: #6b5d45;
  --accent: #b5832c;
  --rule: #e6dcc8;
  --panel: #f3ecdf;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1a15;
    --fg: #f1eadc;
    --muted: #b8aa8e;
    --accent: #e0b25c;
    --rule: #3a342a;
    --panel: #26221b;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.6 Georgia, 'Times New Roman', serif;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 1rem 4rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2.25rem;
  line-height: 1.2;
}

h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.4rem;
  line-height: 1.3;
}

h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.1rem;
}

p {
  color: var(--muted);
}

a {
  color: var(--accent);
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin: 0.3rem 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  max-width: 40rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.site-header .brand {
  color: var(--fg);
  font-weight: bold;
  text-decoration: none;
}

.site-header ul {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-header li {
  margin: 0;
}

.site-header ul a {
  color: var(--muted);
  text-decoration: none;
}

.site-header ul a:hover {
  color: var(--fg);
}

.site-header ul a[aria-current='page'] {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 1rem 0 0;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
  list-style: none;
}

.meta li {
  margin: 0;
}

.note {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--panel);
}

.note h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.note ul {
  margin-bottom: 0;
}

.recipes {
  padding: 0;
  list-style: none;
}

.recipes li {
  margin: 0;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.recipes a {
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
}

.recipes a:hover {
  text-decoration: underline;
}

.recipes p {
  margin: 0.25rem 0 0;
}

.shopping-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: bold;
}

.picker,
.items {
  padding: 0;
  list-style: none;
}

.picker li,
.items li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule);
}

.picker input[type='checkbox'],
.items input[type='checkbox'] {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.25rem 0 0;
  accent-color: var(--accent);
}

.picker label,
.items label {
  flex: 1;
  cursor: pointer;
}

.batches {
  color: var(--muted);
  white-space: nowrap;
}

.batches input {
  width: 3.5rem;
  margin-left: 0.25rem;
  padding: 0.15rem 0.3rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}

.batches input:disabled {
  opacity: 0.5;
}

#list h3 {
  margin: 1.5rem 0 0;
  color: var(--accent);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.items .qty {
  margin-left: 0.5rem;
  font-weight: bold;
}

.items .optional {
  margin-left: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.items small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.items input:checked + label {
  color: var(--muted);
  text-decoration: line-through;
}

.summary {
  margin-bottom: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.actions button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  cursor: pointer;
}

.actions button:hover {
  background: var(--panel);
}
