:root {
  --rm2-bg: #f7f3ee;
  --rm2-surface: #ffffff;
  --rm2-ink: #1f1f1f;
  --rm2-muted: #6b625b;
  --rm2-line: #e6ddd4;
  --rm2-accent: #3f6a45;
  --rm2-accent-dark: #2f5134;
  --rm2-warm: #8a5a2b;
  --rm2-soft: #f2ebe3;
  --rm2-shadow: 0 12px 30px rgba(41, 28, 19, 0.08);
  --rm2-radius-xl: 24px;
  --rm2-radius-lg: 18px;
  --rm2-radius-md: 12px;
  --rm2-max: 1040px;
  --rm2-title: "Georgia", "Times New Roman", serif;
  --rm2-body: "Inter", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--rm2-body);
  color: var(--rm2-ink);
  background:
    radial-gradient(circle at top left, rgba(63, 106, 69, 0.08), transparent 28%),
    linear-gradient(180deg, #fbf8f4 0%, var(--rm2-bg) 100%);
  line-height: 1.65;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--rm2-radius-lg);
}

a {
  color: var(--rm2-accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

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

.recipe-register,
.recipe-article,
article.register-recipe,
article.ricetta-master-2 {
  width: min(calc(100% - 32px), var(--rm2-max));
  margin: 32px auto 64px;
}

.recipe-shell,
.recipe-card,
.register-recipe__card {
  background: var(--rm2-surface);
  border: 1px solid rgba(138, 90, 43, 0.10);
  border-radius: var(--rm2-radius-xl);
  box-shadow: var(--rm2-shadow);
  overflow: hidden;
}

.recipe-hero,
.recipe-header,
.register-recipe__header {
  position: relative;
  padding: 42px 42px 34px;
  background:
    linear-gradient(135deg, rgba(63, 106, 69, 0.12), rgba(138, 90, 43, 0.08)),
    linear-gradient(180deg, #fffdfa 0%, #f7f1ea 100%);
  border-bottom: 1px solid var(--rm2-line);
}

.recipe-kicker,
.recipe-category,
.register-recipe__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rm2-accent-dark);
}

.recipe-kicker::before,
.recipe-category::before,
.register-recipe__eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

.recipe-title,
.recipe-header h1,
.register-recipe__title {
  margin: 0;
  font-family: var(--rm2-title);
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #221b16;
}

.recipe-subtitle,
.recipe-header .subtitle,
.register-recipe__subtitle {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: 1.08rem;
  color: var(--rm2-muted);
}

.recipe-badges,
.recipe-stamps,
.register-recipe__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.badge,
.bollino,
.register-recipe__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--rm2-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #2c2520;
  font-size: 0.95rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.badge::before,
.bollino::before,
.register-recipe__badge::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85);
}

.badge--green,
.bollino--verde,
.register-recipe__badge--green {
  color: #2f7a43;
}

.badge--black,
.bollino--nero,
.register-recipe__badge--black {
  color: #1f1f1f;
}

.badge--gold,
.bollino--oro,
.register-recipe__badge--gold {
  color: #9a6a21;
}

.recipe-body,
.recipe-content,
.register-recipe__content {
  padding: 34px 42px 42px;
}

.recipe-meta,
.recipe-facts,
.register-recipe__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.meta-card,
.fact-card,
.register-recipe__meta-card {
  padding: 18px 18px 16px;
  border: 1px solid var(--rm2-line);
  border-radius: var(--rm2-radius-lg);
  background: linear-gradient(180deg, #fff 0%, #fcfaf7 100%);
}

.meta-label,
.fact-label,
.register-recipe__meta-label {
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rm2-muted);
}

.meta-value,
.fact-value,
.register-recipe__meta-value {
  font-family: var(--rm2-title);
  font-size: 1.4rem;
  line-height: 1.15;
  color: #241d18;
}

.recipe-intro,
.recipe-summary,
.register-recipe__intro {
  margin: 0 0 26px;
  font-size: 1.03rem;
  color: #3b342f;
}

.recipe-grid,
.recipe-layout,
.register-recipe__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.recipe-panel,
.recipe-section,
.register-recipe__section {
  padding: 24px;
  border: 1px solid var(--rm2-line);
  border-radius: var(--rm2-radius-lg);
  background: #fff;
}

.recipe-panel--soft,
.recipe-section--soft,
.register-recipe__section--soft {
  background: var(--rm2-soft);
}

.recipe-section h2,
.recipe-panel h2,
.register-recipe__section h2,
.recipe-section-title {
  margin: 0 0 16px;
  font-family: var(--rm2-title);
  font-size: 1.6rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #241d18;
}

.recipe-section h3,
.recipe-panel h3,
.register-recipe__section h3 {
  margin: 20px 0 10px;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rm2-accent-dark);
}

