/* Shared application layout: listening first, administration on demand. */
.swipe-cue, .swipe-help, .swipe-full-summary { display: none; }
.swipe-decisions { margin-bottom: .75rem; }
@media (max-width: 760px) {
    .radar-shell { padding-bottom: 4rem; }
    .radar-shell .page-header { justify-content: space-between; flex-direction: row; text-align: left; }
    .radar-shell .page-header h1 { font-size: 1.4rem; }
    .radar-shell .radar-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .65rem; min-height: 0; padding: .8rem; position: relative; touch-action: pan-y pinch-zoom; overflow: visible; }
    .radar-shell .radar-art { grid-column: 1; grid-row: 1 / span 2; width: 64px; margin: 0; border-radius: .4rem; }
    .radar-shell .radar-art .score-badge { width: 1.8rem; height: 1.8rem; font-size: .8rem; right: 0; bottom: 0; }
    .radar-shell .radar-content { display: contents; padding: 0; }
    .radar-shell .radar-meta, .radar-shell .radar-content h2 { grid-column: 2; }
    .radar-shell .radar-summary, .radar-shell .episode-preview, .radar-shell .swipe-details { grid-column: 1 / -1; }
    .radar-shell .radar-content h2 { font-size: 1rem; line-height: 1.4; letter-spacing: normal; }
    .radar-shell .radar-summary { clear: both; font-size: .95rem; line-height: 1.5; margin: .7rem 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
    .radar-shell .episode-preview { padding: 0; margin: .75rem 0; border: 0; background: transparent; }
    .radar-shell .episode-preview > div { display: none; }
    .radar-shell .episode-preview audio { width: 100%; height: 40px; }
    .radar-shell .swipe-full-summary { display: block; font-size: .95rem; line-height: 1.5; }
    .radar-shell .feedback-panel { padding: 0; border: 0; background: transparent; }
    .radar-shell .swipe-decisions { position: fixed; z-index: 19; left: 0; right: 0; bottom: calc(3.5rem + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .5rem .65rem; margin: 0; background: #111712; border-top: 1px solid #303a32; }
    .radar-shell .swipe-decisions button { width: 100%; min-height: 44px; padding: .65rem .4rem; font-size: .95rem; }
    .radar-shell .swipe-help { display: block; margin: 0; font-size: .8rem; color: #aeb8af; }
    .radar-shell .action-notification { bottom: calc(8.5rem + env(safe-area-inset-bottom)); }
    .radar-shell .keyboard-help { display: none; }
    .swipe-cue { position: absolute; z-index: 2; top: .5rem; right: .5rem; padding: .5rem; border: 1px solid #afd775; border-radius: .4rem; background: #111712; color: #c5f28f; pointer-events: none; }
    [data-swipe-direction='right'] .swipe-cue, [data-swipe-direction='left'] .swipe-cue { display: block; }
    [data-swipe-direction='right'] .swipe-cue::after { content: 'Interested →'; }
    [data-swipe-direction='left'] .swipe-cue::after { content: '← Not for me'; }
}
:root { --layout-width: 1280px; --layout-gap: 1rem; --layout-border: #303a32; }
body { background: #0a0d0c; }
.topbar { width: min(var(--layout-width), calc(100% - 3rem)); gap: 1.25rem; padding: 1rem 0; flex-wrap: nowrap; border-bottom: 1px solid var(--layout-border); }
.brand { flex: 0 0 auto; white-space: nowrap; font-size: .95rem; }
.brand-mark { width: 2.5rem; height: 2.5rem; }
.nav-links { flex: 1; justify-content: center; gap: .2rem; }
.nav-links a { font-size: .82rem; padding: .65rem .55rem; white-space: nowrap; }
.account-menu-trigger { flex: 0 0 auto; min-height: 44px; font-size: .85rem; white-space: nowrap; }
.mobile-navigation { display: none; }
.account-menu { width: min(430px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 1.25rem; border: 1px solid var(--layout-border); border-radius: 1rem; background: #141a16; color: #f2f5ef; overflow-y: auto; }
.account-menu::backdrop { background: #000a; }
.account-menu header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.account-menu h2 { font-size: 1.25rem; margin: 0; }
.account-menu nav { display: grid; gap: .25rem; margin: 1rem 0; }
.account-menu nav a { display: flex; align-items: center; min-height: 44px; padding: .65rem; border-radius: .4rem; color: #f2f5ef; text-decoration: none; }
.account-menu nav a:hover { background: #253022; }
.account-menu .account-picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: .65rem; padding: 1rem 0; border-block: 1px solid var(--layout-border); width: 100%; }
.account-menu .account-picker select { width: 100%; min-height: 44px; font-size: 1rem; }
.account-menu .logout-form { margin: .75rem 0 0; }
.dashboard-shell, .page-shell { width: min(var(--layout-width), calc(100% - 3rem)); margin: 1.75rem auto 3rem; gap: var(--layout-gap); }
.hero, .page-header { padding: 0; gap: 1rem; align-items: center; margin: 0 0 .5rem; }
.hero h1, .page-header h1 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.2; letter-spacing: -.035em; max-width: none; margin: 0; }
.hero .eyebrow, .page-header .eyebrow { display: none; }
.hero-copy { max-width: 68ch; font-size: .95rem; line-height: 1.5; margin: .55rem 0 0; }
.panel { border-radius: .75rem; padding: 1.1rem; }
.section-heading h2 { font-size: 1.2rem; }
.radar-header-actions { gap: .6rem; align-items: center; }
.radar-sort-control select { max-width: 290px; font-size: .85rem; }
.radar-list-card { grid-template-columns: 128px minmax(0, 1fr); padding: 1rem; gap: 1rem; }
.radar-list-media { padding: 0; }
.radar-list-content { padding: 0; gap: .7rem; min-width: 0; }
.radar-list-content h2 { font-size: 1.2rem; line-height: 1.4; }
.radar-list-art .score-badge { width: 2rem; height: 2rem; top: auto; bottom: .3rem; right: .3rem; font-size: .85rem; }
.radar-meta { gap: .4rem; font-size: .75rem; }
.radar-meta span { padding: .15rem .4rem; }
.transcript-summary > span { display: none; }
.list-insight p, .speaker-card p { font-size: .92rem; line-height: 1.55; }
.compact-player { padding: 0; border: 0; background: transparent; display: block; }
.compact-player audio { display: block; width: 100%; min-width: 0; height: 40px; }
.responsive-panel { min-width: 0; }
.responsive-panel > summary { display: none; }
.responsive-panel-body { display: grid; gap: .8rem; min-width: 0; }
.responsive-panel-body > * { min-width: 0; }
.speaker-list { gap: .6rem; }
.speaker-card { padding: .7rem; border: 0; border-radius: .4rem; background: #111712; }
.speaker-card strong { font-size: .95rem; }
.speaker-card small { line-height: 1.45; }
.metric-card { padding: .8rem 1rem; }
.metric-card strong { font-size: 1.3rem; }
.dashboard-shell > .discovery-panel { order: 0; }
.dashboard-shell > .responsive-panel { order: 1; }
@media (min-width: 761px) and (max-width: 1199px) {
    .nav-links a[href='/onboarding'], .nav-links a[href='/profile'], .nav-links a[href='/sources'] { display: none; }
}
@media (max-width: 760px) {
    .topbar { width: 100%; padding: .65rem .85rem; gap: .5rem; justify-content: space-between; }
    .topbar .nav-links, .account-menu-trigger { display: none; }
    .mobile-navigation { position: fixed; z-index: 20; inset: auto 0 0; display: grid; grid-template-columns: repeat(3, 1fr); padding: .35rem .5rem max(.35rem, env(safe-area-inset-bottom)); border-top: 1px solid var(--layout-border); background: #111712; }
    .mobile-navigation a, .mobile-navigation button { display: flex; align-items: center; justify-content: center; min-height: 44px; border: 0; border-radius: .5rem; padding: .5rem; background: transparent; color: #aeb8af; text-decoration: none; font-size: .9rem; }
    .mobile-navigation .active { color: #c5f28f; background: #26321d; }
    body:has(textarea:focus, input:focus, select:focus) .mobile-navigation { display: none; }
    .dashboard-shell, .page-shell { width: calc(100% - 1.25rem); margin: 1rem auto calc(5rem + env(safe-area-inset-bottom)); gap: .75rem; }
    .hero, .page-header { display: flex; flex-wrap: wrap; gap: .65rem; }
    .hero h1, .page-header h1 { font-size: 1.65rem; }
    .hero-copy { font-size: .86rem; margin-top: .4rem; }
    .page-header:not(.radar-list-shell > .page-header) .hero-copy { display: none; }
    .panel { padding: .8rem; }
    .radar-header-actions { width: 100%; display: flex; flex-wrap: wrap; gap: .5rem; }
    .radar-sort-control { flex: 1 1 100%; display: flex; align-items: center; gap: .5rem; }
    .radar-sort-control select { max-width: none; width: 100%; min-height: 44px; }
    .radar-header-actions > button, .radar-header-actions .view-switcher { flex: 1; }
    .radar-list-card { display: block; padding: .8rem; }
    .radar-list-media { float: left; width: 64px; margin: 0 .7rem .5rem 0; }
    .radar-list-art { width: 64px; }
    .radar-list-content { display: block; }
    .radar-list-content > * { margin-bottom: .65rem; }
    .radar-list-content h2 { font-size: 1rem; }
    .radar-list-content .transcript-summary { clear: both; }
    .radar-meta span { border: 0; padding: 0; }
    .radar-meta { font-size: .7rem; }
    .responsive-panel { border: 1px solid var(--layout-border); border-radius: .65rem; background: #111712; }
    .responsive-panel > summary { display: list-item; padding: .8rem; min-height: 44px; cursor: pointer; font-weight: 700; font-size: .92rem; }
    .responsive-panel > summary span { display: block; margin-top: .25rem; color: #adb8ae; font-size: .8rem; font-weight: 400; }
    .responsive-panel-body { padding: .8rem; border-top: 1px solid var(--layout-border); }
    .responsive-panel-body > .panel { border: 0; padding: 0; background: transparent; }
    .responsive-panel:not([data-responsive-ready]) > .responsive-panel-body { display: none; }
    .episode-details { margin-bottom: 0; }
    .settings-section-tabs { flex-wrap: wrap; overflow: visible; gap: .35rem; border: 0; }
    .settings-section-tabs [role='tab'] { flex: 1 1 auto; min-height: 44px; padding: .6rem .5rem; font-size: .8rem; border: 1px solid var(--layout-border); border-radius: .45rem; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .account-menu .account-picker { order: initial; }
    .action-notification, .setting-tooltip { top: auto; bottom: calc(4.5rem + env(safe-area-inset-bottom)); }
    .action-notification { max-height: 45dvh; overflow-y: auto; overflow-wrap: anywhere; }
    .impersonation-banner { padding: .6rem .8rem; font-size: .82rem; }
}
