/* Shared typography, recipe layout and printing for the whole site. */
body {
  font-family: 'EB Garamond', Georgia, serif;
  background: #fdf8e6;
  color: #1a1a1a;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', Georgia, serif;
  font-weight: 700;
}

body::before, body::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

body::before {
  inset: 0;
  z-index: -2;
  background: #fdf8e6;
}

body::after {
  inset: -100px;
  z-index: -1;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, .4) 100%);
  filter: blur(10px);
}

.recipe-page-container {
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding: 1.5rem 1rem;
}

.recipe-card {
  margin-top: 2rem;
  padding: 1.5rem 1.25rem;
  background: #fff;
  border: 2px solid #1a1a1a;
  border-radius: .5rem;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);
}

.recipe-title {
  margin-bottom: 1.5rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.1;
  overflow-wrap: break-word;
}

.recipe-byline {
  margin: -.5rem 0 1.25rem;
  font-size: 1rem;
}

.recipe-byline a { text-decoration: underline; text-underline-offset: .15em; }

.recipe-jump-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
  margin: -.375rem -.375rem .125rem;
  padding: .375rem;
  font-size: clamp(.875rem, 3.5vw, 1rem);
  line-height: 1.4;
  overflow-x: auto;
}

.recipe-jump-links a {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 2.75rem;
  white-space: nowrap;
}

.recipe-facts dt { font-weight: 700; }

.recipe-meta, .recipe-timing-note {
  margin: .75rem 0;
  color: #494035;
  font-size: 1rem;
  line-height: 1.45;
}

.recipe-hero {
  display: block;
  width: 100%;
  height: auto;
  margin-block: 2rem;
  border: 2px solid #1a1a1a;
  border-radius: .5rem;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1);
}

.recipe-print-footer { display: none; }

.policy-page-container { max-width: 64rem; margin: auto; padding: 2rem 1rem; }
.policy-page-container > nav a { text-decoration: underline; }
.policy-card { margin-top: 2rem; padding: clamp(1.5rem, 5vw, 3rem); background: #fff; border: 2px solid #1a1a1a; border-radius: .5rem; }
.policy-card h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin-bottom: .75rem; }
.policy-content { font-size: 1.2rem; line-height: 1.6; }
.policy-content h2 { font-size: 1.6rem; margin: 2rem 0 .75rem; line-height: 1.3; }
.policy-content p { margin: .75rem 0; }
.policy-content a { text-decoration: underline; overflow-wrap: anywhere; }
.privacy-links { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1.5rem; margin: 1.5rem 0; font-size: 1rem; font-style: normal; }
.privacy-links a, .privacy-links button { text-decoration: underline; text-underline-offset: .15em; padding: .35rem 0; }
.privacy-links [hidden], .privacy-banner [hidden] { display: none !important; }
.privacy-banner { position: fixed; inset: auto 1rem 1rem; z-index: 1000; width: calc(100% - 2rem); max-width: 64rem; max-height: 80vh; margin: 0 auto; padding: 1.25rem 1.5rem; overflow: auto; color: #1a1a1a; background: #fffaf0; border: 2px solid #4d3923; border-radius: .5rem; box-shadow: 0 8px 40px #0004; font-size: 1.05rem; line-height: 1.45; }
.privacy-banner-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .5rem; }
.privacy-banner h2 { font-size: 1.5rem; line-height: 1.2; }
/* The heading receives programmatic focus for announcement, but is not a control. */
#privacy-title:focus { outline: none; }
.privacy-banner a, .privacy-close { text-decoration: underline; text-underline-offset: .15em; }
.privacy-close { padding: .35rem; white-space: nowrap; }
.privacy-status { margin-top: .5rem; font-size: .95rem; }
.privacy-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin-top: 1rem; }
.privacy-actions button { min-height: 2.75rem; padding: .6rem .75rem; border: 1px solid #4d3923; border-radius: .25rem; background: #fff; font-weight: 700; }
.privacy-actions button:hover { background: #eee4d4; }
img[data-defer-image] { background: #eee7d7; }
@media (max-width: 640px) {
  .privacy-banner { padding: 1rem; }
  .privacy-actions { grid-template-columns: 1fr; gap: .5rem; }
}

@media (min-width: 768px) {
  .recipe-page-container, .recipe-card { padding: 3rem; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #1a1a1a;
  color: #fdf8e6;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid #805016;
  outline-offset: 4px;
}

#logo-board {
  font-size: clamp(1.25rem, 5vw, 3.75rem);
}

#recipe-section,
#mission,
[id^="step-"] {
  scroll-margin-top: 1.5rem;
}

[id^="share-"].transition-colors,
#copy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
}

#share-status:empty {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  @page { margin: 12mm; }

  html, body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    color: #000 !important;
  }

  body::before, body::after { display: none !important; }

  .skip-link,
  .privacy-banner,
  .privacy-links,
  main > footer,
  #share-status {
    display: none !important;
  }

  .recipe-page { font-size: 11pt; line-height: 1.3; }

  .recipe-page-container, .recipe-card {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .recipe-card > :not(h1):not(#recipe-section):not(.recipe-print-footer) {
    display: none !important;
  }

  .recipe-title { font-size: 21pt; line-height: 1.15; margin: 0 0 12pt; }

  #recipe-section {
    margin: 0;
    padding: 0;
    columns: auto;
    font-size: inherit;
    line-height: inherit;
  }

  #recipe-section :is(.text-lg, .text-xl) { font-size: inherit; line-height: inherit; }
  #recipe-section h2 { margin: 0 0 6pt; padding: 0; border: 0; font-size: 14pt; line-height: 1.2; }
  #recipe-section h3 { margin: 10pt 0 5pt; font-size: 12pt; line-height: 1.2; }
  #recipe-section h4 { margin: 6pt 0 3pt; font-size: 11pt; line-height: 1.2; }
  #recipe-section :is(h2, h3, h4) { break-after: avoid; break-inside: avoid; }
  #recipe-section h3:not(:first-of-type) { clear: both; }
  #recipe-section :is(ul, ol) { margin: 0; padding-left: 5mm; list-style-position: outside; }
  #recipe-section li { break-inside: avoid; margin: 0; padding-left: 1mm; }
  #recipe-section li + li { margin-top: 3pt; }
  #recipe-section p { margin: 5pt 0; orphans: 3; widows: 3; }

  #recipe-section .recipe-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8pt;
    margin: 8pt 0;
    text-align: left;
    break-inside: avoid;
  }

  #recipe-section .recipe-facts :is(h4, p, dt, dd) { margin: 0; font-size: 10pt; line-height: 1.3; }
  #recipe-section .recipe-timing-note { font-size: 9pt; line-height: 1.3; color: #000; }

  .recipe-print-image {
    display: block;
    float: right;
    width: 33mm;
    height: 33mm;
    object-fit: cover;
    margin: 0 0 3mm 5mm;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .recipe-print-footer {
    display: block;
    clear: both;
    margin-top: 12pt;
    padding: 0;
    border: 0;
    font-size: 8pt;
    text-align: left;
  }
}
