/* Editorial theme: monochrome, typographic, restrained.
   Loaded only when Customer.theme == 'editorial'. It re-tones the utility classes
   the templates already use rather than touching every template, so switching the
   theme off restores the default look untouched. */
:root[data-theme="editorial"] {
  --ed-ink: #111111;
  --ed-charcoal: #2b2b2b;
  --ed-muted: #595959;
  --ed-rule: #d9d9d9;
  --ed-paper: #ffffff;
  --ed-wash: #f5f5f5;
  /* Islands read these */
  --sb-brand: #111111;
  --sb-brand-tint: rgba(0, 0, 0, 0.06);
  --sb-brand-tint-hover: rgba(0, 0, 0, 0.1);
  --sb-fg: #111111;
  --sb-muted: #595959;
  --sb-faint: #8a8a8a;
  --sb-hover: #f2f2f2;
  --sb-border: #e2e2e2;
  --db-navy: #111111;
}

[data-theme="editorial"] body,
[data-theme="editorial"] button,
[data-theme="editorial"] input,
[data-theme="editorial"] select,
[data-theme="editorial"] textarea {
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;
}
[data-theme="editorial"] body { background: var(--ed-paper); color: var(--ed-ink); -webkit-font-smoothing: antialiased; }
[data-theme="editorial"] h1, [data-theme="editorial"] h2, [data-theme="editorial"] h3, [data-theme="editorial"] h4 { letter-spacing: -0.01em; color: var(--ed-ink); }
[data-theme="editorial"] .bg-gray-100 { background-color: var(--ed-paper) !important; }
[data-theme="editorial"] .bg-gray-50 { background-color: var(--ed-wash) !important; }

