:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-strong: #ffffff;
    --text: #202124;
    --muted: #656b73;
    --line: #d8dee8;
    --line-strong: #aeb8c8;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --accent-soft: #d7f2ee;
    --error: #b42318;
    --shadow: 0 10px 30px rgba(27, 31, 35, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    padding-bottom: 64px;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    min-height: 38px;
    border: 1px solid var(--accent-dark);
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    padding: 0 14px;
    font-weight: 700;
}

button:hover {
    background: var(--accent-dark);
}

button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.button {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--accent-dark);
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    padding: 0 14px;
    font-weight: 700;
    text-decoration: none;
}

.button:hover {
    background: var(--accent-dark);
}

.button.secondary {
    border-color: var(--line-strong);
    background: #fff;
    color: var(--accent-dark);
}

.button.secondary:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
}

input,
select {
    min-height: 38px;
    padding: 7px 9px;
}

textarea {
    min-height: 230px;
    resize: vertical;
    padding: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.5;
}

label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px clamp(16px, 4vw, 44px);
    border-bottom: 1px solid var(--line);
    background: var(--panel-strong);
}

.brand-link {
    display: block;
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
}

.brand-link:hover .eyebrow,
.brand-link:hover h1 {
    color: var(--accent-dark);
}

.brand-link:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-pill,
.json-link,
.header-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    color: var(--accent-dark);
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.account-pill {
    max-width: min(320px, 34vw);
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-pill:hover,
.json-link:hover,
.header-link:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.header-link.is-active {
    border-color: var(--accent-dark);
    background: var(--accent);
    color: #fff;
}

.eyebrow {
    margin: 0 0 2px;
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.app-shell {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 20px clamp(12px, 3vw, 32px) 36px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat {
    container-type: inline-size;
    display: grid;
    min-height: 112px;
    align-content: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 18px;
    box-shadow: var(--shadow);
}

.stat-link {
    color: inherit;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.stat-link:hover {
    border-color: var(--accent);
    box-shadow: 0 14px 34px rgba(27, 31, 35, 0.12);
    transform: translateY(-2px);
}

.stat-link:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

.stat-value {
    display: block;
    font-size: 30px;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    display: block;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

@supports (font-size: 1cqi) {
    .stat {
        min-height: clamp(112px, 28cqi, 150px);
        padding: clamp(16px, 5cqi, 28px);
    }

    .stat-value {
        font-size: clamp(30px, 13cqi, 64px);
    }

    .stat-label {
        font-size: clamp(14px, 4cqi, 18px);
    }
}

.resource-nav {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 0;
}

.tabs,
.tool-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-color: transparent;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--muted);
    padding: 0 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tab:hover,
.tab.is-active {
    background: var(--panel);
    color: var(--text);
}

.tool-links {
    padding-bottom: 8px;
}

.tool-link {
    color: var(--muted);
    padding: 4px 6px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.tool-link:hover,
.tool-link.is-active {
    color: var(--accent-dark);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.panel {
    display: none;
    border: 1px solid var(--line);
    border-top: 0;
    background: var(--panel);
    padding: 14px;
    box-shadow: var(--shadow);
}

.panel.is-active {
    display: block;
}

.standalone-panel {
    width: min(720px, calc(100% - 32px));
    margin: 40px auto;
    border-top: 1px solid var(--line);
}

.check-option {
    display: inline-flex;
    align-items: center;
    grid-template-columns: none;
    gap: 8px;
    margin: 14px 0;
    color: var(--text);
    font-size: 14px;
}

.check-option input {
    width: auto;
    min-height: 0;
}

.meta {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.meta p {
    margin: 6px 0;
}

.query-bar {
    display: grid;
    grid-template-columns: minmax(180px, 2fr) minmax(150px, 1.3fr) minmax(160px, 1.5fr) minmax(90px, 0.7fr) minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(85px, 0.6fr) 78px;
    gap: 10px;
    align-items: end;
}

.network-heading,
.network-visual-heading {
    align-items: flex-start;
}

.network-signal-tabs {
    display: flex;
    gap: 8px;
}

.network-controls {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(160px, 200px) auto;
    align-items: end;
    gap: 10px;
    margin-top: 18px;
}

.network-controls button {
    justify-self: start;
}

.network-result-meta {
    margin-top: 14px;
}

.network-visual {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.network-visual-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
}

.network-visual-heading h3,
.network-table-section h3 {
    margin: 0;
    font-size: 18px;
}

.network-canvas {
    width: 100%;
    overflow-x: auto;
    background:
        radial-gradient(circle at center, rgba(215, 242, 238, 0.7), transparent 34%),
        #fbfcfe;
}

.person-network-svg {
    display: block;
    width: 100%;
    min-width: 760px;
    height: auto;
}

.network-edge-visible {
    stroke: #8ba4a1;
    stroke-linecap: round;
    transition: stroke 120ms ease, opacity 120ms ease;
}

.network-edge-hit {
    stroke: transparent;
    stroke-width: 18;
    pointer-events: stroke;
}

.network-edge-link:hover .network-edge-visible,
.network-edge-link:focus .network-edge-visible {
    stroke: var(--accent);
    opacity: 1;
}

.network-edge-link:focus {
    outline: none;
}

.network-node {
    fill: var(--accent);
    stroke: #fff;
    stroke-width: 3;
    filter: drop-shadow(0 3px 5px rgba(27, 31, 35, 0.18));
}

.focal-node {
    fill: var(--accent-dark);
    stroke-width: 5;
}

.network-node-label {
    fill: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 800;
}

.focal-label {
    fill: var(--accent-dark);
    font-size: 17px;
}

.network-node-link:hover .network-node-label,
.network-node-link:focus .network-node-label {
    fill: var(--accent);
    text-decoration: underline;
}

.network-node-link:focus {
    outline: none;
}

.network-node-link:focus .network-node {
    stroke: #f6c453;
    stroke-width: 5;
}

.network-live-detail {
    min-height: 44px;
    margin: 0;
    border-top: 1px solid var(--line);
    background: var(--accent-soft);
    color: var(--accent-dark);
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 700;
}

.network-table-section {
    margin-top: 20px;
}

@media (prefers-reduced-motion: reduce) {
    .network-edge-visible {
        transition: none;
    }
}

.people-form {
    grid-template-columns: minmax(190px, 2fr) minmax(160px, 1.3fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(85px, 0.6fr) 78px;
}

.shows-form {
    grid-template-columns: minmax(220px, 2fr) minmax(150px, 1fr) minmax(110px, 0.8fr) minmax(85px, 0.6fr) 78px;
}

.result-meta {
    min-height: 28px;
    margin: 12px 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
}

.pager[hidden] {
    display: none;
}

.pager-summary {
    font-weight: 700;
}

.pager-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.pager-controls a,
.pager-controls .is-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--accent-dark);
    padding: 0 10px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.pager-controls a:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.pager-controls .is-current {
    border-color: var(--accent-dark);
    background: var(--accent);
    color: #fff;
    cursor: default;
}

.pager-ellipsis {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 2px;
    color: var(--muted);
    font-weight: 800;
}

.query-timing {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 44px;
    border-top: 1px solid var(--line);
    background: var(--panel-strong);
    color: var(--muted);
    padding: 10px clamp(12px, 3vw, 32px);
    box-shadow: 0 -8px 24px rgba(27, 31, 35, 0.08);
    font-size: 13px;
}

.query-timing-summary {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.query-timing-label {
    color: var(--accent-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.query-build {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

#queryTimingValue {
    color: var(--text);
    font-size: 15px;
    white-space: nowrap;
}

#queryTimingDetails {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 9px 10px;
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eef2f7;
    color: #3f444a;
    font-size: 12px;
    font-weight: 800;
}

td {
    max-width: 420px;
}

tr:last-child td {
    border-bottom: 0;
}

.nowrap {
    white-space: nowrap;
}

.table-link {
    color: var(--accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.table-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

.table-link:focus-visible {
    border-radius: 4px;
    outline: 3px solid var(--accent-soft);
    outline-offset: 2px;
}

.related-section {
    margin-top: 22px;
}

.related-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 8px;
}

.related-heading h2 {
    margin: 0;
    font-size: 18px;
}

.sort-link {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    border-radius: 4px;
    color: inherit;
    text-decoration: none;
}

.sort-link:hover {
    color: var(--accent-dark);
}

.sort-link:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

.sort-caret {
    color: var(--accent-dark);
    font-size: 0.72em;
    opacity: 0.35;
}

.sort-link.is-active .sort-caret {
    opacity: 1;
}

.related-more {
    margin: 8px 0 0;
    text-align: right;
}

.connection-people {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
    font-size: 18px;
    font-weight: 800;
}

.connection-note {
    margin: 12px 0 0;
    border-left: 3px solid var(--accent);
    background: var(--accent-soft);
    padding: 10px 12px;
    color: var(--text);
    font-size: 13px;
}

.show-profile {
    margin-top: 22px;
}

.show-profile h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.show-profile-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.show-artwork-link {
    display: block;
    border-radius: 6px;
}

.show-artwork-link:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

.show-artwork {
    display: block;
    width: 180px;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: 6px;
    object-fit: cover;
}

.show-profile-copy {
    min-width: 0;
}

.person-profile {
    margin-top: 22px;
}

.person-profile h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.person-profile-layout {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.person-profile-portrait {
    display: grid;
    width: 180px;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
}

.person-profile-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-profile-initials {
    font-size: 52px;
    font-weight: 800;
}

.person-profile-copy {
    min-width: 0;
}

.person-profile-copy p {
    max-width: 72ch;
    margin: 0;
    white-space: pre-line;
}

.show-feed-title {
    margin: 0 0 8px;
}

.show-description {
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.show-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    margin: 14px 0 0;
}

.show-metadata div {
    min-width: 140px;
}

.show-metadata dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.show-metadata dd {
    margin: 2px 0 0;
}

.show-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 14px;
}

.overview-shell {
    padding-top: 24px;
}

.overview-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.overview-heading h2 {
    margin: 0;
    font-size: 20px;
}

.overview-heading p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.overview-section + .overview-section {
    margin-top: 38px;
    border-top: 1px solid var(--line);
    padding-top: 30px;
}

.overview-heading-link {
    color: var(--accent-dark);
    text-decoration: none;
}

.overview-heading-link:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.overview-more {
    margin-top: 14px;
    font-weight: 800;
}

.show-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.episode-activity-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.show-overview-card {
    display: grid;
    grid-template-rows: auto auto 1fr;
    align-content: start;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.show-overview-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.show-overview-card:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

.show-overview-artwork-frame {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #eef2f7;
    overflow: hidden;
}

.show-overview-artwork {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.show-overview-artwork-fallback {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: var(--accent-dark);
    font-size: 48px;
    font-weight: 800;
}

.show-overview-name {
    padding: 11px 11px 3px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.show-overview-date {
    align-self: end;
    padding: 0 11px 12px;
    color: var(--muted);
    font-size: 12px;
}

.archive-year-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.archive-year {
    display: grid;
    min-width: 0;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    padding: 14px;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.archive-year:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.archive-year:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

.archive-year-number {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

.archive-year-count {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.episode-overview-title {
    width: 44%;
    min-width: 260px;
    white-space: normal;
}

.people-overview-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.person-overview-card {
    container-type: inline-size;
    display: grid;
    grid-template-rows: auto auto auto 1fr;
    align-content: start;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.person-overview-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.person-overview-card:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

.person-overview-portrait {
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    overflow: hidden;
}

.person-overview-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-overview-initials {
    font-size: 52px;
    font-weight: 800;
}

@supports (font-size: 1cqi) {
    .person-overview-initials {
        font-size: clamp(38px, 28cqi, 72px);
    }
}

.person-tone-0 {
    background: #d7f2ee;
    color: #115e59;
}

.person-tone-1 {
    background: #e0ecf8;
    color: #24557a;
}

.person-tone-2 {
    background: #f6e5d5;
    color: #7a4524;
}

.person-tone-3 {
    background: #ece7f5;
    color: #584579;
}

.person-tone-4 {
    background: #e6efdb;
    color: #456128;
}

.person-tone-5 {
    background: #f5e1e4;
    color: #7b3843;
}

.person-overview-name {
    padding: 11px 11px 2px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.person-overview-primary {
    padding: 0 11px 2px;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

.person-overview-detail {
    align-self: end;
    padding: 0 11px 12px;
    color: var(--muted);
    font-size: 12px;
}

.people-overview-episode {
    width: 38%;
    min-width: 240px;
    white-space: normal;
}

.episode-title-cell {
    width: 300px;
    min-width: 260px;
    max-width: 420px;
    white-space: normal;
}

.episode-show-cell {
    width: 190px;
    min-width: 170px;
    max-width: 280px;
    white-space: normal;
}

.url-cell {
    width: 160px;
    min-width: 140px;
    max-width: 200px;
    overflow-wrap: anywhere;
    white-space: normal;
}

.transcript-snippet {
    min-width: 360px;
    max-width: 680px;
    color: var(--text);
    line-height: 1.45;
    white-space: normal;
}

.episode-audio {
    display: block;
    width: 220px;
    max-width: 100%;
    height: 34px;
}

.episode-player {
    margin-top: 22px;
}

.episode-player h2,
.episode-transcript-link h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.episode-audio-detail {
    width: min(640px, 100%);
    height: 40px;
}

.audio-player {
    display: grid;
    width: max-content;
    max-width: 100%;
    gap: 6px;
}

.audio-player-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.audio-player-controls[hidden],
.audio-player-icon[hidden],
[data-audio-play-icon][hidden],
[data-audio-pause-icon][hidden] {
    display: none;
}

.audio-player-button {
    position: relative;
    display: inline-grid;
    width: 48px;
    height: 48px;
    min-height: 48px;
    place-items: center;
    border-radius: 50%;
    padding: 0;
}

.audio-player-button:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 3px;
}

.audio-player-toggle {
    width: 56px;
    height: 56px;
    min-height: 56px;
}

.audio-player-icon {
    display: block;
    width: 27px;
    height: 27px;
}

.audio-player-toggle .audio-player-icon {
    width: 25px;
    height: 25px;
}

.audio-player-skip-amount {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding-top: 2px;
    font-size: 9px;
    line-height: 1;
}

.audio-player-time {
    justify-self: center;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.episode-transcript-link {
    margin-top: 22px;
}

.episode-transcript-link p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.episode-description {
    margin-top: 22px;
}

.episode-description h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.episode-description-text {
    width: 100%;
    color: var(--text);
    overflow-wrap: anywhere;
    white-space: normal;
}

.transcript-shell {
    max-width: 1040px;
}

.transcript-hero {
    margin-bottom: 18px;
}

.transcript-hero h2 {
    max-width: 880px;
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.05;
}

.transcript-meta {
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.transcript-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.subtle-link {
    color: inherit;
    text-decoration: none;
}

.subtle-link:hover {
    color: var(--accent-dark);
}

.transcript-panel,
.transcript-document,
.transcript-sources {
    margin-top: 18px;
}

.transcript-player {
    margin-bottom: 20px;
}

.transcript-document {
    max-width: 82ch;
    color: var(--text);
    font-size: 18px;
    line-height: 1.62;
}

.transcript-document p {
    margin: 0 0 18px;
}

.transcript-sources h2,
.transcript-panel h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.muted {
    color: var(--muted);
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px;
}

.pill {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: none;
    min-height: 24px;
    border: 1px solid #c6ddd9;
    border-radius: 999px;
    background: var(--accent-soft);
    color: #134e4a;
    padding: 2px 8px;
    white-space: nowrap;
}

.pill-link {
    text-decoration: none;
}

.pill-link:hover {
    border-color: var(--accent);
    background: #c1e9e3;
    color: var(--accent-dark);
}

.pill-link:focus-visible {
    outline: 3px solid var(--accent-soft);
    outline-offset: 2px;
}

.sql-panel {
    display: grid;
    gap: 10px;
}

.sql-controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
}

.sql-controls label {
    width: 110px;
}

.schema-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.schema-table {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.schema-table h2 {
    margin: 0;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    background: #eef2f7;
    font-size: 16px;
}

.schema-table ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.schema-table li {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(110px, 1.3fr);
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding: 8px 12px;
    font-size: 13px;
}

.schema-table li:last-child {
    border-bottom: 0;
}

.empty {
    padding: 24px;
    color: var(--muted);
    text-align: center;
}

.error-text {
    color: var(--error);
    font-weight: 700;
}

@media (max-width: 1100px) {
    .episode-activity-grid,
    .people-overview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .archive-year-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .query-bar,
    .people-form,
    .shows-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .episode-activity-grid,
    .people-overview-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body {
        padding-bottom: 0;
    }

    .app-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .overview-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .resource-nav {
        align-items: stretch;
        flex-direction: column;
        gap: 0;
    }

    .tool-links {
        border-top: 1px solid var(--line);
        padding: 8px 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat {
        min-height: 124px;
        padding: 22px;
    }

    .stat-value {
        font-size: 48px;
    }

    .stat-label {
        font-size: 18px;
    }

    @supports (font-size: 1cqi) {
        .stat {
            min-height: clamp(124px, 22cqi, 148px);
            padding: clamp(20px, 5cqi, 28px);
        }

        .stat-value {
            font-size: clamp(48px, 12cqi, 72px);
        }

        .stat-label {
            font-size: clamp(18px, 4cqi, 22px);
        }
    }

    .query-bar,
    .people-form,
    .shows-form,
    .network-controls {
        grid-template-columns: 1fr;
    }

    .network-controls button {
        justify-self: stretch;
    }

    .network-signal-tabs {
        width: 100%;
    }

    .network-signal-tabs .header-link {
        flex: 1 1 0;
        justify-content: center;
    }

    .related-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .show-profile-layout,
    .person-profile-layout {
        grid-template-columns: 1fr;
    }

    .show-artwork,
    .person-profile-portrait {
        width: min(220px, 100%);
    }

    .sql-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .sql-controls label {
        width: 100%;
    }

    .pager {
        align-items: flex-start;
        flex-direction: column;
    }

    .pager-controls {
        justify-content: flex-start;
    }

    .query-timing {
        position: static;
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
    }

    .query-timing-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    #queryTimingDetails {
        white-space: normal;
    }
}

@media (max-width: 620px) {
    .episode-activity-grid,
    .people-overview-grid,
    .archive-year-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .episode-activity-grid,
    .people-overview-grid,
    .archive-year-grid {
        grid-template-columns: 1fr;
    }
}
