/* Scoped to the feed/home page only — does not touch styles/tokens.css,
   so the rest of the site keeps the original palette it was reverted to. */
.feed-page{
  --feed-font-display: 'Clash Display', 'Manrope', sans-serif;
  --feed-font-body: 'Manrope', sans-serif;

  --feed-bg: #FAFAF8;
  --feed-surface: #ffffff;
  --feed-text: #111111;
  --feed-text-muted: #6B7280;
  --feed-border: rgba(17, 17, 17, 0.08);
  --feed-accent: #C9A227;
  --feed-accent-contrast: #111111;
  --feed-shadow: 0 2px 10px rgba(17, 17, 17, 0.06), 0 12px 28px rgba(17, 17, 17, 0.05);
  --feed-shadow-hover: 0 8px 20px rgba(17, 17, 17, 0.08), 0 20px 40px rgba(17, 17, 17, 0.08);

  background-color: var(--feed-bg);
  color: var(--feed-text);
  font-family: var(--feed-font-body);
}

:root[data-theme="dark"] .feed-page{
  --feed-bg: #0D1117;
  --feed-surface: #161B22;
  --feed-text: #F2F2F2;
  --feed-text-muted: #9099A3;
  --feed-border: rgba(255, 255, 255, 0.08);
  --feed-accent: #D9B54A;
  --feed-accent-contrast: #0D1117;
  --feed-shadow: 0 2px 10px rgba(0, 0, 0, 0.35), 0 12px 28px rgba(0, 0, 0, 0.3);
  --feed-shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.4), 0 20px 40px rgba(0, 0, 0, 0.4);
}

.feed-main{
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 96px;
}

/* Hero */
.hero{
  text-align: center;
  padding: 96px 16px 40px;
}

.hero-heading{
  font-family: var(--feed-font-display);
  font-weight: 700;
  font-size: clamp(3.2rem, 6vw, 6.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

.hero-subtext{
  margin: 20px auto 0;
  max-width: 560px;
  font-size: 1.8rem;
  color: var(--feed-text-muted);
}

.hero-search{
  margin: 40px auto 0;
  max-width: 560px;
}

.hero-search-input{
  width: 100%;
  padding: 16px 24px;
  font-size: 1.6rem;
  font-family: var(--feed-font-body);
  color: var(--feed-text);
  background-color: var(--feed-surface);
  border: 1px solid var(--feed-border);
  border-radius: 999px;
  box-shadow: var(--feed-shadow);
  transition: box-shadow 0.25s ease;
}

.hero-search-input:focus{
  outline: none;
  box-shadow: 0 0 0 3px var(--feed-accent);
}

/* Category chips */
.chip-bar{
  position: sticky;
  top: 90px;
  z-index: 10;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px 0;
  background-color: var(--feed-bg);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.chip-bar.is-hidden{
  transform: translateY(-130%);
  opacity: 0;
}

.chip{
  font-family: var(--feed-font-body);
  font-size: 1.4rem;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--feed-border);
  background-color: var(--feed-surface);
  color: var(--feed-text-muted);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.chip:hover{
  transform: translateY(-1px);
}

.chip.is-active{
  background-color: var(--feed-text);
  border-color: var(--feed-text);
  color: var(--feed-bg);
}

/* Featured quote */
.featured{
  margin-top: 48px;
  border-radius: 28px;
  overflow: hidden;
  min-height: 420px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  box-shadow: var(--feed-shadow);
}

.featured-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.75) 100%);
}

.featured-content{
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 64px 32px;
  text-align: center;
  color: #ffffff;
}

.featured-cover{
  width: 96px;
  height: 144px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  margin-bottom: 24px;
}

.featured-quote{
  font-family: var(--feed-font-display);
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}

.featured-book{
  margin-top: 20px;
  font-size: 1.5rem;
  opacity: 0.85;
}

.featured-cta{
  display: inline-block;
  margin-top: 32px;
  padding: 14px 32px;
  border-radius: 999px;
  background-color: var(--feed-accent);
  color: var(--feed-accent-contrast);
  font-weight: 700;
  font-size: 1.4rem;
  transition: transform 0.2s ease;
}

.featured-cta:hover{
  transform: translateY(-2px);
}

/* Layout: feed + sidebar */
.feed-layout{
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  margin-top: 64px;
  align-items: start;
}

