/* ==========================================================================
   Chrysalis Labs · content pages · content.css v1.0 · 6 Oct 2026 · local integration (WordPress)
   Loads after base.css → header-v2.css → foundation.css → site-kit.css (kit v1.2) → info.css / policy.css.
   Only what the approved prototypes did not need: WordPress glue, the original c-* icon family inside kit
   patterns that were tuned for the 256-grid Phosphor sprite, the real contact form states, the wholesale page,
   the Research Library index and the article template. House style unchanged: 16px cards, 12px tiles,
   24px panels, pill buttons/chips, circles, Neue Montreal, plain zeros, black / white / silver.
   ========================================================================== */

/* ---------- 1. No-JS header: the kit's phone fallback would add a second nav row; the foundation already
   prints its own <noscript> link row (foundation.css .cl-nojs-nav), so the header keeps one row. ---------- */
@media (max-width: 899px) {
  html:not(.k-js) .cl-header__inner { grid-template-areas: "menu logo icons"; height: var(--header-h-css); min-height: 0; }
  html:not(.k-js) .cl-nav { display: none; }
}

/* ---------- 2. Original icon family (24 grid) in kit wells ---------- */
.k-empty > svg.i:first-child, .ki-empty__text > svg.i:first-child { stroke-width: 1.4; }
/* contact topics jump down to the form: the arrow turns down and nudges down */
.ki-topic__go .cl-i-down { rotate: 90deg; }
@media (hover: hover) and (pointer: fine) {
  .ki-topic:hover .ki-topic__go .cl-i-down { transform: translateX(var(--nudge)); }
}
.ki-topic:focus-visible .ki-topic__go .cl-i-down { transform: translateX(var(--nudge)); }
/* links inside answers and prose keep the arrow aligned */
.cl-acc__a-in .link .i, .k-prose .link .i { flex: none; }

/* ---------- 3. Page head extras ---------- */
.cl-head-tags { margin-top: 22px; }
.k-head__meta.cl-art__meta { gap: 6px 20px; color: var(--fg-3); }
.k-head__actions .t-meta { color: var(--fg-2); }

