:root {
  /* Station palette */
  --main-color: #7800ff;
  --main-color-light: #d9b8ff;
  --main-color-dark: #5200ad;
  --primary-button-color: #6500d6;
  --primary-text-color: #2b005c;
  --bg-color-main: #f4f5f6;
  --cov-color: #ebaf00; /* Pantone 2314: matched-passage marker */

  --bg: #ffffff;
  --surface: #f4f5f6;
  --border: #eaecf0;
  --text: #1a2027;
  --muted: #787878;
  --radius: 5px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-color-main);
  color: var(--muted);
  font-family: "Mulish", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

/* ---- Two-column layout ---- */
.layout {
  display: flex;
  gap: 10px;
  align-items: stretch;
  height: 100vh;
  padding: 10px;
  overflow: hidden;
}
.left {
  flex: 0 0 400px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 5px;
}
.right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  overflow-y: auto;
  padding-bottom: 16px;
}
.right-view {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

/* ---- Panels (Kendo-like rounded white boxes) ---- */
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.search-panel {
  padding: 10px;
  flex: 0 0 auto;
}
.list-panel {
  padding: 6px 4px 6px 10px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-left: solid #fff 5px;
}

/* ---- Search + date filters ---- */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
}
.search-box .st-input { padding-left: 34px; }

.st-input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.st-input:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 0 3px var(--main-color-light);
}

