/* institutes.css — Calvin's Institutes chapter reader (usmcmin.org)
   Pairs with generate-institutes.js. Reuses lbcf.css for proofs + link styles. */

.inst-chap-head { text-align: center; padding: 34px 20px 22px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.inst-chap-eyebrow {
  font-family: 'Inter', sans-serif; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px;
}
.inst-chap-head h1 {
  font-family: 'Playfair Display', serif; font-size: clamp(1.5rem, 3.2vw, 2.2rem);
  color: var(--gold-light); line-height: 1.22; margin-bottom: 10px;
}
.inst-argument {
  color: var(--gray); font-size: 0.92rem; line-height: 1.7;
  max-width: 680px; margin: 10px auto 0; font-style: italic;
}
body.light-mode .inst-chap-head h1 { color: #5a4710; }
body.light-mode .inst-chap-eyebrow { color: #8a6a1a; }

.inst-summaries { max-width: 760px; margin: 0 auto 26px; }
.inst-summaries summary {
  cursor: pointer; color: var(--gold); font-size: 0.86rem; font-weight: 600;
  letter-spacing: 0.02em; padding: 8px 0; list-style: none;
}
.inst-summaries summary::-webkit-details-marker { display: none; }
.inst-summaries summary::before { content: '▸ '; }
.inst-summaries[open] summary::before { content: '▾ '; }
.inst-summaries ol { margin: 6px 0 0 0; padding: 12px 16px; list-style: none;
  background: rgba(212,175,55,0.05); border-left: 2px solid var(--gold); border-radius: 0 6px 6px 0; }
.inst-summaries li { color: var(--gray); font-size: 0.86rem; line-height: 1.6; margin-bottom: 6px; }
body.light-mode .inst-summaries summary { color: #8a6a1a; }
body.light-mode .inst-summaries ol { background: rgba(138,106,26,0.08); border-left-color: #8a6a1a; }

.inst-body { max-width: 760px; margin: 0 auto; }
.inst-section { display: grid; grid-template-columns: 48px 1fr; gap: 14px; margin-bottom: 24px; scroll-margin-top: 80px; position: relative; }
.inst-sec-num { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--gold); text-align: right; padding-top: 2px; }
.inst-permalink { display: block; margin-top: 2px; background: none; border: none; cursor: pointer; color: var(--gray); font-size: 0.9rem; opacity: 0; transition: opacity .18s, color .18s; text-decoration: none; }
.inst-section:hover .inst-permalink { opacity: 1; }
.inst-permalink:hover { color: var(--gold); }
.inst-permalink.copied { color: var(--gold-light); opacity: 1; }
.inst-sec-body p { color: var(--white); font-size: 1.02rem; line-height: 1.85; margin-bottom: 12px; }
.inst-sec-body p:last-child { margin-bottom: 6px; }
body.light-mode .inst-sec-body p { color: #1a1a1a; }
body.light-mode .inst-sec-num { color: #8a6a1a; }

/* first-section drop cap */
.inst-section:first-of-type .inst-sec-body p:first-child::first-letter {
  font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 700;
  float: left; line-height: 0.9; padding: 4px 8px 0 0; color: var(--gold-light);
}
body.light-mode .inst-section:first-of-type .inst-sec-body p:first-child::first-letter { color: #8a6a1a; }

.inst-application { max-width: 760px; margin: 22px auto 0; background: rgba(212,175,55,0.06); border: 1px solid rgba(212,175,55,0.3); border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0; padding: 18px 22px; }
.inst-application-head { font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.inst-application p { color: var(--white); font-size: 0.98rem; line-height: 1.8; }
body.light-mode .inst-application { background: rgba(138,106,26,0.07); border-color: rgba(138,106,26,0.35); border-left-color: #8a6a1a; }
body.light-mode .inst-application-head { color: #8a6a1a; }
body.light-mode .inst-application p { color: #1a1a1a; }
@media print { .inst-application { border: 1px solid #999; background: none; border-left: 3px solid #999; } }

.inst-chap-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  max-width: 760px; margin: 36px auto 50px; padding-top: 22px; border-top: 1px solid var(--border); }
.inst-chap-nav a { color: var(--gold); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.inst-chap-nav a:hover { color: var(--gold-light); text-decoration: underline; }
.inst-chap-nav .inst-idx { font-family: 'Inter', sans-serif; font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); }
.inst-chap-nav .inst-idx:hover { color: var(--gold); }
body.light-mode .inst-chap-nav a { color: #8a6a1a; }
body.light-mode .inst-chap-nav .inst-idx { color: #6b6359; }

.inst-chap-foot { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.inst-chap-disclaimer { font-size: 0.78rem; color: var(--gray); font-style: italic; max-width: 580px; margin: 0 auto; line-height: 1.6; }
.inst-chap-disclaimer a { color: var(--gold); text-decoration: none; border-bottom: 1px dotted var(--gold); }
body.light-mode .inst-chap-disclaimer { color: #6b6359; }

@media print {
  .inst-chap-nav, .inst-permalink { display: none !important; }
  .inst-sec-body p, .inst-chap-head h1 { color: #000 !important; }
  .inst-sec-num { color: #555 !important; }
  .inst-summaries[open] ol, .inst-summaries ol { display: block !important; }
}
