:root {
  --ink: #171916;
  --muted: #6c7168;
  --line: #dfe4db;
  --paper: #ffffff;
  --wash: #f6f8f3;
  --green: #5e8d2d;
  --green-dark: #35611c;
  --ember: #b11f18;
  --gold: #e4b42c;
  --shadow: 0 22px 55px rgba(26, 31, 22, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff 0%, var(--wash) 100%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 42px;
  background: #151713;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #9bc65f;
}

.brand-mark svg,
.summary-icon svg,
.actions svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

nav {
  display: flex;
  gap: 26px;
  align-items: center;
}

nav a {
  position: relative;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: -18px;
  left: 0;
  height: 3px;
  background: var(--green);
  content: "";
  opacity: 0;
}

nav a:hover::after,
nav a:focus-visible::after {
  opacity: 1;
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  min-height: 360px;
  background: var(--paper);
  overflow: hidden;
}

.hero-copy {
  padding: 58px 44px 42px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-size: clamp(3rem, 7vw, 6.15rem);
  line-height: 0.92;
  letter-spacing: 0;
  font-weight: 950;
}

.hero-copy > p {
  margin-top: 20px;
  color: var(--green-dark);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.15;
  font-weight: 500;
}

.recipe-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 4px;
  margin-top: 24px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3ea;
}

.recipe-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--green-dark);
  font-weight: 900;
  cursor: pointer;
}

.recipe-switch button.active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 8px 18px rgba(53, 97, 28, 0.18);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 40px;
}

.summary-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 0 22px;
  border-right: 1px solid #ccd4c6;
}

.summary-item:first-child {
  padding-left: 0;
}

.summary-item:last-child {
  border-right: 0;
}

.summary-icon {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
}

.summary-icon svg {
  width: 27px;
  height: 27px;
}

.summary-item span:not(.summary-icon) {
  color: #3b4037;
  font-size: 0.88rem;
  font-weight: 650;
}

.summary-item strong {
  margin-top: 4px;
  font-size: clamp(1rem, 1.8vw, 2.1rem);
  color: var(--green-dark);
  line-height: 1.05;
}

.hero-media {
  position: relative;
  min-height: 360px;
  background: #10140f;
}

.hero-media::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  width: 34%;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.72) 52%, rgba(255, 255, 255, 0) 100%);
  content: "";
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 32px;
  padding: 26px 42px 0;
  align-items: start;
}

