/* ════════════════════════════════════════════════════════════════════
 * Kindtemp Editorial App CSS
 *
 * Shared tokens and utility classes for the app-screens editorial port
 * (rotation list, intent selection, protocol result, active session).
 *
 * Binding spec: Screen Updates/BRAND_VOICE.md
 * Priority screens source from: Screen Updates/app_*_redesigned.html
 *
 * Loaded from base.html alongside output.css. Pages opt in by overriding
 * the `body_class` and `main_class` template blocks.
 * ════════════════════════════════════════════════════════════════════ */

:root {
  /* FOREST tones — atmospheric darks (for nav + footer continuity) */
  --ed-forest-deep: #0E1810;
  --ed-forest-950: #141C14;
  --ed-forest-900: #1E281E;
  --ed-forest-850: #253025;
  --ed-forest-mid: #2C3D2F;
  --ed-forest-800: #3A4A3A;
  --ed-forest-200: #A0B0A0;

  /* PAPER tones */
  --ed-paper: #EFE9DB;
  --ed-paper-deep: #E8E0CC;
  --ed-paper-warm: #F2EBDC;

  /* INK tones (text on paper) */
  --ed-ink: #1E281E;
  --ed-ink-soft: #3A4A3A;
  --ed-ink-muted: #6B7A6B;
  --ed-rule: rgba(30, 40, 30, 0.15);
  --ed-rule-soft: rgba(30, 40, 30, 0.08);

  /* ACCENTS — mid + -bright + -deep per BRAND_VOICE.md mid-tone rule */
  --ed-sunset: #F27D52;
  --ed-peach: #E8B4A0;
  --ed-peach-deep: #C88A72;
  --ed-eucalyptus: #2A9D8F;
  --ed-eucalyptus-bright: #5DCBBE;
  --ed-eucalyptus-deep: #1F7A6F;
  --ed-amber: #D4A053;
  --ed-cream: #F0EDE6;
}

/* ═══ BODY MODE OVERRIDE ═══════════════════════════════════════════
 * Applied via `{% block body_class %}editorial-body{% endblock %}`
 * Replaces the default atmospheric-bg + text-forest-text.
 * ═══════════════════════════════════════════════════════════════════ */
body.editorial-body {
  background: var(--ed-paper);
  color: var(--ed-ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
}

/* ═══ PAGE BACKGROUND LAYERS ═══════════════════════════════════════
 * Two fixed divs dropped in per page: page-bg (ambient wash)
 * and paper-grain (mandatory SVG fractalNoise, 18%, multiply).
 * ═══════════════════════════════════════════════════════════════════ */
.editorial-page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 15% 15%, rgba(232, 180, 160, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 85%, rgba(42, 157, 143, 0.06) 0%, transparent 60%),
    var(--ed-paper);
}

.editorial-paper-grain {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.35  0 0 0 0 0.25  0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 320px;
}

/* ═══ MAIN CONTAINER OVERRIDE ══════════════════════════════════════
 * base.html's <main> default is `flex-1 max-w-4xl w-full mx-auto px-4 py-8`.
 * Editorial pages override to editorial-main for 1080px + compressed padding.
 * ═══════════════════════════════════════════════════════════════════ */
main.editorial-main {
  max-width: 1080px;
  padding: 32px 24px 64px;
}

