/* ============================================================
 * editorial.css
 * Scoped editorial theme for marketing pages. Activates only
 * when <body class="editorial">. Matches the Q2 2025 investor
 * brief aesthetic: deep navy background, warm gold accents,
 * cream serif headlines, uppercase mono labels.
 * App pages (dashboard, auth) are unaffected.
 * ============================================================ */

body.editorial {
  /* palette */
  --navy-900: #0E1A2B;
  --navy-800: #132237;
  --navy-750: #182A42;
  --navy-700: #1E2E44;
  --navy-600: #2A3A55;
  --cream-50: #EEE7D7;
  --cream-100: #F2EDE5;
  --cream-200: #DED4BF;
  --gold-500: #D4A55C;
  --gold-600: #B88936;
  --rust-500: #A8443F;
  --gray-300: #C9C3B5;
  --gray-400: #A8A091;
  --gray-500: #6B7280;

  /* Redefine the style.css tokens so every existing app component
   * (dashboard panels, persona cards, score cards, summary boxes,
   * mode buttons, etc.) inherits the editorial palette automatically
   * through the rules already written against these variables. */
  --bg-primary: var(--navy-900);
  --bg-secondary: var(--navy-800);
  --bg-tertiary: var(--navy-750);
  --text-primary: var(--cream-100);
  --text-secondary: var(--gray-400);
  --accent: var(--gold-500);
  --accent-hover: var(--gold-600);
  --danger: var(--rust-500);
  --warning: var(--gold-500);
  --success: var(--gold-500);
  --border: var(--navy-700);
  --border-color: var(--navy-700);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  /* editorial-layer semantic tokens (not in style.css) */
  --bg: var(--navy-900);
  --bg-card: var(--navy-800);
  --bg-light: var(--cream-50);
  --rule: var(--navy-700);
  --text: var(--cream-100);
  --text-muted: var(--gray-400);
  --text-dim: var(--gray-500);
  --accent-deep: var(--gold-600);

  /* type */
  --font-serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* spacing rhythm */
  --max-content: 1240px;

  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

/* subtle 80px grid on the full page, like the brief hero */
body.editorial {
  background-image:
    linear-gradient(var(--navy-700) 1px, transparent 1px),
    linear-gradient(90deg, var(--navy-700) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: 0 0;
  background-attachment: fixed;
  background-color: var(--navy-900);
}

body.editorial .container {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 40px;
  background: transparent;
}

/* ---------- Navbar override ---------- */

body.editorial .navbar {
  background: transparent;
  border-bottom: 1px solid var(--rule);
  padding: 22px 40px;
  backdrop-filter: none;
  box-shadow: none;
}

body.editorial .navbar .nav-brand a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  text-decoration: none;
}

body.editorial .navbar .nav-brand a::after {
  content: "";
}

body.editorial .navbar .nav-links a {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 6px 0;
  border: none;
  transition: color 160ms ease;
}

body.editorial .navbar .nav-links a:hover,
body.editorial .navbar .nav-links a.active {
  color: var(--cream-100);
  background: transparent;
}

body.editorial .navbar .nav-links a.active {
  color: var(--gold-500);
}

body.editorial .nav-hamburger span {
  background: var(--cream-100);
}

body.editorial .nav-user {
  color: var(--gray-500);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ---------- Main layout container ---------- */

body.editorial main.container {
  max-width: var(--max-content);
  padding: 48px 40px 120px;
  margin: 0 auto;
  min-height: auto;
}

/* ---------- Section label (editorial eyebrow) ---------- */

body.editorial .ed-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

body.editorial .ed-eyebrow::before {
  content: attr(data-num);
  color: var(--gray-400);
}

body.editorial .ed-section-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream-200);
  margin-bottom: 28px;
}

/* ---------- Display headlines ---------- */

body.editorial h1,
body.editorial h2,
body.editorial h3 {
  font-family: var(--font-serif);
  color: var(--cream-100);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.04;
}

body.editorial .ed-display {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3.5rem, 8vw, 6.75rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--cream-100);
  margin: 0;
}

body.editorial .ed-display em,
body.editorial .ed-italic {
  font-style: italic;
  font-weight: 400;
}

body.editorial .ed-amp {
  color: var(--gold-500);
  font-style: italic;
  font-family: var(--font-serif);
  padding: 0 0.02em;
}

body.editorial h2.ed-h2 {
  font-size: clamp(2.25rem, 4vw, 3.75rem);
  line-height: 1.05;
  margin: 0 0 24px;
  max-width: 920px;
}

body.editorial h3.ed-h3 {
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--cream-100);
  margin: 0 0 10px;
}

