/* Cannabionics v4 "herbarium plate" system layer. Loaded after css/v3.css and the page p-*.css on every page.
   Prefix v4-. Spec: S/v4-design.md sections 1 to 3; copy-paste markup in S/v4-partials.html.
   Motion lives in css/v4-fx.css (M1) and css/v4-grow.css (M2); this file only holds static states and the two
   enter transitions it owns (sprig rule). Art and icons never carry a colour of their own: they inherit currentColor. */

/* ---------- 1. tokens ---------- */
:root {
  --v4-art: var(--cb-green);
  --v4-art-soft: rgba(0,129,54,.16);
  --v4-art-dark: rgba(255,255,255,.10);
  --v4-art-accent: var(--cb-yellow);
  --v4-tile: 48px; --v4-tile-sm: 36px; --v4-tile-lg: 64px;
  --t-grow: 1600ms; --t-fill: 900ms; --t-count: 1400ms;
  --v4-leaf-tile: url("/images/art/leaflet-tile-green.svg");
  /* Font Awesome Free 6.7.2 glyphs (CC BY 4.0) as masks: check (lists, success) and leaf (feature lists, process) */
  --ic-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z'/%3E%3C/svg%3E");
  --v4-ic-leaf: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M272 96c-78.6 0-145.1 51.5-167.7 122.5c33.6-17 71.5-26.5 111.7-26.5l88 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-16 0-72 0s0 0 0 0c-16.6 0-32.7 1.9-48.3 5.4c-25.9 5.9-49.9 16.4-71.4 30.7c0 0 0 0 0 0C38.3 298.8 0 364.9 0 440l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-48.7 20.7-92.5 53.8-123.2C121.6 392.3 190.3 448 272 448l1 0c132.1-.7 239-130.9 239-291.4c0-42.6-7.5-83.1-21.1-119.6c-2.6-6.9-12.7-6.6-16.2-.1C455.9 72.1 418.7 96 376 96L272 96z'/%3E%3C/svg%3E");
  /* ponytail: the round 3 textures are retired here in one place instead of overriding ~15 selectors across v3.css and
     the page css: dark textures off, every light texture becomes the leaflet tile. Selectors spec 1.3 names are set again below. */
  --v3-vein-tile: none;
  --v3-vein-tile-green: var(--v4-leaf-tile);
}

/* ---------- 2. icons (Font Awesome sprite, images/icons.svg) ---------- */
:where(.i) { width: 1em; height: 1em; }  /* zero specificity: the v3 .v3-ic size contexts (buttons, topbar, rows) still win */
.i { display: inline-block; vertical-align: -.125em; fill: currentColor; flex: none; overflow: visible; }
.i--16 { font-size: 16px; } .i--20 { font-size: 20px; } .i--24 { font-size: 24px; } .i--32 { font-size: 32px; }
.v3-btn--text .i.v3-ic, .ix-tcard__go .i, .c-tool__go .i { width: 16px; height: 16px; }
.v3-row__go .i.v3-ic { width: 20px; height: 20px; }

