/*
Theme Name: Lecture Hub Theme
Description: Lecture sheets, books, model tests platform theme.
Version: 3.1.0
Author: Infinity IT Agency
Text Domain: lecture-hub-theme
*/
/* ========== Design System ========== */
:root {
  --navy: #0a1628;
  --navy2: #12233f;
  --navy3: #1a2f52;
  --accent: #e8b923;
  --accent-hover: #f0c93a;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --red: #dc2626;
  --bg: #f4f6fa;
  --bg-alt: #eef1f7;
  --ink: #0f172a;
  --ink-soft: #1e293b;
  --muted: #64748b;
  --muted-light: #94a3b8;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-soft: #f1f5f9;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 28px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Hind Siliguri", "Noto Sans Bengali", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--teal); transition: color var(--transition); }
a:hover { color: var(--teal-dark); }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* ========== Top bar ========== */
.topbar {
  background: var(--accent);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 20px;
}
.topbar a {
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  padding: 2px 10px;
  border-radius: 6px;
  background: rgba(10, 22, 40, 0.08);
}
.topbar a:hover { background: rgba(10, 22, 40, 0.14); }

/* ========== Header ========== */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 20px rgba(0, 0, 0, 0.25);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  position: relative;
}
/* Logo stays fixed on the left — never overlaps menu text */
.site-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  letter-spacing: -0.01em;
  max-width: 140px;
  overflow: hidden;
  z-index: 2;
}
.site-title .custom-logo-link {
  display: block;
  line-height: 0;
}
.site-title a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.site-title img,
.custom-logo {
  max-height: 40px;
  width: auto;
  max-width: 120px;
  display: block;
  object-fit: contain;
}
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}
.main-nav > ul {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.main-nav > ul::-webkit-scrollbar { display: none; }
.main-nav > ul > li {
  position: relative;
  flex: 0 0 auto;
}
.main-nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 6px 9px;
  border-radius: 6px;
  font-weight: 500;
  display: block;
  white-space: nowrap;
  font-size: 0.8125rem;
  line-height: 1.25;
  transition: background var(--transition), color var(--transition);
}
.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
  background: rgba(232, 185, 35, 0.15);
  color: var(--accent);
}
.main-nav .menu-item-has-children > a::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.7;
}
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--navy2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 6px;
  list-style: none;
  box-shadow: var(--shadow-lg);
  z-index: 60;
}
.main-nav .sub-menu li { margin: 0; }
.main-nav .sub-menu a {
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  white-space: normal;
}
.main-nav .sub-menu a:hover {
  background: rgba(232, 185, 35, 0.12);
  color: var(--accent);
}
.main-nav > ul > li:hover > .sub-menu,
.main-nav > ul > li:focus-within > .sub-menu { display: block; }
.main-nav .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin: 0 0 0 4px;
}
.head-search { flex: 0 0 auto; }
.head-search input {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.8125rem;
  width: 140px;
  max-width: 14vw;
  transition: border-color var(--transition), background var(--transition);
}
.head-search input::placeholder { color: #94a3b8; }
.head-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}
.nav-toggle {
  display: none;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  font-size: 1.25rem;
  padding: 6px 12px;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--navy);
  font-weight: 700;
}

/* ========== Legacy hero (kept for compatibility) ========== */
.hero {
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy2) 50%, #0c1a30 100%);
  color: #fff;
  padding: 64px 0 70px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}
.hero .badge {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border-radius: 6px;
  padding: 4px 12px;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0 0 10px;
  line-height: 1.2;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 1.1rem;
  color: #94a3b8;
  margin: 10px 0 26px;
}
.hero-list {
  list-style: none;
  margin: 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
}
.hero-list li {
  padding: 8px 0 8px 32px;
  position: relative;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.hero-list li:last-child { border: 0; }
.hero-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 8px;
  background: var(--teal);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  font-size: 0.7rem;
  font-weight: 700;
}
.cta {
  display: inline-block;
  background: var(--accent);
  color: var(--navy);
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 10px;
  text-decoration: none;
  margin: 4px 6px 4px 0;
  transition: background var(--transition), transform var(--transition);
}
.cta.ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}
.cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.cta.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #fff;
}