body.editorial .ed-lede {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3125rem;
  line-height: 1.45;
  color: var(--cream-200);
  max-width: 680px;
  margin: 0 0 40px;
  font-weight: 400;
}

body.editorial p {
  color: var(--gray-300);
  line-height: 1.65;
}

/* ---------- Hero ---------- */

body.editorial .ed-hero {
  padding: 80px 0 120px;
  position: relative;
}

body.editorial .ed-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

body.editorial .ed-hero-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  line-height: 1.8;
}

body.editorial .ed-hero-meta span + span::before {
  content: "·";
  color: var(--gray-500);
  margin: 0 12px;
}

body.editorial .ed-quote-pull {
  border-left: 2px solid var(--gold-500);
  padding: 4px 0 4px 20px;
  max-width: 340px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--cream-200);
}

body.editorial .ed-quote-pull cite {
  display: block;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

body.editorial .ed-hero-title {
  max-width: 900px;
}

body.editorial .ed-hero-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1.45;
  color: var(--cream-200);
  max-width: 680px;
  margin: 40px 0 56px;
  font-weight: 400;
}

body.editorial .ed-hero-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
  flex-wrap: wrap;
}

body.editorial .ed-hero-flow-steps {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

body.editorial .ed-hero-flow .ed-arrow {
  color: var(--gold-500);
  font-weight: 400;
}

/* ---------- Buttons ---------- */

body.editorial .ed-btn,
body.editorial .btn-primary,
body.editorial .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 180ms ease;
  cursor: pointer;
}

body.editorial .ed-btn-primary,
body.editorial .btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}

body.editorial .ed-btn-primary:hover,
body.editorial .btn-primary:hover {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: var(--navy-900);
}

body.editorial .ed-btn-secondary,
body.editorial .btn-secondary {
  background: transparent;
  color: var(--cream-100);
  border-color: var(--rule);
}

body.editorial .ed-btn-secondary:hover,
body.editorial .btn-secondary:hover {
  border-color: var(--gold-500);
  color: var(--gold-500);
  background: transparent;
}

body.editorial .ed-btn .ed-arrow {
  transition: transform 180ms ease;
}

body.editorial .ed-btn:hover .ed-arrow {
  transform: translateX(3px);
}

body.editorial .ed-cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Section container ---------- */

body.editorial .ed-section {
  padding: 96px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}

body.editorial .ed-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 56px;
  flex-wrap: wrap;
  gap: 16px;
}

body.editorial .ed-section-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-500);
}

body.editorial .ed-kicker {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 20px;
  display: block;
}

/* ---------- Problem/contrast section (page 2 of brief) ---------- */

body.editorial .ed-contrast {
  background: var(--cream-50);
  color: var(--navy-900);
  padding: 96px 0;
  margin: 0 calc(-1 * max(40px, (100vw - var(--max-content)) / 2));
  padding-left: max(40px, (100vw - var(--max-content)) / 2);
  padding-right: max(40px, (100vw - var(--max-content)) / 2);
  background-image: none;
}

body.editorial .ed-contrast .ed-eyebrow {
  color: var(--gold-600);
}

body.editorial .ed-contrast .ed-eyebrow::before {
  color: var(--navy-600);
}

body.editorial .ed-contrast h2,
body.editorial .ed-contrast .ed-h2 {
  color: var(--navy-900);
}

body.editorial .ed-contrast .ed-amp,
body.editorial .ed-contrast em {
  color: var(--gold-600);
}

body.editorial .ed-contrast p {
  color: var(--navy-700);
}

body.editorial .ed-contrast .ed-section-meta {
  color: var(--navy-600);
}

/* "You say / they hear" card row */

body.editorial .ed-youhear-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0;
  border-top: 1px solid var(--cream-200);
  margin-bottom: 48px;
}

body.editorial .ed-youhear-cell {
  padding: 32px 28px;
  border-right: 1px solid var(--cream-200);
  border-bottom: 1px solid var(--cream-200);
}

body.editorial .ed-youhear-cell:last-child {
  border-right: none;
}

body.editorial .ed-youhear-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin-bottom: 14px;
  display: block;
}

body.editorial .ed-youhear-say {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  color: var(--navy-900);
  font-weight: 400;
  line-height: 1.3;
  margin: 0 0 20px;
}

body.editorial .ed-youhear-hear {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-600);
  margin: 20px 0 10px;
}

body.editorial .ed-youhear-arrow {
  color: var(--rust-500);
  margin-right: 6px;
}

body.editorial .ed-youhear-reaction {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--rust-500);
  line-height: 1.4;
  margin: 0;
}

