/* ─────────────────────────────────────────────────────────────────
   SE Theme — Homepage: Hero · Courses · Trending · Tools · LB
   ───────────────────────────────────────────────────────────────── */

/* ── Hero section ────────────────────────────────────────────── */
.se-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: var(--s9) 0 var(--s8);
}

/* Animated grid background */
.se-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,255,231,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,231,.04) 1px, transparent 1px);
  background-size: 44px 44px;
  animation: se-grid-scroll 24s linear infinite;
  z-index: var(--z-below);
}
/* Radial gradient overlay to fade grid at edges */
.se-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 40%, transparent 20%, var(--bg) 80%);
  z-index: 0;
}
@keyframes se-grid-scroll {
  0%   { background-position: 0 0; }
  100% { background-position: 44px 44px; }
}

/* Two-column grid: copy left, terminal right */
.se-hero-grid {
  position: relative;
  z-index: var(--z-base);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}

.se-hero-content {
  position: relative;
  z-index: var(--z-base);
}

.se-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: 3px;
  color: var(--clr-neon);
  text-transform: uppercase;
  margin-bottom: var(--s4);
  animation: se-fade-in .6s ease both;
}
.se-hero-eyebrow::before {
  content: '';
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 width=%22256%22 height=%22256%22%3E%3Cdefs%3E%3ClinearGradient id=%22g%22 x1=%220%22 y1=%220%22 x2=%221%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%2300ffe7%22/%3E%3Cstop offset=%221%22 stop-color=%22%237b2fff%22/%3E%3C/linearGradient%3E%3Cfilter id=%22glow%22 x=%22-30%25%22 y=%22-30%25%22 width=%22160%25%22 height=%22160%25%22%3E%3CfeGaussianBlur stdDeviation=%225%22 result=%22b%22/%3E%3CfeMerge%3E%3CfeMergeNode in=%22b%22/%3E%3CfeMergeNode in=%22SourceGraphic%22/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cpath d=%22M128 18 L222 52 V126 C222 182 184 222 128 240 C72 222 34 182 34 126 V52 Z%22 fill=%22%2307101a%22 stroke=%22url(%23g)%22 stroke-width=%2212%22 stroke-linejoin=%22round%22 filter=%22url(%23glow)%22/%3E%3Cpath d=%22M128 40 L202 66 V126 C202 170 172 202 128 218%22 fill=%22none%22 stroke=%22%2300ffe7%22 stroke-opacity=%22.18%22 stroke-width=%223%22/%3E%3Cpath d=%22M82 96 L124 128 L82 160%22 fill=%22none%22 stroke=%22%2300ffe7%22 stroke-width=%2217%22 stroke-linecap=%22square%22 stroke-linejoin=%22miter%22 filter=%22url(%23glow)%22/%3E%3Crect x=%22134%22 y=%22148%22 width=%2246%22 height=%2215%22 fill=%22%23ff2d78%22 filter=%22url(%23glow)%22/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(0,255,231,.35));
}

.se-hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  line-height: 1.05;
  color: var(--text-bright);
  margin-bottom: var(--s4);
  animation: se-fade-in .6s .1s ease both;
}
.se-hero-title .accent {
  color: var(--clr-neon);
  text-shadow: 0 0 30px rgba(0,255,231,.4);
  display: block;
}

.se-hero-sub {
  font-size: 1.05rem;
  color: var(--text-dim);
  line-height: 1.65;
  max-width: 480px;
  margin-bottom: var(--s6);
  animation: se-fade-in .6s .2s ease both;
}

.se-hero-actions {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  animation: se-fade-in .6s .3s ease both;
}
.se-hero-actions .se-btn {
  padding: var(--s3) var(--s6);
  font-size: .9rem;
}