/* ========== Stats ========== */
.stats {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  text-align: center;
  padding: 28px 0;
}
.stat-grid b {
  display: block;
  font-size: 1.85rem;
  color: var(--teal);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.stat-grid span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ========== Sections (legacy) ========== */
.section { padding: 56px 0; }
.band { background: linear-gradient(135deg, #f0fdfa, #f0f4ff); }
.section h2 {
  text-align: center;
  font-size: 1.85rem;
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.sub {
  text-align: center;
  color: var(--muted);
  margin: 0 0 32px;
  font-size: 1rem;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 14px;
}
.chip {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transition: border-color var(--transition), color var(--transition), box-shadow var(--transition);
}
.chip small {
  background: var(--accent);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.75rem;
  color: var(--navy);
  font-weight: 700;
}
.chip:hover {
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: var(--shadow-sm);
}
.chip.sm { padding: 7px 14px; font-size: 0.875rem; border-width: 1px; }
.types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.type {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.type:nth-child(3n+2) { border-left-color: #d97706; }
.type:nth-child(3n) { border-left-color: #7c3aed; }
.type small { color: var(--muted); }
.type:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.rule-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}
.rule-list a {
  background: var(--card);
  border-radius: 10px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}
.rule-list a:hover {
  background: var(--navy);
  color: #fff;
}
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow var(--transition);
}
.feature b { color: var(--teal); font-size: 1.35rem; }
.feature:hover { box-shadow: var(--shadow-md); }
details {
  background: var(--card);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
}
summary { cursor: pointer; font-weight: 600; }

/* ========== Library / Archive ========== */
.page-title { margin: 36px 0 16px; font-weight: 800; letter-spacing: -0.02em; }
.filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--card);
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.filter input,
.filter select {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  flex: 1;
  min-width: 160px;
  background: #fff;
  transition: border-color var(--transition);
}
.filter input:focus,
.filter select:focus {
  outline: none;
  border-color: var(--teal);
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 48px 20px;
}
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 24px 0;
}
.pagination a,
.pagination span {
  padding: 8px 14px;
  background: var(--card);
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background var(--transition), color var(--transition);
}
.pagination a:hover { background: var(--bg-alt); }
.pagination .current {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ========== Single ========== */
.single-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  align-items: start;
}
.content {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.crumbs, .meta {
  color: var(--muted);
  font-size: 0.875rem;
}
.entry-title {
  margin: 8px 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.download-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.925rem;
}
.content th, .content td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  vertical-align: top;
}
.content th {
  background: var(--bg-alt);
  font-weight: 600;
}
.side {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 32px 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.side h3 { margin-top: 0; font-weight: 700; }
.side-link {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-soft);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.9rem;
  transition: color var(--transition);
}
.side-link:hover { color: var(--teal); }
.side-cta {
  display: block;
  text-align: center;
  margin-top: 16px;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--navy);
  color: #94a3b8;
  padding: 48px 0 20px;
  margin-top: 64px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
}
.site-footer h4 {
  color: #fff;
  margin: 0 0 14px;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer li { padding: 4px 0; }
.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity var(--transition);
}
.site-footer a:hover { opacity: 0.85; }
.site-footer p { font-size: 0.9rem; line-height: 1.6; margin: 0 0 12px; }
.copy {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 32px 0 0;
  padding-top: 16px;
  font-size: 0.825rem;
  color: #64748b;
}

/* ========== Responsive header ========== */
/* Switch to hamburger earlier so many items never crowd the bar */
@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 18px 20px;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    z-index: 90;
    overflow: visible;
  }
  .main-nav.open { display: flex; }
  .main-nav > ul {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    overflow: visible;
  }
  .main-nav > ul > li { flex-shrink: 1; width: 100%; }
  .main-nav a {
    white-space: normal;
    padding: 10px 12px;
    font-size: 0.9rem;
  }
  .main-nav .sub-menu {
    position: static;
    display: none;
    box-shadow: none;
    margin: 0 0 0 12px;
    padding: 4px 0;
    background: transparent;
    min-width: 0;
    border: 0;
  }
  .main-nav > ul > li.open > .sub-menu,
  .main-nav > ul > li:focus-within > .sub-menu { display: block; }
  .main-nav .menu-item-has-children > a { cursor: pointer; }
  .head-search { width: 100%; }
  .head-search input { width: 100%; max-width: none; }
  .site-header .wrap { position: relative; }
  .site-title { max-width: 160px; }
}

@media (max-width: 860px) {
  .hero-grid, .single-grid, .foot-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .content { padding: 20px; }
}

