/* =====================================================
   1ooBooks — style.css  (shared across all pages)
   ===================================================== */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
:root{--black:#0A0A0A;--white:#F5F2EE;--yellow:#F5D90A;--gray:#1A1A1A;--gray-mid:#2A2A2A;--gray-light:#888;--accent:#F5D90A}
body{font-family:'Instrument Sans',sans-serif;background:var(--black);color:var(--white);overflow-x:hidden}
body::before{content:'';position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.035;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:200px}

/* NAV */
nav{position:fixed;top:0;left:0;right:0;z-index:1000;display:flex;align-items:center;justify-content:space-between;padding:1.1rem 3rem;background:rgba(10,10,10,.95);backdrop-filter:blur(20px);border-bottom:1px solid rgba(255,255,255,.07);gap:1rem}
.nav-logo{font-family:'Bebas Neue',sans-serif;font-size:1.8rem;letter-spacing:2px;color:var(--white);text-decoration:none;flex-shrink:0}
.nav-logo span{color:var(--yellow)}
.nav-links{display:flex;gap:1.3rem;list-style:none;flex-wrap:wrap;align-items:center}
.nav-links a{text-decoration:none;color:var(--gray-light);font-size:.75rem;font-weight:500;letter-spacing:.08em;text-transform:uppercase;transition:color .2s;white-space:nowrap}
.nav-links a:hover{color:var(--white)}
.nav-links a.active{color:var(--yellow)}
.nav-hamburger{display:none;flex-direction:column;justify-content:center;gap:5px;background:none;border:none;cursor:pointer;padding:4px;z-index:1100}
.nav-hamburger span{display:block;width:22px;height:2px;background:var(--white);border-radius:2px;transition:transform .3s,opacity .3s}
.nav-hamburger.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.nav-hamburger.open span:nth-child(2){opacity:0}
.nav-hamburger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.nav-drawer{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(10,10,10,.98);z-index:999;flex-direction:column;padding:5rem 2rem 2rem;overflow-y:auto;gap:0}
.nav-drawer.open{display:flex}
.nav-drawer a{text-decoration:none;color:var(--gray-light);font-size:1.05rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;padding:1rem 0;border-bottom:1px solid var(--gray-mid);transition:color .2s}
.nav-drawer a:hover,.nav-drawer a.active{color:var(--yellow)}
.nav-drawer-logo{font-family:'Bebas Neue',sans-serif;font-size:2rem;letter-spacing:2px;color:var(--white)!important;border-bottom:none!important;margin-bottom:.5rem}
.nav-drawer-logo span{color:var(--yellow)}

/* PAGE HERO */
.page-hero{padding:9rem 3rem 4rem;border-bottom:1px solid var(--gray-mid);position:relative;overflow:hidden}
.page-hero::before{content:attr(data-num);position:absolute;right:-2rem;top:50%;transform:translateY(-50%);font-family:'Bebas Neue',sans-serif;font-size:clamp(150px,22vw,300px);color:rgba(255,255,255,.025);line-height:1;pointer-events:none;user-select:none}
.breadcrumb{font-size:.72rem;color:var(--gray-light);letter-spacing:.1em;text-transform:uppercase;margin-bottom:1.5rem}
.breadcrumb a{color:var(--accent);text-decoration:none}
.breadcrumb a:hover{text-decoration:underline}
.page-hero h1{font-family:'Playfair Display',serif;font-size:clamp(2.2rem,6vw,5.5rem);font-weight:900;line-height:.95;letter-spacing:-2px;max-width:820px}
.page-hero h1 em{font-style:italic;color:var(--accent)}
.hero-meta{display:flex;gap:2rem;align-items:center;margin-top:1.8rem;flex-wrap:wrap}
.hero-meta-item{font-size:.78rem;color:var(--gray-light);text-transform:uppercase;letter-spacing:.1em}
.hero-meta-item strong{color:var(--white);font-weight:600}
.hero-desc{margin-top:1.5rem;font-size:.97rem;color:var(--gray-light);font-weight:300;line-height:1.75;max-width:600px}

/* CONTROLS */
.controls{position:sticky;top:62px;z-index:900;background:rgba(10,10,10,.97);backdrop-filter:blur(20px);padding:.85rem 3rem;border-bottom:1px solid var(--gray-mid);display:flex;gap:.5rem;flex-wrap:wrap;align-items:center}
.filter-btn{padding:.35rem .9rem;border:1px solid var(--gray-mid);background:transparent;color:var(--gray-light);font-family:'Instrument Sans',sans-serif;font-size:.74rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase;cursor:pointer;transition:all .2s;border-radius:2px}
.filter-btn:hover{border-color:var(--accent);color:var(--accent)}
.filter-btn.active{background:var(--accent);border-color:var(--accent);color:var(--black);font-weight:700}
.search-wrap{margin-left:auto}
.search-wrap input{background:var(--gray);border:1px solid var(--gray-mid);color:var(--white);padding:.38rem 1rem;font-family:'Instrument Sans',sans-serif;font-size:.82rem;outline:none;width:210px;transition:border-color .2s;border-radius:2px}
.search-wrap input::placeholder{color:var(--gray-light)}
.search-wrap input:focus{border-color:var(--accent)}

/* BOOKS */
.books-section{padding:2.5rem 3rem;position:relative;z-index:1}
.results-bar{font-size:.75rem;color:var(--gray-light);letter-spacing:.08em;text-transform:uppercase;margin-bottom:1.8rem;padding-bottom:1rem;border-bottom:1px solid var(--gray-mid)}
.results-bar strong{color:var(--white)}
.books-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:1px;background:var(--gray-mid);border:1px solid var(--gray-mid)}
.book-card{background:var(--gray);padding:1.6rem;display:flex;flex-direction:column;gap:.7rem;transition:background .2s}
.book-card:hover{background:#212121}
.book-num{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.15em;color:var(--accent);opacity:.65}
.book-genre-tag{display:inline-block;font-size:.65rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;padding:.22rem .55rem;background:rgba(255,255,255,.06);color:var(--accent);width:fit-content}
.book-title{font-family:'Playfair Display',serif;font-size:1.08rem;font-weight:700;line-height:1.2;color:var(--white)}
.book-author{font-size:.8rem;color:var(--gray-light)}
.book-desc{font-size:.82rem;color:var(--gray-light);line-height:1.65;font-weight:300;flex:1}
.book-footer{display:flex;align-items:center;justify-content:space-between;margin-top:.5rem;padding-top:.6rem;border-top:1px solid var(--gray-mid)}
.book-year{font-size:.68rem;color:rgba(136,136,136,.45);letter-spacing:.08em}
.ai-btn{font-size:.65rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--accent);background:none;border:none;cursor:pointer;font-family:'Instrument Sans',sans-serif;transition:opacity .2s;padding:0}
.ai-btn:hover{opacity:.65}
.ai-summary{display:none;margin-top:.5rem;padding:1rem;border-left:2px solid var(--accent);background:rgba(0,0,0,.3);font-size:.82rem;color:#ccc;line-height:1.7;font-weight:300}
.ai-summary.visible{display:block}
.ai-cursor{display:inline-block;width:2px;height:1em;background:var(--accent);margin-left:2px;vertical-align:text-bottom;animation:blink .6s step-end infinite}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}
.no-results{text-align:center;padding:5rem;color:var(--gray-light);grid-column:1/-1}
.no-results h3{font-family:'Playfair Display',serif;font-size:1.5rem;color:var(--white);margin-bottom:.5rem}

