/* PodCore global styles */
:root {
  --color-background: #FAFAF9;
  --color-surface: #FFFFFF;
  --color-border: #E5E5E4;
  --color-border-strong: #D4D4D3;
  --color-text: #1A1A1A;
  --color-muted: #6B7280;
  --color-muted-light: #9CA3AF;
  --color-brand: #0F4C3A;
  --color-brand-dark: #0D3E2E;
  --color-brand-darker: #0A3023;
  --color-accent: #1A1A1A;
  --color-danger: #DC2626;
  --color-danger-soft: #FEE2E2;
  --color-info: #DBEAFE;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Spectral', Georgia, serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  /* Z-index scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-fixed: 300;
  --z-modal-backdrop: 400;
  --z-modal: 500;
  --z-toast: 600;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}



.hidden {
  display: none !important;
}

.mt-16 { margin-top: 16px !important; }
.mt-24 { margin-top: 24px !important; }
.mt-32 { margin-top: 32px !important; }
.mt-48 { margin-top: 48px !important; }
.pt-32 { padding-top: 32px !important; }
.pt-48 { padding-top: 48px !important; }
.pb-24 { padding-bottom: 24px !important; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5px;
}

.container--narrow {
  max-width: 560px;
}

.container--medium {
  max-width: 900px;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px;
}

/* Buttons - Consolidated Base Styles */
button:not(.tab):not(.sort-button),
.btn,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--color-brand);
  color: var(--color-surface);
  border: none;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  letter-spacing: -0.01em;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
}

button:not(.tab):not(.sort-button):hover,
.btn:hover,
.button:hover {
  background: var(--color-brand-dark);
}

button:not(.tab):not(.sort-button):active,
.btn:active,
.button:active {
  background: var(--color-brand-darker);
}

button:not(.tab):not(.sort-button):disabled,
.btn:disabled,
.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Button Size Modifiers */
.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  line-height: 1.4;
}

.btn-medium {
  padding: 12px 20px;
  font-size: 14px;
}

.btn-large,
button[type="submit"] {
  width: 100%;
  padding: 14px;
  font-size: 15px;
}

/* Button Color Variants */
.btn-primary {
  background: var(--color-accent);
}

.btn-primary:hover {
  background: #374151;
}

.btn-secondary,
.button-secondary {
  background: #F5F5F4;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover,
.button-secondary:hover {
  background: #E7E5E4;
}

.btn-danger {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

.btn-danger:hover {
  background: #FECACA;
}

.button-outline {
  background: var(--color-background);
  color: var(--color-text);
  border: 1.5px solid var(--color-border-strong);
}

.button-outline:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
}

.button-outline:active {
  background: #E7E5E4;
  border-color: var(--color-text);
}

/* Form elements */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-group--relative {
  position: relative;
}

/* Optional field styling */
.optional-field-hp,
input.optional-field-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border-strong);
  background: #FFFFFF;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 0 0 3px rgba(15, 76, 58, 0.15);
}

input::placeholder,
textarea::placeholder {
  color: #A8A8A7;
}