/* Stats on contrast section */

body.editorial .ed-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  border-top: 1px solid var(--cream-200);
  padding-top: 40px;
}

body.editorial .ed-stat {
  padding: 0 28px 0 0;
  border-right: 1px solid var(--cream-200);
}

body.editorial .ed-stat:last-child {
  border-right: none;
}

body.editorial .ed-stat-num {
  font-family: var(--font-serif);
  font-size: 4.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--gold-600);
  display: block;
  margin-bottom: 12px;
}

body.editorial .ed-stat-num .ed-stat-unit {
  font-size: 2rem;
  color: var(--gold-600);
  vertical-align: baseline;
}

body.editorial .ed-stat-label {
  font-size: 0.9375rem;
  color: var(--navy-700);
  line-height: 1.4;
  margin: 0 0 8px;
}

body.editorial .ed-stat-source {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-600);
}

body.editorial .ed-contrast-footer {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--navy-700);
  line-height: 1.55;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--cream-200);
  max-width: 880px;
}

/* ---------- Generic dark cards for solution/modes sections ---------- */

body.editorial .ed-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

body.editorial .ed-card {
  background: var(--navy-800);
  padding: 36px 32px;
  position: relative;
}

body.editorial .ed-card.featured {
  background: var(--navy-750);
}

body.editorial .ed-card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

body.editorial .ed-card-new-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--gold-500);
  color: var(--navy-900);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

body.editorial .ed-card p {
  color: var(--gray-300);
  font-size: 0.9375rem;
  line-height: 1.55;
  margin: 0 0 20px;
}

body.editorial .ed-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

body.editorial .ed-tag {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--rule);
  color: var(--gray-400);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}

/* ---------- Numbered editorial list ---------- */

body.editorial .ed-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--rule);
}

body.editorial .ed-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

body.editorial .ed-step-num {
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--gold-500);
  line-height: 1;
  font-weight: 400;
}

body.editorial .ed-step-body h3 {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--cream-100);
  margin: 0 0 8px;
  letter-spacing: 0.005em;
}

body.editorial .ed-step-body p {
  font-size: 0.9375rem;
  color: var(--gray-300);
  line-height: 1.55;
  margin: 0;
  max-width: 640px;
}

/* ---------- Sample output callout ---------- */

body.editorial .ed-sample {
  background: var(--navy-800);
  border: 1px solid var(--rule);
  padding: 32px;
  margin-top: 32px;
}

body.editorial .ed-sample-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 16px;
  display: block;
}

body.editorial .ed-sample-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.125rem;
  color: var(--cream-200);
  line-height: 1.5;
  margin: 0 0 20px;
}

body.editorial .ed-score-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.editorial .ed-score-chip {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  background: var(--navy-900);
  color: var(--cream-100);
  letter-spacing: 0.05em;
}

body.editorial .ed-score-chip strong {
  color: var(--gold-500);
  font-weight: 500;
  margin-left: 6px;
}

/* ---------- Pricing tier cards ---------- */

body.editorial .ed-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

body.editorial .ed-tier {
  background: var(--navy-800);
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
}

body.editorial .ed-tier.featured {
  background: var(--navy-750);
  position: relative;
}

body.editorial .ed-tier.featured::before {
  content: "POPULAR";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: var(--gold-500);
  color: var(--navy-900);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  padding: 6px 0;
  text-align: center;
}

body.editorial .ed-tier-name {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 20px;
}

body.editorial .ed-tier-price {
  font-family: var(--font-serif);
  font-size: 4rem;
  font-weight: 400;
  line-height: 1;
  color: var(--cream-100);
  margin: 0 0 4px;
}

body.editorial .ed-tier-period {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 28px;
}

body.editorial .ed-tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  flex: 1;
}

body.editorial .ed-tier-features li {
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--gray-300);
  line-height: 1.4;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

body.editorial .ed-tier-features li::before {
  content: "—";
  color: var(--gold-500);
  flex-shrink: 0;
}

body.editorial .ed-tier-features li:last-child {
  border-bottom: none;
}

body.editorial .ed-tier .ed-btn {
  width: 100%;
  justify-content: center;
}

/* ---------- Manifesto / long-form prose ---------- */

body.editorial .ed-prose {
  max-width: 720px;
  margin: 0 auto;
}

body.editorial .ed-prose p {
  font-size: 1.1875rem;
  line-height: 1.7;
  color: var(--cream-200);
  margin: 0 0 1.5em;
}

body.editorial .ed-prose p.ed-lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--cream-100);
  margin: 0 0 2em;
}

body.editorial .ed-prose h2 {
  font-size: 2rem;
  margin: 2em 0 0.5em;
  max-width: 640px;
}

