/* ==========================================================================
   Osho Live site chrome (2026-10 redesign): colour tokens, light/dark themes,
   header, menus, footer, sign-in window. Loaded by base.html after reader.css.
   Page templates opt into dark mode with {% block dark_ok %}data-dark-ok{% endblock %}
   once every colour they use comes from these tokens; pages that have not
   opted in always render light, so a hard-coded white card can never end up
   with light text on it.
   BUMP the ?v= in base.html on every change (Caddy caches /assets for a year).
   ========================================================================== */
:root {
  --night: #1c1210;
  --night-2: #2a1a16;
  --night-ink: #f5ebdf;
  --night-mute: #c7b3a1;
  --paper: #faf6ef;
  --paper-2: #f2e9dc;
  --ink: #2a1d16;
  --ink-2: #6e5c4e;
  --line: #e5d9c9;
  --card: #ffffff;
  --accent: #7b1113;
  --accent-ink: #ffffff;
  --accent-soft: #f6e5df;
  --ochre: #d98e2b;
  --hero-a: #800000;
  --hero-b: #4a0000;
  --f-display: "Tiro Devanagari Hindi", Georgia, "Times New Roman", serif;
  --f-ui: "Hind", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-read: "Spectral", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-dark-ok]:not([data-theme="light"]) {
    --night: #120b0a; --night-2: #1f1411; --paper: #181210; --paper-2: #211814; --ink: #efe5d9; --ink-2: #b9a796;
    --line: #3a2d26; --card: #221915; --accent: #e3877b; --accent-ink: #1a1110; --accent-soft: #3b211d; --ochre: #e7a64f;
    color-scheme: dark;
  }
}
:root[data-dark-ok][data-theme="dark"] {
  --night: #120b0a; --night-2: #1f1411; --paper: #181210; --paper-2: #211814; --ink: #efe5d9; --ink-2: #b9a796;
  --line: #3a2d26; --card: #221915; --accent: #e3877b; --accent-ink: #1a1110; --accent-soft: #3b211d; --ochre: #e7a64f;
  color-scheme: dark;
}

/* reader.css variables now follow the tokens, so older templates pick up the
   new type and palette without being rewritten. */
body.reader-mode {
  --reader-bg: var(--paper);
  --reader-text: var(--ink);
  --reader-accent: var(--accent);
  --reader-font: var(--f-ui);
  --reader-serif: var(--f-read);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-ui);
}
.ol-wrap { max-width: 1180px; margin: 0 auto; padding-inline: 24px; box-sizing: border-box; }
@media (max-width: 560px) { .ol-wrap { padding-inline: 16px; } }

