/* ============================================================
   ELEVATE — "Delmar Redesign 2025" ALIGNED conventions layer.
   Ported from the DCMS v2 handoff (conventions.css): remaps the
   legacy brand tokens to the website palette, resets branded type
   to upright Helvetica Bold, squares the geometry and unifies the
   button system. Loaded after app.css, before elevate.css.
   ============================================================ */

:root {
  /* ---- Website named colors ---- */
  --c-white:            #FFFFFF;
  --c-alabaster:        #FAFAFA;
  --c-black:            #000000;
  --c-resolution-blue:  #002387;   /* primary */
  --c-downriver:        #0E2D52;   /* deep navy — headings */
  --c-westar:           #DCD9D0;   /* warm neutral */
  --c-valencia:         #D5403A;   /* accent red */
  --c-well-read:        #B23A30;   /* dark red */
  --c-navy-900:         #091D43;
  --c-azure-500:        #809AC2;
  --c-azure-400:        #BFCDE0;
  --c-azure-300:        #E5EBF3;
  --c-azure-200:        #F2F5F9;
  --c-azure-100:        #F3F7FD;
  --c-green:            #0C6E40;

  /* ---- Remap the legacy Delmar brand scale to the website palette ---- */
  --blue-300: var(--c-azure-500);
  --blue-500: var(--c-resolution-blue);
  --blue-700: var(--c-resolution-blue);
  --blue-800: var(--c-downriver);
  --blue-900: var(--c-navy-900);

  --red-300: #E59A95;
  --red-500: var(--c-valencia);
  --red-700: var(--c-valencia);
  --red-800: var(--c-well-read);
  --red-900: #8C2C24;

  --grey:    var(--c-westar);
  --grey-mid: rgba(0, 0, 0, 0.55);

  /* ---- Type: body Noto Sans 400; headings/strong Helvetica Bold upright ---- */
  --font-strong:  "Helvetica Neue", "Helvetica", Arial, sans-serif;
  --font-branded: "Helvetica Neue", "Helvetica", Arial, sans-serif;
  --app-font:     "Noto Sans", system-ui, -apple-system, sans-serif;

  /* ---- App semantic tokens ---- */
  --app-bg:           var(--c-alabaster);
  --app-surface:      var(--c-white);
  --app-surface-2:    var(--c-azure-200);
  --app-surface-3:    var(--c-azure-300);
  --app-nav-bg:       var(--c-white);
  --app-nav-fg:       var(--c-downriver);

  --app-text:         #0B0C0F;
  --app-text-2:       rgba(0, 0, 0, 0.60);
  --app-text-3:       rgba(0, 0, 0, 0.42);

  --app-border:       rgba(14, 45, 82, 0.12);
  --app-border-2:     rgba(14, 45, 82, 0.22);
  --app-divider:      rgba(14, 45, 82, 0.08);

  --app-input-bg:     var(--c-white);
  --app-input-bd:     rgba(14, 45, 82, 0.22);

  --app-row-hover:    rgba(0, 35, 135, 0.05);
  --app-row-stripe:   rgba(0, 35, 135, 0.025);

  --app-info-bg:      rgba(0, 35, 135, 0.10);
  --app-info-fg:      var(--c-resolution-blue);
  --app-neutral-bg:   rgba(0, 0, 0, 0.06);
  --app-neutral-fg:   rgba(0, 0, 0, 0.60);
  --app-danger-bg:    rgba(213, 64, 58, 0.12);
  --app-danger-fg:    var(--c-well-read);
}

