/* =====================================================================
   Center for Behavioral Decisions — BD Insights
   Design system: "Editorial Light" (BCG-inspired reskin)
   Brand: red #c80815 (THE accent) · amber #ffbf00 (rare: featured chip
   + eyebrow dot ONLY) · deep oxblood #2b0b0e (display headings + the
   one deep band per page).
   No brand gradients anywhere — solid colors only. The .bg-fx radial
   washes and the .skeleton shimmer are the deliberate exceptions
   (soft canvas blush / loading technique, not brand gradients).
   ===================================================================== */

/* ------------------------------ Tokens ------------------------------ */
:root {
  /* Brand */
  --red: #c80815;
  --red-press: #a30611;     /* hover darken + small-text red (≥7:1 on white) */
  --amber: #ffbf00;         /* budget: .featured chip + .eyebrow .dot only */
  --red-rgb: 200, 8, 21;
  --amber-rgb: 255, 191, 0;
  --deep: #2b0b0e;          /* oxblood — serif display headings, deep band */
  --deep-rgb: 43, 11, 14;

  /* Canvas */
  --bg-0: #faf8f5;          /* warm off-white page canvas */
  --bg-1: #ffffff;          /* card / surface white */
  --bg-2: #f3efe9;          /* tinted fills: code blocks, tabs, thumbs */

  /* Ink (warm near-blacks → grays) */
  --ink: #1d1518;           /* body text ~15.6:1 on bg-0 */
  --ink-soft: #4a4146;      /* secondary ~9.3:1 */
  --ink-faint: #5f5458;     /* tertiary ~6.9:1 */
  --ink-faintest: #7a6f72;  /* placeholders/hints ~4.6:1 */

  /* Surfaces & hairlines (legacy "glass" names kept — JS references them) */
  --glass: #ffffff;
  --glass-strong: #ffffff;
  --glass-hover: #faf5ef;
  --glass-border: #eae4de;
  --glass-border-strong: #d8d0c7;

  /* Geometry */
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows — very soft, warm */
  --shadow-sm: 0 1px 2px rgba(43, 11, 14, 0.04), 0 4px 14px rgba(43, 11, 14, 0.05);
  --shadow: 0 2px 6px rgba(43, 11, 14, 0.05), 0 16px 40px rgba(43, 11, 14, 0.09);

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ui: "Space Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1200px;
  --nav-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------ Reset ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
::selection { background: rgba(var(--red-rgb), 0.16); color: var(--ink); }

/* ----------------------- Canvas background -------------------------- */
/* Faint warm blush over the off-white canvas — the light-theme echo of
   the old glow field. Kept intentionally (brief: soften, don't delete). */
.bg-fx {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1100px 720px at 12% -10%, rgba(var(--red-rgb), 0.05), transparent 60%),
    radial-gradient(950px 650px at 100% 0%, rgba(var(--deep-rgb), 0.04), transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 55%);
}
.bg-fx::before,
.bg-fx::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.3;
  will-change: transform;
}
.bg-fx::before {
  width: 46vw; height: 46vw;
  top: -8vw; left: -6vw;
  background: radial-gradient(circle, rgba(var(--red-rgb), 0.12), transparent 70%);
  animation: drift1 22s ease-in-out infinite alternate;
}
.bg-fx::after {
  width: 38vw; height: 38vw;
  bottom: -10vw; right: -6vw;
  background: radial-gradient(circle, rgba(var(--deep-rgb), 0.08), transparent 70%);
  animation: drift2 26s ease-in-out infinite alternate;
}
@keyframes drift1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(8vw, 10vh, 0) scale(1.15); }
}
@keyframes drift2 {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-9vw, -8vh, 0) scale(0.9); }
}
/* Fine grain overlay for paper texture */
.bg-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------ Layout ----------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.section { padding-block: clamp(56px, 9vw, 120px); }
.center { text-align: center; }

/* ------------------------- Surfaces (.glass) ------------------------ */
/* The shared .glass recipe lives in the Cards section (with .card +
   .contributor-card): flat white, hairline border, soft shadow. */
.glass-strong {
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}

/* ------------------------------ Type ------------------------------- */
/* Serif display (Fraunces) for the big editorial headlines in deep
   oxblood; h3/h4 stay in the body sans for card/UI titles. */
h1, h2 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; color: var(--deep); }
h3, h4 { font-family: var(--font-body); font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; }
/* Solid brand red — the class name is the contract; the gradient is gone. */
.gradient-text { color: var(--red); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-press);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber); /* one of the two sanctioned amber uses */
}
.lead { color: var(--ink-soft); font-size: clamp(1.02rem, 1.6vw, 1.2rem); }

/* ------------------------------ Buttons ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
/* .btn-primary base color block (solid red) is shared with .filter.active
   in the Filters section. BCG-style uppercase label on primary CTAs only. */
.btn-primary {
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 14px 26px;
}
.btn-primary:hover {
  background: var(--red-press);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -10px rgba(var(--red-rgb), 0.45);
}
.btn-ghost {
  background: var(--bg-1);
  color: var(--ink);
  border-color: rgba(var(--deep-rgb), 0.22);
}
.btn-ghost:hover { border-color: rgba(var(--deep-rgb), 0.45); background: var(--bg-1); transform: translateY(-2px); }
.btn-sm { padding: 9px 16px; font-size: 0.86rem; }
.btn-primary.btn-sm { padding: 10px 18px; font-size: 0.76rem; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ------------------------------ Navbar ----------------------------- */
/* Floating glass pills — left (menu + logo), right (search + sign in). */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; pointer-events: none; }
.nav-pill {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 8px;
  height: 54px; padding: 0 14px; border-radius: 100px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 28px -14px rgba(43, 11, 14, 0.3);
}
.nav-pill-left { gap: 10px; padding-inline-start: 7px; }
.nav-pill-right { gap: 4px; padding: 0 6px 0 12px; }
.nav-brand { display: inline-flex; align-items: center; }
.nav-brand-icon { display: none; height: 30px; width: auto; }
.nav-search { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: none; border: none; color: var(--ink); cursor: pointer; border-radius: 50%; transition: color 0.2s, background 0.2s; }
.nav-search:hover { color: var(--red); background: rgba(var(--deep-rgb), 0.06); }
.nav-search svg { width: 20px; height: 20px; }
.nav-login { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600; color: var(--ink); height: 40px; padding: 0 14px; display: inline-flex; align-items: center; border: none; background: none; cursor: pointer; border-radius: 100px; transition: color 0.2s, background 0.2s; white-space: nowrap; }
.nav-login:hover { color: var(--red); background: rgba(var(--deep-rgb), 0.06); }
@media (max-width: 640px) {
  .nav-brand .nav-brand-full { display: none; }
  .nav-brand .nav-brand-icon { display: block; }
  .nav-pill { height: 50px; }
  .nav-login { padding: 0 10px; }
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-ui); font-weight: 600; }
.brand-logo { height: 30px; width: auto; display: block; }
.footer-logo { height: 34px; }
@media (max-width: 640px) { .brand-logo { height: 26px; } }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  padding: 9px 14px;
  border-radius: 100px;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-soft);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(var(--deep-rgb), 0.05); }
.nav-links a.active { color: var(--red-press); background: rgba(var(--red-rgb), 0.07); }
/* The Book-a-Call pill lives inside .nav-links — that selector outranks
   .btn-primary, so re-assert the solid red pill look here. */
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; background: var(--red-press); }
/* Hamburger (icon-only, always visible) — sits next to the logo. */
.nav-left { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; background: none; border: none; color: var(--ink); cursor: pointer; border-radius: 50%; transition: color 0.2s, background 0.2s; }
.nav-toggle:hover { color: var(--red); background: rgba(var(--deep-rgb), 0.06); }
.nav-burger { display: inline-flex; flex-direction: column; justify-content: center; gap: 5px; width: 26px; height: 18px; }
.nav-burger span { display: block; height: 2px; width: 100%; background: currentColor; border-radius: 2px; transition: background 0.2s; }

/* Full-screen mega-menu */
.navmenu { position: fixed; inset: 0; z-index: 500; background: var(--bg-0); display: flex; flex-direction: column; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.35s var(--ease), visibility 0.35s; }
.navmenu.open { opacity: 1; visibility: visible; pointer-events: auto; }
.navmenu-head { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); flex: none; }
.navmenu-close { width: 46px; height: 46px; display: grid; place-items: center; background: none; border: 1px solid var(--glass-border-strong); border-radius: 12px; color: var(--ink); cursor: pointer; transition: color 0.2s, border-color 0.2s, transform 0.3s var(--ease); }
.navmenu-close:hover { color: var(--red); border-color: rgba(var(--red-rgb), 0.45); transform: rotate(90deg); }
.navmenu-close svg { width: 22px; height: 22px; }
/* The three primary destinations — same font as the rest, just slightly
   larger and bold, side by side at the top. */
.navmenu-primary { flex: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: clamp(18px, 3vw, 34px); padding-block: clamp(12px, 2.5vh, 24px); border-bottom: 1px solid var(--glass-border); }
.navmenu-primary-link { font-weight: 700; font-size: 1.1rem; line-height: 1.2; color: var(--ink); opacity: 0; transform: translateY(10px); transition: color 0.2s var(--ease); }
.navmenu.open .navmenu-primary-link { opacity: 1; transform: none; transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.navmenu.open .navmenu-primary-link:nth-child(2) { transition-delay: 0.04s; }
.navmenu.open .navmenu-primary-link:nth-child(3) { transition-delay: 0.08s; }
.navmenu.open .navmenu-primary-link:nth-child(4) { transition-delay: 0.12s; }
.navmenu-primary-link:hover, .navmenu-primary-link.active { color: var(--red); }
.navmenu-body { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 44px; align-content: start; padding-block: clamp(20px, 5vh, 56px); overflow-y: auto; }
.navmenu-col { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; opacity: 0; transform: translateY(12px); }
.navmenu.open .navmenu-col { opacity: 1; transform: none; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }
.navmenu.open .navmenu-col:nth-child(2) { transition-delay: 0.05s; }
.navmenu.open .navmenu-col:nth-child(3) { transition-delay: 0.1s; }
.navmenu.open .navmenu-col:nth-child(4) { transition-delay: 0.15s; }
.navmenu-h { font-family: var(--font-ui); font-size: 0.76rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-faint); margin-bottom: 4px; }
.navmenu-h-link { transition: color 0.2s; }
.navmenu-h-link:hover, .navmenu-h-link.active { color: var(--red); }
.navmenu-link { font-size: 1.02rem; line-height: 1.3; color: var(--ink-soft); transition: color 0.2s, transform 0.25s var(--ease); }
.navmenu-link:hover { color: var(--red); transform: translateX(4px); }
.navmenu-link.active { color: var(--red); font-weight: 600; }
/* Featured primary links — a bold horizontal row across the top of the menu. */
.navmenu-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 34px; padding-bottom: clamp(16px, 3vh, 28px); margin-bottom: clamp(8px, 2vh, 18px); border-bottom: 1px solid var(--glass-border); }
.navmenu-top-link { font-size: 1.224rem; font-weight: 700; line-height: 1.2; color: var(--ink); transition: color 0.2s, transform 0.25s var(--ease); }
.navmenu-top-link:hover { color: var(--red); transform: translateY(-1px); }
.navmenu-top-link.active { color: var(--red); }
.navmenu-contact .btn { margin: 2px 0 6px; }

/* Search overlay (opened from the right pill) */
.search-overlay { position: fixed; inset: 0; z-index: 600; display: flex; justify-content: center; align-items: flex-start; padding: clamp(70px, 12vh, 140px) 20px 20px; background: rgba(29, 21, 24, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 0.25s var(--ease), visibility 0.25s; }
.search-overlay.open { opacity: 1; visibility: visible; pointer-events: auto; }
.search-panel { width: 100%; max-width: 600px; background: var(--bg-1); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transform: translateY(-10px); transition: transform 0.25s var(--ease); }
.search-overlay.open .search-panel { transform: none; }
.search-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--glass-border); }
.search-ico { color: var(--ink-faint); display: inline-flex; }
.search-ico svg { width: 20px; height: 20px; }
.search-input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-size: 1.05rem; color: var(--ink); font-family: var(--font-ui); }
.search-close { width: 34px; height: 34px; display: grid; place-items: center; border: none; background: none; color: var(--ink-faint); cursor: pointer; border-radius: 8px; flex: none; }
.search-close:hover { color: var(--red); background: rgba(0, 0, 0, 0.04); }
.search-close svg { width: 18px; height: 18px; }
.search-results { max-height: min(56vh, 460px); overflow-y: auto; padding: 8px; }
.search-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-radius: 10px; color: var(--ink); transition: background 0.15s, color 0.15s; }
.search-result:hover { background: rgba(var(--deep-rgb), 0.05); color: var(--red); }
.search-kind { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); flex: none; }
.search-empty { padding: 26px 14px; color: var(--ink-faint); text-align: center; }