body.editorial .ed-prose h3 {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 2.5em 0 0.75em;
}

body.editorial .ed-prose blockquote {
  border-left: 2px solid var(--gold-500);
  padding: 4px 0 4px 24px;
  margin: 2em 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--cream-100);
}

body.editorial .ed-prose a {
  color: var(--gold-500);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-600);
  transition: color 160ms ease;
}

body.editorial .ed-prose a:hover {
  color: var(--cream-100);
  border-bottom-color: var(--cream-100);
}

/* ---------- Footer override ---------- */

body.editorial .site-footer {
  background: var(--navy-900);
  border-top: 1px solid var(--rule);
  padding: 48px 0 32px;
  margin-top: 0;
  background-image: none;
}

body.editorial .site-footer .footer-inner {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 0 40px;
}

body.editorial .site-footer .footer-logo {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-500);
}

body.editorial .site-footer .footer-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--cream-200);
  margin: 12px 0 24px;
}

body.editorial .site-footer .footer-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  text-decoration: none;
  transition: color 160ms ease;
}

body.editorial .site-footer .footer-links a:hover {
  color: var(--gold-500);
}

body.editorial .site-footer .footer-divider {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--gray-500);
  border-radius: 50%;
  vertical-align: middle;
  margin: 0 10px;
}

body.editorial .site-footer .footer-copyright {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-top: 24px;
}

/* ---------- Modal (enterprise contact form on pricing) ---------- */

body.editorial .ed-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 43, 0.82);
  backdrop-filter: blur(2px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.editorial .ed-modal.active {
  display: flex;
}

body.editorial .ed-modal-content {
  background: var(--navy-800);
  border: 1px solid var(--rule);
  max-width: 640px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 40px;
  position: relative;
  color: var(--cream-100);
}

body.editorial .ed-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--gray-400);
  width: 32px;
  height: 32px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: all 160ms ease;
}

body.editorial .ed-modal-close:hover {
  border-color: var(--gold-500);
  color: var(--gold-500);
}

/* Form controls inside editorial modals */

body.editorial .ed-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

body.editorial .ed-form .form-group {
  margin-bottom: 16px;
}

body.editorial .ed-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 6px;
}

body.editorial .ed-form input[type="text"],
body.editorial .ed-form input[type="email"],
body.editorial .ed-form select,
body.editorial .ed-form textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--navy-900);
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--cream-100);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color 160ms ease;
}

body.editorial .ed-form input:focus,
body.editorial .ed-form select:focus,
body.editorial .ed-form textarea:focus {
  border-color: var(--gold-500);
  outline: none;
}

body.editorial .ed-form textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-sans);
}

body.editorial .ed-form .form-actions {
  margin-top: 24px;
}

@media (max-width: 640px) {
  body.editorial .ed-form .form-row {
    grid-template-columns: 1fr;
  }
  body.editorial .ed-modal-content {
    padding: 28px 20px;
  }
}

/* ---------- Alert overrides so flash messages look consistent ---------- */

body.editorial .alert {
  background: var(--navy-800);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold-500);
  color: var(--cream-100);
  font-family: var(--font-sans);
  padding: 14px 20px;
  border-radius: 0;
  margin: 24px 0;
}

body.editorial .alert-error,
body.editorial .alert-danger {
  border-left-color: var(--rust-500);
}

body.editorial .alert-success {
  border-left-color: var(--gold-500);
}

/* ============================================================
 * GLOBAL APP OVERRIDES
 * ------------------------------------------------------------
 * Re-tones every common app component to the editorial palette
 * so dashboard / personas / history / settings / auth / admin
 * render on dark navy without touching their template HTML.
 * Targeted at high specificity (body.editorial .foo) so it
 * wins against style.css.
 * ============================================================ */

/* ---------- Headings inside app pages ---------- */

body.editorial main.container h1,
body.editorial main.container h2,
body.editorial main.container h3,
body.editorial main.container h4 {
  color: var(--cream-100);
  font-family: var(--font-serif);
  font-weight: 400;
}

body.editorial main.container h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

body.editorial main.container h2 {
  font-size: 1.875rem;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}

body.editorial main.container h3 {
  font-size: 1.25rem;
  letter-spacing: -0.005em;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--cream-100);
}

body.editorial main.container h4 {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--cream-100);
}

body.editorial main.container .subtitle,
body.editorial main.container .auth-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--cream-200);
  font-size: 1.125rem;
  font-weight: 400;
}

body.editorial main.container p {
  color: var(--gray-300);
  line-height: 1.6;
}

