/* Shared image-hero, chapter rail and editorial typography.
   Reference: Erkundungen typography, winery image-hero height. */
.editorial-layout{
  --editorial-title-size:clamp(42px,5.6vw,76px);
  --editorial-section-size:clamp(38px,4.2vw,58px);
  --editorial-lead-size:clamp(19.55px,2.125vw,27.2px);
}
main.editorial-layout>.subhero{
  --hero-title-size:var(--editorial-title-size);
  display:flex;align-items:center;height:auto;min-height:640px;padding:54px 0;
}
main.editorial-layout>.subhero>.shell{padding-bottom:0}
main.editorial-layout>.subhero .crumb{margin:0 0 34px!important}
main.editorial-layout>.subhero h1{
  max-width:1180px;margin:0;font-size:var(--editorial-title-size);
  font-family:var(--heading);font-weight:500;letter-spacing:-.045em;line-height:1.04;
  overflow-wrap:break-word;
}
main.editorial-layout>.subhero :is(.hero-subtitle,.winery-hero-punchline){
  max-width:1180px;margin:0;font-family:var(--heading);font-weight:500;
  font-size:calc(var(--editorial-title-size) * .632);font-style:italic;
  letter-spacing:-.035em;line-height:1.04;color:#e3ba7b;
}
main.editorial-layout>.subhero>.shell>p:not(.crumb){
  max-width:720px;margin:28px 0 0;font-family:var(--sans);
  font-size:18px;line-height:1.65;color:#f0e7df;
}
main.editorial-layout>.subhero>.shell>.button,
main.editorial-layout>.subhero .winery-hero-cta{margin-top:24px}

