/* ============================================================
   cultivator-brand.css — Pulse Cultivator white-label identity
   ------------------------------------------------------------
   A "cousin, not a brother" of Pulse. Loaded on every Cultivator
   surface (member, leader console, marketing) AFTER pulse-brand.css
   and BEFORE each page's inline <style>. It re-skins the shared
   chrome + page tokens to the Cultivator palette and supplies the
   distinctive brand components: the Pollination-node mark, the
   Cultivator WONK wordmark, the warm/cool Pollinator lifecycle, and
   the leader-console sidebar.

   Scope discipline: every rule is gated to a Cultivator scope —
   body[data-pulse-surface="cultivate"], body.cv-surface (marketing),
   body.cv-console (leader console), or a .cv-* class — so nothing
   here can leak onto Vitagri editorial / other Pulse surfaces.

   Token strategy: defaults are set on body[data-pulse-surface=
   "cultivate"] (specificity 0,1,1) so they beat each page's inline
   :root{} defaults (0,1,0) regardless of source order. A partner's
   own accent, applied at runtime via document.documentElement.style
   (applyBrand), is inline and still wins — borrowed trust intact.

   Brief: design_handoff_pulse_cultivator (README = source of truth).
   Cache-buster: ?v=3
   ============================================================ */

/* Extended Fraunces with the SOFT + WONK axes for the Cultivator
   wordmark — the one distinctive type treatment. Pages already load
   Lato + JetBrains Mono + base Fraunces; this adds the variable axes. */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT,WONK@0,9..144,300..700,0..100,0..1;1,9..144,300..700,0..100,0..1&display=swap');

/* ── Tokens ────────────────────────────────────────────────── */
body[data-pulse-surface="cultivate"],
body.cv-surface,
body.cv-console{
  /* Cultivator signature */
  --cv-amber:#E9A84C;        /* Pollen Amber — signature accent, proposals, primary CTA */
  --cv-amber-text:#B8762A;   /* amber on light backgrounds / italic emphasis */
  --cv-teal:#1A7F6F;         /* Mesh Teal — connection, "build on", links, cool register */
  --cv-teal-bright:#2A9D8F;  /* teal on dark */
  --cv-green:#5E8C3E;        /* Leaf Green — promote, flourishing/recognition */
  --cv-lime:#9FB04F;         /* Lime — the "Pulse" prefix, growth accents */
  --cv-clay:#A85A2E;         /* Clay — challenge state */
  --cv-forest:#1F3A2B;       /* Forest Ink — base dark, headings, adjudication */
  --cv-charcoal:#2A3020;     /* body copy on light */
  --cv-text-mid:#4A5246;
  --cv-muted:#7A8A70;
  --cv-muted-cool:#9BA4B0;
  --cv-cream:#F6F2E9;        /* canvas / cards */
  --cv-cream-2:#EDE8DC;      /* alt rows / subtle panels */
  --cv-warm:#FCF6EC;         /* warm-register card background */
  --cv-line:rgba(31,58,43,0.09);

  /* Evidence tiers — INHERITED from Pulse, never altered */
  --cv-tier1:#76B82A; --cv-tier2:#2A9D8F; --cv-tier3:#E9A84C; --cv-tier4:#9BA4B0;

  /* Re-map the legacy white-label tokens to the Cultivator defaults.
     Partner accent (teal) tints links/active/console-nav; the fixed
     amber CTA register lives in the .cv-btn classes below. */
  --brand-accent:#1A7F6F;
  --brand-ink:#ffffff;
  --brand-glow:rgba(26,127,111,0.5);
  --lime:#1A7F6F;
  --lime-bright:#2A9D8F;
}

/* ── The Pollination-node mark ─────────────────────────────────
   A teal centre (adviser + evidence) with six amber satellites
   (members) on spokes. Deliberately NOT a heartbeat — Cultivator is
   about spread, not pulse. Two fixed colourways encoded as data
   URIs so any surface can drop the mark with one class, no inline
   SVG. .cv-node = on cream/light; .cv-node--rev = on forest/dark. */