body.editorial main.container .muted,
body.editorial main.container .form-hint,
body.editorial main.container small {
  color: var(--gray-400);
}

body.editorial main.container a:not(.btn):not(.ed-btn) {
  color: var(--gold-500);
  text-decoration: none;
}

body.editorial main.container a:not(.btn):not(.ed-btn):hover {
  color: var(--cream-100);
}

/* ---------- Buttons ---------- */

body.editorial .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 160ms ease;
  cursor: pointer;
  background: transparent;
  color: var(--cream-100);
}

body.editorial .btn-primary {
  background: var(--gold-500);
  color: var(--navy-900);
  border-color: var(--gold-500);
}

body.editorial .btn-primary:hover:not(:disabled) {
  background: var(--gold-600);
  border-color: var(--gold-600);
  color: var(--navy-900);
}

body.editorial .btn-secondary {
  background: transparent;
  border-color: var(--rule);
  color: var(--cream-100);
}

body.editorial .btn-secondary:hover:not(:disabled) {
  border-color: var(--gold-500);
  color: var(--gold-500);
}

body.editorial .btn-danger {
  background: transparent;
  border-color: var(--rust-500);
  color: var(--rust-500);
}

body.editorial .btn-danger:hover:not(:disabled) {
  background: var(--rust-500);
  color: var(--cream-100);
}

body.editorial .btn-large {
  padding: 14px 28px;
  font-size: 0.75rem;
}

body.editorial .btn-small {
  padding: 8px 14px;
  font-size: 0.65rem;
}

body.editorial .btn-block {
  width: 100%;
}

body.editorial .btn:disabled,
body.editorial .btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

body.editorial .btn-with-icon svg {
  width: 14px;
  height: 14px;
}

/* ---------- Forms (global, not just inside .ed-form) ---------- */

body.editorial main.container input[type="text"],
body.editorial main.container input[type="email"],
body.editorial main.container input[type="password"],
body.editorial main.container input[type="number"],
body.editorial main.container input[type="search"],
body.editorial main.container input[type="url"],
body.editorial main.container input[type="tel"],
body.editorial main.container select,
body.editorial main.container textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--navy-900);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--cream-100);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  transition: border-color 160ms ease;
}

body.editorial main.container input::placeholder,
body.editorial main.container textarea::placeholder {
  color: var(--gray-500);
}

body.editorial main.container input:focus,
body.editorial main.container select:focus,
body.editorial main.container textarea:focus {
  border-color: var(--gold-500);
  outline: none;
}

body.editorial main.container textarea {
  resize: vertical;
  min-height: 100px;
}

body.editorial main.container label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 6px;
  font-weight: 500;
}

body.editorial main.container .form-group {
  margin-bottom: 18px;
}

body.editorial main.container .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  body.editorial main.container .form-row {
    grid-template-columns: 1fr;
  }
}

body.editorial main.container input[type="checkbox"],
body.editorial main.container input[type="radio"] {
  width: auto;
  accent-color: var(--gold-500);
}

body.editorial main.container input[type="range"] {
  accent-color: var(--gold-500);
  background: var(--navy-700);
}

/* ---------- Cards (generic) ---------- */

body.editorial main.container .card,
body.editorial main.container .persona-card,
body.editorial main.container .auth-card,
body.editorial main.container .settings-section,
body.editorial main.container .feature-card,
body.editorial main.container .empty-state,
body.editorial main.container .quick-link-card,
body.editorial main.container .stat-card,
body.editorial main.container .health-stat,
body.editorial main.container .team-info-box,
body.editorial main.container .scenario-card,
body.editorial main.container .template-card,
body.editorial main.container .scores-section,
body.editorial main.container .reaction-phase,
body.editorial main.container .rec-phase,
body.editorial main.container .history-card,
body.editorial main.container .history-row {
  background: var(--navy-800);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--cream-100);
  box-shadow: none;
}

body.editorial main.container .settings-section {
  padding: 28px;
  margin-bottom: 24px;
}

body.editorial main.container .settings-section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 12px;
}

/* ---------- Auth pages container ---------- */

body.editorial main.container .auth-container {
  max-width: 460px;
  margin: 60px auto;
  padding: 0;
}

body.editorial main.container .auth-card {
  padding: 40px 32px;
}

body.editorial main.container .auth-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

body.editorial main.container .auth-form .form-group {
  margin-bottom: 20px;
}

/* ---------- Auth dividers + Google button + forgot link ---------- */

body.editorial main.container .auth-divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
  color: var(--gray-400);
}

body.editorial main.container .auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--rule);
}

body.editorial main.container .auth-divider span {
  position: relative;
  background: var(--navy-800);
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  border: none;
}