.shopping-panel,
.side-panel,
.flavour,
.method {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.shopping-panel {
  overflow: hidden;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 22px 26px 12px;
}

h2 {
  color: var(--green-dark);
  font-size: 1.32rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

output {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: #171916;
  font-size: 0.92rem;
  font-weight: 850;
}

td {
  font-size: 1.03rem;
}

td:first-child {
  display: flex;
  gap: 13px;
  align-items: center;
  min-width: 300px;
  font-weight: 800;
}

td:nth-child(2),
td:nth-child(3) {
  white-space: nowrap;
}

th:last-child,
td:last-child {
  width: 54px;
  text-align: center;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:has(input:checked) {
  background: #eef5e8;
  color: #686f62;
}

tbody tr:has(input:checked) td:first-child {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(94, 141, 45, 0.45);
}

input[type="checkbox"] {
  width: 19px;
  height: 19px;
  accent-color: var(--green);
  cursor: pointer;
}

.extra-row td {
  display: table-cell;
  padding: 15px 18px 8px;
  color: var(--green-dark);
  font-size: 0.88rem;
  font-weight: 900;
  text-transform: uppercase;
  text-decoration: none;
}

.item-icon {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: rgba(94, 141, 45, 0.08);
}

.item-icon.sausage,
.item-icon.leaf,
.item-icon.bread {
  border-radius: 14px 6px 14px 6px;
  transform: rotate(-25deg);
}

.item-icon.onion,
.item-icon.garlic,
.item-icon.plum {
  border-radius: 55% 55% 60% 60%;
}

.item-icon.cream,
.item-icon.lard {
  border-radius: 5px;
}

.item-icon.mushroom {
  border-radius: 50% 50% 8px 8px;
}

.item-icon.paprika {
  border-color: var(--ember);
  background: rgba(177, 31, 24, 0.08);
}

.item-icon.caraway,
.item-icon.spice {
  border-radius: 6px;
  transform: rotate(20deg);
}

.note {
  padding: 14px 26px 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

.side-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.panel-block {
  padding: 4px 2px 14px;
}

.panel-block + .panel-block {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.side-list {
  display: grid;
  gap: 18px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.side-list li {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 16px;
}

.side-list span {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--ember);
  border-radius: 50%;
  color: var(--ember);
  font-weight: 900;
}

.side-list strong {
  font-size: 1.05rem;
}

.side-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.95rem;
}

.actions {
  display: grid;
  gap: 9px;
}

.actions h2 {
  margin-bottom: 8px;
}

.actions button,
.actions a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.actions button:hover,
.actions a:hover,
.actions button:focus-visible,
.actions a:focus-visible {
  border-color: var(--green);
  box-shadow: 0 12px 25px rgba(67, 98, 40, 0.12);
  transform: translateY(-1px);
  outline: none;
}

.actions svg {
  width: 22px;
  height: 22px;
  color: var(--green);
}

.flavour {
  margin: 32px 42px 0;
  padding: 24px 26px 28px;
}

.flavour h2 {
  color: var(--ember);
}

.flavour-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 18px;
}

.flavour article {
  padding: 0 28px;
  border-left: 1px solid var(--line);
}

.flavour article:first-child {
  padding-left: 0;
  border-left: 0;
}

.flavour span {
  display: block;
  color: var(--ember);
  font-weight: 950;
  font-size: 0.8rem;
}

.flavour h3 {
  margin-top: 8px;
  color: var(--ember);
  font-size: 1rem;
  text-transform: uppercase;
}

.flavour p {
  margin-top: 8px;
  color: #51574e;
  line-height: 1.5;
}

.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 34px;
  margin: 24px 42px 44px;
  padding: 24px 26px 28px;
}

.method ol {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.method li {
  padding-left: 4px;
  color: #3f463c;
  line-height: 1.55;
}

.source-box {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.source-box p {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.source-box div {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}

.source-box a {
  color: var(--green-dark);
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  padding: 13px 16px;
  border-radius: 7px;
  background: #171916;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .site-header {
    padding: 0 22px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-media {
    order: -1;
    min-height: 270px;
  }

  .hero-media::before {
    display: none;
  }

  .content-grid {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .flavour {
    margin: 24px 22px 34px;
  }

  .method {
    grid-template-columns: 1fr;
    margin: 18px 22px 34px;
  }

  .source-box {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 22px 0 0;
  }

  .flavour-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }

  .flavour article:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .site-header {
    min-height: 54px;
    padding: 0 14px;
  }

  .brand span:last-child {
    display: none;
  }

  nav {
    gap: 14px;
  }

  nav a {
    font-size: 0.88rem;
  }

  nav a::after {
    bottom: -17px;
  }

  .hero-copy {
    padding: 34px 18px 24px;
  }

  h1 {
    font-size: clamp(2.65rem, 14vw, 4rem);
  }

  .hero-copy > p {
    margin-top: 14px;
    font-size: 1.35rem;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 28px;
  }

  .summary-item,
  .summary-item:first-child {
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid #ccd4c6;
  }

  .summary-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .hero-media {
    min-height: 230px;
  }

  .hero-media img {
    min-height: 230px;
  }

  .content-grid {
    padding: 16px 12px 0;
    gap: 16px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px 16px 8px;
  }

  table {
    min-width: 600px;
  }

  th,
  td {
    padding: 11px 12px;
    font-size: 0.95rem;
  }

  td:first-child {
    min-width: 240px;
  }

  .note {
    padding: 12px 16px 18px;
  }

  .side-panel {
    padding: 18px 16px;
  }

  .recipe-switch {
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .flavour {
    margin: 16px 12px 0;
    padding: 20px 16px;
  }

  .method {
    margin: 16px 12px 26px;
    padding: 20px 16px;
  }

  .flavour-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .flavour article,
  .flavour article:nth-child(3) {
    padding: 0 0 18px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .flavour article:last-child {
    border-bottom: 0;
    padding-bottom: 0;
  }
}

@media print {
  .site-header,
  .hero-media,
  .actions,
  .toast {
    display: none;
  }

  body {
    background: #fff;
  }

  .hero,
  .content-grid,
  .flavour,
  .method {
    display: block;
    margin: 0;
    padding: 0;
    box-shadow: none;
    border: 0;
  }

  .shopping-panel,
  .side-panel {
    box-shadow: none;
    border: 0;
  }
}
