/* What Do People Ask Pastor John? — Plain Swiss (shared/theme.css), Bible hue. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 15px/1.5 var(--sans); }
a { color: var(--blue); }
code { font: 0.9em var(--mono); }
[hidden] { display: none !important; }

:root {
  /* one color per family of topics; all pass 4.5:1 on white */
  --fam-doctrine: #1e4d2b;
  --fam-inner: #1f3fd9;
  --fam-home: #c2410c;
  --fam-church: #6d3fa3;
  --fam-world: #8a6100;
  --fam-piper: #5b5b5b;
}

.app {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 48px);
  border-bottom: 1px solid var(--rule-soft);
}
.side {
  padding: 24px 20px;
  border-right: 1px solid var(--rule-soft);
  position: sticky; top: 0; align-self: start;
  max-height: 100vh; overflow-y: auto;
}
.side h1 { font-size: 26px; line-height: 1.15; margin: 0 0 10px; font-weight: 700; letter-spacing: -0.01em; }
.lede { color: var(--ink-2); margin: 0 0 18px; font-size: 14px; }
.lbl { font-size: 13px; font-weight: 700; }
.lbl-row { display: flex; justify-content: space-between; align-items: baseline; margin: 18px 0 6px; }
.note { font-size: 13px; color: var(--ink-2); }
.status { font-size: 13px; color: var(--ink-3); min-height: 1.5em; margin: 8px 0 0; }
.link { border: 0; background: none; color: var(--blue); font: 13px var(--sans); padding: 0; cursor: pointer; text-decoration: underline; }

.views { display: grid; border: 1px solid var(--ink); border-radius: 2px; }
.views button {
  display: block; text-align: left; border: 0; border-top: 1px solid var(--ink); background: #fff; color: var(--ink);
  font: 13px/1.3 var(--sans); padding: 7px 10px; cursor: pointer;
}
.views button:first-child { border-top: 0; }
.views button b { display: block; font-size: 14px; }
.views button span { color: var(--ink-2); }
.views button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.views button[aria-pressed="true"] span { color: #d0d0d0; }

select, input[type="search"] {
  width: 100%; font: 14px/1.45 var(--sans); color: var(--ink); margin: 0 0 6px;
  border: 1px solid #bbb; border-radius: 2px; padding: 6px 8px; background: #fff;
}
select:focus, input:focus, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.chip-line { margin: 2px 0 0; font-size: 13px; }
.chip { display: inline-block; border: 1px solid var(--ink); border-radius: 2px; padding: 1px 6px; font-size: 13px; }
.chip button { border: 0; background: none; cursor: pointer; padding: 0 0 0 4px; font: inherit; color: var(--ink-2); }

.picked { margin: 0 0 16px; border: 2px solid var(--ink); padding: 12px 14px 14px; font-size: 15px; }
.picked h2 { font-size: 20px; line-height: 1.2; margin: 4px 0 8px; }
.picked .meta { color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.picked .gist { margin: 0 0 10px; font-size: 15px; }
.picked p { margin: 0 0 8px; }
.picked h3 { font-size: 13px; margin: 14px 0 4px; }
.picked ul { list-style: none; margin: 0; padding: 0; }
.picked li { margin: 0 0 5px; font-size: 14px; line-height: 1.35; }
.picked .refs a { display: inline-block; margin: 0 8px 3px 0; font-size: 14px; }
.picked .near button { text-align: left; font-size: 14px; }
.picked .go { font-weight: 700; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--c, #999); }
.tag { display: inline-block; font-size: 12px; border: 1px solid var(--rule-soft); border-radius: 2px; padding: 0 5px; margin: 0 4px 3px 0; color: var(--ink-2); white-space: nowrap; }

.main { padding: 24px 28px 40px; min-width: 0; }
.loading { color: var(--ink-2); }
.fig-title { font-size: 20px; margin: 0 0 4px; }
.fig-sub { color: var(--ink-2); font-size: 13px; margin: 0 0 14px; max-width: 760px; }
.fig-h3 { font-size: 15px; margin: 26px 0 6px; }
.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 8px 40px; align-items: start; max-width: 1180px; }
.two .fig-h3:first-child { margin-top: 8px; }

/* bars */
.bars { max-width: 720px; }
.bars .fam { font-size: 12px; font-weight: 700; margin: 12px 0 2px; color: var(--c); }
.bars .fam:first-child { margin-top: 0; }
.bar {
  display: grid; grid-template-columns: 218px minmax(0, 1fr) 62px; gap: 10px; align-items: center;
  padding: 2px 0; font-size: 14px; width: 100%; border: 0; background: none; text-align: left; color: var(--ink); font-family: var(--sans); cursor: pointer;
}
.bar[disabled] { cursor: default; }
.bar .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .track { position: relative; height: 14px; background: var(--wash); }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--hue)); }
.bar .fill.also { opacity: 0.3; }
.bar .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.bar:not([disabled]):hover .name, .bar.sel .name { color: var(--blue); }
.bar.sel .name { font-weight: 700; }
.bar.dim .fill { opacity: 0.35; }
.verse-bars .bar { grid-template-columns: 170px minmax(0, 1fr) 62px; }
.verse-bars { columns: 2; column-gap: 40px; max-width: 1180px; margin-top: 14px; }
.verse-bars .bar { break-inside: avoid; }

