/* Loud & Free archive: shared semantic palette, independent of processing policy. */
:root, :root[data-appearance="dark"] {
  color-scheme:dark;
  --canvas:#10171d;--shell:#10171d;--surface:#18222b;--surface-raised:#202d38;--surface-inset:#121c24;
  --ink:#f2f5f7;--muted:#adbdc9;--border:#3d505e;--accent:#4bb5d6;--accent-contrast:#071b25;
  --accent-soft:#193845;--focus:#7bdaf4;--glass:#18222bf2;--success:#82dca5;--success-bg:#18362b;
  --warning:#f2ce87;--warning-bg:#382e1c;--danger:#ffa9a9;--danger-bg:#3d242b;
  --glint-edge:#70d1ec;--glint-core:#d3f5ff;
}
:root[data-appearance="light"] {
  color-scheme:light;
  --canvas:#eef2f3;--shell:#eef2f3;--surface:#fff;--surface-raised:#f5f8f9;--surface-inset:#e7eef1;
  --ink:#12212b;--muted:#4c6270;--border:#b6c6cf;--accent:#087898;--accent-contrast:#fff;
  --accent-soft:#dceff5;--focus:#006584;--glass:#fffffff2;--success:#206540;--success-bg:#e5f4eb;
  --warning:#795416;--warning-bg:#fff2d9;--danger:#9e263c;--danger-bg:#fce9ec;
  --glint-edge:#087898;--glint-core:#fff;
}
html body[class] {background:var(--canvas);color:var(--ink);--canvas:inherit;--shell:inherit;--ink:inherit;--muted:inherit;--border:inherit}
html body .shell {width:100%;margin:0;border:0;border-radius:0;box-shadow:none;background:var(--canvas)}
html body .shell header,html body .shell:has(#archive-search) header {
  background:#0d151c;color:#f2f5f7;display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px;
  min-height:92px;padding:10px 32px;border-bottom:1px solid #3d505e;
  background-image:linear-gradient(90deg,#0d151c 48%,#0d151cd9 72%,#0d151c80),url('archive-landscape.webp');background-position:center,right 37%;background-size:cover,640px auto;background-repeat:no-repeat;
}
html body .shell .utility {display:contents}
html body .shell .brand {order:1;display:flex;align-items:center;gap:16px;max-width:none;flex-shrink:0;white-space:normal;text-decoration:none}
html body .shell .brand .brand-logo {display:block;width:112px;height:70px;object-fit:contain}
html body .shell .brand .brand-section {border:0;border-left:1px solid #52616d;padding:16px 0 16px 18px;color:#c9d3df;font-weight:650;font-size:.95rem;letter-spacing:.23em;text-transform:uppercase}
html body .shell header nav {order:2;flex:1;align-self:stretch;align-items:center;gap:0 20px;padding:0;min-width:0}
html body .shell header nav a {min-height:60px;color:#e5ebf0;font-size:.875rem;gap:8px;font-weight:650;white-space:nowrap}
html body .shell header nav a:hover,html body .shell header nav a[aria-current] {color:#70d1ec}
html body .shell header nav a[aria-current] {border-bottom-color:#4bb5d6}
html body .shell:has(#archive-search) header nav {order:2;flex:1;align-self:stretch;align-items:center;gap:0 20px;padding:0;min-width:0}
html body .shell:has(#archive-search) .brand {flex-shrink:0}
html body .shell .utility form,html body .shell .frn-session-actions {order:4}
html body .shell header .button {background:#182630;color:#e1edf4;border-color:#526572;min-height:44px}
html body .shell header .button.neutral:hover {background:#254350;color:#e1edf4;border-color:#70d1ec;box-shadow:none}
html body .shell header .appearance-toggle {order:3;position:relative;width:44px;min-width:44px;height:44px;padding:12px;justify-content:center;gap:0}
html body .shell header .appearance-toggle [data-appearance-label] {position:absolute;top:calc(100% + 8px);right:0;z-index:30;width:max-content;padding:6px 10px;border:1px solid #526572;border-radius:6px;background:#182630;color:#e1edf4;font-size:.8rem;opacity:0;pointer-events:none}
html body .shell header .appearance-toggle:is(:hover,:focus-visible) [data-appearance-label] {opacity:1}
html body .shell header .appearance-toggle .icon {width:18px;height:18px;flex:0 0 18px}
html body .shell header .appearance-toggle[aria-pressed="true"] {background:#254350;border-color:#70d1ec;color:#a4e7fa}
html body .shell main,html body .shell:has(#archive-search) main {padding:28px 32px;gap:22px;min-width:0}
html body .shell h1 {font-weight:850;font-size:clamp(2rem,4vw,3.3rem);letter-spacing:-.03em;line-height:1.12}
html body .shell h2,html body .shell h3 {color:var(--ink)}
html body .shell .intro p,html body .shell .meta,html body .shell .library-subtitle {color:var(--muted)}
html body .shell :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),select,textarea) {background-color:var(--surface-inset);color:var(--ink);border-color:var(--border);color-scheme:inherit}
html body .shell input::placeholder,html body .shell textarea::placeholder {color:var(--muted);opacity:1}
html body .shell select {appearance:auto;background-image:none;padding-right:12px}
html body .shell .button {border-color:var(--border);color:var(--ink);background:var(--surface-raised);border-radius:6px}
html body .shell .button.primary {color:var(--accent-contrast);border-color:var(--accent);background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 86%,white),var(--accent))}
html body .shell .button.neutral:hover {background:color-mix(in srgb,var(--accent-soft) 82%,var(--surface));box-shadow:none}
html body .shell :is(.panel,.empty,.notes,.workspace-panel,.speaker-card,.search-card,.conversation-detail,.episode-sidebar>details,.episode-sidebar>section,.episode-transcript-column>#transcript,.quick-speaker-assignment) {background:var(--surface);border-color:var(--border);color:var(--ink)}
html body .shell :is(.notice,.notice.warning) {background:var(--warning-bg);color:var(--warning);border:1px solid color-mix(in srgb,var(--warning) 60%,var(--border))}
html body .shell .notice.success {background:var(--success-bg);color:var(--success)}
html body .shell :is(.notice.error,.notice.danger) {background:var(--danger-bg);color:var(--danger)}
html body .shell :is(.error,.assignment-status.error,.photo-status.error) {color:var(--danger)}
html body .shell a:focus-visible,html body .shell :is(button,input,textarea,select,summary):focus-visible {outline:3px solid var(--focus);outline-offset:3px}
html body .shell header :focus-visible {outline-color:#7bdaf4}
html body .shell .library-intro {gap:16px;align-items:baseline;padding-bottom:4px}
html body .shell .library-intro h1 {font-size:clamp(2.2rem,4vw,3.3rem)}
html body .shell .library-filters {gap:12px}
html body .shell .library-status {border-bottom:0;gap:8px;align-items:stretch}
html body .shell .library-status a {padding:10px 14px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--muted);min-height:44px;gap:8px}
html body .shell .library-status a:hover {color:var(--ink);background:var(--surface-raised)}
html body .shell .library-status a[aria-current] {background:var(--accent-soft);border-color:var(--accent);color:var(--ink)}
html body .shell .library-count {background:var(--surface-inset);color:var(--ink);padding:2px 6px}
html body .shell .library-table-wrap {background:var(--surface);border-color:var(--border);border-radius:8px}
html body .shell .library-table th {background:var(--surface-inset);color:var(--muted);font-weight:650}
html body .shell .library-table :is(th,td) {border-color:var(--border)}
html body .shell .library-table tbody tr:hover {background:var(--surface-raised)}
html body .shell .library-table tbody tr:focus-within {background:var(--accent-soft)}
html body .shell .library-identity h2 a {color:var(--ink);font-size:.875rem;font-weight:700}
html body .shell .library-identity h2 a:hover {color:var(--accent)}
html body .shell .library-state strong {background:var(--surface-inset);color:var(--muted)}
html body .shell .library-state.status-ready strong {color:var(--success);background:var(--success-bg)}
html body .shell .library-state.status-partial strong {color:var(--warning);background:var(--warning-bg)}
html body .shell .library-state.status-processing strong {color:var(--ink);background:var(--accent-soft)}
html body .shell .episode-row-actions .button {color:var(--ink)}
html body .shell .episode-row-actions .play-match {color:var(--accent)}
html body .shell .transcript-filters .button[aria-current],html body .shell .conversation-detail .conversation-turn.is-match {background:var(--accent-soft);color:var(--ink);border-color:var(--accent)}
html body .shell .passage-review .quick-speaker-assignment {background:var(--surface-inset)}
html body .shell :is(.speaker-pick,.speaker-choice,.scope-choice) {background:var(--surface-raised);color:var(--ink);border-color:var(--border)}
html body .shell :is(.speaker-pick[aria-pressed="true"],.scope-choice[aria-pressed="true"]) {background:var(--accent-soft);border-color:var(--accent)}
html body .shell .search-card[aria-selected="true"] {background:var(--accent-soft);border-color:var(--accent)}
html body .shell mark {background:var(--warning-bg);color:var(--warning)}
html body .shell #player,html body .shell #player.player-ready,html body .shell #player.player-ready.player-expanded {background:var(--surface-inset);color:var(--ink);border:1px solid var(--border);box-shadow:0 -6px 28px #0003}
html body .shell #player.player-ready {--ink:inherit;--muted:inherit;--surface:inherit;--border:inherit;--accent-soft:inherit;--focus:inherit}
html body .shell #player .button.neutral:hover {background:var(--accent-soft);color:var(--ink);border-color:var(--accent)}
html body .shell #player .player-preview {background:var(--surface);color:var(--ink);border-color:var(--border)}
html body .shell #player .player-timeline input,html body .shell #player .player-options-body :is(input,select) {color-scheme:inherit}
html body .shell #player :is(strong,.player-heading strong,.player-times,.meta) {color:var(--ink)}
html body .shell #player .button,html body .shell #player .button.neutral {background:var(--surface-raised);color:var(--ink);border-color:var(--border)}
html body .shell #player #player-play {background:var(--accent);color:var(--accent-contrast);border-color:var(--accent)}
html body .shell #player input {accent-color:var(--accent)}
html body .shell footer {border-top:1px solid var(--border);color:var(--muted);background:var(--surface-inset);padding:16px 32px}
@media(min-width:1400px){html body .shell header nav{gap:0 28px}html body .shell main{padding:32px 40px}}
@media(max-width:1040px){html body .shell header,html body .shell:has(#archive-search) header{gap:8px 20px}html body .shell header nav{order:5;flex-basis:100%;gap:0 24px}html body .shell .brand{flex:1}html body .shell header nav a{min-height:44px}}
@media(max-width:760px){html body .shell header,html body .shell:has(#archive-search) header{padding:12px 16px;gap:8px 12px}html body .shell .brand .brand-logo{width:76px;height:48px}html body .shell .brand .brand-section{font-size:.75rem;padding-left:12px}html body .shell main,html body .shell:has(#archive-search) main{padding:24px 16px}html body .shell header nav{gap:0 20px}html body .shell header nav a{font-size:.8rem}html body .shell .library-status a{font-size:.8rem;padding:8px 10px}html body .shell .library-filters .button{white-space:normal}html body .shell footer{padding:16px}}
@media(max-width:400px){html body .shell .brand{flex-basis:100%}html body .shell header .appearance-toggle{flex:0 0 44px}html body .shell header nav{gap:0 16px}html body .shell .frn-session-actions{flex-wrap:wrap;min-width:0}html body .shell .library-status a{flex-grow:1;justify-content:center}}
@media(max-width:1040px){html body .shell:has(#archive-search) header nav{order:5;flex-basis:100%;gap:0 24px}html body .shell:has(#archive-search) .brand{flex:1}}
@media(max-width:760px){html body .shell:has(#archive-search) header nav{gap:0 20px}}
@media(max-width:400px){html body .shell:has(#archive-search) .brand{flex-basis:100%}html body .shell:has(#archive-search) header nav{gap:0 16px}}

/* Text navigation mirrors the approved masthead; link labels remain accessible. */
@media(min-width:1041px){html body .shell header nav .icon{display:none}html body .shell header nav{flex-wrap:nowrap}html body .shell:has(#archive-search) header nav{flex-wrap:nowrap}}

/* The branded chart retains a dark face in either theme. */
html body .shell .speaker-insights:not(.speaker-insights-note) h2 {color:#fff}
html body .shell .speaker-insights:not(.speaker-insights-note) .meta {color:#b9c5da}
html body .shell .speaker-insights .speaker-stat-row.button.neutral {background:#162641;color:#fff;border-color:#4d6385}
html body .shell .speaker-insights .speaker-stat-row.button.neutral:is(:hover,:focus-visible,[aria-pressed="true"]) {background:#243e64;color:#fff;border-color:#91b8ff;box-shadow:none}
html body .shell .speaker-insights .speaker-insights-footer .button.neutral {background:#162641;color:#fff;border-color:#4d6385}
html body .shell .speaker-insights .speaker-insights-footer .button.neutral:is(:hover,:focus-visible) {background:#243e64;color:#fff;border-color:#91b8ff}