.cv-node{
  display:inline-block; flex:none;
  width:34px; height:34px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Cline x1='32' y1='32' x2='32' y2='11' stroke='%231A7F6F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='50' y2='21' stroke='%231A7F6F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='50' y2='43' stroke='%231A7F6F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='32' y2='53' stroke='%231A7F6F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='14' y2='43' stroke='%231A7F6F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='14' y2='21' stroke='%231A7F6F' stroke-width='2.6'/%3E%3Ccircle cx='32' cy='11' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='50' cy='21' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='50' cy='43' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='32' cy='53' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='14' cy='43' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='14' cy='21' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='32' cy='32' r='8' fill='%231A7F6F'/%3E%3C/svg%3E") center/contain no-repeat;
}
.cv-node--rev{
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64' fill='none'%3E%3Cline x1='32' y1='32' x2='32' y2='11' stroke='%232A9D8F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='50' y2='21' stroke='%232A9D8F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='50' y2='43' stroke='%232A9D8F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='32' y2='53' stroke='%232A9D8F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='14' y2='43' stroke='%232A9D8F' stroke-width='2.6'/%3E%3Cline x1='32' y1='32' x2='14' y2='21' stroke='%232A9D8F' stroke-width='2.6'/%3E%3Ccircle cx='32' cy='11' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='50' cy='21' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='50' cy='43' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='32' cy='53' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='14' cy='43' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='14' cy='21' r='5.4' fill='%23E9A84C'/%3E%3Ccircle cx='32' cy='32' r='8' fill='%23F6F2E9'/%3E%3C/svg%3E") center/contain no-repeat;
}
.cv-node--sm{ width:26px; height:26px; }
.cv-node--lg{ width:44px; height:44px; }

/* ── The Cultivator wordmark ───────────────────────────────────
   "Cultivator" set in Fraunces with the high-contrast display optical
   size + the WONK axis on; "Pulse" rides above as a small mono prefix
   at ~a quarter the cap-height (trademark-safe — never let it grow).
   Markup pattern:
     <a class="cv-lockup">
       <span class="cv-node[--rev]"></span>
       <span class="cv-lockup__text">
         <span class="cv-eyebrow">Pulse</span>
         <span class="cv-wm">Cultivator</span>
       </span>
     </a>                                                          */
.cv-wm{
  font-family:'Fraunces',Georgia,serif;
  font-weight:560;
  font-variation-settings:'opsz' 72,'SOFT' 0,'WONK' 1,'wght' 560;
  letter-spacing:-0.03em;
  line-height:0.85;
  display:block;
}
.cv-eyebrow{
  font-family:'JetBrains Mono',monospace;
  font-size:0.46rem; letter-spacing:0.16em; text-transform:uppercase;
  color:var(--cv-lime);
  display:block;
}
.cv-lockup{
  display:inline-flex; align-items:center; gap:11px;
  text-decoration:none;
}
.cv-lockup__text{ display:flex; flex-direction:column; }
.cv-lockup .cv-wm{ font-size:1.22rem; }
.cv-lockup--lg .cv-wm{ font-size:1.5rem; font-variation-settings:'opsz' 96,'SOFT' 0,'WONK' 1,'wght' 560; }

/* "powered by Vitagri Pulse" — locked endorsement, every surface */
.cv-powered{
  font-family:'JetBrains Mono',monospace;
  font-size:0.46rem; letter-spacing:0.1em; text-transform:uppercase;
}

/* ── Re-skin the shared member hero lockup ─────────────────────
   The member pages keep their #wordmark element for applyBrand to
   stamp the partner name into; when unbranded it reads "Pulse
   Cultivator" via the WONK treatment. */
body[data-pulse-surface="cultivate"] .wordmark,
body[data-pulse-surface="cultivate"] .hero__logo{
  font-family:'Fraunces',Georgia,serif;
  font-variation-settings:'opsz' 96,'SOFT' 0,'WONK' 1,'wght' 560;
  font-weight:560; letter-spacing:-0.025em;
}
/* Pattern-A hero lockup wrapper (node + wordmark) */
.hero__lockup{ display:flex; align-items:center; gap:11px; }
.hero__lockup .cv-node{ flex:none; }

/* ── Leader bar (borrowed trust anchor) ────────────────────────
   Forest strip carries the adviser. Avatar reads teal fill + 2px
   amber ring; "powered by Vitagri Pulse" sits muted beneath. */
body[data-pulse-surface="cultivate"] .hero__leader-photo{
  border:2px solid var(--cv-amber);
}
.cv-leader-avatar{
  width:46px; height:46px; border-radius:50%; flex:none;
  background:var(--cv-teal); color:var(--cv-cream);
  border:2px solid var(--cv-amber);
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',Georgia,serif; font-size:1.15rem; line-height:1;
}

