:root {
  color-scheme: light dark;
  --bg: #faf9f6;
  --fg: #1d1b17;
  --muted: #6f6859;
  --line: #e3ded2;
  --panel: #fffefb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171613;
    --fg: #ece7dd;
    --muted: #9a9385;
    --line: #302d26;
    --panel: #1e1c18;
  }
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 112.5%;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
}

body {
  margin: 0 auto;
  max-width: 38rem;
  padding: 2.5rem 1.25rem 5rem;
}

h1 {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

h2 {
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin: 2.25rem 0 0.75rem;
}

h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1.75rem 0 0.5rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
}

a {
  color: inherit;
  text-decoration-color: var(--line);
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-color: currentColor;
}

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

li {
  margin-bottom: 0.4rem;
}

ol li {
  margin-bottom: 0.9rem;
  padding-left: 0.25rem;
}

body:has(.columns) {
  max-width: 56rem;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 46rem) {
  .columns {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.columns h2 {
  margin-top: 0;
}

#recipes {
  list-style: none;
  padding: 0;
  margin: 0;
}

#recipes li {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 0.4rem;
}

#recipes li:hover {
  background: var(--panel);
}

#recipes input {
  accent-color: var(--fg);
}

#shopping {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 0.6rem;
  padding: 1.25rem 1.4rem 1.4rem;
  position: sticky;
  top: 1.5rem;
}

#status {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

#list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#list li {
  margin: 0;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}

#list li:last-child {
  border-bottom: none;
}

#copy {
  font: inherit;
  font-size: 0.85rem;
  margin-top: 1.25rem;
  padding: 0.4rem 0.9rem;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  cursor: pointer;
}

#copy:hover {
  border-color: var(--muted);
}

li b {
  font-weight: 600;
}

.servings {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.servings output {
  min-width: 1.5ch;
  text-align: center;
  color: var(--fg);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.servings button {
  font: inherit;
  width: 2rem;
  height: 2rem;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  cursor: pointer;
}

.servings button:hover:not(:disabled) {
  border-color: var(--muted);
}

.servings button:disabled {
  opacity: 0.4;
  cursor: default;
}
