/* ============================================
   AKTU Quantum — Colorful SaaS UI
   Site: aktu-qunatum.tech
   ============================================ */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  /* Colorful SaaS palette */
  --bg: #f8f7ff;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #fff;
  --surface: #f1efff;
  --border: rgba(99, 102, 241, 0.12);
  --border-strong: rgba(99, 102, 241, 0.35);
  --text: #0f172a;
  --text-muted: #5b6478;
  --text-dim: #94a3b8;

  --primary: #7c3aed;
  --primary-2: #2563eb;
  --primary-light: #8b5cf6;
  --primary-glow: rgba(124, 58, 237, 0.28);
  --accent: #06b6d4;
  --accent-2: #ec4899;
  --accent-3: #f59e0b;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --orange: #f97316;

  --grad-brand: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #06b6d4 100%);
  --grad-pink: linear-gradient(135deg, #ec4899, #f472b6);
  --grad-mint: linear-gradient(135deg, #10b981, #34d399);
  --grad-sun: linear-gradient(135deg, #f59e0b, #fbbf24);
  --grad-sky: linear-gradient(135deg, #0ea5e9, #22d3ee);
  --grad-hero: linear-gradient(160deg, #fdf4ff 0%, #eef2ff 40%, #ecfeff 100%);
  --grad-mesh:
    radial-gradient(at 15% 20%, rgba(236, 72, 153, 0.22) 0, transparent 45%),
    radial-gradient(at 85% 10%, rgba(124, 58, 237, 0.25) 0, transparent 45%),
    radial-gradient(at 70% 80%, rgba(6, 182, 212, 0.2) 0, transparent 45%),
    radial-gradient(at 20% 85%, rgba(245, 158, 11, 0.15) 0, transparent 40%);

  --header-h: 7.2rem;
  --radius: 1.6rem;
  --radius-sm: 1.1rem;
  --radius-lg: 2.4rem;
  --shadow: 0 12px 40px rgba(79, 70, 229, 0.1);
  --shadow-lg: 0 24px 60px rgba(79, 70, 229, 0.14);
  --shadow-glow: 0 16px 50px var(--primary-glow);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
body.dark-mode {
  --bg: #0b1020;
  --bg-elevated: #12182b;
  --bg-card: #161d32;
  --bg-card-hover: #1c2540;
  --surface: #1a2238;
  --border: rgba(148, 163, 184, 0.12);
  --border-strong: rgba(167, 139, 250, 0.4);
  --text: #f1f5f9;
  --text-muted: #a3b0c2;
  --text-dim: #64748b;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.45);
  --grad-hero: linear-gradient(160deg, #15102a 0%, #0f172a 45%, #0c1a24 100%);
  --grad-mesh:
    radial-gradient(at 15% 20%, rgba(236, 72, 153, 0.14) 0, transparent 45%),
    radial-gradient(at 85% 10%, rgba(124, 58, 237, 0.2) 0, transparent 45%),
    radial-gradient(at 70% 80%, rgba(6, 182, 212, 0.12) 0, transparent 45%),
    radial-gradient(at 20% 85%, rgba(245, 158, 11, 0.1) 0, transparent 40%);
}

* {
  font-family: var(--font);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  outline: none;
  border: none;
  transition: background var(--transition), color var(--transition),
    border-color var(--transition), transform var(--transition),
    box-shadow var(--transition);
}

html {
  font-size: 62.5%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: var(--grad-mesh);
}

section {
  padding: 4rem 9%;
}

/* ---------- Custom SVG icons ---------- */
.qi {
  width: 1em;
  height: 1em;
  display: inline-block;
  line-height: 1;
  vertical-align: -0.15em;
  flex-shrink: 0;
  overflow: visible;
  pointer-events: none;
}

.qi-inline {
  width: 1.35em;
  height: 1.35em;
  margin-right: 0.35em;
  display: block;
}

.qi-logo-inline {
  width: 2.6rem;
  height: 2.6rem;
}

.icon-wrap .qi,
.icon-orb .qi,
.stat-icon .qi,
.feature-icon .qi,
.logo-mark .qi,
.mini-icon .qi,
.fi .qi,
.ri .qi {
  width: 70%;
  height: 70%;
  display: block;
}

.icon-wrap i,
.icon-orb i,
.stat-icon i,
.feature-icon i,
.mini-icon i,
.fi i,
.ri i {
  /* FA fallback until icons.js swaps */
  font-size: inherit;
  line-height: 1;
  display: block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1rem;
  margin-right: 0.8rem;
  padding: 1.15rem 2.6rem;
  background: var(--grad-brand);
  color: #fff !important;
  cursor: pointer;
  border-radius: 999px;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 28px var(--primary-glow);
  border: 1px solid transparent;
  text-transform: none;
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 36px var(--primary-glow);
  color: #fff !important;
  filter: brightness(1.05);
}

.btn-outline {
  background: #fff;
  border: 1.5px solid rgba(124, 58, 237, 0.25);
  color: var(--primary) !important;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.08);
}

body.dark-mode .btn-outline {
  background: var(--surface);
  color: #c4b5fd !important;
}

.btn-outline:hover {
  background: #f5f3ff;
  border-color: var(--primary);
  color: var(--primary) !important;
}

.btn-accent {
  background: var(--grad-pink);
  box-shadow: 0 10px 28px rgba(236, 72, 153, 0.3);
}

.btn-mint {
  background: var(--grad-mint);
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.28);
}

.btn-sun {
  background: var(--grad-sun);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.28);
}

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9%;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.06);
}

body.dark-mode .header,
.header.dark-mode {
  background: rgba(11, 16, 32, 0.88);
}

.header .logo {
  font-size: 2.15rem;
  font-weight: 800;
  font-family: var(--display);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  letter-spacing: -0.03em;
  margin-right: auto;
  text-transform: none;
}

.header .logo span {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header .logo i {
  font-size: 2.4rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header .navbar ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.header .navbar ul li {
  position: relative;
}

.header .navbar ul li:hover > ul {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header .navbar ul li a {
  padding: 1rem 1.5rem;
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 999px;
  text-transform: none;
}

.header .navbar ul li a:hover {
  color: var(--primary);
  background: linear-gradient(135deg, #f5f3ff, #ecfeff);
}

body.dark-mode .header .navbar ul li a:hover {
  background: var(--surface);
  color: #c4b5fd;
}

.header .navbar ul li ul {
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 22rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: block;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  padding: 0.7rem;
  margin-top: 0.5rem;
}

.header .navbar ul li ul li {
  width: 100%;
}

.header .navbar ul li ul li a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 1.4rem;
  border-radius: 0.9rem;
  color: var(--text-muted);
}

.header .navbar ul li ul li a:hover {
  background: linear-gradient(135deg, #f5f3ff, #fdf2f8);
  color: var(--text);
}

#menu-btn {
  cursor: pointer;
  color: var(--text);
  font-size: 2.4rem;
  display: none;
  padding: 0.6rem;
  order: 2;
}

.header .navbar {
  order: 1;
}

.dark-mode-toggle {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.8rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  flex-shrink: 0;
  order: 3;
  background: linear-gradient(135deg, #fdf4ff, #e0f2fe);
}

body.dark-mode .dark-mode-toggle {
  background: var(--surface);
}

.dark-mode-toggle:hover {
  color: var(--warning);
  transform: rotate(12deg);
}

/* =========================================================
   HERO — full-page SaaS landing component
   ========================================================= */
.hero-page {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  padding: 3.5rem 9% 5rem;
  background: var(--grad-hero);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.hero-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-mesh);
  pointer-events: none;
}

.hero-page > * {
  position: relative;
  z-index: 1;
}

/* floating blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
  animation: floaty 10s ease-in-out infinite;
}

.hero-blob.b1 {
  width: 28rem;
  height: 28rem;
  background: #f9a8d4;
  top: 8%;
  left: -4%;
}

.hero-blob.b2 {
  width: 34rem;
  height: 34rem;
  background: #a5b4fc;
  top: 5%;
  right: -6%;
  animation-delay: -3s;
}

.hero-blob.b3 {
  width: 22rem;
  height: 22rem;
  background: #67e8f9;
  bottom: 12%;
  left: 30%;
  animation-delay: -6s;
}

@keyframes floaty {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.05); }
}

/* top strip */
.hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1.4rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 999px;
  font-size: 1.35rem;
  font-weight: 600;
  color: #be185d;
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.12);
  text-transform: none;
}

body.dark-mode .hero-pill {
  background: rgba(22, 29, 50, 0.9);
  color: #f9a8d4;
}

.hero-pill .dot {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  animation: pulse 1.8s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25); }
  50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.08); }
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.35rem;
  color: var(--text-muted);
  text-transform: none;
}