/* ========== Advanced / Hub styles ========== */
.hero-4d { position: relative; overflow: hidden; isolation: isolate; }
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.hero-orb-1 {
  width: 400px; height: 400px;
  background: #3b82f6;
  top: -120px; right: -80px;
  animation: orb-float 14s ease-in-out infinite;
}
.hero-orb-2 {
  width: 260px; height: 260px;
  background: #f59e0b;
  bottom: -80px; left: 10%;
  animation: orb-float 16s ease-in-out infinite reverse;
}
@keyframes orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, 16px) scale(1.06); }
}
.hero-4d .wrap { position: relative; z-index: 1; }
.glass {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}
.stat-card {
  padding: 8px;
  border-radius: 12px;
  transition: transform 0.25s;
}
.stat-card:hover { transform: translateY(-3px); }

.class-hub .class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 8px;
}
.class-tile {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--navy), var(--navy2) 60%, var(--navy3));
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s, box-shadow 0.25s;
}
.class-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.class-tile-glow {
  position: absolute;
  inset: -40% auto auto -20%;
  width: 120%;
  height: 80%;
  background: radial-gradient(circle, rgba(232, 185, 35, 0.2), transparent 65%);
  pointer-events: none;
}
.class-tile strong {
  font-size: 1.05rem;
  position: relative;
  z-index: 1;
  font-weight: 700;
}
.class-tile small {
  opacity: 0.8;
  font-size: 0.8rem;
  position: relative;
  z-index: 1;
}
.class-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}
.class-subs em {
  font-style: normal;
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.see-all {
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  font-size: 0.9rem;
}
.see-all:hover { text-decoration: underline; }
.class-section { scroll-margin-top: 80px; }

.glass-tile {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.glass-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.type.glass-tile { border-left-width: 4px; }

/* ========== Learning Hub ========== */
.hub-hero {
  background: linear-gradient(160deg, #0a1628 0%, #0f1c33 40%, #0c1525 100%);
  color: #fff;
  padding: 48px 0 56px;
  position: relative;
  overflow: hidden;
}
.hub-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.5;
  pointer-events: none;
}
.hub-hero .wrap { position: relative; z-index: 1; }
.hub-crumb {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5eead4;
  margin: 0 0 12px;
  font-weight: 600;
}
.hub-crumb a { color: #5eead4; text-decoration: none; }
.hub-title {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.hub-sub {
  color: #94a3b8;
  margin: 0;
  font-size: 1.05rem;
}
.hub-main {
  padding: 36px 0 96px;
  background: var(--bg);
  min-height: 50vh;
}
.hub-intro {
  color: #475569;
  max-width: 720px;
  line-height: 1.7;
  margin: 0 0 24px;
}
.hub-progress {
  background: #eef2ff;
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.hub-progress strong {
  display: block;
  color: #312e81;
  font-size: 1rem;
}
.hub-progress p {
  margin: 4px 0 10px;
  color: #64748b;
  font-size: 0.875rem;
}
.hub-progress-bar {
  height: 6px;
  background: #c7d2fe;
  border-radius: 999px;
  overflow: hidden;
}
.hub-progress-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 999px;
  transition: width 0.35s;
}
.hub-search { margin-bottom: 16px; }
.hub-search input {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.hub-search input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.hub-filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.hub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hub-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: #334155;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.hub-pill:hover {
  border-color: #a5b4fc;
  color: #4338ca;
}
.hub-pill.is-on {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.hub-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}
.hub-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.hub-card.is-done {
  opacity: 0.72;
  outline: 2px solid #22c55e;
}

/* ========== Landing Page (Homepage) ========== */
.lp-hero {
  position: relative;
  background: linear-gradient(155deg, #0a1628 0%, #0f1c33 45%, #0c1525 100%);
  color: #fff;
  padding: 72px 0 80px;
  overflow: hidden;
}
.lp-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(13, 148, 136, 0.18), transparent),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(232, 185, 35, 0.1), transparent);
  pointer-events: none;
}
.lp-hero-inner {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}
.lp-kicker {
  display: inline-block;
  background: rgba(232, 185, 35, 0.15);
  color: var(--accent);
  border: 1px solid rgba(232, 185, 35, 0.3);
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 16px;
}
.lp-hero h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  margin: 0 0 14px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.lp-lead {
  font-size: 1.15rem;
  color: #94a3b8;
  margin: 0 0 28px;
  line-height: 1.6;
  max-width: 480px;
}
.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  letter-spacing: -0.01em;
}
.lp-btn-primary {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 4px 14px rgba(232, 185, 35, 0.3);
}
.lp-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(232, 185, 35, 0.4);
  color: var(--navy);
}
.lp-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
}
.lp-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.lp-btn-light {
  background: #fff;
  color: var(--navy);
}
.lp-btn-light:hover {
  background: #f1f5f9;
  color: var(--navy);
  transform: translateY(-1px);
}
.lp-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.lp-checks li {
  font-size: 0.9rem;
  color: #cbd5e1;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-checks li::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--teal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E");
  background-size: 12px;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.lp-hero-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lp-panel-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(8px);
}
.lp-panel-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #5eead4;
  font-weight: 600;
  margin-bottom: 8px;
}
.lp-panel-card strong {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.lp-panel-card p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}
.lp-panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.lp-panel-stats > div {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
}
.lp-panel-stats b {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.lp-panel-stats span {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Section headers */
.lp-sec-head {
  text-align: center;
  margin-bottom: 36px;
}
.lp-sec-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  text-align: left;
  gap: 16px;
  flex-wrap: wrap;
}
.lp-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--teal);
  font-weight: 700;
  margin: 0 0 6px;
}
.lp-sec-head h2 {
  font-size: 1.85rem;
  margin: 0 0 8px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.lp-sec-head p {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.lp-sec-head-row p { margin-left: 0; margin-right: 0; }
.lp-link {
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}
.lp-link:hover { text-decoration: underline; }

/* Class picker */
.lp-classes {
  padding: 72px 0;
  background: #fff;
}
.lp-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.lp-class {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 22px 12px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  min-height: 120px;
}
.lp-class:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.22);
  border-color: rgba(45, 212, 191, 0.4);
  color: #fff;
}
.lp-class-num {
  font-size: 1.7rem;
  font-weight: 800;
  color: #2dd4bf;
  line-height: 1;
  letter-spacing: -0.02em;
}
.lp-class-name {
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  opacity: 0.9;
  line-height: 1.3;
}
.lp-class-count {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Features */
.lp-features {
  padding: 72px 0;
  background: var(--bg);
}
.lp-feat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.lp-feat {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s, box-shadow 0.22s;
}
.lp-feat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.lp-feat-icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
  line-height: 1;
}
.lp-feat h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lp-feat p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Featured & Types */
.lp-featured {
  padding: 72px 0;
  background: #fff;
}
.lp-types {
  padding: 64px 0;
  background: var(--bg);
}
.lp-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.lp-type {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.2s, transform 0.2s;
}
.lp-type:nth-child(3n+2) { border-left-color: #d97706; }
.lp-type:nth-child(3n) { border-left-color: #7c3aed; }
.lp-type:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--ink);
}
.lp-type strong { font-size: 0.95rem; font-weight: 700; }
.lp-type span { font-size: 0.8rem; color: var(--muted); }