/* HOMEPAGE HERO */
.hero{min-height:100vh;display:flex;flex-direction:column;justify-content:flex-end;padding:0 3rem 5rem;position:relative;overflow:hidden;border-bottom:1px solid var(--gray-mid)}
.hero-bg-num{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-family:'Bebas Neue',sans-serif;font-size:clamp(200px,38vw,560px);color:rgba(245,217,10,.04);pointer-events:none;user-select:none;letter-spacing:-12px;line-height:1;animation:hpulse 7s ease-in-out infinite}
@keyframes hpulse{0%,100%{opacity:1}50%{opacity:.35}}
.hero-tag{display:inline-flex;align-items:center;gap:.5rem;background:var(--yellow);color:var(--black);font-size:.7rem;font-weight:700;letter-spacing:.14em;text-transform:uppercase;padding:.35rem .9rem;margin-bottom:1.5rem;width:fit-content}
.hero-title{font-family:'Playfair Display',serif;font-size:clamp(3.2rem,9vw,9rem);font-weight:900;line-height:.92;letter-spacing:-3px;max-width:900px}
.hero-title em{font-style:italic;color:var(--yellow)}
.hero-bottom{display:flex;align-items:flex-end;justify-content:space-between;flex-wrap:wrap;gap:2rem;margin-top:2.5rem}
.hero-sub{font-size:1rem;color:var(--gray-light);font-weight:300;line-height:1.8;max-width:480px}
.hero-sub strong{color:var(--white);font-weight:500}
.hero-cta{display:inline-flex;align-items:center;gap:.7rem;background:var(--yellow);color:var(--black);text-decoration:none;padding:1rem 2.2rem;font-weight:700;font-size:.88rem;letter-spacing:.06em;text-transform:uppercase;transition:background .2s,transform .2s;white-space:nowrap;flex-shrink:0}
.hero-cta:hover{background:#fff;transform:translateY(-2px)}
.ticker{background:var(--yellow);color:var(--black);padding:.65rem 0;overflow:hidden;white-space:nowrap;border-bottom:1px solid rgba(0,0,0,.1)}
.ticker-inner{display:inline-flex;animation:ticker 40s linear infinite}
.ticker-item{font-family:'Bebas Neue',sans-serif;font-size:.9rem;letter-spacing:.18em;padding:0 2rem}
@keyframes ticker{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* LISTS SECTION */
.lists-section{padding:5rem 3rem;position:relative;z-index:1}
.section-header{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:1rem;border-top:2px solid var(--white);padding-top:1rem;margin-bottom:3rem}
.section-label{font-family:'Bebas Neue',sans-serif;font-size:2.2rem;letter-spacing:2px}
.section-count{font-size:.75rem;color:var(--gray-light);letter-spacing:.1em;text-transform:uppercase}
.lists-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:1px;background:var(--gray-mid);border:1px solid var(--gray-mid)}
.list-card{text-decoration:none;color:var(--white);background:var(--gray);padding:2rem 1.8rem;display:flex;flex-direction:column;justify-content:space-between;min-height:220px;transition:background .25s;position:relative;overflow:hidden}
.list-card::after{content:'→';position:absolute;bottom:1.4rem;right:1.4rem;font-size:1.3rem;color:var(--yellow);opacity:0;transform:translateX(-6px);transition:opacity .25s,transform .25s}
.list-card:hover{background:#1f1f1f}
.list-card:hover::after{opacity:1;transform:translateX(0)}
.list-card.featured{grid-column:span 7;background:var(--yellow);color:var(--black);min-height:280px}
.list-card.featured:hover{background:#f0d205}
.list-card.featured::after{color:var(--black)}
.list-card.featured .card-tag{color:rgba(0,0,0,.5)}
.list-card.featured .card-title{font-size:clamp(1.6rem,2.8vw,2.4rem)}
.list-card.featured .card-desc{color:rgba(0,0,0,.6);max-width:400px}
.list-card.featured .card-count{color:rgba(0,0,0,.5)}
.list-card.featured .card-num{opacity:.4}
.list-card.span5{grid-column:span 5}
.list-card.span4{grid-column:span 4}
.list-card.span6{grid-column:span 6}
.list-card.span3{grid-column:span 3}
.card-num{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.15em;opacity:.35}
.card-body{margin-top:auto}
.card-tag{font-size:.67rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--gray-light);margin-bottom:.6rem}
.card-title{font-family:'Playfair Display',serif;font-size:1.15rem;font-weight:700;line-height:1.2}
.card-desc{font-size:.83rem;color:var(--gray-light);line-height:1.6;margin-top:.6rem;font-weight:300}
.card-count{margin-top:1.2rem;font-size:.72rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--gray-light)}

/* ABOUT / VISION */
.about-section{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--gray-mid)}
.about-left{padding:5rem 3rem;border-right:1px solid var(--gray-mid)}
.about-right{padding:5rem 3rem}
.section-eyebrow{font-family:'Bebas Neue',sans-serif;font-size:.85rem;letter-spacing:.22em;color:var(--yellow);margin-bottom:1.2rem}
.about-title{font-family:'Playfair Display',serif;font-size:clamp(2rem,3.5vw,3rem);font-weight:900;line-height:1.05;letter-spacing:-1px;margin-bottom:1.8rem}
.about-title em{font-style:italic;color:var(--yellow)}
.about-body{color:var(--gray-light);font-size:.95rem;line-height:1.85;font-weight:300}
.about-body p+p{margin-top:1rem}
.vision-list{display:flex;flex-direction:column;gap:2rem;margin-top:.5rem}
.vision-item{display:flex;gap:1.2rem;align-items:flex-start}
.vision-num{font-family:'Bebas Neue',sans-serif;font-size:2.8rem;color:var(--yellow);line-height:.85;flex-shrink:0;width:2rem}
.vision-text h4{font-family:'Playfair Display',serif;font-size:1.08rem;font-weight:700;margin-bottom:.35rem}
.vision-text p{font-size:.87rem;color:var(--gray-light);line-height:1.65;font-weight:300}