.feed-toolbar{
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.bookmark-toggle{
  font-family: var(--feed-font-body);
  font-size: 1.3rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--feed-border);
  background-color: var(--feed-surface);
  color: var(--feed-text-muted);
  cursor: pointer;
}

.bookmark-toggle.is-active{
  background-color: var(--feed-accent);
  border-color: var(--feed-accent);
  color: var(--feed-accent-contrast);
}

/* Quote cards */
.quote-grid{
  column-count: 2;
  column-gap: 28px;
}

.quote-card{
  break-inside: avoid;
  margin-bottom: 28px;
  padding: 32px 28px 24px;
  background-color: var(--feed-surface);
  border-radius: 20px;
  box-shadow: var(--feed-shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease, transform 0.35s ease, box-shadow 0.25s ease;
}

.quote-card.is-visible{
  opacity: 1;
  transform: translateY(0);
}

.quote-card:hover{
  box-shadow: var(--feed-shadow-hover);
  transform: translateY(-4px);
}

.quote-card-top{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.quote-card-cover{
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.quote-card-book-meta{
  flex: 1;
  min-width: 0;
}

.quote-card-title{
  font-size: 1.3rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quote-card-author{
  font-size: 1.2rem;
  color: var(--feed-text-muted);
}

.quote-card-badge{
  font-size: 1.1rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background-color: var(--feed-bg);
  color: var(--feed-text-muted);
  border: 1px solid var(--feed-border);
  white-space: nowrap;
}

.quote-card-text{
  font-size: 1.8rem;
  line-height: 1.6;
  margin: 0;
}

.quote-card-text::before{ content: '\201C'; }
.quote-card-text::after{ content: '\201D'; }

.quote-card-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--feed-border);
}

.quote-card-meta{
  font-size: 1.2rem;
  color: var(--feed-text-muted);
}

.quote-card-actions{
  display: flex;
  gap: 6px;
}

.icon-btn{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--feed-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.icon-btn:hover{
  background-color: var(--feed-bg);
  color: var(--feed-text);
  transform: scale(1.08);
}

.icon-btn.is-bookmarked{
  color: var(--feed-accent);
}

.icon-btn.js-copy-btn.is-copied{
  color: var(--feed-accent);
  font-size: 1.1rem;
}

.quote-card-link{
  display: inline-block;
  margin-top: 16px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--feed-text-muted);
}

.quote-card-link:hover{
  color: var(--feed-accent);
}

/* Skeleton loading state */
.skeleton-grid{
  column-count: 2;
  column-gap: 28px;
}

.skeleton-card{
  break-inside: avoid;
  margin-bottom: 28px;
  height: 220px;
  border-radius: 20px;
  background: linear-gradient(100deg, var(--feed-surface) 30%, var(--feed-border) 50%, var(--feed-surface) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

@keyframes shimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}

/* Empty state */
.empty-state{
  text-align: center;
  padding: 64px 16px;
}

.empty-state-icon{
  font-size: 4rem;
}

.empty-state p{
  margin: 16px 0 24px;
  font-size: 1.7rem;
  color: var(--feed-text-muted);
}

.empty-state-cta{
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  background-color: var(--feed-text);
  color: var(--feed-bg);
  font-weight: 700;
}

/* Sidebar */
.feed-sidebar{
  position: sticky;
  top: 160px;
}

.sidebar-block{
  margin-bottom: 40px;
}

.sidebar-block h3{
  font-family: var(--feed-font-display);
  font-size: 1.6rem;
  margin: 0 0 16px;
}

.sidebar-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 1.3rem;
  color: var(--feed-text-muted);
}

.sidebar-item img{
  width: 28px;
  height: 40px;
  object-fit: cover;
  border-radius: 3px;
}

.sidebar-item:hover{
  color: var(--feed-text);
}

@media (max-width: 960px){
  .feed-layout{
    grid-template-columns: 1fr;
  }

  .feed-sidebar{
    display: none;
  }

  .quote-grid, .skeleton-grid{
    column-count: 1;
  }
}

@media (max-width: 600px){
  .feed-main{
    padding: 0 16px 64px;
  }

  .hero{
    padding: 72px 8px 24px;
  }

  .featured-content{
    padding: 40px 20px;
  }
}
