/* ============================================================
   English reading — shared typography & layout
   Used by: english_chapter.html, english_word_study.html
   ============================================================ */


/* ── Chapter shell layout ────────────────────────────────── */

.english-chapter-shell {
  margin-top: 10px;
}

.english-chapter-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  align-items: flex-start;
  flex-wrap: wrap;
}

.english-chapter-summary {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin: 0;
}

.english-chapter-back {
  margin-bottom: 6px;
}

.english-chapter-title-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: baseline;
}

.english-study-box {
  margin-bottom: var(--space-6);
}

.english-study-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.english-study-passage {
  padding: 6px 10px;
  margin: 0;
}

.english-study-passage-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  text-decoration: none;
  color: inherit;
}

.english-study-passage-title:hover {
  text-decoration: underline;
}

.english-study-passage .tagline {
  margin-top: 2px !important;
  margin-bottom: 0 !important;
  font-size: 0.94rem;
}

.english-chapter-nav {
  margin-top: 18px;
}

.english-chapter-nav-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.english-chapter-nav-row .verse-nav {
  flex: 1 1 auto;
  justify-content: center;
  flex-wrap: wrap;
}

.english-chapter-nav-row .btn-muted {
  padding: 4px var(--space-2) !important;
  font-size: 0.95rem;
}

.english-section-header {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
  margin-top: 1.15rem;
}

.english-section-header .section-title {
  margin: 0;
}

.english-section-references {
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .03em;
}

.english-section-references a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.english-section-audio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.english-section-audio .audio-play-btn,
.english-section-audio .audio-speed-btn {
  padding: 2px var(--space-2);
}


/* ── Prose reading block ─────────────────────────────────── */

.english-reading-block {
  font-family: var(--font-system);
  font-size: 1.05rem;
  line-height: 1.75;
}


/* ── Line types ──────────────────────────────────────────── */

.english-poetry-line,
.english-superscription-line,
.english-reference-line {
  display: block;
  margin: 0;
  line-height: 0.96;
}

.english-poetry-line {
  white-space: pre-wrap;
}

.english-poetry-line + .english-poetry-line {
  margin-top: -0.12rem;
}

.english-poetry-indent-1 { padding-left: 0; }
.english-poetry-indent-2 { padding-left: 1.5rem; }
.english-poetry-indent-3 { padding-left: 3rem; }
.english-poetry-indent-4 { padding-left: 4.5rem; }

.english-poetry-centered {
  text-align: center;
}

.english-superscription-line {
  font-size: 0.98rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.3rem;
}

.english-reference-line {
  font-size: 0.96rem;
  color: var(--muted);
}


/* ── WORD Study layout (english_word_study.html) ─────────── */

