/* Analytics view + sermon-detail extras. Uses the site's design tokens only, so both themes work. */
.an-intro { color: var(--ink-2); margin-bottom: .9rem; }
.an-tabs { margin-bottom: 1rem; flex-wrap: wrap; }
.an-tabs button { display: inline-flex; align-items: center; gap: .45rem; }
.an-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
@media (forced-colors: active) { .an-tabs button[aria-selected="true"] { border: 1px solid CanvasText; } }
.an-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--line-strong); flex: none; }
.an-dot.on { background: var(--ok); }
.an-kpis { margin-bottom: .6rem; }
.an-kpis .metric { flex-direction: column; }
.an-kpis .metric small { display: block; font-size: .76rem; line-height: 1.35; margin-top: .2rem; }
.an-src { margin-bottom: 1rem; }
.an-dir { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-weight: 650; font-size: .92em; background: var(--neutral-soft); color: var(--neutral); }
.an-dir.ok { background: var(--ok-soft); color: var(--ok); }
.an-dir.bad { background: var(--bad-soft); color: var(--bad); }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 1rem; }
.an-card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; min-width: 0; }
.an-card h3 { margin-bottom: .3rem; }
.an-card > p.small { margin-bottom: .6rem; }
.an-wide { grid-column: 1 / -1; }
.an-svg { display: block; max-width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.an-svg text { font-family: var(--font); }
.an-lede { font-size: 1rem; color: var(--ink); }
.an-rank { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.an-rank li { counter-increment: r; display: grid; grid-template-columns: 1.6rem 1fr auto; grid-template-areas: "n t v" "n m v"; column-gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.an-rank li:first-child { border-top: 0; }
.an-rank li::before { content: counter(r); grid-area: n; font-weight: 700; color: var(--muted); }
.an-rank a { grid-area: t; font-weight: 600; }
.an-rank span { grid-area: m; }
.an-rank b { grid-area: v; align-self: center; font-variant-numeric: tabular-nums; }
.an-table td, .an-table th { font-size: .86rem; }
.an-caveats { margin-top: 1.2rem; border: 1px solid var(--line); border-radius: var(--r); padding: .7rem 1rem; background: var(--warn-soft); color: var(--ink); }
.an-caveats summary { cursor: pointer; font-weight: 650; color: var(--warn); }
.an-caveats ul { margin: .6rem 0 0; padding-left: 1.2rem; }
.an-caveats li { margin: .25rem 0; font-size: .9rem; }
.an-empty { display: flex; flex-direction: column; gap: .3rem; }
.an-detail { margin-top: 1rem; display: flex; flex-direction: column; gap: .7rem; }
.an-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.an-desc { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .55rem .8rem; background: var(--surface-2); }
.an-desc summary { cursor: pointer; font-weight: 600; }
.an-desc p { white-space: pre-wrap; overflow-wrap: anywhere; margin: .6rem 0 0; color: var(--ink-2); font-size: .9rem; max-height: 22rem; overflow: auto; }
.an-chapters { margin: .5rem 0 0; padding-left: 1.2rem; font-size: .9rem; }
.an-spark { display: flex; align-items: center; gap: .6rem; }
.an-spark .an-svg { width: 120px; }
@media (max-width: 560px) {
  .an-card { padding: .85rem; }
  .an-table th:nth-child(2), .an-table td:nth-child(2) { display: none; }
}
.sheet-body > .an-detail { grid-column: 1 / -1; order: 1; min-width: 0; margin-top: 0; padding-top: 1rem; border-top: 1px solid var(--line); }