/* CTA Band */
.lp-cta-band {
  padding: 52px 0;
  background: linear-gradient(120deg, #0f766e 0%, #0d9488 40%, #134e4a 100%);
}
.lp-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  color: #fff;
}
.lp-cta-inner h2 {
  margin: 0 0 6px;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lp-cta-inner p {
  margin: 0;
  opacity: 0.9;
  font-size: 0.95rem;
}

/* FAQ */
.lp-faq {
  padding: 64px 0 80px;
  background: #fff;
}
.lp-acc {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 10px;
  transition: border-color var(--transition);
}
.lp-acc:hover { border-color: #cbd5e1; }
.lp-acc summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  font-size: 0.95rem;
}
.lp-acc summary::-webkit-details-marker { display: none; }
.lp-acc p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ========== Landing responsive ========== */
@media (max-width: 960px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .lp-class-grid { grid-template-columns: repeat(3, 1fr); }
  .lp-feat-grid { grid-template-columns: 1fr 1fr; }
  .lp-hero { padding: 56px 0 64px; }
}
@media (max-width: 560px) {
  .lp-class-grid { grid-template-columns: repeat(2, 1fr); }
  .lp-feat-grid { grid-template-columns: 1fr; }
  .lp-hero { padding: 48px 0 56px; }
  .lp-panel-stats { grid-template-columns: 1fr; }
  .lp-cta-row { flex-direction: column; }
  .lp-btn { width: 100%; }
  .wrap { padding: 0 16px; }
}

/* ========== Hub Cards — 4D motion design ========== */
.hub-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  perspective: 800px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s;
  position: relative;
}
.hub-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s;
}
.hub-card:hover {
  transform: translateY(-8px) rotateX(4deg) scale(1.02);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(13, 148, 136, 0.15);
}
.hub-card:hover::after { opacity: 1; }
.hub-card.is-done {
  opacity: 0.75;
  outline: 2px solid #22c55e;
  outline-offset: -2px;
}
.hub-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 140px;
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f766e 140%);
  text-decoration: none;
  overflow: hidden;
}
.hub-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hub-letter {
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.2);
  letter-spacing: -0.04em;
  user-select: none;
}
.hub-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 6px;
  font-style: normal;
  letter-spacing: 0.02em;
}
.hub-card-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
}
.hub-card-body h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.hub-card-body h3 a {
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}
.hub-card-body h3 a:hover { color: var(--teal); }
.hub-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}
.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}
.hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  background: var(--teal);
  color: #fff;
  border: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.hub-btn:hover {
  background: var(--teal-dark);
  color: #fff;
  transform: scale(1.05);
}
.hub-btn.alt {
  background: #1e293b;
}
.hub-btn.alt:hover { background: #0f172a; color: #fff; }
.hub-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hub-done:hover {
  background: #e2e8f0;
  color: #0f172a;
}
.hub-card.is-done .hub-done {
  background: #dcfce7;
  color: #166534;
  border-color: #86efac;
}

/* Class switcher bar (bottom) */
.hub-classbar {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 0;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
}
.hub-classbar-inner {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 16px;
  max-width: 1140px;
  margin: 0 auto;
  scrollbar-width: none;
}
.hub-classbar-inner::-webkit-scrollbar { display: none; }
.hub-class {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  min-width: 56px;
}
.hub-class:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}
.hub-class.is-on {
  background: var(--accent);
  color: var(--navy);
  border-color: var(--accent);
  font-weight: 700;
}
.hub-class-num {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
}
.hub-class-lab {
  font-size: 0.62rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0.85;
}

