/* S301 stage 3: the inner pages under the r1 skin (docs/design/s301/final-design.md, R1 to R6).
   Linked from the body of the inner pages only, right after pages-d.css, while STOREFRONT_SKIN is
   r1 (views/lib/pages-d.ts). :not(.r1 *) keeps the product page out, :not(.pg-ba--strip *) the
   before and after kicker, :not(.pg-empty *) the empty cart heading. */

/* R1. heading scale and voice */
html[data-skin='r1']:root .pg-head.pg-head h1,
html[data-skin='r1']:root .pg-sec.pg-sec:not(.r1 *) h1,
html[data-skin='r1']:root .pg-empty.pg-empty > h1,
html[data-skin='r1']:root .pg-sec.pg-sec:not(.r1 *) h2:not(.pg-ba--strip *):not(.pg-empty *) {
  font-family: var(--sc-font-display);
  font-weight: 800;
  font-stretch: 87.5%;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: manual;
  color: #1e2a22;
}
html[data-skin='r1']:root .pg-head.pg-head h1,
html[data-skin='r1']:root .pg-sec.pg-sec:not(.r1 *) h1,
html[data-skin='r1']:root .pg-empty.pg-empty > h1 {
  font-size: var(--tv-fs-32);
  max-width: none;
}
@media (max-width: 599.98px) {
  html[data-skin='r1']:root .pg-head.pg-head h1,
  html[data-skin='r1']:root .pg-sec.pg-sec:not(.r1 *) h1,
  html[data-skin='r1']:root .pg-empty.pg-empty > h1 {
    font-size: var(--tv-fs-24);
  }
}
html[data-skin='r1']:root .pg-sec.pg-sec:not(.r1 *) h2:not(.pg-ba--strip *):not(.pg-empty *) {
  font-size: var(--tv-fs-24);
  max-width: 24ch;
}
@media (min-width: 980px) {
  html[data-skin='r1']:root .pg-head.pg-head h1,
  html[data-skin='r1']:root .pg-sec.pg-sec:not(.r1 *) h1,
  html[data-skin='r1']:root .pg-empty.pg-empty > h1 {
    font-size: var(--tv-fs-48);
    line-height: 1;
    max-width: 28ch;
  }
  html[data-skin='r1']:root .pg-sec.pg-sec:not(.r1 *) h2:not(.pg-ba--strip *):not(.pg-empty *) {
    font-size: var(--tv-fs-32);
  }
}

/* R2. page head lede */
html[data-skin='r1']:root .pg-head__lede.pg-head__lede {
  font-size: var(--tv-fs-16);
  line-height: 1.6;
}
@media (min-width: 861px) {
  html[data-skin='r1']:root .pg-head__lede.pg-head__lede {
    font-size: var(--tv-fs-18);
  }
}

/* R3. jump row: square chips, compact; stays sticky */
html[data-skin='r1']:root .pg-jump.pg-jump {
  background: #ffffff;
  border-bottom: 1px solid var(--r1-line);
}
html[data-skin='r1']:root .pg-jump__row.pg-jump__row {
  gap: 8px;
  padding-block: 8px;
}
html[data-skin='r1']:root .pg-jump__row.pg-jump__row a {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--r1-line);
  border-radius: 0;
  background: #ffffff;
  color: #1e2a22;
  font-family: var(--sc-font-display);
  font-size: var(--tv-fs-12);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    border-color var(--r1-d) var(--r1-ease),
    color var(--r1-d) var(--r1-ease);
}
@media (hover: hover) {
  html[data-skin='r1']:root .pg-jump__row.pg-jump__row a:hover {
    border-color: #2b6644;
    color: #2b6644;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-skin='r1']:root .pg-jump__row.pg-jump__row a {
    transition: none;
  }
}