body.editorial main.container .btn-google {
  background: var(--cream-100);
  color: var(--navy-900);
  border: 1px solid var(--cream-100);
}

body.editorial main.container .btn-google:hover {
  background: var(--cream-50);
  border-color: var(--cream-50);
  color: var(--navy-900);
}

body.editorial main.container .forgot-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
}

body.editorial main.container .forgot-link:hover {
  color: var(--gold-500);
}

body.editorial main.container .form-options {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

/* ---------- Tabs (used on dashboard, personas) ---------- */

body.editorial main.container .tab-btn,
body.editorial main.container .view-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray-400);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 160ms ease;
}

body.editorial main.container .tab-btn.active,
body.editorial main.container .view-tab.active {
  color: var(--gold-500);
  border-bottom-color: var(--gold-500);
}

body.editorial main.container .tab-btn:hover,
body.editorial main.container .view-tab:hover {
  color: var(--cream-100);
}

body.editorial main.container .tabs,
body.editorial main.container .view-tabs {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 24px;
}

body.editorial main.container .tab-content {
  background: transparent;
  padding-top: 24px;
}

/* ---------- Inline / compact selects (admin user table) ---------- */

body.editorial main.container .inline-plan-select,
body.editorial main.container .plan-select,
body.editorial main.container .filter-select,
body.editorial main.container select.compact-select {
  padding: 5px 24px 5px 8px;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
  min-width: 0;
  width: auto;
  background: var(--navy-900);
  color: var(--cream-100);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

body.editorial main.container .users-table .col-plan {
  width: 130px;
  text-align: left;
}

body.editorial main.container .inline-plan-select.plan-free { color: var(--gray-400); }
body.editorial main.container .inline-plan-select.plan-pro { color: var(--gold-500); }
body.editorial main.container .inline-plan-select.plan-team { color: var(--gold-500); }
body.editorial main.container .inline-plan-select.plan-enterprise { color: var(--gold-500); }

/* ---------- History trend chart (interactive + responsive) ---------- */

body.editorial main.container .trend-section {
  margin: 24px 0 32px;
}

body.editorial main.container .trend-hint {
  color: var(--gray-400);
  font-size: 0.8125rem;
  margin: 0 0 12px;
}

body.editorial main.container .trend-chart-wrap {
  position: relative;
  background: var(--navy-800);
  border: 1px solid var(--rule);
  padding: 16px;
  width: 100%;
  overflow: hidden;
}

body.editorial main.container #trend-chart {
  display: block;
  width: 100%;
  cursor: crosshair;
  touch-action: none;
}

body.editorial main.container .trend-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--navy-900);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--gold-500);
  padding: 10px 12px;
  min-width: 140px;
  font-size: 0.8125rem;
  color: var(--cream-100);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  z-index: 10;
}

body.editorial main.container .trend-tooltip[hidden] {
  display: none;
}

body.editorial main.container .trend-tt-date {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 6px;
}

body.editorial main.container .trend-tt-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
}

body.editorial main.container .trend-tt-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

body.editorial main.container .trend-tt-label {
  flex: 1;
  color: var(--cream-200);
}

body.editorial main.container .trend-tt-val {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--gold-500);
}

body.editorial main.container .trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 14px;
}

body.editorial main.container .trend-legend-item {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--cream-100);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  padding: 6px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 0;
  transition: all 140ms ease;
  text-transform: none;
  letter-spacing: 0;
}

body.editorial main.container .trend-legend-item:hover {
  border-color: var(--gold-500);
}

body.editorial main.container .trend-legend-item.is-off {
  opacity: 0.4;
  text-decoration: line-through;
}

body.editorial main.container .trend-legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

@media (max-width: 520px) {
  body.editorial main.container .trend-chart-wrap {
    padding: 10px;
  }
  body.editorial main.container .trend-tooltip {
    font-size: 0.75rem;
    padding: 8px 10px;
    min-width: 120px;
  }
  body.editorial main.container .trend-legend-item {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

/* ---------- In-progress async simulations (history page) ---------- */

body.editorial main.container .in-progress-section {
  margin: 24px 0 32px;
  padding: 24px 28px;
  background: var(--navy-800);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold-500);
}

body.editorial main.container .in-progress-section h2 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 6px;
  border: none;
  padding: 0;
}

body.editorial main.container .in-progress-subtitle {
  color: var(--gray-400);
  font-size: 0.875rem;
  margin: 0 0 18px;
}

body.editorial main.container .in-progress-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.editorial main.container .in-progress-card {
  background: var(--navy-900);
  border: 1px solid var(--rule);
  padding: 14px 16px;
}

