/* /palette.css — KNDY visual tokens (Night 3 B1).
 * Single source of truth for colours across Cave / TPP / PPP / public site.
 *
 * Anchor: KNDY primary green is `#1a3a25` for CTAs, `#2d5a2d` for hover.
 * Yellow / amber / default-blue / default-button are FORBIDDEN per Night 3 spec.
 * Per-page audit + replacement log lives in docs/PALETTE-AUDIT-NIGHT3.md.
 */

:root {
  --kndy-bg: #0d100e;             /* PPP + index body */
  --kndy-panel: #0f120f;          /* card backgrounds on dark surfaces */
  --kndy-cta: #1a3a25;            /* primary CTA fill */
  --kndy-cta-hover: #2d5a2d;      /* primary CTA hover */
  --kndy-cta-text: #ffffff;       /* primary CTA foreground */
  --kndy-text: #e8ebe5;           /* default text on dark surfaces */
  --kndy-text-muted: #8a9085;     /* secondary text on dark surfaces */
  --kndy-border: #1a1d1a;         /* hairlines on dark surfaces */
  --kndy-error: #8a3030;          /* error / destructive */
  --kndy-warning: #5a4a1a;        /* warning - subtle, NEVER yellow #ffcc00 */
  --kndy-info: #2d5a2d;           /* info / accent (subtle green) */

  /* Light surfaces (Cave + TPP/PPP cards have white backgrounds). */
  --kndy-light-bg: #ffffff;
  --kndy-light-panel: #fafaf7;
  --kndy-light-border: #e8e6e0;
  --kndy-light-text: #1a1a1a;
  --kndy-light-text-muted: #666666;
  --kndy-light-text-subtle: #888888;

  --kndy-pill-warn-bg: #fef3cd;
  --kndy-pill-warn-fg: #856404;
  --kndy-pill-success-bg: #e8f4e8;
  --kndy-pill-success-fg: #2d5a2d;
  --kndy-pill-danger-bg: #fce8e8;
  --kndy-pill-danger-fg: #a32d2d;
  --kndy-pill-neutral-bg: #f5f4f1;
  --kndy-pill-neutral-fg: #555555;
}

/* Primary CTA helpers. Pages can opt-in by adding class="kndy-cta-primary"
 * on a button or link, or .btn-primary / button.cta where the legacy class
 * is already in place. */
button.cta,
.btn-primary,
.kndy-cta-primary {
  background: var(--kndy-cta);
  color: var(--kndy-cta-text);
  border: 1px solid var(--kndy-cta);
}
button.cta:hover,
.btn-primary:hover,
.kndy-cta-primary:hover {
  background: var(--kndy-cta-hover);
  border-color: var(--kndy-cta-hover);
}

/* Day 4.1 Item 2: mobile top bar responsive collapse.
 * - Below 768px: nav gets 12px horizontal padding, items can wrap, the secondary
 *   action pills (data-mobile-collapse) hide and surface inside a "More" button.
 * - "More" button (data-mobile-more) only renders on mobile.
 * - Initials circle / nav-user stays right-aligned for self-orientation.
 */
@media (max-width: 768px) {
  body, html { overflow-x: hidden; }
  nav.nav {
    padding-left: 12px !important;
    padding-right: 12px !important;
    gap: 8px !important;
    flex-wrap: nowrap;
    overflow-x: hidden;
  }
  nav.nav button,
  nav.nav a {
    font-size: 11px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
  nav.nav [data-mobile-collapse] { display: none !important; }
  nav.nav [data-mobile-more]     { display: flex !important; }
}
@media (min-width: 769px) {
  nav.nav [data-mobile-more]     { display: none !important; }
}

/* Lead card unread pulse animation (Night 3 B2). */
@keyframes leadPulseAnim {
  0%   { box-shadow: 0 0 0 0 rgba(163,45,45,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(163,45,45,0); }
  100% { box-shadow: 0 0 0 0 rgba(163,45,45,0); }
}

/* Outline / secondary helper. */
.kndy-cta-secondary {
  background: transparent;
  color: var(--kndy-cta);
  border: 1px solid var(--kndy-cta);
}
.kndy-cta-secondary:hover {
  background: var(--kndy-cta);
  color: var(--kndy-cta-text);
}
