/* ============================================================
   NEPSE DECODE — Editorial Design Theme (D1)
   Approved concept: "Concept 03 Editorial Markets" (terminal theme).

   Wave A (2026-10-23): ALL --nd-* tokens moved to
   css/nd-tokens.css — the single source, imported below.
   This file now carries only component helper classes and the
   blog-card treatments that consume the tokens. Do not define
   tokens here; add them to nd-tokens.css.

   THEME MODEL
   Dark terminal is the default: `:root` in nd-tokens.css
   carries dark values. Light theme: set `data-nd-ed="light"`
   on <html>. The D2 header switch toggles that attribute
   (persisted in localStorage "nd-ed-theme") and mirrors the
   legacy `data-theme` attribute so existing chart observers
   keep working.

   FONTS: self-hosted via css/fonts.css (Inter + Noto Sans
   Devanagari + Spectral + Noto Serif Devanagari, genuine
   weights). Mono stack: "IBM Plex Mono" first (token), with
   system mono fallbacks.
   ============================================================ */

@import url("/css/nd-tokens.css");

/* ============ Base helpers (opt-in scope) ============ */

/* Numbers never jump: always tabular */
.nd-num {
  font-family: var(--nd-font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Eyebrow labels: 10–11px uppercase, 0.22em tracking, lime at 80% */
.nd-eyebrow {
  font-family: var(--nd-font-sans);
  font-size: var(--nd-text-eyebrow);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--nd-lime);
  opacity: 0.8;
}

/* Section/card headings: display serif */
.nd-h-display {
  font-family: var(--nd-font-display);
  font-weight: 600;
  color: var(--nd-text);
  letter-spacing: -0.01em;
}

/* Focus visibility everywhere */
.nd-focusable:focus-visible {
  outline: none;
  box-shadow: var(--nd-focus-ring);
  border-radius: var(--nd-r-sm);
}

/* Reduced motion: keep only opacity fades ≤150ms */
@media (prefers-reduced-motion: reduce) {
  :root {
    --nd-t-fast: 150ms;
    --nd-t-med: 150ms;
    --nd-t-enter: 150ms;
    --nd-t-max: 150ms;
  }
}

/* 3D elevation tokens (--nd-e1/e2/e3, --nd-rim, --nd-rim-strong,
 * --nd-press) live in css/nd-tokens.css since Wave A (2026-10-23),
 * imported at the top of this file. Do not redefine them here. */

/* ============================================================
 * Blog cards: Pro 3D treatment (overrides style.css flat cards)
 * ============================================================ */
.mag-card,.post-card,.event-card{
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,0) 40%),var(--nd-panel);
  border:1px solid var(--nd-border);
  box-shadow:var(--nd-rim),var(--nd-e2);
  transition:transform .2s var(--nd-ease),box-shadow .2s var(--nd-ease);
}
.mag-card:hover,.post-card:hover,.event-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--nd-rim),var(--nd-e3);
}
.cert-card,.hub-method-card,.chart-card{
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,0) 40%),var(--nd-panel);
  border:1px solid var(--nd-border);
  box-shadow:var(--nd-rim),var(--nd-e2);
}

/* Live price badge for analysis cards */
.mag-live-price {
  margin-top: 8px;
  font-size: 0.85em;
  color: var(--nd-dim, #666);
}
.mag-live-price strong {
  color: var(--nd-green, #2d7d32);
}
.mag-live-asof {
  font-size: 0.85em;
  opacity: 0.7;
}

/* ---- R6 (2026-10-29): light-theme contrast to AA ---- */
/* .nd-eyebrow was lime at opacity .8; blended over light surfaces it
   read as olive #6f953e/#71963f (~3.2:1). Full opacity restores the
   token lime #4D7C0F on #F6F7F9 = 4.66:1. Dark theme untouched. */
[data-theme="light"] .nd-eyebrow,
[data-nd-ed="light"] .nd-eyebrow { opacity: 1; }