.ews-layout { display: grid; gap: var(--space-4); }
.ews-howto { display: grid; gap: var(--space-4); }
.ews-howto details { border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-md); background: rgba(255,255,255,.7); }
.ews-howto summary { cursor: pointer; list-style: none; padding: 14px; }
.ews-howto summary::-webkit-details-marker { display: none; }
.ews-howto-summary { display: flex; justify-content: space-between; gap: var(--space-3); align-items: baseline; flex-wrap: wrap; }
.ews-howto-chevron { font-size: .92rem; opacity: .58; transition: transform .18s ease; }
.ews-howto details[open] .ews-howto-chevron { transform: rotate(180deg); }
.ews-progress-bar { height: 10px; border-radius: var(--radius-pill); overflow: hidden; background: rgba(0,0,0,.08); flex: 1 1 260px; min-width: 220px; }
.ews-progress-fill { display: block; height: 100%; background: linear-gradient(90deg, rgba(196,146,55,.9), rgba(31,97,52,.78)); }
.ews-howto-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; padding: 0 14px 14px; }
.ews-howto-steps { display: grid; gap: 10px; }
.ews-howto-step { padding: 10px var(--space-3); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-md); background: rgba(0,0,0,.02); }
.ews-progress-card { padding: var(--space-3); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-md); background: rgba(0,0,0,.025); }
.ews-progress-steps { margin-top: 10px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.ews-progress-step { padding: var(--space-2) 10px; border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-md); background: rgba(255,255,255,.7); font-size: .84rem; opacity: .72; }
.ews-progress-step.is-done { border-color: rgba(31,97,52,.24); background: rgba(31,97,52,.08); opacity: 1; }
.ews-progress-actions { margin-top: var(--space-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ews-card { border: 1px solid rgba(0,0,0,.10); border-radius: 14px; background: rgba(255,255,255,.88); padding: 14px; }
.ews-kicker { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; opacity: .62; }
.ews-title { margin: 4px 0 0; }
.ews-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.ews-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: var(--space-3); }
.ews-status { font-size: .9rem; opacity: .72; }
.ews-passages { display: block; margin-top: 10px; }

/* EWS passage text — matches main reading block */
.ews-passage-text {
  font-family: var(--font-system);
  font-size: 1.05rem;
  line-height: 1.75;
}

.ews-memory-hint { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.ews-memory-selected { margin-top: var(--space-2); padding: var(--space-2) 10px; border: 1px solid rgba(31,97,52,.18); border-radius: var(--radius-md); background: rgba(31,97,52,.06); font-size: .92rem; }
.ews-memory-write { margin-top: 10px; padding: 10px var(--space-3); border: 1px solid rgba(196,146,55,.22); border-radius: var(--radius-md); background: rgba(196,146,55,.08); }
.ews-memory-write-verse { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; opacity: .68; }
.ews-memory-write-text { margin-top: 4px; line-height: 1.5; }
.ews-section-header { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-top: 1rem; }
.ews-section-title { margin: 0; }
.ews-section-references { font-size: .82rem; color: var(--muted); }
.ews-section-references a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ews-section-audio { display: inline-flex; align-items: center; gap: 6px; }
.ews-section-audio .audio-play-btn,
.ews-section-audio .audio-speed-btn { padding: 2px var(--space-2); }

.ews-line-poetry,
.ews-line-superscription,
.ews-line-reference { display: block; margin: 0; line-height: 1.05; }
.ews-line-poetry { white-space: pre-wrap; }
.ews-line-poetry + .ews-line-poetry { margin-top: -0.08rem; }
.ews-indent-1 { padding-left: 0; }
.ews-indent-2 { padding-left: 1.5rem; }
.ews-indent-3 { padding-left: 3rem; }
.ews-indent-4 { padding-left: 4.5rem; }
.ews-centered { text-align: center; }
.ews-line-superscription { font-size: .98rem; color: var(--muted); font-style: italic; margin-bottom: .25rem; }
.ews-line-reference { font-size: .94rem; color: var(--muted); }

.ews-form-grid { display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ews-input { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 68px; resize: vertical; padding: 9px 11px; font: inherit; line-height: 1.45; border: 1px solid rgba(0,0,0,.12); border-radius: var(--radius-md); background: #fff; }
.ews-textarea { min-height: 130px; }
.ews-compare-list { display: grid; gap: 10px; margin-top: 10px; }
.ews-compare-item { padding: 10px var(--space-3); border: 1px solid rgba(0,0,0,.08); border-radius: var(--radius-md); background: rgba(0,0,0,.02); }
.ews-compare-label { font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; opacity: .62; }
.ews-note { font-size: .92rem; color: var(--muted); }
.ews-note.is-error { color: #8b3a3a; }
.ews-help { margin-top: var(--space-2); font-size: .93rem; color: var(--muted); line-height: 1.5; }

.ews-memory-verse { cursor: pointer; border-radius: var(--radius-sm); padding: 0 .08rem; transition: background .15s ease, box-shadow .15s ease; }
.ews-memory-verse:hover { background: rgba(196,146,55,.10); }
.ews-memory-verse.is-selected { background: rgba(196,146,55,.16); box-shadow: inset 0 0 0 1px rgba(196,146,55,.24); }
.ews-memory-verse:focus-visible { outline: 2px solid rgba(24,41,81,.28); outline-offset: 2px; }
.ews-reference-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }


/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 980px) {
  .english-study-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .ews-form-grid,
  .ews-howto-grid { grid-template-columns: 1fr; }
  .ews-card { padding: var(--space-3); }
}

@media (max-width: 720px) {
  .english-chapter-title-row {
    align-items: flex-start;
  }

  .english-study-grid {
    grid-template-columns: 1fr;
  }

  .english-chapter-nav-row .verse-nav {
    flex-basis: 100%;
    order: 3;
  }

  .english-chapter-summary {
    flex-basis: 100%;
  }
}