/* Member account chip + dropdown */
.nav-account { display: inline-flex; }
.nav-acct-wrap { position: relative; }
.nav-acct { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--red); color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 0.95rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform 0.2s, background 0.2s; }
.nav-acct:hover { background: var(--red-press); transform: translateY(-1px); }
/* Signed-in member with a profile photo: fill the round pill with the image. */
.nav-acct.has-photo, .nav-acct.has-photo:hover { background: none; padding: 0; overflow: hidden; }
.nav-acct.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }

/* Profile-photo cropper (avatar-cropper.js) */
.cropper-ov { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(20, 12, 14, 0.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.cropper-modal { width: min(360px, 92vw); padding: 22px; border-radius: var(--radius-lg); text-align: center; }
.cropper-title { font-size: 1.1rem; }
.cropper-hint { font-size: 0.82rem; margin: 6px 0 16px; }
.cropper-stage { position: relative; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #efe9e1; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.cropper-stage:active { cursor: grabbing; }
.cropper-canvas { display: block; pointer-events: none; }
.cropper-ring { position: absolute; inset: 0; pointer-events: none; }
.cropper-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(20, 12, 14, 0.42); outline: 2px solid rgba(255, 255, 255, 0.85); outline-offset: -2px; }
.cropper-controls { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.cropper-controls input[type="range"] { flex: 1; accent-color: var(--red); cursor: pointer; }
.cropper-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--glass-border); background: var(--bg-1); color: var(--ink); font-size: 1.15rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 0.15s; }
.cropper-icon:hover { background: var(--bg-2); }
.cropper-actions { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.acct-menu { position: absolute; top: calc(100% + 12px); inset-inline-end: 0; min-width: 224px; background: var(--bg-1); border: 1px solid var(--glass-border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px; z-index: 120; }
.acct-menu[hidden] { display: none; }
.acct-head { padding: 8px 12px 10px; border-bottom: 1px solid var(--glass-border); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.acct-head strong { font-size: 0.95rem; color: var(--ink); }
.acct-head span { font-size: 0.8rem; color: var(--ink-faint); max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.acct-item { text-align: start; padding: 9px 12px; border-radius: 9px; border: none; background: none; color: var(--ink-soft); font-size: 0.92rem; font-family: var(--font-ui); cursor: pointer; transition: background 0.15s, color 0.15s; }
.acct-item:hover { background: rgba(var(--deep-rgb), 0.05); color: var(--ink); }
.acct-signout { color: var(--red-press); }

/* Language switcher (nav) */
.nav-lang-wrap { position: relative; }
.nav-lang { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; border: none; background: none; color: var(--ink); cursor: pointer; border-radius: 100px; font-family: var(--font-ui); font-weight: 600; font-size: 0.82rem; transition: color 0.2s, background 0.2s; }
.nav-lang:hover { color: var(--red); background: rgba(var(--deep-rgb), 0.06); }
.nav-lang svg { width: 18px; height: 18px; opacity: 0.85; }
.nav-lang-flag { font-size: 1.05rem; line-height: 1; }
.nav-lang-code { letter-spacing: 0.04em; }
.lang-menu { position: absolute; top: calc(100% + 12px); inset-inline-end: 0; min-width: 160px; background: var(--bg-1); border: 1px solid var(--glass-border); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; display: flex; flex-direction: column; gap: 2px; z-index: 120; }
.lang-menu[hidden] { display: none; }
.lang-item { display: flex; align-items: center; gap: 10px; text-align: start; padding: 9px 12px; border-radius: 9px; border: none; background: none; color: var(--ink-soft); font-size: 0.92rem; font-family: var(--font-ui); cursor: pointer; transition: background 0.15s, color 0.15s; }
.lang-flag { font-size: 1.05rem; line-height: 1; }
.lang-item:hover { background: rgba(var(--deep-rgb), 0.05); color: var(--ink); }
.lang-item.active { color: var(--red); font-weight: 600; }

/* Legal pages: "English is authoritative" banner (filled per-locale by the
   build; empty + hidden on the English originals). */
.legal-note { margin: 0 0 22px; padding: 12px 16px; border-inline-start: 3px solid var(--red); background: rgba(var(--deep-rgb), 0.04); border-radius: 8px; font-size: 0.9rem; color: var(--ink-soft); }
.legal-note:empty { display: none; }

/* Dictionary "available in English only" notice (shown to non-English visitors) */
.dict-lang-note { display: inline-block; margin-top: 16px; padding: 8px 15px; border-radius: 100px; background: rgba(var(--deep-rgb), 0.05); border: 1px solid var(--glass-border); font-size: 0.85rem; color: var(--ink-soft); }

/* Save (bookmark) button on insights */
.save-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 100px; border: 1px solid var(--glass-border-strong); background: var(--bg-1); color: var(--ink-soft); font-family: var(--font-ui); font-size: 0.86rem; font-weight: 600; cursor: pointer; transition: color 0.2s, border-color 0.2s, background 0.2s; white-space: nowrap; }
.save-btn svg { width: 16px; height: 16px; }
.save-btn:hover { color: var(--red); border-color: rgba(var(--red-rgb), 0.4); }
.save-btn.on { color: var(--red); border-color: rgba(var(--red-rgb), 0.4); background: rgba(var(--red-rgb), 0.06); }
.save-btn.on svg { fill: var(--red); }

/* Saved insights list (member modal) */
.saved-list { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; max-height: 50vh; overflow-y: auto; }
.saved-item { padding: 11px 12px; border-radius: 10px; color: var(--ink); font-size: 0.96rem; transition: background 0.15s, color 0.15s; }
.saved-item:hover { background: rgba(var(--deep-rgb), 0.05); color: var(--red); }

/* Password-strength checklist (member signup) */
.pw-reqs { list-style: none; margin: 8px 0 4px; display: grid; gap: 5px; }
.pw-reqs li { position: relative; padding-inline-start: 24px; font-size: 0.82rem; color: var(--ink-faint); transition: color 0.15s; }
.pw-reqs li::before { content: "○"; position: absolute; inset-inline-start: 5px; top: -1px; color: var(--ink-faintest); }
.pw-reqs li.met { color: var(--ink-soft); }
.pw-reqs li.met::before { content: "✓"; color: var(--red); font-weight: 700; }

/* Unverified-account badge + confirm item */
.nav-acct { position: relative; }
.nav-acct.unverified::after { content: ""; position: absolute; top: -1px; inset-inline-end: -1px; width: 11px; height: 11px; border-radius: 50%; background: #e0a200; border: 2px solid var(--bg-0); }
.acct-confirm { color: #a8780a !important; font-weight: 600; }

/* ------------------------------ Hero ------------------------------- */
/* Generic page header, shared across every page (inner pages pass
   style="padding-bottom:0"). The home page layers .hero-home on top for
   the full-screen animated stage — keep stage-only rules under that
   modifier so inner-page headers stay compact. */
.hero { position: relative; padding-top: calc(var(--nav-h) + clamp(40px, 8vw, 96px)); padding-bottom: clamp(40px, 7vw, 90px); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.2rem); font-weight: 600; }
.hero .lead { max-width: 600px; margin-top: 22px; }
.hero-cta { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }

/* Home page: full-screen "stage" — the animated decision-network canvas
   fills the viewport, minimal copy sits centred over it, and the proof
   grid is pushed to the next section so it only shows on scroll. */
.hero-home {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: calc(var(--nav-h) + clamp(28px, 6vw, 64px));
  padding-bottom: clamp(76px, 13vh, 140px);
}
.hero-home h1 { font-size: clamp(2.7rem, 7.4vw, 5.6rem); }
.hero-home .lead { max-width: 30ch; font-size: clamp(1.12rem, 1.9vw, 1.42rem); color: var(--ink-soft); }
/* Soft brand aurora behind the network — drifts slowly for depth. */
.hero-home::before {
  content: "";
  position: absolute;
  inset: -12% -6% 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(46vw 46vw at 82% 14%, rgba(var(--red-rgb), 0.10), transparent 62%),
    radial-gradient(42vw 42vw at 6% 90%, rgba(var(--deep-rgb), 0.11), transparent 60%);
  animation: heroGlow 28s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: 0.85; }
  to   { transform: translate3d(-3vw, 2vh, 0) scale(1.1); opacity: 1; }
}
.hero-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }

/* Scroll cue — minimal nudging chevron, BCG-style. */
.hero-scroll {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(18px, 4vh, 36px);
  margin-inline: auto;
  width: fit-content;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faintest);
  transition: color 0.25s;
}
.hero-scroll:hover { color: var(--red); }
.hero-scroll-chevron {
  width: 18px; height: 18px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  animation: scrollNudge 1.9s var(--ease) infinite;
}
@keyframes scrollNudge {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50%      { transform: rotate(45deg) translate(2px, 2px); opacity: 1; }
}
/* BCG/Bain-style capability proof — a confident, outcome-framed index of
   what we help clients get right, replacing vanity stat counters. */
/* "What we help you get right" — its own below-the-fold band. */
.help-section { padding-block: clamp(44px, 7vw, 92px); }
.hero-proof { margin-top: 0; }
.hero-proof-eyebrow { font-family: var(--font-ui); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.hero-proof-grid { display: grid; grid-template-columns: 1fr; margin-top: 16px; border-top: 1px solid var(--glass-border-strong); }
.hero-cap { position: relative; display: flex; flex-direction: column; gap: 6px; padding-block: 15px; padding-inline: 0 28px; border-bottom: 1px solid var(--glass-border); transition: color 0.2s; }
.hero-cap .hc-t { font-size: 1.04rem; font-weight: 650; color: var(--deep); line-height: 1.22; letter-spacing: -0.01em; transition: color 0.2s; }
.hero-cap .hc-cap { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-press); }
.hero-cap::after { content: "→"; position: absolute; inset-inline-end: 6px; top: 15px; color: var(--ink-faintest); opacity: 0; transform: translateX(-6px); transition: opacity 0.25s, transform 0.25s, color 0.25s; }
.hero-cap:hover .hc-t { color: var(--red); }
.hero-cap:hover::after { opacity: 1; transform: none; color: var(--red); }
@media (min-width: 900px) {
  .hero-proof-grid { grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--glass-border); }
  .hero-cap { justify-content: space-between; min-height: 132px; padding: 20px 16px 20px; border-bottom: none; border-inline-end: 1px solid var(--glass-border); }
  .hero-cap:first-child { padding-inline-start: 0; }
  .hero-cap:last-child { border-inline-end: none; }
  .hero-cap .hc-cap { margin-top: 10px; }
  .hero-cap::after { top: auto; bottom: 20px; inset-inline-end: 14px; }
}

/* ------------------------------ Cards ------------------------------ */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
/* Contact page: info cards beside the form; collapses to one column at 640px. */
#contactGrid { grid-template-columns: 1fr 1.3fr; align-items: start; }

.glass,
.card,
.contributor-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-5px); border-color: var(--glass-border-strong); box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.card:hover .card-media img { transform: scale(1.06); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-size: 1.28rem; line-height: 1.22; transition: color 0.25s; }
.card:hover h3 { color: var(--red); }
.card .excerpt { color: var(--ink-soft); font-size: 0.95rem; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-faint); margin-top: 4px; }
.card-meta .sep { opacity: 0.4; }
.card-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; background: var(--deep); display: grid; place-items: center; color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 0.7rem; border: 1px solid var(--glass-border-strong); }
.card-avatar.card-initials { border: none; }

/* Capability cards (text-only, link out) */
.cap-card .card-body { gap: 12px; }
.cap-n { font-family: var(--font-ui); font-weight: 700; font-size: 1.6rem; line-height: 1; letter-spacing: -0.02em; }
.learn { font-size: 0.85rem; font-weight: 600; color: var(--ink-faint); margin-top: auto; padding-top: 4px; transition: color 0.2s, transform 0.2s; }
.card:hover .learn { color: var(--red); }

/* Capability detail — process steps */
.process { display: flex; flex-direction: column; gap: 14px; }
.proc-step {
  display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start;
  padding: 22px 24px; border-radius: var(--radius);
  background: var(--bg-1); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm);
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
}
.proc-step:hover { border-color: var(--glass-border-strong); transform: translateX(4px); }
.proc-n { font-family: var(--font-ui); font-weight: 700; font-size: 2rem; line-height: 1; }
.proc-body h3 { font-size: 1.2rem; }
.proc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.proc-tag { font-size: 0.82rem; color: var(--ink-soft); padding: 6px 12px; border-radius: 100px; background: var(--bg-2); border: 1px solid var(--glass-border); }
@media (max-width: 560px) { .proc-step { grid-template-columns: 1fr; gap: 8px; } .proc-n { font-size: 1.6rem; } }