/* R4. FAQ accordions: the r1 product look on every inner page */
html[data-skin='r1']:root .pg-sec .tv-faq.tv-faq:not(.r1 *) details {
  border-bottom: 1px solid var(--r1-line);
  border-radius: 0;
  background: none;
}
html[data-skin='r1']:root .pg-sec .tv-faq.tv-faq:not(.r1 *) summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  font-family: var(--sc-font-text);
  font-weight: 600;
  font-size: var(--tv-fs-16);
  line-height: 1.4;
}
@media (min-width: 861px) {
  html[data-skin='r1']:root .pg-sec .tv-faq.tv-faq:not(.r1 *) summary {
    font-size: var(--tv-fs-18);
  }
}
html[data-skin='r1']:root .pg-sec .tv-faq.tv-faq:not(.r1 *) summary::-webkit-details-marker {
  display: none;
}
html[data-skin='r1']:root .pg-sec .tv-faq.tv-faq:not(.r1 *) summary::after {
  content: '+';
  position: static;
  translate: none;
  rotate: none;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #2b6644;
  color: #ffffff;
  font-weight: 700;
  font-size: var(--tv-fs-18);
  line-height: 1;
  transition: none;
}
html[data-skin='r1']:root .pg-sec .tv-faq.tv-faq:not(.r1 *) details[open] summary::after {
  content: '\2212';
  rotate: none;
}
html[data-skin='r1']:root .pg-sec .tv-faq.tv-faq:not(.r1 *) details p {
  margin: 0 0 16px;
  font-size: var(--tv-fs-16);
  line-height: 1.6;
  color: var(--sc-ink-soft);
}

/* R5. how it works step list: square numbers, wider text on a phone */
html[data-skin='r1']:root .hiw-seq.hiw-seq {
  border-inline-start-color: var(--r1-line);
}
html[data-skin='r1']:root .hiw-seq__n.hiw-seq__n {
  border-radius: 0;
  background: #2b6644;
  border-color: #2b6644;
  color: #ffffff;
  font-family: var(--sc-font-display);
  font-weight: 800;
  font-size: var(--tv-fs-14);
}
@media (max-width: 599.98px) {
  html[data-skin='r1']:root .hiw-seq__step.hiw-seq__step {
    grid-template-columns: 28px minmax(0, 1fr) 96px;
    column-gap: 12px;
  }
  html[data-skin='r1']:root .hiw-seq__pic.hiw-seq__pic {
    width: 96px;
    aspect-ratio: 1;
  }
  html[data-skin='r1']:root .hiw-seq__pic.hiw-seq__pic img {
    object-fit: cover;
  }
}

/* R6. button roles: orange only where it buys. The three forms render
   action="/contact/<market>", "/refills/<market>" (reminder sign up) and
   "/tracking/<market>", so the match is on the prefix; the pay and cart forms match none. */
html[data-skin='r1']:root .pg-form[action^='/contact/'] .tv-btn.tv-btn,
html[data-skin='r1']:root .pg-form[action^='/refills/'] .tv-btn.tv-btn,
html[data-skin='r1']:root .pg-form[action^='/tracking/'] .tv-btn.tv-btn {
  background: #2b6644;
  color: #ffffff;
}
html[data-skin='r1']:root .pg-form[action^='/contact/'] .tv-btn.tv-btn:hover,
html[data-skin='r1']:root .pg-form[action^='/refills/'] .tv-btn.tv-btn:hover,
html[data-skin='r1']:root .pg-form[action^='/tracking/'] .tv-btn.tv-btn:hover,
html[data-skin='r1']:root .pg-form[action^='/contact/'] .tv-btn.tv-btn:active,
html[data-skin='r1']:root .pg-form[action^='/refills/'] .tv-btn.tv-btn:active,
html[data-skin='r1']:root .pg-form[action^='/tracking/'] .tv-btn.tv-btn:active {
  background: #1f3d2b;
}
html[data-skin='r1']:root main a.tv-btn.tv-btn[href^='mailto:'],
html[data-skin='r1']:root main a.tv-btn.tv-btn[href$='/track'],
html[data-skin='r1']:root main a.tv-btn.tv-btn[href$='/guarantee'] {
  background: #ffffff;
  color: #2b6644;
  box-shadow: inset 0 0 0 1px #2b6644;
}
html[data-skin='r1']:root main a.tv-btn.tv-btn[href^='mailto:']:hover,
html[data-skin='r1']:root main a.tv-btn.tv-btn[href$='/track']:hover,
html[data-skin='r1']:root main a.tv-btn.tv-btn[href$='/guarantee']:hover {
  background: #e7f0e9;
}
