@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@400;500;600;700&display=swap');

/* ===========================================================
   The Road to Discipleship 门徒之路
   Shared stylesheet. Linked by every lesson and reference.
   Warm parchment palette. Serif headings + scripture, sans body.
   =========================================================== */

:root {
  --paper: #faf7f0;
  --paper-card: #fffdf7;
  --paper-2: #f1ead9;
  --ink: #23201a;
  --ink-2: #5f5546;
  --ink-3: #8a7d6a;
  --accent: #7c4a23;
  --accent-soft: #a06a39;
  --gold: #9c7418;
  --gold-soft: #c9a13b;
  --rule: #e0d6bf;
  --teal: #2f5d54;
  --scripture-bg: #fffaf0;
  --scripture-rule: #d8b766;

  --serif: 'Lora', Georgia, 'Songti SC', 'SimSun', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', sans-serif;
  --cjk: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑',
    'Noto Sans SC', sans-serif;

  --measure: 760px;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* page background texture (subtle paper) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(156,116,24,0.05), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(124,74,35,0.04), transparent 55%);
  pointer-events: none;
}

/* ---------- typography ---------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.25; }
h1 { font-size: 2.3rem; letter-spacing: -0.01em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; border-bottom: 1px solid rgba(124,74,35,0.25); }
a:hover { color: var(--accent-soft); border-bottom-color: var(--accent-soft); }
strong { font-weight: 600; color: var(--ink); }
em { font-style: italic; }

.lead { font-size: 1.12rem; color: var(--ink-2); }

/* Chinese helper */
.zh { font-family: var(--cjk); letter-spacing: 0.01em; }
.zh.muted { color: var(--ink-3); font-size: 0.95em; }

/* ---------- layout ---------- */
.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 1.4rem; }
.wrap-wide { max-width: 920px; margin: 0 auto; padding: 0 1.4rem; }

/* top bar */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: rgba(255,253,247,0.7);
  backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 5;
}
.topbar .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1rem; color: var(--accent); border: none; }
.brand small { display: block; font-family: var(--cjk); font-weight: 400; font-size: 0.74rem; color: var(--ink-3); letter-spacing: 0.04em; }
.topbar nav a { margin-left: 1rem; font-size: 0.86rem; color: var(--ink-2); border: none; }
.topbar nav a:hover { color: var(--accent); }

/* lesson header */
header.lesson-head { padding: 3rem 0 1.4rem; border-bottom: 1px solid var(--rule); }
.crumb { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.lesson-num { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--ink-3); margin: 0.3rem 0 0.2rem; }
.lesson-head h1 { margin: 0 0 0.3rem; }
.theme { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 0.6rem; }
.theme .zh { color: var(--ink-3); margin-left: 0.4rem; }
.meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.82rem; color: var(--ink-3); margin-top: 0.8rem; }
.meta span { display: inline-flex; align-items: center; gap: 0.35rem; }
.meta .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold-soft); display: inline-block; }

/* sections */
section { padding: 2.1rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }
.sec-head { display: flex; align-items: baseline; gap: 0.85rem; margin-bottom: 1rem; }
.sec-num { font-family: var(--serif); font-weight: 600; font-size: 0.95rem; color: #fff; background: var(--accent);
  width: 1.9rem; height: 1.9rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sec-head h2 { margin: 0; }
.sec-head .zh { display: block; font-family: var(--cjk); font-size: 0.85rem; color: var(--ink-3); font-weight: 400; }

/* ---------- components ---------- */
.kicker { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; color: var(--gold); display: inline-block; margin-bottom: 0.5rem; }
.kicker .zh { font-size: 0.92em; letter-spacing: 0.04em; color: var(--ink-3); font-weight: 500; margin-left: 0.3rem; }

/* Big Idea card */
.bigidea { background: linear-gradient(180deg, #fff7e6, #fdf0d6); border: 1px solid #ecd9a8;
  border-radius: var(--radius); padding: 1.5rem 1.6rem; margin: 1rem 0 0.5rem; position: relative; }
.bigidea::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gold); border-radius: 4px 0 0 4px; }
.bigidea .en { font-family: var(--serif); font-size: 1.32rem; line-height: 1.4; margin: 0 0 0.5rem; color: var(--ink); }
.bigidea .zh { font-size: 1.02rem; color: var(--ink-2); margin: 0; line-height: 1.6; }
.bigidea .note { margin: 0.8rem 0 0; font-size: 0.95rem; color: var(--ink-2); }

/* Scripture card */
.scripture { background: var(--scripture-bg); border: 1px solid var(--rule); border-left: 4px solid var(--scripture-rule);
  border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1rem 0; }