.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.seg button { border: 0; background: #fff; color: var(--ink); font: 13px var(--sans); padding: 6px 14px; cursor: pointer; border-left: 1px solid var(--ink); }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* heat */
.heat-wrap { overflow-x: auto; max-width: 100%; }
.heat { border-collapse: collapse; font-size: 12px; }
.heat th { font-weight: 400; color: var(--ink-2); }
.heat thead th { padding: 0 0 4px; width: 34px; min-width: 34px; font-variant-numeric: tabular-nums; }
.heat tbody th { text-align: left; padding: 0 10px 0 0; white-space: nowrap; color: var(--ink); }
.heat td { width: 34px; height: 20px; padding: 0; border: 1px solid #fff; text-align: center; font-variant-numeric: tabular-nums; font-size: 11px; }
.heat tbody tr { cursor: pointer; }
.heat tbody tr:hover th, .heat tbody tr.sel th { color: var(--blue); }
.heat tbody tr.sel th { font-weight: 700; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; max-width: 1180px; border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-soft); margin: 0 0 8px; }
.stat { padding: 12px 16px 12px 0; }
.stat b { display: block; font-size: 30px; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--ink-2); display: block; margin-top: 4px; }
.chart svg { display: block; width: 100%; height: auto; max-width: 560px; }
.chart text { font: 11px var(--sans); fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.mini { margin: 0; padding-left: 20px; font-size: 14px; }
.mini li { margin: 0 0 3px; }
.mini .v { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }

/* episode lists */
.list-block { margin-top: 30px; max-width: 980px; }
.list-block h3 { font-size: 16px; margin: 0 0 8px; }
.erow { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 2px 12px; padding: 8px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; }
.erow .d { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.erow .t button { font: 700 14px var(--sans); border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; text-align: left; }
.erow .t button:hover { color: var(--blue); }
.erow .g { color: var(--ink-2); font-size: 13px; margin: 1px 0 3px; }
.erow .x { font-size: 12px; color: var(--ink-3); }
.more { margin: 12px 0 0; }

/* search */
.searchbar { display: flex; gap: 6px; margin: 0 0 14px; }
.searchbar input { flex: 1; min-width: 0; margin: 0; font-size: 15px; padding: 9px 10px; border: 2px solid var(--ink); }
.searchbar .primary { padding: 9px 12px; }
.primary { padding: 9px 18px; font: 700 14px var(--sans); background: var(--blue); color: #fff; border: 0; border-radius: 2px; cursor: pointer; }
.tries { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; max-width: 760px; line-height: 1.9; }
.tries button { margin-right: 10px; }
.erow .hit { display: inline-block; font-size: 12px; border: 1px solid var(--ink); border-radius: 2px; padding: 0 5px; margin-left: 6px; color: var(--ink); }
.erow .sim { display: inline-block; width: 46px; height: 5px; background: var(--wash); margin-top: 6px; position: relative; }
.erow .sim i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--hue); }

/* map */
.map-view { display: flex; flex-direction: column; height: calc(100vh - 48px - 48px); min-height: 520px; }
.map-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.map-tools { display: flex; gap: 14px; align-items: center; font-size: 13px; white-space: nowrap; padding-top: 4px; }
.map-wrap { position: relative; flex: 1; min-height: 0; border: 1px solid var(--rule-soft); }
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map.drag { cursor: grabbing; }
.tip { position: absolute; pointer-events: none; background: #fff; border: 1px solid var(--ink); padding: 4px 8px; font-size: 13px; max-width: 280px; line-height: 1.3; z-index: 2; }
.tip small { display: block; color: var(--ink-2); }
.legend-fam { position: absolute; left: 10px; bottom: 8px; margin: 0; padding: 6px 8px; list-style: none; background: rgba(255,255,255,0.92); font-size: 12px; display: flex; flex-wrap: wrap; gap: 2px 14px; max-width: calc(100% - 20px); }

/* how */
.how { max-width: 860px; }
.steps { padding-left: 20px; }
.steps li { margin: 0 0 10px; }
.defs { font-size: 14px; }
.defs dt { font-weight: 700; margin-top: 10px; }
.defs dd { margin: 2px 0 0; color: var(--ink-2); }

.sources { padding: 24px 28px 48px; max-width: 980px; font-size: 13px; color: var(--ink-2); }
.sources h2 { font-size: 16px; color: var(--ink); }
.sources li { margin: 0 0 6px; }

@media (max-width: 980px) {
  .two { grid-template-columns: 1fr; }
  .verse-bars { columns: 1; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; max-height: none; border-right: 0; border-bottom: 1px solid var(--rule-soft); padding: 18px 16px; }
  .main { padding: 18px 16px 32px; }
  .bar { grid-template-columns: 150px minmax(0, 1fr) 56px; }
  .verse-bars .bar { grid-template-columns: 130px minmax(0, 1fr) 56px; }
  .erow { grid-template-columns: 1fr; }
  .map-view { height: 78vh; }
  .map-head { display: block; }
  .sources { padding: 18px 16px 40px; }
}

.val small { color: var(--ink-3); margin-left: 3px; font-size: 12px; }

.chart .col[data-col] { cursor: pointer; outline: none; }
.chart .col[data-col]:hover rect:nth-child(2), .chart .col.sel rect:nth-child(2) { fill: var(--blue); }
.chart .col[data-col]:focus-visible rect:first-child { stroke: var(--blue); stroke-width: 2; }

.measure { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 14px 0 4px; }
