/* ============================================================
   EQUALS FIVE (E5) CANONICAL DESIGN SYSTEM CSS
   Master Brand Tokens:
   - Navy: #1E2548 (Headings, primary brand, deep accents)
   - Magenta / Fuchsia: #E72887 (Accent, active indicators, brand rule)
   - Magenta Deep: #B81D6B (Interactive links, hover states)
   - Body Text: #3A4055
   - Muted: #8B90A3
   - Line / Rule: #E4E6EE
   - Background: #FBFBFC
   - Card Background: #FFFFFF
   - Pass / Positive: #1F6B3F (bg: #E4F2E9)
   - Warn: #8A5A00 (bg: #FDF1DD)
   - Danger: #B81D1D (bg: #FDE8E8)
   - Typography: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif
   ============================================================ */

:root {
  color-scheme: light;
  --e5-navy: #1E2548;
  --e5-mag: #E72887;
  --e5-mag-d: #B81D6B;
  --e5-body: #3A4055;
  --e5-muted: #8B90A3;
  --e5-bg: #FBFBFC;
  --e5-card: #FFFFFF;
  --e5-line: #E4E6EE;
  --e5-tint: #FDEEF6;
  --e5-pass: #1F6B3F;
  --e5-pass-bg: #E4F2E9;
  --e5-warn: #8A5A00;
  --e5-warn-bg: #FDF1DD;
  --e5-danger: #B81D1D;
  --e5-danger-bg: #FDE8E8;
  --sans: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--e5-body);
  background: var(--e5-bg);
  -webkit-font-smoothing: antialiased;
}

/* Top bar banner */
.e5-bar {
  background: #ffffff;
  border-bottom: 3px solid var(--e5-mag);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.e5-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.e5-brand .logo-text {
  font-weight: 800;
  color: var(--e5-navy);
  font-size: 16px;
  letter-spacing: -0.02em;
}
.e5-brand .logo-text span {
  color: var(--e5-mag);
}
.e5-brand .sub-title {
  color: var(--e5-muted);
  font-size: 13px;
  font-weight: 500;
  border-left: 1px solid var(--e5-line);
  padding-left: 12px;
}

/* Navigation bar */
.e5-topnav {
  background: var(--e5-navy);
  padding: 0 28px;
  position: sticky;
  top: 59px;
  z-index: 99;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.e5-topnav a, .e5-topnav button {
  color: #B9BECF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 12px 16px;
  white-space: nowrap;
  border: none;
  background: transparent;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.15s ease;
  font-family: var(--sans);
  display: flex;
  align-items: center;
  gap: 6px;
}
.e5-topnav a:hover, .e5-topnav button:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}
.e5-topnav a.cur, .e5-topnav button.cur {
  color: #ffffff;
  font-weight: 700;
  border-bottom-color: var(--e5-mag);
}

/* Subnav filter bar */
.e5-subnav {
  background: #F0F1F6;
  border-bottom: 1px solid var(--e5-line);
  padding: 0 28px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}
.e5-subnav button {
  color: var(--e5-body);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: var(--sans);
}
.e5-subnav button.cur {
  color: var(--e5-navy);
  border-bottom-color: var(--e5-mag);
}

/* Container */
.e5-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px 28px 100px;
}

/* Typography */
h1 {
  font-weight: 800;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--e5-navy);
}
h2 {
  font-weight: 700;
  font-size: 21px;
  margin: 36px 0 12px;
  color: var(--e5-navy);
}
h2::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: var(--e5-mag);
  margin-right: 10px;
  vertical-align: middle;
  transform: translateY(-2px);
}
h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--e5-navy);
  margin: 24px 0 8px;
}
.e5-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--e5-mag);
  font-weight: 700;
  margin-bottom: 8px;
}
.e5-desc {
  color: var(--e5-muted);
  font-size: 15px;
  margin: 0 0 24px;
  max-width: 82ch;
  line-height: 1.55;
}
p {
  margin: 0 0 14px;
  max-width: 78ch;
}
a {
  color: var(--e5-mag-d);
  text-decoration: none;
  border-bottom: 1px solid rgba(184,29,107,0.25);
  font-weight: 500;
}
a:hover {
  color: var(--e5-mag);
  border-bottom-color: var(--e5-mag);
}

/* Cards & Layout */
.e5-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.e5-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 20px 0;
}
.e5-card {
  background: var(--e5-card);
  border: 1px solid var(--e5-line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.01);
}
.e5-card.featured {
  border-top: 3px solid var(--e5-mag);
}
.e5-card .stat-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 12px 0 6px;
}
.e5-card .stat-num {
  font-size: 34px;
  font-weight: 800;
  color: var(--e5-navy);
  letter-spacing: -0.02em;
}
.e5-card .stat-num.pass { color: var(--e5-pass); }
.e5-card .stat-num.mag { color: var(--e5-mag); }

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13.5px;
  background: #ffffff;
  margin: 16px 0 24px;
  border: 1px solid var(--e5-line);
  border-radius: 6px;
  overflow: hidden;
}
th {
  text-align: left;
  background: #F8F9FC;
  border-bottom: 2px solid var(--e5-navy);
  padding: 10px 14px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--e5-navy);
  font-weight: 700;
}
td {
  border-bottom: 1px solid var(--e5-line);
  padding: 11px 14px;
  vertical-align: top;
  color: var(--e5-body);
}
tr:hover td {
  background: rgba(231, 40, 135, 0.02);
}

/* Callout blocks */
.e5-callout {
  background: var(--e5-tint);
  border: 1px solid rgba(231,40,135,0.2);
  border-left: 4px solid var(--e5-mag);
  padding: 16px 20px;
  border-radius: 6px;
  margin: 20px 0;
  font-size: 14px;
}
.e5-callout.dark {
  background: var(--e5-navy);
  color: #ffffff;
  border: none;
  border-left: 4px solid var(--e5-mag);
}
.e5-callout.dark p { color: #D5DAEB; margin: 0; }
.e5-callout.dark strong { color: #ffffff; }

/* Tags & Badges */
.e5-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
  text-transform: uppercase;
}
.e5-badge.p1 { background: var(--e5-pass-bg); color: var(--e5-pass); }
.e5-badge.p2 { background: var(--e5-warn-bg); color: var(--e5-warn); }
.e5-badge.sap { background: #E8EAF3; color: var(--e5-navy); }
.e5-badge.comp { background: var(--e5-tint); color: var(--e5-mag-d); }

/* Search input */
.e5-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--e5-line);
  border-radius: 6px;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--e5-navy);
  background: #ffffff;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}
.e5-search:focus {
  outline: none;
  border-color: var(--e5-mag);
}
