/* Guided reading mode. Loaded after tool.css and bento.css. */

.g-guided-only { display: none; }
.is-guided .g-guided-only { display: block; }
.is-guided .g-hide, .is-guided [data-g-skip] { display: none !important; }

.g-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 4px 0 18px; }
.g-seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; }
.g-seg button {
  font: 500 13px/1 var(--body); padding: 10px 18px; min-height: 40px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); cursor: pointer; transition: background .3s, color .3s;
}
.g-seg button[aria-pressed="true"] { background: var(--accent); color: var(--card); }
.g-seg button:not([aria-pressed="true"]):hover { color: var(--ink); }
.g-time { font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.g-progress { margin-bottom: 22px; }
.g-track { height: 4px; background: var(--line); border-radius: 99px; overflow: hidden; }
.g-track i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .6s cubic-bezier(.16, 1, .3, 1); }
.g-prompt {
  margin: 22px 0 0; padding: 16px 20px; border-left: 3px solid var(--gold);
  background: var(--card); border-radius: 0 12px 12px 0; color: var(--ink);
}

/* One step at a time reads better with a little more air. */
.is-guided > h3:not(.g-hide),
.is-guided > h2.g-h2step:not(.g-hide) { border: 0; padding: 0; text-align: left; margin: 8px 0 18px; font: 400 clamp(1.7rem, 3.4vw, 2.3rem)/1.15 var(--display); text-transform: none; letter-spacing: -.01em; color: var(--ink); }
.is-guided > .g-step-in { animation: g-in .5s cubic-bezier(.16, 1, .3, 1); }
@keyframes g-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.g-nav {
  position: sticky; bottom: 0; z-index: 5;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 28px; padding: 14px 0 16px;
  background: linear-gradient(to top, var(--paper) 70%, rgba(242, 239, 231, 0));
}
.is-guided .g-nav { display: flex; }
.g-nav button[disabled] { opacity: .4; cursor: default; }
.g-nav button[hidden] { display: block; visibility: hidden; }
.g-count { font: 500 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; flex: 1; }

.g-finish { margin-top: 28px; padding: clamp(22px, 3vw, 32px); background: var(--night); color: var(--night-text); border-radius: 14px; }
.g-finish-h { margin: 0 0 8px !important; color: var(--night-text) !important; font: 300 1.7rem/1.15 var(--display); }
.g-finish p { color: var(--night-mute); max-width: 34rem; }
.g-finish-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.g-finish .btn { background: var(--gold); color: var(--night); }
.g-finish .btn:hover { background: #E4B85F; color: var(--night); }
.g-finish .btn-ghost { color: var(--night-text); border-color: var(--night-line); }
.g-finish .btn-ghost:hover { border-color: var(--gold); }
.g-next { display: contents; }

@media (max-width: 520px) {
  .g-time { display: none; }
  .g-count { font-size: 10px; }
  .g-nav .btn, .g-nav .btn-ghost { padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .g-track i { transition: none; }
}

/* ---------- left sidebar: one timeline for both modes ---------- */
/* Item height shrinks to fit the screen so the list never needs its own scrollbar. */
.toc {
  width: 236px;
  --pitch: clamp(25px, calc((100vh - var(--bar-h) - var(--sbar-h) - 140px) / var(--n, 14)), 42px);
}
.toc li a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-line { list-style: none; margin: 0; padding: 0; }
.g-line li { position: relative; margin: 0; height: var(--pitch); }
.g-line li::before { content: ""; position: absolute; left: 12px; top: calc(50% + 11px); height: calc(var(--pitch) - 22px); width: 2px; background: var(--line); }
.g-line li:last-child::before { display: none; }
.g-line button {
  display: flex; align-items: center; gap: 10px; width: 100%; height: 100%; min-width: 0; text-align: left;
  padding: 0 6px 0 0; background: none; border: 0; border-radius: 999px; cursor: pointer;
  font: 400 14px/1.2 var(--body); color: var(--ink); white-space: nowrap;
}
.g-line .dot {
  flex: 0 0 24px; width: 24px; height: 24px; display: grid; place-items: center; position: relative; z-index: 1;
  font: 500 11px/1 var(--mono); color: var(--muted); background: var(--card);
  border: 1px solid var(--line); border-radius: 50%; transition: background .3s, color .3s, border-color .3s;
}
.g-line .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-line button:hover .t { color: var(--accent); }
.g-line button:hover .dot { border-color: var(--accent); }
.g-line button.done .dot { background: #E4EFE1; border-color: #B9C9BC; color: var(--accent); }
.g-line button.on .dot { background: var(--night); border-color: var(--night); color: var(--gold); }
.g-line button.on .t { font-weight: 600; }

/* ---------- shortcut to the word-by-word Greek ---------- */
.g-greek {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--accent);
  background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.g-greek:hover { color: #2F4838; }

/* ---------- step dots under the progress bar (where the sidebar is a drawer) ---------- */
.g-dots { display: none; justify-content: space-between; gap: 4px; margin-top: 10px; }
.g-dots button { flex: 1; max-width: 22px; height: 22px; padding: 0; background: none; border: 0; cursor: pointer; position: relative; }
.g-dots button::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); }
.g-dots button.done::after { background: #B9C9BC; border-color: #B9C9BC; }
.g-dots button.on::after { background: var(--night); border-color: var(--night); transform: scale(1.3); }
@media (max-width: 1299px) { .g-dots { display: flex; } }


/* ---------- study title clears the fixed bars by the same 16px as the sidebar ---------- */
main:not(.wide) { padding-top: calc(var(--sbar-h, 0px) + 16px); }
#result > h2:first-child { margin-top: 0; }

/* Source entry reached from a citation link in the text. */
.cite-flash { background: rgba(201, 162, 77, .22); transition: background .4s; border-radius: 4px; }

/* ---------- wider "Your path" menu: Host of Heaven word study only (2026-11-15) ---------- */
/* Its step names are long. Until the right-hand side of the page has a use, the menu takes
   more room and the reading column moves right to make space. On screens wide enough the
   column stays centred. Any name that still does not fit wraps onto a second line.
   To apply this to another study, add its key (the URL hash without the step) to the selectors. */
body[data-study="word-host-of-heaven-lord-of-hosts"] .g-line li { height: auto; min-height: var(--pitch); display: flex; }
body[data-study="word-host-of-heaven-lord-of-hosts"] .g-line li::before { top: 50%; height: 100%; }
body[data-study="word-host-of-heaven-lord-of-hosts"] .g-line button { height: auto; padding: 3px 6px 3px 0; white-space: normal; }
body[data-study="word-host-of-heaven-lord-of-hosts"] .g-line .t { overflow: visible; text-overflow: clip; }
@media (min-width: 1300px) {
  body[data-study="word-host-of-heaven-lord-of-hosts"] { --toc-w: clamp(236px, calc(100vw - 46rem - 4.5rem), 520px); }
  body[data-study="word-host-of-heaven-lord-of-hosts"] .toc { width: var(--toc-w); }
  body[data-study="word-host-of-heaven-lord-of-hosts"] main:not(.wide) {
    margin-left: max(calc(1.2rem + var(--toc-w) + 20px), calc((100% - 46rem) / 2));
    margin-right: auto;
  }
}
@media (max-width: 1299px) {
  body[data-study="word-host-of-heaven-lord-of-hosts"] .toc:not(.hidden) { width: min(420px, 90vw); }
}