/* ═══ TYPOGRAPHY PRIMITIVES ════════════════════════════════════════ */
.ed-heading {
  font-family: 'DM Serif Display', Georgia, serif;
  color: var(--ed-ink);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.ed-serif-italic {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
}

/* ═══ GENETICS PILLS (editorial, paper-friendly) ═══════════════════ */
.ed-genetics-pill {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
  flex-shrink: 0;
  display: inline-block;
}
.ed-genetics-sativa {
  background: rgba(234, 179, 8, 0.12);
  color: #8A6508;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.ed-genetics-hybrid {
  background: rgba(59, 130, 246, 0.08);
  color: #3A5F9E;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.ed-genetics-indica {
  background: rgba(147, 51, 234, 0.08);
  color: #6E43AD;
  border: 1px solid rgba(147, 51, 234, 0.2);
}

/* ═══ FILTER PILLS ══════════════════════════════════════════════════ */
.ed-filter-pill {
  font-size: 0.72rem;
  padding: 5px 14px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.15s;
  border: 1px solid var(--ed-rule);
  background: transparent;
  color: var(--ed-ink-muted);
  display: inline-block;
  line-height: 1.5;
}
.ed-filter-pill:hover {
  background: rgba(30, 40, 30, 0.05);
  color: var(--ed-ink);
}
.ed-filter-pill.active {
  background: var(--ed-ink);
  color: var(--ed-cream);
  border-color: var(--ed-ink);
}
.ed-filter-sep {
  width: 1px;
  height: 16px;
  background: var(--ed-rule);
  margin: 0 6px;
  display: inline-block;
}

/* ═══ FLAVOR TAGS (retuned for paper backgrounds) ═══════════════════
 * Keyed on the same color field emitted by FLAVOR_COLORS in
 * engine/protocol_engine.py — template picks ed-ft-{{ tag.color }}.
 * ═══════════════════════════════════════════════════════════════════ */
.ed-flavor-tag {
  font-size: 0.6rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.04em;
  display: inline-block;
  line-height: 1.5;
  border: 1px solid transparent;
}
.ed-ft-yellow { background: rgba(234, 179, 8, 0.10); color: #8A6508; border-color: rgba(234, 179, 8, 0.25); }
.ed-ft-brown  { background: rgba(120, 100, 60, 0.10); color: #5A4A28; border-color: rgba(120, 100, 60, 0.25); }
.ed-ft-sage   { background: rgba(34, 120, 80, 0.10); color: #1F5E3E; border-color: rgba(34, 120, 80, 0.25); }
.ed-ft-purple { background: rgba(168, 85, 247, 0.08); color: #6E43AD; border-color: rgba(168, 85, 247, 0.20); }
.ed-ft-red    { background: rgba(180, 83, 9, 0.10); color: #7A3B06; border-color: rgba(180, 83, 9, 0.25); }
.ed-ft-amber  { background: rgba(200, 160, 80, 0.12); color: #7A5F20; border-color: rgba(200, 160, 80, 0.25); }
.ed-ft-olive  { background: rgba(140, 160, 80, 0.12); color: #5A6A28; border-color: rgba(140, 160, 80, 0.25); }
.ed-ft-teal   { background: rgba(42, 157, 143, 0.10); color: #1F7A6F; border-color: rgba(42, 157, 143, 0.25); }
.ed-ft-peach  { background: rgba(232, 180, 160, 0.15); color: #A55D42; border-color: rgba(232, 180, 160, 0.35); }
.ed-ft-pink   { background: rgba(236, 72, 153, 0.08); color: #9C2858; border-color: rgba(236, 72, 153, 0.20); }
.ed-ft-gray   { background: rgba(160, 160, 160, 0.12); color: #5A5A5A; border-color: rgba(160, 160, 160, 0.25); }

/* ═══ SUNSET CTA PILL ══════════════════════════════════════════════ */
.ed-btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 50px;
  background: var(--ed-sunset);
  color: var(--ed-cream);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(242, 125, 82, 0.2);
  font-family: inherit;
  border: none;
  cursor: pointer;
  line-height: 1.2;
}
.ed-btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(242, 125, 82, 0.3);
}
.ed-btn-cta .ph {
  font-size: 0.85rem;
}

/* ═══ NAV + FOOTER CHROME (match landing page exactly) ═════════════
 * Mirrors templates/landing.html `nav`+`.logo`+`.nav-i` for the header
 * and `footer`+`.colophon` for the footer. In-app base.html wraps the
 * nav in a solid-bg container (since in-app pages don't have a hero
 * backdrop underneath the absolute-positioned landing nav), but the
 * logo/wordmark sizing and typography match landing exactly.
 * ═══════════════════════════════════════════════════════════════════ */
nav.kt-nav {
  background: var(--ed-forest-950);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 20px 0;
  position: relative;
  z-index: 10000;
}
.kt-nav-i {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kt-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.kt-logo img {
  height: 32px;
  filter: brightness(1.2);
  transition: transform 0.15s;
}
.kt-logo:hover img { transform: scale(1.05); }
.kt-logo-mark {
  color: var(--ed-cream);
  font-family: 'Sofia Pro', system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.kt-nav-r {
  display: flex;
  gap: 20px;
  align-items: center;
  color: rgba(240, 237, 230, 0.7);
}
.kt-nav-r a,
.kt-nav-r button {
  color: rgba(240, 237, 230, 0.75);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: color 0.15s;
  font-family: inherit;
}
.kt-nav-r a:hover,
.kt-nav-r button:hover { color: var(--ed-cream); }
.kt-nav-r .ph { font-size: 1.3rem; }
.kt-nav-r .ph-lifebuoy { color: var(--ed-peach); }
.kt-nav-r .ph-list { font-size: 1.5rem; color: var(--ed-cream); }

/* ═══ SLIDE-OUT MENU PANEL (dark, brand-consistent) ════════════════ */
.kt-menu-panel {
  position: absolute;
  top: 100%;
  right: 0;
  width: 272px;
  background: var(--ed-forest-950);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  z-index: 50;
}
.kt-menu-panel.hidden { display: none; }
.kt-menu-inner { padding: 6px 0; }
.kt-menu-user {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.kt-menu-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ed-cream);
  margin: 0;
  line-height: 1.3;
}
.kt-menu-user-email {
  font-size: 0.75rem;
  color: rgba(240, 237, 230, 0.55);
  margin: 2px 0 0 0;
  line-height: 1.3;
}
.kt-menu-item {
  display: flex;
  align-items: center;
  padding: 11px 20px;
  font-size: 0.88rem;
  color: rgba(240, 237, 230, 0.88);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.kt-menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--ed-cream);
}
.kt-menu-item .ph {
  font-size: 1.15rem;
  margin-right: 12px;
  width: 20px;
  text-align: center;
  color: var(--ed-eucalyptus-bright);
}
/* Care-coded icons (Kind Kit) use peach — the brand's "care bridge" color */
.kt-menu-item.kt-menu-item-kind .ph { color: var(--ed-peach); }
/* Neutral items (Profile, Preferences, Sign In) use muted cream for icons */
.kt-menu-item.kt-menu-item-neutral .ph { color: rgba(240, 237, 230, 0.55); }
/* Sign out uses sunset (warm exit) */
.kt-menu-item.kt-menu-item-signout { color: var(--ed-sunset); }
.kt-menu-item.kt-menu-item-signout .ph { color: var(--ed-sunset); }
.kt-menu-item.kt-menu-item-signout:hover { background: rgba(242, 125, 82, 0.08); color: var(--ed-sunset); }
/* Sign up CTA — eucalyptus-bright accent */
.kt-menu-item.kt-menu-item-cta { font-weight: 600; color: var(--ed-eucalyptus-bright); }
.kt-menu-item.kt-menu-item-cta:hover { background: rgba(93, 203, 190, 0.08); }
.kt-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

/* ═══ COLOPHON FOOTER (match landing page) ═══════════════════════════
 * Mirrors templates/landing.html `footer`+`.colophon` styles exactly.
 * Base.html uses this on every in-app page for footer consistency.
 * ═══════════════════════════════════════════════════════════════════ */
footer.colophon-footer {
  background: var(--ed-forest-deep);
  padding: 56px 0 32px;
  text-align: center;
  position: relative;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.colophon-footer .colophon {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 40px;
}
.colophon-footer .colophon-mark-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}
.colophon-footer .colophon-mark-row img {
  height: 30px;
  filter: brightness(1.2);
}
.colophon-footer .colophon-mark {
  font-family: 'Sofia Pro', system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: var(--ed-cream);
  line-height: 1;
}
.colophon-footer .colophon-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ed-peach);
  font-weight: 600;
  margin-bottom: 32px;
  margin-top: 0;
}
.colophon-footer .colophon-line {
  color: rgba(160, 176, 160, 0.6);
  font-size: 0.85rem;
  line-height: 1.6;
  font-style: italic;
  font-family: 'DM Serif Display', Georgia, serif;
  margin: 0;
}
.colophon-footer .colophon-meta {
  font-size: 0.75rem;
  color: rgba(160, 176, 160, 0.6);
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.6;
}
.colophon-footer .colophon-meta a {
  color: rgba(160, 176, 160, 0.7);
  text-decoration: none;
  margin: 0 8px;
  transition: color 0.15s;
}
.colophon-footer .colophon-meta a:hover { color: var(--ed-cream); }
.colophon-footer .colophon-meta .sep { color: rgba(160, 176, 160, 0.3); }

/* ════════════════════════════════════════════════════════════════════
 * PROTOCOL RESULT SCREEN (Priority 3)
 *
 * One continuous dark "Terpene Crystal zone" (hero + chemistry footprint
 * sharing a single gradient), then paper sections with chemistry-tinted
 * washes. Section rhythm per BRAND_VOICE.md and Screen Updates mockup.
 * ════════════════════════════════════════════════════════════════════ */

/* ═══ PROTOCOL PAGE BODY OVERRIDE ══════════════════════════════════
 * The protocol page is full-bleed: sections alternate dark/paper and
 * wash across the viewport. The default `editorial-main` max-width +
 * padding would box the content. Use `protocol-body` instead.
 * ═══════════════════════════════════════════════════════════════════ */
body.protocol-body {
  background: var(--ed-paper);
  color: var(--ed-ink);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.6;
}
body.protocol-body main.protocol-main {
  max-width: none;
  padding: 0;
  margin: 0;
}

/* ═══ REUSABLE PAPER-SECTION CHROME (also used by Priority 4) ══════ */
.ed-paper-section {
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.ed-paper-section .ed-warm-wash {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 15% 25%, rgba(242,125,82,0.05) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(232,180,160,0.08) 0%, transparent 60%);
}
.ed-paper-section .ed-paper-grain-overlay {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0.18; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='0.65' numOctaves='3' stitchTiles='stitch' type='fractalNoise'/%3E%3CfeColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.35  0 0 0 0 0.25  0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 320px;
}
.ed-paper-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.ed-paper-issue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--ed-rule);
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ed-ink-muted);
  gap: 16px;
  flex-wrap: wrap;
}
.ed-paper-issue-bar .left {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.ed-paper-issue-bar .num { color: var(--ed-sunset); font-weight: 700; }
.ed-paper-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ed-sunset);
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ed-paper-kicker::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--ed-sunset);
}
.ed-editorial-h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ed-ink);
  margin-bottom: 28px;
  max-width: 800px;
}
.ed-editorial-h2 .accent {
  font-style: italic;
  color: var(--ed-sunset);
}

/* ═══ TERPENE CRYSTAL DARK ZONE (hero + chemistry footprint) ═══════
 * One continuous surface carrying the chemistry gradient. Hero copy sits
 * on the top portion; chemistry footprint card sits on the bottom with a
 * translucent frosted frame so the gradient shows through.
 * ═══════════════════════════════════════════════════════════════════ */
.ed-dark-zone {
  position: relative;
  background: var(--ed-forest-deep);
  overflow: hidden;
  isolation: isolate;
}
.ed-chemistry-gradient {
  position: absolute; inset: -8%; z-index: 1;
  /* `background` set inline from build_hero_gradient_css(...) */
  filter: blur(50px) saturate(1.15);
  opacity: 0.92;
  animation: ed-drift 28s ease-in-out infinite alternate;
}
@keyframes ed-drift {
  0%   { transform: scale(1.0) translate(0, 0); }
  100% { transform: scale(1.05) translate(-1%, 1%); }
}
.ed-dark-zone .ed-dark-grain {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  opacity: 0.20; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='1.0' numOctaves='4' stitchTiles='stitch' type='fractalNoise'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 400px;
}
.ed-dark-zone .ed-vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(ellipse 80% 85% at 50% 50%, transparent 35%, rgba(8,12,8,0.55) 100%);
}
.ed-dark-zone .ed-zone-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: 4;
  background: linear-gradient(to bottom, transparent 0%, var(--ed-paper) 100%);
  pointer-events: none;
}