/* ---------- 3. line-art drawings (images/art/*.svg via <use>) ---------- */
.v4-art { color: var(--v4-art); fill: currentColor; pointer-events: none; overflow: visible; }
.v3-bg-dark .v4-art, .v3-on-dark .v4-art, .v3-footer .v4-art, .v3-tool__result .v4-art { color: #fff; }
.v4-art--soft { opacity: .16; }
.v3-bg-dark .v4-art--soft, .v3-footer .v4-art--soft { opacity: .10; }
.v4-art--accent { color: var(--v4-art-accent); }

/* ---------- 4. sprig rule (replaces the vein divider under every index label) ---------- */
.v4-rule { display: flex; align-items: center; gap: 10px; width: 40%; min-width: 180px; max-width: 480px; margin: var(--s-3) 0 var(--s-5); color: var(--cb-green); }
.v4-rule::after { content: ""; flex: 1; height: 1px; background: currentColor; opacity: .35; transform-origin: left; }
.v4-rule__sprig { width: auto; height: 30px; flex: none; }
.v3-bg-dark .v4-rule, .v3-on-dark .v4-rule { color: var(--cb-yellow); }
.v4-rule--full { width: 100%; max-width: none; }
.v4-rule > .v4-rule__sprig { color: inherit; }  /* beats the dark-context white for art: the rule is yellow on dark */
.v3-hero-paper .v4-rule { margin: var(--s-6) 0 0; }
.c-statement .v4-rule { margin: 0 0 var(--s-6); }
.v3-js .v4-rule__sprig { clip-path: inset(0 100% 0 0); transition: clip-path var(--t-slow) var(--ease-out); }
.v3-js .v4-rule::after { transform: scaleX(0); transition: transform var(--t-draw) var(--ease-out) 200ms; }
.v3-js .is-in .v4-rule__sprig, .v3-js .v4-rule.is-in .v4-rule__sprig { clip-path: inset(0 0 0 0); }
.v3-js .is-in .v4-rule::after, .v3-js .v4-rule.is-in::after { transform: none; }

/* ---------- 5. plates: one large engraving per section, bleeding off an edge, under the content ---------- */
.v4-has-plate { position: relative; isolation: isolate; overflow: clip; }
.v4-has-plate > :not(.v4-plate, .v3-leaf) { position: relative; z-index: 1; }
.v4-plate { position: absolute; z-index: 0; width: clamp(360px, 46vw, 760px); height: auto; opacity: .10; }
.v3-bg-dark .v4-plate, .v3-footer .v4-plate { color: #fff; }
.v3-hero-paper .v4-plate, .v3-bg-paper .v4-plate, .v3-bg-mint .v4-plate { color: var(--cb-green); opacity: .12; }
.v4-plate--fan    { right: -8%; top: -12%; transform: rotate(18deg); }
.v4-plate--plant  { right: 2%; bottom: -6%; width: clamp(240px, 24vw, 420px); }
.v4-plate--bud    { left: -4%; bottom: -10%; width: clamp(200px, 22vw, 360px); transform: rotate(-12deg); }
.v3-bg-dark .v4-plate--bud { opacity: .16; } /* .10 vanishes on the photo CTA band */
.v4-plate--kohler { right: 0; top: 50%; translate: 0 -50%; width: clamp(260px, 26vw, 420px); opacity: .08; }
.v4-plate--leaflet { left: -2%; top: 8%; width: clamp(160px, 16vw, 260px); transform: rotate(-30deg); }
.v4-plate--faint { opacity: .08; }
/* per-page placements (section 3 of the spec) */
.v4-plate--hero-bud { left: auto; right: -3%; bottom: -12%; }
.v3-hero-paper .v4-plate--hero-kohler { opacity: .10; right: -2%; }
.v3-hero-paper .v4-plate--hero-fan { opacity: .10; right: -10%; top: -18%; width: clamp(320px, 34vw, 560px); }
.c-claims .v4-plate--kohler { right: -4%; }
.v3-hero-paper .v4-plate--hero-kohler { top: -40px; translate: none; }
.v3-hero-paper .v4-plate--leaflet { left: auto; right: 12%; top: -6%; width: clamp(80px, 7vw, 120px); transform: rotate(28deg); opacity: .16; }
@media (max-width: 767px) {
  .v4-plate { width: clamp(220px, 70vw, 320px); opacity: .08; }
  .v4-plate--kohler { display: none; }
}

/* leaflet tile on the light tool shells and the contact frame; dark surfaces carry no tile */
.v3-tool::before, .v3-frame::before, .v3-bg-vein::before { background: var(--v4-leaf-tile) 0 0/320px 320px; opacity: .08; }
.v3-tool--ink::before, .v3-tool__result::after, .v3-bg-dark::after, .v3-pro::after, .v3-tile--ink::before, .v3-footer::after, .v3-menu::before { background-image: none; }
.v3-hero-paper::before { background-image: none; }

/* ---------- 6. icon tile (replaces the corner mark) ---------- */
.v4-tile {
  display: inline-flex; align-items: center; justify-content: center; width: var(--v4-tile); height: var(--v4-tile); flex: none;
  border-radius: var(--r-chip); color: var(--cb-green-deep); background: var(--cb-mint); box-shadow: inset 0 0 0 1px rgba(0,129,54,.18);
}
.v4-tile .i { font-size: 24px; }
.v4-tile--sm { width: var(--v4-tile-sm); height: var(--v4-tile-sm); } .v4-tile--sm .i { font-size: 18px; }
.v4-tile--lg { width: var(--v4-tile-lg); height: var(--v4-tile-lg); } .v4-tile--lg .i { font-size: 32px; }
.v3-bg-dark .v4-tile, .v3-on-dark .v4-tile, .v3-tool--ink .v4-tile, .v3-footer .v4-tile, .v3-pro .v4-tile,
.v3-tile--ink .v4-tile, .ix-tcard--ink .v4-tile, .c-tool--cta .v4-tile {
  color: var(--cb-yellow); background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.v3-tool__result .v4-tile { color: var(--cb-yellow); }
.v3-paper .v4-tile { color: var(--cb-green-deep); background: var(--cb-mint); box-shadow: inset 0 0 0 1px rgba(0,129,54,.18); }
/* where the old corner marks sat */
.v3-product__media > .v4-tile, .v3-pro__media > .v4-tile { position: absolute; top: 16px; left: 16px; z-index: 1; }
.v3-tile > .v4-tile { position: absolute; top: 16px; left: 16px; }
.v3-tile--ink > .v4-tile { top: 24px; left: auto; right: 24px; }
.v3-tile--render > .v4-tile { top: 24px; left: 24px; }
.ix-line > .v4-tile { position: absolute; top: 20px; left: 20px; z-index: 2; }
.v3-paper > .v4-tile, .c-qpanel > .v4-tile, .c-docband__paper > .v4-tile { position: absolute; top: 18px; right: 18px; }
.v3-paper__title { padding-right: 0; margin-right: 60px; }
.c-evidence__doc > .v4-tile { position: absolute; top: 20px; left: 20px; z-index: 1; }
.c-tool > .v4-tile, .c-docs .v4-tile, .c-privacy__card > .v4-tile { display: flex; margin-bottom: var(--s-3); }
.c-tool--cta > .v4-tile { margin-bottom: var(--s-4); }
.v3-band__grid .v4-tile { display: flex; margin-bottom: var(--s-5); }

/* ---------- 7. small marks: stats, process and steps leaves, lists, ledger, FAQ ---------- */
.v3-stat::after { display: none; }
.v4-stat-mark { position: absolute; left: -3px; top: 9px; width: 18px; height: 18px; color: var(--cb-green); background: #fff; box-shadow: 0 0 0 3px #fff; }
.v3-bg-mint .v4-stat-mark { background: var(--cb-mint-soft); box-shadow: 0 0 0 3px var(--cb-mint-soft); }
.v3-bg-dark .v4-stat-mark { color: var(--cb-yellow); background: none; box-shadow: none; }
@media (min-width: 700px) { .v4-stat-mark { left: -1px; top: calc(var(--fs-stat, var(--fs-num)) + 13px); } }

.v4-process > li::after, .v4-steps > li::after {
  left: -21px; top: -13px; width: 18px; height: 18px; border-radius: 0; background: var(--cb-green);
  -webkit-mask: var(--v4-ic-leaf) center/contain no-repeat; mask: var(--v4-ic-leaf) center/contain no-repeat;
}
.v3-bg-dark .v4-steps > li::after, .v3-bg-dark .v4-process > li::after { background: var(--cb-yellow); }
@media (min-width: 960px) {
  .v4-process > li::after { left: 44px; top: auto; bottom: 0; }
  .v4-process > li:nth-child(even)::after { top: 0; bottom: auto; transform: scaleY(-1); }
}
.v4-process .v3-step__n { display: flex; align-items: center; gap: 8px; }
.v3-step__n .i { color: var(--cb-green-deep); }
.v3-bg-dark .v3-step__n .i { color: var(--cb-yellow); }

.v3-checks li::before { width: 15px; height: 15px; top: .3em; }
.v3-checks--rows li::before { top: 18px; }
.v4-list--leaf li::before { width: 16px; height: 16px; -webkit-mask-image: var(--v4-ic-leaf); mask-image: var(--v4-ic-leaf); }

.v3-ledger dt .i { margin-right: 6px; color: var(--cb-green-deep); vertical-align: -.2em; }

.v4-faq-ic {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; margin-top: -1px;
  border-radius: var(--r-chip); box-shadow: inset 0 0 0 1px var(--cb-hair); color: var(--cb-green-deep);
  transition: box-shadow var(--t-base) var(--ease-out);
}
.v4-faq-ic .i { transition: transform var(--t-base) var(--ease-out); }
.v3-faq__item[open] .v4-faq-ic .i { transform: rotate(45deg); }
.v3-faq__item summary:hover .v4-faq-ic, .v3-faq__item[open] .v4-faq-ic { box-shadow: inset 0 0 0 1px currentColor; }
.v4-faq-all { margin-top: var(--s-5); }

/* ---------- 8. specimens: small full-strength drawings beside text ---------- */
.v4-specimen { display: block; height: auto; color: var(--cb-green); }
.v4-quote-sprig { width: 96px; margin-bottom: var(--s-4); }
@media (min-width: 1200px) { .v4-quote-sprig { position: absolute; left: -176px; top: 6px; width: 120px; margin: 0; } }
.pp-order__media { position: relative; }
.v4-specimen--leaflet { position: absolute; z-index: 2; left: 2px; top: -64px; width: auto; height: 140px; transform: rotate(-40deg); transform-origin: 50% 100%; opacity: .9; }
.v4-specimen-wrap { position: relative; }
.v4-specimen--fan { display: none; }
@media (min-width: 1100px) {
  .v4-specimen--fan { display: block; position: absolute; right: -8px; top: 0; width: auto; height: 220px; }
  .v4-specimen-wrap .v3-steps { padding-right: 150px; }
}
.p-amp-how__more { margin-top: var(--s-4); }
.c-reach__card > .v4-specimen--sprig { width: 96px; margin-bottom: var(--s-4); }
.c-statement { position: relative; }
.v4-specimen--statement { position: absolute; right: 12px; top: 8px; width: auto; height: 120px; transform: rotate(32deg); }
@media (max-width: 759.98px) { .v4-specimen--statement { height: 88px; right: 0; } }

/* ---------- 9. nav: "Learn" section highlight, Buyers and Learn groups in the mobile menu ---------- */
@media (min-width: 1024px) {
  .v3-menu__links a.is-section::after { transform: none; opacity: .6; }
  .v4-menu__buyers, .v4-menu__learn { display: none; }
}
@media (max-width: 1023.98px) {
  .v3-menu__links a.is-section { color: rgba(255,197,60,.75); }
  .v4-menu__label { display: flex; align-items: center; gap: 8px; margin-bottom: var(--s-2); font: 500 var(--fs-mono)/1.2 var(--ff-mono); letter-spacing: var(--ls-mono); text-transform: uppercase; color: var(--cb-sage); }
  .v4-menu__label .i { color: var(--cb-yellow); }
  :is(.v4-menu__buyers, .v4-menu__learn) ul { list-style: none; padding: 0; display: grid; }
  :is(.v4-menu__buyers, .v4-menu__learn) li { opacity: 0; transform: translateY(24px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 50ms); }
  .v3-nav.is-open :is(.v4-menu__buyers, .v4-menu__learn) li { opacity: 1; transform: none; }
  :is(.v4-menu__buyers, .v4-menu__learn) a { display: flex; align-items: center; min-height: 44px; font-size: 18px; font-weight: 500; color: var(--cb-on-dark); text-decoration: none; }
  :is(.v4-menu__buyers, .v4-menu__learn) a:hover, :is(.v4-menu__buyers, .v4-menu__learn) a[aria-current="page"] { color: var(--cb-yellow); }
  /* Learn: four short links in two columns so the menu stays short */
  .v4-menu__learn ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-4); }
  .v4-menu__learn a { font-size: 16px; }
  .v4-menu__buyers + .v4-menu__learn { margin-top: calc(var(--s-4) - var(--s-7)); } /* one block with Buyers, not a third gap */
}

/* ---------- 10. footer: brand, three link columns, newsletter; Koehler plate on the right ---------- */
.v4-footer__links { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6) var(--s-5); }
@media (min-width: 700px) { .v4-footer__links { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) {
  .v4-footer__links { display: contents; }
  .v4-footer__grid .v3-footer__brand { grid-column: span 3; }
  .v4-footer__grid .v3-footer__news { grid-column: span 3; }
}
.v4-footer__mark { margin-right: 8px; color: var(--cb-yellow); }
.v3-footer__bottom { margin-top: var(--s-8); box-shadow: inset 0 1px 0 var(--cb-hair-dark); }

/* ---------- 11. 404: fan leaf behind the code ---------- */
.v4-404-col { position: relative; isolation: isolate; }
/* sits behind the index label and the 404 code only, ending above the h1 */
.v4-404-leaf { position: absolute; z-index: -1; left: -40px; top: -250px; width: 340px; height: auto; opacity: .14; transform: rotate(-16deg); }
.v4-art.v4-404-leaf { color: var(--v4-art-accent); } /* beats .v3-bg-dark .v4-art (white) */
@media (max-width: 767px) { .v4-404-leaf { width: 220px; left: -30px; top: -120px; } }

/* ---------- 12. quiz, static layer (behaviour and transitions: js/v4-quiz.js + css/v4-grow.css, package M2) ---------- */
.v4-quiz { margin-top: var(--s-7); max-width: 900px; }
.v4-quiz__q { display: grid; gap: var(--s-3); min-width: 0; margin: 0; padding: 0; border: 0; }
.v4-quiz__q[hidden], .v4-quiz [hidden] { display: none; }
@media (min-width: 700px) { .v4-quiz__q { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.v4-quiz__q legend { float: left; grid-column: 1 / -1; width: 100%; margin-bottom: var(--s-3); padding: 0; font-size: var(--fs-h3); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: var(--cb-ink); }
.v4-quiz__opt {
  position: relative; display: flex; align-items: center; gap: var(--s-4); min-height: 64px; padding: 12px 16px;
  border-radius: var(--r-media); background: #fff; box-shadow: inset 0 0 0 1px var(--cb-hair), var(--sh-1);
  font-weight: 500; line-height: 1.35; color: var(--cb-ink); cursor: pointer; transition: box-shadow var(--t-fast) var(--ease-out);
}
.v4-quiz__opt input { position: absolute; opacity: 0; pointer-events: none; }
.v4-quiz__opt:hover { box-shadow: inset 0 0 0 1px rgba(0,129,54,.45), var(--sh-1); }
.v4-quiz__opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--cb-green), var(--sh-1); }
.v4-quiz__opt:has(input:focus-visible) { outline: 2px solid var(--cb-green-deep); outline-offset: 3px; }
.v4-quiz__nav { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.v4-quiz__nav .v3-btn--ghost { color: var(--cb-ink); box-shadow: inset 0 0 0 1.5px var(--cb-hair); }
.v4-quiz__result { margin-top: var(--s-5); }
.v4-quiz__links a { color: var(--cb-green-deep); font-weight: 600; }
html:not(.v3-js) .v4-quiz__q, html:not(.v3-js) .v4-quiz__nav { display: none; }

/* ---------- 13. configurator bottle, static layer (fill behaviour: js/v4-bottle.js, package M2) ---------- */
.v4-bottle { position: absolute; top: 24px; right: 20px; width: 60px; margin: 0; color: var(--cb-yellow); text-align: center; }
.v4-bottle svg { display: block; width: 100%; height: auto; overflow: visible; }
.v4-bottle__glass, .v4-bottle__cap { fill: none; stroke: currentColor; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.v4-bottle__oil { fill: var(--oil, #d9b24a); opacity: .9; }
.v4-bottle__drops circle { fill: currentColor; }
.v4-bottle figcaption { margin-top: 6px; font: 500 12px/1.4 var(--ff-mono); color: var(--cb-on-dark); }
.pp-cfg .v3-tool__result > :is(.v3-tool__kicker, .v3-tool__main, .pp-moq) { padding-right: 76px; }
.pp-cfg .v3-tool__result > .pp-moq { padding-right: 116px; } /* clears the one-line bottle caption (up to ~15 mono chars at 12px) */

/* ---------- 14. reduced motion: static final states ---------- */
@media (prefers-reduced-motion: reduce) {
  .v3-js .v4-rule__sprig { clip-path: none; }
  .v3-js .v4-rule::after { transform: none; }
}