/* Same editorial lead and chapter sizes; cards, forms and facts keep their roles. */
main.editorial-layout :is(.pro-intro,.guide-intro){padding-top:72px}
main.editorial-layout :is(.pro-intro>p,.guide-intro>p,.terroir-intro>p,.culture-lead-copy>p:first-of-type,.intro-p,.exploration-private-lead){
  font-family:var(--heading);font-size:var(--editorial-lead-size);font-weight:500;
  line-height:1.45;color:var(--wine);
}
main.editorial-layout :is(.pro-intro>p,.guide-intro>p,.terroir-intro>p,.culture-lead-copy>p:first-of-type,.intro-p,.exploration-private-lead){color:#8d6528}
main.terroir-page.editorial-layout .terroir-intro>p{max-width:none}
main.editorial-layout .culture-lead-copy>p:first-of-type{margin-top:24px}
main.editorial-layout :is(.richtext,.encyclopedia-copy,.encyclopedia-longform,.sensoric-longform) >p:not(.intro-p):not(.sensoric-source){font-size:16px;line-height:1.65}
main.editorial-layout :is(.richtext,.encyclopedia-copy,.encyclopedia-longform,.sensoric-longform) h2,
main.editorial-layout :is(.section-heading,.guide-section-heading,.pro-split,.culture-split,.culture-section,.guide-section,.contact-heading,.encyclopedia-research,.encyclopedia-bridge,.sensoric-hub-intro,.sensoric-method)>h2,
main.editorial-layout>.section>.shell>h2,
main.editorial-layout>.section.shell>h2,
main.editorial-layout :is(.culture-heading,.legal-heading,.pro-practice-heading,.culture-lead-copy,.culture-origin-copy,.culture-image-copy,.culture-identity-copy)>h2,
main.editorial-layout .section-heading>div>h2,
main.editorial-layout :is(.encyclopedia-bridge,.encyclopedia-related)>.shell>h2,
main.editorial-layout :is(.exploration-signup,.pro-split,.culture-split,.culture-section,.guide-section)>div>h2,
main.editorial-layout :is(.encyclopedia-hub-intro,.encyclopedia-research,.sensoric-hub-intro,.sensoric-method)>.shell>div>h2{
  font-family:var(--heading);font-size:var(--editorial-section-size);font-weight:500;
  line-height:1.08;letter-spacing:-.025em;
}
main.editorial-layout :is(.richtext,.encyclopedia-copy,.encyclopedia-longform,.sensoric-longform,.guide-copy,.profile-copy,.wine-profile-copy)>h3{
  font-family:var(--heading);font-size:25px;line-height:1.15;margin:45px 0 12px;
}
main.editorial-layout :is(.terroir-columns,.culture-era,.culture-origin-grid)>div>h3,
main.editorial-layout .culture-chapters>article>h3{font-family:var(--heading);font-size:25px;line-height:1.15;margin:0 0 12px}
main.editorial-layout :is(.encyclopedia-longform,.sensoric-longform)>section>h3{font-family:var(--heading);font-size:25px;line-height:1.15;margin:45px 0 12px}
main.editorial-layout :is(.encyclopedia-longform>section,.sensoric-longform>section,.profile-copy,.wine-profile-copy)>p:not(.intro-p):not(.sensoric-source){font-size:16px;line-height:1.65}
main.editorial-layout>.subhero~.section,
main.editorial-layout>.wine-detail-hero~.section{padding-top:72px}
main.editorial-layout .guide-intro>p{margin-bottom:26px}
main.editorial-layout :is(.guide-copy,.culture-copy){font-size:16px;line-height:1.65}
main.editorial-layout :is(.encyclopedia-longform,.sensoric-longform)>section{padding-bottom:72px}
main.editorial-layout :is(.encyclopedia-longform,.sensoric-longform)>section+section{padding-top:72px}

/* Common rail density and two independent groups on the header's outer frame. */
main.editorial-layout .chapter-nav .chapter-nav-inner{gap:28px;min-height:80px}
main.editorial-layout .chapter-nav .chapter-nav-label{font-size:16px}
main.editorial-layout .chapter-nav .chapter-nav-links{flex:1;min-width:0;gap:6px}
main.editorial-layout .chapter-nav .chapter-nav-links :is(a,button){font-size:14px;padding:12px 10px;line-height:1.2}
main.editorial-layout .chapter-nav :is(.chapter-purchase-actions,.winery-chapter-actions,.wine-style-actions){
  display:flex;flex:none;align-items:center;gap:8px;margin-left:auto;
}
main.editorial-layout .chapter-nav :is(.chapter-purchase-action,.winery-chapter-action,.wine-style-action){
  display:flex;align-items:center;justify-content:center;min-height:44px;padding:10px 12px;
  border:1px solid var(--gold);color:#fff;font-family:var(--heading);font-size:10px;font-weight:500;
  line-height:1.2;letter-spacing:.04em;text-transform:uppercase;text-decoration:none;white-space:nowrap;
}
.chapter-purchase-action:hover{background:rgba(255,255,255,.1)}
.chapter-purchase-action:focus-visible{outline:2px solid #fff;outline-offset:3px}
main.editorial-layout .chapter-nav .chapter-nav-links a:focus-visible{outline:2px solid #fff;outline-offset:-2px}
main.editorial-layout .chapter-nav~[id],
main.editorial-layout .chapter-nav~* [id]{scroll-margin-top:calc(var(--chapter-header-height,83px) + var(--chapter-nav-height,84px) + 20px)}
@media(max-width:1300px){
  main.editorial-layout .chapter-nav .chapter-nav-inner{display:flex;flex-wrap:wrap;gap:0 14px;padding-top:10px;padding-bottom:10px}
  main.editorial-layout .chapter-nav :is(.chapter-purchase-actions,.winery-chapter-actions,.wine-style-actions){width:100%;justify-content:flex-end;margin-top:4px}
}
@media(max-width:600px){
  main.editorial-layout>.subhero{min-height:540px;padding:42px 0}
  main.editorial-layout>.subhero .crumb{margin-bottom:30px!important}
  main.editorial-layout :is(.pro-intro,.guide-intro){padding-top:48px}
  main.editorial-layout>.subhero~.section,
  main.editorial-layout>.wine-detail-hero~.section{padding-top:48px}
  main.editorial-layout .chapter-nav .chapter-nav-inner{display:block;min-height:0;padding-top:10px;padding-bottom:10px}
  main.editorial-layout .chapter-nav .chapter-nav-label{display:block;font-size:15px}
  main.editorial-layout .chapter-nav .chapter-nav-links{padding:7px 2px 10px;gap:4px}
  main.editorial-layout .chapter-nav .chapter-nav-links :is(a,button){padding:10px}
  main.editorial-layout .chapter-nav :is(.chapter-purchase-actions,.winery-chapter-actions,.wine-style-actions){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:0}
  main.editorial-layout .chapter-nav :is(.chapter-purchase-action,.winery-chapter-action,.wine-style-action){white-space:normal;text-align:center}
}

/* Shared adaptive chapter/filter menu. Keep the same original links and buttons. */
body main .chapter-nav.is-responsive{scroll-margin-top:var(--chapter-header-height,83px)}
body main .chapter-nav.is-responsive .chapter-nav-inner{display:flex;flex-wrap:nowrap;align-items:center;gap:28px;min-height:80px;padding-top:10px;padding-bottom:10px}
body main .chapter-nav.is-responsive .chapter-nav-menu{display:flex;align-items:center;gap:28px;flex:1;min-width:0;position:relative}
body main .chapter-nav.is-responsive .chapter-nav-label{display:block;flex:none;margin:0}
body main .chapter-nav.is-responsive .chapter-nav-links{flex:none;overflow:visible;gap:6px;padding:10px 3px}
body main .chapter-nav.is-responsive :is(.chapter-purchase-actions,.winery-chapter-actions,.wine-style-actions,.wine-chapter-actions){display:flex;flex:none;width:auto;gap:8px;margin:0 0 0 auto}
body main .chapter-nav.is-responsive .chapter-nav-toggle{display:none}
body main .chapter-nav.is-compact .chapter-nav-inner{gap:14px}
body main .chapter-nav.is-compact .chapter-nav-menu{display:block;max-width:420px}
body main .chapter-nav.is-compact .chapter-nav-label{display:none}
body main .chapter-nav.is-compact .chapter-nav-toggle{display:flex;align-items:center;gap:12px;position:relative;width:100%;min-height:44px;padding:10px 38px 10px 14px;border:1px solid var(--gold);border-radius:0;background:rgba(255,255,255,.06);color:#fff;cursor:pointer;text-align:left;font-family:var(--heading);font-size:14px;line-height:1.2}
body main .chapter-nav.is-compact .chapter-nav-toggle::after{content:'';position:absolute;right:16px;top:16px;width:7px;height:7px;border-right:1.5px solid var(--gold);border-bottom:1.5px solid var(--gold);transform:rotate(45deg)}
body main .chapter-nav.is-open .chapter-nav-toggle::after{top:20px;transform:rotate(225deg)}
body main .chapter-nav.is-compact .chapter-nav-toggle-title{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--gold);font-weight:600}
body main .chapter-nav.is-compact .chapter-nav-toggle-current{flex:none;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
body main .chapter-nav.is-compact .chapter-nav-links{position:absolute;top:calc(100% + 6px);left:0;right:0;display:flex;flex-direction:column;align-items:stretch;gap:0;max-height:min(60dvh,var(--chapter-menu-space,60vh));overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;margin:0;padding:6px;background:var(--wine);border:1px solid var(--gold);box-shadow:0 8px 22px rgba(53,16,28,.25);z-index:20}
body main .chapter-nav.is-compact .chapter-nav-links[hidden]{display:none}
body main .chapter-nav.is-compact .chapter-nav-links :is(a,button){flex:none;width:100%;min-height:44px;padding:12px 10px;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:14px}
body main .chapter-nav.is-compact .chapter-nav-toggle:focus-visible{outline:2px solid #fff;outline-offset:3px}
body main .chapter-nav.is-stacked .chapter-nav-inner{flex-direction:column;align-items:stretch;gap:8px;min-height:0}
body main .chapter-nav.is-stacked .chapter-nav-menu{flex:none;width:100%;max-width:none}
body main .chapter-nav.is-stacked :is(.chapter-purchase-actions,.winery-chapter-actions,.wine-style-actions,.wine-chapter-actions){display:grid;grid-template-columns:1fr;width:100%;gap:8px;margin:0}
body main .chapter-nav.is-stacked :is(.chapter-purchase-action,.winery-chapter-action,.wine-style-action,.wine-chapter-action){width:100%;min-height:44px;white-space:normal;text-align:center}
body main .chapter-nav.is-tall{position:relative;top:auto}
body main .chapter-nav.is-tall .chapter-nav-toggle{scroll-margin-top:calc(var(--chapter-header-height,83px) + 8px)}
/* Intrinsic measurement ignores the current collapsed/stacked layout. */
body main .chapter-nav .chapter-nav-measure{position:absolute;left:0;top:0;visibility:hidden;pointer-events:none;display:flex;gap:28px;width:max-content;height:auto;contain:layout style}
body main .chapter-nav .chapter-nav-measure .chapter-nav-menu{display:flex;flex:none;width:max-content;max-width:none;gap:28px}
body main .chapter-nav .chapter-nav-measure .chapter-nav-label{display:block}
body main .chapter-nav .chapter-nav-measure .chapter-nav-links{position:static;display:flex;flex:none;flex-direction:row;width:max-content;max-height:none;gap:6px;padding:10px 3px;overflow:visible;border:0;box-shadow:none}
body main .chapter-nav .chapter-nav-measure .chapter-nav-links :is(a,button){width:auto;min-height:0;white-space:nowrap;padding:12px 10px}
body main .chapter-nav .chapter-nav-measure :is(.chapter-purchase-actions,.winery-chapter-actions,.wine-style-actions,.wine-chapter-actions){display:flex;flex:none;width:max-content;gap:8px;margin:0}
body main .chapter-nav .chapter-nav-measure :is(.chapter-purchase-action,.winery-chapter-action,.wine-style-action,.wine-chapter-action){width:auto;white-space:nowrap}

/* Numeric catalogue slots keep the typography of their containing label.
   Legacy CTA span rules describe the small action line, not these values. */
:root [data-catalog-count]{
  font:inherit;line-height:inherit;color:inherit;
  letter-spacing:inherit;text-transform:inherit;
}