/* Single page download buttons */
.lhp-btn {
  display: inline-flex;
  align-items: center;
  padding: 11px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  background: var(--teal);
  color: #fff;
  transition: background 0.2s, transform 0.15s;
}
.lhp-btn:hover {
  background: var(--teal-dark);
  color: #fff;
  transform: translateY(-1px);
}
.lhp-btn.alt {
  background: #1e293b;
}
.lhp-btn.alt:hover { background: #0f172a; color: #fff; }
.lhp-soon {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

/* 4D motion extras */
@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.lp-class {
  transform-style: preserve-3d;
}
.lp-class:hover {
  transform: translateY(-6px) rotateX(6deg) scale(1.03);
}
.lp-feat {
  transform-style: preserve-3d;
}
.lp-feat:hover {
  transform: translateY(-5px) rotateX(3deg);
}
.hub-pill {
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.hub-pill:hover { transform: translateY(-1px); }
.hub-pill.is-on {
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Search input polish */
.hub-search input {
  font-size: 0.95rem;
}
.hub-search input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18), 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* Pagination polish */
.pagination .page-numbers {
  padding: 8px 14px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--ink);
  transition: background 0.2s;
}
.pagination .page-numbers:hover { background: var(--bg-alt); }
.pagination .current {
  background: var(--navy) !important;
  color: #fff !important;
  border-color: var(--navy) !important;
}

/* ========== 3D Book Single Page ========== */
.book-hero {
  background: linear-gradient(160deg, #0a1628 0%, #12233f 50%, #0c1a2e 100%);
  padding: 56px 0 64px;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.book-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 60% at 20% 50%, rgba(13, 148, 136, 0.15), transparent),
    radial-gradient(ellipse 40% 50% at 80% 30%, rgba(232, 185, 35, 0.08), transparent);
  pointer-events: none;
}
.book-hero-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* 3D Book object */
.book-3d {
  perspective: 1200px;
  display: flex;
  justify-content: center;
}
.book-3d-inner {
  position: relative;
  width: 200px;
  height: 280px;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(4deg);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  animation: book-float 5s ease-in-out infinite;
}
.book-3d:hover .book-3d-inner {
  transform: rotateY(-8deg) rotateX(2deg) scale(1.04);
  animation-play-state: paused;
}
@keyframes book-float {
  0%, 100% { transform: rotateY(-18deg) rotateX(4deg) translateY(0); }
  50% { transform: rotateY(-18deg) rotateX(4deg) translateY(-10px); }
}
.book-spine {
  position: absolute;
  left: -18px;
  top: 0;
  width: 18px;
  height: 100%;
  background: linear-gradient(180deg, #0f766e, #134e4a);
  transform: rotateY(-90deg) translateZ(0);
  transform-origin: right center;
  border-radius: 3px 0 0 3px;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.3);
}
.book-front {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #1e293b 0%, #0f172a 60%, #134e4a 130%);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  box-shadow:
    8px 12px 32px rgba(0, 0, 0, 0.45),
    2px 0 0 rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.book-cover-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px 16px;
  height: 100%;
  gap: 8px;
}
.book-cover-letter {
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  letter-spacing: -0.04em;
}
.book-cover-type {
  font-size: 0.7rem;
  font-weight: 600;
  color: #5eead4;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.book-cover-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.35;
  max-width: 140px;
}
.book-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--accent);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 5px;
  font-style: normal;
}
.book-pages {
  position: absolute;
  right: -6px;
  top: 3px;
  bottom: 3px;
  width: 6px;
  background: repeating-linear-gradient(
    to bottom,
    #f8fafc 0px,
    #f8fafc 2px,
    #e2e8f0 2px,
    #e2e8f0 3px
  );
  border-radius: 0 2px 2px 0;
  box-shadow: 2px 0 4px rgba(0,0,0,0.15);
}