::selection { background: var(--c-resolution-blue); color: #fff; }

/* Dark mode: keep the app.css dark surfaces, lift the accents to azure so
   Resolution Blue elements stay legible on navy. */
[data-theme="dark"] {
  --c-resolution-blue: #6E8FE0;
  --c-downriver:       #C7D6EC;
  --c-azure-200:       #0F2142;
  --c-azure-300:       #16294D;
  --app-bg:            #061224;
  --app-surface:       #0D1E3A;
  --app-surface-2:     #0A1830;
  --app-surface-3:     #112647;
  --app-nav-bg:        #061224;
  --app-text:          #E6ECF5;
  --app-text-2:        #94A4BE;
  --app-text-3:        #6A7A93;
  --app-border:        rgba(255, 255, 255, 0.08);
  --app-border-2:      rgba(255, 255, 255, 0.16);
  --app-divider:       rgba(255, 255, 255, 0.05);
  --app-input-bg:      #112647;
  --app-input-bd:      rgba(255, 255, 255, 0.14);
  --app-row-hover:     rgba(255, 255, 255, 0.04);
  --app-row-stripe:    rgba(255, 255, 255, 0.02);
  --app-info-bg:       rgba(110, 143, 224, 0.18);
  --app-info-fg:       #9DB6EE;
  --app-neutral-bg:    rgba(255, 255, 255, 0.08);
  --app-neutral-fg:    #94A4BE;
  --app-danger-bg:     rgba(213, 64, 58, 0.20);
  --app-danger-fg:     #F0A6A1;
}

/* ============================================================
   TYPE — upright Helvetica Bold with negative tracking replaces the
   legacy Noto Sans Black Italic / UPPERCASE brand treatment.
   ============================================================ */
.page__title,
.topbar__product,
.kpi__value,
.h1, .h2, .h3, .h4, .display, .eyebrow, .banner,
.panel__title,
.elv-card__title, .elv-num, .donut-num,
.dw-row__val, .dw-bar__val {
  font-family: var(--font-strong) !important;
  font-style: normal !important;
  text-transform: none !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
}

.page__title {
  color: var(--c-downriver) !important;
  font-size: 30px;
  line-height: 1.12;
  letter-spacing: -0.6px !important;
}
.panel__title, .elv-card__title {
  color: var(--c-downriver) !important;
  letter-spacing: -0.48px !important;
}

body { letter-spacing: 0; }

/* Drop the legacy 12° brand-angle motif (the redesign defines no angle). */
.topbar__nav a.is-active::after,
.kpi__accent, .kpi__accent svg,
.angle-stripe { transform: none !important; }

/* ============================================================
   BUTTONS & CONTROLS — squared geometry, solid Resolution Blue
   primary, white + blue-border secondary, azure filter chips.
   ============================================================ */
.btn,
.input, .select, .textarea,
.toolbar__search, .cmdk, .seg,
.panel, .kpi, .badge, .chip {
  border-radius: 2px !important;
}

.btn { font-family: var(--font-strong); font-weight: 600; letter-spacing: 0.005em; }

.btn--primary {
  background: var(--c-resolution-blue) !important;
  color: #fff !important;
  border-color: var(--c-resolution-blue) !important;
}
.btn--primary:hover { background: var(--c-downriver) !important; }
[data-theme="dark"] .btn--primary { color: #061224 !important; }
[data-theme="dark"] .btn--primary:hover { background: #9DB6EE !important; }

.btn--ghost {
  background: var(--app-surface) !important;
  color: var(--c-resolution-blue) !important;
  border-color: var(--c-resolution-blue) !important;
}
.btn--ghost:hover { background: var(--c-azure-200) !important; }
.btn--link { color: var(--c-resolution-blue) !important; }

.btn--accent { background: var(--c-valencia) !important; border-color: var(--c-valencia) !important; color: #fff !important; }
.btn--accent:hover { background: var(--c-well-read) !important; }

.seg__btn.is-active { background: var(--c-resolution-blue) !important; color: #fff !important; }
[data-theme="dark"] .seg__btn.is-active { color: #061224 !important; }

.chip {
  background: var(--c-azure-200) !important;
  border-color: var(--c-azure-300) !important;
  color: var(--c-resolution-blue) !important;
}

/* Prominent metric numerals pick up the site's blue stat treatment. */
.kpi__value, .elv-num, .donut-num { color: var(--c-resolution-blue) !important; }

/* A <summary> styled as a button: no disclosure triangle. */
summary.btn { list-style: none; cursor: pointer; }
summary.btn::-webkit-details-marker { display: none; }
.alert--warn { background: rgba(201, 138, 0, 0.10); border-color: rgba(201, 138, 0, 0.45); color: #7a5300; }
[data-theme="dark"] .alert--warn { color: #F2C66D; }

/* "Needs attention" mark next to a person (access drifted from their system access, or a leaver holding a licence). */
.att-mark { display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; border-radius:50%; background:var(--c-valencia, #d5403a); color:#fff; font-size:11px; font-weight:700; line-height:1; vertical-align:1px; cursor:help; }
