/* ============================================================
   DATAPROTECTION — Product Dashboard Token Layer  [v1 — forked from sentinel-tokens.css v5]
   site/assets/dataprotection-tokens.css

   SOURCE: forked from asym-intel/financial-integrity:site/assets/sentinel-tokens.css
   (v5, WPM-style light default, operator override 2026-07-06). Per §2.2 operator-lock
   (FE-BRIEF-STATUS.md), data-protection gets its OWN token file and its OWN
   renderer/skin — this is a value-level brand fork, not a shared import. Structural
   token NAMES (--color-*, --bg, --panel, --ink, --accent, --sev-*, --jid-*, etc.)
   are unchanged from the v5 contract so sentinel-jid.css's selectors and the
   fleet-canonical drawer.css / fe-print.css work with zero edits — only VALUES
   are re-hexed to the DP brand identity (mulberry/claret).

   PRIMARY COLOUR DECISION (2026-08-05 operator override, see FE-BRIEF-STATUS.md
   "Operator override — 2026-08-05" §3): ships #953773, NOT the v2 brief default
   #b8448e. v1 (BRIEF-2026-07-25-FE-FLEET-FRONTEND-GIBRALTAR-V1.md §6.3) explicitly
   settled on #953773 for its higher contrast headroom (6.31:1 vs 4.55:1) and to
   avoid the subpixel-rounding risk v1 flags for the tighter value; this file's own
   Deliverable-5 target in FE-BRIEF-STATUS.md also names #953773. Operator delegated
   the final call this session ("as you rec") and this is the resolution.

   BRAND IDENTITY: mulberry/claret primary (#953773), Newsreader display face
   (DP gets Newsreader; crypto gets Instrument Serif — the two consumers must not
   look identical per BRIEF v2 §4.4), IBM Plex Sans body / IBM Plex Mono — fleet-wide
   type families, unchanged from Sentinel.

   WCAG 2.1 AA — light register (default):
     --color-text #2b1f26 on --color-bg #faf5f8         ~14.6:1  AAA
     --color-text #2b1f26 on --color-surface #fbf7fa    ~14.8:1  AAA
     --color-text-muted #75636c on --color-bg           ~5.0:1  AA
     --color-primary #953773 on #ffffff                 ~6.3:1  AA (accent text/links)
   WCAG 2.1 AA — dark register (opt-in [data-theme="dark"]):
     --color-text #ecdde5 on --color-bg #1c1218          ~13.4:1  AAA
     --color-primary #c6539c on #351f2b                  ~5.5:1  AA
   ============================================================ */

/* ── Scale + motion tokens (register-agnostic, identical to sentinel-tokens.css v5) ── */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  2.25rem;
  --text-hero: 3.5rem;

  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --gap: var(--space-3);

  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 160ms ease-out;

  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ── DataProtection mulberry palette — DEFAULT register (light-first) ── */
