/**
 * TEST v81 — one restrained editorial rhythm across standard content pages.
 * Preserves the site's images, historical slide state, footer and WooCommerce
 * forms. This stylesheet is purely presentational.
 */
body.kcv20-chrome.kcv9-active {
  --kcv81-paper: #fbf8f2;
  --kcv81-card: #fffdfa;
  --kcv81-wine: #570d1e;
  --kcv81-ink: #493631;
  --kcv81-gold: #bc955d;
  --kcv81-border: #e4d6c1;
}

/* Modify and reuse the historic lattice consistently throughout page.php.
 * Avoid the previous partial-height background that stopped above the story.
 * Homepage, catalog, product photos and footer retain their own treatments.
 */
body.kcv20-chrome .kupetz-content-shell.kcv81-paper {
  box-sizing: border-box;
  position: relative;
  isolation: isolate;
  background-color: var(--kcv81-paper);
  background-image:
    linear-gradient(45deg, transparent 49.65%, rgba(165, 126, 83, .055) 50%, transparent 50.35%),
    linear-gradient(-45deg, transparent 49.65%, rgba(165, 126, 83, .055) 50%, transparent 50.35%);
  background-size: 64px 64px;
  padding-bottom: clamp(50px, 6vw, 90px);
}
body.kcv20-chrome .kupetz-content-shell.kcv81-paper > .kupetz-page-background {
  display: none !important;
}
body.kcv20-chrome .kupetz-content-shell.kcv81-paper > .container,
body.kcv20-chrome .kupetz-content-shell.kcv81-paper > .container-fluid,
body.kcv20-chrome .kupetz-content-shell.kcv81-paper > .container-flow {
  position: relative;
  z-index: 1;
}

/* Shared hierarchy: headings should not revert to vintage image sprites,
   floating oval borders or unrelated legacy ornament dimensions. */
body.kcv20-chrome .kcv81-paper article > h1:not(.screen-reader-text) {
  color: var(--kcv81-wine);
  font: 400 clamp(32px, 3.25vw, 48px)/1.17 var(--kupetz-font-display, Georgia, serif);
  letter-spacing: .005em;
  text-align: center;
  text-transform: uppercase;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto clamp(30px, 3.5vw, 48px);
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--kcv81-gold);
  text-wrap: balance;
}
body.kcv20-chrome .kcv81-paper article > h1::before,
body.kcv20-chrome .kcv81-paper article > h1::after {
  display: none;
  content: none;
}
body.kcv20-chrome .kcv81-paper article :is(h2,h3):not(.kupetz-history-title):not(.kupetz-history-name) {
  color: var(--kcv81-wine);
  font-family: var(--kupetz-font-display, Georgia, serif);
  font-weight: 400;
  line-height: 1.25;
  text-transform: none;
  text-wrap: balance;
  text-shadow: none;
}
body.kcv20-chrome .kcv81-paper article :is(h2,h3):not(.kupetz-history-title):not(.kupetz-history-name)::before,
body.kcv20-chrome .kcv81-paper article :is(h2,h3):not(.kupetz-history-title):not(.kupetz-history-name)::after {
  content: none;
}
/* Internal page authoring can contain old CMS title borders. Restore a clean
   typographic rhythm without modifying the stored HTML. */
body.kcv20-chrome .kcv81-paper article :is(h2,h3) {
  margin-top: clamp(25px, 3vw, 42px);
  margin-bottom: clamp(14px, 1.9vw, 24px);
}
body.kcv20-chrome .kcv81-paper article :is(h2,h3):first-child {
  margin-top: 0;
}

/* History is styled by a single dedicated v83 component stylesheet.
   Retain the approved paper and non-history heading rules here. */
@media (max-width: 700px) {
  body.kcv20-chrome .kupetz-content-shell.kcv81-paper {
    background-size: 42px 42px;
  }
  body.kcv20-chrome .kcv81-paper article > h1:not(.screen-reader-text) {
    font-size: clamp(29px, 7vw, 37px);
  }
}

/* On short informational/Woo pages, grow the content instead of allowing
   the footer to float part-way up the viewport. Header remains fixed. */
body.kcv20-chrome.page,
body.kcv20-chrome.woocommerce-cart,
body.kcv20-chrome.woocommerce-checkout {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
body.kcv20-chrome.page > .kupetz-content-shell,
body.kcv20-chrome.woocommerce-cart > .kupetz-content-shell,
body.kcv20-chrome.woocommerce-checkout > .kupetz-content-shell {
  flex: 1 0 auto;
}
body.kcv20-chrome.page > footer.kcv28-footer,
body.kcv20-chrome.woocommerce-cart > footer.kcv28-footer,
body.kcv20-chrome.woocommerce-checkout > footer.kcv28-footer {
  flex: 0 0 auto;
  margin-top: auto;
}