/* ── Pollinator lifecycle — warm engine, cool gate ─────────────
   Status drives a left border + pill colour. Proposed/Refined/
   Challenged run WARM (amber/teal/clay); Endorsed runs COOL — a
   sober teal ✓ seal, never a playful pill, never earned by votes. */
.cv-pill{
  display:inline-flex; align-items:center; gap:6px;
  font-family:'JetBrains Mono',monospace;
  font-size:0.52rem; letter-spacing:0.1em; text-transform:uppercase;
  font-weight:700; padding:4px 9px; border-radius:999px;
}
.cv-pill--proposed{ background:rgba(233,168,76,0.18); color:var(--cv-amber-text); }
.cv-pill--refined{ background:rgba(26,127,111,0.16); color:var(--cv-teal); }
.cv-pill--challenged,.cv-pill--challenge{ background:rgba(168,90,46,0.16); color:var(--cv-clay); }

.cv-contrib{
  background:#fff; border:1px solid var(--cv-line);
  border-left:3px solid var(--cv-teal);
  border-radius:0 12px 12px 0; padding:14px 16px;
}
.cv-contrib--proposed{ border-left-color:var(--cv-amber); }
.cv-contrib--challenged,.cv-contrib--challenge{ border-left-color:var(--cv-clay); }

/* The endorsement seal — the only mark that confers truth. */
.cv-endorse-seal{
  display:inline-flex; align-items:center; gap:6px;
  font-family:'JetBrains Mono',monospace;
  font-size:0.54rem; letter-spacing:0.08em; text-transform:uppercase;
  color:var(--cv-teal);
}
.cv-endorse-seal__check{
  display:inline-flex; align-items:center; justify-content:center;
  width:16px; height:16px; border-radius:50%;
  background:var(--cv-teal); color:#fff; font-size:0.6rem; flex:none;
}
.cv-endorse-card{
  background:#fff; border:1px solid rgba(26,127,111,0.32);
  border-radius:12px; overflow:hidden;
}
/* The Pulse Brain evidence chip beneath an endorsement */
.cv-evidence-chip{
  display:flex; align-items:center; gap:9px;
  background:var(--cv-cream-2); border-left:3px solid var(--cv-amber);
  border-radius:0 4px 4px 0; padding:9px 13px;
  font-size:0.76rem; color:var(--cv-text-mid); line-height:1.45;
}
.cv-evidence-chip__dot{ width:11px; height:11px; border-radius:50%; background:var(--cv-amber); flex:none; }
.cv-evidence-chip em{ font-family:'Fraunces',Georgia,serif; font-style:italic; color:var(--cv-amber-text); }

/* ── Button register ───────────────────────────────────────────
   Primary = amber (signature) / forest text. Forest = endorse (cool,
   teal ✓). Promote = green outline + sprout. Build = teal outline.
   Challenge = clay outline. Radius 2px, uppercase Lato 700. */
.cv-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  font-family:'Lato',sans-serif; font-size:0.78rem; font-weight:700;
  letter-spacing:0.05em; text-transform:uppercase;
  padding:12px 22px; min-height:44px; border-radius:2px; border:1px solid transparent;
  cursor:pointer; text-decoration:none; line-height:1;
  background:var(--cv-amber); color:var(--cv-forest);
}
.cv-btn:hover{ filter:brightness(1.04); }
.cv-btn--forest{ background:var(--cv-forest); color:var(--cv-cream); }
.cv-btn--promote{ background:transparent; border-color:var(--cv-green); color:var(--cv-green); }
.cv-btn--build{ background:transparent; border-color:var(--cv-teal); color:var(--cv-teal); }
.cv-btn--challenge{ background:transparent; border-color:var(--cv-clay); color:var(--cv-clay); }
.cv-btn--ghost{ background:transparent; border-color:rgba(246,242,233,0.45); color:var(--cv-cream); }

/* ── Re-skin the bottom tab bar (cultivate) ────────────────────
   Active = Forest, with an amber-tinted pill. Pollinator tab keeps
   the node glyph that _pulse-chrome injects. */
body[data-pulse-surface="cultivate"] .pulse-tabbar__slot[aria-current="page"]{
  color:var(--cv-forest);
  background:rgba(233,168,76,0.16);
}