/* Category chip — neutral chip, brand-red text. The legacy .chip.amber
   modifier (still emitted by JS/HTML) now renders as the INK variant:
   nothing outside the featured chip may be amber. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--bg-1);
  border: 1px solid var(--glass-border-strong);
  color: var(--red-press);
  width: fit-content;
}
.chip.amber { background: var(--bg-1); border-color: var(--glass-border-strong); color: var(--ink-soft); }
.chip-float { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 2; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* Featured (hero) post */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  transition: transform 0.4s var(--ease), border-color 0.4s;
}
.featured:hover { transform: translateY(-4px); border-color: var(--glass-border-strong); }
.featured .featured-media { position: relative; min-height: 340px; background: var(--deep); overflow: hidden; }
.featured .featured-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.featured:hover .featured-media img { transform: scale(1.05); }
.featured .featured-body { padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.featured h2 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); }
.featured .excerpt { color: var(--ink-soft); font-size: 1.04rem; }
/* The Featured badge — the ONE amber element in the system. Overrides
   whichever .chip modifier JS happened to assign. */
.featured .chip-float {
  background: var(--amber);
  border-color: rgba(var(--deep-rgb), 0.25);
  color: var(--deep);
}

/* ------------------------------ Author ----------------------------- */
.author { display: flex; align-items: center; gap: 12px; }
.author .avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--deep); flex: none; display: grid; place-items: center; font-weight: 700; color: #fff; font-family: var(--font-ui); border: 1px solid var(--glass-border-strong); }
.author span.avatar { border: none; }   /* deep-ink initials placeholder — no border */
.author .meta .name { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.author .meta .sub { font-size: 0.78rem; color: var(--ink-faint); }
/* Byline that links to the author's public profile. */
a.author-link { text-decoration: none; color: inherit; cursor: pointer; border-radius: 100px; transition: opacity 0.15s; }
a.author-link:hover .name { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
a.author-link:hover .avatar { box-shadow: 0 0 0 2px rgba(var(--red-rgb), 0.35); }

/* ------------------------------ Filters ---------------------------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 34px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
/* Filter pills: inactive = quiet white pill, active = solid red
   (shares the .btn-primary color block below). */
.filter {
  padding: 9px 16px;
  border-radius: 100px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg-1);
  border: 1px solid var(--glass-border-strong);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
}
.filter:hover { color: var(--ink); border-color: rgba(var(--deep-rgb), 0.4); transform: translateY(-2px); }
.btn-primary,
.filter.active {
  background: var(--red);
  border: 1px solid transparent;
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(var(--red-rgb), 0.5);
}
.filter.active:hover { background: var(--red-press); }
.search {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  border-radius: 100px;
  background: var(--bg-1);
  border: 1px solid var(--glass-border-strong);
  min-width: 260px;
}
.search:focus-within { border-color: rgba(var(--red-rgb), 0.55); box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.1); }
.search input { background: none; border: none; outline: none; color: var(--ink); width: 100%; font-size: 0.92rem; }
.search input::placeholder { color: var(--ink-faintest); }
.search svg { color: var(--ink-faint); flex: none; }

/* ------------------------------ Article ---------------------------- */
.progress { position: fixed; top: 0; inset-inline-start: 0; height: 3px; width: 0%; z-index: 200; background: var(--red); transition: width 0.1s linear; }
.post-hero { padding-top: calc(var(--nav-h) + 48px); }
.post-hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 600; max-width: none; line-height: 1.1; }
.post-cover { margin: 40px 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--glass-border); box-shadow: var(--shadow); aspect-ratio: 16 / 8; background: var(--bg-2); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
/* Cover photos: black & white under a light brand-red wash (SVG filter from ui.js). */
.post-cover img, .card-media img, .featured-media img { filter: url(#cbd-cover-duotone); }

.article { max-width: 740px; margin-inline: auto; font-size: 1.12rem; color: var(--ink-soft); }
.article > * + * { margin-top: 1.3em; }
.article h2 { font-size: 1.7rem; margin-top: 1.8em; }
/* The one sanctioned amber touch in the article body — a small tick that marks
   each subtitle. Kept tiny on purpose (the amber budget at :root). */
.article h2::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-inline-end: 12px; border-radius: 2px; background: var(--amber); vertical-align: 0.12em; }
.article h3 { font-size: 1.32rem; color: var(--ink); margin-top: 1.6em; }
.article p { line-height: 1.78; }
.article a { color: var(--red-press); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--red-rgb), 0.35); }
.article a:hover { text-decoration-color: var(--red); color: var(--red); }
.article strong { color: var(--ink); font-weight: 700; }
.article ul, .article ol { padding-inline-start: 1.4em; }
.article li { margin-top: 0.5em; }
.article li::marker { color: var(--red); }
.article blockquote {
  border-inline-start: 3px solid var(--red);
  padding-block: 6px;
  padding-inline: 24px 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.45;
  color: var(--deep);
  font-weight: 500;
}
.article img { border-radius: var(--radius); margin-block: 1.6em; border: 1px solid var(--glass-border); }
.article code { background: rgba(var(--red-rgb), 0.06); padding: 2px 7px; border-radius: 7px; font-size: 0.9em; color: var(--red-press); border: 1px solid rgba(var(--red-rgb), 0.16); }
.article pre { background: var(--bg-2); padding: 20px; border-radius: var(--radius); overflow-x: auto; border: 1px solid var(--glass-border); }
.article pre code { background: none; border: none; padding: 0; color: var(--ink-soft); }
.article hr { border: none; height: 1px; background: var(--glass-border); }

/* ---- Article references (literature) — APA-style list, collapsed behind "+" ---- */
.article-refs { max-width: 740px; margin: clamp(40px, 6vw, 60px) auto 0; border-top: 1px solid var(--glass-border); padding-top: 22px; }
.refs-toggle {
  display: inline-flex; align-items: center; gap: 12px;
  background: none; border: none; padding: 6px 0; cursor: pointer;
  font-family: var(--font-ui); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
}
.refs-toggle:hover { color: var(--red); }
.refs-toggle:hover .refs-sign { border-color: var(--red); }
/* The "+" → "−" sign: a small red square with two bars; the vertical bar hides when open. */
.refs-sign { position: relative; width: 18px; height: 18px; flex: none; border-radius: 5px; border: 1.5px solid var(--red); }
.refs-sign::before, .refs-sign::after { content: ""; position: absolute; inset: 0; margin: auto; background: var(--red); }
.refs-sign::before { width: 8px; height: 1.6px; }
.refs-sign::after { width: 1.6px; height: 8px; transition: opacity 0.2s var(--ease); }
.article-refs.open .refs-sign::after { opacity: 0; }
.refs-count { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0; color: var(--ink-faint); background: var(--bg-2); border-radius: 100px; padding: 2px 9px; }
.refs-list { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.45s var(--ease), opacity 0.3s var(--ease), margin-top 0.45s var(--ease); }
.article-refs.open .refs-list { max-height: 6000px; opacity: 1; margin-top: 18px; }
.refs-list .ref { font-size: 0.96rem; line-height: 1.6; color: var(--ink-soft); padding-inline-start: 2.2em; text-indent: -2.2em; }
.refs-list .ref + .ref { margin-top: 0.75em; }
.refs-list .ref a { color: var(--red-press); text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }

/* ---- Article social sharing ---- */
.article-share { max-width: 740px; margin: clamp(36px, 5vw, 52px) auto 0; padding-top: 24px; border-top: 1px solid var(--glass-border); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.share-label { font-family: var(--font-ui); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.share-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--glass-border-strong); background: var(--bg-1); color: var(--ink-soft); cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s; }
.share-btn:hover { color: var(--red); border-color: rgba(var(--red-rgb), 0.5); background: rgba(var(--red-rgb), 0.05); transform: translateY(-1px); }
.share-btn svg { width: 18px; height: 18px; }
/* Wide screens: a vertical share rail in the right gutter, next to the article
   and just under the cover. (Narrow screens keep the horizontal row above.) */
@media (min-width: 1080px) {
  .post-article { position: relative; }
  .post-article > .article-share {
    position: absolute; top: 4px; inset-inline-start: calc(50% + 390px);
    margin: 0; padding: 0; border-top: none; width: auto;
    flex-direction: column; align-items: center; gap: 14px;
  }
  .post-article > .article-share .share-label { display: none; }
  .post-article > .article-share .share-btns { flex-direction: column; gap: 12px; }
}

/* --------------------------- Deep band ------------------------------ */
/* Home contact/CTA section — the single BCG-style deep band per page:
   full-bleed oxblood, white serif headline, red pill CTA. Only
   index.html carries id="contact" on a section. */
section#contact { background: var(--deep); color: #fff; }
section#contact h2 { color: #fff; }
section#contact .lead { color: rgba(255, 255, 255, 0.78); }
section#contact .eyebrow { color: rgba(255, 255, 255, 0.92); }
section#contact .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
section#contact .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.8); }
section#contact .btn-primary { box-shadow: none; }
section#contact ::selection { background: rgba(255, 255, 255, 0.25); color: #fff; }

/* ------------------------------ Footer ----------------------------- */
/* Light and quiet: hairline top rule, dark text, red hovers. */
.footer { margin-top: clamp(60px, 10vw, 130px); border-top: 1px solid var(--glass-border); padding-block: 56px 40px; background: var(--bg-1); }
.footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer .footer-grid { grid-template-columns: 1.9fr 1.1fr 1fr 1fr; }
.news { display: flex; gap: 8px; margin-top: 20px; max-width: 340px; }
.news .input { padding: 11px 14px; }
.news .btn { flex: none; }

/* Prominent newsletter band (end-of-article, section CTAs). */
.newsletter-band { padding-block: clamp(40px, 6vw, 72px); }
.news-card { max-width: 620px; margin-inline: auto; padding: clamp(28px, 4vw, 44px); border-radius: var(--radius-lg); text-align: center; }
.news-card .eyebrow { justify-content: center; }
.news-card h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.news-card .lead { max-width: 46ch; margin-inline: auto; }
.news-card .news { margin-inline: auto; }

/* Multi-step contact form */
.form-steps { display: flex; gap: 6px; margin-bottom: 10px; }
.step-dot { height: 4px; flex: 1; border-radius: 99px; background: var(--glass-border); transition: background 0.3s var(--ease); }
.step-dot.active { background: var(--red); }
.step-label { font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 20px; }
.form-step { animation: stepIn 0.35s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Lead-magnet resource cards */
.resource-card { display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius-lg); }
.resource-card h3 { font-size: 1.2rem; }
.resource-card .muted { flex: 1 1 auto; font-size: 0.95rem; }
.resource-meta { font-size: 0.78rem; color: var(--ink-faint); letter-spacing: 0.04em; text-transform: uppercase; margin-top: 14px; }

/* Lead-magnet gate modal */
.magnet-backdrop { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(29, 21, 24, 0.5); backdrop-filter: blur(4px); }
.magnet-backdrop.open { display: flex; animation: fadeIn 0.2s var(--ease); }
.magnet-modal { position: relative; width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; padding: clamp(24px, 4vw, 34px); border-radius: var(--radius-lg); background: rgba(255, 255, 255, 0.95); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.65); box-shadow: var(--shadow); }
.magnet-close { position: absolute; top: 12px; inset-inline-end: 14px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; font-size: 1.6rem; line-height: 1; color: var(--ink-faint); cursor: pointer; border-radius: 8px; }
.magnet-close:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.magnet-optin { display: flex; gap: 9px; align-items: flex-start; font-size: 0.82rem; color: var(--ink-soft); margin: 12px 0 4px; cursor: pointer; line-height: 1.45; }
.magnet-optin input { margin-top: 2px; flex: none; accent-color: var(--red); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Inline Zoom Scheduler embed */
.scheduler-embed { width: 100%; }
.scheduler-frame { width: 100%; height: 700px; border: 0; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 12px 34px -20px rgba(0, 0, 0, 0.35); }
.scheduler-fallback { text-align: center; margin-top: 12px; }
.scheduler-fallback a { text-decoration: underline; }
@media (max-width: 560px) { .scheduler-frame { height: 760px; } }
.footer h4 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; font-weight: 600; }
.footer a { display: block; color: var(--ink-soft); padding: 6px 0; font-size: 0.94rem; transition: color 0.2s; }
.footer a:hover { color: var(--red); }
.footer .copyright { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--glass-border); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--ink-faint); font-size: 0.86rem; }
.footer .footer-legal { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer .footer-legal a { display: inline; padding: 0; font-size: 0.86rem; color: var(--ink-faint); }
.footer .footer-legal a:hover { color: var(--red); }

/* ------------------------------ Forms ------------------------------ */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 0.84rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.01em; }
.field .hint { font-size: 0.78rem; color: var(--ink-faint); }
.req { color: var(--red); font-weight: 700; }
.input, .textarea, .select {
  width: 100%;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  border: 1px solid var(--glass-border-strong);
  color: var(--ink);
  font-size: 0.96rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.12); }
