/*
 * S297 r1 skin (STOREFRONT_SKIN=r1, apps/web/src/lib/skin.ts). Linked from the head of every page
 * only while the switch is r1; every selector starts with html[data-skin='r1'], so without the
 * attribute nothing here applies. Origin: docs/design/s297/proof/product-r1.html, spec 5 and 9.
 *
 * The Owner, 2026-11-17, after the proof: THE ORANGE BUTTONS STAY. Every button that drives a
 * purchase keeps today's orange (#FF5500, hover --tv-accent-hover #C2410C, label --tv-cta-ink),
 * restated as --r1-buy because --sc-accent is green here. Green #2B6644 is the accent for
 * everything else. --tv-accent-hover and --tv-accent-deep are not overridden, so errors, warnings
 * and the brick decorations keep today's colours (decision D2 of the spec is dropped).
 */
html[data-skin='r1'] {
  --sc-canvas: #ffffff;
  --sc-surface: #ffffff;
  --sc-ink: #1e2a22;
  --sc-ink-soft: #55635a;
  --sc-accent: #2b6644;
  --sc-accent-ink: #ffffff;
  --tv-cta-ink: #ffffff;
  --tv-green-700: #2b6644;
  --tv-green-tint: #e7f0e9;
  --tv-line: #e3e6e0;
  --sc-hairline: #e3e6e0;
  --sc-r-sm: 0px;
  --sc-r-md: 0px;
  --sc-r-lg: 0px;
  --sc-r-pill: 0px;
  --sc-e1: none;
  --sc-e2: none;
  --r1-buy: #ff5500;
  --r1-surface: #f5f6f2;
  --r1-soft: #e7f0e9;
  --r1-line: #e3e6e0;
  --r1-head-h: 56px;
  --r1-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --r1-d: 300ms;
  --r1-d-fast: 160ms;
  caret-color: #2b6644;
  accent-color: #2b6644;
  background: #ffffff;
}
@media (min-width: 861px) {
  html[data-skin='r1'] {
    --r1-head-h: 72px;
  }
}
html[data-skin='r1'] body {
  background: #ffffff;
}
html[data-skin='r1'] ::selection {
  background: #2b6644;
  color: #ffffff;
}
html[data-skin='r1'] :focus-visible {
  outline: 2px solid #2b6644;
  outline-offset: 3px;
  border-radius: 0;
}

/* announcement bar */
html[data-skin='r1'] .tv-announce {
  background: #1f3d2b;
  color: #ffffff;
  font-weight: 500;
  letter-spacing: 0.01em;
}
html[data-skin='r1'] .tv-announce a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
html[data-skin='r1'] .tv-announce :focus-visible {
  outline-color: #ffffff;
}
/* S302: one line on a phone, the whole line is the guarantee link */
html[data-skin='r1'] .tv-announce__short {
  display: none;
}
@media (max-width: 860px) {
  html[data-skin='r1'] .tv-announce__long {
    display: none;
  }
  html[data-skin='r1'] .tv-announce__short {
    display: block;
    white-space: nowrap;
  }
  html[data-skin='r1'] .tv-announce a.tv-announce__short {
    padding-block: 4px;
  }
}

/* S302 menu */
html[data-skin='r1'] .tv-drawer:not([open]) ~ .r1-drawer {
  display: none;
}
@media (max-width: 1299px) {
  html[data-skin='r1'] .r1-acct {
    display: none;
  }
}
@media (min-width: 1300px) {
  html[data-skin='r1'] .tv-drawer {
    display: block;
  }
}
/* header */
html[data-skin='r1'] .tv-header.is-solid,
html[data-skin='r1'] .pg .tv-header.is-solid {
  background: #ffffff;
  border-bottom: 1px solid #e3e6e0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html[data-skin='r1'] .tv-header__in {
  min-height: var(--r1-head-h);
}
html[data-skin='r1'] .tv-nav a {
  font-family: var(--sc-font-display);
  font-size: var(--tv-fs-14);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* ink only on the solid header; over the home hero the light ink stays */
html[data-skin='r1'] .tv-chrome:not(.has-hero) .tv-header.is-solid .tv-nav a {
  color: #1e2a22;
}
html[data-skin='r1'] .tv-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.5em;
}
html[data-skin='r1'] .tv-chrome:not(.has-hero) .tv-header.is-solid .tv-nav a[aria-current='page'] {
  color: #2b6644;
}
html[data-skin='r1'] .tv-chrome:not(.has-hero) .tv-header.is-solid .tv-header__cart {
  color: #1e2a22;
}
html[data-skin='r1'] .tv-header__cart .tv-header__badge {
  background: #2b6644;
  border-radius: 0;
}
/* S302: one header row from 420 down to 320, every language */
@media (max-width: 420px) {
  html[data-skin='r1'] .tv-header__in {
    padding-inline: 12px;
    gap: 0 6px;
  }
  html[data-skin='r1'] .tv-header__logo img {
    height: 25px;
  }
  html[data-skin='r1'] .tv-header .tv-btn--sm {
    padding-inline: 10px;
  }
  html[data-skin='r1'] .tv-header__cart {
    margin-inline-end: -8px;
  }
}
@media (max-width: 359px) {
  html[data-skin='r1'] .tv-header__in {
    gap: 0 4px;
  }
  html[data-skin='r1'] .tv-header .tv-btn--sm {
    padding-inline: 8px;
    font-size: var(--tv-fs-14);
  }
}

