/* Default: light theme */
:root {
  --bg: #fafafa;
  --text: #1a1a1a;
  --muted: #666;
  --accent: #b37a2b;
  --accent-soft: #d8a657;
  --card: #ffffff;
  --border: rgba(0, 0, 0, 0.1);
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #0e0e0e;
  --text: #f4f4f4;
  --muted: #b5b5b5;
  --accent: #ffdfae;
  --accent-soft: #ffc778;
  --card: #161616;
  --border: rgba(255, 223, 174, 0.2);
}


* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}


.recipe {
  max-width: 720px;
  padding: 1.25rem;
  margin: 0 auto;
}

/* Header */

.recipe-header {
  margin-bottom: 2rem;
}

.recipe-header h1 {
  font-size: clamp(1.8em, 5vw, 2.4em);
  margin: 0 0 0.25em;
  color: var(--accent);
}

.recipe-meta {
  color: var(--muted);
  font-size: 0.95em;
}

/* Sections */

.recipe-section {
  margin-bottom: 2em;
}

.recipe-section h2 {
  font-size: 1.2em;
  margin-bottom: 0.75em;
  color: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

/* Lists */

ul,
ol {
  padding-left: 1.2rem;
  margin: 0;
}

li {
  margin-bottom: 0.5rem;
}

/* Paragraphs */

p {
  margin: 0;
  color: var(--text);
}

/* Desktop spacing tweak */

@media (min-width: 768px) {
  .recipe {
    padding: 2rem;
  }
}

.utility-buttons {
  position: fixed;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  z-index: 1000;
}

.utility-buttons button {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s;
}

.utility-buttons button:hover {
  transform: translateY(-1px);
}

@media print {
  .utility-buttons {
    display: none;
  }
}

/* Checkbox styling */
.checkbox-list input[type="checkbox"] {
  margin-right: 0.5em;
  transform: scale(1.2);
  cursor: pointer;
}

.checkbox-list label {
  cursor: pointer;
  user-select: none;
}

.checkbox-list li {
  list-style: none;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
}

/* Link color fixes for dark mode */
[data-theme="dark"] a {
  color: var(--accent-soft);
  text-decoration: none;
}

[data-theme="dark"] a:hover {
  color: var(--accent);
  text-decoration: underline;
}


a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.recipe-source {
  font-size: 0.95em;
  color: var(--muted);
  margin-top: 0.25rem;
}

.recipe-source a {
  color: var(--accent-soft);
  text-decoration: none;
}

.recipe-source a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.ingredients input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 0.5em;
  accent-color: var(--accent-soft);
}

.ingredient-hint {
  display: inline;
  color: var(--muted);
  font-style: italic;
  font-size: 0.95em;
}

ul.ingredients {
  list-style: none;
  padding-left: 0;
}

ul.ingredients li {
  margin-bottom: 0.5em;
}