/* ─── Hero top portion ─────────────────────────────────────────────── */
.ed-hero-content {
  position: relative; z-index: 10;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 24px 28px;
}
.ed-hero-issue-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
  color: rgba(240,237,230,0.65);
  gap: 16px;
  flex-wrap: wrap;
}
.ed-hero-issue-bar .left { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.ed-hero-issue-bar .num { color: var(--ed-peach); font-weight: 700; }
.ed-hero-issue-bar a {
  color: var(--ed-peach);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ed-hero-issue-bar a:hover { color: var(--ed-cream); }
.ed-hero-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ed-peach);
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ed-hero-kicker::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--ed-peach);
}
.ed-hero-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 4.8vw, 3.6rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--ed-cream);
  margin-bottom: 16px;
}
.ed-hero-title .strain {
  font-style: italic;
  color: var(--ed-peach);
}
.ed-hero-deck {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(240,237,230,0.85);
  max-width: 640px;
  margin-bottom: 26px;
}

/* Meta pills row (genetics / device / experience / match) */
.ed-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ed-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50px;
  font-size: 0.78rem;
  color: var(--ed-cream);
  backdrop-filter: blur(8px);
}
.ed-meta-pill .ph { font-size: 0.95rem; opacity: 0.7; }
.ed-meta-pill.match {
  background: rgba(93,203,190,0.14);
  border-color: rgba(93,203,190,0.38);
  color: var(--ed-eucalyptus-bright);
}
.ed-meta-pill.match .ph { opacity: 1; }
.ed-meta-pill.mismatch {
  background: rgba(232,180,160,0.14);
  border-color: rgba(232,180,160,0.36);
  color: var(--ed-peach);
}