/* STATS */
.stats-row{display:grid;grid-template-columns:repeat(4,1fr);gap:1px;background:var(--gray-mid);border-top:1px solid var(--gray-mid);border-bottom:1px solid var(--gray-mid)}
.stat-cell{background:var(--gray);padding:2.5rem 3rem}
.stat-cell.accent-cell{background:var(--yellow)}
.stat-big{font-family:'Bebas Neue',sans-serif;font-size:3.8rem;letter-spacing:-2px;color:var(--white);line-height:1}
.stat-cell.accent-cell .stat-big{color:var(--black)}
.stat-label{font-size:.78rem;color:var(--gray-light);text-transform:uppercase;letter-spacing:.08em;margin-top:.4rem}
.stat-cell.accent-cell .stat-label{color:rgba(0,0,0,.5)}

/* MARQUEE */
.marquee-strip{border-top:1px solid var(--gray-mid);border-bottom:1px solid var(--gray-mid);padding:1.1rem 0;overflow:hidden;white-space:nowrap}
.marquee-inner{display:inline-flex;animation:ticker 30s linear infinite}
.marquee-item{font-family:'Playfair Display',serif;font-style:italic;font-size:.97rem;color:var(--gray-light);padding:0 1.5rem}
.marquee-sep{color:var(--yellow)}