.recipe-section p,
.recipe-panel p,
.register-recipe__section p {
  margin: 0 0 12px;
}

.ingredients-list,
.recipe-ingredients ul,
.register-recipe__ingredients {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ingredients-list li,
.recipe-ingredients li,
.register-recipe__ingredients li {
  position: relative;
  padding: 0 0 14px 24px;
  margin-bottom: 14px;
  border-bottom: 1px dashed rgba(107, 98, 91, 0.25);
}

.ingredients-list li:last-child,
.recipe-ingredients li:last-child,
.register-recipe__ingredients li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.ingredients-list li::before,
.recipe-ingredients li::before,
.register-recipe__ingredients li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--rm2-accent);
}

.prep-steps,
.recipe-preparation ol,
.register-recipe__steps {
  margin: 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}

.prep-steps li,
.recipe-preparation li,
.register-recipe__steps li {
  position: relative;
  padding: 0 0 18px 58px;
  margin-bottom: 18px;
  min-height: 42px;
  border-bottom: 1px dashed rgba(107, 98, 91, 0.25);
}

.prep-steps li:last-child,
.recipe-preparation li:last-child,
.register-recipe__steps li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.prep-steps li::before,
.recipe-preparation li::before,
.register-recipe__steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--rm2-accent) 0%, var(--rm2-accent-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 8px 20px rgba(63, 106, 69, 0.18);
}

.benefits-list,
.recipe-benefits ul,
.register-recipe__benefits {
  margin: 0;
  padding-left: 18px;
}

.benefits-list li,
.recipe-benefits li,
.register-recipe__benefits li {
  margin-bottom: 10px;
}

.recipe-note,
.editorial-note,
.register-recipe__note {
  margin-top: 26px;
  padding: 18px 20px;
  border-left: 4px solid var(--rm2-warm);
  border-radius: 0 var(--rm2-radius-md) var(--rm2-radius-md) 0;
  background: #fcf7f1;
  color: #463d36;
  font-size: 0.96rem;
}

.recipe-note strong,
.editorial-note strong,
.register-recipe__note strong {
  color: #2d251f;
}

.recipe-footer,
.register-recipe__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--rm2-line);
  color: var(--rm2-muted);
  font-size: 0.92rem;
}

.recipe-footer small,
.register-recipe__footer small {
  display: block;
}

.recipe-highlight,
.register-recipe__highlight {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(63, 106, 69, 0.09);
  color: var(--rm2-accent-dark);
  font-weight: 700;
}

.recipe-highlight::before,
.register-recipe__highlight::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}

@media (max-width: 900px) {
  .recipe-grid,
  .recipe-layout,
  .register-recipe__grid,
  .recipe-meta,
  .recipe-facts,
  .register-recipe__meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .recipe-register,
  .recipe-article,
  article.register-recipe,
  article.ricetta-master-2 {
    width: min(calc(100% - 20px), var(--rm2-max));
    margin: 18px auto 36px;
  }

  .recipe-hero,
  .recipe-header,
  .register-recipe__header,
  .recipe-body,
  .recipe-content,
  .register-recipe__content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .recipe-hero,
  .recipe-header,
  .register-recipe__header {
    padding-top: 26px;
    padding-bottom: 24px;
  }

  .recipe-body,
  .recipe-content,
  .register-recipe__content {
    padding-top: 22px;
    padding-bottom: 28px;
  }

  .recipe-panel,
  .recipe-section,
  .register-recipe__section,
  .meta-card,
  .fact-card,
  .register-recipe__meta-card {
    padding: 18px;
  }

  .badge,
  .bollino,
  .register-recipe__badge {
    width: 100%;
    justify-content: flex-start;
    border-radius: 16px;
  }

  .prep-steps li,
  .recipe-preparation li,
  .register-recipe__steps li {
    padding-left: 52px;
  }

  .prep-steps li::before,
  .recipe-preparation li::before,
  .register-recipe__steps li::before {
    width: 36px;
    height: 36px;
  }
}

@media print {
  :root {
    --rm2-bg: #ffffff;
    --rm2-surface: #ffffff;
    --rm2-soft: #ffffff;
    --rm2-shadow: none;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .recipe-register,
  .recipe-article,
  article.register-recipe,
  article.ricetta-master-2 {
    width: 100%;
    margin: 0;
  }

  .recipe-shell,
  .recipe-card,
  .register-recipe__card,
  .recipe-panel,
  .recipe-section,
  .register-recipe__section,
  .meta-card,
  .fact-card,
  .register-recipe__meta-card {
    box-shadow: none;
    break-inside: avoid;
  }

  .recipe-hero,
  .recipe-header,
  .register-recipe__header {
    background: #ffffff;
  }

  a {
    color: #000000;
    text-decoration: none;
  }
}
