/* LBCF — usmcmin.org style additions
   Inherits dark theme from inline page styles; overrides only where unique.
*/

/* ===== Index page (lbcf.html) ===== */
.lbcf-hero { text-align: center; padding: 48px 20px 24px; }
.lbcf-hero img { max-width: 80px; opacity: 0.85; margin-bottom: 16px; }
.lbcf-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold-light);
  margin-bottom: 6px;
}
.lbcf-hero .subtitle { color: var(--gold); font-size: 1.05rem; margin-bottom: 6px; }
.lbcf-hero .desc {
  color: var(--gray); font-size: 0.95rem;
  max-width: 640px; margin: 0 auto 16px; line-height: 1.7;
}
.lbcf-stats { color: var(--gray); font-size: 0.85rem; margin-bottom: 18px; }
.lbcf-stats span { color: var(--gold); font-weight: 600; }

.lbcf-intro {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 22px 26px; margin: 24px 0;
}
.lbcf-intro h2 { color: var(--gold); font-size: 1.15rem; margin-bottom: 10px; }
.lbcf-intro p { color: var(--gray); font-size: 0.95rem; line-height: 1.7; margin-bottom: 10px; }
.lbcf-intro p:last-child { margin-bottom: 0; }
.lbcf-intro a { color: var(--gold); text-decoration: none; }
.lbcf-intro a:hover { color: var(--gold-light); text-decoration: underline; }

.lbcf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.lbcf-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px 20px; text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.15s;
  display: block; position: relative;
}
.lbcf-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.lbcf-card-num {
  font-family: 'Inter', sans-serif; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 6px;
}
.lbcf-card h3 {
  font-family: 'Playfair Display', serif; font-size: 1.1rem;
  color: var(--white); margin-bottom: 8px; line-height: 1.3;
}
.lbcf-card p {
  color: var(--gray); font-size: 0.85rem; line-height: 1.55; margin: 0;
}
.lbcf-card-status {
  position: absolute; top: 12px; right: 12px;
  background: var(--gold); color: #000;
  font-size: 0.65rem; font-weight: 700;
  padding: 2px 8px; border-radius: 10px;
}
.lbcf-card-status.placeholder {
  background: rgba(212,175,55,0.15); color: var(--gold);
  border: 1px solid var(--border);
}

/* ===== Chapter page (lbcf/chapter-NN.html) ===== */
.lbcf-chap-head {
  text-align: center; padding: 36px 20px 24px;
  border-bottom: 1px solid var(--border); margin-bottom: 28px;
}
.lbcf-chap-num {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 8px;
}
.lbcf-chap-head h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--gold-light); margin-bottom: 8px; line-height: 1.2;
}
.lbcf-chap-sub {
  color: var(--gray); font-size: 0.95rem; max-width: 600px; margin: 0 auto;
}

.lbcf-body { max-width: 760px; margin: 0 auto; }
.lbcf-para {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px; margin-bottom: 22px;
  scroll-margin-top: 80px;
}
.lbcf-para-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--gold); text-align: right;
  padding-top: 2px; padding-right: 2px;
  position: relative;
}
.lbcf-permalink {
  display: block; margin-top: 4px; margin-left: auto;
  background: transparent; border: none; cursor: pointer;
  color: var(--gray); font-size: 1rem; padding: 2px 6px;
  border-radius: 4px; transition: all 0.18s; opacity: 0;
}
.lbcf-para:hover .lbcf-permalink { opacity: 1; }
.lbcf-permalink:hover { color: var(--gold); background: rgba(212,175,55,0.08); }
.lbcf-permalink.copied { color: var(--gold-light); opacity: 1; }
.lbcf-para-body p {
  color: var(--white); font-size: 1.02rem; line-height: 1.85;
  margin-bottom: 8px;
}