/* FOOTER */
footer{padding:4rem 3rem 2rem;border-top:1px solid var(--gray-mid)}
.footer-top{display:grid;grid-template-columns:1.5fr 1fr 1fr;gap:4rem;padding-bottom:3rem;border-bottom:1px solid var(--gray-mid)}
.footer-logo{font-family:'Bebas Neue',sans-serif;font-size:2.5rem;letter-spacing:2px;color:var(--white);text-decoration:none;line-height:1;display:block;margin-bottom:.8rem}
.footer-logo span{color:var(--yellow)}
.footer-tagline{color:var(--gray-light);font-size:.88rem;font-weight:300;line-height:1.7;max-width:280px}
.footer-nav h5{font-size:.68rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:var(--gray-light);margin-bottom:1.2rem}
.footer-nav ul{list-style:none;display:flex;flex-direction:column;gap:.65rem}
.footer-nav a{text-decoration:none;color:rgba(255,255,255,.4);font-size:.87rem;transition:color .2s}
.footer-nav a:hover{color:var(--yellow)}
.footer-bottom{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:1rem;padding-top:1.5rem}
.footer-copy{font-size:.73rem;color:rgba(255,255,255,.18)}
.footer-back{font-size:.75rem;color:var(--gray-light);text-decoration:none;letter-spacing:.08em;text-transform:uppercase;transition:color .2s}
.footer-back:hover{color:var(--yellow)}

/* RESPONSIVE */
@media(max-width:1100px){
  .list-card.featured{grid-column:span 12}
  .list-card.span5,.list-card.span4,.list-card.span6,.list-card.span3{grid-column:span 6}
  .stats-row{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:900px){
  nav{padding:1rem 1.5rem}
  .nav-links{display:none}
  .nav-hamburger{display:flex}
  .hero{padding:0 1.5rem 3.5rem}
  .hero-bottom{flex-direction:column;align-items:flex-start;gap:1.5rem}
  .hero-cta{width:100%;justify-content:center}
  .lists-section{padding:3rem 1.5rem}
  .list-card.featured,.list-card.span5,.list-card.span4,.list-card.span6,.list-card.span3{grid-column:span 12}
  .about-section{grid-template-columns:1fr}
  .about-left{border-right:none;border-bottom:1px solid var(--gray-mid);padding:3rem 1.5rem}
  .about-right{padding:3rem 1.5rem}
  .footer-top{grid-template-columns:1fr;gap:2.5rem}
  footer{padding:3rem 1.5rem 1.5rem}
  .stat-cell{padding:2rem 1.5rem}
  .page-hero{padding:7rem 1.5rem 3rem}
  .controls{padding:.8rem 1.5rem;top:60px}
  .books-section{padding:1.8rem 1.5rem}
  .books-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .hero-title{font-size:clamp(2.6rem,12vw,4rem);letter-spacing:-1px}
  .books-grid{grid-template-columns:1fr}
  .search-wrap{width:100%;margin-left:0}
  .search-wrap input{width:100%}
  .controls{flex-direction:column;align-items:flex-start}
  .stats-row{grid-template-columns:1fr 1fr}
  .footer-bottom{flex-direction:column;align-items:flex-start}
}

/* ── MOBILE FILTERS: horizontal scroll, no wrap ── */
@media(max-width:900px){
  .filter-btn{display:none}
  .search-wrap{
    width:100%;
    margin-left:0;
  }
  .search-wrap input{width:100%}
   .controls{
      padding:.8rem 1.5rem;
   }
}

/* ── AI MODAL ── */
.ai-modal{
  display:none;
  position:fixed;inset:0;z-index:2000;
  align-items:center;justify-content:center;
  padding:1rem;
}
.ai-modal.open{display:flex}

.ai-modal-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.75);
  backdrop-filter:blur(6px);
}