/* ─── Chemistry Footprint (bottom portion of dark zone) ────────────── */
.ed-chem-footprint {
  position: relative; z-index: 10;
  max-width: 1080px;
  margin: 18px auto 0;
  padding: 0 24px 56px;
}
.ed-chem-card {
  background: rgba(20,28,20,0.28);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(240,237,230,0.10);
  border-radius: 4px;
  padding: 24px 28px;
}
.ed-chem-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(240,237,230,0.10);
  gap: 16px;
  flex-wrap: wrap;
}
.ed-chem-card-head .label {
  font-size: 0.66rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ed-eucalyptus-bright);
  font-weight: 700;
}
.ed-chem-card-head .meta {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 0.92rem;
  color: rgba(240,237,230,0.72);
}
.ed-chem-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.ed-chem-item { display: flex; flex-direction: column; gap: 4px; }
.ed-chem-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--ed-cream);
  font-weight: 600;
}
.ed-chem-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.ed-chem-pct {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.55rem;
  color: var(--ed-cream);
  line-height: 1;
  letter-spacing: -0.01em;
}
.ed-chem-pct .unit {
  font-size: 0.82rem;
  color: rgba(240,237,230,0.6);
  margin-left: 2px;
}
.ed-chem-role {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 0.78rem;
  color: rgba(240,237,230,0.7);
  line-height: 1.35;
  margin-top: 2px;
}

