:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --text: #26231f;
  --muted: #746d64;
  --accent: #b85d38;
  --accent-dark: #8f4328;
  --accent-soft: #f2e1d8;
  --line: #e5ded5;
  --green: #65735a;
  --shadow: 0 18px 50px rgba(53, 39, 27, 0.10);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Quicksand', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

.site-bar {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 8px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.site-bar a {
  text-decoration: none;
  font-weight: 700;
}

.site-name {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.back-link {
  color: var(--muted);
  font-size: .95rem;
}

.archive-hero,
.recipe-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.archive-hero {
  padding: 74px 0 42px;
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent);
}

.archive-hero h1,
.recipe-title {
  margin: 0;
  line-height: 1.04;
  letter-spacing: -.035em;
}

.archive-hero h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
}

.archive-hero p {
  max-width: 690px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  margin: 22px 0 0;
}

.recipe-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 80px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 26px;
}

.recipe-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(100, 82, 65, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(53, 39, 27, .14);
}

.recipe-card > a {
  text-decoration: none;
}

.recipe-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.recipe-card-body {
  padding: 24px;
}

.recipe-card h2 {
  margin: 5px 0 10px;
  font-size: 1.55rem;
  line-height: 1.2;
}

.recipe-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.recipe-date {
  color: var(--muted);
  font-size: .86rem;
}

.rating {
  color: #a94f2f;
  font-weight: 700;
  letter-spacing: .08em;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 700;
}

.recipe-shell {
  padding-bottom: 80px;
}

.recipe-hero {
  margin-top: 20px;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ddd;
}

.recipe-hero img {
  width: 100%;
  max-height: 690px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.recipe-header {
  max-width: 900px;
  margin: 38px auto 34px;
  text-align: center;
}

.recipe-title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
}

.recipe-deck {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 760px;
  margin: 18px auto;
}

.meta-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.meta-pill {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 13px;
  font-size: .88rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: white;
}

.button:hover { background: var(--accent-dark); }

.button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
}

.view-switcher {
  max-width: 920px;
  margin: 44px auto 24px;
  background: #ede6de;
  padding: 5px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.view-switcher button {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
}

.view-switcher button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 3px 10px rgba(53,39,27,.08);
}

.recipe-view {
  max-width: 920px;
  margin: 0 auto;
}

.hidden { display: none !important; }

.standard-layout {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  gap: 28px;
  align-items: start;
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 28px;
  box-shadow: 0 12px 36px rgba(53, 39, 27, .06);
}

.panel h2,
.notes h2 {
  margin-top: 0;
  font-size: 1.6rem;
}

.ingredients {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ingredients li {
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
}

.ingredients li:last-child { border-bottom: 0; }

.ingredients strong { color: var(--accent-dark); }

.method {
  margin: 0;
  padding-left: 1.35rem;
}

.method li {
  padding: 0 0 18px 8px;
}

.method li:last-child { padding-bottom: 0; }

.cook-intro {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 20px;
  max-width: 680px;
}

.cook-steps {
  display: grid;
  gap: 18px;
}

.cook-step {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(53,39,27,.05);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  margin-bottom: 12px;
}

.cook-step h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.step-ingredients {
  margin: 14px 0 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: #fbf1eb;
}

.step-ingredients-label {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.step-ingredients ul {
  margin: 0;
  padding-left: 1.2rem;
}

.notes {
  max-width: 920px;
  margin: 28px auto 0;
  background: #eef0e9;
  border-radius: var(--radius);
  padding: 26px 28px;
}

.notes ul {
  margin-bottom: 0;
}

.card-preview {
  max-width: 720px;
  margin: 52px auto 0;
  text-align: center;
}

.card-preview img {
  margin: 18px auto 0;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.card-preview p { color: var(--muted); }

.footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.empty-state {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 32px;
  border: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 760px) {
  .archive-hero { padding-top: 45px; }
  .standard-layout { grid-template-columns: 1fr; }
  .panel { padding: 22px; }
  .recipe-header { margin-top: 30px; }
  .recipe-hero { border-radius: 22px; }
}

@media print {
  body { background: white; }
  .site-bar, .action-row, .view-switcher, .card-preview, .footer { display: none !important; }
  .recipe-hero { box-shadow: none; }
  .panel, .cook-step, .notes { box-shadow: none; break-inside: avoid; }
}