.ai-modal-box{
  position:relative;z-index:1;
  background:#141414;
  border:1px solid var(--gray-mid);
  width:100%;max-width:600px;
  max-height:85vh;
  display:flex;flex-direction:column;
  box-shadow:0 24px 80px rgba(0,0,0,.6);
  animation:modalIn .2s ease;
}
@keyframes modalIn{
  from{opacity:0;transform:translateY(16px)}
  to{opacity:1;transform:translateY(0)}
}

.ai-modal-header{
  display:flex;align-items:flex-start;
  justify-content:space-between;gap:1rem;
  padding:1.6rem 1.8rem 1.2rem;
  border-bottom:1px solid var(--gray-mid);
}
.ai-modal-label{
  font-size:.68rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;
  color:var(--accent);margin-bottom:.5rem;
  display:block;
}
.ai-modal-title{
  font-family:'Playfair Display',serif;
  font-size:1.25rem;font-weight:700;
  line-height:1.2;color:var(--white);
  margin-bottom:.25rem;
}
.ai-modal-author{
  font-size:.82rem;color:var(--gray-light);
}
.ai-modal-close{
  background:none;border:none;
  color:var(--gray-light);font-size:1.1rem;
  cursor:pointer;padding:.25rem;
  flex-shrink:0;transition:color .2s;
  line-height:1;margin-top:.1rem;
}
.ai-modal-close:hover{color:var(--white)}

.ai-modal-body{
  padding:1.6rem 1.8rem;
  font-size:.95rem;color:#d0d0d0;
  line-height:1.8;font-weight:300;
  overflow-y:auto;flex:1;
}

.ai-modal-footer{
  padding:.9rem 1.8rem;
  border-top:1px solid var(--gray-mid);
}
.ai-modal-source{
  font-size:.68rem;color:var(--gray-light);
  letter-spacing:.08em;text-transform:uppercase;
}

/* Cursor blink inside modal */
.ai-cursor{
  display:inline-block;width:2px;height:.9em;
  background:var(--accent);margin-left:2px;
  vertical-align:text-bottom;
  animation:blink .6s step-end infinite;
}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}

@media(max-width:600px){
  .ai-modal-box{max-height:92vh}
  .ai-modal-header{padding:1.2rem 1.2rem 1rem}
  .ai-modal-body{padding:1.2rem}
  .ai-modal-footer{padding:.75rem 1.2rem}
  .ai-modal-title{font-size:1.1rem}
}

/* ── AI BREAKDOWN SECTIONS ── */
.ai-section{margin-bottom:1.6rem}
.ai-section:last-child{margin-bottom:0}

.ai-section-label{
  font-size:.65rem;font-weight:700;
  letter-spacing:.16em;text-transform:uppercase;
  color:var(--accent);margin-bottom:.55rem;
  display:flex;align-items:center;gap:.5rem;
}
.ai-section-label::after{
  content:'';flex:1;height:1px;
  background:linear-gradient(to right, rgba(255,255,255,.1), transparent);
}

.ai-section-text{
  font-size:.93rem;color:#d8d8d8;
  line-height:1.75;font-weight:300;
}

.ai-takeaways{
  list-style:none;
  display:flex;flex-direction:column;gap:.6rem;
}
.ai-takeaways li{
  font-size:.9rem;color:#d0d0d0;
  line-height:1.6;font-weight:300;
  padding-left:1.2rem;position:relative;
}
.ai-takeaways li::before{
  content:'→';
  position:absolute;left:0;
  color:var(--accent);font-size:.8rem;
}

/* Streaming state */
.ai-streaming{
  display:flex;align-items:center;
  gap:.5rem;padding:.5rem 0;
  color:var(--gray-light);font-size:.85rem;
}
.ai-streaming::before{content:'Generating breakdown'}

