/* =============================================================
   TENAX / IP PATHWAYS — BRAND THEME
   Single source of truth for the Tenax look across all courses
   and the training portal. Load this AFTER base.css so these
   :root tokens + patches win.

   Brand palette: bg #181818 · card #242424 · border #3d3020 · gold #ef910a
   See brand.md for the human-readable branding guide.
   ============================================================= */

:root {
  /* Backgrounds & surfaces */
  --color-bg:             #181818;
  --color-bg-warm:        #1f1f1f;
  --color-surface:        #242424;
  --color-surface-warm:   #2a2a2a;
  /* --color-bg-code stays Catppuccin #1E1E2E (code blocks are already dark) */

  /* Text & borders */
  --color-text:           #eaeaea;
  --color-text-secondary: #c4b8a8;
  --color-text-muted:     #9a8e7e;
  --color-border:         #3d3020;
  --color-border-light:   #2b2418;

  /* Accent — Tenax gold. accent-light/muted are only ever bg/border tints. */
  --color-accent:         #ef910a;
  --color-accent-hover:   #ffa524;
  --color-accent-light:   #3a2c0a;
  --color-accent-muted:   #c79a4a;

  /* Semantic (tuned for legibility on dark; *-light are dark tints) */
  --color-success:        #34a263;
  --color-success-light:  #14361f;
  --color-error:          #d9534f;
  --color-error-light:    #3d1717;
  --color-info:           #3f9fc4;
  --color-info-light:     #16324d;

  /* Actor colors — five distinct hues, vivid on dark */
  --color-actor-1:        #e8714f;
  --color-actor-2:        #3f9fc4;
  --color-actor-3:        #9486c9;
  --color-actor-4:        #d9b24a;
  --color-actor-5:        #34a263;

  /* Shadows — stronger on near-black so cards keep depth */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.40);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.50);
}

/* Patches for values hard-coded in base.css (can't be reached via tokens) */
.nav { background: rgba(24,24,24,0.92); }
body { background-image: radial-gradient(ellipse at 20% 50%, rgba(239,145,10,0.05) 0%, transparent 50%); }
/* The gold accent is a light fill — it needs dark text, not white (brand: #181818 on gold) */
.quiz-check-btn, .dnd-chip, .touch-ghost, .layer-tab.active,
.flow-step-num, .step-num, .btn-primary, .btn-primary:hover { color: #181818; }
/* .quiz-option is a <button> with no explicit color — without this it inherits the
   UA black text and goes near-invisible on its dark/selected/correct/incorrect fills. */
.quiz-option { color: var(--color-text); }

/* Brand logo in the nav */
.nav-brand { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.nav-logo  { height: 26px; width: auto; flex-shrink: 0; }
/* When the brand is a link back to the portal it must not look like body link
   text (no underline, inherit color) but should hint it's clickable on hover. */
a.nav-brand { text-decoration: none; color: inherit; }
a.nav-brand:hover .nav-title { color: var(--color-accent); }

/* ── Scroll performance (patches base.css behaviors that caused jank/freezes) ──
   base.css sets `scroll-snap-type: y proximity` on <html>, which fights the user
   on these long single-page courses (the "weird scrolling"). Turn it off; keep
   smooth behavior for nav-dot clicks. Also drop the fixed-nav backdrop blur — the
   nav already has a near-opaque brand background above, so the per-frame GPU
   compositing it forced on every scroll buys us nothing. */
html { scroll-snap-type: none; }
.nav { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* Belt-and-braces: neutralize the remaining base.css scroll opinions too.
   scroll-behavior:smooth on <html> is redundant (nav dots and keyboard nav
   already pass behavior:'smooth' to scrollIntoView) and can make programmatic
   or anchor scrolls feel like the page stalls; .module's snap-align is inert
   with snap-type off, but remove the remnant so nothing can re-enable it. */
html { scroll-behavior: auto; }
.module { scroll-snap-align: none; }

/* ── Text-clipping fixes ──
   base.css makes `.badge-code` nowrap with no flex sizing and `.badge-desc` has no
   min-width, so a long badge label squeezes/clips its description. Let the row wrap
   so the description drops beneath the label instead of being cut off. */
.badge-item { flex-wrap: wrap; }
.badge-code { flex-shrink: 0; }
.badge-desc { flex: 1 1 14rem; min-width: 0; }
/* `.translation-code { overflow-x: hidden }` in base.css can clip the Claim↔truth
   lines; allow scroll instead of hiding overflow. */
.translation-code { overflow-x: auto; }

/* ── Alignment fixes ──
   base.css absolutely positions the code-side .translation-label in the panel's
   top corner while the english side's label flows in-content — the two column
   headings sit at different heights. Let both flow. */
.translation-code .translation-label {
  position: static;
  display: block;
  margin-bottom: var(--space-3); /* match the english label's spacing exactly */
}
/* .flow-steps centers each column against the tallest sibling, so a step whose
   caption wraps pushes its number circle above its neighbors', and the arrows
   float at mid-column. Top-align and line the arrows up with the 40px circles. */
.flow-steps { align-items: flex-start; }
.flow-arrow { line-height: 40px; }
/* .step-num is a fixed 32px number circle; the triage routing matrix puts words
   in it ("page", "ticket", "nothing") which clip. Let it grow into a pill while
   plain numbers still render as the same circle. */
.step-num {
  width: auto;
  min-width: 32px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-full);
  white-space: nowrap;
}