/* ═══ NOTE CALLOUTS (warnings, conversion, degradation) ════════════ */
.ed-note-card {
  position: relative;
  padding: 16px 18px 16px 22px;
  background: rgba(240,237,230,0.5);
  border-radius: 4px;
  margin-bottom: 12px;
  border-left: 3px solid var(--ed-ink-muted);
}
.ed-note-card.warn    { border-left-color: var(--ed-sunset); }
.ed-note-card.info    { border-left-color: var(--ed-eucalyptus); }
.ed-note-card.freshness { border-left-color: var(--ed-peach-deep); }
.ed-note-label {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ed-ink-muted);
  margin-bottom: 4px;
}
.ed-note-card.warn .ed-note-label { color: var(--ed-sunset); }
.ed-note-card.info .ed-note-label { color: var(--ed-eucalyptus-deep); }
.ed-note-card.freshness .ed-note-label { color: var(--ed-peach-deep); }
.ed-note-body {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ed-ink-soft);
}
.ed-note-body details { margin-top: 8px; }
.ed-note-body summary {
  font-size: 0.78rem;
  color: var(--ed-eucalyptus-deep);
  cursor: pointer;
  font-weight: 600;
}
.ed-note-body .coa-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 4px 16px;
  font-size: 0.78rem;
  color: var(--ed-ink-muted);
}

