/* ============================================================
   joan-lee.com — Executive Authority subpage layer
   Re-skins legacy .edition-page subpages onto the new palette.
   Loaded after main.css. Activated by adding `.exec-themed` to body.
   ============================================================ */

/* === Token re-map: when body has .exec-themed, swap legacy variables === */
body.exec-themed {
  /* Reed/olive earth tones → Obsidian / Concrete */
  --reed-deep:        #0A0A0A;
  --reed-deepest:     #050505;
  --reed-green:       #2A2A2A;
  --olive-grey:       #B8B8B8;
  --olive-grey-soft:  #6B6B6B;

  /* Teal spark → Davy gold (rare accent) */
  --teal-spark:       #B89968;

  /* Cream → Obsidian + Concrete (darks now act as page background) */
  --cream-warm:       #0A0A0A;
  --cream-bright:     #141414;

  /* Semantic re-map */
  --bg-dark:          #0A0A0A;
  --bg-deepest:       #050505;
  --bg-cream:         #0A0A0A;
  --bg-cream-warm:    #141414;
  --text-cream:       #EAEAEA;
  --text-dark:        #EAEAEA;
  --text-muted-dark:  rgba(232, 232, 232, 0.62);
  --text-muted-cream: rgba(184, 184, 184, 0.78);
  --text-cream-muted: rgba(232, 232, 232, 0.55);
  --accent-red:       #B89968;
  --accent-yellow:    #B89968;
  --hairline-cream:   rgba(255, 255, 255, 0.10);
  --hairline-dark:    rgba(255, 255, 255, 0.14);
  --hairline:         rgba(255, 255, 255, 0.10);
  --hairline-soft:    rgba(255, 255, 255, 0.06);
  --media-bezel:      rgba(255, 255, 255, 0.08);

  /* Image filters: cool monochrome — legacy tone vars */
  --tone-cream:       grayscale(0.55) contrast(1.06) brightness(1.0) hue-rotate(-6deg);
  --tone-dark:        grayscale(0.55) contrast(1.06) brightness(1.0) hue-rotate(-6deg);

  /* Typography swap */
  --serif:            'Playfair Display', 'EB Garamond', Georgia, serif;
  --sans:             'Inter', -apple-system, 'Helvetica Neue', sans-serif;
  --mono:             'JetBrains Mono', 'SF Mono', monospace;

  background: #0A0A0A;
  color: #EAEAEA;
}

body.exec-themed a { color: inherit; }

/* === Force hardcoded hex from main.css to use the new tokens === */
/* Backgrounds explicitly hardcoded as old greens/creams in main.css */
body.exec-themed [class*="edition"] [style*="background"],
body.exec-themed .edition-page,
body.exec-themed .edition-hero,
body.exec-themed .edition-hero.is-compact,
body.exec-themed .edition-card-section,
body.exec-themed .edition-end,
body.exec-themed .edition-citations,
body.exec-themed .edition-spec,
body.exec-themed .edition-body,
body.exec-themed .edition-body--lede,
body.exec-themed .edition-divider,
body.exec-themed .edition-pagination,
body.exec-themed .edition-bookshelf,
body.exec-themed .edition-stagger {
  background: transparent !important;
  color: var(--text-cream);
}

/* Page-level dark canvas */
body.exec-themed.edition-page,
body.exec-themed .edition-page,
body.exec-themed article.edition,
body.exec-themed main,
body.exec-themed > * {
  background-color: var(--bg-dark);
}

/* Override any inline gradient backgrounds (lines 485 / 1944 / 2147 etc in main.css) */
body.exec-themed .edition-hero,
body.exec-themed [class*="edition"]:not(figure):not(img):not(video):not(picture) {
  background-image: none !important;
  background-color: transparent !important;
}

/* Re-apply page-bg to body itself */
body.exec-themed {
  background-color: var(--bg-dark) !important;
  background-image: none !important;
}

/* ============================================================
   Top tag — "Plate II · Yongjia"  → executive treatment
   ============================================================ */