.input::placeholder, .textarea::placeholder { color: var(--ink-faintest); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

/* ------------------------------ Socials ---------------------------- */
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-1); border: 1px solid var(--glass-border-strong); color: var(--ink-soft); transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s; }
.social-btn:hover { color: var(--red); border-color: rgba(var(--red-rgb), 0.45); transform: translateY(-2px); }
/* Footer socials: frameless — just the icon glyphs, no box. */
.footer .socials { gap: 18px; }
.footer .social-btn { width: auto; height: auto; background: none; border: none; border-radius: 0; color: var(--ink-faint); }
.footer .social-btn svg { width: 20px; height: 20px; display: block; }
.footer .social-btn:hover { background: none; border-color: transparent; color: var(--red); }

/* ------------------------------ Toast ------------------------------ */
/* Above every overlay (modals/backdrops top out at 1000) so a toast is always
   readable — e.g. the sign-up/sign-in modal that used to cover it. */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 2000; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast-wrap .toast { pointer-events: auto; }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border-radius: 100px;
  background: var(--bg-1);
  color: var(--ink);
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  animation: toastIn 0.4s var(--ease);
}
.toast.ok { border-color: rgba(23, 122, 57, 0.45); }
.toast.err { border-color: rgba(var(--red-rgb), 0.5); }
.toast .ico { width: 8px; height: 8px; border-radius: 50%; background: #178a43; flex: none; }
.toast.err .ico { background: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ------------------------------ States ----------------------------- */
.skeleton { background: linear-gradient(100deg, rgba(43, 11, 14, 0.05) 30%, rgba(43, 11, 14, 0.1) 50%, rgba(43, 11, 14, 0.05) 70%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { text-align: center; padding: 80px 20px; color: var(--ink-faint); }
.empty .big { font-size: 3rem; margin-bottom: 14px; }

/* ------------------------------ Reveal ----------------------------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------ Utilities -------------------------- */
[id] { scroll-margin-top: calc(var(--nav-h) + 22px); }
.mt-s { margin-top: 14px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 48px; }
.divider { height: 1px; background: var(--glass-border); border: none; margin-block: 32px; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.muted { color: var(--ink-faint); }
.hidden { display: none !important; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); }
.section-head p { margin-top: 14px; color: var(--ink-soft); }

/* Error/danger text: page markup carries inline #c80815 (~6:1 on white);
   pin these ids to the darker press red (~7.7:1) for small-text legibility. */
#authError, #formError, #deleteBtn, #rejectBtn { color: var(--red-press) !important; }

/* ------------------------------ Responsive ------------------------- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .featured { grid-template-columns: 1fr; }
  .featured .featured-media { min-height: 240px; }
  .footer .cols { grid-template-columns: 1fr 1fr; }
}
/* Collapse the nav to the hamburger early enough that the inline links
   never overflow — the seven of them need ~960px to sit on one line. */
@media (max-width: 960px) {
  .navmenu-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 36px; }
}
@media (max-width: 540px) {
  .navmenu-body { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
  .grid-3, .grid-2, #contactGrid { grid-template-columns: 1fr; }
  .footer .cols { grid-template-columns: 1fr; gap: 28px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search { min-width: 0; }
}

/* ------------------------------ Admin ------------------------------ */
.auth-card { max-width: 420px; margin: 0 auto; padding: clamp(28px, 5vw, 44px); border-radius: var(--radius-lg); }
/* Two-column sign-in: contributor pitch + the auth card. */
.auth-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 64px); align-items: center; max-width: 980px; margin: 0 auto; }
.auth-pitch h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
.auth-pitch .lead { max-width: 42ch; }
.auth-benefits { list-style: none; margin-top: 26px; display: grid; gap: 16px; }
.auth-benefits li { position: relative; padding-inline-start: 28px; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.5; }
.auth-benefits li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 7px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--red); }
.auth-benefits strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; max-width: 460px; gap: 32px; }
  .auth-pitch { text-align: center; }
  .auth-benefits { text-align: start; max-width: 420px; margin-inline: auto; }
  .auth-pitch .lead { margin-inline: auto; }
}
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 32px; }
.admin-head .who { font-size: 0.86rem; color: var(--ink-faint); }

.post-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--bg-1);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.25s, background 0.25s, transform 0.25s var(--ease);
}
.post-row:hover { border-color: var(--glass-border-strong); }
.post-row .thumb { width: 64px; height: 48px; border-radius: 10px; object-fit: cover; border: 1px solid var(--glass-border); background: var(--bg-2); }
.post-row .pr-title { font-family: var(--font-ui); font-weight: 600; font-size: 1.02rem; line-height: 1.25; }
.post-row .pr-sub { font-size: 0.8rem; color: var(--ink-faint); margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post-row .pr-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.feature-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--ink-faint); cursor: pointer; white-space: nowrap; user-select: none; margin-inline-end: 2px; }
.feature-toggle input { width: 15px; height: 15px; accent-color: var(--red); cursor: pointer; flex: none; margin: 0; }
.assign-select { font-size: 0.8rem; padding: 6px 9px; border-radius: 10px; border: 1px solid var(--glass-border-strong); background: var(--bg-1); color: var(--ink); font-family: var(--font-ui); cursor: pointer; max-width: 170px; }
/* Editor recommendation chips (assign dropdown + the review summaries) */
.assignee-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; padding: 3px 6px 3px 10px; border-radius: 100px; background: var(--bg-2); border: 1px solid var(--glass-border); white-space: nowrap; }
.assignee-chip button { border: none; background: none; cursor: pointer; color: var(--ink-faint); font-size: 1rem; line-height: 1; padding: 0 2px; }
.assignee-chip.rec-approved { border-color: rgba(23,138,67,.5); }
.assignee-chip.rec-rejected { border-color: rgba(var(--red-rgb),.5); }
.assignee-chip.rec-changes { border-color: rgba(201,138,0,.55); }
.recs { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.recs-h { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faintest); font-weight: 700; }
.rec { font-size: 0.82rem; padding: 6px 10px; border-radius: 8px; background: var(--bg-2); border-inline-start: 3px solid var(--ink-faint); }
.rec-approved { border-inline-start-color: #178a43; }
.rec-rejected { border-inline-start-color: var(--red); }
.rec-changes { border-inline-start-color: #c98a00; }
/* Edit-history timeline */
.history-list { display: flex; flex-direction: column; gap: 0; }
.hist-item { padding: 11px 0; border-top: 1px solid var(--glass-border); }
.hist-item:first-child { border-top: none; padding-top: 2px; }
.hist-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.hist-label { font-weight: 600; font-size: 0.86rem; color: var(--ink); }
.hist-when { font-size: 0.72rem; color: var(--ink-faintest); white-space: nowrap; }
.hist-who { font-size: 0.8rem; color: var(--ink-faint); margin-top: 1px; }
.hist-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 5px; padding-inline-start: 10px; border-inline-start: 2px solid var(--glass-border-strong); }
.hist-ver { margin-top: 6px; border: none; background: none; color: var(--red); font-size: 0.8rem; cursor: pointer; padding: 0; font-family: var(--font-ui); }
.hist-ver:hover { text-decoration: underline; }
/* Version snapshot viewer */
.ver-overlay { position: fixed; inset: 0; z-index: 1100; display: none; align-items: flex-start; justify-content: center; padding: clamp(20px, 6vh, 70px) 20px; background: rgba(29, 21, 24, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); overflow: auto; }
.ver-overlay.open { display: flex; animation: fadeIn 0.2s var(--ease); }
.ver-modal { position: relative; width: 100%; max-width: 760px; padding: clamp(26px, 4vw, 44px); border-radius: var(--radius-lg); }
.ver-close { position: absolute; top: 14px; inset-inline-end: 16px; border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-faint); }
.ver-meta { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faintest); font-weight: 700; margin-bottom: 8px; }
.ver-title { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); color: var(--deep); margin-bottom: 18px; line-height: 1.15; }
/* Shared history modal (the per-post History button) */
.hist-overlay { position: fixed; inset: 0; z-index: 1100; display: none; align-items: flex-start; justify-content: center; padding: clamp(20px, 6vh, 70px) 20px; background: rgba(29, 21, 24, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); overflow: auto; }
.hist-overlay.open { display: flex; animation: fadeIn 0.2s var(--ease); }
.hist-modal { position: relative; width: 100%; max-width: 620px; padding: clamp(24px, 4vw, 40px); border-radius: var(--radius-lg); }
.hist-close { position: absolute; top: 14px; inset-inline-end: 16px; border: none; background: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-faint); }
.hist-modal-eyebrow { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faintest); font-weight: 700; }
.hist-modal-title { font-family: var(--font-display); font-size: clamp(1.3rem, 2.6vw, 1.8rem); color: var(--deep); margin: 4px 0 16px; line-height: 1.2; }
.hist-modal-body .hist-item { padding: 12px 0; border-top: 1px solid var(--glass-border); }
.hist-modal-body .hist-item:first-child { border-top: none; }
.hist-version { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--glass-border); }
.hist-version-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--deep); margin-bottom: 8px; }
.hist-version .article { font-size: 0.9rem; }

/* Status badges. JS maps scheduled→"published" and rejected→"changes",
   so those pairs share a look and the label disambiguates:
   draft = neutral · review = blue-gray · changes/rejected = red-tinted ·
   published/scheduled = green-tinted. No amber anywhere. */
.badge { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; border: 1px solid; }
.badge.published { color: #176a37; border-color: rgba(23, 122, 57, 0.4); background: rgba(23, 122, 57, 0.08); }
.badge.draft { color: var(--ink-faint); border-color: var(--glass-border-strong); background: var(--bg-2); }
.badge.review { color: #3d5a78; border-color: rgba(61, 90, 120, 0.4); background: rgba(61, 90, 120, 0.08); }
.badge.changes { color: var(--red-press); border-color: rgba(var(--red-rgb), 0.4); background: rgba(var(--red-rgb), 0.07); }

/* --------------------- Editorial workflow --------------------------- */
.hint { font-size: 0.8rem; color: var(--ink-faint); }
.linklike { background: none; border: none; color: var(--ink-faint); font-size: 0.84rem; text-decoration: underline; margin-top: 14px; padding: 0; }
.linklike:hover { color: var(--red); }

/* Sign in / create account toggle */
.tabs { display: flex; gap: 6px; padding: 5px; background: var(--bg-2); border: 1px solid var(--glass-border); border-radius: 100px; }
.tabs button { flex: 1; padding: 9px; border: none; background: none; color: var(--ink-faint); border-radius: 100px; font-weight: 600; font-size: 0.9rem; transition: background 0.2s, color 0.2s; }
.tabs button.active { background: var(--bg-1); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Role pill in the dashboard header */
.role-pill { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 12px; border-radius: 100px; border: 1px solid; }
.role-pill.editor { color: var(--red-press); border-color: rgba(var(--red-rgb), 0.4); background: rgba(var(--red-rgb), 0.06); }
.role-pill.contributor { color: var(--ink-soft); border-color: var(--glass-border-strong); background: var(--bg-2); }

/* Dashboard sections (editor desk) */
.dash-section { margin-top: 44px; }
.dash-section:first-of-type { margin-top: 0; }
.sec-label { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.sec-label h2 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.count-pill { font-size: 0.74rem; font-weight: 700; padding: 3px 10px; border-radius: 100px; background: var(--bg-2); border: 1px solid var(--glass-border-strong); color: var(--ink-faint); }
.count-pill.alert { color: #3d5a78; border-color: rgba(61, 90, 120, 0.4); background: rgba(61, 90, 120, 0.1); }

/* Editor ⇄ author feedback callout */
.feedback { display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--glass-border-strong); }
.feedback.changes { background: rgba(var(--red-rgb), 0.05); border-color: rgba(var(--red-rgb), 0.3); }
.feedback .ico { color: var(--deep); flex: none; margin-top: 1px; }
.feedback.changes .ico { color: var(--red-press); }
.feedback h4 { font-family: var(--font-body); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 5px; }
.feedback.changes h4 { color: var(--red-press); }
.feedback p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }
.pr-sub .sep { opacity: 0.4; }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-grid; place-items: center;
  border-radius: 11px;
  background: var(--bg-1);
  border: 1px solid var(--glass-border-strong);
  color: var(--ink-soft);
  transition: all 0.2s;
}
.icon-btn:hover { color: var(--ink); background: var(--glass-hover); border-color: rgba(var(--deep-rgb), 0.35); }
.icon-btn.danger:hover { color: var(--red-press); border-color: rgba(var(--red-rgb), 0.5); background: rgba(var(--red-rgb), 0.07); }

/* ------------------------------ Editor ----------------------------- */
.editor-grid { display: grid; grid-template-columns: 1fr 320px; gap: 26px; align-items: start; }
.editor-main { display: flex; flex-direction: column; gap: 4px; }
.editor-side { position: sticky; top: calc(var(--nav-h) + 18px); display: flex; flex-direction: column; gap: 18px; }
.panel { padding: 22px; border-radius: var(--radius-lg); }
.panel h3 { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 16px; }

.title-input {
  width: 100%; background: none; border: none; outline: none; color: var(--deep);
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em;
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; padding: 4px 0;
  /* A textarea so a long title wraps fully over a few lines instead of
     scrolling off the end of a single-line input. Auto-grows via editor.js. */
  resize: none; overflow: hidden; display: block;
}
.title-input::placeholder { color: var(--ink-faintest); }

.rt-toolbar {
  position: sticky; top: calc(var(--nav-h) + 4px); z-index: 20;
  display: flex; flex-wrap: wrap; gap: 4px; padding: 8px;
  border-radius: 100px; margin: 18px 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-strong);
  box-shadow: var(--shadow-sm);
  width: fit-content;
}
.rt-toolbar button {
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: 100px; border: none; background: none; color: var(--ink-soft);
  font-size: 0.9rem; font-weight: 600; transition: background 0.15s, color 0.15s;
}
.rt-toolbar button:hover { background: rgba(var(--deep-rgb), 0.06); color: var(--ink); }
/* Active formatting state — professional editors show what's applied at the caret. */
.rt-toolbar button.active { background: rgba(var(--red-rgb), 0.1); color: var(--red-press); }
.rt-toolbar button.active:hover { background: rgba(var(--red-rgb), 0.15); color: var(--red-press); }
.rt-toolbar .div { width: 1px; height: 20px; background: var(--glass-border-strong); margin: 0 4px; align-self: center; }

/* The writing surface. Left-aligned to the same measure as the published
   article (WYSIWYG) — never centered — with a clearly visible, on-brand caret
   so it always reads as a live editor. */
.rt {
  min-height: 55vh; outline: none;
  max-width: none; margin-inline: 0;
  font-size: 1.12rem; color: var(--ink-soft);
  caret-color: var(--red);
}
.rt:empty::before { content: attr(data-placeholder); color: var(--ink-faintest); pointer-events: none; }
.rt:focus { outline: none; }
/* Live word / reading-time readout under the body. */
.rt-status {
  max-width: none; margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--glass-border);
  font-family: var(--font-ui); font-size: 0.74rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-faintest); min-height: 1em;
}