/* Hero stats strip */
.se-hero-stats {
  display: flex;
  align-items: center;
  gap: var(--s6);
  margin-top: var(--s7);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
  animation: se-fade-in .6s .4s ease both;
}
.se-hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--clr-neon);
  display: block;
  line-height: 1;
}
.se-hero-stat-label {
  font-family: var(--font-ui);
  font-size: .7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Kali Terminal Animation ──────────────────────────────────── */
.se-hero-terminal {
  position: relative;
  z-index: var(--z-base);
  animation: se-fade-in .8s .5s ease both;
  display: flex;
  justify-content: center;
}

.se-term-window {
  width: 100%;
  max-width: 560px;
  background: #0d0d14;
  border: 1px solid rgba(0,255,231,.2);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(0,255,231,.06),
    0 24px 60px rgba(0,0,0,.7),
    0 0 40px rgba(0,255,231,.06);
  overflow: hidden;
  position: relative; /* keeps the scanline overlay inside the window */
  font-family: var(--font-mono);
  font-size: .82rem;
}

/* Title bar */
.se-term-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #181825;
  border-bottom: 1px solid rgba(0,255,231,.1);
  user-select: none;
}
.se-term-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.se-term-dot--red    { background: #ff5f57; }
.se-term-dot--yellow { background: #febc2e; }
.se-term-dot--green  { background: #28c840; }
.se-term-title {
  margin-left: 8px;
  font-size: .72rem;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  font-family: var(--font-mono);
}

/* Terminal body */
.se-term-body {
  padding: 14px 16px 16px;
  min-height: 320px;
  max-height: 380px;
  overflow: hidden;
  line-height: 1.65;
  color: #c9d1d9;
}

/* Lines */
.se-term-line {
  white-space: pre-wrap;
  word-break: break-all;
  min-height: 1.4em;
}

/* Prompt colours */
.se-term-prompt { color: #ff5f57; font-weight: 700; }
.se-term-sep    { color: rgba(255,255,255,.3); }
.se-term-dir    { color: #0affed; }
.se-term-dollar { color: rgba(255,255,255,.5); margin: 0 4px; }
.se-term-cmd    { color: #e6edf3; }

/* Cursor blink */
.se-term-cursor {
  display: inline-block;
  color: #0affed;
  animation: se-blink .9s step-start infinite;
  font-size: .9em;
  vertical-align: middle;
}
@keyframes se-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Output highlight classes */
.se-term-ok   { color: #0affed; }
.se-term-warn { color: #febc2e; }
.se-term-dim  { color: rgba(255,255,255,.35); }

/* Scanline overlay for CRT feel */
.se-term-window::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.04) 2px,
    rgba(0,0,0,.04) 4px
  );
  pointer-events: none;
  z-index: 10;
  border-radius: inherit;
}

/* ── Hero responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .se-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .se-hero-terminal {
    order: 2; /* terminal below text on tablet */
  }
  .se-term-window { max-width: 100%; }
  .se-term-body { min-height: 200px; max-height: 240px; }
}
@media (max-width: 640px) {
  .se-hero-stats { gap: var(--s4); }
  .se-hero-terminal { display: none; }
  /* Terminal is hidden on phones: show a faint brand shield behind the copy */
  .se-hero-content::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22 width=%22256%22 height=%22256%22%3E%3Cdefs%3E%3ClinearGradient id=%22g%22 x1=%220%22 y1=%220%22 x2=%221%22 y2=%221%22%3E%3Cstop offset=%220%22 stop-color=%22%2300ffe7%22/%3E%3Cstop offset=%221%22 stop-color=%22%237b2fff%22/%3E%3C/linearGradient%3E%3Cfilter id=%22glow%22 x=%22-30%25%22 y=%22-30%25%22 width=%22160%25%22 height=%22160%25%22%3E%3CfeGaussianBlur stdDeviation=%225%22 result=%22b%22/%3E%3CfeMerge%3E%3CfeMergeNode in=%22b%22/%3E%3CfeMergeNode in=%22SourceGraphic%22/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cpath d=%22M128 18 L222 52 V126 C222 182 184 222 128 240 C72 222 34 182 34 126 V52 Z%22 fill=%22%2307101a%22 stroke=%22url(%23g)%22 stroke-width=%2212%22 stroke-linejoin=%22round%22 filter=%22url(%23glow)%22/%3E%3Cpath d=%22M128 40 L202 66 V126 C202 170 172 202 128 218%22 fill=%22none%22 stroke=%22%2300ffe7%22 stroke-opacity=%22.18%22 stroke-width=%223%22/%3E%3Cpath d=%22M82 96 L124 128 L82 160%22 fill=%22none%22 stroke=%22%2300ffe7%22 stroke-width=%2217%22 stroke-linecap=%22square%22 stroke-linejoin=%22miter%22 filter=%22url(%23glow)%22/%3E%3Crect x=%22134%22 y=%22148%22 width=%2246%22 height=%2215%22 fill=%22%23ff2d78%22 filter=%22url(%23glow)%22/%3E%3C/svg%3E") center / contain no-repeat;
    opacity: .08;
    pointer-events: none;
    z-index: -1;
  }
}

/* Hero floating rank widget (kept for backward compat) */
.se-hero-rank-float {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: var(--z-base);
  animation: se-slide-in-right .8s .5s ease both;
}
.se-hero-rank-card {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  backdrop-filter: blur(20px);
  width: 260px;
  box-shadow: var(--shadow-card), var(--glow-neon);
}
.se-hero-rank-card-title {
  font-family: var(--font-ui);
  font-size: .65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--s4);
}

/* ── Course tracks section ───────────────────────────────────── */
.se-courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
}

