/* e4.org theme layer (fix-ups 1, screenshot gate 1 fixes F1-F3, F5). Loaded after STEP's own CSS.
   Brand: #013849 (logo square), #012a37 (hover/border), #1b5162 (strong text). */

/* F1. Header bar in the brand colour, white icons and labels */
#stepnavbar.navbar-default,
#stepnavbar .navbar-default {
  background: #013849 !important;
  background-image: none !important;
  border-color: #012a37 !important;
  box-shadow: none !important;
}
/* STEP paints the inner header strip with var(--clrBackground) (white); let the bar colour show */
#stepnavbar .navbar-header,
#stepnavbar .navbar-brand { background: transparent !important; }
/* icons use var(--clrText); repaint only the bar's own buttons, never the dropdown menus under them */
#stepnavbar .headerButtons > a,
#stepnavbar .headerButtons > .dropdown > a,
#stepnavbar .navbar-collapse > a,
#stepnavbar .navbar-collapse > .dropdown > a {
  --clrText: #ffffff;
  --clrBackground: #013849;
  color: #ffffff !important;
  opacity: .92;
}
#stepnavbar .headerButtons > a:hover,
#stepnavbar .headerButtons > .dropdown > a:hover,
#stepnavbar .navbar-collapse > a:hover,
#stepnavbar .navbar-collapse > .dropdown > a:hover,
#stepnavbar .open > a {
  background: rgba(255, 255, 255, .12) !important;
  opacity: 1;
}
#stepnavbar .navbarIconDesc,
#stepnavbar .glyphicon { color: #ffffff !important; }
#stepnavbar #fonts-icon .largerFont { background: rgba(255, 255, 255, .22) !important; color: #ffffff !important; }
#stepnavbar .navbar-toggle { border-color: rgba(255, 255, 255, .5); background: transparent; }
#stepnavbar .navbar-toggle .icon-bar { background: #ffffff; }
#stepnavbar .navbar-toggle:hover, #stepnavbar .navbar-toggle:focus { background: rgba(255, 255, 255, .12); }
/* phone: the collapsed band under the bar */
@media (max-width: 767px) {
  #stepnavbar .navbar-collapse,
  #stepnavbar .navbar-collapse.in,
  #stepnavbar .navbar-collapse.collapsing { background: #012a37 !important; color: #ffffff; }
  /* fix-ups 2 F1: the "More" and "Language" lists open inside the dark band; STEP's dark item text was
     1.11:1 there. White text on #012a37 = 15.1:1. */
  #stepnavbar .navbar-collapse .dropdown-menu { background: transparent !important; box-shadow: none; border: 0; }
  #stepnavbar .navbar-collapse .dropdown-menu > li > a,
  #stepnavbar .navbar-collapse .dropdown-menu a,
  #stepnavbar .navbar-collapse .dropdown-menu li,
  #stepnavbar .navbar-collapse .dropdown-menu .dropdown-header { color: #ffffff !important; }
  #stepnavbar .navbar-collapse .dropdown-menu > li > a { font-size: 15px; padding: 10px 24px; }
  #stepnavbar .navbar-collapse .dropdown-menu > li > a:hover,
  #stepnavbar .navbar-collapse .dropdown-menu > li > a:focus,
  #stepnavbar .navbar-collapse .dropdown-menu > .active > a { background: rgba(255, 255, 255, .12) !important; color: #ffffff !important; }
  #stepnavbar .navbar-collapse .dropdown-menu .divider { background: rgba(255, 255, 255, .2); }
}

