/* Plan B skin for the shared pages (songs, movies, books, startups, the full coaching page…).
   Loaded by script.js only while the Plan B preview is on; it repaints the style.css tokens. */
html.planb[data-theme="black"] {
  --navy: #000; --charcoal: #0b0b0d;
  --text: #f2efe9; --text-muted: rgba(242,239,233,0.58);
  --border: rgba(255,255,255,0.09); --card-bg: rgba(255,255,255,0.03);
  --gold: #c9a96e; --gold-warm: #c9a96e; --gold-light: rgba(201,169,110,0.10); --gold-border: rgba(201,169,110,0.32);
  --white: #ffffff; --cream: #f8f5f0;
  --rule: rgba(255,255,255,0.08); --muted: rgba(255,255,255,0.55); --ink: #fff;
}
html.planb[data-theme="ivory"] {
  --navy: #fbfaf6; --charcoal: #f3f0e8;
  --text: #2a241c; --text-muted: #776c5c;
  --border: rgba(40,34,26,0.11); --card-bg: #fff;
  --gold: #a5803a; --gold-warm: #a5803a; --gold-light: rgba(165,128,58,0.10); --gold-border: rgba(165,128,58,0.35);
  --white: #2a241c; --cream: #2a241c;
  --rule: rgba(40,34,26,0.11); --muted: #776c5c; --ink: #2a241c;
}

html.planb[data-theme="missal"] {
  --navy: #ffffff; --charcoal: #f4f3f1;
  --text: #141210; --text-muted: #6b655c;
  --border: rgba(20,18,16,0.12); --card-bg: #fff;
  --gold: #9b1c1c; --gold-warm: #9b1c1c; --gold-light: rgba(155,28,28,0.07); --gold-border: rgba(155,28,28,0.35);
  --white: #141210; --cream: #141210;
  --rule: rgba(20,18,16,0.12); --muted: #6b655c; --ink: #141210;
}

