:root {
  --ink: #18201e;
  --muted: #6e746f;
  --paper: #ffffff;
  --card: #ffffff;
  --line: #e2e5ea;
  --accent: #e63d29;
  --lime: #dfff76;
  --shadow: 0 4px 20px rgba(24, 32, 30, 0.045);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { overflow-x: clip; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Heebo", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, a { font: inherit; }
button { color: inherit; }

.grain { display: none; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  padding: 19px 0 17px;
  border-bottom: 1px solid rgba(24, 32, 30, 0.13);
}

.masthead-title { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 24px; }

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Rubik", sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.brand-mark { display: flex; align-items: center; gap: 3px; height: 27px; }
.brand-mark i { display: block; width: 4px; border-radius: 4px; background: var(--accent); }
.brand-mark i:nth-child(1) { height: 12px; }
.brand-mark i:nth-child(2) { height: 25px; }
.brand-mark i:nth-child(3) { height: 18px; }
.brand-mark i:nth-child(4) { height: 8px; }

.show-identity { display: flex; align-items: center; gap: 14px; }
.show-title { margin: 0; color: var(--ink); font-family: "Rubik", sans-serif; font-size: clamp(25px, 3vw, 34px); font-weight: 800; letter-spacing: -0.035em; }
.show-faces { display: flex; align-items: center; padding-inline-start: 7px; }
.face-secret { position: relative; z-index: 2; display: block; flex: 0 0 52px; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; line-height: 0; }
.face-secret:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.show-faces img { width: 52px; height: 52px; object-fit: cover; object-position: center 43%; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 8px #17203335; }
.show-faces .face-secret + img { margin-inline-start: -13px; }
.live-dot { display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(255, 93, 69, 0.12); }

.section-kicker { color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }

.episode-picker { padding: 16px 0 18px; border-top: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 10px; }
.section-kicker { margin: 0 0 4px; }
.section-heading h2, .card h3 { margin: 0; font-family: "Rubik", sans-serif; }
.section-heading h2 { font-size: 27px; }
.episode-nav { display: flex; align-items: center; gap: 10px; direction: ltr; color: var(--muted); font-size: 13px; }
.round-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transition: 160ms ease; }
.round-button:hover:not(:disabled) { background: var(--ink); color: white; border-color: var(--ink); transform: translateY(-2px); }
.round-button:disabled { opacity: 0.3; cursor: default; }

.episode-list { width: 100%; max-width: 100%; min-width: 0; padding: 4px 0 4px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; direction: rtl; cursor: grab; touch-action: pan-x; }
.episode-list::-webkit-scrollbar, .stats-chart::-webkit-scrollbar { display: none; }
.episode-list.dragging, .stats-chart.dragging { cursor: grabbing; user-select: none; }
.episode-rail { position: relative; display: flex; flex-flow: row nowrap; align-items: stretch; width: max-content; min-width: 100%; padding: 0 6px 8px; direction: rtl; }
.episode-rail::before { content: ""; position: absolute; z-index: 0; top: 38px; inset-inline: 0; height: 2px; background: #dce1e8; }
.episode-month-group { position: relative; z-index: 1; display: flex; flex: 0 0 auto; flex-direction: column; }
.episode-month-group + .episode-month-group { margin-inline-start: 9px; padding-inline-start: 9px; border-inline-start: 1px solid var(--line); }
.episode-month-label { height: 24px; padding-inline: 4px; color: #515967; font-size: 11px; font-weight: 800; white-space: nowrap; }
.episode-month-shows { display: flex; flex-flow: row nowrap; }
.episode-tab { display: flex; flex: 0 0 54px; flex-direction: column; align-items: center; height: 70px; padding: 0 2px; color: var(--ink); background: transparent; border: 0; border-radius: 8px; cursor: pointer; transition: background 140ms ease; }
.episode-tab:hover { background: #f6f8fb; }
.episode-tab.active { color: #1747ce; background: #edf3ff; box-shadow: none; }
.episode-marker { display: block; flex: 0 0 10px; width: 10px; height: 10px; margin: 9px 0 7px; background: #fff; border: 2px solid #a0a8b4; border-radius: 50%; transition: 150ms ease; }
.episode-tab:hover .episode-marker { border-color: #2457e6; }
.episode-tab.active .episode-marker { width: 13px; height: 13px; flex-basis: 13px; margin-top: 7.5px; margin-bottom: 5.5px; background: #2457e6; border: 3px solid #dce6ff; box-shadow: 0 0 0 2px #2457e6; }
.episode-tab time { display: flex; flex-direction: column; align-items: center; gap: 1px; white-space: nowrap; line-height: 1.2; }
.episode-tab time strong { font-family: "Rubik", sans-serif; font-size: 14px; font-weight: 700; }
.episode-tab time small { color: var(--muted); font-size: 9px; }
.episode-tab.active time small { color: #2457e6; }

.stats-card { display: flex; flex-direction: column; min-width: 0; margin: 14px 0 18px; overflow: hidden; }
/* A shared summary band, with four equally intentional groups. */
.dashboard-overview-panel { margin: 18px 0; padding: 22px 0; background: #f3f6fa; border-radius: 12px; }
.dashboard-kpis { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, .8fr) minmax(0, 1fr); gap: 0; margin: 0; padding: 0; direction: rtl; }
.analysis-section-heading h2 { margin: 0; font-family: "Rubik", sans-serif; font-weight: 600; }
.global-analysis-heading { display: flex; align-items: baseline; gap: 12px; margin: 24px 0 12px; }
.global-analysis-heading h2 { color: #344456; font-size: 16px; }
.global-analysis-heading > span { color: #7a8592; font-size: 11px; }
.global-analysis .dashboard-overview-panel { margin-top: 0; }
.episode-analysis { margin-top: 36px; padding-top: 24px; border-top: 2px solid #dce5f1; }
.episode-analysis-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.analysis-section-title { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.analysis-section-icon { display: grid; place-items: center; width: 38px; height: 38px; color: #2457c6; background: #edf3ff; border: 1px solid #dce7fc; border-radius: 11px; }
.analysis-section-icon svg { width: 22px; height: 22px; }
.episode-analysis-heading h2 { color: #233e63; font-size: 23px; }
.episode-analysis-heading > p { margin: 0; color: #68788b; font-size: 12px; line-height: 1.6; }
.archive-panel { margin: 0 0 18px; padding: 16px 16px 12px; background: #f3f6fa; border: 0; border-radius: 12px; }
.dashboard-kpi { min-width: 0; padding: 0 24px; }
.dashboard-kpi + .dashboard-kpi { border-inline-start: 1px solid #dce3ec; }
.dashboard-kpi h2 { margin: 0 0 16px; color: #566372; font-size: 12px; line-height: 1.5; font-weight: 600; }
.kpi-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpi-person { display: grid; justify-items: start; align-content: start; gap: 4px; min-width: 0; }
.kpi-person span { display: flex; align-items: center; gap: 6px; color: #566372; font-size: 12px; line-height: 1.4; }
.kpi-person span::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--speaker-color); }
.kpi-person strong, .kpi-total-value, .kpi-feature strong { color: #182b40; font-family: "Rubik", sans-serif; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.35; letter-spacing: -.035em; white-space: nowrap; }
.kpi-person small { color: #76818c; font-size: 10px; line-height: 1.4; }
.kpi-note { display: block; margin-top: 12px; color: #76818c; font-size: 10px; line-height: 1.5; }
.kpi-total-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.kpi-total-pair > div, .kpi-feature { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.kpi-total-pair span, .kpi-feature span { order: -1; color: #566372; font-size: 12px; line-height: 1.4; white-space: nowrap; }
.kpi-total-value, .kpi-feature strong { font-size: 28px; }
.analysis-figures { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; align-items: stretch; margin-bottom: 18px; direction: ltr; }
.analysis-figures > .card { width: auto; height: 100%; box-sizing: border-box; min-width: 0; margin: 0; direction: rtl; }
.stats-card, .mentions-card { display: flex; flex-direction: column; overflow: hidden; }
.mentions-card .mentions-heading { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 2px; }
.mentions-subtitle { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.2; }
.mentions-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; direction: ltr; margin: 4px 0 2px; }
.mentions-nav span { color: var(--muted); font-size: 10px; direction: rtl; }
.mentions-nav button:disabled { opacity: .35; cursor: default; }
.mentions-chart { width: 100%; overflow-x: auto; overflow-y: hidden; direction: rtl; scrollbar-width: thin; }
.mentions-svg { display: block; height: 228px; }
.mentions-bar { opacity: .92; }
.mentions-avatar { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .28)); }
.mentions-avatar-label { font: 9px Heebo, sans-serif; font-weight: 700; fill: #fff; pointer-events: none; }
.stats-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.stats-switch, .mood-mode-switch { display: flex; gap: 3px; padding: 3px; background: #f1f3f6; border-radius: 9px; }
.stats-switch button, .mood-mode-switch button { padding: 6px 11px; color: #56606e; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 11px; font-weight: 700; white-space: nowrap; }
.stats-switch button[aria-pressed="true"], .mood-mode-switch button[aria-pressed="true"] { color: #fff; background: #2457e6; box-shadow: 0 1px 3px #14274b33; }
.stats-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; min-height: 18px; margin: 0 0 4px; color: #555e69; font-size: 10px; direction: ltr; }
.stats-legend > span { display: inline-flex; align-items: center; gap: 5px; direction: rtl; }
.stats-person-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--speaker-color); }
.stats-body { display: block; min-width: 0; margin-top: 0; padding-top: 0; }
.stats-plot { min-width: 0; direction: rtl; }
.stats-mobile-title { display: none; }
.stats-chart { position: relative; display: block; width: 100%; min-width: 0; padding: 2px 1px 3px; overflow: hidden; direction: rtl; }
.stats-svg { display: block; width: 100%; max-width: 100%; height: 242px; overflow: visible; }
.stats-grid-line { stroke: #e7eaf0; stroke-width: 1; }
.stats-axis-line { stroke: #9ca4af; stroke-width: 1.2; }
.stats-y-label { fill: #6e7682; font: 10px Heebo, sans-serif; }
.stats-y-unit, .stats-x-unit { fill: #6e7682; font: 9px Heebo, sans-serif; }
.stats-x-label { fill: #565e69; font: 9px Heebo, sans-serif; }
.stats-speaker-bar { opacity: .9; cursor: help; }
.stats-speaker-bar:hover, .stats-speaker-bar:focus { opacity: 1; stroke: var(--ink); stroke-width: 1; outline: none; }
.stats-tooltip { position: absolute; z-index: 2; max-width: min(300px, calc(100% - 16px)); padding: 8px 11px; border: 1px solid #cbd9ef; border-radius: 8px; background: #f3f7ff; color: #233957; box-shadow: 0 3px 12px #172b4d20; font-size: 12px; line-height: 1.5; text-align: right; direction: rtl; pointer-events: none; }

.episode-view { padding: 26px 0 30px; }
.episode-header { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 18px; }
.selected-episode-kicker { margin-bottom: 2px; }
.episode-header h2 { margin: 0; font-family: "Rubik", sans-serif; font-size: clamp(22px, 3vw, 30px); letter-spacing: -0.04em; }
.episode-title-line { display: flex; align-items: center; gap: 11px; }
.source-link { display: inline-grid; flex: 0 0 25px; place-items: center; width: 25px; height: 25px; color: #59626f; background: #f2f4f7; border: 1px solid var(--line); border-radius: 50%; text-decoration: none; font-size: 13px; line-height: 1; }
.episode-summary { width: 100%; max-width: none; margin: -7px 0 22px; color: #4d5552; font-size: 14px; line-height: 1.7; }
.episode-summary.pending { color: var(--muted); }
.potential-speakers { margin: -14px 0 18px; color: #58635e; font-size: 12px; line-height: 1.5; }
.source-link:hover { color: #2457e6; background: #edf3ff; border-color: #cbd9ff; }

.conflict-alert { position: relative; display: inline-grid; place-items: center; width: 19px; height: 19px; padding: 0; color: #744c00; border: 0; border-radius: 50%; background: #f5c950; font-size: 12px; font-weight: 900; cursor: help; }
.conflict-alert::after { position: absolute; z-index: 20; top: calc(100% + 8px); left: -8px; width: max-content; max-width: min(340px, 80vw); padding: 9px 11px; color: #fff; background: #202733; border-radius: 7px; box-shadow: 0 4px 16px #17203338; content: attr(data-note); font-size: 12px; font-weight: 500; line-height: 1.5; text-align: right; white-space: normal; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 120ms ease; }
.conflict-alert:hover::after, .conflict-alert:focus-visible::after { opacity: 1; visibility: visible; }

.overview-grid { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; align-items: stretch; gap: 16px; }
.card { padding: 18px 24px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.balance-card { min-width: 0; height: 100%; box-sizing: border-box; }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
.card h3 { font-size: 25px; }
.info-chip, .bibi-terms { padding: 6px 10px; color: #555e59; background: #f6f7f9; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; font-weight: 700; }
.balance-card .card-heading, .bibi-heading, .mood-heading, .timeline-heading { align-items: flex-start; }
.balance-body { display: flex; align-items: flex-start; gap: 40px; }
.donut { position: relative; flex: 0 0 auto; width: 190px; height: 190px; border-radius: 50%; transition: background 300ms ease; }
.donut-hole { position: absolute; inset: 45px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--card); border-radius: 50%; }
.donut-hole strong { font-family: "Rubik", sans-serif; font-size: 31px; }
.donut-hole span { color: var(--muted); font-size: 12px; }
.donut-portrait { position: absolute; z-index: 2; width: 38px; height: 38px; object-fit: cover; object-position: center 43%; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 5px rgba(0,0,0,.28); transform: translate(-50%, -50%); }
.speaker-stats { width: 100%; display: grid; align-self: center; gap: 14px; }
.speaker-stat { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; }
.speaker-stat .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--speaker-color); }
.speaker-stat strong { font-size: 14px; }
.speaker-stat small { display: block; color: var(--muted); font-size: 11px; }
.speaker-stat .value { direction: ltr; font-family: "Rubik", sans-serif; font-size: 15px; font-weight: 700; }


.bibi-card { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; box-sizing: border-box; margin: 0; padding-bottom: 12px; overflow: hidden; }
.bibi-title { display: flex; align-items: center; gap: 12px; }
.bibi-content { display: grid; grid-template-columns: 220px 1fr; align-items: start; gap: 24px; }
.bibi-total { display: flex; flex-direction: column; align-items: center; text-align: center; }
.bibi-total img { width: 48px; height: 48px; margin-bottom: 2px; object-fit: cover; object-position: center 43%; border: 2px solid #ffe4de; border-radius: 50%; }
.bibi-total strong { display: flex; flex-direction: row; align-items: baseline; gap: 6px; margin-top: 6px; color: #d53220; font-family: "Rubik", sans-serif; font-size: 38px; letter-spacing: -.04em; direction: ltr; }
.bibi-total-unit { font-size: 19px; letter-spacing: 0; }
.bibi-total small { color: var(--muted); font-size: 12px; text-align: center; }
.bibi-speakers { display: grid; gap: 19px; }
.bibi-speaker-line { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.bibi-speaker-line strong { display: flex; align-items: center; gap: 9px; font-size: 15px; }
.bibi-speaker-line strong img { width: 28px; height: 28px; object-fit: cover; object-position: center 43%; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 5px #17203335; }
.bibi-speaker-line .dot { width: 9px; height: 9px; background: var(--speaker-color); border-radius: 50%; }
.bibi-speaker-line > span { color: var(--ink); font-family: "Rubik", sans-serif; font-size: 17px; font-weight: 700; direction: ltr; }
.bibi-track { height: 8px; margin: 7px 0 5px; overflow: hidden; background: #eceef2; border-radius: 999px; direction: ltr; }
.bibi-track i { display: block; height: 100%; min-width: 2px; background: var(--speaker-color); border-radius: inherit; }
.bibi-speaker small { color: var(--muted); font-size: 11px; }
.bibi-note { flex-shrink: 0; margin: auto 0 0; padding-top: 12px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
.bibi-content.unavailable { opacity: .72; }

.mood-card { margin-top: 16px; }
.beta-chip { color: #805500; background: #fff3c4; border-color: #ead78e; }
.mood-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 15px; color: var(--muted); font-size: 11px; }
.mood-legend span { display: inline-flex; align-items: center; gap: 5px; }
.mood-legend i { width: 9px; height: 9px; border-radius: 3px; }
.mood-legend .mood-neutral { background: #718096; }
.mood-legend .mood-anger { background: #e44031; }
.mood-legend .mood-happiness { background: #e8a800; }
.mood-legend .mood-sadness { background: #3982c4; }
.mood-mode-switch { width: fit-content; margin: 0 0 13px; }
.mood-legend .mood-unanalyzed { background: #cbd0d8; }
.mood-rows { display: grid; gap: 11px; }
.mood-row { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); align-items: center; gap: 14px; }
.mood-speaker { display: flex; min-width: 0; align-items: center; gap: 9px; color: #555e59; }
.mood-speaker img { width: 40px; height: 40px; flex: 0 0 auto; object-fit: cover; object-position: center 43%; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 5px rgba(0,0,0,.28); }
.mood-speaker div { display: grid; grid-template-rows: 16px 14px; gap: 2px; min-width: 0; }
.mood-speaker strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.mood-speaker small { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.mood-bar-track { width: 100%; height: 38px; overflow: hidden; border-radius: 7px; background: transparent; }
.mood-stack { display: flex; height: 100%; overflow: hidden; direction: ltr; border-radius: 7px; background: #eff1f4; transition: width 160ms ease; }
.mood-stack-segment { display: flex; flex: 0 1 0; min-width: 0; align-items: center; justify-content: center; overflow: hidden; }
.mood-stack-segment img { width: 32px; height: 32px; flex: 0 0 auto; object-fit: cover; object-position: center 43%; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 1px 5px rgba(0,0,0,.28); }
.mood-stack .mood-neutral { background: #718096; }
.mood-stack .mood-anger { background: #e44031; }
.mood-stack .mood-happiness { background: #e8a800; }
.mood-stack .mood-sadness { background: #3982c4; }
.mood-stack .mood-unanalyzed { background: #cbd0d8; }

.timeline-card { position: relative; margin-top: 16px; overflow: hidden; }
.timeline-card .card-heading, .mood-card .card-heading { margin-bottom: 12px; }
.mood-heading { align-items: flex-start; }
.card-description { width: 100%; max-width: none; margin: 4px 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; white-space: nowrap; }
.timeline-search { display: grid; width: min(340px, 42%); gap: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.timeline-search .topic-query { width: 100%; padding: 8px 10px; }
.timeline { display: grid; gap: 12px; direction: ltr; }
.timeline-row { display: grid; grid-template-columns: minmax(92px, 125px) 1fr; align-items: center; gap: 14px; direction: rtl; }
.timeline-label { direction: rtl; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #555e59; font-size: 11px; font-weight: 700; text-align: right; }
.timeline-track { position: relative; height: 24px; direction: ltr; background: #eff1f4; border-radius: 6px; overflow: hidden; }
.timeline-segment { position: absolute; top: 3px; bottom: 3px; min-width: 2px; background: var(--speaker-color); border-radius: 3px; opacity: 0.9; }
.timeline-searching .timeline-segment, .timeline-searching .timeline-topic-marker { opacity: .05; }
.timeline-search-hit { position: absolute; z-index: 2; top: 2px; bottom: 2px; min-width: 4px; padding: 0; background: var(--speaker-color); border: 1px solid #fff; border-radius: 4px; box-shadow: 0 0 0 1px var(--speaker-color); opacity: 1; cursor: help; }
.timeline-search-hit:hover, .timeline-search-hit:focus-visible { z-index: 3; opacity: 1; outline: 2px solid var(--ink); outline-offset: 2px; }
.timeline-axis { position: relative; height: 22px; margin-right: 139px; color: var(--muted); font-size: 10px; direction: ltr; }
.timeline-axis span { position: absolute; transform: translateX(-50%); }
.timeline-topic-row { display: grid; grid-template-columns: minmax(92px, 125px) 1fr; align-items: start; gap: 14px; direction: rtl; }
.timeline-topic-row > .timeline-label { padding-top: 3px; }
.timeline-topic-track { position: relative; min-height: 20px; direction: ltr; }
.timeline-topic-marker { position: absolute; max-width: 118px; overflow: hidden; padding: 2px 5px; color: #55408b; background: #f1edfa; border: 1px solid #dfd7f1; border-radius: 999px; font-size: 9px; font-weight: 700; line-height: 12px; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
.timeline-topic-marker:hover, .timeline-topic-marker:focus-visible { z-index: 2; color: #fff; background: #7655a8; border-color: #7655a8; outline: 2px solid #7655a8; outline-offset: 1px; }
.topic-query { display: block; width: min(100%, 460px); padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
.topic-query:focus-visible { outline: 2px solid #2457e6; outline-offset: 2px; }
.topic-hit-detail { display: grid; gap: 3px; margin: 10px 0 0; padding: 10px 12px; color: var(--ink); background: #f1f5fb; border-inline-start: 3px solid #2457e6; border-radius: 7px; font-size: 12px; line-height: 1.5; direction: rtl; }
.topic-hit-detail[hidden] { display: none; }
.topic-hit-detail strong { color: #2457e6; }
.transcript-notice { width: min(440px, calc(100% - 32px)); padding: 24px; color: var(--ink); border: 2px solid #e63d29; border-radius: 14px; box-shadow: 0 15px 60px #17203345; font-family: inherit; }
.transcript-notice::backdrop { background: #10182088; }
.transcript-notice h2 { margin: 0 0 10px; color: #c52f20; font-size: 20px; }
.transcript-notice p { margin: 0 0 18px; color: #555e59; font-size: 14px; line-height: 1.7; }
.transcript-notice form { display: flex; justify-content: center; }
.transcript-notice-close { padding: 9px 14px; color: #fff; background: #c52f20; border: 0; border-radius: 8px; font-weight: 700; cursor: pointer; }
.transcript-notice-close:hover { background: #a92318; }

.empty-state { padding: 100px 0; text-align: center; }
.empty-state span { font-size: 70px; color: var(--accent); }
.empty-state h2 { font-family: "Rubik", sans-serif; }
.empty-state p { color: var(--muted); }

footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 50px; padding: 28px 0 42px; color: var(--muted); border-top: 1px solid var(--line); font-size: 11px; }
footer p { margin: 0; }
footer a { color: #4f5552; text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; border-radius: 2px; }

@media (max-width: 1080px) {
  .dashboard-overview-panel { padding: 0 22px; }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-kpi { padding: 20px; }
  .dashboard-kpi:nth-child(2n + 1) { border-inline-start: 0; }
  .dashboard-kpi:nth-child(n + 3) { border-top: 1px solid #dce3ec; }
}

@media (max-width: 820px) {
  .episode-analysis-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .analysis-figures { grid-template-columns: 1fr; }
  .overview-grid { grid-template-columns: 1fr; grid-auto-rows: auto; align-items: start; }
  .balance-card, .bibi-card { height: auto; }
  .bibi-content { grid-template-columns: 190px 1fr; gap: 28px; }
  .episode-header { align-items: start; }
  .balance-body { display: grid; grid-template-columns: minmax(178px, 1fr) minmax(0, 1fr); align-items: center; gap: 25px; min-height: 0; }
  .donut { position: relative; top: auto; left: auto; justify-self: center; transform: none; }
  .speaker-stats { position: static; width: 100%; transform: none; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1180px); }
  .site-header { height: auto; }
  .masthead-title { align-items: flex-start; flex-direction: column; gap: 9px; }
  .brand { font-size: 13px; }
  .brand-mark { height: 21px; }
  .brand-mark i:nth-child(2) { height: 20px; }
  .show-identity { gap: 10px; }
  .show-faces img { width: 42px; height: 42px; }
  .face-secret { flex-basis: 42px; width: 42px; height: 42px; }
  .show-title { font-size: 23px; }
  .global-analysis-heading { flex-wrap: wrap; gap: 3px 10px; margin: 20px 0 12px; }
  .global-analysis-heading h2 { font-size: 15px; }
  .global-analysis-heading > span { font-size: 10px; }
  .episode-analysis { margin-top: 28px; padding-top: 20px; }
  .episode-analysis-heading { margin-bottom: 16px; }
  .episode-analysis-heading h2 { font-size: 21px; }
  .episode-analysis-heading > p { max-width: 34ch; font-size: 11px; }
  .stats-heading { align-items: start; flex-direction: column; gap: 9px; }
  .stats-switch button { padding: 5px 10px; }
  .analysis-figures .stats-card { display: none; }
  .dashboard-overview-panel { margin: 14px 0 16px; padding: 0 6px; }
  .dashboard-kpi { padding: 16px 12px; }
  .dashboard-kpi h2 { margin-bottom: 12px; font-size: 11px; }
  .kpi-pair { grid-template-columns: 1fr; gap: 12px; }
  .kpi-person { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 7px; }
  .kpi-person span { gap: 4px; font-size: 11px; }
  .kpi-person strong { justify-self: end; font-size: 16px; }
  .kpi-person small { grid-column: 1 / -1; font-size: 9px; }
  .kpi-note { margin-top: 12px; font-size: 9px; }
  .kpi-total-pair { gap: 8px; }
  .kpi-total-pair span, .kpi-feature span { font-size: 10px; }
  .kpi-total-value, .kpi-feature strong { font-size: 20px; }
  .dashboard-kpi:nth-child(-n + 2) h2 { min-height: 3em; }
  .mentions-svg { width: 100%; height: auto; }
  .mentions-subtitle { margin-top: 3px; font-size: 10px; line-height: 1.5; }
  .mentions-nav span { font-size: 11px; }
  .round-button { width: 44px; height: 44px; flex: 0 0 44px; }
  .episode-picker { padding-top: 13px; }
  .section-heading { align-items: center; gap: 12px; }
  .section-heading h2 { font-size: 21px; }
  .episode-nav { flex-wrap: nowrap; justify-content: end; gap: 6px; font-size: 11px; }
  .episode-tab { flex-basis: 50px; }
  .episode-header { display: block; }
  .source-link { flex-basis: 23px; width: 23px; height: 23px; }
  .card { padding: 18px; border-radius: 16px; }
  .card h3 { font-size: 22px; }
  .bibi-card { padding-bottom: 12px; }
  .balance-body { display: flex; flex-direction: column; align-items: center; gap: 20px; }
  .donut { width: 178px; height: 178px; }
  .donut-portrait { width: 34px; height: 34px; }
  .speaker-stats { width: 100%; }
  .bibi-heading { align-items: start; }
  .bibi-content { grid-template-columns: 1fr; gap: 18px; padding-bottom: 10px; }
  .bibi-total { align-items: center; }
  .bibi-total strong { font-size: 38px; }
  .timeline-row, .timeline-topic-row { grid-template-columns: 78px minmax(0, 1fr); gap: 8px; }
  .timeline-axis { margin-right: 86px; }
  .timeline-topic-marker { width: 10px; height: 10px; padding: 0; background: #7655a8; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #7655a8; cursor: pointer; }
  .timeline-topic-marker:hover, .timeline-topic-marker:focus-visible { background: #4f347d; box-shadow: 0 0 0 2px #4f347d; outline: 2px solid #4f347d; outline-offset: 2px; }
  .timeline-search-hit::before { position: absolute; inset: -5px -4px; content: ""; }
  .timeline-heading { align-items: stretch; flex-direction: column; gap: 12px; }
  .card-description { white-space: normal; }
  .timeline-search { width: 100%; }
  .timeline-search .topic-query { min-height: 44px; font-size: 16px; }
  .mood-row { grid-template-columns: 112px minmax(0, 1fr); gap: 8px; }
  .mood-speaker img { width: 32px; height: 32px; }
  .mood-stack { height: 32px; }
  .mood-stack-segment img { width: 26px; height: 26px; }
  footer { display: block; line-height: 1.7; }
  footer p + p { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 380px) {
  .show-title { font-size: 20px; }
  .dashboard-kpi { padding: 14px 9px; }
  .kpi-person { gap: 2px 5px; }
  .kpi-person strong { font-size: 15px; }
  .kpi-total-pair span { max-width: 7ch; min-height: 2.8em; white-space: normal; }
  .kpi-feature span { min-height: 2.8em; }
  .kpi-total-value { font-size: 19px; }
  .archive-panel .section-heading { align-items: stretch; flex-direction: column; gap: 8px; }
  .episode-nav { justify-content: space-between; }
  .mentions-svg .stats-x-label, .mentions-svg .stats-y-label { font-size: 12px; }
  .card h3 { font-size: 21px; }
  .mood-heading { gap: 10px; }
}
