/* Affiox Reader Ultra (Level +4) */

.affiox-reader-progress{
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  z-index: 99999;
  background: linear-gradient(90deg, #29f7ff, #7b61ff, #ff2d95);
}

/* TOC shell */
.affiox-reader-toc-shell{
  position: fixed;
  right: 18px;
  top: 96px;
  width: 280px;
  max-height: calc(100vh - 140px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(10,12,20,.74);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0,0,0,.40);
  padding: 12px;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

html[data-affiox-mode="light"] .affiox-reader-toc-shell{
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.10);
  box-shadow: 0 18px 60px rgba(12,16,32,.12);
}

.affiox-reader-toc-shell.is-ready{
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.affiox-reader-toc-title{
  font-weight: 900;
  letter-spacing: -.01em;
  margin-bottom: 8px;
}

.affiox-reader-toc ul{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.affiox-reader-toc li a{
  display: block;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: inherit;
  text-decoration: none;
  font-weight: 750;
  opacity: .92;
}

html[data-affiox-mode="light"] .affiox-reader-toc li a{
  border-color: rgba(0,0,0,.08);
  background: rgba(0,0,0,.03);
}

.affiox-reader-toc li.h3 a{
  margin-left: 10px;
  font-weight: 700;
  opacity: .88;
}

.affiox-reader-toc li a:hover{
  opacity: 1;
}

/* Focus button */
.affiox-focus-toggle{
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 99999;
  border-radius: 999px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,12,20,.72);
  color: #fff;
  backdrop-filter: blur(14px);
  cursor: pointer;
  font-weight: 900;
  letter-spacing: -.01em;
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

html[data-affiox-mode="light"] .affiox-focus-toggle{
  background: rgba(255,255,255,.92);
  border-color: rgba(0,0,0,.10);
  color: #0c1020;
  box-shadow: 0 18px 60px rgba(12,16,32,.12);
}

/* Focus mode: hide header + TOC for distraction-free reading */
body.affiox-focus-on .affiox-header{
  transform: translateY(-120%);
  transition: transform .25s ease;
}
body.affiox-focus-on .affiox-reader-toc-shell{
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Responsive: hide TOC on small */
@media (max-width: 1100px){
  .affiox-reader-toc-shell{ display:none; }
}
