@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,450;9..144,600&family=Source+Serif+4:opsz,wght@8..60,400;8..60,500;8..60,600&display=swap");

:root {
  color-scheme: light dark;
  --bg: #f3eee4;
  --bg-deep: #ebe4d6;
  --fg: #1c1914;
  --muted: #6f675b;
  --soft: #8a8173;
  --line: rgba(28, 25, 20, 0.12);
  --card: rgba(255, 252, 246, 0.72);
  --card-solid: #fffdf8;
  --accent: #9a4e2a;
  --accent-soft: rgba(154, 78, 42, 0.12);
  --shadow: 0 18px 50px rgba(48, 34, 18, 0.08);
  --radius: 1.35rem;
  --max: 44rem;
  --serif-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --serif-body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13110e;
    --bg-deep: #0e0c0a;
    --fg: #f0e8da;
    --muted: #a79d8d;
    --soft: #8d8476;
    --line: rgba(240, 232, 218, 0.12);
    --card: rgba(28, 24, 20, 0.78);
    --card-solid: #1b1713;
    --accent: #e0a07a;
    --accent-soft: rgba(224, 160, 122, 0.14);
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  color: var(--fg);
  font-family: var(--serif-body);
  font-optical-sizing: auto;
  background:
    radial-gradient(900px 480px at 50% -8%, rgba(201, 146, 84, 0.16), transparent 62%),
    radial-gradient(700px 420px at 100% 100%, rgba(154, 78, 42, 0.07), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

.shell {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 1.75rem 0 4rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--serif-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  background: var(--fg);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.back {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.back:hover {
  color: var(--accent);
}

.hero {
  margin-bottom: 2.25rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.1rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

h1 {
  font-family: var(--serif-display);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 12ch;
}

.lede {
  margin-top: 1rem;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.55;
}

.recipe-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}

.recipe-card {
  display: block;
  padding: 1.35rem 1.4rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.recipe-card:hover {
  transform: translateY(-2px);
  border-color: rgba(154, 78, 42, 0.28);
  color: inherit;
}

.recipe-card h2 {
  font-family: var(--serif-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.recipe-card p {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 1rem;
}

.recipe-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-top: 1rem;
  color: var(--soft);
  font-size: 0.88rem;
}

.recipe-card .go {
  display: inline-flex;
  margin-top: 1.05rem;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

.panel {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.panel-head {
  padding: 1.15rem 1.35rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--accent-soft), transparent);
}

.panel-head h2 {
  font-family: var(--serif-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel-body {
  padding: 1.25rem 1.35rem 1.45rem;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.35rem 0 1.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card-solid);
  color: var(--muted);
  font-size: 0.86rem;
}

.ingredients {
  list-style: none;
  display: grid;
  gap: 0.75rem;
}

.ingredients li {
  display: grid;
  grid-template-columns: 0.7rem 1fr;
  gap: 0.8rem;
  align-items: start;
  font-size: 1.05rem;
}

.ingredients li::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.steps {
  list-style: none;
  display: grid;
  gap: 1rem;
  counter-reset: step;
}

.steps li {
  position: relative;
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.85rem;
  align-items: start;
  padding: 1rem 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--card-solid);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  font-family: var(--serif-display);
  font-size: 0.95rem;
  font-weight: 600;
}

.steps .label {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.steps p {
  font-size: 1.06rem;
  line-height: 1.5;
}

.note {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 0.9rem 0.9rem 0;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 0.98rem;
}

.stack {
  display: grid;
  gap: 1.15rem;
}

.footer-note {
  margin-top: 2.5rem;
  color: var(--soft);
  font-size: 0.92rem;
  text-align: center;
}

@media (min-width: 720px) {
  .shell {
    padding-top: 2.4rem;
  }

  .split {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.15rem;
    align-items: start;
  }
}

@media print {
  body {
    background: white;
    color: black;
  }

  .topbar .back,
  .footer-note {
    display: none;
  }

  .panel,
  .steps li,
  .recipe-card {
    box-shadow: none;
    break-inside: avoid;
  }
}