.cover-drop {
  border: 1.5px dashed var(--glass-border-strong); border-radius: var(--radius);
  aspect-ratio: 16/9; display: grid; place-items: center; text-align: center;
  color: var(--ink-faint); cursor: pointer; overflow: hidden; position: relative;
  background: var(--bg-0); transition: border-color 0.2s, background 0.2s;
}
.cover-drop:hover { border-color: rgba(var(--red-rgb), 0.5); background: rgba(var(--red-rgb), 0.03); }
.cover-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-drop .ph { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 16px; font-size: 0.86rem; }

/* Desktop: the editor body uses the full width of its column and the whole
   page scrolls as one — no cramped, inner-scrolling box. The formatting
   toolbar and the sidebar stay in view via sticky positioning (defined on
   their base rules) as you scroll through a long article. */
@media (min-width: 901px) {
  .editor-grid { align-items: start; }
}

@media (max-width: 900px) {
  .editor-grid { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .post-row { grid-template-columns: 48px 1fr; }
  .post-row .pr-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* --------------------- Contributors directory ---------------------- */
.contributor-card {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 32px 24px 24px; border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
  color: inherit;
}
a.contributor-card:hover { transform: translateY(-5px); border-color: var(--glass-border-strong); box-shadow: var(--shadow); }
.c-avatar { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 1px solid var(--glass-border-strong); flex: none; }
.c-initials { display: grid; place-items: center; background: var(--deep); color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 1.7rem; border: none; }
.contributor-card h3 { font-size: 1.2rem; margin-top: 16px; }
.c-position { color: var(--red-press); font-size: 0.86rem; font-weight: 600; margin-top: 5px; letter-spacing: 0.01em; }
.c-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--glass-border); width: 100%; font-size: 0.82rem; color: var(--ink-faint); display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; }
.c-link { color: var(--red-press); font-weight: 600; }
a.contributor-card:hover .c-link { text-decoration: underline; }

/* ----------------------- Profile editor avatar --------------------- */
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.avatar-edit {
  width: 96px; height: 96px; border-radius: 50%; flex: none; position: relative; overflow: hidden;
  border: 1.5px dashed var(--glass-border-strong); background: var(--bg-2);
  display: grid; place-items: center; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.avatar-edit:hover { border-color: rgba(var(--red-rgb), 0.5); }
.avatar-edit img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-edit .ph { font-family: var(--font-ui); font-weight: 700; font-size: 1.6rem; color: var(--ink-faint); }

/* --------------------------- Author bio card ----------------------- */
.author-bio { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius-lg); }
.ab-avatar { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid var(--glass-border-strong); }
.ab-initials { display: grid; place-items: center; background: var(--deep); color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 1.5rem; border: none; }
.ab-body { flex: 1; min-width: 220px; }
.ab-eyebrow { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 4px; }
.ab-body h3 { font-size: 1.3rem; }
.ab-position { color: var(--red-press); font-size: 0.9rem; font-weight: 600; margin-top: 3px; }
.ab-body p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.7; margin-top: 12px; white-space: pre-line; }
.ab-link { display: inline-block; margin-top: 14px; color: var(--red-press); font-weight: 600; font-size: 0.92rem; }
.ab-link:hover { text-decoration: underline; color: var(--red); }

/* ----------------- Public contributor profile page ---------------- */
/* A clean, contained identity card: larger avatar, clear hierarchy, a
   prominent LinkedIn/website button, and a quieter bio below a divider. */
.prof-card { border-radius: var(--radius-xl); padding: clamp(24px, 4vw, 46px); }
.prof-top { display: flex; align-items: center; gap: clamp(20px, 3.5vw, 40px); flex-wrap: wrap; }
.prof-avatar {
  width: clamp(116px, 15vw, 150px);
  height: clamp(116px, 15vw, 150px);
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  border: 3px solid var(--bg-1);
  box-shadow: 0 0 0 1px var(--glass-border-strong), var(--shadow-sm);
}
.prof-initials {
  display: grid; place-items: center;
  background: var(--deep); color: #fff;
  font-family: var(--font-ui); font-weight: 700;
  font-size: clamp(2.6rem, 5vw, 3.4rem);
}
/* Contributor photos: force a consistent black-and-white look, no matter how the
   photo was uploaded. Targets <img> only — the initials <span> fallbacks (same
   class names) and the profile-editor upload preview (.avatar-edit img) are
   intentionally untouched. */
img.prof-avatar,
img.c-avatar,
img.ab-avatar,
img.card-avatar,
.author img.avatar {
  filter: grayscale(100%);
}

.prof-meta { flex: 1; min-width: 240px; }
.prof-meta .eyebrow { margin-bottom: 11px; }
.prof-card .prof-name { font-size: clamp(2rem, 4.4vw, 3rem); margin-top: 2px; }
.prof-position { color: var(--red-press); font-weight: 600; font-size: 1.04rem; margin-top: 9px; letter-spacing: 0.01em; }
.prof-link {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 20px; padding: 11px 20px;
  border-radius: 100px;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem;
  color: var(--red-press); background: var(--bg-1);
  border: 1px solid var(--glass-border-strong);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, border-color 0.25s, color 0.25s;
}
.prof-link svg { width: 19px; height: 19px; flex: none; }
.prof-link:hover {
  color: #fff; background: var(--red); border-color: var(--red);
  transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgba(var(--red-rgb), 0.45);
}
.prof-bio {
  color: var(--ink-soft);
  font-size: 1.02rem;
  line-height: 1.75;
  /* Preserve the line breaks / paragraphs the contributor wrote in their bio. */
  white-space: pre-line;
  max-width: 68ch;
  margin-top: clamp(22px, 3vw, 30px);
  padding-top: clamp(22px, 3vw, 30px);
  border-top: 1px solid var(--glass-border);
}
@media (max-width: 560px) {
  .prof-top { flex-direction: column; text-align: center; }
  .prof-meta { min-width: 0; }
  .prof-bio { text-align: start; }
}

/* ---- Legal pages (Privacy Policy, Terms & Conditions) ---- */
.legal { max-width: 74ch; color: var(--ink-soft); font-size: 1.0rem; line-height: 1.78; }
.legal .legal-updated { font-size: 0.88rem; color: var(--ink-faint); margin-bottom: clamp(28px, 4vw, 40px); }
.legal h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); color: var(--deep); margin-top: 2.2em; margin-bottom: 0.5em; }
.legal h2:first-of-type { margin-top: 0; }
.legal h3 { font-size: 1.04rem; color: var(--ink); margin-top: 1.6em; margin-bottom: 0.3em; }
.legal p { margin-top: 0.9em; }
.legal ul { margin: 0.9em 0; padding-inline-start: 1.25em; }
.legal li { margin-top: 0.45em; }
.legal a { color: var(--red); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--red-press); }
.legal strong { color: var(--ink); font-weight: 650; }

/* ----------------------- Founder's message ------------------------- */
/* A personal note on /about. Same glass-strong card idiom as the Mission
   block; portrait reuses the contributor-avatar treatment and the
   LinkedIn pill reuses .prof-link — no new colors, no amber. */
.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 230px) 1fr;
  gap: clamp(26px, 4vw, 52px);
  align-items: center;
}
.founder-aside { text-align: center; }
.founder-portrait {
  width: clamp(152px, 22vw, 200px);
  height: clamp(152px, 22vw, 200px);
  border-radius: 50%;
  object-fit: cover;
  object-position: center 18%;
  margin-inline: auto;
  background: var(--bg-2);
  border: 3px solid var(--bg-1);
  box-shadow: 0 0 0 1px var(--glass-border-strong), var(--shadow);
}
.founder-name { font-family: var(--font-display); font-size: 1.22rem; color: var(--ink); margin-top: 18px; }
.founder-role { color: var(--ink-faint); font-size: 0.94rem; margin-top: 4px; }
.founder-aside .prof-link { margin-top: 16px; }
.founder-quote { color: var(--ink-soft); font-size: clamp(1.02rem, 1.4vw, 1.1rem); line-height: 1.78; max-width: 60ch; }
.founder-quote p + p { margin-top: 14px; }
@media (max-width: 720px) {
  .founder-grid { grid-template-columns: 1fr; gap: 30px; }
  .founder-quote { max-width: none; }
}

/* ----------------------- Global footprint map ---------------------- */
/* A muted Natural Earth world (warm-tint land on a white "ocean"); only
   the countries we have clients in are filled red, each with a pulsing
   marker. Geometry + markers are built offline (scripts/build_worldmap.mjs)
   and themed entirely with brand tokens — no amber, no gradients. */
.worldmap {
  position: relative;
  border-radius: var(--radius-lg);
  padding: clamp(12px, 2.2vw, 26px);
  overflow: hidden;
}
.worldmap-loading { text-align: center; padding: clamp(40px, 9vw, 80px) 0; font-size: 0.94rem; }
.wm-svg { width: 100%; height: auto; display: block; overflow: visible; }
.wm-land path {
  fill: var(--bg-2);
  stroke: var(--glass-border);
  stroke-width: 0.6px;
  vector-effect: non-scaling-stroke;
}
.wm-land path.cc-on {
  fill: var(--red);
  stroke: var(--bg-1);
  stroke-width: 0.7px;
  transition: fill 0.25s var(--ease);
}
.wm-land path.cc-on.is-active { fill: var(--red-press); }

.wm-marker { cursor: pointer; }
.wm-hit { fill: transparent; }
.wm-dot {
  fill: var(--red);
  stroke: var(--bg-1);
  stroke-width: 1.3px;
  vector-effect: non-scaling-stroke;
  transition: fill 0.2s var(--ease);
}
.wm-marker.is-active .wm-dot { fill: var(--red-press); }
.wm-halo {
  fill: rgba(var(--red-rgb), 0.30);
  transform-box: fill-box;
  transform-origin: center;
  animation: wm-pulse 2.6s var(--ease) infinite;
}
@keyframes wm-pulse {
  0%   { transform: scale(0.55); opacity: 0.75; }
  70%  { transform: scale(2.3);  opacity: 0; }
  100% { transform: scale(2.3);  opacity: 0; }
}

