/* ==========================================================================
   XIRO Testnet — Design tokens (WP02, blueprint §05)
   --------------------------------------------------------------------------
   SINGLE token authority for the whole product. Every other stylesheet must
   reference these variables instead of defining its own colours, type scale,
   spacing, radii or motion durations. No second :root token source exists:
   public/css/dashboard.css keeps only legacy-name aliases that point at the
   variables below, and public/css/reference-restoration.css /
   shared-consistency.css keep only page-hero overrides built from them.

   Frozen in WP00 (docs/work-packages/WP00_BASELINE_FREEZE.md §5).
   Do NOT invent new palette values here — a new token needs a WP decision.
   ========================================================================== */

/* --- Typefaces (self-hosted; see §05) ----------------------------------- */
@font-face {
  font-family: Manrope;
  src: url("../assets/manrope.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../assets/ibm-plex-mono.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* --- Colour (§05 frozen palette) ------------------------------------- */
  --bg: #0c0d0c; /* whole document, page canvas */
  --surface: #141614; /* card, form, table surface */
  --surface-raised: #1c201c; /* hover, dropdown, expanded row */
  --surface-hero: #20251f; /* milestone/hero — dark replacement for the big ivory card */
  --surface-inset: #101210; /* input field, code/hash area */
  --border: #30372f; /* dividers, card border */
  --border-control: #687564; /* input/control boundary where a boundary is required */
  --border-hover: #7e897a; /* interactive hover */
  --text: #f2f1eb; /* heading, primary labels, values */
  --text-secondary: #afb5aa; /* body copy, helpful metadata */
  --text-tertiary: #98a18f; /* low-priority readable labels, table metadata */
  --accent: #ff722f; /* primary button, active tab underline, key progress */
  --accent-hover: #ff864d;
  --accent-pressed: #e85f20;
  --accent-soft: #2d1b13; /* orange badge/warning tint, sparingly */
  --accent-text: #ffa06a; /* small accent text on dark surface */
  --on-accent: #11140f; /* button text on orange — never white small text */
  --ivory: #eee9df; /* small selected nav chip / number highlight ONLY */
  --on-ivory: #11140f;
  --success: #67d895; /* confirmed / connected / healthy, always with a label */
  --success-soft: #12251b;
  --warning: #e8b65b; /* pending attention, icon + text */
  --warning-soft: #2b2416;
  --danger: #f28c82; /* failed / rejected / destructive action text */
  --danger-soft: #301b1a;
  --info: #97b4dd; /* informational status, non-primary */
  --focus: #ffb17d; /* keyboard focus ring */
  --skeleton-base: #1c211c;
  --skeleton-highlight: #293129;

  /* --- Spacing (§06: only these steps) ---------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* --- Layout (§06) ------------------------------------------------------ */
  --content-max: 1360px;
  --gutter-desktop: 32px;
  --gutter-tablet: 24px;
  --gutter-mobile: 16px;
  --header-height: 64px;
  --chapter-nav-height: 48px;
  --mobile-topbar-height: 56px;
  --mobile-nav-height: 64px;
  --tap-target: 44px; /* minimum primary tap target */

  /* --- Radii (§06) ------------------------------------------------------- */
  --radius-input: 8px;
  --radius-button: 8px;
  --radius-card: 12px;
  --radius-hero: 16px;

  /* --- Typography (§05) -------------------------------------------------- */
  --font-sans: "Manrope", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --h1-size: 32px;
  --h1-line: 38px;
  --h1-size-mobile: 28px;
  --h1-line-mobile: 34px;
  --hero-size: 48px;
  --hero-line: 54px;
  --hero-size-mobile: 36px;
  --hero-line-mobile: 42px;
  --h2-size: 20px;
  --h2-line: 28px;
  --h3-size: 16px;
  --h3-line: 24px;
  --body-size: 14px;
  --body-line: 22px;
  --body-size-mobile: 15px;
  --body-line-mobile: 23px;
  --input-size-mobile: 16px; /* iOS zoom guard */
  --table-size: 13px;
  --table-line: 20px;
  --helper-size: 12px;
  --helper-line: 18px;
  --eyebrow-size: 11px;
  --eyebrow-line: 16px;
  --eyebrow-tracking: 0.08em;
  --balance-size: 40px; /* balance/points: 40–48px desktop, 34–40px mobile */
  --balance-size-mobile: 34px;

  /* --- Motion (§07) ------------------------------------------------------ */
  --motion-hover: 140ms;
  --motion-press: 90ms;
  --motion-tab: 170ms;
  --motion-entrance: 210ms;
  --motion-modal: 220ms;
  --motion-drawer: 240ms;
  --motion-stagger: 35ms;
  --motion-entrance-max: 400ms;
  --motion-skeleton: 1600ms; /* shimmer sweep 1.4–1.8s, one direction */
  --motion-pulse: 1800ms; /* confirmed-live status pulse 1.6–2s */
  --motion-ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* --- Skeleton / loading (§07) ------------------------------------------ */
  --skeleton-flash-delay: 120ms; /* show skeleton only if the request is still pending */
  --skeleton-timeout: 9000ms; /* 8–10s budget, then error/retry — never infinite */

  /* --- Elevation ---------------------------------------------------------- */
  --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.18);
}