.date-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.date-field {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.date-field > span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

/* ---- Press-release list ---- */
.list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 2px 10px 8px 2px;
  flex: 0 0 auto;
}
.list-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.list-count { font-size: 0.8rem; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.list-header { align-items: center; gap: 8px; }
.sort-wrap { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.sort-label { font-size: 0.75rem; color: var(--muted); }
.sort-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  flex: 0 0 auto;
}
.sort-toggle button {
  font: inherit;
  font-size: 0.75rem;
  padding: 3px 8px;
  border: 0;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}
.sort-toggle button + button { border-left: 1px solid var(--border); }
.sort-toggle button:hover { background: var(--bg-color-main); }
.sort-toggle button.active { background: var(--main-color); color: #fff; }
.pr-time { color: var(--muted); }

.pr-list {
  list-style: none;
  margin: 0;
  padding: 0 6px 0 0;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.pr-list li {
  border-bottom: 1px solid var(--border);
  padding: 8px 6px;
  cursor: pointer;
  transition: background-color 0.12s;
}
.pr-list li:hover { background: var(--bg-color-main); }
.pr-list li.pulse { animation: pr-pulse 0.9s ease-out 2; }
@keyframes pr-pulse {
  0% { background: var(--main-color-light); box-shadow: inset 4px 0 0 var(--main-color); }
  100% { background: transparent; box-shadow: inset 4px 0 0 transparent; }
}
.pr-list li:last-child { border-bottom: none; }

.pr-title {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 3px;
}
.pr-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}
.pr-badge {
  display: inline-block;
  background: var(--main-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 8px;
}

/* ---- Chart cards ---- */
.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  height: 320px;
}
.card-row {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
}
.card-row > .card { min-width: 0; }
.card-row > .card { height: 440px; }
.card-wide { flex: 1 1 0; }
.card-half { flex: 1 1 0; }
.card-row > .card.card-auto { height: auto; }
.card-auto .card-body { flex: 0 0 auto; }
.card-narrow { flex: 0 0 230px; }
.card-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--primary-text-color);
  font-weight: 700;
  font-size: 0.95rem;
}
.card-body {
  flex: 1 1 auto;
  padding: 10px 12px;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.card-footnote {
  flex: 0 0 auto;
  padding: 6px 14px 10px;
  color: var(--secondary-text-color, #6b6b6b);
  font-size: 0.85rem;
}

/* ---- SVG charts ---- */
/* Absolutely positioned so the SVG never feeds its own size back into the
   flex layout (which caused a ResizeObserver -> re-render growth loop). */
.chart {
  position: absolute;
  top: 10px;
  left: 12px;
  /* Explicit size: an SVG with only ``inset`` sizes itself from its aspect
     ratio and can spill past the card bottom. */
  width: calc(100% - 24px);
  height: calc(100% - 20px);
  display: block;
}
.chart .axis { stroke: #8e8e8e; stroke-width: 1; }
.chart .grid { stroke: #dfdfdf; stroke-width: 1; }
.chart .axis-label { fill: #232323; font: 13px Arial, Helvetica, sans-serif; }
.chart .tick-label { fill: #232323; font: 13px Arial, Helvetica, sans-serif; }
.chart .bar-value { fill: #232323; font: 700 12px Arial, Helvetica, sans-serif; }
.chart.has-hl .bar-value.hl { fill: var(--main-color-dark); }
.chart .trend-line { fill: none; stroke: var(--main-color); stroke-width: 1.5; stroke-linejoin: round; }
.chart .trend-area { fill: none; }
.chart .trend-dot { fill: #fff; stroke: var(--main-color); stroke-width: 2; }
.chart .bar { fill: var(--main-color); transition: opacity 0.12s, fill 0.12s; }
.chart .legend-box { fill: rgba(255, 255, 255, 0.9); stroke: var(--border); stroke-width: 1; }
.chart .legend-label { fill: #232323; font: 12px Arial, Helvetica, sans-serif; }
.chart .weekday-label { fill: #8e8e8e; font: 12px Arial, Helvetica, sans-serif; }
.chart .weekend-sep { stroke: #b5b5b5; stroke-width: 1.2; }
.chart .total-line { fill: none; stroke: #9a9a9a; stroke-width: 1.5; stroke-linejoin: round; }
.chart .total-area { fill: #c4c4c4; opacity: 0.22; }
.chart .pr-marker-dot { fill: var(--main-color-dark); stroke: #fff; stroke-width: 1.5; cursor: pointer; transition: fill 0.12s; }
.chart .pr-marker-dot[data-tip]:hover { fill: var(--main-color); }
.chart .pr-marker-count { fill: #fff; font: 700 11px Arial, Helvetica, sans-serif; pointer-events: none; }
.chart .trend-area-main { fill: var(--main-color); opacity: 0.12; }

/* ---- Chart hover highlight ---- */
.chart .hit { fill: transparent; }
.chart .focus-guide {
  stroke: var(--main-color-light); stroke-width: 1; stroke-dasharray: 3 3;
  opacity: 0; pointer-events: none;
}
.chart .focus-dot {
  fill: var(--main-color); stroke: #fff; stroke-width: 2;
  opacity: 0; pointer-events: none; transition: opacity 0.12s;
}
.chart .focus-dot.focus-total { fill: #9a9a9a; }
.chart .focus-guide.hl,
.chart .focus-dot.hl { opacity: 1; }
.chart.has-hl .bar { opacity: 0.35; }
.chart.has-hl .bar.hl { opacity: 1; fill: var(--main-color-dark); }
.chart .tick-label.hl { fill: var(--primary-text-color); font-weight: 700; }

/* ---- Share bar (card title bar) ---- */
.card-header-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  max-width: 460px;
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}
.share-bar:empty { display: none; }
.share-track {
  display: flex;
  flex: 1 1 auto;
  height: 10px;
  min-width: 80px;
  border-radius: 5px;
  overflow: hidden;
  background: #c4c4c4;
}
.share-seg { height: 100%; transition: filter 0.12s; }
.share-seg.seg-coverage { background: var(--main-color); }
.share-seg.seg-other { background: #c4c4c4; }
.share-seg:hover { filter: brightness(0.88); }
.share-label { white-space: nowrap; font-variant-numeric: tabular-nums; }
.share-label b { color: var(--main-color); font-weight: 700; }

/* ---- KPI card ---- */
.kpi-body { overflow: auto; }
.kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: minmax(0, 1fr);
  gap: 8px;
  height: 100%;
}
.kpi-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  min-width: 0;
}

.kpi-value {
  color: var(--primary-text-color);
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.kpi-tile.kpi-main .kpi-value { color: var(--main-color); }
.kpi-text { color: var(--text); font-size: 0.85rem; line-height: 1.35; padding-right: 18px; }
.kpi-text b { color: var(--main-color-dark); }
.kpi-extra { margin-top: 4px; }
.kpi-of { font-size: 1rem; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi-of.kpi-vs { margin-left: 8px; }
.kpi-progress-row { display: flex; align-items: center; gap: 8px; }
.kpi-progress-row .kpi-progress { flex: 1 1 auto; }
.kpi-pct { flex: 0 0 auto; font-size: 0.8rem; font-weight: 700; color: var(--main-color); font-variant-numeric: tabular-nums; }
.kpi-progress {
  height: 8px;
  border-radius: 4px;
  background: #e4e4e4;
  overflow: hidden;
}
.kpi-progress span { display: block; height: 100%; background: var(--main-color); border-radius: 4px; }

/* ---- Chart tooltip (shared, follows the pointer) ---- */
.chart-tip {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  min-width: 140px;
  max-width: 320px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--main-color);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(43, 0, 92, 0.14), 0 1px 3px rgba(16, 24, 40, 0.08);
  font-family: "Mulish", sans-serif;
  font-size: 0.8rem;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.1s, transform 0.1s;
}
.chart-tip.show { opacity: 1; transform: none; }
.chart-tip .tip-title {
  color: var(--primary-text-color);
  font-weight: 700;
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.chart-tip .tip-row { display: flex; align-items: center; gap: 6px; line-height: 1.5; }
.chart-tip .tip-label { color: var(--muted); flex: 1 1 auto; }
.chart-tip .tip-value { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-tip .tip-swatch { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.chart-tip .sw-main { background: var(--main-color); }
.chart-tip .sw-other { background: #c4c4c4; }
.chart-tip .sw-total { background: #9a9a9a; }
.chart-tip .sw-pr { background: var(--main-color-dark); }
/* Press-release rows: a very faint fill shows coverage relative to the best
   press release of that day. The 2px padding is taken back by the margins. */
.chart-tip .tip-pr {
  display: flex;
  gap: 8px;
  width: calc(100% + 12px);
  margin: 2px -6px -2px;
  padding: 2px 6px;
  border-radius: 5px;
  line-height: 1.35;
  background-image: linear-gradient(90deg, rgba(120, 0, 255, 0.07) var(--fill, 0%), transparent var(--fill, 0%));
}
/* The title's bottom margin absorbs a positive top margin; offset its padding. */
.chart-tip .tip-title + .tip-pr { margin-top: -2px; }
.chart-tip .tip-pr-n {
  margin-left: auto;
  padding-left: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.chart-tip .tip-pr-time { flex: 0 0 auto; font-weight: 700; color: var(--main-color-dark); font-variant-numeric: tabular-nums; }
.chart-tip .tip-pr-title { color: var(--text); overflow-wrap: anywhere; }
.chart-tip .tip-hint { margin-top: 6px; color: var(--muted); font-size: 0.72rem; font-style: italic; }
/* Pinned (clicked) tooltip: the hover tooltip frozen in place; rows only
   show they are clickable when pointed at. */
.chart-tip.pinned { pointer-events: auto; transition: none; }
.chart-tip.pinned button.tip-pr {
  border: none;
  background-color: transparent;
  font: inherit;
  line-height: 1.35;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: box-shadow 0.12s, background-color 0.12s;
}
.chart-tip.pinned button.tip-pr:hover,
.chart-tip.pinned button.tip-pr:focus-visible {
  background-color: #fff; /* keeps the coverage fill (background-image) */
  box-shadow: 0 2px 10px rgba(43, 0, 92, 0.18);
  outline: none;
}

/* ---- States ---- */
.empty { color: var(--muted); font-style: italic; padding: 8px 6px; }
.hidden { display: none !important; }
body.modal-open { overflow: hidden; }
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--muted);
}
.unauthorized {
  text-align: center;
  color: var(--muted);
  padding: 48px 24px;
  font-style: italic;
}

/* ---- Modal (press-release popup) ---- */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, 0.45); }
.modal-panel {
  position: relative;
  background: var(--bg);
  border-radius: 0;
  max-width: none;
  width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  box-shadow: none;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
}
.modal-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: none;
  background: var(--surface);
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
}
.modal-close:hover { color: var(--text); }
.modal-content h2 { margin: 0 8px 6px 0; font-size: 1.25rem; padding-right: 28px; color: var(--text); }
.modal-content .item-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 16px; }
.pr-head h2 { margin: 0 8px 6px 0; font-size: 1.25rem; color: var(--text); }
.pr-head .item-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 8px; }
.modal-body { white-space: pre-wrap; line-height: 1.65; color: var(--text); }
.modal-section {
  margin: 22px 0 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.art-list li {
  padding: 9px 4px;
  border-bottom: 1px solid var(--border);
}
.art-list li:last-child { border-bottom: none; }
.art-list a {
  color: var(--main-color);
  text-decoration: none;
  font-weight: 600;
}
.art-list a:hover { text-decoration: underline; }
.art-list .item-meta { color: var(--muted); font-size: 0.82rem; }
.modal-articles { margin-top: 8px; }

/* ---- Press-release popup: front-page-style two-column layout ---- */
.pr-head {
  margin-bottom: 14px;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px;
}
.pr-head-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pr-head-top h2 { margin: 0; }
.pr-back {
  align-self: flex-start;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.pr-back svg { display: block; }
.pr-back:hover {
  color: var(--main-color);
  border-color: var(--main-color-light);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}
.pr-body-toggle { margin-top: 10px; }
.pr-body-toggle > summary {
  cursor: pointer;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--main-color);
  font-weight: 700;
  list-style: none;
}
.pr-body-toggle > summary::-webkit-details-marker { display: none; }
.pr-body-toggle > summary::before { content: "▸ "; }
.pr-body-toggle[open] > summary::before { content: "▾ "; }
.pr-body-toggle .modal-body {
  margin-top: 10px;
  max-height: 30vh;
  overflow-y: auto;
  padding-right: 6px;
}

.pr-layout {
  display: flex;
  gap: 10px;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
}
.pr-left {
  flex: 0 0 400px;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
}
.pr-right {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  overflow-y: auto;
}
.pr-left .list-panel { border-left: none; }
.cov-list li { cursor: default; }
.cov-list .cov-title { color: var(--text); text-decoration: none; }
.cov-list .cov-title:hover { text-decoration: underline; }
.cov-list li.active { background: var(--bg-color-main); box-shadow: inset 3px 0 0 var(--main-color); }

/* ---- Coverage article (replaces the detail charts) ---- */
.pr-charts { display: flex; flex-direction: column; gap: 8px; }
.pr-article { padding: 14px 18px 20px; }
.art-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}
.art-title {
  flex: 1 1 auto;
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
}

/* Body on the left, Station-style meta column + tags on the right. */
.art { display: flex; gap: 18px; align-items: flex-start; }
.art-main { flex: 1 1 auto; min-width: 0; }
.art-side {
  flex: 0 0 190px;
  max-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: sticky;
  top: 0;
}
.art-meta {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text);
}
.art-meta-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.art-meta-label.art-paid { color: #b45309; }
.art-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.6;
  min-width: 0;
}
.art-meta-row svg { flex: 0 0 auto; }
.art-meta-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.art-kws { display: flex; flex-wrap: wrap; gap: 6px; }
.art-kw {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--main-color-light);
  color: var(--primary-text-color);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  border: none;
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
}
.art-kw:hover { background: #cba0ff; }
.art-kw:disabled { cursor: default; opacity: 0.6; }
.art-kw:disabled:hover { background: var(--main-color-light); }
.art-kw-count {
  background: #fff;
  color: var(--main-color-dark);
  border-radius: 8px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-variant-numeric: tabular-nums;
}
.art-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; font-size: 0.85rem; }
.art-links a {
  color: var(--main-color);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--main-color-light);
  border-radius: 8px;
  padding: 4px 10px;
  background: #fff;
}
.art-links a:hover { border-color: var(--main-color); }
.art-player { margin-bottom: 12px; }
.art-player video {
  display: block;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
}
.art-player audio { display: block; width: 100%; max-width: 640px; }
.art-body {
  color: var(--text);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.art-body p { margin: 0 0 0.9em; }
/* Radio/TV transcript: scroll box that follows playback. */
.art-transcript {
  position: relative; /* word offsetTop is measured against this box */
  overflow-y: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.art-transcript .tc { cursor: pointer; border-radius: 3px; transition: background 0.15s; }
.art-transcript .tc:hover { background: var(--bg-color-main); }
.art-transcript .tc.tc-now { background: var(--main-color-light); color: var(--primary-text-color); }
.art-body a { color: var(--main-color); }
.art-body .kw-hl {
  background: rgba(0, 117, 205, 0.15);
  border-bottom: 1px solid rgba(0, 117, 205, 0.25);
  border-radius: 2px;
  padding: 1px 0;
}
/* Hit jumped to from a sidebar tag. */
.art-body .kw-focus { outline: 2px solid var(--main-color); outline-offset: 1px; }
/* Bar in the left gutter beside the passage the coverage match was made on;
   its ends fade over --fade (set per bar in JS). */
.art-body.has-cov-bar { position: relative; padding-left: 14px; }
.cov-bar {
  position: absolute;
  left: 3px;
  width: 4px;
  border-radius: 2px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent,
    var(--cov-color) var(--fade),
    var(--cov-color) calc(100% - var(--fade)),
    transparent
  );
}
.cov-bar-anchor { position: absolute; left: 0; width: 1px; visibility: hidden; }
/* ---- Help buttons + overlays ---- */
.card-title { display: inline-flex; align-items: center; gap: 6px; }
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #e4e4e4;
  color: #6b6b6b;
  font: 700 11px/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
  flex: 0 0 auto;
}
.help-btn:hover, .help-btn:focus-visible { background: #d2d2d2; color: #232323; outline: none; }
.kpi-tile .help-btn { position: absolute; top: 6px; right: 6px; }
.help-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--border), 0 8px 24px rgba(43, 0, 92, 0.12);
  animation: help-in 0.12s ease-out;
}
@keyframes help-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.help-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--border);
}
.help-title { color: var(--primary-text-color); font-weight: 700; font-size: 0.95rem; }
.help-tag {
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--main-color-light);
  color: var(--main-color-dark);
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: 2px;
}
.help-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 14px 18px;
  padding: 12px 14px;
}
.help-example { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.help-chart .help-body { flex-wrap: nowrap; overflow: hidden; }
.help-chart .help-example { flex: 3 1 0; }
.help-chart .help-steps { flex: 2 1 0; overflow: auto; padding-right: 4px; }
.help-kpi .help-example, .help-kpi .help-steps { flex: 1 1 100%; }
.help-kpi .help-example .kpi-tile { padding-right: 12px; }
.help-share { display: flex; align-items: center; gap: 8px; }
.help-share .share-bar { max-width: none; }
.help-svg-box {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  border: 1px dashed var(--border);
  border-radius: 6px;
}
.help-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 0.82rem; }
.help-steps li { display: flex; align-items: flex-start; gap: 8px; }
.help-steps b { color: var(--primary-text-color); }
.help-steps p { margin: 2px 0 0; color: var(--muted); line-height: 1.4; }
.help-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f59e0b;
  color: #fff;
  font: 700 11px/1 Arial, Helvetica, sans-serif;
}
.help-badge.inline { margin-left: 6px; vertical-align: middle; font-size: 11px; }
.help-badge.pin {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}
.chart-tip.help-tip { position: absolute; z-index: 2; transition: none; }

/* Station's paid-content blur. */
.art-body .blur { text-shadow: 0 0 5px black; color: transparent; user-select: none; }

/* ---- Responsive: stack columns ---- */
@media (max-width: 900px) {
  .layout { flex-direction: column; height: auto; overflow: visible; }
  .left { flex: 1 1 auto; max-width: none; }
  .right { overflow: visible; }
  .card-row { flex-direction: column; }
  .card-row > .card-narrow { flex: 0 0 auto; height: auto; }
  .card-row > .card-wide { flex: 0 0 auto; height: 380px; }
  .card-row > .card-half { flex: 0 0 auto; align-self: stretch; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; }
  .help-chart .help-body { flex-wrap: wrap; overflow: auto; }
  .help-chart .help-example { flex: 1 1 100%; min-height: 280px; }
  .help-chart .help-steps { flex: 1 1 100%; overflow: visible; }
  .pr-list { max-height: 420px; }
  .pr-layout { flex-direction: column; height: auto; }
  .pr-left { flex: 1 1 auto; max-width: none; }
  .art { flex-direction: column-reverse; }
  .art-side { flex: 1 1 auto; max-width: none; position: static; }
}