.wm-tip {
  position: absolute; z-index: 4; pointer-events: none;
  transform: translate(-50%, calc(-100% - 13px));
  background: var(--deep); color: #fff;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.01em;
  padding: 6px 11px; border-radius: 8px; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.wm-tip::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  border: 5px solid transparent; border-bottom: 0; border-top-color: var(--deep);
}

.worldmap-legend {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-top: clamp(18px, 3vw, 26px);
}
.wm-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 100px;
  background: var(--bg-1); border: 1px solid var(--glass-border-strong);
  color: var(--ink-soft); font-family: var(--font-ui); font-weight: 600; font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.wm-chip::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none;
}
.wm-chip:hover, .wm-chip:focus-visible, .wm-chip.is-active {
  border-color: var(--red); color: var(--ink); transform: translateY(-1px);
  box-shadow: 0 8px 20px -12px rgba(var(--red-rgb), 0.45); outline: none;
}
@media (prefers-reduced-motion: reduce) {
  .wm-halo { animation: none; opacity: 0.45; transform: scale(1.4); }
}

/* =====================================================================
   B2B sales features — engagement packages, illustrative use cases, and
   the behavioral assessment. Same tokens, same idioms; no new colors, no
   amber (the budget stays: featured chip + eyebrow dot only).
   ===================================================================== */

/* --------------------------- Packages ------------------------------ */
.pkg-card {
  display: flex; flex-direction: column; gap: 14px;
  padding: clamp(24px, 3.2vw, 36px);
  border-radius: var(--radius-lg);
  transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s;
}
.pkg-card:hover { transform: translateY(-4px); border-color: var(--glass-border-strong); box-shadow: var(--shadow); }
.pkg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pkg-card h3 { font-size: 1.5rem; }
.pkg-card .excerpt { color: var(--ink-soft); font-size: 1rem; }
.pkg-meta { display: grid; gap: 0; margin: 4px 0; border-top: 1px solid var(--glass-border); }
.pkg-meta > div { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--glass-border); }
.pkg-meta dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.pkg-meta dd { font-size: 0.95rem; color: var(--ink); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.band { display: inline-flex; gap: 4px; align-items: center; }
.band .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--glass-border-strong); }
.band .dot.on { background: var(--red); border-color: var(--red); }
.pkg-from { font-family: var(--font-ui); font-weight: 700; color: var(--red-press); }
.pkg-block h4 { font-family: var(--font-body); font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 10px; }
.pkg-outcomes { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pkg-outcomes li { position: relative; padding-inline-start: 26px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
.pkg-outcomes li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: -1px; color: var(--red); font-weight: 800; }
.pkg-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }

/* ------------------------- Use cases ------------------------------- */
/* Diagram primitives — themed through the brand tokens so every SVG
   tracks the palette. Used by usecase-graphics.js. */
.ucg-line { fill: none; stroke: var(--glass-border-strong); stroke-width: 2; }
.ucg-faint-line { fill: none; stroke: var(--glass-border); stroke-width: 1.5; }
.ucg-box { fill: var(--bg-2); stroke: var(--glass-border-strong); stroke-width: 1.5; }
.ucg-accent { fill: var(--red); }
.ucg-accent-soft { fill: rgba(var(--red-rgb), 0.10); stroke: rgba(var(--red-rgb), 0.45); stroke-width: 1.5; }
.ucg-accent-line { fill: none; stroke: var(--red); stroke-width: 2.5; }
.ucg-muted-line { fill: none; stroke: var(--ink-faint); stroke-width: 2; }
.ucg-muted-fill { fill: var(--ink-faint); }
.ucg-deep-fill { fill: var(--deep); }
.ucg-dash { stroke-dasharray: 6 6; }
.ucg-water { fill: rgba(var(--deep-rgb), 0.05); }
.ucg-iceberg { fill: rgba(var(--deep-rgb), 0.14); stroke: var(--glass-border-strong); stroke-width: 1.5; }
.ucg-label { fill: var(--ink-faint); font-family: var(--font-ui); font-size: 13px; font-weight: 600; }
.ucg-key { fill: var(--deep); font-family: var(--font-ui); font-size: 13px; font-weight: 700; }
.ucg-on-accent { fill: #fff; font-family: var(--font-ui); font-size: 12px; font-weight: 700; }
.ucg-on-iceberg { fill: var(--deep); font-family: var(--font-ui); font-size: 13px; font-weight: 700; }

/* Listing card — the diagram as a clean motif (labels hidden at card size). */
.uc-card .card-body { gap: 12px; }
.uc-card h3 { font-size: 1.22rem; }
.uc-card .chip { flex: none; }
.uc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.uc-card-media { position: relative; background: var(--bg-2); border-bottom: 1px solid var(--glass-border); padding: 16px 18px; }
.uc-card-media svg { display: block; width: 100%; height: auto; }
.uc-card-media svg text { display: none; }

/* Members-only lock badge — shown only to signed-out visitors (the grid
   carries .uc-locked) so the gate is clear before the click. */
.uc-lock { display: none; align-items: center; gap: 5px; color: var(--red-press); }
.uc-lock svg { width: 13px; height: 13px; }
.uc-locked .uc-lock { display: inline-flex; }

/* Members-only invite on the detail page. */
.uc-gate { max-width: 760px; border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 56px); }
.uc-gate-benefits { margin-top: 20px; }

/* Detail: the hero diagram. */
.uc-graphic { max-width: 760px; margin: 0 auto; background: var(--bg-1); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: clamp(18px, 3vw, 30px); }
.uc-graphic svg { display: block; width: 100%; height: auto; }

/* Pull-quote inside a use case's "situation". */
.uc-quote {
  border-inline-start: 3px solid var(--red);
  padding-block: 6px; padding-inline: 24px 0; margin: 26px 0 0;
  font-family: var(--font-display); font-size: 1.32rem; line-height: 1.45;
  color: var(--deep); font-weight: 500;
}

/* Behavioral-science cards. */
.uc-sci { padding: 24px 22px; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 8px; }
.uc-sci h3 { font-size: 1.08rem; margin-top: 4px; }
.uc-sci p { font-size: 0.94rem; line-height: 1.6; }

/* Phase timeline. */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.uc-phase { padding: 22px 20px; border-radius: var(--radius-lg); display: flex; flex-direction: column; gap: 6px; }
.uc-phase-n { font-family: var(--font-ui); font-weight: 700; font-size: 0.8rem; color: var(--red-press); letter-spacing: 0.04em; }
.uc-phase h3 { font-size: 1.05rem; }
.uc-phase p { font-size: 0.9rem; line-height: 1.55; }

/* Signals + pitfall. */
.uc-signals { padding: 6px 24px; border-radius: var(--radius-lg); }
.uc-signal { padding: 16px 0; border-bottom: 1px solid var(--glass-border); }
.uc-signal:last-child { border-bottom: none; }
.uc-signal .m { font-weight: 650; color: var(--ink); font-size: 1rem; }
.uc-signal .n { color: var(--ink-faint); font-size: 0.9rem; margin-top: 3px; line-height: 1.5; }
.uc-pitfall { padding: 22px 24px; border-radius: var(--radius-lg); border-inline-start: 3px solid var(--red); }
.uc-pitfall p { color: var(--ink-soft); font-size: 0.98rem; line-height: 1.65; }

@media (max-width: 900px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4 { grid-template-columns: 1fr; } }

/* ------------------------- Assessment ------------------------------ */
.a-step { animation: assessIn 0.4s var(--ease); }
@keyframes assessIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.a-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 18px 0 24px; }
.a-list li { position: relative; padding-inline-start: 28px; color: var(--ink-soft); }
.a-list li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: -1px; color: var(--red); font-weight: 800; }

/* Progress / score meter */
.meter { height: 8px; background: var(--bg-2); border: 1px solid var(--glass-border); border-radius: 100px; overflow: hidden; }
.meter .fill { height: 100%; background: var(--red); border-radius: 100px; transition: width 0.5s var(--ease); }
.meter.big { height: 12px; }

/* Question step */
.q-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.q-count { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.q-dim { font-size: 0.8rem; font-weight: 600; color: var(--red-press); }
.q-options { display: flex; flex-direction: column; gap: 10px; margin: 26px 0 20px; }
.q-option {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: start;
  padding: 14px 16px; border-radius: var(--radius); background: var(--bg-1);
  border: 1px solid var(--glass-border-strong); color: var(--ink);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.q-option:hover { border-color: rgba(var(--red-rgb), 0.5); transform: translateX(3px); }
.q-option .q-v { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--bg-2); border: 1px solid var(--glass-border-strong); font-family: var(--font-ui); font-weight: 700; font-size: 0.92rem; color: var(--ink-faint); transition: background 0.2s, color 0.2s, border-color 0.2s; }
.q-option .q-l { font-weight: 500; }
.q-option.selected { border-color: var(--red); background: rgba(var(--red-rgb), 0.05); }
.q-option.selected .q-v { background: var(--red); border-color: var(--red); color: #fff; }
.q-nav { display: flex; }

/* Result + gate */
.score-row { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.score-row .meter { flex: 1; }
.score-num { font-family: var(--font-ui); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--red); line-height: 1; font-variant-numeric: tabular-nums; }
.score-num span { font-size: 0.5em; color: var(--ink-faint); margin-inline-start: 2px; }
.gate { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--glass-border); }

/* Report dimension bars */
.dim-bars { display: flex; flex-direction: column; gap: 14px; }
.dim-row { display: grid; grid-template-columns: minmax(130px, 1.1fr) 2fr 46px; gap: 14px; align-items: center; }
.dim-name { font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.dim-row.gap .dim-name { color: var(--red-press); }
.dim-tag { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red-press); border: 1px solid rgba(var(--red-rgb), 0.4); border-radius: 100px; padding: 2px 7px; margin-inline-start: 4px; white-space: nowrap; }
.dim-bar { height: 8px; background: var(--bg-2); border: 1px solid var(--glass-border); border-radius: 100px; overflow: hidden; }
.dim-bar .fill { height: 100%; background: var(--red); border-radius: 100px; transition: width 0.6s var(--ease); }
.dim-row.gap .dim-bar .fill { background: var(--red); }
.dim-row:not(.gap) .dim-bar .fill { background: var(--ink-faintest); }
.dim-val { font-family: var(--font-ui); font-weight: 700; font-size: 0.92rem; color: var(--ink-faint); text-align: end; font-variant-numeric: tabular-nums; }
.rec { margin-top: 26px; padding: clamp(20px, 3vw, 28px); border-radius: var(--radius-lg); }
@media (max-width: 560px) {
  .dim-row { grid-template-columns: 1fr 40px; grid-template-areas: "name val" "bar bar"; row-gap: 6px; }
  .dim-name { grid-area: name; } .dim-val { grid-area: val; } .dim-bar { grid-area: bar; }
}

/* =====================================================================
   Bias Handbook — app landing page (/bias)
   A commercial landing page for the iOS app. Reuses the Editorial Light
   tokens. The five category accents below are the APP's own product
   palette (decision/belief/social/memory/self), scoped to .bias-page and
   used only as small accents (dots, rails, chips) — the site's amber
   budget (featured chip + eyebrow dot) is untouched.
   ===================================================================== */
.bias-page {
  --catC-decision: #c80815;  /* brand red */
  --catC-belief:   #1f8b4c;  /* green */
  --catC-social:   #2f6db0;  /* blue */
  --catC-memory:   #d9852a;  /* amber-orange — the app's Memory hue */
  --catC-self:     #7d4bb0;  /* purple */
}

/* ----------------------------- Hero -------------------------------- */
.bias-hero { padding-bottom: clamp(40px, 6vw, 76px); overflow: hidden; }
.bias-hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
@media (max-width: 900px) { .bias-hero-grid { grid-template-columns: 1fr; gap: 44px; } }

.app-id { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.app-id-icon { width: 72px; height: 72px; border-radius: 17px; box-shadow: var(--shadow-sm); border: 1px solid var(--glass-border); flex: none; }
.app-id > div { display: flex; flex-direction: column; gap: 3px; }
.app-id-name { font-family: var(--font-ui); font-weight: 700; font-size: 1.06rem; color: var(--deep); line-height: 1; }
.app-id-sub { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--red-press); }

.bias-hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
.bias-hero .lead { max-width: 32ch; }

.meta-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding: 0; }
.meta-chip { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); padding: 7px 14px; border-radius: 100px; background: var(--bg-1); border: 1px solid var(--glass-border-strong); }