.hero-avatars {
  display: flex;
}

.hero-avatars span {
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -0.8rem;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
}

.hero-avatars span:first-child { margin-left: 0; background: var(--grad-brand); }
.hero-avatars span:nth-child(2) { background: var(--grad-pink); }
.hero-avatars span:nth-child(3) { background: var(--grad-mint); }
.hero-avatars span:nth-child(4) { background: var(--grad-sun); }

/* main grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 4rem;
  align-items: start;
}

.hero-copy,
.hero-visual {
  align-self: start;
}

.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(3.4rem, 5vw, 5.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--text);
  text-transform: none;
  margin-bottom: 1.8rem;
}

.hero-copy h1 .grad {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-copy h1 .underline {
  position: relative;
  white-space: nowrap;
}

.hero-copy h1 .underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.1em;
  height: 0.28em;
  background: linear-gradient(90deg, #f9a8d4, #a5b4fc, #67e8f9);
  border-radius: 999px;
  z-index: -1;
  opacity: 0.7;
}

.hero-copy .lead {
  font-size: 1.75rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 52rem;
  text-transform: none;
  margin-bottom: 2.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.8rem;
}

.hero-cta .btn {
  margin: 0;
  padding: 1.35rem 2.8rem;
  font-size: 1.55rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-meta-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-transform: none;
}

.hero-meta-item .mini-icon {
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 2.2rem;
}

body.dark-mode .hero-meta-item .mini-icon {
  background: var(--bg-card);
}

.hero-meta-item strong {
  display: block;
  font-size: 1.45rem;
  color: var(--text);
  font-weight: 700;
}

.hero-meta-item span {
  font-size: 1.25rem;
  color: var(--text-dim);
}

/* Right side — product mock / content cards */
.hero-visual {
  position: relative;
  min-height: auto;
}