body.editorial main.container .in-progress-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

body.editorial main.container .in-progress-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border: 1px solid var(--gold-500);
  color: var(--gold-500);
}

body.editorial main.container .in-progress-status.status-running {
  border-color: var(--gold-500);
  color: var(--gold-500);
  animation: ed-pulse 1.6s ease-in-out infinite;
}

body.editorial main.container .in-progress-status.status-queued {
  border-color: var(--gray-400);
  color: var(--gray-400);
}

@keyframes ed-pulse {
  0%, 100% { opacity: 0.65; }
  50% { opacity: 1; }
}

body.editorial main.container .in-progress-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gray-400);
  margin-left: auto;
}

body.editorial main.container .in-progress-snippet {
  color: var(--cream-100);
  font-size: 0.9375rem;
  margin: 4px 0 12px;
  font-family: var(--font-serif);
  font-style: italic;
}

body.editorial main.container .in-progress-actions {
  display: flex;
  gap: 8px;
}

/* ---------- Dashboard cancel button ---------- */

body.editorial main.container #cancel-simulation-btn {
  margin-top: 8px;
}

/* ---------- RAG Sources block (under simulation report) ---------- */

body.editorial main.container .sources-section {
  margin: 32px 0 24px;
  padding: 24px 28px;
  background: var(--navy-800);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold-500);
}

body.editorial main.container .sources-section h3 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 6px;
}

body.editorial main.container .sources-section .sources-count {
  color: var(--gray-400);
  font-weight: 400;
  margin-left: 6px;
}

body.editorial main.container .sources-intro {
  color: var(--gray-400);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0 0 18px;
  max-width: 720px;
}

body.editorial main.container .sources-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.editorial main.container .source-card {
  background: var(--navy-900);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 14px 16px;
}

body.editorial main.container .source-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

body.editorial main.container .source-cite {
  font-family: var(--font-mono);
  color: var(--gold-500);
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0;
}

body.editorial main.container .source-meta {
  color: var(--cream-100);
  font-size: 0.9375rem;
  flex: 1;
  line-height: 1.35;
}

body.editorial main.container .source-meta strong {
  color: var(--cream-100);
  font-weight: 600;
}

body.editorial main.container .source-section {
  color: var(--gray-400);
  font-style: italic;
}

body.editorial main.container .source-sim {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--gray-400);
  flex-shrink: 0;
}

body.editorial main.container .source-snippet {
  color: var(--gray-300);
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 6px 0 0;
  font-family: var(--font-serif);
  font-style: italic;
}

/* ---------- Tables ---------- */

body.editorial main.container table {
  width: 100%;
  border-collapse: collapse;
  background: var(--navy-800);
  border: 1px solid var(--rule);
}

body.editorial main.container table th,
body.editorial main.container table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  color: var(--cream-100);
  font-size: 0.9375rem;
}

body.editorial main.container table th {
  background: var(--navy-750);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
  font-weight: 500;
  text-align: left;
}

body.editorial main.container table tr:hover td {
  background: var(--navy-750);
}

/* ---------- Modals (generic, used by personas etc) ---------- */

body.editorial main.container .modal-overlay,
body.editorial .modal-overlay {
  background: rgba(14, 26, 43, 0.82);
  backdrop-filter: blur(2px);
}

body.editorial .modal-content {
  background: var(--navy-800);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--cream-100);
  padding: 32px;
}

body.editorial .modal-close {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--gray-400);
}

body.editorial .modal-close:hover {
  border-color: var(--gold-500);
  color: var(--gold-500);
}

/* ---------- Notification banner ---------- */

body.editorial .notification-banner {
  background: var(--navy-800);
  border-bottom: 1px solid var(--gold-500);
  color: var(--cream-100);
  padding: 12px 40px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
}

body.editorial .notification-banner a {
  color: var(--gold-500);
  margin-left: 12px;
  font-weight: 500;
  text-decoration: underline;
}

body.editorial .notification-banner .dismiss-btn {
  background: transparent;
  border: none;
  color: var(--gray-400);
  cursor: pointer;
  font-size: 1.25rem;
}

/* ---------- Cookie banner ---------- */

body.editorial .cookie-banner {
  background: var(--navy-800);
  border-top: 1px solid var(--rule);
  color: var(--cream-100);
}

body.editorial .cookie-content,
body.editorial .cookie-customize-panel {
  background: transparent;
  color: var(--cream-100);
}

body.editorial .cookie-text strong {
  color: var(--gold-500);
}

body.editorial .cookie-text p {
  color: var(--gray-300);
}

