/* Shared typography refinements for every page and viewport. */
:root {
  --menu-font: 14px;
  --menu-label-font: 12px;
  --reading-font: 17px;
  --reading-leading: 1.8;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-align: center;
  text-wrap: balance;
}

.book-hero h1,
.recipe-hero h2,
.recipe-hero h2 em,
.editorial-hero h1 {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.book-hero h1 {
  font-size: clamp(40px, 10.8vw, 81px);
}

.recipe-hero h2 {
  font-size: clamp(43px, 10vw, 77px);
}

.editorial-hero h1 {
  font-size: clamp(41px, 8.5vw, 77px);
}

.editorial-section h2 {
  font-size: clamp(31px, 6.4vw, 44px);
}

h3 {
  font-size: 28px;
}

.serving-note h3 {
  font-size: 26px;
}

.substitutions h3 {
  font-size: 25px;
}

.wine-notes {
  margin-top: 28px;
}

.wine-notes ul {
  padding-inline-start: 1.4em;
  margin: 14px 0 24px;
}

.wine-notes li {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.wine-option {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.wine-option h4,
.wine-serving h4 {
  font-size: clamp(20px, 3.2vw, 25px);
  line-height: 1.45;
  margin-bottom: 16px;
}

.wine-serving {
  margin-top: 28px;
}

dialog h2 {
  font-size: 35px;
}

dialog h3 {
  font-size: 28px;
}

.eyebrow,
.rail-label {
  font-size: var(--menu-label-font);
  text-align: center;
}

.book-hero .eyebrow {
  max-width: none;
}

/* Centre each eyebrow across its container, including the last paragraph in editorial heroes. */
body .eyebrow {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  text-align: center;
}

.editorial-hero > p.eyebrow {
  max-width: none;
  margin: 0 0 14px;
  font-family: var(--sans);
  font-size: var(--menu-label-font);
  line-height: 1.5;
}

.drawer-head {
  position: relative;
  justify-content: center;
}

.drawer-head .icon-button {
  position: absolute;
  right: 0;
  top: -3px;
}

.pages-nav summary {
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.section-heading .eyebrow,
.method .eyebrow {
  text-align: center;
}

.section-heading .servings {
  display: block;
  position: static;
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
}

.discovery-heading {
  display: block;
  text-align: center;
}

.discovery-heading h2 {
  max-width: none;
  font-size: 28px;
}

.discovery-heading .result-count {
  display: block;
  margin-top: 12px;
  font-size: 12px;
}

.brand > span:last-child {
  text-align: center;
}

.brand {
  font-size: 14px;
}

.current-page {
  font-size: var(--menu-font);
}

.toc a,
.site-link,
.pages-nav summary {
  font-size: var(--menu-font);
}

.toc a,
.site-link {
  min-height: 44px;
  line-height: 1.5;
}

.toc-number,
.site-link span {
  font-size: 12px;
}

.menu-toggle {
  font-size: var(--menu-font);
}

.rail-bottom {
  max-width: none;
}

.rail-bottom > a {
  display: inline-block;
  margin-top: 13px;
  font-size: 12px;
}

.external-editor {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.filter-chip,
.more-filters summary,
.filter-selects label,
.filter-selects button,
.filter-selects select {
  font-size: 13px;
}

.filter-chip {
  padding-left: 12px;
  padding-right: 12px;
}

.more-filters summary {
  max-width: 230px;
}

.text-link,
.recipe-footer-actions .text-link {
  font-size: 13px;
}

.button {
  font-size: 13px;
}

.page-footer nav a,
.page-footer > a {
  font-size: 13px;
}

.page-footer .footer-title {
  font-size: 21px;
  text-align: center;
}

.page-footer > div {
  flex: 1;
  min-width: 0;
}

/* White reading panels use the complete inner width, with readable padding. */
.prose {
  width: 100%;
  max-width: none;
}

.serving-note blockquote {
  max-width: none;
}

.prose p,
.steps p,
.serving-note > div > p:not(.caption),
.serving-note blockquote,
.substitutions p,
.section-intro {
  text-align: justify;
  text-align-last: start;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
}

.editor-credit {
  display: block;
  font-size: 12px;
  line-height: 1.8;
}

.editor-credit a {
  font-size: inherit;
  white-space: nowrap;
}

.rail-bottom .editor-credit {
  margin: 15px 0 0;
}

.section-credit {
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.recipe-provenance {
  max-width: 100%;
}

.recipe-provenance > p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0 0 10px;
}

.page-footer .editor-credit {
  margin-top: 12px;
}

.black-star {
  margin-left: auto;
  margin-right: auto;
}

.hero-summary {
  width: 100%;
  max-width: none;
  margin: 25px auto 0;
  font-family: var(--serif);
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: normal;
  line-height: 1.7;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
}

.recipe-hero .recipe-deck {
  width: 100%;
  max-width: none;
  margin: 22px auto 18px;
  font-size: clamp(20px, 1.8vw, 25px);
  font-weight: normal;
  line-height: 1.7;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
}

.book-hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 22px;
}

.book-hero-bottom .hero-summary {
  margin: 0;
}

.book-hero-bottom .round-link {
  justify-self: end;
}

@media (min-width: 600px) {
  :root {
    --menu-font: 15px;
    --menu-label-font: 12px;
  }

  .brand {
    font-size: 17px;
  }

  .book-hero h1 {
    font-size: clamp(64px, 9vw, 92px);
  }

  .recipe-hero h2 {
    font-size: 74px;
  }

  .discovery-heading h2 {
    font-size: 32px;
  }

}

@media (min-width: 1025px) {
  :root {
    --menu-font: clamp(15px, 1.1vw, 17px);
    --menu-label-font: 12px;
  }

  .brand {
    font-size: 18px;
  }

  .book-hero h1 {
    font-size: clamp(71px, 7.4vw, 108px);
  }

  .recipe-hero h2 {
    font-size: 84px;
  }

  .editorial-hero h1 {
    font-size: 74px;
  }

}

@media (min-width: 1350px) {
  .book-hero h1 {
    font-size: 108px;
  }

  .recipe-hero h2 {
    font-size: 92px;
  }

  .editorial-hero h1 {
    font-size: 84px;
  }

}

@media (max-width: 379px) {
  .brand {
    font-size: 13px;
  }

  .book-hero h1 {
    font-size: 40px;
  }

}

@media print {
  .recipe-hero .recipe-deck {
    font-size: 15pt;
  }

  .hero-summary {
    font-size: 15pt;
  }

  .book-hero h1,
  .editorial-hero h1,
  .recipe-hero h2 {
    font-size: 32px;
  }

  .recipe-hero h2 em {
    font-size: 22px;
  }

  .editorial-section h2 {
    font-size: 23px;
  }

  .recipe h3 {
    font-size: 19px;
  }

  .editor-credit {
    font-size: 9pt;
  }

  .section-credit {
    break-inside: avoid;
  }

}

/* Editorial sharing uses the existing button appearance. */
.page-share-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.page-share-actions .button {
  min-height: 44px;
}

@media print {
  .page-share-actions {
    display: none;
  }

}

/* One reading scale for recipes and editorial content throughout the site. */
.prose,
.prose p,
.prose li,
.section-intro,
.steps p,
.method > p,
.ingredient-text,
.ingredient-text strong,
.serving-note > div > p:not(.caption),
.serving-note blockquote,
.substitutions p,
.substitutions li {
  font-size: var(--reading-font);
  line-height: var(--reading-leading);
}

@media (min-width: 1025px) {
  :root {
    --reading-font: 18px;
  }

}

/* Retain the deliberate enlargement in cooking mode. */
.cooking-mode .recipe-body {
  --reading-font: 21px;
}

@media print {
  :root,
  .cooking-mode .recipe-body {
    --reading-font: 11pt;
    --reading-leading: 1.6;
  }

}

.facet-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
  gap:16px;
  margin:18px 0
}

.facet-grid fieldset {
  min-width:0;
  border:1px solid var(--line);
  padding:12px
}

.facet-option {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px
}

.facet-option[hidden] {
  display:none
}

#selected-tags {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:16px 0
}

.more-filters>label {
  display:block;
  margin:16px 0
}

input:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline:2px solid var(--green);
  outline-offset:3px
}

/* Wine recommendations grouped by dish and wine colour. */
.wine-color {
  margin-top: 24px;
}

.wine-color h5 {
  font-family: var(--serif);
  font-size: clamp(20px, 3.2vw, 25px);
  line-height: 1.45;
  margin-bottom: 16px;
}

.wine-color ul {
  padding-inline-start: 1.4em;
}

.wine-color li {
  margin-bottom: 20px;
}

/* Consistent wine proposal titles; numbers remain readable without CSS. */
.substitutions .wine-recommendation-title {
  font-family: var(--serif);
  font-size: clamp(20px, 3.2vw, 25px);
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  text-align-last: auto;
  text-wrap: balance;
  margin: 24px 0 16px;
}

.substitutions .wine-recommendations {
  list-style: none;
  padding-inline-start: 0;
}

.substitutions .wine-recommendation {
  margin-bottom: 24px;
}

/* Reading text on every page, excluding navigation and interface labels. */
.prose p,
.prose li,
.method > p,
.steps p,
.serving-note p:not(.caption),
.serving-note blockquote,
.substitutions p,
.substitutions li,
.section-intro,
.attribution,
.recipe-provenance p {
  text-align: justify;
  text-align-last: start;
  hyphens: auto;
  -webkit-hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
  overflow-wrap: break-word;
}

/* Narrow columns stay readable even without a Greek hyphenation dictionary. */
@media (max-width: 480px) {
  .prose p,
  .prose li,
  .method > p,
  .steps p,
  .serving-note p:not(.caption),
  .serving-note blockquote,
  .substitutions p,
  .substitutions li,
  .section-intro,
  .attribution,
  .recipe-provenance p {
    text-align: start;
  }
}

/* Preserve centred headings and descriptive eyebrow labels. */
body .eyebrow {
  text-align: center;
  text-align-last: auto;
}