/* Auto-linked references */
a.lbcf-scrip {
  color: var(--gold); text-decoration: none; font-weight: 500;
  border-bottom: 1px dotted var(--gold);
}
a.lbcf-scrip:hover { color: var(--gold-light); border-bottom-color: var(--gold-light); }
a.lbcf-dict {
  color: var(--gold-light); text-decoration: none;
  border-bottom: 1px dashed rgba(244,212,112,0.4);
}
a.lbcf-dict:hover { color: #fff; border-bottom-color: var(--gold-light); }
a.lbcf-xref {
  color: var(--gold); text-decoration: none; font-weight: 500;
}
a.lbcf-xref:hover { color: var(--gold-light); text-decoration: underline; }

.lbcf-proofs { margin: 8px 0 4px; }
.lbcf-proofs summary {
  color: var(--gold); font-size: 0.83rem; cursor: pointer; user-select: none;
  list-style: none; padding: 4px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.lbcf-proofs summary::-webkit-details-marker { display: none; }
.lbcf-proofs summary::before {
  content: ""; display: inline-block;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 6px solid var(--gold);
  transition: transform 0.18s; transform: rotate(-90deg);
}
.lbcf-proofs[open] summary::before { transform: rotate(0deg); }
.lbcf-proofs summary:hover { color: var(--gold-light); }
.lbcf-proofs > div {
  color: var(--gray); font-size: 0.88rem; line-height: 1.7;
  padding: 8px 12px; margin-top: 4px;
  background: rgba(212,175,55,0.05); border-left: 2px solid var(--gold);
  border-radius: 0 6px 6px 0;
}

.lbcf-chap-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin: 40px auto 60px; padding-top: 24px;
  border-top: 1px solid var(--border); max-width: 760px;
}
.lbcf-chap-nav a {
  color: var(--gold); text-decoration: none; font-size: 0.92rem; font-weight: 500;
}
.lbcf-chap-nav a:hover { color: var(--gold-light); text-decoration: underline; }
.lbcf-chap-nav span { display: inline-block; min-width: 1px; }
.lbcf-chap-nav .lbcf-idx {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray);
}
.lbcf-chap-nav .lbcf-idx:hover { color: var(--gold); }

.lbcf-empty {
  text-align: center; padding: 80px 20px; color: var(--gray);
}
.lbcf-empty h2 { color: var(--gold); margin-bottom: 12px; }
.lbcf-empty a { color: var(--gold); text-decoration: none; }
.lbcf-empty a:hover { text-decoration: underline; }

/* ===== Light mode ===== */
body.light-mode .lbcf-card { background: #fff; border-color: #d4d0c8; }
body.light-mode .lbcf-card h3 { color: #1a1a1a; }
body.light-mode .lbcf-card p { color: #555; }
body.light-mode .lbcf-intro { background: #fff; border-color: #d4d0c8; }
body.light-mode .lbcf-intro p { color: #444; }
body.light-mode .lbcf-para-body p { color: #1a1a1a; }
body.light-mode a.lbcf-scrip { color: #8a6a1a; border-bottom-color: #8a6a1a; }
body.light-mode a.lbcf-dict { color: #6a5316; }
body.light-mode .lbcf-proofs > div { background: rgba(212,175,55,0.08); }

/* ===== Print ===== */
@media print {
  nav, .bte-theme-toggle, .lbcf-permalink, .lbcf-chap-nav { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  .lbcf-para-body p { color: #000 !important; }
  .lbcf-para-num { color: #555 !important; }
  a.lbcf-scrip, a.lbcf-dict, a.lbcf-xref {
    color: #000 !important; border-bottom: none !important; text-decoration: underline;
  }
  .lbcf-proofs { display: block !important; }
  .lbcf-proofs > div { background: none !important; border-left: 2px solid #999 !important; }
  .lbcf-proofs[open] > div, .lbcf-proofs > div { display: block !important; }
  .lbcf-chap-head { border-bottom: 1px solid #999; }
}