/* buttons: square, uppercase; purchase orange (the Owner, 2026-11-17), outline green.
   `:root` and the doubled class outrank pages-d.css main .tv-btn */
html[data-skin='r1']:root .tv-btn.tv-btn {
  border-radius: 0;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition:
    background-color var(--r1-d) var(--r1-ease),
    transform var(--r1-d-fast) var(--r1-ease);
}
html[data-skin='r1']:root
  .tv-btn.tv-btn:not(.tv-btn--outline, .tv-btn--ghost, .tv-btn--wa, .tv-btn--green),
html[data-skin='r1'] .hd-btn {
  background: var(--r1-buy);
  color: var(--tv-cta-ink);
}
html[data-skin='r1']:root
  .tv-btn.tv-btn:not(.tv-btn--outline, .tv-btn--ghost, .tv-btn--wa, .tv-btn--green):hover,
html[data-skin='r1']:root
  .tv-btn.tv-btn:not(.tv-btn--outline, .tv-btn--ghost, .tv-btn--wa, .tv-btn--green):active,
html[data-skin='r1'] .hd-btn:hover {
  background: var(--tv-accent-hover);
  box-shadow: none;
}
html[data-skin='r1']:root .tv-btn.tv-btn--outline {
  background: #ffffff;
  color: #2b6644;
  box-shadow: inset 0 0 0 1px #2b6644;
}
html[data-skin='r1']:root .tv-btn.tv-btn--outline:hover {
  background: #e7f0e9;
}
html[data-skin='r1'] .tv-link {
  color: #2b6644;
}

/* section heads, site wide */
html[data-skin='r1'] .pg-h2,
html[data-skin='r1'] .r1-h2 {
  font-family: var(--sc-font-display);
  font-weight: 800;
  font-stretch: 87.5%;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: 1.08;
  font-size: var(--tv-fs-24);
  text-wrap: balance;
  overflow-wrap: break-word;
  hyphens: manual;
  color: #1e2a22;
}
@media (min-width: 600px) {
  html[data-skin='r1'] .pg-h2,
  html[data-skin='r1'] .r1-h2 {
    font-size: var(--tv-fs-32);
  }
}
@media (min-width: 980px) {
  html[data-skin='r1'] .pg-h2,
  html[data-skin='r1'] .r1-h2 {
    font-size: var(--tv-fs-48);
    line-height: 1;
  }
}

/* surfaces and cards */
html[data-skin='r1'] .pg-sec--surface {
  background: var(--r1-surface);
}

/* footer: light */
html[data-skin='r1'] .tv-footer.tv-dark {
  --sc-canvas: #f5f6f2;
  --sc-surface: #ffffff;
  --sc-ink: #1e2a22;
  --sc-ink-soft: #55635a;
  --sc-control-line: #7d8a77;
  --tv-dark-ink: #1e2a22;
  --tv-sage: #55635a;
  background: #f5f6f2;
  color: #1e2a22;
  border-top: 1px solid #e3e6e0;
}
html[data-skin='r1'] .tv-footer .tv-footer__h {
  color: #1e2a22;
  font-weight: 800;
  letter-spacing: 0.04em;
}
html[data-skin='r1'] .tv-footer a {
  color: #1e2a22;
}
html[data-skin='r1'] .tv-footer__legal {
  border-top-color: #e3e6e0;
  color: #55635a;
}
html[data-skin='r1'] .tv-footer__legal a {
  color: #55635a;
}
html[data-skin='r1'] .tv-news p,
html[data-skin='r1'] .tv-news label {
  color: #55635a;
}
html[data-skin='r1'] .tv-news input[type='email'] {
  background: #ffffff;
  border: 1px solid #7d8a77;
  border-radius: 0;
  color: #1e2a22;
}
html[data-skin='r1'] .tv-news input[type='email']::placeholder {
  color: #55635a;
}
html[data-skin='r1'] .tv-footer__lang button {
  border-color: #7d8a77;
  color: #1e2a22;
  border-radius: 0;
}

@media (prefers-reduced-motion: reduce) {
  html[data-skin='r1']:root .tv-btn.tv-btn,
  html[data-skin='r1']:root .tv-btn.tv-btn:active {
    transition: none;
    transform: none;
  }
}

/* S297 additions (spec sections 5 and 9) */
/* section 9, correction 2: the newsletter heading is a sentence, not a column head */
html[data-skin='r1'] .tv-news .tv-footer__h {
  font-size: var(--tv-fs-14);
}
/* section 5: cards that took their edge from the cream canvas get a hairline */
html[data-skin='r1'] .pg-card,
html[data-skin='r1'] .tv-review {
  box-shadow: inset 0 0 0 1px var(--r1-line);
}