/* ---------- Badges, chips, risk indicators ---------- */

body.editorial .badge,
body.editorial .risk-badge,
body.editorial .iterate-risk-badge,
body.editorial .quadrant-label,
body.editorial .plan-badge,
body.editorial .mode-badge,
body.editorial .feature-badge,
body.editorial .iterate-badge {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 0;
  background: var(--navy-750);
  border: 1px solid var(--rule);
  color: var(--cream-100);
}

body.editorial .risk-success,
body.editorial .badge-success,
body.editorial .text-success {
  color: var(--gold-500);
  border-color: var(--gold-500);
}

body.editorial .risk-warning,
body.editorial .badge-warning,
body.editorial .text-warning {
  color: var(--gold-500);
  border-color: var(--gold-600);
}

body.editorial .risk-danger,
body.editorial .badge-danger,
body.editorial .text-danger {
  color: var(--rust-500);
  border-color: var(--rust-500);
}

/* ---------- Score / metric blocks ---------- */

body.editorial .stat-value,
body.editorial .stat-val,
body.editorial .proof-number,
body.editorial .price,
body.editorial .plan-price {
  font-family: var(--font-serif);
  color: var(--gold-500);
  font-weight: 400;
}

body.editorial .stat-label,
body.editorial .stat-lbl,
body.editorial .proof-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

/* ---------- Usage bar ---------- */

body.editorial .usage-bar-container {
  background: var(--navy-700);
  border: 1px solid var(--rule);
  border-radius: 2px;
  height: 8px;
}

body.editorial .usage-bar {
  background: var(--gold-500);
  height: 100%;
}

body.editorial .usage-text {
  color: var(--cream-200);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
}

/* ---------- Empty states ---------- */

body.editorial .empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}

body.editorial .empty-state h3 {
  color: var(--cream-100);
  font-family: var(--font-serif);
  margin-bottom: 8px;
}

/* ---------- Specific: corpus consent block (already rendered light by inline style) ---------- */

body.editorial .corpus-consent-block {
  background: var(--navy-900) !important;
  border: 1px solid var(--rule);
  color: var(--cream-100);
}

body.editorial .corpus-consent-block strong {
  color: var(--cream-100);
}

/* ---------- Settings danger zone ---------- */

body.editorial .danger-section {
  border: 1px solid var(--rust-500);
  background: var(--navy-800);
}

body.editorial .danger-section h2 {
  color: var(--rust-500);
}

/* ---------- Range slider value display ---------- */

body.editorial .range-value {
  color: var(--gold-500);
  font-family: var(--font-mono);
  font-weight: 500;
}

/* ---------- Code, pre, kbd ---------- */

body.editorial main.container code,
body.editorial main.container pre,
body.editorial main.container kbd {
  font-family: var(--font-mono);
  background: var(--navy-900);
  color: var(--gold-500);
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-size: 0.875rem;
}

body.editorial main.container pre {
  padding: 16px;
  overflow-x: auto;
}

body.editorial main.container pre code {
  border: none;
  padding: 0;
  background: transparent;
}

/* ---------- HR ---------- */

body.editorial main.container hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 32px 0;
}

/* ---------- Scrollbar styling on dark ---------- */

body.editorial ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

body.editorial ::-webkit-scrollbar-track {
  background: var(--navy-900);
}

body.editorial ::-webkit-scrollbar-thumb {
  background: var(--navy-600);
  border-radius: 0;
}

body.editorial ::-webkit-scrollbar-thumb:hover {
  background: var(--gold-600);
}

/* ---------- Selection ---------- */

body.editorial ::selection {
  background: var(--gold-500);
  color: var(--navy-900);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  body.editorial main.container {
    padding: 24px 20px 80px;
  }
  body.editorial .container,
  body.editorial .navbar,
  body.editorial .site-footer .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
  body.editorial .ed-hero {
    padding: 48px 0 72px;
  }
  body.editorial .ed-section {
    padding: 72px 0;
  }
  body.editorial .ed-hero-header {
    flex-direction: column;
    margin-bottom: 40px;
  }
  body.editorial .ed-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  body.editorial .ed-step {
    grid-template-columns: 60px 1fr;
    gap: 20px;
  }
  body.editorial .ed-step-num {
    font-size: 2.25rem;
  }
  body.editorial .ed-stat {
    padding: 24px 0;
    border-right: none;
    border-bottom: 1px solid var(--cream-200);
  }
  body.editorial .ed-youhear-cell {
    border-right: none;
  }
}

/* ---------- Hide grid on narrow screens (too busy) ---------- */

@media (max-width: 640px) {
  body.editorial {
    background-image: none;
  }
}