body.exec-themed .edition-mark {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-red);
  padding: 22px var(--gutter);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
body.exec-themed .edition-mark .dot { color: var(--accent-red); margin: 0 8px; }
body.exec-themed .edition-return {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--olive-grey);
  border-bottom: 1px solid transparent;
  padding-bottom: 4px;
}
body.exec-themed .edition-return:hover {
  color: var(--accent-red);
  border-bottom-color: var(--accent-red);
}

/* ============================================================
   Hero block on subpages
   ============================================================ */
body.exec-themed .edition-hero {
  padding-top: 140px !important;
  padding-bottom: 64px !important;
}
body.exec-themed .edition-meta,
body.exec-themed .edition-meta-line {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--olive-grey-soft);
}
body.exec-themed .edition-meta .sep { color: var(--accent-red); margin: 0 14px; }
body.exec-themed .edition-meta-line { border-top: 1px solid var(--hairline); padding-top: 18px; }

body.exec-themed .edition-display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(48px, 6vw, 88px);
  line-height: 1.06;
  letter-spacing: -0.012em;
  color: #FFFFFF;
}
body.exec-themed .edition-display em {
  color: var(--accent-red);
  font-style: italic;
  font-weight: 400;
}
body.exec-themed .edition-deck {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text-muted-dark);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.65;
}
body.exec-themed .edition-deck strong,
body.exec-themed .edition-deck em {
  color: var(--text-cream);
  font-weight: 500;
  font-style: normal;
}

/* ============================================================
   Eyebrows + H2s within page body
   ============================================================ */
body.exec-themed .edition-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-red);
}
body.exec-themed .edition-h2 {
  font-family: var(--serif);
  font-weight: 500;
  color: #FFFFFF;
  letter-spacing: -0.005em;
  line-height: 1.18;
}
body.exec-themed .edition-h2 em {
  font-style: italic;
  color: var(--accent-red);
  font-weight: 400;
}
body.exec-themed .edition-body p,
body.exec-themed .edition-body--lede p {
  color: var(--text-muted-dark);
  line-height: 1.75;
}
body.exec-themed .edition-body p strong,
body.exec-themed .edition-body--lede p strong {
  color: var(--text-cream);
  font-weight: 500;
}
body.exec-themed .edition-body p em,
body.exec-themed .edition-body--lede p em {
  color: var(--accent-red);
  font-style: italic;
}
body.exec-themed .edition-body p a,
body.exec-themed .edition-body--lede p a {
  color: var(--text-cream);
  border-bottom: 1px solid var(--accent-red);
}
body.exec-themed .edition-body p a:hover,
body.exec-themed .edition-body--lede p a:hover { color: var(--accent-red); }

body.exec-themed .edition-divider .glyph { color: var(--accent-red); opacity: 0.6; }

/* ============================================================
   Plates (figures with images / videos)
   ============================================================ */
body.exec-themed .edition-plate-frame {
  background: var(--bg-cream-warm);
  border: 1px solid var(--hairline);
}
body.exec-themed .edition-plate img,
body.exec-themed .edition-plate video {
  filter: var(--tone-dark);
  transition: filter 0.6s ease;
}
body.exec-themed .edition-plate:hover img,
body.exec-themed .edition-plate:hover video {
  filter: var(--tone-dark) brightness(1.06);
}
body.exec-themed .edition-plate-caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted-dark);
}
body.exec-themed .plate-no {
  color: var(--accent-red);
  margin-right: 10px;
  letter-spacing: 0.28em;
}

/* ============================================================
   Spec ledger (programme / architect / scale ...)
   ============================================================ */
body.exec-themed .edition-spec {
  background: var(--bg-cream-warm);
  border: 1px solid var(--hairline);
  padding: 32px;
}
body.exec-themed .edition-spec > div {
  border-bottom: 1px solid var(--hairline);
  padding: 14px 0;
}
body.exec-themed .edition-spec > div:last-child { border-bottom: 0; }
body.exec-themed .edition-spec dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-red);
}
body.exec-themed .edition-spec dd { color: var(--text-cream); }
body.exec-themed .edition-spec dd a {
  color: var(--text-cream);
  border-bottom: 1px solid var(--accent-red);
}