/* Navbar */
nav {
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .brand {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

nav .nav-links {
  display: flex;
  gap: 24px;
  align-items: center;
}

nav a {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

nav a.active {
  color: var(--color-text);
}

nav .nav-link {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav .nav-link:hover {
  color: var(--color-brand);
}

nav .user-menu {
  display: flex;
  align-items: center;
  gap: 16px;
}

nav .user-greeting {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 400;
  opacity: 0.7;
}

nav .user-name {
  color: #374151;
  font-size: 14px;
}

nav .logout-link {
  color: var(--color-danger);
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.15s ease;
}

nav .logout-link:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Page header */
.page-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 16px;
  color: var(--color-muted);
}

/* Footer */
footer {
  background: #FFFFFF;
  border-top: 1px solid var(--color-border);
  padding: 24px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--color-muted);
}

footer a {
  color: var(--color-muted);
}

footer a:hover {
  color: var(--color-text);
}

/* Landing page */
body.landing-page .container {
  padding: 60px 20px;
}

body.landing-page header {
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

body.landing-page h1 {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

body.landing-page .subtitle {
  font-size: 16px;
  color: var(--color-muted);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}

.auth-link {
  margin-top: 16px;
}

.auth-link a {
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 500;
}

.auth-link a:hover {
  color: var(--color-text);
}

#main-page-header {
  margin-bottom: 30px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}

.sort-toggle {
  display: flex;
  gap: 4px;
  background: #F5F5F4;
  padding: 2px;
  border-radius: 6px;
}

.sort-button {
  padding: 4px 12px;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.sort-button:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.sort-button.active {
  background: #FFFFFF;
  color: var(--color-brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.search-hint {
  font-size: 13px;
  color: var(--color-muted);
  margin: 8px 0 0 0;
  font-weight: 400;
  position: relative;
  z-index: var(--z-base); /* Below dropdown */
}

.autocomplete-dropdown {
  position: absolute;
  top: 48px; /* Position directly below input field (input height ~48px) */
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-top: none;
  max-height: 500px;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: var(--z-dropdown);
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 8px 8px;
  margin-top: -1px;
}

.autocomplete-dropdown.active {
  display: block;
}

.autocomplete-loading,
.autocomplete-no-results {
  display: none;
  padding: 20px;
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
}

.search-result,
.podcast-result {
  display: flex;
  align-items: center;
  padding: 12px;
  cursor: pointer;
  border-bottom: 1px solid #F5F5F4;
  transition: background-color 0.15s ease;
  gap: 12px;
}

.search-result:last-child,
.podcast-result:last-child {
  border-bottom: none;
}

.search-result:hover,
.podcast-result:hover {
  background: #F5F5F4;
}

.result-thumbnail,
.podcast-result-thumbnail {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.result-info,
.podcast-result-info {
  flex: 1;
  min-width: 0;
}

.result-title,
.podcast-result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.result-meta,
.podcast-result-meta {
  font-size: 12px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.result-duration {
  font-weight: 500;
  color: var(--color-brand);
}

.result-date {
  color: var(--color-muted-light);
}

/* Dashboard Search Container */
.dashboard-search-container {
  margin-bottom: 48px;
  width: 100%;
  max-width: 100%;
  position: relative;
  z-index: var(--z-base); /* Create stacking context */
}

.dashboard-search-container.dropdown-active {
  z-index: var(--z-dropdown); /* Elevate entire search area when dropdown is active */
}

.search-controls-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.search-header-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
  gap: 16px;
}

.search-hint {
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
}

.search-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-input-wrapper .search-input {
  width: 100%;
}

.search-input-wrapper .autocomplete-dropdown {
  position: absolute;
  top: 48px; /* Position directly below input */
  left: 0;
  right: 0;
  width: 100%;
  z-index: var(--z-dropdown);
  max-height: 500px; /* Limit height so it doesn't grow too tall */
}

/* Sort Controls - Shared styles for search and briefs sorting */
.sort-controls {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  color: var(--color-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.sort-controls label {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.sort-controls label:hover {
  color: var(--color-text);
}

.sort-controls input[type="radio"] {
  cursor: pointer;
  margin: 0 0 2px 0;
  flex-shrink: 0;
}

/* Search-specific sort controls */
.search-sort-controls {
  margin-bottom: 0;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Dashboard Sections */
.dashboard-section {
  margin-bottom: 48px;
  position: relative;
  /* No z-index - allows search dropdown to overlay properly */
}

.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 12px 0 20px 0;
}

.dashboard-section h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.section-header-with-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.section-header-with-controls h2 {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  flex-shrink: 0;
}

/* Account Settings */
.account-settings {
  max-width: 600px;
}

.settings-group {
  padding: 0 0 24px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.settings-group h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.settings-group p {
  color: var(--color-muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.danger-zone {
  padding: 0;
}

.danger-zone h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.danger-zone p {
  color: var(--color-muted);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.danger-zone .btn-danger {
  padding: 8px 16px;
  font-size: 14px;
}

.section-header-with-controls + hr {
  margin-top: 12px;
}

.section-header-with-controls + hr + .scrollable-container {
  margin-top: 0;
}

/* Briefs-specific sort controls */
.briefs-sort-controls {
  margin-bottom: 0;
  margin-left: auto;
  flex-shrink: 0;
}

.scrollable-container {
  max-height: 600px;
  overflow-y: auto;
  padding-right: 8px;
}

.scrollable-container-briefs {
  min-height: 500px;
}

.scrollable-container::-webkit-scrollbar {
  width: 8px;
}

.scrollable-container::-webkit-scrollbar-track {
  background: #F5F5F4;
  border-radius: 4px;
}

.scrollable-container::-webkit-scrollbar-thumb {
  background: #D4D4D3;
  border-radius: 4px;
}

.scrollable-container::-webkit-scrollbar-thumb:hover {
  background: #A8A8A7;
}

.unified-result {
  display: flex;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #F5F5F4;
  transition: background-color 0.15s ease;
  gap: 12px;
}

.unified-result:last-child {
  border-bottom: none;
}

.unified-result:hover {
  background: #F5F5F4;
}

.unified-result-thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.unified-result-thumbnail-fallback {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 32px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.unified-result-info {
  flex: 1;
  min-width: 0;
}

.unified-result-type {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.unified-result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.unified-result-meta {
  font-size: 12px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.unified-result-action {
  padding: 8px 16px;
  font-size: 13px;
  flex-shrink: 0;
}

.unified-result--episode .unified-result-thumbnail {
  width: 96px;
  height: 54px;
  border-radius: 6px;
  object-fit: cover;
}

.unified-result-title--episode {
  font-size: 13px;
  line-height: 1.3;
}

.unified-result--episode .unified-result-meta {
  font-size: 11px;
  gap: 6px;
}

.unified-result--episode .unified-result-action {
  flex-shrink: 0;
}

.features,
.recent-briefs {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.feature {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  color: var(--color-muted);
  font-size: 14px;
  line-height: 1.6;
  gap: 12px;
}

.feature-icon {
  font-size: 18px;
}

.recent-briefs h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.brief-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.brief-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.brief-item:hover {
  background: var(--color-background);
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.brief-card .brief-thumbnail {
  width: calc(100% - 32px);
  margin: 16px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  display: block;
}

.brief-item .brief-thumbnail {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.brief-info {
  flex: 1;
  min-width: 0;
}

.brief-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.brief-meta {
  font-size: 13px;
  color: var(--color-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.brief-channel {
  font-weight: 500;
}

.brief-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #F3F4F6;
  color: var(--color-muted);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brief-badge.subscription {
  background: var(--color-info);
  color: #1E40AF;
}

.brief-badge.processing {
  background: #FEF3C7;
  color: #92400E;
}

.brief-badge.pending {
  background: #F3F4F6;
  color: #6B7280;
}

.brief-badge.failed {
  background: #FEE2E2;
  color: #991B1B;
}

.brief-content {
  padding: 16px;
}

/* Specific Button Types - Extend base button styles */
.search-button,
.create-button {
  /* Inherits from base button */
  background: var(--color-accent);
}

.search-button:hover,
.create-button:hover {
  background: #374151;
}

.subscribe-button {
  /* Inherits from base button */
  background: var(--color-accent);
  padding: 8px 16px;
  font-size: 13px;
  max-width: 110px;
}

.subscribe-button:hover {
  background: #374151;
}

.subscribe-button.subscribed {
  background: #F3F4F6;
  color: var(--color-muted);
}

.unsubscribe-button {
  /* Inherits from base button, uses danger variant colors */
  background: var(--color-danger-soft);
  color: var(--color-danger);
  padding: 8px 16px;
  font-size: 13px;
}

.unsubscribe-button:hover {
  background: #FECACA;
}

/* Dashboard & briefs */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--color-border);
}

.dashboard-header h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 48px 0 24px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.section-header:first-child {
  margin-top: 0;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
}

.section-link {
  font-size: 14px;
  color: var(--color-muted);
  transition: color 0.15s ease;
}

.section-link:hover {
  color: var(--color-text);
}

.search-container {
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input {
  width: 100%;
}

.briefs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
  transition: opacity 0.2s ease;
}

.brief-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.brief-card:hover {
  border-color: #A8A8A7;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.podcast-search-container {
  position: relative;
  margin-bottom: 24px;
}

.autocomplete-dropdown.rounded {
  border-radius: 0 0 8px 8px;
  margin-top: -1px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.podcast-result-thumbnail {
  border-radius: 4px;
}

.subscriptions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.subscription-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.15s ease;
}

.subscription-card:hover {
  border-color: #A8A8A7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.subscription-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E7E5E4;
  object-fit: cover;
  flex-shrink: 0;
}

.subscription-info {
  flex: 1;
  min-width: 0;
}

.subscription-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscription-date {
  font-size: 12px;
  color: var(--color-muted);
}

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

.empty-state h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: #374151;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 16px;
  margin-bottom: 24px;
}

.empty-state-small {
  text-align: center;
  padding: 32px 20px;
  color: var(--color-muted);
  background: var(--color-background);
  border-radius: 8px;
}

.empty-state-small p {
  font-size: 14px;
  margin-bottom: 16px;
}

.feedback-message {
  text-align: center;
  padding: 24px;
  color: var(--color-muted);
  font-size: 14px;
}

.feedback-message--error {
  color: var(--color-danger);
}

.channel-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.search-section {
  margin-bottom: 48px;
}

.search-section h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text);
}

.search-section .channel-card {
  align-items: center;
}

.search-section .channel-content {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.search-section .subscribe-button,
.search-section .unsubscribe-button {
  width: auto;
  flex-shrink: 0;
}

.channel-card {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.channel-thumbnail {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  background: #E7E5E4;
  flex-shrink: 0;
}

.channel-thumbnail-fallback {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 24px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.channel-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-info {
  flex: 1;
  min-width: 0;
}

.channel-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-name-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.channel-name-link:hover .channel-name {
  color: var(--color-brand);
  text-decoration: underline;
}

.channel-card a:has(.channel-thumbnail) {
  text-decoration: none;
  display: block;
  border-radius: 50%;
}

.channel-card a:has(.channel-thumbnail):hover .channel-thumbnail {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.channel-subscribers {
  font-size: 13px;
  color: var(--color-muted);
}

.subscriptions-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--color-border);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 32px;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

.modal-content h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 20px;
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.modal-actions button {
  width: auto;
}

.modal-actions .cancel {
  background: #F5F5F4;
  color: var(--color-text);
}

.modal-actions .cancel:hover {
  background: #E7E5E4;
}

.modal-actions .submit {
  background: var(--color-accent);
  color: #FFFFFF;
}

/* Processing/Submit Page */
.processing-page {
  text-align: center;
  padding: 50px 20px;
}

.processing-page h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  margin-bottom: 16px;
}

.processing-page > p {
  color: var(--color-muted);
  margin-bottom: 12px;
}

.spam-reminder {
  background: var(--color-info);
  color: var(--color-text);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  margin: 20px auto;
  max-width: 450px;
  border: 1px solid #BFDBFE;
}

.spam-icon {
  font-size: 16px;
}

.cta-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 32px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
}

.cta-box h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--color-text);
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.cta-box p {
  color: var(--color-text);
  margin-bottom: 16px;
}

.cta-box ul {
  text-align: left;
  margin: 16px auto 24px;
  max-width: 400px;
  padding-left: 20px;
}

.cta-box li {
  color: var(--color-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.cta-button {
  display: inline-block;
  background: var(--color-brand);
  color: var(--color-surface);
  padding: 14px 28px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
  font-size: 16px;
}

.cta-button:hover {
  background: var(--color-brand-dark);
  text-decoration: none;
}

.back-link {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

/* Login */
body.auth-page {
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-container {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 48px;
  max-width: 440px;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.logo p {
  font-size: 14px;
  color: var(--color-muted);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--color-border);
}

/* Use more specific selector to avoid inheriting button styles */
.tabs .tab {
  all: unset; /* Reset all inherited button styles */
  box-sizing: border-box; /* Restore needed property */
  flex: 1;
  padding: 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-muted);
  transition: all 0.2s ease;
  display: block;
  text-align: center;
}

.tabs .tab:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.02);
}

.tabs .tab:active {
  background: transparent;
}

.tabs .tab.active {
  color: var(--color-text);
  border-bottom-color: var(--color-text);
  background: transparent;
}

.form-content {
  display: none;
}

.form-content.active {
  display: block;
}

.submit-button {
  margin-top: 8px;
  width: 100%;
}

.error-message {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  background: #FEE2E2;
  border: 1px solid #FCA5A5;
  border-radius: 6px;
  color: var(--color-danger);
  font-size: 14px;
}

.error-message.show {
  display: block;
}

.success-message {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  background: #D1FAE5;
  border: 1px solid #6EE7B7;
  border-radius: 6px;
  color: #065F46;
  font-size: 14px;
}

.success-message.show {
  display: block;
}

.forgot-password-link {
  display: block;
  text-align: right;
  margin-top: 8px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--color-brand);
  text-decoration: none;
  transition: color 0.15s ease;
}

.forgot-password-link:hover {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--color-muted);
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.divider span {
  padding: 0 12px;
}

.google-button {
  background: #FFFFFF;
  color: var(--color-text);
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  width: 100%;
}

.google-button:hover {
  background: #F9FAFB;
  border-color: #9CA3AF;
}

.google-button svg {
  flex-shrink: 0;
}

.back-link {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  font-size: 14px;
}

.back-link a {
  color: inherit;
}

.back-link a:hover {
  color: var(--color-text);
}

/* Summary page */
body.summary-page {
  line-height: 1.7;
  overflow-x: hidden;
}

.summary-page-content {
  margin-top: -48px;
}

.summary-hero {
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  padding: 20px 20px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

.summary-hero__content {
  margin: 0 auto;
}

.summary-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 12px;
}

.summary-breadcrumb a {
  color: var(--color-muted);
  font-weight: 500;
}

.summary-breadcrumb a:hover {
  color: var(--color-text);
}

.summary-breadcrumb__separator {
  color: var(--color-border-strong);
}

.summary-breadcrumb__current {
  color: var(--color-text);
  font-weight: 600;
}

.summary-hero__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.summary-hero__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.summary-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--color-muted);
}

.summary-meta .channel {
  font-weight: 500;
  color: var(--color-brand);
}

.summary-meta a {
  color: var(--color-brand);
  font-weight: 500;
}

.summary-meta .separator {
  color: var(--color-border-strong);
}

.channel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #E7E5E4;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
}

.channel-avatar-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  text-transform: uppercase;
}

.send-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

.send-form input[type="email"] {
  width: 220px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-strong);
  background: #FFFFFF;
  font-size: 14px;
  font-family: var(--font-body);
  border-radius: 6px;
}

.send-form input[type="email"]:focus {
  border-color: var(--color-brand);
  outline: none;
}

.send-form button {
  width: auto;
  padding: 8px 16px;
  font-size: 14px;
  white-space: nowrap;
}

.email-banner {
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  padding: 16px 40px 16px 20px;
  margin-bottom: 32px;
  position: relative;
  font-size: 15px;
  color: #166534;
  animation: slideDown 0.3s ease;
  border-radius: 8px;
}

.email-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.email-banner-icon {
  font-size: 20px;
}

.email-banner-email {
  font-weight: 600;
  color: #14532D;
}

.email-banner-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: #166534;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  line-height: 1;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* YouTube Embed Section */
.youtube-embed-section {
  padding: 16px 0;
  margin: 16px 0;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

.youtube-player-container {
  position: relative;
  padding-bottom: 33.75%; /* 60% of 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  margin: 0 auto;
  max-width: 60%;
}

.youtube-player-container iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.watch-on-youtube-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--color-brand);
  color: #FFFFFF;
  border: none;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
}

.watch-on-youtube-btn:hover {
  background: var(--color-brand-dark);
  color: #FFFFFF;
}

.summary-audio {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  padding: 24px;
  margin: 16px 0;
  border-radius: 8px;
}

.summary-audio h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.summary-audio audio {
  width: 100%;
  margin-top: 8px;
}

.transcript-section {
  margin-top: 24px;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}

details {
  cursor: pointer;
}

summary {
  list-style: none;
  font-size: 15px;
  color: var(--color-muted);
  font-weight: 500;
  user-select: none;
}

summary::-webkit-details-marker {
  display: none;
}

summary::before {
  content: "▸ ";
  display: inline-block;
  margin-right: 6px;
  transition: transform 0.2s ease;
}

details[open] summary::before {
  transform: rotate(90deg);
}

.transcript-content {
  margin-top: 16px;
  padding: 20px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  font-size: 15px;
  line-height: 1.8;
  color: #374151;
  white-space: pre-wrap;
  border-radius: 6px;
}

.summary-body {
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  padding: 32px;
  margin-bottom: 32px;
  font-size: 16px;
  border-radius: 8px;
}

.summary-body h2 {
  font-family: var(--font-heading);
  color: var(--color-text);
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.summary-body h2:first-child {
  margin-top: 0;
}

.summary-body p {
  margin-bottom: 20px;
  color: #374151;
  line-height: 1.8;
}

.summary-body ul,
.summary-body ol {
  margin-left: 24px;
  margin-bottom: 24px;
}

.summary-body li {
  margin-bottom: 12px;
  color: #374151;
  line-height: 1.8;
}

.summary-body strong {
  color: var(--color-text);
  font-weight: 600;
}

.summary-body em {
  font-style: italic;
  color: #1F2937;
}

.timestamp-link {
  color: var(--color-brand);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--color-brand);
  transition: all 0.2s ease;
  cursor: pointer;
}

.timestamp-link:hover {
  color: var(--color-brand-dark);
  border-bottom-color: var(--color-brand-dark);
  background: rgba(15, 76, 58, 0.05);
  padding: 0 2px;
  border-radius: 2px;
}

.summary-footer {
  text-align: center;
  padding: 48px 20px;
  border-top: 1px solid var(--color-border);
  background: #FFFFFF;
  color: var(--color-muted);
}

.summary-footer a {
  color: var(--color-brand);
  font-weight: 500;
}

.summary-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  /* Reduce button padding on mobile */
  button:not(.tab):not(.sort-button),
  .btn,
  .button {
    padding: 10px 16px;
    font-size: 13px;
  }

  .btn-small {
    padding: 5px 10px;
    font-size: 11px;
  }

  body.landing-page h1 {
    font-size: 36px;
  }

  .sort-toggle {
    align-self: flex-end;
  }

  .brief-item .brief-thumbnail {
    width: 80px;
    height: 45px;
  }

  .brief-title {
    font-size: 14px;
  }

  .brief-meta {
    font-size: 12px;
  }

  /* Briefs grid padding on mobile */

  main {
    padding: 32px 16px;
  }

  .dashboard-header,
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* Stack briefs header and sort controls on mobile */
  .section-header-with-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .briefs-sort-controls {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

.summary-page-content {
  margin-top: -32px;
}

  .summary-hero {
    padding: 24px 16px;
  }

  .summary-hero__title {
    font-size: 28px;
  }

  .send-form input[type="email"] {
    flex: 1;
    min-width: 180px;
  }

  .youtube-embed-section {
    padding: 16px;
  }

  .youtube-player-container {
    max-width: 100%;
    padding-bottom: 56.25%; /* Full 16:9 aspect ratio on mobile */
  }

  /* Brief page sections - full width with padding on mobile */
  .summary-page-content .container {
    padding: 0;
  }

  .youtube-embed-section,
  .summary-audio,
  .summary-body,
  .related-briefs-section {
    border-radius: 8px;
    margin-left: 0;
    margin-right: 0;
  }

  .summary-audio,
  .summary-body {
    padding: 20px 12px;
  }

  /* Make audio player more prominent on mobile */
  .summary-audio h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .summary-audio audio {
    height: 54px; /* Larger touch target */
    margin-top: 12px;
  }

  .summary-audio {
    padding: 28px 20px; /* More breathing room */
  }

  /* Dashboard search mobile layout */
  .dashboard-search-container {
    width: 100%;
    max-width: 100%;
  }

  .search-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 12px;
  }

  .search-sort-controls {
    width: 100%;
    justify-content: flex-start;
  }

  .filter-toggle {
    width: 100%;
    justify-content: center;
  }

  .search-input-wrapper {
    width: 100%;
  }

  .search-input {
    width: 100%;
  }

  .autocomplete-dropdown {
    width: 100%;
    left: 0;
    right: 0;
    max-height: 400px; /* Limit height on mobile */
    z-index: var(--z-dropdown);
  }

  /* Tighter search results on mobile */
  .search-result,
  .podcast-result,
  .unified-result {
    padding: 8px;
    gap: 10px;
  }

  .result-thumbnail,
  .podcast-result-thumbnail {
    width: 64px;
    height: 48px;
  }

  .unified-result-thumbnail {
    width: 64px;
    height: 64px;
  }

  .unified-result--episode .unified-result-thumbnail {
    width: 80px;
    height: 45px;
  }

  .result-title,
  .podcast-result-title,
  .unified-result-title {
    font-size: 13px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
  }

  .result-meta,
  .podcast-result-meta,
  .unified-result-meta {
    font-size: 11px;
    gap: 6px;
  }

  .unified-result-type {
    font-size: 10px;
    margin-bottom: 2px;
  }

  .unified-result-action {
    padding: 6px 12px;
    font-size: 12px;
  }

  .summary-hero__row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .summary-meta {
    justify-content: flex-start;
  }

  .send-form {
    width: 100%;
  }

  .send-form input[type="email"] {
    flex: 1;
  }
}

/* Password Reset Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #FFFFFF;
  padding: 32px;
  border-radius: 12px;
  max-width: 440px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: relative;
}

.modal-content h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.modal-content p {
  color: var(--color-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.close {
  position: absolute;
  right: 20px;
  top: 20px;
  font-size: 28px;
  font-weight: 300;
  color: var(--color-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.close:hover {
  color: var(--color-text);
}

/* YouTube URL detection feedback */
input.url-detected {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

input.url-detected::placeholder {
  color: #10B981;
}

/* Processing notice */
.processing-notice {
  background: #D1FAE5;
  border: 1px solid #6EE7B7;
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 24px;
  color: #065F46;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease;
}

.processing-notice span:first-child {
  font-size: 18px;
  font-weight: 600;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Related Briefs Section */
.related-briefs-section {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid var(--color-border);
}

.related-briefs-section h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.related-briefs-section .briefs-grid {
  margin-bottom: 0;
}

.related-briefs-section .brief-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.related-briefs-section .brief-date {
  font-size: 13px;
  color: var(--color-muted);
  margin-top: 4px;
}

.related-briefs-section .brief-content {
  padding: 16px;
}

/* ============================================================================
   Browse & Channel Pages
   ============================================================================ */

/* Browse page specific */
.page-subtitle {
  color: var(--color-muted);
  font-size: 16px;
  margin: 0;
}

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

.channel-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-brand);
  color: white;
  font-weight: 600;
  font-size: 18px;
}

.meta-separator {
  margin: 0 4px;
}

/* Center-aligned page header for browse */
.page-header.centered {
  text-align: center;
  margin: var(--spacing-xl) 0;
  padding: 0 var(--spacing-md);
  border-bottom: none;
}

.page-header.centered h1 {
  font-size: 32px;
}

/* Channel page content */
.channel-page-content {
  margin-top: -48px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 16px;
  padding: 0;
}

.breadcrumbs a {
  color: var(--color-muted);
  font-weight: 500;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--color-text);
}

.breadcrumbs .separator {
  color: var(--color-border-strong);
}

.breadcrumbs .current {
  color: var(--color-text);
  font-weight: 600;
}

/* Channel header */
.channel-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--color-border);
  padding: 20px 20px;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  margin-bottom: var(--spacing-lg);
}

.channel-header-content {
  max-width: 1200px;
  margin: 0 auto;
}

.channel-header-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.channel-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.channel-avatar-large {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.channel-avatar-placeholder-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: 700;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hidden {
  display: none !important;
}

.channel-header-info {
  flex: 1;
  min-width: 0;
  margin-left:10px;
}

.channel-header h1 {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
  line-height: 1.2;
}

.channel-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--color-muted);
  flex-wrap: wrap;
}

.channel-stat {
  font-weight: 500;
  color: var(--color-text);
}

.youtube-link {
  color: var(--color-brand);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: color 0.2s ease;
}

.youtube-link:hover {
  color: var(--color-brand-dark);
  text-decoration: underline;
}

.channel-subscribe-button {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  margin-left: auto;
}

.channel-subscribe-button.subscribed {
  background: var(--color-background);
  color: var(--color-text);
  border: 2px solid var(--color-border-strong);
}

.channel-subscribe-button.subscribed:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
}

.subscribe-icon {
  font-size: 18px;
  line-height: 1;
}

/* Channel briefs section */
.briefs-section {
  padding: 0 var(--spacing-md) var(--spacing-xl);
}

.briefs-section h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .page-header.centered h1 {
    font-size: 24px;
  }

  .page-subtitle {
    font-size: 14px;
  }

  .channel-header {
    padding: 24px 16px;
  }

  .channel-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .channel-avatar-large,
  .channel-avatar-placeholder-large {
    width: 50px;
    height: 50px;
    border-width: 2px;
  }

  .channel-avatar-placeholder-large {
    font-size: 24px;
  }

  .channel-header h1 {
    font-size: 24px;
  }

  .channel-meta {
    font-size: 14px;
  }

  .channel-subscribe-button {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }
}