html.planb body { background: var(--navy) !important; background-image: none !important; color: var(--text); }
html.planb[data-theme="ivory"] body { background: #fbfaf6 !important; }
html.planb[data-theme="missal"] body { background: #fff !important; }
html.planb header { background: var(--navy) !important; border-bottom: 1px solid var(--border); backdrop-filter: none; }
html.planb .nav-panel, html.planb .nav-sub, html.planb .nav-dropdown { background: var(--navy) !important; border-color: var(--border) !important; }
html.planb .nav-panel a, html.planb .nav-section-title { color: var(--text) !important; }

/* header: same as the Plan B pages — brand, three words, theme, language */
html.planb header { border-bottom: 0 !important; }
html.planb[data-theme="ivory"] header { background: #fbfaf6 !important; }
html.planb[data-theme="missal"] header { background: #fff !important; }
html.planb .header-cta { display: none !important; }
html.planb .hamburger { display: inline-flex !important; color: var(--text) !important; background: none !important; border: 1px solid var(--border) !important; }
html.planb .nav-panel { box-shadow: 0 10px 30px rgba(0,0,0,0.06); padding: 0.5rem 0 !important; min-width: 240px; border-radius: 0 !important; }
html.planb .nav-panel a { display: block; padding: 0.55rem 1.2rem !important; border: 0 !important; color: var(--text) !important; text-decoration: none; }
html.planb .nav-panel a.sub { padding: 0.32rem 1.2rem 0.32rem 2rem !important; font: italic 400 0.95rem 'Cormorant Garamond', Georgia, serif !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text-muted) !important; }
html.planb .nav-panel a:hover { color: var(--gold) !important; background: none !important; }
html.planb .nav-panel a { font-family: 'Inter', sans-serif; letter-spacing: 1.4px; text-transform: uppercase; font-size: 0.62rem !important; }
html.planb .nav-panel .plan-a { color: var(--text-muted) !important; border-top: 1px solid var(--border); padding-top: 0.7rem; }
html.planb .site-name { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 0.95rem !important; letter-spacing: 3px; color: var(--text) !important; }
html.planb .site-name span { color: var(--gold) !important; }
html.planb .pb-nav { display: flex; gap: 1.1rem; margin-right: 0.8rem; }
html.planb .pb-nav a { font: 500 0.6rem 'Inter', sans-serif; letter-spacing: 1.6px; text-transform: uppercase; color: var(--text-muted); text-decoration: none; }
html.planb .pb-nav a:hover, html.planb .pb-nav a.on { color: var(--gold); }
html.planb .lang-toggle { border-color: var(--border) !important; background: none !important; }

/* no photo banner: the title sits on the page, in serif, like the tree page */
html.planb .page-hero { height: auto !important; min-height: 0 !important; padding: 2.6rem 1.2rem 0.6rem !important; text-align: center; }
html.planb .page-hero-bg { display: none !important; }
html.planb .page-hero-content { padding: 0 !important; display: flex; flex-direction: column; align-items: center; }
html.planb .page-hero-content h1 { color: var(--text) !important; text-shadow: none !important; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 300 !important; font-size: clamp(2.2rem, 6vw, 3.4rem) !important; letter-spacing: 0 !important; text-transform: none !important; }
html.planb .page-hero-content .page-eyebrow { color: var(--gold) !important; letter-spacing: 4px; font-size: 0.56rem !important; }
html.planb .tree-back-link { color: var(--text-muted) !important; }
html.planb .tree-back-link:hover { color: var(--gold) !important; }
html.planb .page-hero-content .gold-line { display: none; }

/* the chapter bar: a fine rule with diamonds, no dark strip */
html.planb .milestone-bar { background: var(--navy) !important; backdrop-filter: none !important; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
html.planb[data-theme="ivory"] .milestone-bar { background: #fbfaf6 !important; }
html.planb[data-theme="missal"] .milestone-bar { background: #fff !important; }
html.planb .milestone-arrow { border-color: var(--border) !important; }
html.planb .milestone-item { border-right: 0 !important; }
html.planb .milestone-item.active { border-bottom: 1px solid var(--gold) !important; }
html.planb .milestone-dot { width: 6px !important; height: 6px !important; border-radius: 0 !important; transform: rotate(45deg); background: none !important; border: 1px solid var(--gold); opacity: 0.6; }
html.planb .milestone-item.active .milestone-dot { background: var(--gold) !important; opacity: 1; }
html.planb .milestone-name { color: var(--text-muted) !important; }
html.planb .milestone-item.active .milestone-name, html.planb .milestone-item:hover .milestone-name { color: var(--gold) !important; }

/* cards: flat, square, fine rules — no boxes floating on a dark page */
html.planb .asset-card { border-radius: 2px !important; background: transparent !important; border-color: var(--border) !important; }
html.planb[data-theme="ivory"] .asset-card , html.planb[data-theme="missal"] .asset-card { background: #fff !important; }

/* quieter cards and rules */
html.planb [class*="card"] { box-shadow: none !important; }
html.planb[data-theme="ivory"] .milestone-bar-inner { background: #fbfaf6 !important; }
html.planb[data-theme="missal"] .milestone-bar-inner { background: #fff !important; }
html.planb[data-theme="ivory"] .milestone-item , html.planb[data-theme="missal"] .milestone-item { color: var(--text) !important; }

/* style.css text set in light colors on purpose for the dark site: give them ink on the manuscript page */
:is(html.planb[data-theme="ivory"], html.planb[data-theme="missal"]) :is(.nav-section-title, .nav-has-dropdown .nav-dropdown-toggle, .gratitude-section blockquote, .pull-quote,
  .asset-symbol-icon-wrap, .venture-scale-dot, .tree-legend-dot, .asset-hugo-note-text, .daily-reflection blockquote,
  .tree-item-meta, .footer-gratitude, .footer-copy) { color: var(--text-muted) !important; }
html.planb[data-theme="ivory"] .asset-hugo-note-text , html.planb[data-theme="missal"] .asset-hugo-note-text { color: #3d372f !important; }

/* the theme switch injected into the header */
html.planb .pb-theme { display: inline-flex; border: 1px solid var(--border); margin-right: 0.5rem; }
html.planb .pb-theme button { background: none; border: 0; padding: 0 0.6rem; height: 30px; font: 500 0.54rem 'Inter', sans-serif; letter-spacing: 1.3px; text-transform: uppercase; color: var(--text-muted); cursor: pointer; }
html.planb .pb-theme button.on { color: var(--gold); }
@media (max-width: 640px) {
  html.planb header { padding-left: 0.8rem !important; padding-right: 0.8rem !important; }
  html.planb .header-right { gap: 0.35rem !important; }
  html.planb .pb-theme { margin-right: 0; }
  html.planb .pb-theme button { padding: 0 0.3rem; font-size: 0.44rem; letter-spacing: 0.8px; }
  html.planb .lang-toggle { padding: 0.35rem 0.4rem !important; }
  html.planb .pb-nav { display: none; }
  html.planb .site-name { white-space: nowrap; font-size: 0.72rem !important; letter-spacing: 1px; }
  html.planb .hamburger { display: inline-flex !important; color: var(--text) !important; background: none !important; border-color: var(--border) !important; }
  html.planb .nav-panel.show { display: block !important; }
}

/* book covers (Sazagua, La Bicicleta Financiera) stay photographs: their text stays light */
html.planb .page-banner-content, html.planb .page-banner-content * { color: #fff !important; text-shadow: 0 2px 16px rgba(0,0,0,0.5); }
html.planb .page-banner-content .page-eyebrow, html.planb .page-banner-content .page-eyebrow * { color: #e9d3a8 !important; }

/* the method page: its hero has no photo any more, so its text is ink */
html.planb .hero-salt { color: var(--text) !important; text-shadow: none !important; }
html.planb .hero-link { color: var(--gold) !important; border-color: var(--gold-border) !important; }