.se-course-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-mid), transform var(--t-mid), box-shadow var(--t-mid);
}
.se-course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--course-color, var(--clr-neon));
  box-shadow: 0 0 12px var(--course-color, var(--clr-neon));
  opacity: 0;
  transition: opacity var(--t-mid);
}
.se-course-card:hover {
  border-color: var(--course-color, var(--border-hover));
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.7), 0 0 0 1px var(--course-color, var(--border-hover));
}
.se-course-card:hover::before { opacity: 1; }

.se-course-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.se-course-tag {
  font-family: var(--font-ui);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--course-color, var(--clr-neon));
}
.se-course-name {
  font-family: var(--font-display);
  font-size: .9rem;
  color: var(--text-bright);
  line-height: 1.3;
  margin: 0;
}
.se-course-desc {
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.5;
  flex: 1;
}
.se-course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: .7rem;
  color: var(--text-dim);
  padding-top: var(--s3);
  border-top: 1px solid var(--border);
}
.se-course-meta-badge {
  background: rgba(255,255,255,.06);
  border-radius: 20px;
  padding: 2px 8px;
}

/* Course color themes */
.se-course-card[data-course="kali"]    { --course-color: #00ffe7; }
.se-course-card[data-course="bugbounty"] { --course-color: #ff44cc; }
.se-course-card[data-course="ethical"] { --course-color: #ff8c00; }
.se-course-card[data-course="dvwa"]    { --course-color: #00ff88; }

/* ── Trending/Latest articles ─────────────────────────────────── */
.se-trending-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s5);
}

/* ── Tools section ───────────────────────────────────────────── */
.se-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s3);
}
.se-tool-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--s4);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--s3);
  transition: border-color var(--t-fast), background var(--t-fast);
}
.se-tool-card:hover {
  border-color: var(--border-hover);
  background: var(--bg3);
}
.se-tool-icon {
  font-size: 20px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.se-tool-name {
  font-family: var(--font-ui);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-bright);
}
.se-tool-desc {
  font-size: .75rem;
  color: var(--text-dim);
  margin-top: 1px;
}