/* App Store badge — faithful recreation of Apple's black download badge. */
.appstore-badge {
  display: inline-flex; align-items: center; gap: 11px;
  padding: 9px 18px 9px 15px; border-radius: 13px;
  background: #000; color: #fff;
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.appstore-badge:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.65); color: #fff; }
.as-apple { width: 25px; height: 25px; fill: #fff; flex: none; }
.as-text { display: flex; flex-direction: column; line-height: 1.06; text-align: start; }
.as-text small { font-size: 0.6rem; font-weight: 400; letter-spacing: 0.02em; opacity: 0.92; }
.as-text strong { font-family: var(--font-ui); font-size: 1.16rem; font-weight: 600; letter-spacing: 0.01em; }
/* White badge variant — reads against the dark "Get the app" band. */
.appstore-badge--light { background: #fff; color: #000; }
.appstore-badge--light:hover { color: #000; }
.appstore-badge--light .as-apple { fill: #000; }

/* --------------------------- Phone mockup --------------------------- */
.bias-hero-art { display: flex; justify-content: center; perspective: 1100px; }
.phone { width: min(312px, 80vw); transition: transform 0.5s var(--ease); transform-style: preserve-3d; will-change: transform; }
.phone-frame {
  position: relative;
  border-radius: 46px; padding: 11px;
  background: linear-gradient(155deg, #313135, #0b0b0d 62%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), 0 44px 80px -34px rgba(43, 11, 14, 0.55), inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}
.phone-island { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); width: 92px; height: 27px; background: #000; border-radius: 16px; z-index: 5; }
.phone-screen { position: relative; border-radius: 36px; overflow: hidden; background: var(--bg-0); font-size: 0; }
.phone-shot { display: block; width: 100%; height: auto; }

/* --------------------------- Stat strip ---------------------------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--glass-border); border-radius: var(--radius-lg); background: var(--bg-1); box-shadow: var(--shadow-sm); overflow: hidden; }
.stat { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: clamp(22px, 3vw, 34px) 16px; text-align: center; }
.stat + .stat { border-inline-start: 1px solid var(--glass-border); }
.stat-n { font-family: var(--font-ui); font-weight: 700; font-size: clamp(1.9rem, 4vw, 2.8rem); color: var(--red); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-l { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
@media (max-width: 640px) {
  .stat-strip { grid-template-columns: 1fr 1fr; }
  .stat { border-top: 1px solid var(--glass-border); }
  .stat:nth-child(-n+2) { border-top: none; }
  .stat:nth-child(odd) { border-inline-start: none; }
}

/* ----------------------------- Features ---------------------------- */
.feat-grid { gap: 22px; }
.feat { background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm); border-radius: var(--radius-lg); padding: clamp(22px, 2.6vw, 30px); display: flex; flex-direction: column; gap: 12px; transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s; }
.feat:hover { transform: translateY(-4px); border-color: var(--glass-border-strong); box-shadow: var(--shadow); }
.feat-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; background: rgba(var(--red-rgb), 0.08); color: var(--red); }
.feat-ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { font-size: 1.16rem; }
.feat p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }

/* ---------------------------- Categories --------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 820px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cat-grid { grid-template-columns: 1fr; } }
.cat-card { position: relative; padding: 24px 22px 22px; border-radius: var(--radius-lg); background: var(--bg-1); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s; }
.cat-card::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 4px; background: var(--c, var(--red)); }
.cat-card:hover { transform: translateY(-4px); border-color: var(--glass-border-strong); box-shadow: var(--shadow); }
.cat-count { font-family: var(--font-ui); font-weight: 700; font-size: 1.7rem; color: var(--c, var(--red)); line-height: 1; letter-spacing: -0.02em; }
.cat-name { font-size: 1.18rem; margin-top: 8px; }
.cat-eg { color: var(--ink-faint); font-size: 0.9rem; margin-top: 6px; }
.cat-card-cta { color: inherit; }
.cat-card-cta .cat-name { transition: color 0.25s; }
.cat-card-cta:hover .cat-name { color: var(--red); }

/* ------------------------- Example biases -------------------------- */
.eg-grid { gap: 20px; }
.eg-card { padding: clamp(20px, 2.4vw, 26px); border-radius: var(--radius-lg); background: var(--bg-1); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm); transition: transform 0.4s var(--ease), border-color 0.4s, box-shadow 0.4s; }
.eg-card:hover { transform: translateY(-4px); border-color: var(--glass-border-strong); box-shadow: var(--shadow); }
.eg-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c); padding: 5px 12px; border-radius: 100px; background: color-mix(in srgb, var(--c) 10%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.eg-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.eg-card h3 { font-size: 1.18rem; margin-top: 14px; }
.eg-card p { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; margin-top: 8px; }

/* ---------------------------- Frameworks --------------------------- */
.fw-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 820px) { .fw-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 440px) { .fw-grid { grid-template-columns: 1fr; } }
.fw-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); background: var(--bg-0); border: 1px solid var(--glass-border); transition: border-color 0.3s, transform 0.3s var(--ease), background 0.3s; }
.fw-card:hover { border-color: rgba(var(--red-rgb), 0.4); transform: translateY(-3px); background: var(--bg-1); }
.fw-abbr { font-family: var(--font-ui); font-weight: 700; font-size: 1.04rem; color: var(--red-press); letter-spacing: -0.01em; }
.fw-name { font-size: 0.84rem; color: var(--ink-faint); line-height: 1.35; }

/* ------------------------- Private by design ----------------------- */
@media (max-width: 760px) { .priv-grid { grid-template-columns: 1fr !important; } }
.priv-list { list-style: none; display: flex; flex-direction: column; padding: 0; border-top: 1px solid var(--glass-border); }
.priv-list li { position: relative; padding-block: 14px; padding-inline: 34px 0; border-bottom: 1px solid var(--glass-border); color: var(--ink); font-size: 1rem; }
.priv-list li::before { content: "✓"; position: absolute; inset-inline-start: 4px; top: 13px; color: var(--red); font-weight: 800; }

/* ----------------------------- Audience ---------------------------- */
.aud-row { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; }
.aud-row li { font-size: 0.95rem; font-weight: 600; color: var(--ink); padding: 12px 20px; border-radius: 100px; background: var(--bg-1); border: 1px solid var(--glass-border-strong); transition: border-color 0.25s, transform 0.25s var(--ease), color 0.25s; }
.aud-row li:hover { border-color: rgba(var(--red-rgb), 0.45); color: var(--red-press); transform: translateY(-2px); }

/* ------------------------- Deep CTA band --------------------------- */
/* Mirrors the home page's section#contact treatment as a reusable band. */
.band-deep { background: var(--deep); color: #fff; }
.band-deep h2 { color: #fff; }
.band-deep .lead { color: rgba(255, 255, 255, 0.78); }
.band-deep .eyebrow { color: rgba(255, 255, 255, 0.92); }
.band-deep .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.band-deep .btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.8); }
.band-deep .app-id-icon { border-color: rgba(255, 255, 255, 0.18); }
.band-deep ::selection { background: rgba(255, 255, 255, 0.25); color: #fff; }

/* =====================================================================
   The Behavioral Science Dictionary (/dictionary) — members-only library.
   Reuses the Editorial Light tokens; no new colors, no amber.
   ===================================================================== */

/* ----------------------------- Members gate ------------------------- */
.dict-gate { max-width: 760px; margin-inline: auto; padding: clamp(28px, 5vw, 52px); border-radius: var(--radius-xl); text-align: center; }
.dict-gate .eyebrow { justify-content: center; }
.dict-gate-h { font-size: clamp(2rem, 5.4vw, 3.3rem); }
.dict-gate .lead { max-width: 56ch; margin-inline: auto; }
.dict-gate-stats { display: flex; justify-content: center; gap: clamp(22px, 6vw, 60px); margin: clamp(22px, 4vw, 34px) 0; }
.dict-gate-stats .stat { padding: 0; }
.dict-gate-benefits { text-align: start; max-width: 470px; margin: 0 auto; }
.dict-gate-cta { justify-content: center; margin-top: clamp(22px, 4vw, 30px); }
.dict-gate-peek { margin-top: clamp(24px, 4vw, 32px); padding-top: clamp(20px, 3vw, 26px); border-top: 1px solid var(--glass-border); }
.dict-gate-peek-label { display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 12px; }
.dict-gate-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dict-peek-chip { cursor: default; }
.dict-peek-more { color: var(--red-press); border-color: rgba(var(--red-rgb), 0.4); }

.dict-gate-cats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 760px; margin: clamp(20px, 3vw, 28px) auto 0; }
.dict-cat-tease { padding: 16px 18px; border-radius: var(--radius); background: var(--bg-1); border: 1px solid var(--glass-border); box-shadow: var(--shadow-sm); }
.dict-cat-tease-name { display: block; font-weight: 650; color: var(--deep); font-size: 1rem; }
.dict-cat-tease-blurb { display: block; color: var(--ink-faint); font-size: 0.86rem; line-height: 1.5; margin-top: 4px; }
@media (max-width: 640px) { .dict-gate-cats { grid-template-columns: 1fr; } }

/* ------------------------------- Toolbar ---------------------------- */
.dict-verify { margin-top: 22px; padding: 12px 16px; border-radius: 12px; background: rgba(var(--red-rgb), 0.05); border: 1px solid rgba(var(--red-rgb), 0.25); font-size: 0.9rem; color: var(--ink-soft); }
.dict-verify a { color: var(--red-press); text-decoration: underline; text-underline-offset: 2px; }

.dict-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: clamp(22px, 3.5vw, 34px) 0 14px; }
.dict-search { flex: 1; min-width: 240px; }
.dict-shuffle { flex: none; }
.dict-cats { margin-bottom: 4px; }

.dict-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 12px 0 22px; }
.dict-count { font-family: var(--font-ui); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-faint); }
.dict-az { display: flex; flex-wrap: wrap; gap: 1px; }
.dict-az button { width: 26px; height: 26px; padding: 0; border: none; background: none; border-radius: 7px; font-family: var(--font-ui); font-size: 0.74rem; font-weight: 700; color: var(--ink-faint); transition: color 0.15s, background 0.15s; }
.dict-az button:hover:not([disabled]) { color: var(--red); background: rgba(var(--deep-rgb), 0.06); }
.dict-az button[disabled] { opacity: 0.26; cursor: default; }

/* -------------------------------- List ------------------------------ */
.dict-letter { margin-top: 32px; }
.dict-letter:first-child { margin-top: 0; }
.dict-letter-h { font-family: var(--font-ui); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.1em; color: var(--red-press); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--glass-border); }

.dict-entry { border-radius: var(--radius-lg); margin-bottom: 12px; overflow: hidden; transition: border-color 0.25s, box-shadow 0.25s; }
.dict-entry:hover { border-color: var(--glass-border-strong); }
.dict-entry.open { box-shadow: var(--shadow); border-color: var(--glass-border-strong); }
.dict-entry.flash { animation: dictFlash 1.7s var(--ease); }
@keyframes dictFlash { 0%, 100% { box-shadow: var(--shadow-sm); } 22% { box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.4), var(--shadow); } }

.dict-entry-head { display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; background: none; border: none; padding: 16px 20px 12px; }
.dict-head-main { flex: 1; min-width: 0; }
.dict-term { font-family: var(--font-display); font-weight: 600; font-size: 1.18rem; line-height: 1.2; letter-spacing: -0.01em; color: var(--deep); transition: color 0.2s; }
.dict-entry-head:hover .dict-term { color: var(--red); }
.dict-aka { display: block; font-size: 0.78rem; color: var(--ink-faintest); margin-top: 3px; }
.dict-cat-chip { flex: none; color: var(--ink-faint); }
.dict-chevron { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--ink-faintest); border-bottom: 2px solid var(--ink-faintest); transform: rotate(45deg); transition: transform 0.25s var(--ease); margin-top: -4px; }
.dict-entry.open .dict-chevron { transform: rotate(-135deg); margin-top: 2px; }
.dict-bm { flex: none; width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: none; background: none; color: var(--ink-faintest); border-radius: 9px; cursor: pointer; transition: color 0.18s, background 0.18s; }
.dict-bm:hover { color: var(--red); background: rgba(var(--deep-rgb), 0.07); }
.dict-bm svg { width: 18px; height: 18px; }
.dict-bm.on { color: var(--red); }
.dict-bm.on svg { fill: var(--red); }
.dict-entry-head:focus-visible { outline: 2px solid rgba(var(--red-rgb), 0.5); outline-offset: 2px; border-radius: var(--radius-lg); }