/* Book info */
.book-crumbs {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 12px;
}
.book-crumbs a {
  color: #5eead4;
  text-decoration: none;
}
.book-crumbs a:hover { text-decoration: underline; }
.book-crumbs span { margin: 0 6px; opacity: 0.5; }
.book-type-pill {
  display: inline-block;
  background: rgba(94, 234, 212, 0.12);
  color: #5eead4;
  border: 1px solid rgba(94, 234, 212, 0.25);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.book-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 10px;
  line-height: 1.2;
  color: #fff;
}
.book-meta {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0 0 24px;
  font-weight: 500;
}
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.book-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  letter-spacing: -0.01em;
}
.book-btn-icon { font-size: 1.1rem; }
.book-btn-primary {
  background: var(--accent);
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(232, 185, 35, 0.35);
}
.book-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 185, 35, 0.45);
  color: var(--navy);
}
.book-btn-dark {
  background: #1e293b;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.book-btn-dark:hover {
  background: #334155;
  color: #fff;
  transform: translateY(-2px);
}
.book-btn-ghost {
  background: transparent;
  color: #cbd5e1;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}
.book-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.book-soon {
  display: inline-block;
  background: rgba(251, 191, 36, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
}
.book-hint {
  color: #64748b;
  font-size: 0.82rem;
  margin: 0;
}

/* PDF Reader frame */
.book-reader {
  padding: 40px 0 56px;
  background: #e8ecf4;
}
.book-reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.book-reader-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.book-reader-open {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}
.book-reader-open:hover { text-decoration: underline; }
/* old iframe frame removed — open-book reader used instead */

/* Content section */
.book-content-section {
  padding: 48px 0;
  background: #fff;
}
.book-content {
  background: #fff;
  font-size: 1rem;
  line-height: 1.75;
}
.book-content img { border-radius: 8px; margin: 16px 0; }

/* Related */
.book-related {
  padding: 48px 0 72px;
  background: var(--bg);
}
.book-related-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}

/* Responsive book page */
@media (max-width: 860px) {
  .book-hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .book-3d { margin: 0 auto; }
  .book-actions { justify-content: center; }
  .book-crumbs { text-align: center; }
  .book-reader-frame {
    min-height: 400px;
    aspect-ratio: 3 / 4;
  }
}
@media (max-width: 560px) {
  .book-3d-inner {
    width: 160px;
    height: 224px;
  }
  .book-hero { padding: 40px 0 48px; }
  .book-btn { width: 100%; justify-content: center; }
  .book-actions { flex-direction: column; }
}

/* Make hub covers more book-like */
.hub-cover {
  background: linear-gradient(155deg, #0f172a 0%, #1e293b 45%, #0f766e 160%);
  box-shadow: inset 0 -20px 40px rgba(0,0,0,0.15);
}
.hub-cover::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
  border-radius: 0;
  z-index: 1;
}

/* ========== Open-Book PDF Reader (3D spread) ========== */
.book-reader {
  padding: 48px 0 64px;
  background: linear-gradient(180deg, #d4d9e4 0%, #c5cbd8 40%, #b8bfce 100%);
  position: relative;
}
.book-reader-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.book-reader-head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
.book-reader-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.br-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #94a3b8;
  background: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  color: #0f172a;
  line-height: 1;
  transition: background 0.15s;
}
.br-btn:hover { background: #e2e8f0; }
.br-page {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  min-width: 70px;
  text-align: center;
}
.book-reader-open {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: #0f172a;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.book-reader-open:hover { background: #1e293b; color: #fff; }

.open-book {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  user-select: none;
}
.open-book-stage {
  position: relative;
  flex: 1;
  max-width: 960px;
  perspective: 1600px;
}
.open-book-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18px;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.35), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}
.open-book-spread {
  display: flex;
  align-items: stretch;
  justify-content: center;
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  background: #1a1a1a;
  border-radius: 4px 12px 12px 4px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  min-height: 420px;
}
.open-book-spread.is-flipping {
  transform: scale(0.985);
  opacity: 0.92;
}
.open-page {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf9f6;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}
.open-page-left {
  border-radius: 2px 0 0 2px;
  box-shadow: inset -8px 0 16px -8px rgba(0, 0, 0, 0.12);
}
.open-page-right {
  border-radius: 0 8px 8px 0;
  box-shadow: inset 8px 0 16px -8px rgba(0, 0, 0, 0.12);
}
.open-book-gutter {
  width: 16px;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    #d4d0c8 0%,
    #ebe7df 20%,
    #f5f2eb 50%,
    #ebe7df 80%,
    #d4d0c8 100%
  );
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, 0.08),
    -1px 0 0 rgba(0, 0, 0, 0.06),
    1px 0 0 rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}