/* ── Leaderboard preview widget ─────────────────────────────── */
.se-lb-preview {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.se-lb-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--border);
}
.se-lb-preview-title {
  font-family: var(--font-ui);
  font-size: .75rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--clr-neon);
}
.se-lb-preview-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid rgba(255,255,255,.03);
  transition: background var(--t-fast);
}
.se-lb-preview-row:hover { background: var(--bg3); }
.se-lb-preview-row:last-child { border-bottom: none; }
.se-lb-rank {
  font-family: var(--font-mono);
  font-size: .7rem;
  min-width: 24px;
  text-align: center;
  color: var(--text-dim);
}
.se-lb-rank-1 { color: #ffd700; }
.se-lb-rank-2 { color: #c0c0c0; }
.se-lb-rank-3 { color: #cd7f32; }
.se-lb-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.se-lb-name {
  flex: 1;
  font-size: .85rem;
  color: var(--text-bright);
  font-family: var(--font-ui);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.se-lb-xp {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--clr-neon);
  flex-shrink: 0;
}
.se-lb-rank-badge {
  font-size: .65rem;
  padding: 1px 6px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-weight: 700;
  letter-spacing: .5px;
  flex-shrink: 0;
}

/* CTA band */
.se-cta-band {
  background: linear-gradient(135deg, rgba(0,255,231,.06), rgba(123,47,255,.06));
  border-top: 1px solid rgba(0,255,231,.1);
  border-bottom: 1px solid rgba(0,255,231,.1);
  padding: var(--s8) 0;
  text-align: center;
}
.se-cta-band h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  margin-bottom: var(--s3);
}
.se-cta-band p {
  color: var(--text-dim);
  margin-bottom: var(--s5);
  font-size: 1rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Leaderboard section layout ─────────────────────────────────────────── */
.se-lb-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--s7);
  align-items: start;
}
@media (max-width: 1023px) {
  .se-lb-layout {
    grid-template-columns: 1fr;
  }
}

/* ─────────────────────────────────────────────────────────────────
   DOPAMINE BOX CARDS — image-free latest-articles cards
   Used on homepage. Image-based content-card.php still used elsewhere.
   Design: neon top-bar + emoji + XP badge + title. Zero HTTP requests
   per card. Responsive grid. Hover glow for engagement.
   ───────────────────────────────────────────────────────────────── */

.se-dbox {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 8px);
  overflow: hidden;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-mid);
  min-height: 180px;
  display: flex;
}
.se-dbox::before {
  /* Category-coloured top bar — 3px strip with subtle gradient */
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--dbox-color, var(--clr-neon)), transparent 85%);
  z-index: 2;
  transition: height var(--t-mid);
}
.se-dbox::after {
  /* Diagonal grid pattern in bg — very subtle, adds depth without HTTP request */
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(45deg, transparent 48%, rgba(255,255,255,.015) 49%, rgba(255,255,255,.015) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgba(255,255,255,.01) 49%, rgba(255,255,255,.01) 51%, transparent 52%);
  background-size: 24px 24px;
  z-index: 0;
}
.se-dbox-link {
  display: flex;
  flex-direction: column;
  padding: 20px 20px 14px;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  width: 100%;
  position: relative;
  z-index: 1;
}
.se-dbox:hover {
  transform: translateY(-2px);
  border-color: var(--dbox-color, var(--clr-neon));
  box-shadow: 0 8px 40px rgba(0,0,0,.6), 0 0 0 1px var(--dbox-color, var(--clr-neon));
}
.se-dbox:hover::before { height: 4px; }
.se-dbox:hover .se-dbox-xp { transform: scale(1.05); }

