/* Jesus Christ Mapping — study-aid reference explorer.
   Four-source categorical palette, validated for colourblind separation.
   Two of the four sit below 3:1 on the light surface, so identity is never
   carried by colour alone: every bar keeps a numeric label and every pill
   keeps a swatch plus a text label. */
:root {
  --jc-gs: #2a78d6;
  --jc-bd: #eb6834;
  --jc-tg: #1baf7a;
  --jc-ix: #eda100;
  --jc-track: #ecebe8;
}

.cover.gold { background: linear-gradient(160deg, #5a4520 0%, #2a1d0c 100%); }

/* ---------- hero ---------- */
.jc-hero {
  background: linear-gradient(135deg, #1b2f45 0%, #0d1c2c 100%);
  border-radius: 22px;
  color: #fff;
  padding: 20px 20px 18px;
  box-shadow: 0 10px 26px rgba(13, 28, 44, .22);
}
.jc-hero h1 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .02em;
  line-height: 1.2;
  color: var(--gold);
}
.jc-hero p {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .72);
}

/* ---------- tab strip ---------- */
.jc-tabs {
  display: flex;
  gap: 7px;
  margin: 16px -20px 0;
  padding: 0 20px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.jc-tabs::-webkit-scrollbar { display: none; }
.jc-tab {
  flex: 0 0 auto;
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--chip);
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.jc-tab.active { background: var(--navy); color: #fff; }

/* ---------- filters ---------- */
.jc-filters { margin-top: 14px; }
.jc-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.jc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--ink-soft);
  text-decoration: none;
  cursor: pointer;
}
.jc-chip .dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: currentColor;
  flex: 0 0 10px;
  opacity: .35;
}
.jc-chip.on { color: var(--ink); border-color: #cfcecb; background: #fff; }
.jc-chip.on .dot { opacity: 1; }
.jc-chip .n { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 12px; }

.jc-controls { display: flex; gap: 8px; margin-top: 9px; }
.jc-select, .jc-search {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 11px 13px;
  -webkit-appearance: none;
  appearance: none;
}
.jc-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2.2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}

/* ---------- stat strip ---------- */
.jc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.jc-stat {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .045);
}
.jc-stat b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.4px;
  font-variant-numeric: tabular-nums;
}
.jc-stat span { display: block; font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }

/* ---------- cards & section headings ---------- */
.jc-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px 16px 6px;
  margin-top: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}
.jc-card.flush { padding: 0; overflow: hidden; }
.jc-h {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
  margin: 24px 2px 0;
  scroll-margin-top: calc(var(--topbar-h) + env(safe-area-inset-top) + 12px);
}
.jc-card .jc-h { margin: 0 0 12px; }
.jc-note { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin: 10px 2px 0; }

/* ---------- bar rows ---------- */
.jc-row {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 9px 0 11px;
  border-bottom: 1px solid var(--hairline);
}
.jc-card > .jc-row:last-child { border-bottom: none; }
.jc-row:active { opacity: .6; }
.jc-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}
.jc-row-label { font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jc-row-label small { color: var(--ink-soft); font-size: 12.5px; }
.jc-rank {
  display: inline-block;
  min-width: 2.4em;
  color: var(--ink-soft);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.jc-rank::before { content: '#'; opacity: .6; }
.jc-row-n { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink-soft); flex: 0 0 auto; }
.jc-bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--jc-track);
}
.jc-seg { height: 100%; min-width: 2px; }
.seg-gs { background: var(--jc-gs); }
.seg-bd { background: var(--jc-bd); }
.seg-tg { background: var(--jc-tg); }
.seg-ix { background: var(--jc-ix); }

/* ---------- bubbles ---------- */
.jc-bubbles { width: 100%; height: auto; display: block; touch-action: manipulation; }
.jc-bubbles a { cursor: pointer; }
.jc-bubbles circle { transition: opacity .15s ease; }
.jc-bubbles a:active circle { opacity: .72; }
.jc-bubbles text {
  font-family: var(--sans);
  fill: #fff;
  text-anchor: middle;
  pointer-events: none;
  font-weight: 600;
}
.jc-bubbles a:focus-visible circle { stroke: var(--ink); stroke-width: 2; }

/* ---------- list rows ---------- */
.jc-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}
.jc-item:last-child { border-bottom: none; }
.jc-item:active { background: var(--chip); }
.jc-item-body { min-width: 0; flex: 1; }
.jc-item-title { font-size: 15px; line-height: 1.35; }
.jc-item-sub { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; }
.jc-item-n {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  flex: 0 0 auto;
}
.jc-dots { display: inline-flex; gap: 3px; vertical-align: -1px; margin-left: 6px; }
.jc-dots i { width: 7px; height: 7px; border-radius: 2px; display: block; }

.jc-badge {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  border-radius: 5px;
  padding: 3px 6px;
  text-transform: uppercase;
}
.bg-gs { background: var(--jc-gs); }
.bg-bd { background: var(--jc-bd); }
.bg-tg { background: var(--jc-tg); }
.bg-ix { background: var(--jc-ix); }
.ink-bd { color: #b8420f; }

/* ---------- chapter heat ---------- */
.jc-heat {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 7px;
  margin-top: 4px;
}
.jc-cell {
  aspect-ratio: 1 / 1;
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, .05);
  background: var(--chip);
}
.jc-cell b { font-weight: 600; }
.jc-cell u { font-size: 10px; text-decoration: none; opacity: .7; font-variant-numeric: tabular-nums; }
.jc-cell:active { transform: scale(.95); }
.jc-cell.on { box-shadow: 0 0 0 2px var(--navy); }

/* ---------- detail views ---------- */
.jc-detail-head {
  background: var(--card);
  border-radius: 18px;
  padding: 20px 18px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}
.jc-ref {
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.2px;
}
.jc-ref-sub { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }
.jc-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.jc-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  border-radius: 13px;
  font-size: 15px;
  text-decoration: none;
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  border: none;
  cursor: pointer;
}
.jc-btn:active { background: var(--navy-deep); }
.jc-btn.ghost { background: var(--chip); color: var(--ink); }
.jc-btn.ghost:active { background: #e7e6e4; }

.jc-bullet { padding: 15px 16px; border-bottom: 1px solid var(--hairline); }
.jc-bullet:last-child { border-bottom: none; }
.jc-bullet-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.jc-bullet-entry { font-size: 14.5px; font-weight: 600; color: var(--ink); text-decoration: none; }
.jc-bullet-entry:active { text-decoration: underline; }
.jc-bullet-section { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
.jc-bullet-text {
  font-family: var(--serif);
  font-size: 15.5px;
  line-height: 1.6;
  color: #2c2c2e;
  margin-top: 8px;
}
.jc-cited { font-size: 12.5px; color: var(--ink-soft); margin-top: 8px; }
.jc-cited b { font-weight: 600; color: var(--ink); font-family: var(--serif); }

.jc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.jc-pill {
  font-family: var(--serif);
  font-size: 13.5px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink);
  text-decoration: none;
  border: 1px solid #e8e7e5;
}
.jc-pill:active { background: #e7e6e4; }
.jc-ext { flex: 0 0 auto; color: #b9b8b5; display: inline-flex; }

.jc-more {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 13px;
  border: none;
  border-radius: 13px;
  background: var(--chip);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
}
.jc-more:active { background: #e7e6e4; }

a:focus-visible, button:focus-visible, .jc-cell:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