/* ============================================================
   Citations
   ============================================================ */
body.exec-themed .edition-citations {
  background: var(--bg-cream-warm);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
body.exec-themed .edition-citations-title {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent-red);
}
body.exec-themed .edition-citations-title .dot { color: var(--olive-grey-soft); }
body.exec-themed .edition-citations li { border-bottom: 1px solid var(--hairline); }
body.exec-themed .edition-citations .cite-no { color: var(--accent-red); font-family: var(--mono); }
body.exec-themed .edition-citations .cite-body em {
  color: var(--text-cream);
  font-style: italic;
}
body.exec-themed .edition-citations .cite-body a {
  color: var(--text-cream);
  border-bottom: 1px solid var(--accent-red);
}
body.exec-themed .edition-citations .cite-body a:hover { color: var(--accent-red); }
body.exec-themed .edition-citations .cite-meta {
  color: var(--olive-grey-soft);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
}

/* ============================================================
   Pagination + end mark
   ============================================================ */
body.exec-themed .edition-end {
  padding: 80px var(--gutter);
  border-top: 1px solid var(--hairline);
}
body.exec-themed .edition-end-mark {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--olive-grey-soft);
}
body.exec-themed .edition-end-mark .glyph { color: var(--accent-red); }

body.exec-themed .edition-pagination {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--hairline);
  margin-top: 56px;
}
body.exec-themed .edition-pagination a {
  background: var(--bg-cream-warm);
  padding: 32px 28px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 22px);
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background 0.2s;
}
body.exec-themed .edition-pagination a:hover { background: #1F1F1F; color: var(--accent-red); }
body.exec-themed .edition-pagination .label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-red);
  font-weight: 400;
}
body.exec-themed .edition-pagination .next { text-align: right; }

/* ============================================================
   Card grid (homepage flow if reused)
   ============================================================ */
body.exec-themed .edition-card,
body.exec-themed .edition-card-frame {
  background: var(--bg-cream-warm);
  border: 1px solid var(--hairline);
}

/* ============================================================
   ASK for design book — shared section injected on each subpage
   ============================================================ */
.exec-ask {
  padding: 80px var(--gutter, clamp(24px, 5vw, 80px));
  background: linear-gradient(180deg, transparent 0%, rgba(184,153,104,0.04) 100%);
  border-top: 1px solid var(--hairline-strong, rgba(255,255,255,0.16));
  margin-top: 80px;
}
.exec-ask-shell {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.exec-ask-eyebrow {
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #B89968;
  margin-bottom: 20px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
}
.exec-ask-eyebrow::before,
.exec-ask-eyebrow::after {
  content: '';
  width: 28px; height: 1px;
  background: #B89968;
}
.exec-ask-h2 {
  font-family: var(--serif, 'Playfair Display', serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  color: #FFFFFF;
  margin: 0 0 12px;
  letter-spacing: -0.005em;
}
.exec-ask-h2 em { font-style: italic; color: #B89968; font-weight: 400; }
.exec-ask-deck {
  font-family: var(--sans, 'Inter', sans-serif);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(232, 232, 232, 0.7);
  max-width: 540px;
  margin: 0 auto 36px;
}
.exec-ask-cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #FFFFFF;
  border: 1px solid #B89968;
  padding: 16px 32px;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, gap 0.3s ease;
}
.exec-ask-cta:hover {
  background: #B89968;
  color: #0A0A0A;
  gap: 22px;
}
.exec-ask-cta .arrow { font-weight: 400; }
.exec-ask-meta {
  margin-top: 28px;
  font-family: var(--mono, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(184, 184, 184, 0.55);
}

/* ============================================================
   Body-wide font swap so legacy chrome picks up Playfair + Inter
   ============================================================ */
body.exec-themed {
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.exec-themed h1, body.exec-themed h2, body.exec-themed h3 {
  font-family: var(--serif);
}