/* Category-specific colour via CSS custom property — no extra CSS rules */
.se-dbox--color-neon   { --dbox-color: #00ffe7; }
.se-dbox--color-green  { --dbox-color: #00ff88; }
.se-dbox--color-blue   { --dbox-color: #3b9eff; }
.se-dbox--color-orange { --dbox-color: #ff8c00; }
.se-dbox--color-neon4  { --dbox-color: #7b2fff; }
.se-dbox--color-neon3  { --dbox-color: #ffe600; }

/* Top row: category chip + XP badge */
.se-dbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}
.se-dbox-cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 600 .7rem/1 var(--font-ui, 'Rajdhani', sans-serif);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--dbox-color, var(--clr-neon));
  padding: 5px 10px;
  background: color-mix(in srgb, var(--dbox-color, #00ffe7) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--dbox-color, #00ffe7) 30%, transparent);
  border-radius: 4px;
  max-width: 60%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.se-dbox-cat-icon {
  font-size: 11px;
  flex-shrink: 0;
}
.se-dbox-cat-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.se-dbox-xp {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display, 'Orbitron', monospace);
  font-weight: 800;
  color: var(--clr-neon);
  background: rgba(0,255,231,.08);
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid rgba(0,255,231,.25);
  letter-spacing: .02em;
  transition: transform var(--t-fast);
  white-space: nowrap;
}
.se-dbox-xp-plus { font-size: .85rem; opacity: .75; }
.se-dbox-xp-num  { font-size: .95rem; }
.se-dbox-xp-label { font-size: .7rem; opacity: .75; margin-left: 2px; }

/* Title — the main visual anchor */
.se-dbox-title {
  font-family: var(--font-display, 'Orbitron', monospace);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--text-bright);
  margin: 0;
  flex: 1;
  letter-spacing: -.005em;
  /* Clamp to 3 lines so tall titles don't balloon the card */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.se-dbox-excerpt {
  font: 400 .85rem/1.5 var(--font-body, 'Sora', sans-serif);
  color: var(--text-dim);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row — bottom-aligned */
.se-dbox-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  font: 500 .7rem/1 var(--font-ui, 'Rajdhani', sans-serif);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .05em;
  flex-wrap: wrap;
}
.se-dbox-read {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.se-dbox-read svg {
  stroke: var(--dbox-color, var(--clr-neon));
  flex-shrink: 0;
}
.se-dbox-date {
  margin-left: auto;
  color: var(--text-dim);
  opacity: .7;
}

/* Glow element for hover — not rendered until :hover activates via box-shadow */
.se-dbox-glow { display: none; }

/* ── Featured variant (1st card, spans wider) ─────────────────────── */
.se-dbox--featured {
  grid-column: span 2;
  min-height: 240px;
}
.se-dbox--featured .se-dbox-title { font-size: 1.4rem; -webkit-line-clamp: 3; }

/* ── Compact variant (for side columns) ──────────────────────────── */
.se-dbox--compact {
  min-height: 140px;
}
.se-dbox--compact .se-dbox-title { font-size: .95rem; }
.se-dbox--compact .se-dbox-link { padding: 14px 16px 10px; gap: 8px; }

/* ── Grid layout for dopamine cards — matches se-card-grid responsive ─ */
.se-dbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 1023px) {
  .se-dbox-grid { grid-template-columns: repeat(2, 1fr); }
  .se-dbox--featured { grid-column: span 2; }
}
@media (max-width: 600px) {
  .se-dbox-grid { grid-template-columns: 1fr; }
  .se-dbox--featured { grid-column: span 1; min-height: 180px; }
  .se-dbox--featured .se-dbox-title { font-size: 1.15rem; }
}

/* ── Reduced motion — disable the hover scale and translate ─────── */
@media (prefers-reduced-motion: reduce) {
  .se-dbox, .se-dbox::before, .se-dbox-xp { transition: none; }
  .se-dbox:hover { transform: none; }
  .se-dbox:hover .se-dbox-xp { transform: none; }
}

/* ──────────────────────────────────────────────────────────────────
 * SEO content sections
 * Pillar content + FAQ + Authoritative Resources for homepage ranking.
 * Sized to read comfortably on mobile (the dominant traffic profile)
 * while maintaining visual rhythm with the rest of the homepage.
 * ────────────────────────────────────────────────────────────────── */

.se-seo-section {
  padding: var(--s8) 0;
  border-top: 1px solid var(--border);
}
.se-seo-section .se-container {
  max-width: var(--container-sm);  /* narrower = more readable for long-form */
}
.se-seo-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 var(--s5) 0;
  color: var(--text-bright);
}
.se-seo-section h3 {
  font-family: var(--font-ui);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 600;
  margin: var(--s6) 0 var(--s3) 0;
  color: var(--clr-neon);
  letter-spacing: .01em;
}
.se-seo-section p {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 var(--s4) 0;
}
.se-seo-section .se-seo-lede {
  font-size: 1.125rem;
  color: var(--text-bright);
  margin-bottom: var(--s5);
}
.se-seo-section a {
  color: var(--clr-neon);
  text-decoration: underline;
  text-decoration-color: rgba(0, 255, 231, .35);
  text-underline-offset: 3px;
}
.se-seo-section a:hover {
  text-decoration-color: var(--clr-neon);
}
.se-seo-section strong {
  color: var(--text-bright);
  font-weight: 600;
}

/* ── FAQ ─────────────────────────────────────────── */
.se-faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  margin-top: var(--s5);
}
.se-faq-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  transition: border-color var(--t-fast);
}
.se-faq-item[open] {
  border-color: var(--border-hover);
}
.se-faq-item summary {
  cursor: pointer;
  padding: var(--s4) var(--s5);
  list-style: none;
  position: relative;
  user-select: none;
}
.se-faq-item summary::-webkit-details-marker { display: none; }
.se-faq-item summary::after {
  content: '+';
  position: absolute;
  right: var(--s5);
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  color: var(--clr-neon);
  font-size: 1.5rem;
  line-height: 1;
}
.se-faq-item[open] summary::after { content: '−'; }
.se-faq-item summary h3 {
  display: inline;
  margin: 0;
  font-size: 1.05rem;
  color: var(--text-bright);
  padding-right: var(--s6);
}
.se-faq-item p {
  padding: 0 var(--s5) var(--s5) var(--s5);
  margin: 0;
}
.se-faq-cta-note {
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-dim);
}

/* ── Authoritative Resources ─────────────────────── */
.se-resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s4);
  margin-top: var(--s5);
}
.se-resource-item {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s4);
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.se-resource-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.se-resource-item h3 {
  margin: 0 0 var(--s2) 0;
  font-size: 1rem;
  color: var(--text-bright);
}
.se-resource-item h3 a {
  color: var(--clr-neon);
  text-decoration: none;
}
.se-resource-item h3 a:hover { text-decoration: underline; }
.se-resource-item p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