.hero-panel {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  overflow: hidden;
}

body.dark-mode .hero-panel {
  background: rgba(22, 29, 50, 0.9);
  border-color: var(--border);
}

.hero-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.6rem;
  gap: 1rem;
}

.hero-panel-head .window-dots {
  display: flex;
  gap: 0.5rem;
}

.hero-panel-head .window-dots i {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  display: block;
}

.hero-panel-head .window-dots i:nth-child(1) { background: #f87171; }
.hero-panel-head .window-dots i:nth-child(2) { background: #fbbf24; }
.hero-panel-head .window-dots i:nth-child(3) { background: #34d399; }

.hero-panel-head .tag {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  background: #f5f3ff;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  text-transform: none;
}

body.dark-mode .hero-panel-head .tag {
  background: var(--surface);
  color: #c4b5fd;
}

.hero-resource {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem 1.3rem;
  border-radius: 1.2rem;
  margin-bottom: 0.9rem;
  background: linear-gradient(135deg, #faf5ff, #eff6ff);
  border: 1px solid rgba(124, 58, 237, 0.08);
  text-transform: none;
}

.hero-resource:nth-child(2) {
  background: linear-gradient(135deg, #fdf2f8, #fff7ed);
}

.hero-resource:nth-child(3) {
  background: linear-gradient(135deg, #ecfdf5, #ecfeff);
}

.hero-resource:nth-child(4) {
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
}

body.dark-mode .hero-resource {
  background: var(--surface) !important;
  border-color: var(--border);
}

.hero-resource .ri {
  width: 4.6rem;
  height: 4.6rem;
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

body.dark-mode .hero-resource .ri {
  background: var(--bg-card);
}

.hero-resource .ri .qi {
  width: 65%;
  height: 65%;
}

.hero-resource h4 {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
}

.hero-resource p {
  font-size: 1.25rem;
  color: var(--text-dim);
  text-transform: none;
}

.hero-resource .chip {
  margin-left: auto;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  white-space: nowrap;
}

body.dark-mode .hero-resource .chip {
  background: var(--bg-card);
  color: #c4b5fd;
}

/* floating cards around panel */
.float-card {
  position: absolute;
  background: #fff;
  border-radius: 1.4rem;
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  gap: 1rem;
  text-transform: none;
  animation: floaty 7s ease-in-out infinite;
  z-index: 2;
}

body.dark-mode .float-card {
  background: var(--bg-card);
  border-color: var(--border);
}

.float-card .fi {
  width: 4rem;
  height: 4rem;
  border-radius: 1.1rem;
  display: grid;
  place-items: center;
  font-size: 2rem;
}

.float-card .fi .qi {
  width: 70%;
  height: 70%;
}

.float-card strong {
  display: block;
  font-size: 1.35rem;
  color: var(--text);
}

.float-card span {
  font-size: 1.15rem;
  color: var(--text-dim);
}

.float-card.fc1 {
  top: -1rem;
  right: -1rem;
  background: linear-gradient(135deg, #fff, #fdf2f8);
}

.float-card.fc1 .fi {
  background: #fce7f3;
}

.float-card.fc2 {
  bottom: 4rem;
  left: -2rem;
  animation-delay: -2.5s;
  background: linear-gradient(135deg, #fff, #ecfeff);
}

.float-card.fc2 .fi {
  background: #cffafe;
}

.float-card.fc3 {
  bottom: -1rem;
  right: 2rem;
  animation-delay: -4s;
  background: linear-gradient(135deg, #fff, #ecfdf5);
}

.float-card.fc3 .fi {
  background: #d1fae5;
}

/* bottom feature strip inside hero */
.hero-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.hero-feature {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow);
  text-transform: none;
  position: relative;
  overflow: hidden;
}

body.dark-mode .hero-feature {
  background: rgba(22, 29, 50, 0.85);
  border-color: var(--border);
}

.hero-feature::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.4rem;
}

.hero-feature:nth-child(1)::before { background: var(--grad-brand); }
.hero-feature:nth-child(2)::before { background: var(--grad-pink); }
.hero-feature:nth-child(3)::before { background: var(--grad-mint); }
.hero-feature:nth-child(4)::before { background: var(--grad-sun); }

.hero-feature:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 1.4rem;
  display: grid;
  place-items: center;
  margin-bottom: 1.4rem;
  font-size: 2.6rem;
}

.hero-feature:nth-child(1) .feature-icon { background: #ede9fe; }
.hero-feature:nth-child(2) .feature-icon { background: #fce7f3; }
.hero-feature:nth-child(3) .feature-icon { background: #d1fae5; }
.hero-feature:nth-child(4) .feature-icon { background: #fef3c7; }

body.dark-mode .feature-icon {
  background: var(--surface) !important;
}

.hero-feature h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  text-transform: none;
  font-family: var(--display);
}

.hero-feature p {
  font-size: 1.35rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-transform: none;
}

/* legacy .home support */
.home {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4rem;
  min-height: auto;
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.home .image,
.home .hero-icon {
  flex: 1 1 38rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home .hero-icon .icon-orb,
.about .hero-icon .icon-orb {
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fdf4ff, #e0f2fe);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  font-size: 9rem;
  position: relative;
}

body.dark-mode .home .hero-icon .icon-orb,
body.dark-mode .about .hero-icon .icon-orb {
  background: var(--bg-card);
}

.home .hero-icon .icon-orb::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, #7c3aed, #ec4899, #06b6d4, #f59e0b, #7c3aed);
  z-index: -1;
  opacity: 0.65;
  animation: spin 10s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.home .image img,
.about .image img {
  display: none;
}

.lab-hero .image img {
  display: block;
  width: min(100%, 42rem);
  height: auto;
  border-radius: 2rem;
  box-shadow: var(--shadow-lg);
}

.lab-hero .image {
  flex: 1 1 38rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home .image .icon-wrap {
  width: 18rem;
  height: 18rem;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fdf4ff, #ecfeff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-glow);
  font-size: 7rem;
}

.home .content {
  flex: 1 1 42rem;
}

.home .content .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.3rem;
  background: #fdf2f8;
  border: 1px solid rgba(236, 72, 153, 0.2);
  border-radius: 999px;
  font-size: 1.3rem;
  color: #be185d;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: none;
}

.home .content h3 {
  font-family: var(--display);
  color: var(--text);
  font-size: 4.4rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-transform: none;
  margin-bottom: 1.4rem;
}

.home .content h3 em {
  font-style: normal;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home .content p {
  font-size: 1.65rem;
  color: var(--text-muted);
  padding: 0.4rem 0 1.4rem;
  line-height: 1.7;
  text-transform: none;
  max-width: 52rem;
}

.home .content .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.home.page-title {
  min-height: auto;
  padding: 3rem 9% 2rem;
  gap: 1rem;
  background: var(--grad-hero);
}

.home.page-title .content h3 {
  font-size: 3.4rem;
  margin-bottom: 0.5rem;
}

/* ---------- Section labels ---------- */
.section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-label h1,
.section-label h2 {
  font-family: var(--display);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
}

.choice2,
.choice3 {
  padding-bottom: 0;
  padding-top: 3rem;
}

.choice2 h1,
.choice3 h1 {
  font-family: var(--display);
  font-size: 2.5rem !important;
  color: var(--text) !important;
  font-weight: 700;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.choice2 h1::before,
.choice3 h1::before {
  content: "";
  width: 0.7rem;
  height: 2.6rem;
  background: var(--grad-brand);
  border-radius: 999px;
}

/* ---------- Category cards ---------- */
.category {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 1.8rem;
}

.category .box {
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.category .box::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition);
}

.category .box:nth-child(5n + 1)::before {
  background: linear-gradient(160deg, rgba(124, 58, 237, 0.08), transparent 60%);
}
.category .box:nth-child(5n + 2)::before {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.1), transparent 60%);
}
.category .box:nth-child(5n + 3)::before {
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.1), transparent 60%);
}
.category .box:nth-child(5n + 4)::before {
  background: linear-gradient(160deg, rgba(245, 158, 11, 0.1), transparent 60%);
}
.category .box:nth-child(5n + 5)::before {
  background: linear-gradient(160deg, rgba(239, 68, 68, 0.08), transparent 60%);
}

.category .box:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.category .box:hover::before {
  opacity: 1;
}

.category .box .card-media {
  width: 100%;
  max-width: 24rem;
  aspect-ratio: 16 / 10;
  margin: 0 auto 1.8rem;
  border-radius: 1.8rem;
  overflow: hidden;
  border: 1px solid rgba(124, 58, 237, 0.12);
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.12);
  position: relative;
  z-index: 1;
}

.category .box .card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category .box:hover .card-media {
  transform: scale(1.03);
}

.category .box .icon-wrap,
.category .box > i.box-icon {
  width: 7.4rem;
  height: 7.4rem;
  margin: 0 auto 1.8rem;
  border-radius: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  position: relative;
  z-index: 1;
  border: 1px solid transparent;
}

.category .box:nth-child(5n + 1) .icon-wrap { background: linear-gradient(145deg, #ede9fe, #e0e7ff); }
.category .box:nth-child(5n + 2) .icon-wrap { background: linear-gradient(145deg, #d1fae5, #ecfeff); }
.category .box:nth-child(5n + 3) .icon-wrap { background: linear-gradient(145deg, #ede9fe, #fce7f3); }
.category .box:nth-child(5n + 4) .icon-wrap { background: linear-gradient(145deg, #fef3c7, #ffedd5); }
.category .box:nth-child(5n + 5) .icon-wrap { background: linear-gradient(145deg, #fee2e2, #fce7f3); }

body.dark-mode .category .box .icon-wrap {
  background: var(--surface) !important;
}

.category .box:hover .icon-wrap {
  transform: scale(1.1) rotate(-4deg);
}

.category .box h3 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text);
  text-transform: none;
  position: relative;
  z-index: 1;
  font-family: var(--display);
}

.category .box h4 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 0.4rem;
  text-transform: none;
  position: relative;
  z-index: 1;
}

/* ---------- About ---------- */
.about {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4rem;
  margin-top: 2rem;
  background: linear-gradient(135deg, #fdf4ff 0%, #ecfeff 100%);
  border-radius: var(--radius-lg);
  margin-left: 9%;
  margin-right: 9%;
  padding: 5rem 4rem;
  border: 1px solid var(--border);
}

body.dark-mode .about {
  background: var(--bg-card);
}

.about .image,
.about .hero-icon {
  flex: 1 1 32rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about .content {
  flex: 1 1 42rem;
}

.about .content h3 {
  font-family: var(--display);
  color: var(--text);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: -0.02em;
  margin-bottom: 1.2rem;
}

.about .content p {
  font-size: 1.55rem;
  padding: 0.5rem 0;
  color: var(--text-muted);
  line-height: 1.8;
  text-transform: none;
}

.about .content p a {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
  text-transform: none;
}

/* ---------- Year / book grid ---------- */
.heading {
  background: none !important;
  padding-bottom: 1rem;
  padding-top: 3rem;
}

.heading h2 {
  list-style: none;
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--display);
  color: var(--text);
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.heading h2 li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.heading h2 i,
.heading h2 .qi {
  color: var(--primary) !important;
  background: linear-gradient(135deg, #ede9fe, #e0f2fe);
  width: 4.2rem;
  height: 4.2rem;
  border-radius: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  padding: 0.7rem;
}

.year {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
  gap: 1.8rem;
}

.year .box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 2.8rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow);
}

.year .box:hover {
  border-color: transparent;
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, #fff 0%, #faf5ff 100%);
}

body.dark-mode .year .box:hover {
  background: var(--bg-card-hover);
}

.year .box img {
  display: none;
}

.year .box .icon-wrap {
  width: 8.5rem;
  height: 8.5rem;
  margin-bottom: 1.6rem;
  border-radius: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #ede9fe, #e0f2fe 50%, #fce7f3);
  border: 1px solid rgba(124, 58, 237, 0.1);
  font-size: 3.6rem;
}

body.dark-mode .year .box .icon-wrap {
  background: var(--surface);
}

.year .box:hover .icon-wrap {
  transform: scale(1.08) rotate(-3deg);
}

.year .box h3 {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  padding: 0.4rem 0;
  text-transform: none;
  line-height: 1.35;
  font-family: var(--display);
}

.year .box p {
  font-size: 1.35rem;
  color: var(--text-dim);
  line-height: 1.6;
  padding: 0.4rem 0 0.8rem;
  text-transform: none;
}

.year .box .btn {
  margin-top: auto;
  width: 100%;
  max-width: 18rem;
}

.year .box ins.adsbygoogle {
  display: block;
  min-height: 8rem;
}

/* ---------- YouTube ---------- */
.youtube-category {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
}

.youtube-category .box {
  border-radius: var(--radius);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.youtube-category .box:hover {
  border-color: rgba(239, 68, 68, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(239, 68, 68, 0.12);
}

.youtube-category .box img {
  height: 6.5rem;
  width: 6.5rem;
  margin-bottom: 1.4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.youtube-category .box .icon-wrap {
  width: 6.5rem;
  height: 6.5rem;
  margin: 0 auto 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fee2e2, #fce7f3);
  font-size: 2.8rem;
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.youtube-category .box h3 {
  font-size: 1.35rem;
  color: var(--text);
  font-weight: 600;
  text-transform: none;
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

.stats .stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stats .stat:nth-child(1) { background: linear-gradient(160deg, #fff, #f5f3ff); }
.stats .stat:nth-child(2) { background: linear-gradient(160deg, #fff, #fff7ed); }
.stats .stat:nth-child(3) { background: linear-gradient(160deg, #fff, #ecfdf5); }
.stats .stat:nth-child(4) { background: linear-gradient(160deg, #fff, #ecfeff); }

body.dark-mode .stats .stat {
  background: var(--bg-card) !important;
}

.stats .stat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.stats .stat i,
.stats .stat .stat-icon {
  font-size: 2.4rem;
  margin-bottom: 0.9rem;
  display: inline-grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 1.4rem;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  margin-inline: auto;
}

body.dark-mode .stats .stat i,
body.dark-mode .stats .stat .stat-icon {
  background: var(--surface);
}

.stats .stat strong {
  display: block;
  font-size: 2.6rem;
  font-weight: 800;
  font-family: var(--display);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stats .stat span {
  font-size: 1.35rem;
  color: var(--text-dim);
  text-transform: none;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.footer {
  background: linear-gradient(180deg, #faf5ff 0%, #eef2ff 100%);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

body.dark-mode .footer,
.footer.dark-mode {
  background: var(--bg-elevated);
}

.footer h1 {
  font-size: 1.85rem;
  font-weight: 700;
  font-family: var(--display);
  color: var(--text);
  text-transform: none;
  margin-bottom: 1.5rem;
}

.footer h1 > i,
.footer h1 > .qi {
  color: var(--primary);
  margin-right: 0.6rem;
  width: 1.4em;
  height: 1.4em;
  vertical-align: -0.3em;
}

.footer h1 span {
  display: block;
  font-size: 1.45rem;
  font-weight: 500;
}

.footer h1 span a {
  color: var(--text-muted) !important;
  text-decoration: none;
  display: flex !important;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1.2rem !important;
  border-radius: 1rem;
  margin: 0.35rem 0;
  text-transform: none;
  background: transparent !important;
}

.footer h1 span a:hover {
  background: #fff !important;
  color: var(--primary) !important;
  box-shadow: var(--shadow);
}

body.dark-mode .footer h1 span a:hover {
  background: var(--surface) !important;
}

.footer h1 span a i,
.footer h1 span a .qi {
  color: var(--primary);
  width: 1.8rem;
  height: 1.8rem;
}

.footer .credit {
  text-align: center;
  margin-top: 2rem;
  padding: 2rem 1rem;
  font-size: 1.5rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  text-transform: none;
}

.footer .credit span,
.footer .credit span a {
  color: var(--primary) !important;
  font-weight: 700;
}

/* ---------- Content lists ---------- */
section ul li {
  margin: 0.6rem 0;
  color: var(--text-muted);
  text-transform: none;
  font-size: 1.5rem;
}

section ul li a,
section a[href*=".pdf"],
section p a {
  color: var(--primary);
  text-transform: none;
  font-weight: 600;
}

section ul li a:hover,
section p a:hover {
  color: var(--accent-2);
}

/* ---------- Contact legacy ---------- */
.contactus .row form {
  flex: 1 1 40rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.contactus .row form .box,
.contactus .row form input,
.contactus .row form textarea {
  width: 100%;
  padding: 1.2rem 1.4rem;
  margin-top: 0.6rem;
  margin-bottom: 1.4rem;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 1.5rem;
  color: var(--text);
  text-transform: none;
}

.contactus .row form span {
  font-size: 1.4rem;
  color: var(--text-muted);
  text-transform: none;
}

/* ---------- Dark mode class compatibility ---------- */
body.dark-mode {
  background-color: var(--bg);
  color: var(--text);
}

.header.dark-mode .navbar a {
  color: var(--text-muted);
}

.home.dark-mode .content h3,
.about.dark-mode .content h3 {
  color: var(--text);
}

.home.dark-mode .content p,
.about.dark-mode .content p {
  color: var(--text-muted);
}

.category.dark-mode .box,
.year.dark-mode .box {
  background: var(--bg-card);
}

.category.dark-mode h3,
.year.dark-mode h3,
.youtube-category.dark-mode h3 {
  color: var(--text);
}

.footer.dark-mode .credit {
  color: var(--text-dim);
}

/* ---------- How it works strip ---------- */
.how-strip {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.how-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 2.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-transform: none;
  position: relative;
}

body.dark-mode .how-card {
  background: var(--bg-card);
}

.how-card .step {
  position: absolute;
  top: 1.6rem;
  right: 1.8rem;
  font-family: var(--display);
  font-weight: 800;
  font-size: 3rem;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.35;
}

.how-card .feature-icon {
  margin-bottom: 1.2rem;
}

.how-card:nth-child(1) .feature-icon { background: #ede9fe; }
.how-card:nth-child(2) .feature-icon { background: #fce7f3; }
.how-card:nth-child(3) .feature-icon { background: #cffafe; }

.how-card h3 {
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  text-transform: none;
}

.how-card p {
  font-size: 1.4rem;
  color: var(--text-muted);
  text-transform: none;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .hero-visual {
    max-width: 52rem;
    margin: 0 auto;
    width: 100%;
  }

  .hero-features {
    grid-template-columns: repeat(2, 1fr);
  }

  .how-grid {
    grid-template-columns: 1fr;
  }

  .float-card.fc1 { right: 0; }
  .float-card.fc2 { left: 0; }
}

@media (max-width: 1200px) {
  html {
    font-size: 55%;
  }
  section,
  .hero-page {
    padding-left: 4%;
    padding-right: 4%;
  }
  .header {
    padding: 0 4%;
  }
  .about {
    margin-left: 4%;
    margin-right: 4%;
  }
  .home.page-title {
    padding-left: 4%;
    padding-right: 4%;
  }
}

@media (max-width: 768px) {
  #menu-btn {
    display: inline-block;
  }

  .header {
    padding: 0 4%;
    height: auto;
    min-height: 6.5rem;
    padding-top: 1.2rem;
    padding-bottom: 1.2rem;
  }

  .header .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    padding: 0;
    box-shadow: var(--shadow);
  }

  .header .navbar.active {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    padding: 1rem;
  }

  .header .navbar ul {
    flex-direction: column;
    align-items: stretch;
  }

  .header .navbar ul li {
    width: 100%;
  }

  .header .navbar ul li ul {
    width: 100%;
    position: relative;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    display: none;
    box-shadow: none;
    border: none;
    background: var(--surface);
    margin-top: 0;
  }

  .header .navbar ul li:hover ul,
  .header .navbar ul li:focus-within ul {
    display: block;
  }

  .hero-features {
    grid-template-columns: 1fr;
  }

  .float-card {
    display: none;
  }

  .hero-visual {
    min-height: auto;
  }

  .home .content h3 {
    font-size: 3.2rem;
  }

  .about {
    padding: 3rem 2rem;
  }

  .about .content h3 {
    font-size: 2.6rem;
  }
}

@media (max-width: 450px) {
  html {
    font-size: 50%;
  }

  .hero-cta .btn,
  .home .content .btn-row .btn {
    width: 100%;
    margin-right: 0;
  }
}

/* ========== PDF / Notes Library ========== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.library-seo-intro {
  max-width: 96rem;
  margin: 0 auto 1rem;
  padding: 2.5rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.library-seo-intro h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.library-seo-intro p {
  font-size: 1.45rem;
  line-height: 1.7;
  color: var(--text-muted, #64748b);
}

.library-highlights {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr));
  gap: 1rem;
  margin-top: 1.6rem;
  padding: 0;
}

.library-highlights li {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
}

.library-highlights i {
  color: #10b981;
}

.pdf-library {
  max-width: 110rem;
  margin: 0 auto 2rem;
  padding: 1rem 2rem 3rem;
}

.library-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.library-search {
  position: relative;
  margin-bottom: 1.2rem;
}

.library-search i {
  position: absolute;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.4rem;
}

.library-search input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.2rem 1.4rem 1.2rem 4rem;
  font-size: 1.5rem;
  background: var(--surface, #fff);
  color: var(--text);
  outline: none;
}

.library-search input:focus {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.library-filters select {
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 0.9rem 1.2rem;
  font-size: 1.35rem;
  background: var(--surface, #fff);
  color: var(--text);
  min-width: 14rem;
}

.library-count {
  margin-top: 1.2rem;
  font-size: 1.3rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.quick-year-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.8rem;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f5f3ff, #ecfeff);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  transition: 0.2s ease;
}

.chip-link:hover {
  transform: translateY(-2px);
  border-color: #a78bfa;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.12);
}

body.dark-mode .chip-link {
  background: var(--surface);
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr));
  gap: 1.6rem;
}

.resource-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 100%;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg, 0 18px 40px rgba(15, 23, 42, 0.1));
  border-color: rgba(139, 92, 246, 0.35);
}

.resource-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.resource-card .icon-wrap {
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 1.2rem;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  background: linear-gradient(145deg, #ede9fe, #e0e7ff);
}

.resource-badge {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-quantum {
  background: #ede9fe;
  color: #6d28d9;
}

.badge-notes {
  background: #d1fae5;
  color: #047857;
}

.badge-pyq {
  background: #ffedd5;
  color: #c2410c;
}

.resource-card h3 {
  font-size: 1.55rem;
  line-height: 1.35;
  color: var(--text);
  font-weight: 700;
  text-transform: none;
  margin: 0;
}

.resource-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.2rem;
  font-size: 1.2rem;
  color: var(--text-muted, #64748b);
  margin: 0;
}

.resource-meta i {
  margin-right: 0.35rem;
  opacity: 0.8;
}

.resource-desc {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--text-muted, #64748b);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.resource-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.4rem;
}

.resource-actions .btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  padding: 0.95rem 1rem;
}

.resource-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  color: var(--text-muted, #64748b);
}

.resource-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  color: #a78bfa;
}

.library-faq {
  max-width: 90rem;
  margin: 0 auto 3rem;
  padding: 0 2rem;
}

.library-faq h2 {
  font-size: 2.2rem;
  margin-bottom: 1.4rem;
}

.library-faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.4rem 1.6rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.library-faq summary {
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  list-style: none;
}

.library-faq summary::-webkit-details-marker {
  display: none;
}

.library-faq details[open] summary {
  margin-bottom: 0.8rem;
  color: #7c3aed;
}

.library-faq p {
  font-size: 1.4rem;
  line-height: 1.65;
  color: var(--text-muted, #64748b);
  margin: 0;
}

.notes-local {
  margin-top: 1.5rem;
}

.notes-local > h1,
.notes.notes-connected > h1 {
  font-size: 1.6rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.notes .resource-grid,
.notes-local .resource-grid,
#featured-pdfs.resource-grid {
  margin-top: 1rem;
}

.home-library-cta {
  max-width: 110rem;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.home-library-cta .library-banner {
  background: linear-gradient(135deg, #4c1d95, #7c3aed 45%, #06b6d4);
  border-radius: calc(var(--radius) + 0.4rem);
  padding: 2.8rem 2.4rem;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  box-shadow: 0 20px 50px rgba(76, 29, 149, 0.28);
}

.home-library-cta h2 {
  font-size: 2.4rem;
  margin-bottom: 0.6rem;
  color: #fff;
}

.home-library-cta p {
  font-size: 1.45rem;
  opacity: 0.92;
  max-width: 52rem;
  line-height: 1.55;
}

.home-library-cta .btn {
  background: #fff;
  color: #5b21b6 !important;
  border: none;
  font-weight: 700;
}

/* Make the library banner CTA clearly readable and large enough */
.home-library-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 2.4rem;
  border-radius: 999px;
  font-size: 1.5rem;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.home-library-cta .btn i {
  color: inherit;
  font-size: 1.6rem;
}

.home-library-cta .btn {
  color: #5b21b6 !important;
}

.home-library-cta .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.section-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: 110rem;
  margin: 2rem auto 0.5rem;
  padding: 0 2rem;
}

.section-label-row h2 {
  font-size: 2.2rem;
}

.section-label-row a {
  font-size: 1.35rem;
  font-weight: 600;
  color: #7c3aed;
}

@media (max-width: 768px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .library-filters select {
    min-width: calc(50% - 0.5rem);
    flex: 1;
  }

  .resource-actions {
    flex-direction: column;
  }
}
