/* What Is This Sermon About? — 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; }

.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 { display: block; font-size: 13px; font-weight: 700; margin: 14px 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; }

select, textarea {
  width: 100%; font: 14px/1.45 var(--sans); color: var(--ink);
  border: 1px solid #bbb; border-radius: 2px; padding: 7px 8px; background: #fff;
}
textarea { resize: vertical; }
select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.seg { display: flex; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.seg button {
  flex: 1; border: 0; background: #fff; color: var(--ink); font: 13px var(--sans);
  padding: 7px 6px; 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; }
.seg.small button { padding: 5px 6px; }
.primary {
  margin-top: 10px; width: 100%; padding: 9px; font: 700 14px var(--sans);
  background: var(--blue); color: #fff; border: 0; border-radius: 2px; cursor: pointer;
}
.primary:disabled { background: #9aa6d6; cursor: default; }

.main { padding: 24px 28px 40px; min-width: 0; }
.fig-title { font-size: 20px; margin: 0 0 4px; }
.fig-sub { color: var(--ink-2); font-size: 13px; margin: 0 0 14px; }
.empty { color: var(--ink-2); max-width: 560px; }

/* topic bars */
.bars { list-style: none; margin: 0; padding: 0; max-width: 760px; }
.bars li {
  display: grid; grid-template-columns: 230px minmax(0, 1fr) 44px; gap: 10px; align-items: center;
  padding: 3px 0; font-size: 14px;
}
.bars .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bars li.on .name { font-weight: 700; }
.bars .track { position: relative; height: 14px; background: var(--wash); }
.bars .fill { position: absolute; left: 0; top: 0; bottom: 0; background: #c9c9c9; }
.bars li.on .fill { background: var(--hue); }
.bars .cut { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.bars .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 13px; }
.bars li.teacher .name::after { content: " ✓"; color: var(--blue); font-weight: 700; }
.bars li.more { display: block; color: var(--ink-3); font-size: 13px; padding-top: 8px; }
.legend { font-size: 13px; color: var(--ink-2); margin: 12px 0 0; max-width: 760px; }

/* heatmap */
.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 {
  height: 150px; vertical-align: bottom; padding: 0 0 6px; width: 26px; min-width: 26px;
}
.heat thead th span { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.heat tbody th {
  text-align: left; padding: 0 10px 0 0; white-space: nowrap; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis; color: var(--ink);
}
.heat tbody th small { color: var(--ink-3); }
.heat td { width: 26px; height: 22px; padding: 0; border: 1px solid #fff; text-align: center; font-variant-numeric: tabular-nums; }
.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; }
.heat .cat th { cursor: default; padding-top: 12px; font-weight: 700; color: var(--ink); }

.sermons { margin-top: 22px; max-width: 980px; }
.sermons h3 { font-size: 16px; margin: 0 0 8px; }
.srow { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; padding: 7px 0; border-top: 1px solid var(--rule-soft); font-size: 14px; }
.srow .d { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 13px; }
.srow .top { color: var(--ink-2); font-size: 13px; }
.strip { display: flex; gap: 1px; margin-top: 4px; height: 10px; }
.strip i { flex: 1; background: var(--wash); max-width: 18px; }

/* how */
.how { max-width: 860px; }
.steps { padding-left: 20px; }
.steps li { margin: 0 0 10px; }
.how h3 { font-size: 16px; margin: 28px 0 4px; }
.scores { border-collapse: collapse; margin: 18px 0 6px; font-size: 14px; }
.scores th, .scores td { padding: 5px 14px 5px 0; text-align: right; border-bottom: 1px solid var(--rule-soft); font-variant-numeric: tabular-nums; }
.scores th:first-child, .scores td:first-child { text-align: left; }
.scores thead th { border-bottom: 1px solid var(--ink); font-weight: 700; }
.per-topic .pt { display: grid; grid-template-columns: 230px minmax(0, 1fr) 40px 44px; gap: 10px; align-items: center; font-size: 13px; padding: 2px 0; }
.per-topic .track { position: relative; height: 12px; background: var(--wash); }
.per-topic .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--hue); }
.per-topic .zs { position: absolute; top: -3px; bottom: -3px; width: 2px; background: #9a9a9a; }
.per-topic .n { color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.per-topic .v { text-align: right; font-variant-numeric: tabular-nums; }
.defs { font-size: 14px; }
.defs dt { font-weight: 700; margin-top: 10px; }
.defs dd { margin: 2px 0 0; color: var(--ink-2); }
.defs dd em { font-style: normal; color: var(--ink-3); }

.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: 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; }
  .bars li { grid-template-columns: 140px minmax(0, 1fr) 40px; }
  .per-topic .pt { grid-template-columns: 130px minmax(0, 1fr) 30px 38px; }
  .heat tbody th { max-width: 150px; }
  .sources { padding: 18px 16px 40px; }
}