@media (max-width: 640px) {
  .se-seo-section { padding: var(--s6) 0; }
  .se-faq-item summary { padding: var(--s3) var(--s4); }
  .se-faq-item summary::after { right: var(--s4); }
  .se-faq-item p { padding: 0 var(--s4) var(--s4) var(--s4); }
}

/* ── Section-level Read More expand ──────────────────
   Used inside .se-seo-section to keep the lede paragraph(s) visible
   while folding deeper exploration behind an opt-in click. SEO-safe:
   <details> content is fully present in HTML and Google indexes it
   normally (per Google's mobile-first indexing policy 2020+).
   Different visual pattern from .se-faq-item because these aren't
   standalone Q&A — they're "the rest of the section" not a list. */
.se-seo-expand {
  margin-top: var(--s5);
  border-top: 1px dashed var(--border);
  padding-top: var(--s5);
}
.se-seo-expand > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s4);
  background: transparent;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  color: var(--clr-neon);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: .02em;
  transition: background var(--t-fast), border-color var(--t-fast);
  user-select: none;
}
.se-seo-expand > summary::-webkit-details-marker { display: none; }
.se-seo-expand > summary::before {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.1rem;
  line-height: 1;
  color: var(--clr-neon);
}
.se-seo-expand[open] > summary::before { content: '−'; }
.se-seo-expand > summary:hover {
  background: rgba(0, 255, 231, .06);
  border-color: var(--clr-neon);
}
.se-seo-expand[open] > summary {
  background: rgba(0, 255, 231, .04);
  margin-bottom: var(--s4);
}
/* Inside the expand, h3/p flow naturally (rules already defined for
   .se-seo-section). Add a top margin to the first h3 to space it from
   the summary button. */
.se-seo-expand > h3:first-of-type { margin-top: var(--s5); }

/* ──────────────────────────────────────────────────────────────────
 * Homepage UX enhancements
 *   - Activity strip (real social proof rotator)
 *   - Sticky practice exam CTA (mobile-first)
 *   - Scroll-reveal animations (fade-up on entry)
 *   - Hover-lift on cards
 * All animations respect prefers-reduced-motion.
 * ────────────────────────────────────────────────────────────────── */