/* ---------- 4. Contact form: real submit, server + client validation ---------- */
.cl-cform { scroll-margin-top: calc(var(--header-h, 56px) + 16px); }
.cl-cform__ok { display: flex; align-items: center; gap: 10px; }
.cl-cform__ok strong { font-weight: 500; }
.cl-cform .k-errsum:focus, .cl-cform__ok:focus { outline: 2px solid var(--focus, #0E0E10); outline-offset: 3px; }
.cl-cform .k-errsum h2:only-child { margin: 0; }
/* honeypot: never visible, never focusable by people */
.cl-cform__hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cl-cform [data-cl-submit][aria-busy="true"] { opacity: .7; pointer-events: none; }
#contact-form { scroll-margin-top: calc(var(--header-h, 56px) + 16px); }

/* ---------- 5. Wholesale page ---------- */
/* hero (review fix, 6 Oct): breadcrumb row only, then the approved black render panel carries label, h1, lede, chips, CTA */
.k-head.cl-head--crumbs[data-theme] + .k-sec[data-theme] { padding-top: clamp(16px, 1.6vw, 24px); }
.cl-whole { margin-top: 0; }
.cl-whole__h { margin-bottom: 20px; font-weight: 500; letter-spacing: -.015em; }
.cl-cards-list { margin: 0; padding: 0; list-style: none; }
.cl-cards-list > li .k-infocard__t { margin-top: 6px; }

/* ---------- 6. Affiliate calculator: payout lines under the split ---------- */
.cl-calc__lines { display: grid; gap: 4px; }
.cl-calc__lines .t-meta { color: var(--fg-2); }

/* ---------- 7. Chips that are links (Library topics, pager) ---------- */
.k-chip { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.chip[aria-current="page"], .k-chip.current { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.cl-lib-topics { margin-bottom: clamp(24px, 2.6vw, 40px); }
.cl-pager { margin-top: clamp(32px, 3.4vw, 56px); }
.cl-pager .k-chip { min-width: var(--target); min-height: var(--target); }
.cl-pager .dots { display: inline-flex; align-items: center; min-height: var(--target); padding: 0 6px; color: var(--fg-3); }

/* ---------- 8. Research Library cards ---------- */
.cl-lib-grid { --k-cols: 3; }
.cl-lib-card .k-linkcard__body { gap: 8px; padding-top: 16px; }
.cl-lib-card__meta { color: var(--fg-3); }
.cl-lib-card__x { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 46ch; }
.cl-lib-card .k-linkcard__media img { object-fit: cover; }
.cl-lib-card--text { grid-template-rows: auto; grid-template-areas: "body go"; min-height: 220px; align-items: end; padding: 22px 16px 16px 22px; }
.cl-lib-card--text .k-linkcard__body { align-self: stretch; align-content: space-between; padding: 0; }
.cl-lib-empty { grid-template-columns: 1fr !important; }

/* ---------- 9. Article ---------- */
.cl-policy--solo > .k-policy__body { --col-lg: 3 / span 8; }
.cl-art__cover { margin: 0; aspect-ratio: 16 / 7; background: var(--c-mist); }
.cl-art__cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 599px) { .cl-art__cover { aspect-ratio: 4 / 3; } }
.cl-art .k-prose, .cl-prose { max-width: var(--k-measure); }
.cl-prose h2 { scroll-margin-top: calc(var(--header-h, 56px) + 24px); font-weight: 500; letter-spacing: -.012em; }
.cl-prose h3 { letter-spacing: -.006em; }
.cl-prose img, .cl-prose video { max-width: 100%; height: auto; border-radius: var(--r-tile); }
.cl-prose figure { margin: 1.6em 0; }
.cl-prose figcaption, .cl-prose .wp-element-caption { margin-top: 10px; color: var(--fg-3); font-size: var(--fs-micro); line-height: 1.45; }
.cl-prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 2px solid var(--fg); font-size: var(--fs-h4); line-height: 1.4; letter-spacing: -.008em; }
.cl-prose blockquote cite { display: block; margin-top: 10px; font-size: var(--fs-micro); font-style: normal; color: var(--fg-3); }
.cl-prose hr { height: 1px; margin: 2.4em 0; border: 0; background: var(--rule); }
.cl-prose code { padding: 1px 6px; border-radius: 6px; background: var(--c-mist); font-size: .9em; }
.cl-prose pre { overflow-x: auto; padding: 16px 18px; border-radius: var(--r-tile); background: var(--c-mist); font-size: .875rem; line-height: 1.5; }
.cl-prose table:not(.k-table) { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.45; font-variant-numeric: tabular-nums; }
.cl-prose .wp-block-table { overflow-x: auto; padding: 6px 20px 2px; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px var(--rule); }
.cl-prose table:not(.k-table) :is(th, td) { padding: 12px 18px 12px 0; text-align: left; vertical-align: top; border: 0; border-bottom: 1px solid var(--rule); }
.cl-prose .wp-block-table thead { border-bottom: 0; }
.cl-prose .wp-block-table thead th { border-bottom-color: var(--rule-2); }
.cl-prose .wp-block-table :is(th, td):last-child { padding-right: 0; }
.cl-prose table:not(.k-table) tbody tr:last-child > * { border-bottom: 0; }
.cl-prose table:not(.k-table) thead th { font-family: var(--font-label); font-size: var(--fs-label); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.cl-prose ul li::marker, .cl-prose ol li::marker { color: var(--fg-3); }
.cl-art__foot { display: grid; gap: 18px; justify-items: start; margin-top: clamp(40px, 4vw, 64px); padding-top: 24px; border-top: 1px solid var(--rule); }
.cl-art__ruo { max-width: var(--k-measure); }

/* ---------- 10. Policy intro (text before the first clause, rare) ---------- */
.cl-policy__intro { margin-bottom: 2.2em; }

/* ---------- 11. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .ki-topic__go .cl-i-down, .ki-topic:hover .ki-topic__go .cl-i-down { transform: none; }
}
html.rm .ki-topic__go .cl-i-down { transform: none; }

/* ---------- 12. Print (articles) ---------- */
@media print {
  .cl-art__foot .link, .cl-lib-topics, .cl-pager { display: none !important; }
}