/* ═══ PROTOCOL STEPS (editorial articles) ══════════════════════════ */
.ed-protocol-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.ed-step-article {
  padding: 28px 0 30px;
  border-top: 1px solid var(--ed-rule);
  max-width: 760px;
}
.ed-step-article:first-child { padding-top: 24px; }
.ed-step-article:last-child { border-bottom: 1px solid var(--ed-rule); }
.ed-step-article h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: 1.65rem;
  line-height: 1.15;
  color: var(--ed-ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.ed-step-article h3 .figure {
  font-style: italic;
  color: var(--ed-sunset);
  flex-shrink: 0;
}
.ed-step-lede {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.5;
  color: var(--ed-ink);
  margin-bottom: 14px;
}
.ed-step-body p {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ed-ink-soft);
  margin-bottom: 12px;
}

/* Insight callout (eucalyptus left rule) */
.ed-insight {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: rgba(42,157,143,0.05);
  border-left: 2px solid var(--ed-eucalyptus);
  border-radius: 2px;
  margin: 14px 0;
}
.ed-insight .ph {
  color: var(--ed-eucalyptus-deep);
  font-size: 1.05rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.ed-insight p {
  font-size: 0.86rem;
  color: var(--ed-ink-soft);
  margin: 0;
  line-height: 1.55;
}

/* Visual-cue callout (paper-warm, subtle) */
.ed-visual-cue {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  background: rgba(232,180,160,0.10);
  border-radius: 2px;
  margin: 10px 0;
  font-size: 0.86rem;
  color: var(--ed-ink-soft);
  line-height: 1.5;
}
.ed-visual-cue .ph { color: var(--ed-peach-deep); flex-shrink: 0; margin-top: 2px; }

/* Crossroads block (dashed top border) */
.ed-crossroads {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--ed-rule);
}
.ed-crossroads-label {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 0.84rem;
  color: var(--ed-ink-muted);
  margin-bottom: 10px;
}
.ed-crossroad-row {
  display: flex;
  gap: 14px;
  font-size: 0.88rem;
  margin-bottom: 6px;
  line-height: 1.5;
}
.ed-crossroad-tag {
  font-weight: 700;
  color: var(--ed-eucalyptus-deep);
  flex-shrink: 0;
  min-width: 60px;
}
.ed-crossroad-text { color: var(--ed-ink-soft); }

/* Rich Crossroads — transition narrative + kicker + option cards */
.ed-crossroads-narrative {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ed-ink);
  margin: 0 0 12px 0;
  max-width: 640px;
}
.ed-crossroads-kicker {
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ed-eucalyptus-deep);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ed-crossroads-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.ed-crossroads-option {
  padding: 12px 14px;
  background: rgba(240, 237, 230, 0.55);
  border: 1px solid var(--ed-rule);
  border-radius: 4px;
  transition: background 0.15s, border-color 0.15s;
}
.ed-crossroads-option.recommended {
  background: rgba(42, 157, 143, 0.08);
  border-color: rgba(42, 157, 143, 0.32);
  box-shadow:
    0 0 0 1px rgba(42, 157, 143, 0.15),
    0 6px 18px rgba(42, 157, 143, 0.10);
}
.ed-crossroads-option-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.ed-crossroads-option-tag {
  font-weight: 700;
  color: var(--ed-eucalyptus-deep);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  min-width: 60px;
}
.ed-crossroads-option-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ed-eucalyptus-deep);
  background: rgba(42, 157, 143, 0.14);
  padding: 2px 10px 2px 8px;
  border-radius: 50px;
  border: 1px solid rgba(42, 157, 143, 0.28);
}
.ed-crossroads-option-badge .ph { font-size: 0.82rem; }
.ed-crossroads-option-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ed-ink-soft);
  margin: 0;
}

