:root {
  --color-bg: #faf5ef;
  --color-text: #222222;
  --color-accent: #f28e26;
  --color-accent-muted: #f7c89a;
  --color-border-subtle: #e0d6c8;
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --spacing-unit: 1rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
}

.hidden {
  display: none !important;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--spacing-unit) var(--spacing-unit);
}

/* Header */

.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--color-border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-unit) 0;
}

.site-title {
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--color-text);
}

.site-nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--color-accent);
  font-weight: 500;
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
}

/* Common */

.page-content {
  padding-top: 0.5rem;
}

.loading-message {
  margin-top: 1.5rem;
  font-style: italic;
  color: #555;
}

.error-message {
  margin-top: 1.5rem;
  color: #a52828;
}

/* Buttons */

.button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid transparent;
}

.button.primary {
  background-color: var(--color-accent);
  color: #ffffff;
}

/* Home */

.home-hero {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.home-hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.home-tagline {
  margin-top: 0;
  margin-bottom: 1rem;
  max-width: 36rem;
  color: #555;
}

.home-actions {
  margin-bottom: 1rem;
}

.home-note {
  font-size: 0.9rem;
  color: #666;
}

/* Produce grid */

.produce-header {
  margin-top: 1.5rem;
}

.produce-intro {
  max-width: 36rem;
  color: #555;
}

.produce-grid {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-unit);
}

.produce-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.produce-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.produce-card-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 1px solid var(--color-border-subtle);
}

.produce-card-title {
  font-size: 1.05rem;
  margin: 0.6rem 0.75rem 0.25rem;
}

.produce-card-description {
  margin: 0 0.75rem 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

/* Recipe list */

.recipe-list-section {
  margin-top: 1.5rem;
}

.recipe-list {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-unit);
}

.recipe-card {
  background-color: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border-subtle);
}

.recipe-card-link {
  display: block;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
}

.recipe-card-title {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.recipe-card-description {
  margin: 0 0 0.4rem;
  color: #555;
}

.recipe-card-meta {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

/* Recipe detail */

.recipe-article {
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.recipe-title {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.recipe-description {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  color: #555;
  max-width: 40rem;
}

.recipe-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #555;
}

.recipe-meta span::before {
  content: "• ";
}

/* Hero */

.recipe-hero-section {
  margin: 1.5rem 0;
}

.recipe-hero-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 0.75rem;
  border: 1px solid var(--color-border-subtle);
}

/* Gallery */

.recipe-gallery {
  margin-bottom: 1.5rem;
}

.recipe-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.recipe-gallery-thumb-button {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.recipe-gallery-thumb-image {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.35rem;
  border: 1px solid var(--color-border-subtle);
}

/* Ingredients & instructions */

.section-heading {
  font-size: 1.2rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

#recipe-ingredients-list,
#recipe-instructions-list {
  margin: 0;
  padding-left: 1.4rem;
}

#recipe-ingredients-list li,
#recipe-instructions-list li {
  margin-bottom: 0.25rem;
}

/* Notes */

.recipe-notes {
  margin-top: 1.5rem;
}

#recipe-notes-text {
  margin-top: 0.25rem;
}

/* Responsive tweaks */

@media (min-width: 720px) {
  .recipe-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