.scripture .ref { font-family: var(--serif); font-weight: 600; font-size: 0.92rem; color: var(--accent); margin-bottom: 0.5rem; letter-spacing: 0.02em; }
.scripture .text { font-family: var(--serif); font-size: 1.1rem; line-height: 1.7; color: var(--ink); margin: 0; }
.scripture .text sup { font-size: 0.62em; color: var(--gold); vertical-align: super; margin: 0 1px; }
.scripture .text mark { background: rgba(201,161,59,0.28); color: inherit; padding: 0 2px; border-radius: 2px; font-weight: 600; }

/* prompt cards: recap / discuss / apply / takeaway / teacher / prayer / memory */
.card { border: 1px solid var(--rule); border-radius: var(--radius); padding: 1.2rem 1.4rem; margin: 1rem 0; background: var(--paper-card); }
.card.recap   { border-left: 4px solid var(--teal); background: #f4f8f6; }
.card.discuss { border-left: 4px solid var(--teal); }
.card.apply   { border-left: 4px solid var(--accent-soft); }
.card.takeaway{ border-left: 4px solid var(--gold); background: #fffdf5; }
.card.teacher { border-left: 4px solid var(--ink-3); background: var(--paper-2); }
.card.prayer  { border-left: 4px solid var(--accent); background: #fffaf0; }

/* recap summary line: keeps last week's Big Idea in one breath */
.recap-line { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); margin: 0.2rem 0 0.6rem; line-height: 1.55; }
.recap-line .zh { display: block; font-size: 0.9rem; color: var(--ink-3); margin-top: 0.15rem; }
.recap-back { font-size: 0.85rem; }

.card ul, .card ol { margin: 0.3rem 0 0; padding-left: 1.2rem; }
.card li { margin: 0.5rem 0; }
.card li .zh { display: block; color: var(--ink-3); font-size: 0.9em; margin-top: 0.1rem; }
.card .prayer-text { font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; margin: 0.5rem 0; }
.card .prayer-text.zh { color: var(--ink-2); font-size: 1rem; }

/* terms */
.term { font-weight: 600; color: var(--accent); }
.term .zh { font-weight: 400; color: var(--ink-3); font-size: 0.9em; }

/* memory verse highlight */
.memverse { text-align: center; font-family: var(--serif); font-size: 1.18rem; line-height: 1.6; color: var(--ink);
  padding: 1.3rem 1rem; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 1.2rem 0; }
.memverse .ref { display: block; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-top: 0.7rem; }

/* next/prev footer nav */
.lesson-nav { display: flex; justify-content: space-between; gap: 1rem; padding: 1.6rem 0 2.4rem; }
.lesson-nav a { border: 1px solid var(--rule); border-radius: var(--radius); padding: 0.7rem 1rem; color: var(--ink-2); font-size: 0.9rem; background: var(--paper-card); }
.lesson-nav a:hover { border-color: var(--accent); color: var(--accent); }
.lesson-nav a span { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.lesson-nav .right { margin-left: auto; text-align: right; }

footer.site { border-top: 1px solid var(--rule); padding: 1.6rem 0 2.4rem; color: var(--ink-3); font-size: 0.82rem; text-align: center; }
footer.site .zh { font-family: var(--cjk); }

/* ---------- index page ---------- */
.hero { padding: 3.4rem 0 2.6rem; border-bottom: 1px solid var(--rule); }
.hero h1 { font-size: 2.7rem; margin: 0.4rem 0; }
.hero .sub { font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); max-width: 40rem; }
.hero .zh { display: block; font-family: var(--cjk); color: var(--accent); font-size: 1.5rem; margin-top: 0.3rem; }

table.lessons { width: 100%; border-collapse: collapse; margin: 1.4rem 0; }
table.lessons th, table.lessons td { text-align: left; padding: 0.85rem 0.6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.lessons th { font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); font-weight: 700; }
table.lessons td.num { font-family: var(--serif); color: var(--gold); font-weight: 600; width: 3rem; }
table.lessons td.title a { border: none; font-weight: 600; color: var(--accent); }
table.lessons td.title .zh { display: block; color: var(--ink-3); font-size: 0.86em; font-weight: 400; }
table.lessons tr.upcoming td { color: var(--ink-3); }
table.lessons tr.upcoming td.title a { color: var(--ink-3); pointer-events: none; }

/* ---------- print ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  body::before { display: none; }
  .topbar, .lesson-nav, footer.site { display: none; }
  section { page-break-inside: avoid; padding: 0.9rem 0; }
  .scripture, .card, .bigidea { page-break-inside: avoid; box-shadow: none; }
  a { color: var(--ink); border-bottom: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  html { font-size: 16px; }
  h1 { font-size: 1.85rem; }
  .hero h1 { font-size: 2.1rem; }
  .topbar nav a { margin-left: 0.6rem; }
  .sec-head { gap: 0.6rem; }
}