/* F1 + F2. The mark (36 px, crisp up to 3x) with an "e4.org" wordmark beside it */
#stepnavbar span.title { display: inline-flex; align-items: center; height: 34px; } /* e4 LB (E4-051): was 50px; .navbar-brand already has 8px top and bottom padding, so the mark sat 8px low (measured on the draft 2026-11-14: mark y 15-51 in a 0-50 bar; with 34px y 7-43, centre 25 = bar centre) */
#stepnavbar span.title .logo { display: inline-flex; align-items: center; }
#stepnavbar span.title img {
  width: 36px; height: 36px; margin: 0;
  outline: 2px solid #ffffff; outline-offset: -2px; border-radius: 4px;
}
#stepnavbar .e4-word {
  font: 600 20px/50px 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  color: #ffffff; margin-left: 10px; letter-spacing: .2px; text-decoration: none; white-space: nowrap;
}
#stepnavbar .e4-word:hover, #stepnavbar .e4-word:focus { color: #ffffff; text-decoration: none; }
@media (max-width: 480px) { #stepnavbar .e4-word { display: none; } }

/* F3. e4 welcome column (replaces STEP's welcome line and announcement) */
.examplesContainer .e4-welcome { padding: 28px 8px 8px; max-width: 640px; text-align: left; }
.examplesContainer .e4-welcome-mark { display: block; width: 96px; height: 96px; border-radius: 10px; margin: 0 0 16px; }
.examplesContainer .e4-welcome-title {
  font: 600 30px/1.15 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  color: #013849; margin: 0 0 6px; text-align: left;
}
.examplesContainer .e4-welcome-line {
  font: 400 18px/1.45 'Source Serif 4', Georgia, serif; color: #2b2b2b; margin: 0 0 18px;
}
.e4-quick { margin: 0 0 22px; }
.e4-quick a {
  display: inline-block; margin: 0 8px 10px 0; padding: 10px 18px;
  border: 1.5px solid #013849; border-radius: 8px; background: #ffffff;
  color: #013849 !important; font: 600 15px/1.2 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; text-decoration: none;
}
.e4-quick a:hover, .e4-quick a:focus { background: #e6eef0; text-decoration: none; }
.e4-quick a.primary { background: #013849; color: #ffffff !important; }
.e4-quick a.primary:hover, .e4-quick a.primary:focus { background: #012a37; }
.examplesContainer .e4-try {
  font: 600 13px/1.2 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  text-transform: uppercase; letter-spacing: .08em; color: #406a76; margin: 0 0 8px; text-align: left;
}
.e4-examples { list-style: none; padding: 0; margin: 0 0 26px; }
.e4-examples li { margin: 0 0 8px; font: 400 16px/1.4 'Source Serif 4', Georgia, serif; }
.e4-examples li a { color: #013849; text-decoration: underline; text-underline-offset: 3px; }
.examplesContainer .e4-faq-title {
  font: 600 18px/1.3 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif;
  color: #013849; border-top: 1px solid #cdd9dd; padding-top: 18px; margin: 0 8px 8px; text-align: left;
}

/* F5. Reading typography: 16 px, line-height 1.6, about 70 characters a line, brand-colour headings */
.passageContainer .passageContent { font-size: 16px; }
.passageContainer .passageContentHolder { line-height: 1.6; max-width: 44em; margin-left: auto; margin-right: auto; }
.passageContentHolder h2, .passageContentHolder h3, .passageContentHolder h4,
.passageContentHolder .heading, .passageContentHolder .title {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; color: #013849;
}
@media (max-width: 767px) {
  .passageContainer .passageContentHolder { text-align: left; hyphens: auto; -webkit-hyphens: auto; }
}

/* Fix-ups 2 (screenshot gate 2) */
/* F5. Summary button (inline Helvetica Neue 10 px in STEP's JS) and the intro tour use the e4 UI font */
#summbutton { font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif !important; font-size: 12px !important; }
.introjs-tooltip, .introjs-tooltiptext, .introjs-tooltip-title, .introjs-tooltipbuttons,
.introjs-button, .introjs-skipbutton, .introjs-helperNumberLayer {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif !important;
}
/* F3 stop-gap: browsers or the edge may still hold a pre-fix sidebar bundle with STEP's lexicon-report link */
a[title="Report lexicon issues"] { display: none !important; }
/* F4. Phone passage picker: the "type in a passage" box sits above the book grid, not below the fold */
@media (max-width: 767px) {
  #passageSelectionModal .modal-content { display: flex; flex-direction: column; }
  #passageSelectionModal .modal-content > .modal-header { order: -2; }
  #passageSelectionModal .modal-content > .footer { order: -1; padding: 4px 8px 8px; }
  #passageSelectionModal .modal-content > .footer br:first-of-type { display: none; }
  #passageSelectionModal #enterYourPassage { width: 100% !important; height: 36px !important; box-sizing: border-box; margin: 0 !important; }
}

/* ---- e4 RP7 (e4app TASK-055; DESIGN 3.7; BA-R40): reference dialog Current panel / New panel / Append buttons ---- */
#displayLocForm .e4-loc-group { display: inline-flex; flex-wrap: nowrap; }
#displayLocForm .e4-loc-group > .btn.e4-loc {
  font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; font-size: 14px; line-height: 1.3; padding: 4px 12px;
  color: var(--clrText, #333); background: var(--clrBackground, #fff); background-image: none; border-color: #9fb3ba; box-shadow: none;
}
#displayLocForm .e4-loc-group > .btn.e4-loc:hover { background: #e8eff1; }
#displayLocForm .e4-loc-group > .btn.e4-loc.active,
#displayLocForm .e4-loc-group > .btn.e4-loc.active:hover { color: #ffffff; background: #013849; border-color: #012a37; z-index: 2; }
#displayLocForm .e4-loc-group > .btn.e4-loc:focus-visible { outline: 2px solid #1b5162; outline-offset: 1px; z-index: 3; }
/* e4 RP14 (WAR R3, BA-R40): New panel shows from 640 px (DESIGN 3.7 "Under 640 px New panel is hidden"); Bootstrap's
   hidden-xs would hide it up to 767 px. */
@media (min-width: 640px) and (max-width: 767px) {
  #displayLocForm .e4-loc-group > .btn.e4-loc.hidden-xs { display: inline-block !important; }
}
/* ---- end e4 RP7 ---- */

/* ---- e4 RP9 (e4app TASK-055; DESIGN 3.9; BA-R42): half-screen and mid widths. One constant: 640 px. ---- */
/* Heights by CSS, not STEP's one-time inline pane heights (view_sidebar.js:139-158). */
#sidebar { flex-direction: column; height: calc(100dvh - var(--e4-nav-h, 50px)); overflow: hidden !important; }
/* flex only while open: STEP hides the closed panel (#sidebar display:none, sidebar_structure.scss:5); a closed panel left
   displayed sits off-canvas to the right on phones (right:-75%) and widens the page to 683 px at 390. */
.row-offcanvas.active #sidebar { display: flex; }
#sidebar > .tab-content { flex: 1 1 auto; min-height: 0; overflow: hidden; }
#sidebar > .tab-content > .tab-pane { height: auto !important; max-height: none !important; overflow-y: auto; overscroll-behavior: contain; }
#sidebar > .tab-content > .tab-pane.active { height: 100% !important; }
/* 640-1199: text and panel side by side (flex; no slide, no scrim, no float-drop at 992-999) */
@media (min-width: 640px) and (max-width: 1199px) {
  .row-offcanvas, .row-offcanvas.active { right: 0 !important; left: 0 !important; transition: none !important; }
  .mainPanel.row-offcanvas.active { display: flex; }
  .row-offcanvas.active #columnHolder { flex: 1 1 auto; min-width: 0; width: auto !important; float: none; }
  .row-offcanvas.active #sidebar { flex: 0 0 clamp(240px, 36%, 360px); width: auto !important; position: static !important;
    float: none; transition: none !important; }
  .row-offcanvas.active #sidebar.e4-rail { flex-basis: 44px; overflow: hidden !important; }
  .row-offcanvas.active #sidebar.e4-rail > .tab-content { display: none; }
  .row-offcanvas.active #sidebar.e4-rail > ul.nav-tabs { flex-direction: column; border-bottom: 0; }
}
/* >= 1200: STEP's split (panel 22.9 %), with the CSS heights above */
/* < 640: the panel covers the text at full width under the header; scrim behind it; header toggle / Esc / scrim close */
@media (max-width: 639px) {
  .row-offcanvas, .row-offcanvas.active { right: 0 !important; left: 0 !important; transition: none !important; }
  .row-offcanvas.active #columnHolder { width: 100% !important; }
  /* STEP's sticky passage header (.passageOptionsGroup, z-index 2145) would sit above the overlay and the scrim */
  .row-offcanvas.active #columnHolder .passageOptionsGroup { z-index: 1 !important; }
  .row-offcanvas.active #sidebar { position: fixed !important; top: var(--e4-nav-h, 50px); bottom: 0; right: 0; left: auto;
    width: 100% !important; height: auto; z-index: 1030; transition: none !important; background: #fff; display: flex !important; }
}
div.e4-scrim { position: fixed; top: var(--e4-nav-h, 50px); right: 0; bottom: 0; left: 0; background: rgba(0,0,0,.25);
  z-index: 1029; transition: none; }
/* ---- end e4 RP9 ---- */
/* ---- e4 BA-R58 (RP-FIX-E4-001 v8 9.2; e4app TASK-055): drag the panel's left edge. The grip is the first child of
   #sidebar (e4_panel.js), fully inside it (#sidebar clips: overflow hidden), shown only while the panel is open side by
   side (640 px and wider, not the rail). html.e4-panel-sized = a stored width (e4.panel.width), applied as
   --e4-panel-user-w (clamped 240 px .. 55% of the window by e4_panel.js); with it the 640-1199 flex layout also holds
   from 1200 px (STEP's float split ignores a width), and without it nothing changes from RP9. ---- */
#sidebar > .e4-panel-grip { display: none; }
@media (min-width: 640px) {
  .row-offcanvas.active #sidebar:not(.e4-rail) { position: relative !important; right: auto !important; left: auto !important; }
  .row-offcanvas.active #sidebar:not(.e4-rail) > .e4-panel-grip { display: block; position: absolute; left: 0; top: 0; bottom: 0;
    width: 7px; margin: 0; cursor: col-resize; touch-action: none; z-index: 5; background: transparent; outline: none; }
  .row-offcanvas.active #sidebar > .e4-panel-grip::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
    background: #d6dde0; transition: width .1s, background-color .1s; }
  .row-offcanvas.active #sidebar > .e4-panel-grip:hover::before, .row-offcanvas.active #sidebar > .e4-panel-grip:focus-visible::before,
  .row-offcanvas.active #sidebar > .e4-panel-grip.e4-dragging::before { width: 3px; background: #013849; }
  html.e4-panel-sized .mainPanel.row-offcanvas.active { display: flex; }
  html.e4-panel-sized .row-offcanvas.active #columnHolder { flex: 1 1 auto; min-width: 0; width: auto !important; float: none; }
  html.e4-panel-sized .row-offcanvas.active #sidebar:not(.e4-rail) { flex: 0 0 var(--e4-panel-user-w) !important;
    width: var(--e4-panel-user-w) !important; max-width: none; float: none; }
  body.e4-resizing { user-select: none; -webkit-user-select: none; cursor: col-resize; }
}
@media (min-width: 640px) and (pointer: coarse) { .row-offcanvas.active #sidebar:not(.e4-rail) > .e4-panel-grip { width: 16px; } }
/* ---- end e4 BA-R58 ---- */
/* ---- e4 RP8 (e4app TASK-055; DESIGN 3.8 item 2; BA-R41): the vocabulary popup ("Quick Lexicon", class e4-vocab set
   by overlay section 23) always at the bottom. !important beats STEP's inline top:0 (view_quick_lexicon.js:151-152,
   :312-313) and its inline touch max-height (:338-342). "Notes" and "Verses with word" keep STEP's placement. ---- */
#quickLexicon.e4-vocab { top: auto !important; bottom: 0 !important; max-height: 35vh !important; overflow-y: auto; }
/* From 640 px the popup stops at the panel's left edge (--e4-panel-w: set by the RP9 guard, 0px when closed).
   BUILDER READING: the popup is appended to #wrap, a sibling of .row-offcanvas, not inside it, so DESIGN's selector
   `.row-offcanvas.active #quickLexicon.e4-vocab` alone only matches when STEP appends it to #columnHolder (sidebar
   hover); the :has() form covers #wrap. */
@media (min-width: 640px) {
  .row-offcanvas.active #quickLexicon.e4-vocab,
  #wrap:has(.row-offcanvas.active) > #quickLexicon.e4-vocab { right: var(--e4-panel-w, 0px); width: auto !important; }
}
@media (hover: none), (pointer: coarse) { #quickLexicon.e4-vocab { max-height: 28vh !important; } } /* BUILDER READING: + coarse, see e4_vocab.js */
/* ---- end e4 RP8 ---- */
/* e4 LB (E4-022) (e4app TASK-057; BibleApps research/e4-tonight/lane-1.md step 7): the last old-font rules in STEP's
   bundle. qtip's close icon was Tahoma; intro.js bubbles were Helvetica Neue. Same selectors as STEP's rules, loaded
   after them, so these win. */
.qtip-icon .ui-icon { font-family: 'Source Sans 3', Arial, sans-serif; }
.introjs-tooltipReferenceLayer, .introjs-tooltipReferenceLayer *, .introjs-helperNumberLayer { font-family: 'Source Sans 3', 'Helvetica Neue', Arial, sans-serif; }
/* ---- end e4 LB (E4-022) ---- */