/* ---------- header ---------- */
.ol-header { background: var(--night); color: var(--night-ink); position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid rgb(255 255 255 / .06); font-family: var(--f-ui); }
.ol-header *, .ol-footer *, .ol-modal * { box-sizing: border-box; }
.ol-bar { display: flex; align-items: center; gap: 22px; height: 64px; }
.ol-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--night-ink); flex: none; }
.ol-logo img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid rgb(255 255 255 / .25); background: #fff; }
.ol-logo span { font-family: var(--f-display); font-size: 22px; }
.ol-chatico { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .18); color: var(--night-ink); margin-left: -10px; flex: none; }
.ol-chatico:hover { border-color: var(--ochre); color: #fff; }
.ol-nav { display: flex; gap: 2px; }
.ol-item { position: relative; }
.ol-item > a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 500; color: var(--night-mute); white-space: nowrap; }
.ol-item > a:hover, .ol-item.open > a, .ol-item > a:focus-visible { color: var(--night-ink); background: rgb(255 255 255 / .07); }
.ol-item > a.on { color: #fff; box-shadow: inset 0 -2px 0 var(--ochre); border-radius: 8px 8px 0 0; }
.ol-menu { display: none; position: absolute; top: calc(100% + 6px); left: 0; width: 310px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 18px 40px rgb(0 0 0 / .25); z-index: 1100; }
/* Hover menus: an invisible bridge over the 6px gap keeps the menu open while
   the pointer travels down to it, and a short delay forgives a wobble. */
.ol-nav .ol-menu { display: grid; visibility: hidden; opacity: 0; transform: translateY(-4px);
                   transition: opacity .15s ease .18s, transform .15s ease .18s, visibility 0s linear .33s; }
.ol-nav .ol-menu::before { content: ""; position: absolute; left: -12px; right: -12px; top: -14px; height: 14px; }
.ol-nav .ol-item:hover .ol-menu, .ol-nav .ol-item.open .ol-menu { visibility: visible; opacity: 1; transform: none; transition: opacity .12s ease, transform .12s ease; }
/* Skip link: first Tab stop, visible only when focused */
.ol-skip { position: absolute; left: 12px; top: -60px; z-index: 2000; background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.ol-skip:focus { top: 10px; }
#main:focus { outline: none; }
.ol-menu a { display: block; padding: 9px 12px; border-radius: 9px; text-decoration: none; font-weight: 600; color: var(--ink); }
.ol-menu a small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13px; }
.ol-menu a:hover { background: var(--paper-2); }
.ol-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px; }
.ol-menu .cta { color: var(--accent); }
.ol-menu.right { left: auto; right: 0; }
.ol-live { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); padding: 1px 7px; border-radius: 999px; vertical-align: 2px; margin-left: 4px; }
.ol-cx { display: inline-flex !important; align-items: center; gap: 8px; }
.ol-cx [data-cx-dot] { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; display: inline-block; flex: none; }
.ol-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ol-right .lang-switch { background: transparent; color: var(--night-mute); border: 1px solid rgb(255 255 255 / .18); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 14px; max-width: 120px; cursor: pointer; }
.ol-right .lang-switch option { color: #222; background: #fff; }
.ol-theme { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .18); background: transparent; color: var(--night-ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.ol-theme:hover { border-color: var(--ochre); }
.ol-theme svg { width: 18px; height: 18px; }
.ol-theme[hidden] { display: none; }
#auth-controls { display: none; align-items: center; }
#btn-login { color: var(--night-mute); text-decoration: none; font-weight: 500; }
#btn-login:hover { color: #fff; }
#ssr-profile-wrap { position: relative; }
#ssr-profile-btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ochre); background: #2a5298; color: #fff; font-weight: 700; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; padding: 0; }
#ssr-profile-dropdown { display: none; position: absolute; right: 0; top: 48px; width: 290px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px rgb(0 0 0 / .25); padding: 6px; z-index: 1200; }
#ssr-profile-dropdown a, #ssr-profile-dropdown button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--ink); text-decoration: none; font: inherit; font-size: .94rem; background: none; border: 0; cursor: pointer; }
#ssr-profile-dropdown a:hover, #ssr-profile-dropdown button:hover { background: var(--paper-2); }
#ssr-profile-name { padding: 8px 12px 10px; font-size: .8rem; color: var(--ink-2); border-bottom: 1px solid var(--line); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ssr-profile-logout { color: #c0392b !important; }
.ol-ask { position: relative; display: inline-flex; }
/* Header controls never wrap onto two lines; the nav gives way instead (see the 1200px rule). */
.ol-right > *, .ol-ask, .ol-btn, #btn-login { flex: none; white-space: nowrap; }
.ol-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 600; border-radius: 999px; padding: 9px 20px; background: var(--ochre); color: #1c1210; line-height: 1.3; }
.ol-btn:hover { filter: brightness(1.06); color: #1c1210; text-decoration: none; }
.ol-ask .ol-btn.main { border-radius: 999px 0 0 999px; padding-right: 14px; }
.ol-ask .ol-btn.more { border-radius: 0 999px 999px 0; padding: 9px 11px; border-left: 1px solid rgb(0 0 0 / .18); font-size: 11px; }
.ol-ask .ol-menu { top: calc(100% + 8px); width: 310px; }
.ol-ask.open .ol-menu { display: grid; }
.ol-burger { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgb(255 255 255 / .2); background: transparent; color: var(--night-ink); font-size: 20px; cursor: pointer; }
.ol-mnav { display: none; background: var(--night); border-top: 1px solid rgb(255 255 255 / .08); }
.ol-mnav.open { display: block; }
.ol-mnav .ol-wrap { display: flex; flex-direction: column; gap: 0; padding-block: 12px 18px; max-height: calc(100dvh - 64px); overflow-y: auto; }
.ol-mnav h4 { margin: 4px 0 2px; color: var(--ochre); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.ol-mnav a { display: block; padding: 5px 0; color: var(--night-ink); text-decoration: none; font-size: 17px; }
.ol-mnav .ol-btn { font-size: 17px; }
.ol-mnav .ol-mrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.ol-mnav .ol-mrow select, .ol-mnav .ol-mrow button { font: inherit; font-size: 15px; background: transparent; color: var(--night-ink); border: 1px solid rgb(255 255 255 / .2); border-radius: 10px; padding: 6px 10px; }
.ol-mnav .ol-mrow select option { color: #222; }
@media (max-width: 1200px) {
  .ol-nav, .ol-right .lang-switch, .ol-ask .ol-btn.more { display: none; }
  .ol-ask .ol-btn.main { border-radius: 999px; padding-right: 18px; }
  .ol-burger { display: inline-block; }
  .ol-bar { gap: 12px; }
}
@media (max-width: 560px) {
  .ol-theme, #btn-login { display: none; }
  .ol-logo span { font-size: 19px; }
  .ol-ask .ol-btn.main { padding: 8px 14px; }
}
@media (max-width: 380px) { .ol-logo span { display: none; } }

/* ---------- footer ---------- */
.ol-footer { background: var(--night); color: var(--night-ink); padding-block: 48px 24px; margin-top: 56px; font-family: var(--f-ui); }
.ol-footer a { color: var(--night-mute); text-decoration: none; }
.ol-footer a:hover { color: var(--night-ink); }
.ol-fcols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.ol-fcols h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ochre); font-weight: 600; }
.ol-fcols ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ol-fbrand p { color: var(--night-mute); max-width: 34ch; margin: 12px 0 14px; }
.ol-fbrand .ol-btn { color: #1c1210; }
.ol-fbase { margin-top: 36px; padding-top: 16px; border-top: 1px solid rgb(255 255 255 / .1); display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--night-mute); }
@media (max-width: 900px) { .ol-fcols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .ol-fcols { grid-template-columns: 1fr; } }

/* ---------- sign-in window (markup and ids unchanged; app.js drives it) ---------- */
#authModal .modal-content { background: var(--card); color: var(--ink); border-radius: 20px; padding: 28px 26px 22px; font-family: var(--f-ui); }
#authModal #authModalTitle { font-family: var(--f-display); font-weight: 400 !important; font-size: 1.9em !important; }
#authModal .google-btn { border-radius: 12px; padding: 11px; background: var(--paper); color: var(--ink); border-color: var(--line); }
#authModal .auth-input { border-radius: 10px; border-color: var(--line); background: var(--paper); color: var(--ink); padding: 11px 12px; }
#authModal .primary-btn.full-width { border-radius: 12px; padding: 11px; background: var(--accent); color: var(--accent-ink); }
#authModal .divider::before, #authModal .divider::after { border-color: var(--line); }

/* ---------- shared page pieces ---------- */
body.reader-mode .hero { background: linear-gradient(135deg, var(--hero-a) 0%, var(--hero-b) 100%); }
body.reader-mode .hero h1 { font-family: var(--f-display); font-weight: 400 !important; letter-spacing: 0; }
body.reader-mode h1, body.reader-mode h2 { font-family: var(--f-display); font-weight: 400; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 2px; }

/* ---------- page heroes (all templates using .hero) ---------- */
body.reader-mode .hero .ol-crumbs, body.reader-mode .hero .breadcrumb { font-size: .9rem; }
.ol-crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; color: rgb(255 255 255 / .75); margin-bottom: .6rem; justify-content: inherit; }
.ol-crumbs a { color: rgb(255 255 255 / .8); text-decoration: none; }
.ol-crumbs a:hover { color: #fff; }
.hero .tagpill { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 999px; background: rgb(255 255 255 / .14); color: #fff; font-weight: 600; }
.hero .hghost { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 14px; text-decoration: none; color: #fff; padding: 7px 14px; border-radius: 999px; background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .25); cursor: pointer; }
.hero .hghost:hover { background: rgb(255 255 255 / .2); color: #fff; }
@media (min-width: 992px) { .hero.hero-slim { height: 320px !important; } .hero.hero-slim .hero-grid { grid-template-columns: minmax(260px, 24vw) 1fr; } }
.hero.hero-slim .hero-image-wrap img { object-position: center 18% !important; }
@media (max-width: 991px) { .hero.hero-slim .hero-image-wrap img { height: clamp(240px, 56vw, 340px); } }
.talk-hero h1.chapter-title { color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.6rem) !important; line-height: 1.12 !important; margin: 0 0 .4rem !important; }
.talk-hero h1 .subtitle { display: block; font-family: var(--f-ui); font-size: 1rem; color: rgb(255 255 255 / .75); margin-top: .3rem; }
.talk-hero .chapter-tagline { margin: 0 0 .4rem; color: rgb(255 255 255 / .85); font-style: italic; }
.talk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; color: rgb(255 255 255 / .85); font-size: .95rem; justify-content: inherit; }
.talk-meta b { color: #fff; }
.talk-modes { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: rgb(0 0 0 / .2); border: 1px solid rgb(255 255 255 / .18); margin-top: .8rem; align-self: flex-start; }
.talk-modes a { color: rgb(255 255 255 / .85); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 6px 14px; border-radius: 999px; }
.talk-modes a[aria-current="page"] { background: #fff; color: #6a0d0d; }
.talk-modes a:hover:not([aria-current]) { background: rgb(255 255 255 / .12); color: #fff; }
.talk-tools { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: .8rem; justify-content: inherit; }
@media (max-width: 991px) { .talk-modes { align-self: center; } }
.translation-provenance { margin: 1.2rem 0 0; font-size: .95rem; color: var(--ink-2); }
.translation-provenance a { color: var(--accent); }
.chapters-tab { background: var(--accent) !important; color: var(--accent-ink) !important; }

/* talk header: left-aligned like the approved design, on every width */
.talk-hero .hero-text-wrap { text-align: left; align-items: flex-start; }
.talk-hero .ol-crumbs, .talk-hero .talk-meta, .talk-hero .talk-tools { justify-content: flex-start; }
.talk-hero .talk-modes { align-self: flex-start !important; }
@media (max-width: 991px) { .talk-hero .hero-text-wrap { padding: 1.4rem 16px 1.6rem; } }
/* phones: Sign in lives in the menu (app.js sets an inline display, hence !important) */
@media (max-width: 560px) { #btn-login { display: none !important; } }
html, body { overflow-x: clip; }
/* older talk-page controls in the new palette */
.lang-pill.lang-pill-primary { background: var(--accent) !important; color: var(--accent-ink) !important; border-color: var(--accent) !important; }

/* ---------- legacy component classes, in the new palette ----------
   Older templates use Bootstrap-like class names defined in base.html and
   reader.css. These overrides restyle them site-wide from the tokens. */
body.reader-mode .btn { border-radius: 999px; font-weight: 600; padding: .45rem 1.1rem; font-family: var(--f-ui); }
body.reader-mode .btn-sm { padding: .3rem .85rem; font-size: .88rem; }
body.reader-mode .btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.reader-mode .btn-primary:hover { background: var(--accent); filter: brightness(1.08); color: var(--accent-ink); }
body.reader-mode .btn-outline-primary { color: var(--accent); border-color: var(--accent); background: transparent; }
body.reader-mode .btn-outline-primary:hover, body.reader-mode .btn-outline-primary.active { background: var(--accent); color: var(--accent-ink); }
body.reader-mode .btn-outline-secondary { color: var(--ink-2); border-color: var(--line); background: transparent; }
body.reader-mode .btn-outline-secondary:hover { color: var(--ink); border-color: var(--ink-2); }
body.reader-mode .btn-light { background: #fff; color: var(--hero-a); border-color: #fff; }
body.reader-mode .text-muted { color: var(--ink-2) !important; }
body.reader-mode .text-dark { color: var(--ink) !important; }
body.reader-mode .text-primary { color: var(--accent) !important; }
body.reader-mode .bg-light { background: var(--paper-2) !important; }
body.reader-mode .bg-white { background: var(--card) !important; }
body.reader-mode .page-link { color: var(--accent); background: var(--card); border-color: var(--line); border-radius: 10px !important; margin: 0 3px; min-width: 38px; text-align: center; }
body.reader-mode .page-link:hover { background: var(--paper-2); color: var(--accent); border-color: var(--line); }
body.reader-mode .page-item.active .page-link { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.reader-mode .page-item.disabled .page-link { background: var(--card); color: var(--ink-2); border-color: var(--line); }
body.reader-mode .form-select, body.reader-mode .form-control, body.reader-mode input[type="search"], body.reader-mode input[type="text"], body.reader-mode input[type="email"], body.reader-mode input[type="url"], body.reader-mode input[type="tel"], body.reader-mode input[type="password"], body.reader-mode textarea, body.reader-mode select { background-color: var(--card); color: var(--ink); border-color: var(--line); border-radius: 10px; font-family: var(--f-ui); }
body.reader-mode .intent-badge { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
body.reader-mode .badge { border-radius: 999px; }
body.reader-mode .list-group-item, body.reader-mode .card { background: var(--card); border-color: var(--line); color: var(--ink); }
body.reader-mode .alert-info { background: var(--accent-soft); color: var(--ink); border-color: var(--line); }
body.reader-mode .reader-container { color: var(--ink); }
body.reader-mode .hero .text-white-50 { color: rgb(255 255 255 / .6) !important; }

/* ---------- shared reading components on the colour tokens (light + dark) ---------- */
body.reader-mode .osho-ref { background: var(--card); border-color: var(--line); color: var(--ink); }
body.reader-mode .osho-ref:hover { border-color: var(--line); }
body.reader-mode .osho-ref-head { background: var(--paper-2); border-bottom-color: var(--line); }
body.reader-mode .osho-ref-pos { background: var(--card); border-color: var(--line); color: var(--accent); }
body.reader-mode .osho-ref-pos:hover { background: var(--paper-2); }
body.reader-mode .osho-ref-meta .m { color: var(--ink-2); }
body.reader-mode .osho-ref-meta .m + .m::before { color: var(--line); }
body.reader-mode .osho-ref-body::before { color: var(--line); }
body.reader-mode .osho-ref-q { color: var(--ink); }
body.reader-mode .osho-ref-x { color: var(--ink); }
body.reader-mode .osho-ref-foot { border-color: var(--line); }
body.reader-mode .osho-ref-read, body.reader-mode .osho-ref-read:visited { color: var(--accent); }
body.reader-mode .osho-ref-orig { background: var(--accent-soft) !important; color: var(--ink); }

/* talk page boxes */
body.reader-mode .meta-box, body.reader-mode .lang-section, body.reader-mode .chapter-summary-box,
body.reader-mode .semantic-insight-box, body.reader-mode .key-teachings, body.reader-mode .discourse-summary-panel {
  background: var(--card) !important; border-color: var(--line) !important; color: var(--ink); }
body.reader-mode .chapter-summary-box, body.reader-mode .semantic-insight-box, body.reader-mode .key-teachings { border-left: 4px solid var(--accent) !important; }
body.reader-mode .chapter-summary-box h6, body.reader-mode .key-teachings h6, body.reader-mode .semantic-insight-box h6 { color: var(--accent) !important; }
body.reader-mode .chapter-summary-box p, body.reader-mode .key-teachings p, body.reader-mode .key-teachings li { color: var(--ink) !important; }
body.reader-mode .lang-row-label, body.reader-mode .meta-label { color: var(--ink-2) !important; }
body.reader-mode .lang-dropdown { background: var(--card); color: var(--ink); border-color: var(--line); }
body.reader-mode .qna-item { background: var(--card); border-color: var(--line); box-shadow: none; }
body.reader-mode .qna-question { color: var(--ink); }
body.reader-mode .qna-answer, body.reader-mode .discourse-body { color: var(--ink); }
body.reader-mode .qna-q-chip { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
body.reader-mode .discourse-section h2, body.reader-mode .reader-qna > h2 { color: var(--ink-2); border-bottom-color: var(--line); }
body.reader-mode .commentary-para:target, body.reader-mode .qna-item:target { background: var(--accent-soft); border-inline-start-color: var(--ochre); }
body.reader-mode .reader-fullscreen .reader-sidebar { background: var(--card); border-left-color: var(--line); color: var(--ink); }
body.reader-mode .reader-sidebar .sidebar-link.active { background: var(--accent-soft) !important; }
body.reader-mode .related-explore, body.reader-mode section.xref { border-top-color: var(--line) !important; }
body.reader-mode .discourse-qa-item { background: var(--card); border-color: var(--line); color: var(--ink); }
/* meditation audio */
body.reader-mode .audio-card, body.reader-mode .guided-audio, body.reader-mode .meditation-audio { background: var(--card) !important; border-color: var(--line) !important; color: var(--ink); }
body.reader-mode #audio-box { background: var(--card) !important; border-color: var(--line) !important; color: var(--ink); }
/* white buttons on the maroon header bands keep dark text in both themes */
body.reader-mode .hero .btn-light, body.reader-mode .hero .btn-light.text-dark, body.reader-mode .hero .bg-light.text-dark { background: #fff !important; color: #6a0d0d !important; border-color: #fff !important; }
/* form fields never wider than their container (phones) */
body.reader-mode input, body.reader-mode select, body.reader-mode textarea { max-width: 100%; box-sizing: border-box; }
@media (max-width: 600px) {
  body.reader-mode .reader-container form { max-width: 100%; }
  body.reader-mode .reader-container form > div, body.reader-mode .reader-container form > input { min-width: 0 !important; }
  body.reader-mode .reader-container form > div:has(> input[type="text"]), body.reader-mode .reader-container form > div:has(> input[type="search"]) { flex: 1 1 100% !important; }
}

/* "Ask Osho from your chats" status box (My account) — light and dark */
.cx-banner.cx-green { --cxb-bg: #f0fdf4; --cxb-line: #86efac; --cxb-ink: #166534; --cxb-btn: #15803d; --cxb-btn-ink: #fff; }
.cx-banner.cx-amber { --cxb-bg: #fffbeb; --cxb-line: #fde68a; --cxb-ink: #92400e; --cxb-btn: #b45309; --cxb-btn-ink: #fff; }
.cx-banner.cx-red   { --cxb-bg: var(--accent-soft); --cxb-line: var(--line); --cxb-ink: var(--ink); --cxb-btn: var(--accent); --cxb-btn-ink: var(--accent-ink); }
:root[data-theme="dark"] .cx-banner.cx-green { --cxb-bg: #12261a; --cxb-line: #24533a; --cxb-ink: #9be3b4; --cxb-btn: #2f9e5f; --cxb-btn-ink: #0b1a10; }
:root[data-theme="dark"] .cx-banner.cx-amber { --cxb-bg: #2a1f0c; --cxb-line: #5c4415; --cxb-ink: #f3c27a; --cxb-btn: #d18a2b; --cxb-btn-ink: #1a1206; }
@media (prefers-color-scheme: dark) {
  :root[data-dark-ok]:not([data-theme="light"]) .cx-banner.cx-green { --cxb-bg: #12261a; --cxb-line: #24533a; --cxb-ink: #9be3b4; --cxb-btn: #2f9e5f; --cxb-btn-ink: #0b1a10; }
  :root[data-dark-ok]:not([data-theme="light"]) .cx-banner.cx-amber { --cxb-bg: #2a1f0c; --cxb-line: #5c4415; --cxb-ink: #f3c27a; --cxb-btn: #d18a2b; --cxb-btn-ink: #1a1206; }
}
:root[data-theme="dark"] .ol-stars, :root[data-theme="dark"] [aria-label^="Rating"] { color: var(--ochre) !important; }
/* Connect link: on dark surfaces the status lives in the dot; the label stays readable */
.ol-mnav [data-cx-connect], :root[data-theme="dark"] [data-cx-connect] { color: var(--night-ink) !important; }
@media (prefers-color-scheme: dark) { :root[data-dark-ok]:not([data-theme="light"]) [data-cx-connect] { color: var(--ink) !important; } }
@media (prefers-color-scheme: dark) { :root[data-dark-ok]:not([data-theme="light"]) [aria-label^="Rating"] { color: var(--ochre) !important; } }

/* Phone tap targets: at least ~40px tall for small links and toggles */
@media (max-width: 600px) {
  .ol-crumbs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; }
  .hero-lang-link, .hero-lang-select { min-height: 40px; display: inline-flex; align-items: center; padding: 6px 10px; }
  .tb-modes a { min-height: 36px; display: inline-flex; align-items: center; }
  #meditation-sort a, #meditation-sort .sort-link { min-height: 40px; display: inline-flex; align-items: center; padding: 0 12px; }
  .sd-tools label { min-height: 40px; padding: 0 6px; }
  .sd-tools input[type="checkbox"] { width: 22px; height: 22px; }
  .osho-ref-pos { min-height: 36px; display: inline-flex; align-items: center; }
}

/* group labels inside header menus (Discourses: Hindi / English) */
.ol-menu .ol-mh { display: block; padding: 8px 12px 2px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); font-weight: 600; }
.ol-menu .ol-mh:not(:first-child) { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* reserve the sign-in / avatar slot so the header doesn't shift when app.js fills it */
#auth-controls { min-width: 64px; display: inline-flex; justify-content: flex-end; }
@media (max-width: 560px) { #auth-controls { min-width: 38px; } }

/* Print: just the talk / page text (2026-10 audit) */
@media print {
  .ol-header, .ol-mnav, .ol-footer, .ol-skip, #talkBar, #tbBack, .talk-hero .hero-image-wrap, .talk-tools, .talk-modes,
  .chapters-tab, .chapters-backdrop, .reader-sidebar, .lang-section, .related-explore, .hp-hero .composer, .starters, #authModal, .ol-chat-cue { display: none !important; }
  :root, :root[data-theme="dark"] { --paper: #fff; --card: #fff; --ink: #000; --ink-2: #333; --line: #ccc; }
  body { background: #fff !important; color: #000 !important; font-family: var(--f-read), Georgia, serif; font-size: 12pt; line-height: 1.6; }
  .hero, .talk-hero { background: none !important; color: #000 !important; min-height: 0 !important; height: auto !important; }
  .hero, .hero * { color: #000 !important; background: none !important; box-shadow: none !important; }
  a { color: #000 !important; text-decoration: none !important; }
  p, blockquote, .qna-item { break-inside: avoid-page; orphans: 3; widows: 3; }
}

/* Topics mega menu: top guides (EN + हिं), comparisons, people — each with "all" links */
.ol-menu.ol-mega { width: min(720px, calc(100vw - 40px)) !important; }
.mm-topics { display: grid !important; grid-template-columns: 1.25fr 1fr 1fr; gap: 6px 22px; padding: 16px 18px 14px !important; }
.mm-col { min-width: 0; display: flex; flex-direction: column; }
.mm-list { list-style: none; margin: 4px 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.mm-list.mm-one { grid-template-columns: 1fr; }
.mm-list li { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mm-list a { padding: 6px 8px !important; border-radius: 8px; font-weight: 600 !important; font-size: 14.5px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-list a i { font-style: normal; font-weight: 400; color: var(--ink-2, #6e5c4e); padding: 0 2px; }
.mm-list a small { display: inline !important; margin-left: 6px; font-weight: 400; font-size: 12px !important; }
.mm-list .mm-hi { flex: none; font-size: 12px !important; font-weight: 600 !important; padding: 2px 7px !important; border: 1px solid var(--line, #e5d9c9); border-radius: 999px; color: var(--ink-2, #6e5c4e) !important; }
.mm-list .mm-hi:hover { border-color: var(--accent, #7b1113); color: var(--accent, #7b1113) !important; }
.mm-all { margin-top: auto; font-size: 13.5px !important; font-weight: 700 !important; color: var(--accent, #7b1113) !important; padding: 6px 8px !important; }
.mm-hiall { margin-top: 0; font-weight: 600 !important; }
.ol-nav .ol-menu.ol-mega { left: 50%; transform: translate(-50%, -4px); }
.ol-nav .ol-item:hover .ol-menu.ol-mega, .ol-nav .ol-item.open .ol-menu.ol-mega { transform: translate(-50%, 0); }

/* Phone menu: ask box, picture tiles, quick-link chips, account strip */
.ol-mnav.open { animation: mnIn .22s ease; }
@keyframes mnIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.ol-mnav .ol-wrap { gap: 18px !important; padding-block: 14px 22px !important; }
.mn-ask { display: flex; align-items: center; gap: 6px; background: var(--card); border-radius: 999px; padding: 5px 5px 5px 16px; box-shadow: 0 8px 22px rgb(0 0 0 / .3); }
.mn-ask input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); padding: 8px 0; }
.mn-ask input::placeholder { color: var(--ink-2); }
.mn-ask button { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ol-mnav .mn-sec { border: 0; }
.ol-mnav .mn-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 8px; color: var(--ochre); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.ol-mnav .mn-h a { display: inline !important; padding: 0 !important; font-size: 12.5px !important; letter-spacing: 0; text-transform: none; color: var(--ochre) !important; font-weight: 600; }
.ol-mnav .mn-row { display: flex; flex-wrap: wrap; gap: 7px; }
.ol-mnav .mn-pill { padding: 8px 14px !important; border-radius: 999px; border: 1px solid rgb(255 255 255 / .18); font-size: 15px !important; background: rgb(255 255 255 / .04); }
.ol-mnav .mn-chip { display: inline-flex; align-items: center; border: 1px solid rgb(255 255 255 / .18); border-radius: 999px; overflow: hidden; background: rgb(255 255 255 / .04); }
.ol-mnav .mn-chip a { padding: 8px 11px !important; font-size: 15px !important; }
.ol-mnav .mn-chip .mn-hi { border-left: 1px solid rgb(255 255 255 / .18); color: var(--night-mute) !important; font-size: 13px !important; padding: 8px 10px !important; }
.ol-mnav .mn-more { margin-top: 8px; gap: 4px 16px; }
.ol-mnav .mn-more a { padding: 4px 0 !important; font-size: 14px !important; color: var(--night-mute) !important; }
.ol-mnav .mn-any { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.ol-mnav .mn-anyb { display: flex !important; align-items: center; justify-content: center; gap: 7px; padding: 10px 6px !important; border-radius: 12px; border: 1px solid rgb(255 255 255 / .16); font-size: 14px !important; text-align: center; background: rgb(255 255 255 / .04); }
.ol-mnav .mn-anyb [data-cx-dot] { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ol-mnav .mn-you { border-top: 1px solid rgb(255 255 255 / .1); padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.ol-mnav .mn-you-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ol-mnav .mn-you-links a { font-size: 16px !important; padding: 4px 0 !important; }

/* the chat icon beside the logo stays on every screen size (it is the way back to your chats) */
@media (max-width: 560px) { .ol-chatico { width: 32px; height: 32px; margin-left: -6px; } }
@media (max-width: 400px) { .ol-logo span { display: none; } }

/* Phone menu sections (structured): icon rows that expand into grouped cards */
.pm-list { display: flex; flex-direction: column; gap: 8px; }
.pm-sec { border: 1px solid rgb(255 255 255 / .09); border-radius: 16px; background: rgb(255 255 255 / .025); overflow: hidden; }
.pm-sec[open] { background: rgb(255 255 255 / .045); border-color: rgb(255 255 255 / .14); }
.pm-sec summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.pm-sec summary::-webkit-details-marker { display: none; }
.pm-ic { flex: none; width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ochre); background: rgb(217 142 43 / .14); }
.pm-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 17px; font-weight: 600; color: var(--night-ink); line-height: 1.25; }
.pm-t small { font-size: 13px; font-weight: 400; color: var(--night-mute); margin-top: 2px; }
.pm-chev { flex: none; color: var(--night-mute); transition: transform .18s; }
.pm-sec[open] .pm-chev { transform: rotate(180deg); color: var(--ochre); }
.pm-body { display: flex; flex-direction: column; gap: 10px; padding: 2px 12px 14px; animation: pmIn .18s ease; }
@keyframes pmIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.pm-card { background: rgb(0 0 0 / .18); border: 1px solid rgb(255 255 255 / .07); border-radius: 14px; padding: 10px 10px 12px; }
.pm-ch { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 8px; }
.pm-ch span { color: var(--night-mute); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.pm-cardall { color: var(--ochre) !important; font-size: 13px !important; font-weight: 600; text-decoration: none; padding: 0 !important; display: inline !important; }
.pm-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pm-tile, .pm-vs, .pm-person, .pm-itile { display: flex !important; flex-direction: column; gap: 2px; padding: 10px 12px !important; border-radius: 12px; text-decoration: none;
  background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .08); color: var(--night-ink) !important; min-width: 0; }
.pm-tile:hover, .pm-vs:hover, .pm-person:hover, .pm-itile:hover { border-color: var(--ochre); }
.pm-tile b, .pm-person b, .pm-itile b { font-size: 15.5px; font-weight: 600; line-height: 1.25; }
.pm-tile small, .pm-person small { font-size: 12.5px; color: var(--night-mute); line-height: 1.3; }
.pm-wide { grid-column: 1 / -1; }
.pm-feature { background: linear-gradient(120deg, rgb(123 17 19 / .55), rgb(217 142 43 / .18)) !important; border-color: rgb(217 142 43 / .35) !important; }
.pm-vs { flex-direction: row !important; flex-wrap: wrap; align-items: baseline; gap: 2px 5px; }
.pm-vs b { font-size: 14.5px; font-weight: 600; } .pm-vs i { font-style: italic; color: var(--ochre); font-size: 12.5px; }
.pm-itile { flex-direction: row !important; align-items: center; gap: 10px; }
.pm-itile svg { flex: none; color: var(--ochre); }
.pm-soft { background: rgb(217 142 43 / .08) !important; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-chip { display: inline-flex; align-items: center; border: 1px solid rgb(255 255 255 / .16); border-radius: 999px; overflow: hidden; background: rgb(255 255 255 / .04); }
.pm-chip a { padding: 7px 11px !important; font-size: 15px !important; color: var(--night-ink) !important; text-decoration: none; display: inline-block; }
.pm-chip .pm-hi { border-left: 1px solid rgb(255 255 255 / .16); color: var(--night-mute) !important; font-size: 13px !important; padding: 7px 9px !important; }
.pm-foot { align-self: flex-start; color: var(--ochre) !important; font-size: 14px !important; font-weight: 600; text-decoration: none; padding: 2px 4px !important; }
.ol-mnav .mn-anywhere { margin-top: 2px; }
.pm-link { display: flex !important; align-items: center; gap: 12px; padding: 12px 14px !important; text-decoration: none; }
.pm-link:hover { border-color: rgb(217 142 43 / .45); }