:root,
[data-theme="light"] {
  /* Layered warm-paper surfaces */
  --color-bg:              #faf5f8;
  --color-surface:         #fbf7fa;
  --color-surface-2:       #fdfafc;
  --color-surface-offset:  #f5eef2;
  --color-surface-dynamic: #ebdfe6;
  --color-divider:         #e2d4dc;
  --color-border:          #d7c4cf;

  /* Text palette */
  --color-text:       #2b1f26;
  --color-text-muted: #75636c;
  --color-text-faint: #ab9aa2;

  /* 8-colour semantic palette — each with a -highlight pair (light register) */
  --color-primary:           #953773;
  --color-primary-hover:     #7c2d60;
  --color-primary-highlight: #e6d3de;
  --color-warning:           #964219;
  --color-warning-highlight: #ddcfc6;
  --color-error:             #a1272f;
  --color-error-highlight:   #eecfd0;
  --color-success:           #2f6d34;
  --color-success-highlight: #d4dfcc;
  --color-gold:              #8a6d1a;
  --color-gold-highlight:    #e7ddc2;
  --color-purple:            #7a39bb;
  --color-purple-highlight:  #dacfde;
  --color-blue:              #006494;
  --color-blue-highlight:    #c6d8e4;

  /* Surfaces */
  --bg:        var(--color-bg);
  --panel:     var(--color-surface);
  --panel2:    var(--color-surface-2);
  --line:      var(--color-border);
  --line-soft: var(--color-divider);

  /* Text */
  --ink:   var(--color-text);
  --ink-2: var(--color-text-muted);
  --muted: var(--color-text-muted);
  --faint: var(--color-text-faint);

  /* Accent — mulberry in both registers */
  --accent:        var(--color-primary);
  --accent-bright: var(--color-primary-hover);
  --accent-text:   var(--color-primary);
  --accent-bg:     var(--color-primary-highlight);

  /* Fonts — Newsreader display (DP's own face, distinct from crypto's Instrument Serif) */
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-ui:      var(--font-body);
  --font-display: 'Newsreader', Georgia, serif;

  /* Severity scale */
  --sev-critical:       var(--color-error);
  --sev-critical-text:  var(--color-error);
  --sev-high:           var(--color-warning);
  --sev-high-text:      var(--color-warning);
  --sev-elevated:       var(--color-gold);
  --sev-elevated-text:  var(--color-gold);
  --sev-monitored:      var(--color-primary);
  --sev-monitored-text: var(--color-primary);
  --sev-badge-ink:      #ffffff;

  /* Signal direction */
  --signal-escalating:    var(--color-error);
  --signal-stable:        var(--color-success);
  --signal-de-escalating: var(--color-primary);

  /* Freshness grammar */
  --fresh-updated:  var(--color-primary);
  --fresh-stable:   var(--color-text-muted);
  --fresh-archived: var(--color-text-faint);

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(43, 31, 38, 0.06);
  --shadow-md: 0 4px 12px rgba(43, 31, 38, 0.09), 0 1px 2px rgba(43, 31, 38, 0.06);

  /* Confidence pill grammar */
  --confidence-pill-bg:   var(--color-surface-2);
  --confidence-pill-ink:  var(--color-text-muted);
  --confidence-pill-line: var(--color-border);
  --tier-annotation-ink:  var(--color-text-muted);
}

/* ── Dark register — opt-in via [data-theme="dark"] ── */
[data-theme="dark"] {
  --color-bg:              #1c1218;
  --color-surface:         #22161d;
  --color-surface-2:       #281a22;
  --color-surface-offset:  #301f29;
  --color-surface-dynamic: #392231;
  --color-divider:         #3b2530;
  --color-border:          #4a2e3c;

  --color-text:       #ecdde5;
  --color-text-muted: #937f89;
  --color-text-faint: #665560;

  --color-primary:           #c6539c;
  --color-primary-hover:     #d268ac;
  --color-primary-highlight: #351f2b;
  --color-warning:           #c47a3a;
  --color-warning-highlight: #342818;
  --color-error:             #c0566a;
  --color-error-highlight:   #321820;
  --color-success:           #5a9940;
  --color-success-highlight: #1e2e16;
  --color-gold:              #c9a030;
  --color-gold-highlight:    #2e2512;
  --color-purple:            #9a72d9;
  --color-purple-highlight:  #2a2240;
  --color-blue:              #5591c7;
  --color-blue-highlight:    #1a2d3f;

  --bg:        var(--color-bg);
  --panel:     var(--color-surface);
  --panel2:    var(--color-surface-2);
  --line:      var(--color-border);
  --line-soft: var(--color-divider);

  --ink:   var(--color-text);
  --ink-2: var(--color-text-muted);
  --muted: var(--color-text-muted);
  --faint: var(--color-text-faint);

  --accent:        var(--color-primary);
  --accent-bright: var(--color-primary-hover);
  --accent-text:   var(--color-primary);
  --accent-bg:     var(--color-primary-highlight);

  --sev-critical:       var(--color-error);
  --sev-critical-text:  var(--color-error);
  --sev-high:           var(--color-warning);
  --sev-high-text:      var(--color-warning);
  --sev-elevated:       var(--color-gold);
  --sev-elevated-text:  var(--color-gold);
  --sev-monitored:      var(--color-primary);
  --sev-monitored-text: var(--color-primary);
  --sev-badge-ink:      var(--color-surface);

  --signal-escalating:    var(--color-error);
  --signal-stable:        var(--color-success);
  --signal-de-escalating: var(--color-primary);

  --fresh-updated:  var(--color-primary);
  --fresh-stable:   var(--color-text-muted);
  --fresh-archived: var(--color-text-faint);

  --shadow-sm: 0 1px 2px rgba(10, 6, 9, 0.5);
  --shadow-md: 0 6px 24px rgba(10, 6, 9, 0.55), 0 1px 2px rgba(10, 6, 9, 0.5);

  --confidence-pill-bg:   var(--color-surface-2);
  --confidence-pill-ink:  var(--color-text-muted);
  --confidence-pill-line: var(--color-border);
  --tier-annotation-ink:  var(--color-text-muted);
}