/* Colour: every blue / navy / teal accent becomes ink. */
[data-theme="editorial"] .bg-blue-500, [data-theme="editorial"] .bg-blue-600, [data-theme="editorial"] .bg-blue-700,
[data-theme="editorial"] .bg-indigo-600, [data-theme="editorial"] .bg-purple-600,
[data-theme="editorial"] .bg-\[\#014F70\], [data-theme="editorial"] .bg-\[\#014f70\] { background-color: var(--ed-ink) !important; }
[data-theme="editorial"] .hover\:bg-blue-700:hover, [data-theme="editorial"] .hover\:bg-blue-600:hover,
[data-theme="editorial"] .hover\:bg-\[\#013F50\]:hover, [data-theme="editorial"] .hover\:bg-\[\#013f5a\]:hover,
[data-theme="editorial"] .hover\:bg-\[\#013F60\]:hover { background-color: var(--ed-charcoal) !important; }
[data-theme="editorial"] .text-blue-500, [data-theme="editorial"] .text-blue-600, [data-theme="editorial"] .text-blue-700,
[data-theme="editorial"] .text-blue-800, [data-theme="editorial"] .text-indigo-600,
[data-theme="editorial"] .text-\[\#014F70\], [data-theme="editorial"] .text-\[\#014f70\] { color: var(--ed-ink) !important; }
[data-theme="editorial"] .hover\:text-blue-800:hover, [data-theme="editorial"] .hover\:text-blue-700:hover { color: var(--ed-muted) !important; }
[data-theme="editorial"] .border-blue-500, [data-theme="editorial"] .border-blue-600,
[data-theme="editorial"] .border-\[\#014F70\] { border-color: var(--ed-ink) !important; }
[data-theme="editorial"] .focus\:ring-blue-500:focus, [data-theme="editorial"] .focus\:ring-\[\#014F70\]:focus,
[data-theme="editorial"] .focus\:ring-2:focus { --tw-ring-color: var(--ed-ink) !important; }
[data-theme="editorial"] .focus\:border-blue-500:focus, [data-theme="editorial"] .focus\:border-\[\#014F70\]:focus { border-color: var(--ed-ink) !important; }
[data-theme="editorial"] .bg-blue-50, [data-theme="editorial"] .bg-blue-100, [data-theme="editorial"] .bg-indigo-50 { background-color: var(--ed-wash) !important; }
[data-theme="editorial"] .text-blue-900, [data-theme="editorial"] .text-blue-800 { color: var(--ed-ink) !important; }
[data-theme="editorial"] .bg-gray-200 { background-color: #e9e9e9 !important; }
[data-theme="editorial"] .text-dark { color: var(--ed-ink); }

/* Form: square, outlined, no gradients or shadows. Avatars and status dots keep their circles. */
[data-theme="editorial"] .rounded-md, [data-theme="editorial"] .rounded-lg, [data-theme="editorial"] .rounded-xl,
[data-theme="editorial"] .rounded-2xl, [data-theme="editorial"] .rounded { border-radius: 2px !important; }
[data-theme="editorial"] .shadow, [data-theme="editorial"] .shadow-sm, [data-theme="editorial"] .shadow-md,
[data-theme="editorial"] .shadow-lg, [data-theme="editorial"] .shadow-xl { box-shadow: none !important; }
[data-theme="editorial"] .shadow-md.bg-white, [data-theme="editorial"] .shadow.bg-white,
[data-theme="editorial"] .bg-white.shadow-md, [data-theme="editorial"] .bg-white.shadow-xl,
[data-theme="editorial"] .bg-white.shadow-lg, [data-theme="editorial"] .bg-white.shadow { border: 1px solid var(--ed-rule); }
[data-theme="editorial"] .border-gray-200 { border-color: var(--ed-rule) !important; }
[data-theme="editorial"] .bg-gradient-to-r, [data-theme="editorial"] .bg-gradient-to-br, [data-theme="editorial"] .bg-gradient-to-b { background-image: none !important; background-color: var(--ed-ink) !important; }

/* Buttons: solid ink or outlined ink, plain text labels. */
[data-theme="editorial"] a.bg-\[\#014F70\], [data-theme="editorial"] button.bg-\[\#014F70\],
[data-theme="editorial"] a.bg-blue-600, [data-theme="editorial"] button.bg-blue-600,
[data-theme="editorial"] button[type="submit"].bg-blue-600 { border: 1px solid var(--ed-ink); font-weight: 500; letter-spacing: .01em; }
[data-theme="editorial"] .bg-red-600 { background-color: #fff !important; color: var(--ed-ink) !important; border: 1px solid var(--ed-ink); }
[data-theme="editorial"] .hover\:bg-red-700:hover { background-color: var(--ed-ink) !important; color: #fff !important; }
[data-theme="editorial"] .text-red-600 { color: var(--ed-muted) !important; }

/* Top bar and page banners: a hairline rule instead of a shadow. */
[data-theme="editorial"] .fixed.bg-white.shadow-md, [data-theme="editorial"] .sticky.bg-white.shadow-md { border-bottom: 1px solid var(--ed-rule); }

/* Cluster cards were round tiles; make them rectangular panels. */
[data-theme="editorial"] .cluster-card { border-radius: 2px !important; width: 100% !important; height: auto !important; min-height: 10rem; border: 1px solid var(--ed-rule); }
[data-theme="editorial"] .cluster-card:hover { border-color: var(--ed-ink); }

/* Sidebar island: selected state by weight and a left rule, not a colour block. */
[data-theme="editorial"] .sb-item--active { background: transparent !important; box-shadow: inset 3px 0 0 var(--ed-ink); font-weight: 600; }
[data-theme="editorial"] .sb-item--active .sb-item__icon, [data-theme="editorial"] .sb-item--active .sb-item__label { color: var(--ed-ink) !important; }

/* Dashboard island (not shown on sector networks, but keep it consistent if reached). */
[data-theme="editorial"] [class*="db-"][style*="gradient"], [data-theme="editorial"] .db-hero { background: var(--ed-ink) !important; }

/* Footer and locked-page card. */
[data-theme="editorial"] footer { border-top: 1px solid var(--ed-rule); color: var(--ed-muted); }
[data-theme="editorial"] footer a { color: var(--ed-ink) !important; }
[data-theme="editorial"] .text-amber-500, [data-theme="editorial"] .text-amber-800 { color: var(--ed-ink) !important; }
[data-theme="editorial"] .bg-amber-100 { background-color: var(--ed-wash) !important; }
[data-theme="editorial"] .bg-gray-800 { background-color: var(--ed-wash) !important; }
[data-theme="editorial"] .sb-item--active::before { background: var(--ed-ink) !important; }

/* Locked / about page: its card is styled inline (the Tailwind build purged its classes),
   so the override has to be by attribute. Ink card, outlined buttons, no glow. */
[data-theme="editorial"] [style*="linear-gradient(135deg,#0f172a,#334155)"] {
  background: var(--ed-ink) !important; border-radius: 2px !important; box-shadow: none !important;
}
[data-theme="editorial"] [style*="background:rgba(251,191,36,.2)"] { background: rgba(255,255,255,.12) !important; }
[data-theme="editorial"] [style*="color:#fcd34d"] { color: #fff !important; }
[data-theme="editorial"] button[style*="background:#fcd34d"] { background: #fff !important; color: var(--ed-ink) !important; border-radius: 2px !important; }
[data-theme="editorial"] a[style*="background:#fff"][style*="color:#0f172a"] { border-radius: 2px !important; border: 1px solid #fff; background: transparent !important; color: #fff !important; }

/* Opportunity island (Funding & Opportunities). It has its own palette and heavy
   weights; bring it onto the editorial scale: ink accents, readable body copy,
   medium headings, square corners, monochrome pills. */
[data-theme="editorial"] .op-island {
  --op-fg: #111111; --op-muted: #3f3f3f; --op-faint: #6b6b6b; --op-border: #d9d9d9;
  --op-track: #f2f2f2; --op-bg-muted: #f7f7f7; --op-navy: #111111; --op-navy-deep: #2b2b2b;
  --op-red: #111111; --op-amber: #111111; --op-green: #111111;
}
[data-theme="editorial"] .op-island [class*="__title"] { font-weight: 600 !important; letter-spacing: -0.01em; }
[data-theme="editorial"] .op-island [class*="op-"][style*="font-weight"],
[data-theme="editorial"] .op-island .op-byline__name,
[data-theme="editorial"] .op-island .op-field__label,
[data-theme="editorial"] .op-island .op-toggle__title { font-weight: 600 !important; }
[data-theme="editorial"] .op-island .op-intro, [data-theme="editorial"] .op-island [class*="op-card"],
[data-theme="editorial"] .op-island [class*="op-detail"], [data-theme="editorial"] .op-island input,
[data-theme="editorial"] .op-island select, [data-theme="editorial"] .op-island textarea,
[data-theme="editorial"] .op-island button, [data-theme="editorial"] .op-island [class*="op-"][class*="btn"] { border-radius: 2px !important; box-shadow: none !important; }
[data-theme="editorial"] .op-island [class*="pill"], [data-theme="editorial"] .op-island [class*="tag"],
[data-theme="editorial"] .op-island [class*="chip"], [data-theme="editorial"] .op-island [class*="badge"] {
  background: #fff !important; color: var(--op-fg) !important; border: 1px solid var(--op-border) !important;
  font-weight: 600 !important; border-radius: 2px !important;
}
[data-theme="editorial"] .op-island .op-tags__menu-on, [data-theme="editorial"] .op-island [aria-pressed="true"],
[data-theme="editorial"] .op-island [class*="--active"], [data-theme="editorial"] .op-island [class*="--on"] {
  background: var(--op-fg) !important; color: #fff !important; border-color: var(--op-fg) !important;
}
[data-theme="editorial"] .op-island p, [data-theme="editorial"] .op-island [class*="__text"],
[data-theme="editorial"] .op-island [class*="__desc"], [data-theme="editorial"] .op-island [class*="__excerpt"] { color: #2b2b2b !important; font-size: 0.95rem; line-height: 1.6; }