/* ── Leader console sidebar ────────────────────────────────────
   Injected by _cultivate-console-nav.js as the first body child.
   248px forest rail on desktop; collapses to a horizontal scroll
   strip on narrow widths. Content shifts right via body padding. */
.cv-sidebar{
  position:fixed; left:0; top:0; bottom:0; width:248px; z-index:60;
  background:var(--cv-forest); color:var(--cv-cream);
  display:flex; flex-direction:column; padding:26px 0;
  font-family:'Lato',system-ui,sans-serif;
}
.cv-sidebar__brand{ display:flex; align-items:center; gap:11px; padding:0 22px 24px; text-decoration:none; color:var(--cv-cream); }
.cv-sidebar__brand .cv-wm{ color:var(--cv-cream); }
.cv-sidebar__eyebrow{ padding:0 24px 12px; font-family:'JetBrains Mono',monospace; font-size:0.54rem; letter-spacing:0.16em; text-transform:uppercase; color:rgba(246,242,233,0.4); }
.cv-sidebar__nav{ display:flex; flex-direction:column; gap:2px; padding:0 14px; }
.cv-sidebar__nav a{
  display:flex; align-items:center; gap:12px; padding:11px 14px; border-radius:8px;
  color:rgba(246,242,233,0.74); text-decoration:none; font-size:0.88rem; font-weight:700;
  min-height:44px;
}
.cv-sidebar__nav a svg{ flex:none; width:18px; height:18px; }
.cv-sidebar__nav a:hover{ color:#fff; background:rgba(246,242,233,0.06); }
.cv-sidebar__nav a[aria-current="page"]{
  background:rgba(233,168,76,0.16); color:#fff;
}
.cv-sidebar__nav a[aria-current="page"] svg{ color:var(--cv-amber); }
.cv-sidebar__spacer{ flex:1; }
.cv-sidebar__me{
  margin:0 14px; padding:18px 8px 0; border-top:1px solid rgba(246,242,233,0.12);
  display:flex; align-items:center; gap:11px;
}
.cv-sidebar__me-avatar{
  width:38px; height:38px; border-radius:50%; flex:none;
  background:var(--cv-teal); border:2px solid var(--cv-amber); color:var(--cv-cream);
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',Georgia,serif; font-size:1.05rem;
}
.cv-sidebar__me-name{ font-weight:700; font-size:0.84rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cv-sidebar__me-powered{ font-family:'JetBrains Mono',monospace; font-size:0.46rem; letter-spacing:0.1em; text-transform:uppercase; color:rgba(246,242,233,0.5); }

@media (min-width:901px){
  body.cv-console{ padding-left:248px; }
}
/* Narrow: sidebar becomes a horizontal scrolling top strip. */
@media (max-width:900px){
  .cv-sidebar{
    position:sticky; top:0; left:auto; bottom:auto; width:auto;
    flex-direction:row; align-items:center; gap:4px;
    /* Right padding clears the fixed Search (right:64px) + Notifications
       (right:12px) chrome buttons, ~44px each, so the last nav items
       ("Members & seats" onward) can scroll clear instead of underneath. */
    padding:0 116px 0 10px; overflow-x:auto; -webkit-overflow-scrolling:touch;
    border-bottom:1px solid rgba(255,255,255,0.09);
  }
  .cv-sidebar__brand{ padding:10px 8px; flex:none; }
  .cv-sidebar__brand .cv-lockup__text{ display:none; }
  .cv-sidebar__eyebrow,.cv-sidebar__spacer,.cv-sidebar__me{ display:none; }
  .cv-sidebar__nav{ flex-direction:row; padding:0; gap:0; }
  .cv-sidebar__nav a{
    flex:none; white-space:nowrap; border-radius:0;
    border-bottom:2.5px solid transparent; padding:14px 12px;
  }
  .cv-sidebar__nav a svg{ display:none; }
  .cv-sidebar__nav a[aria-current="page"]{ background:transparent; border-bottom-color:var(--cv-amber); }
}

/* ── Warm vs cool register panels (console) ────────────────────
   Nurture = warm card; endorsement queue = cool white + teal border. */
.cv-warm-panel{ background:var(--cv-warm); border:1px solid rgba(233,168,76,0.3); border-radius:10px; }
.cv-cool-panel{ background:#fff; border:1px solid rgba(26,127,111,0.28); border-radius:10px; }

/* ── Recognition / flourishing sprout glyph helper ─────────────
   Used inline as an SVG; this just colours any .cv-sprout path. */
.cv-flourish{ color:var(--cv-green); }

/* ── Remap existing page components to the warm/cool register ──
   The member pages render their cards/badges with page-specific
   classes in the legacy lime/teal/berry palette. These surface-
   scoped selectors (specificity beats the pages' bare-class rules)
   retune them to the Cultivator lifecycle WITHOUT touching render
   JS: Proposed/idea = amber, Refined = teal, Challenge = clay,
   Endorsed = a COOL teal mark (never the warm green). */

/* Pollinator — kind, role, status, card spine, endorsement, button */
body[data-pulse-surface="cultivate"] .kindbadge.k-idea{ color:var(--cv-amber-text); background:rgba(233,168,76,0.18); }
body[data-pulse-surface="cultivate"] .kindbadge.k-challenge{ color:var(--cv-clay); background:rgba(168,90,46,0.16); }
body[data-pulse-surface="cultivate"] .role.r-refiner{ color:var(--cv-teal); background:rgba(26,127,111,0.14); }
body[data-pulse-surface="cultivate"] .role.r-challenger{ color:var(--cv-clay); background:rgba(168,90,46,0.14); }
body[data-pulse-surface="cultivate"] .status.s-open{ color:var(--cv-amber-text); background:rgba(233,168,76,0.14); }
body[data-pulse-surface="cultivate"] .status.s-endorsed{ color:#1A6A5C; background:rgba(26,127,111,0.12); }
body[data-pulse-surface="cultivate"] .card.is-open::before{ background:var(--cv-amber); }
body[data-pulse-surface="cultivate"] .card.is-endorsed::before{ background:var(--cv-teal); }
body[data-pulse-surface="cultivate"] .endorsement{ border-color:rgba(26,127,111,0.45); background:rgba(26,127,111,0.06); }
body[data-pulse-surface="cultivate"] .endorsement .mark{ color:var(--cv-teal); }
body[data-pulse-surface="cultivate"] .btn--endorse{ background:var(--cv-forest); color:var(--cv-cream); }
body[data-pulse-surface="cultivate"] .provchip{ color:var(--cv-teal); }
body[data-pulse-surface="cultivate"] a.provchip:hover{ border-color:var(--cv-teal); }

/* Feed / board mini-list tags + the hero highlight */
body[data-pulse-surface="cultivate"] .tag.idea{ color:var(--cv-amber-text); background:rgba(233,168,76,0.16); }
body[data-pulse-surface="cultivate"] .tag.challenge{ color:var(--cv-clay); background:rgba(168,90,46,0.14); }
body[data-pulse-surface="cultivate"] .tag.endorsed{ color:#1A6A5C; background:rgba(26,127,111,0.12); }
body[data-pulse-surface="cultivate"] .tag.announce{ color:var(--cv-amber-text); background:rgba(233,168,76,0.12); }
/* Hero highlight word reads amber (the signature), not lime/teal */
body[data-pulse-surface="cultivate"] .hero__title em{ color:var(--cv-amber); }
/* Drop the inherited Pulse-heart hero watermark — Cultivator owns the node
   mark and the hero stays clean (the leader bar + lockup carry identity). */
body[data-pulse-surface="cultivate"] .hero::after{ display:none; }

/* Responsive guard (2026-06-22 screen-size audit): let long unbroken strings
   — pasted no-space URLs, hashtags, long email local-parts, scientific /
   compound names, run-on tokens in member or AI content — wrap instead of
   forcing horizontal scroll (confirmed +200–390px overflow at 390px on the
   feed / cultivate-board / pulse-plus / partner-message surfaces) or being
   clipped (pollinator / partner cards use overflow:hidden). `overflow-wrap:
   anywhere` also lets a flex item (e.g. the broadcast-history subject) shrink
   below its longest token. Wrapped in :where() so it carries ZERO specificity
   — any page-level white-space:nowrap / ellipsis rule still wins. */
body[data-pulse-surface="cultivate"] :where(h1,h2,h3,h4,h5,p,li,dd,td,th,blockquote,figcaption,span,a,b,strong,em,div){
  overflow-wrap:anywhere;
}