/* ── Live Activity Strip ─────────────────────────────────────── */
.se-activity-strip {
  background: linear-gradient(180deg, rgba(0,255,231,0.05) 0%, rgba(0,255,231,0.02) 100%);
  border-top: 1px solid rgba(0,255,231,0.15);
  border-bottom: 1px solid rgba(0,255,231,0.15);
  padding: var(--s3) 0;
  overflow: hidden;
}
.se-activity-rotator {
  position: relative;
  min-height: 2.2em;
}
.se-activity-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.se-activity-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.se-activity-item strong {
  color: var(--clr-neon);
  font-weight: 600;
}
.se-activity-item a {
  color: var(--text-bright);
  text-decoration: underline;
  text-decoration-color: rgba(0,255,231,.3);
  text-underline-offset: 3px;
}
.se-activity-item a:hover { text-decoration-color: var(--clr-neon); }

.se-activity-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--clr-neon);
  box-shadow: 0 0 8px var(--clr-neon);
  flex-shrink: 0;
  animation: se-pulse 2s ease-in-out infinite;
}
.se-activity-dot-pink {
  background: var(--clr-neon2);
  box-shadow: 0 0 8px var(--clr-neon2);
}
@keyframes se-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .6; transform: scale(.85); }
}
@media (prefers-reduced-motion: reduce) {
  .se-activity-dot { animation: none; }
}
@media (max-width: 640px) {
  .se-activity-rotator {
    min-height: 3.4em;
  }
  .se-activity-item {
    font-size: 0.78125rem;
    line-height: 1.4;
    white-space: normal;
    overflow: visible;
  }
}
/* ── Sticky Practice Exam CTA ───────────────────────────────── */
.se-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-overlay);
  background: linear-gradient(180deg, rgba(8,15,24,0.96) 0%, rgba(8,15,24,1) 100%);
  border-top: 1px solid var(--border-hover);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.16,.84,.44,1);
}
.se-sticky-cta.is-visible { transform: translateY(0); }
.se-sticky-cta-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s3) var(--s4);
  display: flex;
  align-items: center;
  gap: var(--s4);
  justify-content: space-between;
}
.se-sticky-cta-text {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-width: 0;
  flex: 1;
}
.se-sticky-cta-tag {
  flex-shrink: 0;
  background: var(--clr-neon);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}
.se-sticky-cta-msg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  font-family: var(--font-ui);
  color: var(--text-bright);
  font-size: 0.9375rem;
  line-height: 1.2;
}
.se-sticky-cta-msg strong { font-weight: 600; }
.se-sticky-cta-sub {
  font-size: 0.8125rem;
  color: var(--text-dim);
  font-weight: 400;
}
.se-sticky-cta-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}
.se-sticky-cta-go {
  background: var(--clr-neon);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  padding: var(--s2) var(--s4);
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.se-sticky-cta-go:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,255,231,0.35);
}
.se-sticky-cta-close {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}
.se-sticky-cta-close:hover {
  color: var(--text-bright);
  border-color: var(--border-hover);
}
@media (max-width: 640px) {
  .se-sticky-cta-inner { padding: var(--s2) var(--s3); gap: var(--s2); }
  .se-sticky-cta-tag { font-size: 0.6875rem; padding: 2px 6px; }
  .se-sticky-cta-msg { font-size: 0.8125rem; }
  .se-sticky-cta-sub { display: none; }
  .se-sticky-cta-go { padding: var(--s2) var(--s3); font-size: 0.8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .se-sticky-cta { transition: none; }
}

/* ── Scroll-reveal entry animation ──────────────────────────── */
/* Sections start invisible/shifted, transition in when .is-revealed
   class is applied by IntersectionObserver. Skipped entirely under
   reduced-motion (JS sets .is-revealed immediately). */
.se-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
  will-change: opacity, transform;
}
.se-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}
@media (prefers-reduced-motion: reduce) {
  .se-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Card hover-lift (subtle dopamine on interaction) ───────── */
.se-track-card,
.se-cert-callout {
  transition: transform var(--t-mid), box-shadow var(--t-mid), border-color var(--t-mid);
}
.se-track-card:hover,
.se-cert-callout:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 12px 32px rgba(0,255,231,0.08), 0 0 0 1px rgba(0,255,231,0.12);
}
@media (prefers-reduced-motion: reduce) {
  .se-track-card,
  .se-cert-callout {
    transition: none;
  }
  .se-track-card:hover,
  .se-cert-callout:hover { transform: none; }
}