.dict-short { margin: 0; padding: 0 20px 16px; color: var(--ink-soft); font-size: 0.97rem; line-height: 1.55; }
.dict-detail { margin: 0 20px; padding: 16px 0 20px; border-top: 1px solid var(--glass-border); }
.dict-def { margin: 0; color: var(--ink-soft); font-size: 1rem; line-height: 1.72; }
.dict-line { margin: 12px 0 0; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.62; }
.dict-line-k { font-family: var(--font-ui); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); margin-inline-end: 9px; }
.dict-see { margin-top: 16px; display: flex; gap: 10px 8px; flex-wrap: wrap; align-items: baseline; }
.dict-see-list { display: inline-flex; flex-wrap: wrap; gap: 7px; }
.dict-xref { display: inline-flex; align-items: center; font-size: 0.82rem; padding: 4px 11px; border-radius: 100px; background: var(--bg-2); border: 1px solid var(--glass-border); color: var(--ink-faint); }
.dict-xref-link { cursor: pointer; color: var(--red-press); font-family: inherit; transition: color 0.15s, background 0.15s, border-color 0.15s; }
.dict-xref-link:hover { color: var(--red); background: var(--bg-1); border-color: rgba(var(--red-rgb), 0.4); }

@media (max-width: 560px) {
  .dict-cat-chip { display: none; }
  .dict-shuffle { flex: 1; justify-content: center; }
}

/* ===================== Newsletter composer (admin) ===================== */
.nl-stats { margin-bottom: 26px; }
.nl-composer .sec-label h2 { font-size: 1.2rem; }

/* Code editor (left) + live email preview (right). The preview column is sized
   to hold a 600px email comfortably; both stack on narrower screens. */
.nl-grid { display: grid; grid-template-columns: minmax(0, 1fr) 640px; gap: 22px; align-items: start; }
.nl-code-col { display: flex; flex-direction: column; min-width: 0; }
.nl-preview-col { position: sticky; top: calc(var(--nav-h) + 18px); display: flex; flex-direction: column; }
.nl-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 36px; }
.nl-bar-label { font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600; }
.nl-bar .filters { gap: 4px; }
.nl-bar .filter { padding: 6px 12px; font-size: 0.76rem; }

.code-input {
  width: 100%; min-height: 580px; resize: vertical;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.6; color: var(--deep);
  background: #fbf9f6; border: 1px solid var(--glass-border-strong); border-radius: var(--radius);
  padding: 14px 16px; white-space: pre; overflow: auto; tab-size: 2;
}
.code-input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(var(--red-rgb), 0.12); }

.nl-preview-stage {
  background: #f3efe9; border: 1px solid var(--glass-border-strong); border-radius: var(--radius);
  padding: 14px; overflow: auto; max-height: 640px; display: flex; justify-content: center;
}
.nl-frame { width: 600px; max-width: 100%; height: 600px; border: 0; background: #fff; border-radius: 8px; box-shadow: var(--shadow-sm); }
.nl-preview-stage.mobile .nl-frame { width: 380px; }

.nl-schedule-box { padding: 18px 20px; border-radius: var(--radius-lg); margin-top: 18px; max-width: 440px; }
.nl-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--glass-border); }
.nl-test { display: flex; gap: 8px; align-items: center; }
.nl-test .input { margin: 0; min-width: 220px; }
.nl-composer code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.85em; background: var(--bg-2); border: 1px solid var(--glass-border); border-radius: 5px; padding: 1px 5px; color: var(--red-press); }

/* History rows */
.nl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border-radius: var(--radius); flex-wrap: wrap; }
.nl-row-main { min-width: 0; flex: 1; }
.nl-row-title { font-weight: 600; font-size: 1rem; color: var(--ink); }
.nl-row .pr-sub { font-size: 0.8rem; color: var(--ink-faint); margin-top: 5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nl-row .pr-sub .sep { opacity: 0.4; }
.nl-row-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 1040px) {
  .nl-grid { grid-template-columns: 1fr; }
  .nl-preview-col { position: static; }
  .code-input { min-height: 360px; }
}
@media (max-width: 680px) {
  .nl-actions { flex-direction: column; align-items: stretch; }
  .nl-actions > .row { justify-content: flex-start; }
  .nl-test { flex-direction: column; align-items: stretch; }
  .nl-test .input { min-width: 0; }
}

/* ----------------------- Admin Overview dashboard ------------------ */
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 32px; }
.dash-kpi { padding: 18px 20px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 4px; }
.dash-kpi-n { font-family: var(--font-ui); font-weight: 700; font-size: 1.95rem; line-height: 1; letter-spacing: -0.02em; color: var(--ink); }
.dash-kpi-l { font-size: 0.86rem; color: var(--ink-soft); font-weight: 600; }
.dash-kpi-sub { font-size: 0.78rem; color: var(--ink-faint); }

.dash-section { margin-bottom: 32px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dash-grid + .dash-grid { margin-top: 14px; }
.dash-card { padding: 18px 20px; border-radius: var(--radius); }
.dash-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-card-h h4 { font-size: 0.98rem; color: var(--ink); }
.dash-card-sub { font-size: 0.76rem; color: var(--ink-faint); white-space: nowrap; }

.dash-bars { width: 100%; height: auto; display: block; overflow: visible; }

.dash-hbars { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.dash-hbar { display: grid; grid-template-columns: minmax(0, 1fr) 2.1fr auto; gap: 12px; align-items: center; font-size: 0.86rem; }
.dash-hbar-l { color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-hbar-track { height: 8px; background: var(--bg-2); border-radius: 100px; overflow: hidden; }
.dash-hbar-fill { display: block; height: 100%; border-radius: 100px; min-width: 3px; }
.dash-hbar-n { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); font-family: var(--font-ui); }

.dash-stats { display: flex; flex-wrap: wrap; gap: 10px; }
.dash-stat { flex: 1 1 90px; padding: 12px 14px; background: var(--bg-2); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 3px; }
.dash-stat-n { font-family: var(--font-ui); font-weight: 700; font-size: 1.35rem; color: var(--ink); line-height: 1; }
.dash-stat-l { font-size: 0.76rem; color: var(--ink-faint); }

.dash-empty { font-size: 0.86rem; padding: 6px 0; }
.dash-foot { margin-top: 8px; line-height: 1.6; }

@media (max-width: 720px) { .dash-grid { grid-template-columns: 1fr; } }

/* ----------------- In-article dictionary terms (glossary) ---------- */
/* Terms found in the Behavioral Science Dictionary, auto-linked inside an
   article body (glossary.js). Red, dotted-underlined, click → popover. */
.gloss-term {
  display: inline; margin: 0; padding: 0; border: 0; background: none;
  font: inherit; color: var(--red-press); cursor: pointer;
  border-bottom: 1px dotted rgba(var(--red-rgb), 0.55);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.gloss-term:hover, .gloss-term.is-open {
  color: var(--red); border-bottom-color: var(--red);
  background: rgba(var(--red-rgb), 0.08); border-radius: 3px;
}
.gloss-term:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 2px; }

.gloss-pop {
  position: fixed; z-index: 200; width: min(330px, calc(100vw - 24px));
  background: var(--bg-1); border: 1px solid var(--glass-border-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; animation: gloss-in 0.16s var(--ease);
}
@keyframes gloss-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.gloss-pop-x {
  position: absolute; top: 7px; inset-inline-end: 7px; width: 27px; height: 27px;
  border: 0; background: none; color: var(--ink-faint); font-size: 1.25rem; line-height: 1;
  cursor: pointer; border-radius: 50%; transition: background 0.15s, color 0.15s;
}
.gloss-pop-x:hover { background: var(--bg-2); color: var(--ink); }
.gloss-pop-cat { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-press); }
.gloss-pop-term { font-family: var(--font-display); font-size: 1.18rem; color: var(--ink); margin: 4px 0 8px; padding-inline-end: 24px; }
.gloss-pop-def { font-size: 0.92rem; line-height: 1.62; color: var(--ink-soft); }
.gloss-pop-link { display: inline-block; margin-top: 13px; font-family: var(--font-ui); font-weight: 600; font-size: 0.84rem; color: var(--red-press); }
.gloss-pop-link:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }

/* ----------------- In-article YouTube click-to-play --------------- */
/* A small ▶ badge marks links that open a player instead of leaving. */
.yt-link .yt-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.05em; height: 1.05em; margin-inline-end: 0.35em;
  font-size: 0.7em; line-height: 1; border-radius: 50%;
  background: var(--red); color: #fff; vertical-align: baseline;
  transform: translateY(-0.05em);
}
.yt-link { cursor: pointer; }
/* A YouTube link alone in its paragraph (often a pasted bare URL) shows as a
   clear "play" pill so readers know it opens a video. */
.yt-link.yt-block {
  display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.6em 1.05em; border-radius: 100px;
  background: rgba(var(--red-rgb), 0.08); color: var(--red-press);
  font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem;
  text-decoration: none; transition: background 0.15s, transform 0.15s;
}
.yt-link.yt-block:hover { background: rgba(var(--red-rgb), 0.14); transform: translateY(-1px); }
.yt-link.yt-block .yt-badge { width: 1.25em; height: 1.25em; font-size: 0.8em; }

.yt-lightbox {
  position: fixed; inset: 0; z-index: 700; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(29, 21, 24, 0.72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.2s var(--ease);
}
.yt-lightbox.open { opacity: 1; }
.yt-lightbox-panel {
  position: relative; width: min(760px, 100%);
  transform: scale(0.97); transition: transform 0.2s var(--ease);
}
.yt-lightbox.open .yt-lightbox-panel { transform: none; }
.yt-lightbox-frame {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); background: #000;
}
.yt-lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-lightbox-x {
  position: absolute; top: -42px; inset-inline-end: 0; width: 34px; height: 34px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.15); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background 0.15s;
}
.yt-lightbox-x:hover { background: rgba(255, 255, 255, 0.3); }
@media (max-width: 560px) {
  .yt-lightbox-x { top: -40px; }
}

/* ----------------------- Ecosystem card logos --------------------- */
/* A brand-logo header atop each home "Ecosystem" card. App icons (Bias,
   C-Breath) carry their own fill; the wordmarks are transparent — both sit
   centered on a warm tint, contained so aspect ratios never distort. */
.eco-card-media {
  display: grid; place-items: center;
  min-height: 104px; padding: 22px 24px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--glass-border);
}
.eco-card-media img {
  max-width: 80%; max-height: 52px; width: auto; height: auto;
  object-fit: contain;
  transition: transform 0.4s var(--ease);
}
.eco-card:hover .eco-card-media img { transform: scale(1.04); }
/* Ecosystem cards close with a final line of copy — show the excerpt in full
   instead of the site-wide 3-line clamp (these cards are links, so the text
   never reappears on a detail page). */
.eco-card .excerpt { display: block; -webkit-line-clamp: unset; overflow: visible; }

/* =====================================================================
   RTL (right-to-left) overrides — Arabic pages render with
   <html dir="rtl"> (set by the build). Reading-direction layout already
   mirrors automatically via the CSS logical properties used throughout
   this file (margin/padding/border-inline-*, text-align: start/end,
   inset-inline-*). The rules below cover only what logical properties
   can't: the Arabic webfont stack, horizontal motion transforms (whose
   sign must reverse), and the few asymmetric physical bits that remain.
   Everything new lives under [dir="rtl"] — the LTR default is untouched.
   ===================================================================== */

/* --- Arabic webfont (font files are linked on /ar pages by the build) --- */
/* `dir="rtl"` is set on <html>; `body` carries its own font-family, so it's
   listed explicitly here to win the cascade (otherwise the base rule would
   only affect inherit-ing elements, not the body's own text). */
[dir="rtl"],
[dir="rtl"] body {
  font-family: "Noto Sans Arabic", "Inter", system-ui, sans-serif;
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] .gradient-text {
  font-family: "Noto Sans Arabic", "Fraunces", Georgia, serif;
}

/* --- Horizontal motion transforms: reverse the X sign (Y untouched) --- */
/* Hover-nudge affordances move toward the reading direction, so they must
   slide the other way in RTL. (translateX(±50%) centering helpers are left
   alone — they're symmetric.) */
[dir="rtl"] .navmenu-link:hover { transform: translateX(-4px); }
[dir="rtl"] .proc-step:hover { transform: translateX(-4px); }
[dir="rtl"] .q-option:hover { transform: translateX(-3px); }
/* The capability-card arrow slides in from the inline-end edge. */
[dir="rtl"] .hero-cap::after { transform: translateX(6px); }
[dir="rtl"] .hero-cap:hover::after { transform: none; }

/* --- Asymmetric physical bits not covered by a logical property --- */
/* The right nav pill's 4-value padding (0 6px 0 12px) puts its extra inner
   padding on the physical left; mirror it so the deeper pad stays on the
   pill's inner (inline-start) edge. */
[dir="rtl"] .nav-pill-right { padding: 0 12px 0 6px; }