/* Skeleton loader */
.ai-skeleton{display:flex;flex-direction:column;gap:.5rem}
.ai-skeleton-label{
  height:.65rem;width:120px;
  background:linear-gradient(90deg,#2a2a2a 25%,#333 50%,#2a2a2a 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
  border-radius:2px;margin-bottom:.3rem;
}
.ai-skeleton-line{
  height:.8rem;
  background:linear-gradient(90deg,#2a2a2a 25%,#333 50%,#2a2a2a 75%);
  background-size:200% 100%;
  animation:shimmer 1.4s infinite;
  border-radius:2px;
}
.ai-skeleton-line.wide{width:100%}
.ai-skeleton-line.mid{width:75%}
.ai-skeleton-line.short{width:90%;margin-left:.8rem}
@keyframes shimmer{
  0%{background-position:200% 0}
  100%{background-position:-200% 0}
}

/* Error state */
.ai-error{
  font-size:.88rem;color:var(--gray-light);
  font-style:italic;line-height:1.6;
}

/* ── NAV AUTH BUTTONS ── */
#navAuthBtn{display:flex;align-items:center;gap:.75rem;flex-shrink:0}
.nav-signin-btn{
  background:var(--yellow);color:var(--black);
  border:none;cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.75rem;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;
  padding:.45rem 1.1rem;transition:background .2s;
}
.nav-signin-btn:hover{background:#fff}
.nav-shelf-btn{
  text-decoration:none;color:var(--white);
  font-size:.75rem;font-weight:500;
  letter-spacing:.08em;text-transform:uppercase;
  transition:color .2s;white-space:nowrap;
}
.nav-shelf-btn:hover{color:var(--yellow)}
.nav-avatar-btn{
  display:flex;align-items:center;gap:.4rem;
  background:none;border:1px solid var(--gray-mid);
  color:var(--gray-light);cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.74rem;padding:.35rem .7rem;
  transition:border-color .2s;position:relative;
}
.nav-avatar-btn:hover{border-color:var(--yellow);color:var(--white)}
.nav-avatar-img{width:20px;height:20px;border-radius:50%;object-fit:cover}
.nav-avatar-name{max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Avatar dropdown */
.avatar-menu{
  position:absolute;top:calc(100% + 8px);right:0;
  background:#1a1a1a;border:1px solid var(--gray-mid);
  min-width:140px;z-index:2000;
  display:flex;flex-direction:column;
}
.avatar-menu a,.avatar-menu button{
  text-decoration:none;background:none;border:none;
  color:var(--gray-light);cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.83rem;padding:.75rem 1rem;
  text-align:left;transition:background .15s,color .15s;
  letter-spacing:.04em;
}
.avatar-menu a:hover,.avatar-menu button:hover{
  background:var(--gray-mid);color:var(--white);
}

/* Mobile drawer auth */
.nav-drawer-signin{
  background:var(--yellow);color:var(--black);
  border:none;cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:1rem;font-weight:700;
  letter-spacing:.08em;text-transform:uppercase;
  padding:1rem;margin-top:.5rem;width:100%;text-align:left;
}
.nav-drawer-shelf{
  display:block;text-decoration:none;
  color:var(--yellow)!important;font-size:1.05rem!important;
}
.nav-drawer-signout{
  background:none;border:none;
  color:var(--gray-light);cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:1.05rem;font-weight:500;
  letter-spacing:.06em;text-transform:uppercase;
  padding:1rem 0;border-bottom:1px solid var(--gray-mid);
  text-align:left;width:100%;transition:color .2s;
}
.nav-drawer-signout:hover{color:var(--white)}

/* ── LOGIN POPUP ── */
.login-popup{
  display:none;position:fixed;inset:0;
  z-index:3000;align-items:center;justify-content:center;padding:1rem;
}
.login-popup.open{display:flex}
.login-popup-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.8);backdrop-filter:blur(8px);
}
.login-popup-box{
  position:relative;z-index:1;
  background:#111;
  border:1px solid var(--gray-mid);
  border-top:3px solid var(--yellow);
  width:100%;max-width:420px;
  padding:2.5rem 2.2rem;
  animation:modalIn .2s ease;
  text-align:center;
}
.login-popup-close{
  position:absolute;top:1rem;right:1.2rem;
  background:none;border:none;color:var(--gray-light);
  font-size:1.1rem;cursor:pointer;transition:color .2s;line-height:1;
}
.login-popup-close:hover{color:var(--white)}
.login-popup-logo{
  font-family:'Bebas Neue',sans-serif;
  font-size:2rem;letter-spacing:2px;
  color:var(--white);text-decoration:none;
  display:block;margin-bottom:1.4rem;
}
.login-popup-logo span{color:var(--yellow)}
.login-popup-headline{
  font-family:'Playfair Display',serif;
  font-size:1.5rem;font-weight:900;
  line-height:1.2;letter-spacing:-.5px;
  margin-bottom:1.2rem;
}
.login-popup-headline em{font-style:italic;color:var(--yellow)}
.login-popup-benefits{
  list-style:none;margin-bottom:2rem;
  display:flex;flex-direction:column;gap:.5rem;
}
.login-popup-benefits li{
  font-size:.87rem;color:var(--gray-light);
  font-weight:300;
}
.login-popup-benefits li::before{content:'✦ ';color:var(--yellow);font-size:.7rem}
.login-google-btn{
  display:flex;align-items:center;justify-content:center;
  gap:.75rem;width:100%;
  background:#fff;color:#1a1a1a;border:none;
  padding:.9rem 1.5rem;cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.9rem;font-weight:600;
  letter-spacing:.02em;transition:background .2s,transform .2s;
  margin-bottom:1.2rem;
}
.login-google-btn:hover{background:#f0f0f0;transform:translateY(-1px)}
.login-popup-terms{
  font-size:.72rem;color:rgba(255,255,255,.2);line-height:1.5;
}

/* ── BOOKMARK BUTTON ── */
.book-actions{display:flex;align-items:center;gap:.6rem}
.bookmark-btn{
  background:none;border:none;cursor:pointer;
  color:var(--gray-light);padding:.2rem;
  transition:color .2s,transform .15s;
  display:flex;align-items:center;flex-shrink:0;
}
.bookmark-btn:hover{color:var(--white);transform:scale(1.15)}
.bookmark-btn.saved{color:var(--yellow)}
.bookmark-btn.saved:hover{color:#fff}

/* ── COMMUNITY BUTTON ── */
.community-btn{
  background:none;border:none;cursor:pointer;
  color:var(--gray-light);padding:.2rem;
  transition:color .2s,transform .15s;
  display:flex;align-items:center;flex-shrink:0;
}
.community-btn:hover{color:var(--white);transform:scale(1.15)}

/* ── COMMUNITY MODAL ── */
.cr-modal{
  display:none;position:fixed;inset:0;z-index:3000;
  align-items:center;justify-content:center;padding:1rem;
}
.cr-modal.open{display:flex}
.cr-backdrop{
  position:absolute;inset:0;
  background:rgba(0,0,0,.8);backdrop-filter:blur(8px);
}
.cr-box{
  position:relative;z-index:1;
  background:#141414;border:1px solid var(--gray-mid);
  width:100%;max-width:520px;max-height:88vh;
  display:flex;flex-direction:column;
  animation:modalIn .2s ease;
}
.cr-header{
  display:flex;align-items:flex-start;justify-content:space-between;
  gap:1rem;padding:1.6rem 1.8rem 1.2rem;
  border-bottom:1px solid var(--gray-mid);flex-shrink:0;
}
.cr-modal-label{
  font-size:.65rem;font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;color:var(--accent);
  display:block;margin-bottom:.4rem;
}
.cr-title{
  font-family:'Playfair Display',serif;
  font-size:1.15rem;font-weight:700;color:var(--white);
  margin-bottom:.2rem;line-height:1.2;
}
.cr-author{font-size:.8rem;color:var(--gray-light)}
.cr-close{
  background:none;border:none;color:var(--gray-light);
  font-size:1.1rem;cursor:pointer;padding:.25rem;
  flex-shrink:0;transition:color .2s;line-height:1;
}
.cr-close:hover{color:var(--white)}
.cr-body{
  overflow-y:auto;flex:1;
  padding:1.4rem 1.8rem;
  display:flex;flex-direction:column;gap:1rem;
}

/* Score section */
.cr-score-section{display:flex;flex-direction:column;gap:.6rem}
.cr-score-row{display:flex;align-items:center;gap:.8rem}
.cr-pct{
  font-family:'Bebas Neue',sans-serif;font-size:2rem;
  color:var(--accent);line-height:1;min-width:3rem;
}
.cr-bar-wrap{flex:1;height:6px;background:var(--gray-mid);border-radius:3px;overflow:hidden}
.cr-bar{height:100%;background:var(--accent);border-radius:3px;transition:width .4s ease}
.cr-label{font-size:.75rem;color:var(--gray-light);letter-spacing:.06em;white-space:nowrap}
.cr-tally{font-size:.8rem;color:var(--gray-light)}
.cr-no-reviews{font-size:.85rem;color:var(--gray-light);font-style:italic}

/* Divider */
.cr-divider{height:1px;background:var(--gray-mid);flex-shrink:0}

/* Section label */
.cr-section-label{
  font-size:.65rem;font-weight:700;letter-spacing:.14em;
  text-transform:uppercase;color:var(--gray-light);
}

/* Review cards */
.cr-review-card{
  background:#1a1a1a;border:1px solid var(--gray-mid);
  padding:1rem;display:flex;flex-direction:column;gap:.6rem;
}
.cr-review-card.cr-own{border-color:rgba(245,217,10,.3)}
.cr-review-header{display:flex;align-items:center;justify-content:space-between}
.cr-reviewer{display:flex;align-items:center;gap:.6rem}
.cr-avatar{width:28px;height:28px;flex-shrink:0}
.cr-avatar-img{width:28px;height:28px;border-radius:50%;object-fit:cover}
.cr-avatar-placeholder{
  width:28px;height:28px;border-radius:50%;
  background:var(--gray-mid);color:var(--white);
  display:flex;align-items:center;justify-content:center;
  font-size:.75rem;font-weight:700;
}
.cr-reviewer-name{font-size:.82rem;font-weight:600;color:var(--white);display:block}
.cr-ago{font-size:.72rem;color:var(--gray-light)}
.cr-vote-badge{font-size:1rem}
.cr-review-text{font-size:.85rem;color:#ccc;line-height:1.65;font-weight:300}
.cr-own-actions{display:flex;gap:.5rem}
.cr-edit-btn,.cr-delete-btn{
  background:none;border:1px solid var(--gray-mid);
  color:var(--gray-light);cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;
  padding:.3rem .7rem;transition:all .15s;
}
.cr-edit-btn:hover{border-color:var(--accent);color:var(--accent)}
.cr-delete-btn:hover{border-color:#e55;color:#e55}

/* Form */
.cr-form{display:flex;flex-direction:column;gap:.8rem}
.cr-form-title{font-size:.75rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--gray-light)}
.cr-vote-btns{display:flex;gap:.6rem}
.cr-vote-btn{
  flex:1;background:none;border:1px solid var(--gray-mid);
  color:var(--gray-light);cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.82rem;font-weight:500;
  padding:.6rem .8rem;transition:all .15s;
}
.cr-vote-btn.up.active{background:rgba(52,168,83,.15);border-color:#34a853;color:#34a853}
.cr-vote-btn.down.active{background:rgba(234,67,53,.15);border-color:#ea4335;color:#ea4335}
.cr-vote-btn:not(.active):hover{border-color:var(--white);color:var(--white)}
.cr-textarea-wrap{position:relative}
.cr-textarea{
  width:100%;background:#1a1a1a;border:1px solid var(--gray-mid);
  color:var(--white);font-family:'Instrument Sans',sans-serif;
  font-size:.85rem;font-weight:300;line-height:1.6;
  padding:.75rem;resize:none;height:80px;
  transition:border-color .2s;box-sizing:border-box;
}
.cr-textarea:focus{outline:none;border-color:var(--accent)}
.cr-charcount{
  position:absolute;bottom:.4rem;right:.5rem;
  font-size:.68rem;color:var(--gray-light);
}
.cr-form-actions{display:flex;justify-content:flex-end;gap:.6rem}
.cr-cancel-btn{
  background:none;border:1px solid var(--gray-mid);
  color:var(--gray-light);cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.75rem;letter-spacing:.08em;text-transform:uppercase;
  padding:.45rem 1rem;transition:all .15s;
}
.cr-cancel-btn:hover{border-color:var(--white);color:var(--white)}
.cr-submit-btn{
  background:var(--accent);color:var(--black);border:none;cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.75rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  padding:.45rem 1.2rem;transition:background .15s,opacity .15s;
}
.cr-submit-btn:disabled{opacity:.35;cursor:not-allowed}
.cr-submit-btn:not(:disabled):hover{background:#fff}

/* Sign in prompt */
.cr-signin-prompt{text-align:center;padding:.5rem 0}
.cr-signin-btn{
  background:none;border:1px solid var(--gray-mid);
  color:var(--gray-light);cursor:pointer;
  font-family:'Instrument Sans',sans-serif;
  font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;
  padding:.6rem 1.4rem;transition:all .2s;
}
.cr-signin-btn:hover{border-color:var(--accent);color:var(--accent)}

@media(max-width:600px){
  .cr-box{max-height:92vh}
  .cr-header{padding:1.2rem 1.2rem 1rem}
  .cr-body{padding:1.2rem}
  .cr-pct{font-size:1.6rem}
}

/* ── VOTE TRIANGLE STYLES ── */
.cr-up-count{color:#4caf50;font-weight:600;font-size:.82rem}
.cr-dn-count{color:#e55;font-weight:600;font-size:.82rem}
.cr-vote-up{color:#4caf50;font-size:.9rem;font-weight:700}
.cr-vote-dn{color:#e55;font-size:.9rem;font-weight:700}
.cr-vote-btn.up.active{background:rgba(76,175,80,.15);border-color:#4caf50;color:#4caf50}
.cr-vote-btn.down.active{background:rgba(229,85,85,.15);border-color:#e55;color:#e55}