/* Persistent regulatory-boundary chrome (D5/D10 — non-negotiable, fleet-wide). */
.boundary-strip {
  background: var(--panel);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--text-xs);
  padding: 6px 16px;
}

/* Severity badge grammar — colour carries severity only. */
.sev-badge { border-radius: var(--radius-sm); font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; color: var(--sev-badge-ink); }
.sev-badge--critical  { background: var(--sev-critical); }
.sev-badge--high      { background: var(--sev-high); }
.sev-badge--elevated  { background: var(--sev-elevated); }
.sev-badge--monitored { background: var(--sev-monitored); }

/* Confidence pill grammar — deliberately neutral */
.confidence-pill {
  background: var(--confidence-pill-bg);
  border: 1px solid var(--confidence-pill-line);
  border-radius: 999px;
  color: var(--confidence-pill-ink);
  font-size: var(--text-xs);
  padding: 1px 8px;
}

/* Theme toggle */
.theme-toggle {
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color var(--transition), border-color var(--transition);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--accent-text); }

/* ── JID semantic scales — mapped onto the DP palette (structure identical to sentinel-tokens.css v5) ── */
:root {
  --jid-confirmed: var(--color-primary);
  --jid-confirmed-bg: var(--color-primary-highlight);
  --jid-assessed: var(--color-blue);
  --jid-assessed-bg: var(--color-blue-highlight);
  --jid-emerging: var(--color-warning);
  --jid-emerging-bg: var(--color-warning-highlight);
  --jid-sentinel: var(--color-purple);
  --jid-sentinel-bg: var(--color-purple-highlight);
  --jid-inforce: var(--color-error);
  --jid-inforce-bg: var(--color-error-highlight);
  --jid-soon: var(--color-gold);
  --jid-soon-bg: var(--color-gold-highlight);
  --jid-horizon: var(--color-success);
  --jid-horizon-bg: var(--color-success-highlight);
}

/* ===== BEGIN VENDORED fe-commons/fe-print.css — DO NOT EDIT HERE ===== */
/* ==========================================================================
   fe-print.css — the print register, fleet-wide
   SSOT: asym-intel-commons:fe-commons/fe-print.css
   Vendored verbatim into each consumer between the BEGIN/END markers below.
   Edit at the SSOT, never in a vendored copy.
   ========================================================================== */
@media print {
  .paywall,
  [data-access="gated"],
  [data-access="locked"],
  [data-entitlement]:not([data-entitlement="free"]):not([data-entitlement="public"]) {
    display: none !important;
  }
  .jidlensbar,
  .viewbar,
  #viewbar,
  .lensseg,
  #lensseg,
  [data-consent-mount],
  #consent-mount,
  .drawer,
  .drawer-scrim,
  nav.site-nav,
  .site-header__util,
  .persona-row,
  .skip-link {
    display: none !important;
  }
  :where(html, body) {
    background: #fff !important;
    color: #000 !important;
  }
  details:not([open]) > *:not(summary) {
    display: revert !important;
  }
  [hidden].lens-view.on,
  .lens-view.on {
    display: block !important;
  }
  a[href^="http"]::after {
    content: " <" attr(href) ">";
    font-size: 0.85em;
    word-break: break-all;
  }
  h1, h2, h3, h4, caption, th {
    break-after: avoid-page;
    page-break-after: avoid;
  }
  table, figure, blockquote, .card, .lens-card, .role-card {
    break-inside: avoid-page;
    page-break-inside: avoid;
  }
}
/* ===== END VENDORED fe-commons/fe-print.css ===== */