/* Step-stop (sunset border, kill signs) */
.ed-step-stop {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  background: rgba(242,125,82,0.06);
  border-left: 2px solid var(--ed-sunset);
  border-radius: 2px;
  margin-top: 14px;
}
.ed-step-stop .ph {
  color: var(--ed-sunset);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.ed-step-stop-text {
  font-size: 0.85rem;
  color: var(--ed-ink-soft);
  line-height: 1.55;
}
.ed-step-stop-text strong {
  color: var(--ed-sunset);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Semantic meta pills (precision/patience/dose/volume/cue) */
.ed-step-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.ed-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
  line-height: 1.2;
}
.ed-step-pill .ph { font-size: 0.9rem; }
.ed-step-pill.precision {
  background: rgba(31,122,111,0.08);
  color: var(--ed-eucalyptus-deep);
  border-color: rgba(31,122,111,0.25);
}
.ed-step-pill.patience {
  background: rgba(242,125,82,0.08);
  color: var(--ed-sunset);
  border-color: rgba(242,125,82,0.25);
}
.ed-step-pill.dose {
  background: rgba(31,122,111,0.08);
  color: var(--ed-eucalyptus-deep);
  border-color: rgba(31,122,111,0.25);
}
.ed-step-pill.volume {
  background: rgba(212,160,83,0.10);
  color: #7A5F20;
  border-color: rgba(212,160,83,0.28);
}
.ed-step-pill.cue {
  background: rgba(107,122,107,0.08);
  color: var(--ed-ink-muted);
  border-color: rgba(107,122,107,0.22);
}
.ed-step-pill.finish {
  background: rgba(232,180,160,0.10);
  color: var(--ed-peach-deep);
  border-color: rgba(232,180,160,0.32);
}

/* ═══ ROADMAP ═══════════════════════════════════════════════════════ */
.ed-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 28px;
  border-top: 1.5px solid var(--ed-ink);
}
.ed-roadmap-phase {
  padding: 20px 16px 0 0;
  border-right: 1px solid var(--ed-rule);
  position: relative;
}
.ed-roadmap-phase:last-child { border-right: none; }
.ed-roadmap-phase::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.ed-roadmap-phase.phase-1::before { background: #93C5FD; }
.ed-roadmap-phase.phase-2::before { background: #5EEAD4; }
.ed-roadmap-phase.phase-3::before { background: #6BAF8D; }
.ed-roadmap-phase.phase-4::before { background: #FCD34D; }
.ed-roadmap-phase.phase-5::before { background: #F4926D; }
.ed-roadmap-time {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 0.78rem;
  color: var(--ed-ink-muted);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}
.ed-roadmap-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.28rem;
  color: var(--ed-ink);
  margin-bottom: 8px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.ed-roadmap-desc {
  font-size: 0.85rem;
  color: var(--ed-ink-soft);
  line-height: 1.55;
}

/* Adaptive roadmap for 3 phases (combustion) */
.ed-roadmap-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.ed-roadmap-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ═══ GENERAL RULES (pull-quote treatment) ═════════════════════════ */
.ed-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 28px;
}
.ed-rule-card {
  padding-top: 16px;
  border-top: 2px solid var(--ed-ink);
}
.ed-rule-num {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ed-ink-muted);
  margin-bottom: 10px;
}
.ed-rule-headline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.15rem;
  color: var(--ed-ink);
  margin-bottom: 10px;
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.ed-rule-body {
  font-size: 0.88rem;
  color: var(--ed-ink-soft);
  line-height: 1.65;
}

/* Experience pull quote */
.ed-experience-note {
  margin: 48px auto 0;
  max-width: 720px;
  text-align: center;
  padding: 28px 32px;
  background: var(--ed-paper-warm);
  border-top: 1px solid var(--ed-peach);
  border-bottom: 1px solid var(--ed-peach);
}
.ed-experience-note .label {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ed-sunset);
  font-weight: 700;
  margin-bottom: 10px;
}
.ed-experience-note q {
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ed-ink);
  display: block;
  quotes: none;
}
.ed-experience-note q::before, .ed-experience-note q::after { content: none; }

/* ═══ ACTION ZONE (closing dark moment) ════════════════════════════ */
.ed-action-zone {
  background: var(--ed-forest-deep);
  color: var(--ed-cream);
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}
.ed-action-zone .ed-ambient {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 50% 100% at 50% 100%, rgba(242,125,82,0.18) 0%, transparent 70%);
}
.ed-action-zone .ed-dark-grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0.18; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='1.0' numOctaves='4' stitchTiles='stitch' type='fractalNoise'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 400px;
}
.ed-action-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.ed-action-headline {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.75rem;
  color: var(--ed-cream);
  margin-bottom: 24px;
  line-height: 1.2;
}
.ed-action-headline .accent {
  font-style: italic;
  color: var(--ed-peach);
}
.ed-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ed-sunset);
  color: var(--ed-cream);
  padding: 16px 34px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 6px 24px rgba(242,125,82,0.28);
  font-family: inherit;
}
.ed-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(242,125,82,0.38);
}
.ed-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(240,237,230,0.8);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  padding: 14px 26px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  margin-left: 10px;
  transition: all 0.2s;
  font-family: inherit;
  cursor: pointer;
}
.ed-btn-secondary:hover {
  border-color: var(--ed-peach);
  color: var(--ed-cream);
}
.ed-saved-note {
  margin-top: 16px;
  font-family: 'DM Serif Display', Georgia, serif;
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(240,237,230,0.55);
}
.ed-upgrade-card {
  margin-top: 18px;
  padding: 22px 24px;
  background: rgba(240,237,230,0.06);
  border: 1px solid rgba(240,237,230,0.12);
  border-radius: 8px;
  text-align: center;
}
.ed-upgrade-card p {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: rgba(240,237,230,0.7);
}
.ed-upgrade-card .price {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.6rem;
  color: var(--ed-cream);
  line-height: 1.1;
}
.ed-upgrade-card .price .per {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: rgba(240,237,230,0.45);
}
.ed-upgrade-card .pilot {
  font-size: 0.72rem;
  color: rgba(240,237,230,0.45);
  margin-top: 8px;
}
.ed-upgrade-card .pilot a {
  color: var(--ed-eucalyptus-bright);
  text-decoration: none;
}

/* ═══ MOBILE BREAKPOINTS ═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .ed-hero-content { padding: 32px 20px 24px; }
  .ed-hero-title { font-size: 2rem; }
  .ed-chem-footprint { padding: 0 20px 44px; }
  .ed-chem-list { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .ed-paper-section { padding: 52px 0; }
  .ed-paper-container { padding: 0 20px; }
  .ed-step-article { padding: 22px 0 26px; }
  .ed-roadmap-grid,
  .ed-roadmap-grid.cols-3,
  .ed-roadmap-grid.cols-5 { grid-template-columns: 1fr; }
  .ed-roadmap-phase { border-right: none; border-bottom: 1px solid var(--ed-rule); padding: 18px 0 16px; }
  .ed-roadmap-phase:last-child { border-bottom: none; }
  .ed-rules-grid { grid-template-columns: 1fr; gap: 28px; }
  .ed-action-headline { font-size: 1.4rem; }
  .ed-btn-secondary { margin-left: 0; margin-top: 10px; }
}

/* ═══ REDUCED MOTION ═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .ed-btn-cta:hover { transform: none; }
  .ed-btn-primary:hover { transform: none; }
  .ed-chemistry-gradient { animation: none; }
  * { transition: none !important; }
}