.open-book-gutter::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(0, 0, 0, 0.08);
}
.open-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}
.open-book.is-single .open-page-right,
.open-book.is-single .open-book-gutter {
  display: none;
}
.open-book.is-single .open-page-left {
  border-radius: 8px;
  box-shadow: none;
}
.open-book.is-single .open-book-spread {
  border-radius: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.br-nav {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: #0f172a;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.3);
  transition: transform 0.15s, background 0.15s, opacity 0.15s;
  line-height: 1;
}
.br-nav:hover:not(:disabled) {
  background: #1e293b;
  transform: scale(1.08);
}
.br-nav:disabled {
  opacity: 0.3;
  cursor: default;
}
.br-hint {
  text-align: center;
  color: #64748b;
  font-size: 0.8rem;
  margin: 18px 0 0;
  font-weight: 500;
}
.br-error {
  padding: 48px 24px;
  text-align: center;
  color: #334155;
  font-weight: 600;
  background: #faf9f6;
}
.br-error a { color: var(--teal); }

@media (max-width: 700px) {
  .br-nav {
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
  }
  .open-page { min-height: 320px; }
  .open-book-spread { min-height: 320px; }
  .book-reader { padding: 32px 0 48px; }
}

/* Real3D / DearFlip container */
.flipbook-wrap {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  min-height: 480px;
}
.flipbook-wrap .real3dflipbook,
.flipbook-wrap .dflip,
.flipbook-wrap iframe {
  width: 100% !important;
  min-height: 520px;
}
.flipbook-missing {
  background: #fff7ed;
  border: 1px solid #fdba74;
  color: #9a3412;
  padding: 20px 24px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.6;
}
.flipbook-missing code {
  background: #ffedd5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}


/* ========== App shell polish ========== */
html { -webkit-tap-highlight-color: transparent; }
body.lht-app,
body.post-type-archive-lecture_sheet,
body.tax-lhp_class,
body.tax-lhp_type,
body.tax-lhp_subject,
body.tax-lhp_chapter,
body.single-lecture_sheet {
  background: #0b1220 !important;
  min-height: 100dvh;
}
body.post-type-archive-lecture_sheet .hub-main,
body.tax-lhp_class .hub-main,
body.tax-lhp_type .hub-main,
body.tax-lhp_subject .hub-main,
body.tax-lhp_chapter .hub-main {
  background: linear-gradient(180deg, #f1f5f9 0%, #e8eef7 100%);
  border-radius: 24px 24px 0 0;
  margin-top: -18px;
  position: relative;
  z-index: 2;
  padding-bottom: 100px;
  min-height: 60vh;
  box-shadow: 0 -12px 40px rgba(0,0,0,.25);
}
.hub-hero {
  padding: 28px 0 40px !important;
  background: linear-gradient(160deg, #0a1628 0%, #12233f 50%, #0c1a30 100%) !important;
}
.hub-hero::before {
  opacity: .5;
}
.hub-title {
  font-size: clamp(1.75rem, 4vw, 2.4rem) !important;
  letter-spacing: -0.03em;
}
.hub-sub { color: #94a3b8 !important; }

/* Sticky app toolbar (search + filters) */
.hub-main .wrap > .hub-search,
.hub-main .wrap > .hub-filters {
  position: sticky;
  z-index: 30;
}
.hub-main .wrap > .hub-search {
  top: 60px;
  background: linear-gradient(180deg, #f1f5f9 70%, transparent);
  padding: 12px 0 8px;
  margin-bottom: 0;
}
.hub-main .wrap > .hub-filters {
  top: 118px;
  background: rgba(241,245,249,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 0 12px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(15,23,42,.06);
}
.hub-search input {
  border-radius: 14px !important;
  padding: 14px 18px 14px 44px !important;
  font-size: 0.95rem !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M14 14l3 3'/%3E%3C/svg%3E") 16px 50% no-repeat !important;
  border: 1px solid rgba(15,23,42,.08) !important;
  box-shadow: 0 4px 16px rgba(15,23,42,.06) !important;
}
.hub-pill {
  padding: 8px 16px !important;
  font-size: 0.8rem !important;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.hub-pill.is-on {
  background: linear-gradient(135deg, #4f46e5, #6366f1) !important;
  box-shadow: 0 6px 16px -4px rgba(79,70,229,.45);
}

/* App-style book cards */
.hub-grid {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
  gap: 14px !important;
}
.hub-card {
  border-radius: 18px !important;
  border: 0 !important;
  box-shadow: 0 8px 28px -10px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.04) !important;
  overflow: hidden;
  background: #fff !important;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s !important;
}
.hub-card:hover {
  transform: translateY(-6px) scale(1.01) !important;
  box-shadow: 0 20px 40px -12px rgba(15,23,42,.28), 0 0 0 1px rgba(99,102,241,.15) !important;
}
.hub-cover {
  aspect-ratio: 3/4;
  display: block;
  position: relative;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  overflow: hidden;
}
.hub-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hub-letter {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
  color: rgba(255,255,255,.35);
  letter-spacing: -0.04em;
}
.hub-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(15,23,42,.75);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  backdrop-filter: blur(6px);
  font-style: normal;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.hub-card-body {
  padding: 12px 12px 14px !important;
}
.hub-card-body h3 {
  font-size: 0.92rem !important;
  line-height: 1.3 !important;
  margin: 0 0 4px !important;
}
.hub-meta {
  font-size: 0.75rem !important;
  color: #64748b !important;
}
.hub-actions {
  gap: 6px !important;
}
.hub-btn, .hub-done {
  border-radius: 10px !important;
  min-height: 34px;
}

/* Bottom class switcher = real app tab bar */
.hub-classbar {
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100 !important;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)) !important;
  background: rgba(10, 22, 40, 0.92) !important;
  backdrop-filter: saturate(1.4) blur(20px) !important;
  -webkit-backdrop-filter: saturate(1.4) blur(20px) !important;
  border-top: 1px solid rgba(255,255,255,.1) !important;
  box-shadow: 0 -12px 40px rgba(0,0,0,.35) !important;
}
.hub-class {
  min-width: 52px !important;
  padding: 8px 12px !important;
  border-radius: 14px !important;
}
.hub-class.is-on {
  background: linear-gradient(135deg, #ffe566, #e8b923) !important;
  color: #0a1628 !important;
  box-shadow: 0 6px 18px -4px rgba(232,185,35,.55);
}
.hub-class-num { font-size: 1.05rem !important; }
.hub-class-lab { font-size: 0.58rem !important; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }

/* Progress as app banner */
.hub-progress {
  border-radius: 16px !important;
  border: 1px solid rgba(99,102,241,.15);
  box-shadow: 0 4px 16px rgba(99,102,241,.08);
}

/* Site header on LH pages feels like app nav */
body.post-type-archive-lecture_sheet .site-header,
body.tax-lhp_class .site-header,
body.single-lecture_sheet .site-header {
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  background: rgba(10, 22, 40, 0.88) !important;
}

/* Empty state */
.empty {
  text-align: center;
  padding: 48px 20px;
  background: #fff;
  border-radius: 18px;
  color: #64748b;
  box-shadow: 0 4px 20px rgba(15,23,42,.06);
}

@media (max-width: 640px) {
  .hub-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .hub-main .wrap > .hub-search { top: 56px; }
  .hub-main .wrap > .hub-filters { top: 112px; }
  body.post-type-archive-lecture_sheet .hub-main,
  body.tax-lhp_class .hub-main {
    border-radius: 20px 20px 0 0;
    margin-top: -12px;
  }
}

.hub-app-badge{
  display:inline-flex;align-items:center;gap:6px;
  background:rgba(232,185,35,.15);color:#e8b923;
  border:1px solid rgba(232,185,35,.35);
  border-radius:999px;padding:6px 14px;
  font-size:.75rem;font-weight:700;letter-spacing:.04em;
  text-transform:uppercase;margin-bottom:12px;
}
