:root{
  --bg:#D7E6FA;
  --panel:#FFFFFF;
  --panel2:#EEF5FF;
  --text:#07111F;
  --muted:#405772;
  --border: rgba(0,47,108,.16);

  --font-ui: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-chalk: "Patrick Hand", "Schoolbell", cursive;

  --btn:#0057B8;
  --btnHover:#003F8A;

  --shadow: 0 18px 50px rgba(0,47,108,.14);
  --shadow2: 0 10px 26px rgba(0,47,108,.10);

  --radius: 18px;
  --radius2: 12px;
  --max: 920px;

  --okBg: rgba(0,87,184,.10);
  --okText:#0057B8;

  --warnBg: rgba(0,47,108,.08);
  --warnText:#003F8A;

  --chipBg: rgba(0,87,184,.07);
  --chipText:#003F8A;

  --focus: 0 0 0 4px rgba(0,87,184,.16);
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family: var(--font-ui);
  color:var(--text);
  background:
    radial-gradient(900px 420px at 50% -140px, rgba(0,87,184,.28), transparent 62%),
    radial-gradient(760px 360px at 18% 0px, rgba(255,255,255,.34), transparent 68%),
    linear-gradient(180deg, #DCEAFF 0%, #CFE0F8 42%, #BFD4F0 100%);
  min-height:100vh;
}

/* Top nav */
.topbar{
  position: sticky;
  top:0;
  z-index:10;
  background: rgba(245,249,255,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0,47,108,.12);
}

.topbar-inner{
  max-width: var(--max);
  margin:0 auto;
  padding: 12px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.nav a{
  font-size:13px;
  color: #334963;
  text-decoration:none;
  padding:8px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.nav a:hover{
  background: rgba(0,87,184,.07);
  border-color: rgba(0,87,184,.12);
  color: #003F8A;
}

.nav-auth{
  display:flex;
  gap:12px;
}

.register-link{
  padding: 6px 12px;
  border-radius: 999px;
  background: #0057B8;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(0,87,184,.20);
}

/* Page */
.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px 74px;
}

/* HERO */
.hero{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  margin-top: 0 !important;
  margin-bottom: 26px !important;
  padding-top: 34px !important;
  padding-bottom: 18px !important;
  gap: 0 !important;
}

/* Logo */
.logoWrap{
  width: min(620px, 88vw) !important;
  max-width: 620px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  display:flex;
  align-items:center;
  justify-content:center;
  margin: 0 auto 10px !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.logoHero{
  width:100% !important;
  max-width: 620px !important;
  height:auto !important;
  display:block !important;
  margin: 0 auto !important;
  transform: none !important;
  filter:
    drop-shadow(0 18px 34px rgba(0,47,108,.18))
    drop-shadow(0 2px 0 rgba(255,255,255,.70));
  user-select:none;
  -webkit-user-drag:none;
}

.hero h1{
  margin: 0 auto 16px !important;
  padding: 0 !important;
  max-width: 800px !important;
  font-size: clamp(32px, 5.5vw, 50px) !important;
  line-height: 1.12 !important;
  color: #07111F;
  letter-spacing: -1.3px;
  text-shadow: 0 2px 0 rgba(255,255,255,.85);
}

.hero p{
  margin:0;
  color: var(--muted);
  max-width: 66ch;
  font-size: 14px;
  line-height: 1.42;
}

.hero .sub{
  margin: 0 auto !important;
  max-width: 760px !important;
  font-size: clamp(17px, 2.1vw, 21px) !important;
  line-height: 1.55 !important;
  color: rgba(7,17,31,.78);
  opacity: 1;
  text-shadow: 0 1px 0 rgba(255,255,255,.80);
}

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 14px;
}

/* Cards */
.card{
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,250,255,.92));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  width: 100%;
}

.cardHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.titleBlock{
  display:flex;
  flex-direction:column;
  gap: 4px;
}

.kicker{
  font-size: 12px;
  letter-spacing: .5px;
  color: #0057B8;
  text-transform: uppercase;
  font-weight: 900;
}

.card h2{
  margin:0;
  font-size: 16px;
  letter-spacing:.1px;
  font-weight: 900;
  color: #07111F;
}

/* Status pills */
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  padding:7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,87,184,.14);
  background: var(--chipBg);
  color: var(--chipText);
  white-space: nowrap;
}

.pill.ok{
  background: rgba(0,87,184,.10);
  color: #0057B8;
  border-color: rgba(0,87,184,.22);
}

.pill.warn{
  background: rgba(255,255,255,.72);
  color: #003F8A;
  border-color: rgba(0,47,108,.18);
}

/* Form row */
.row{
  display:grid;
  grid-template-columns: 1fr 220px;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 720px){
  .row{grid-template-columns: 1fr}
}

/* Inputs */
.input, .select{
  width:100%;
  padding: 12px 12px;
  border-radius: var(--radius2);
  border: 1px solid rgba(0,47,108,.16);
  outline:none;
  font-size: 14px;
  background: rgba(255,255,255,.92);
  color: var(--text);
}

.input::placeholder{
  color: rgba(82,101,125,.72);
}

.input:focus, .select:focus{
  border-color: rgba(0,87,184,.55);
  box-shadow: var(--focus);
}

/* Actions */
.actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,47,108,.14);
  background: rgba(255,255,255,.78);
  color: #07111F;
  cursor:pointer;
  font-weight: 900;
  font-size: 14px;
  user-select:none;
  transition: background .12s ease, border-color .12s ease, transform .06s ease, box-shadow .12s ease;
}

.btn:active{transform: translateY(1px)}

.btn.primary{
  background: var(--btn);
  border-color: rgba(0,87,184,.68);
  color:#fff;
  box-shadow: 0 12px 26px rgba(0,87,184,.24);
}

.btn.primary:hover{
  background: var(--btnHover);
  border-color: rgba(0,63,138,.72);
}

.btn.ghost:hover{
  background: rgba(0,87,184,.07);
  border-color: rgba(0,87,184,.18);
}

.btn:disabled{
  opacity:.6;
  cursor:not-allowed;
  box-shadow:none;
}

/* Text helpers */
.subtext{
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.status{
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
}

/* Upload UI */
.fileRow{
  display:flex;
  gap:10px;
  align-items:center;
  margin-top: 10px;
  flex-wrap:wrap;
}

.fileFake{
  flex: 1;
  min-width: 220px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 12px;
  border-radius: var(--radius2);
  border: 1px dashed rgba(0,87,184,.26);
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 13px;
}

.fileFake strong{
  color: var(--text);
  font-weight: 900;
  font-size: 13px;
}

.fileMeta{
  font-size:12px;
  margin-top:2px;
}

.fileTag{
  font-size:12px;
  color:#0057B8;
}

input[type="file"]{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
}

/* Locked state */
.locked{
  opacity: .55;
  pointer-events:none;
  filter: grayscale(.10);
}

/* Toast */
.toast{
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(7,17,31,.94);
  color:#fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  display:none;
  z-index: 100;
  max-width: min(760px, calc(100% - 24px));
  box-shadow: 0 14px 34px rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.16);
}

/* Spinner */
.spinner{
  width:14px;
  height:14px;
  border:2px solid rgba(255,255,255,.35);
  border-top-color: rgba(255,255,255,1);
  border-radius: 99px;
  display:inline-block;
  animation: spin .8s linear infinite;
}

@keyframes spin{
  to{transform: rotate(360deg)}
}

/* Step 2 helper text */
.titleBlock .uploadHint{
  margin: 6px 0 0;
  color: rgba(82,101,125,.88);
  font-size: .92rem;
  line-height: 1.4;
  font-weight: 500;
}

.titleBlock .uploadHint + .uploadHint{
  margin-top: 3px;
}

/* Modal */
.modalOverlay{
  position: fixed;
  inset: 0;
  background: rgba(7,17,31,.38);
  backdrop-filter: blur(8px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 999;
}

.modalCard{
  background: rgba(255,255,255,.96);
  border:1px solid rgba(0,47,108,.14);
  border-radius: 18px;
  padding: 26px 28px;
  width: min(420px, 92%);
  text-align:center;
  box-shadow: 0 30px 80px rgba(0,47,108,.18);
}

.modalCard h3{
  margin:0 0 10px;
  font-size: 20px;
  font-weight: 900;
  color: #07111F;
}

.modalCard p{
  margin:0 0 18px;
  font-size:14px;
  color: var(--muted);
  line-height:1.45;
}

/* Footer */
.site-footer{
  margin-top: 56px;
  padding: 22px 16px;
  border-top: 1px solid rgba(0,47,108,.12);
  background: rgba(255,255,255,.46);
}

.footer-inner{
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.footer-title{
  font-weight: 900;
  letter-spacing: .2px;
  margin-bottom: 6px;
  color:#07111F;
}

.footer-muted{
  color: var(--muted);
  opacity: .92;
  font-size: 13px;
  line-height: 1.45;
}

.footer-links{
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

.site-footer a{
  color: #003F8A;
  text-decoration: none;
  opacity: .92;
}

.site-footer a:hover{
  opacity: 1;
  text-decoration: underline;
}

.site-footer a:focus{
  outline: none;
  box-shadow: var(--focus);
  border-radius: 8px;
}

.footer-links a:first-child{
  font-weight: 800;
  opacity: .98;
}

/* Mobile */
@media (max-width: 820px){
  .footer-inner{
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links{
    align-items: center;
  }
}

@media (max-width: 720px){
  .wrap{
    padding-top: 0 !important;
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar-inner{
    padding: 14px 18px;
    align-items:flex-start;
  }

  .nav{
    gap: 10px;
  }

  .nav a{
    font-size: 15px;
    padding: 9px 10px;
  }

  .hero{
    padding-top: 34px !important;
    padding-bottom: 20px !important;
    margin-bottom: 20px !important;
  }

  .logoWrap{
    width: min(560px, 92vw) !important;
    max-width: 560px !important;
    margin-bottom: 8px !important;
  }

  .logoHero{
    max-width: 560px !important;
  }

  .hero h1{
    font-size: clamp(34px, 8.8vw, 52px) !important;
    line-height: 1.14 !important;
    margin-bottom: 18px !important;
    letter-spacing: -1.4px;
  }

  .hero .sub{
    font-size: clamp(18px, 4.6vw, 23px) !important;
    line-height: 1.55 !important;
    max-width: 36ch !important;
  }

  .card{
    padding: 18px;
  }
}

@media (max-width: 420px){
  .logoWrap{
    width: min(520px, 96vw) !important;
    max-width: 520px !important;
    margin-bottom: 6px !important;
  }

  .logoHero{
    max-width: 520px !important;
  }

  .hero h1{
    font-size: clamp(34px, 9.5vw, 46px) !important;
  }
  
  .math-task {
  border: 1px solid rgba(30, 64, 175, 0.2);
  border-radius: 18px;
  padding: 18px;
  margin: 18px 0;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.math-step-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
}

.math-step-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
}

.math-step-text {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
}

.math-task button {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  background: #1d4ed8;
  color: #fff;
  font-weight: 700;
}

.math-task .move-up,
.math-task .move-down {
  padding: 6px 9px;
}

.math-visible-steps {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.math-line,
.missing-step-input {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.missing-step-input {
  background: #fff;
}

.math-free-answer {
  width: 100%;
  min-height: 120px;
  border-radius: 14px;
  border: 1px solid #dbeafe;
  padding: 12px;
  resize: vertical;
}

.math-feedback {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: #f1f5f9;
}

.math-feedback.correct {
  background: #dcfce7;
  color: #166534;
}

.math-feedback.wrong,
.math-feedback.error {
  background: #fee2e2;
  color: #991b1b;
}
  
}
/* --------------------------------------------------------------------------
   APUOPE INDEX CAROUSEL POLISH
   -------------------------------------------------------------------------- */

.hero{
  padding-top: 18px !important;
  padding-bottom: 8px !important;
  margin-bottom: 14px !important;
}

.hero h1{
  letter-spacing: -1.55px;
}

.hero .sub{
  max-width: 720px !important;
}

.microProof{
  margin-top: 18px;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  font-size:12px;
  color:#405772;
}

.microProof span{
  background:rgba(255,255,255,.58);
  border:1px solid rgba(0,87,184,.12);
  padding:8px 12px;
  border-radius:999px;
  box-shadow: 0 8px 22px rgba(0,47,108,.07);
  font-weight:800;
}

.flowProgress{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin: 6px 0 16px;
  flex-wrap:wrap;
}

.flowStep{
  appearance:none;
  border:1px solid rgba(0,87,184,.14);
  padding:10px 16px;
  border-radius:999px;
  background: rgba(255,255,255,.72);
  font-weight:900;
  color:#334963;
  font-size:13px;
  cursor:pointer;
  box-shadow: 0 8px 22px rgba(0,47,108,.06);
  transition: background .2s ease, color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.flowStep:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.92);
}

.flowStep.active{
  background:#0057B8;
  color:#fff;
  border-color:rgba(0,87,184,.62);
  box-shadow:0 10px 24px rgba(0,87,184,.24);
}

.flowLine{
  width:32px;
  height:2px;
  border-radius:999px;
  background:rgba(0,87,184,.20);
}

.card{
  position:relative;
  overflow:hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:4px;
  background: linear-gradient(90deg, #0057B8, #4DA3FF);
  opacity:.92;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(0,47,108,.18);
}

.titleBlock .uploadHint,
.card .subtext,
.card p,
.status{
  color: rgba(64,87,114,.94);
}

.card h2{
  font-size: 18px;
  line-height: 1.2;
}

.grid.stepCarousel{
  min-height: 500px !important;
}

.stepControls{
  margin-top: 4px !important;
}

.stepArrow,
.stepDot{
  border-color: rgba(0,87,184,.16) !important;
  background: rgba(255,255,255,.62) !important;
  color: #003F8A !important;
}

.stepDot.active{
  background: #0057B8 !important;
  border-color: rgba(0,87,184,.72) !important;
}

.btn.primary{
  box-shadow: 0 14px 30px rgba(0,87,184,.26);
}

.fileTag{
  font-weight:800;
}

@media (max-width: 720px){
  .topbar-inner{
    padding: 12px 18px !important;
    align-items:center !important;
  }

  .nav{
    gap: 8px !important;
  }

  .nav a{
    font-size: 14px !important;
    padding: 8px 9px !important;
  }

  .register-link{
    padding: 8px 12px !important;
  }

  .hero{
    padding-top: 20px !important;
    padding-bottom: 8px !important;
    margin-bottom: 10px !important;
  }

  .hero h1{
    font-size: clamp(31px, 8.2vw, 44px) !important;
    margin-bottom: 12px !important;
  }

  .hero .sub{
    font-size: clamp(17px, 4.25vw, 21px) !important;
    line-height: 1.5 !important;
  }

  .microProof{
    margin-top: 14px;
    gap: 8px;
  }

  .microProof span{
    padding:7px 10px;
    font-size:11px;
  }

  .flowProgress{
    margin: 4px 0 12px;
    gap: 7px;
  }

  .flowStep{
    padding: 8px 10px;
    font-size: 12px;
  }

  .flowLine{
    width: 16px;
  }

  .grid.stepCarousel{
    min-height: 540px !important;
  }

  .card{
    padding:16px !important;
  }

  .cardHeader{
    margin-bottom: 8px;
  }

  .row{
    gap:8px;
    margin-top:8px;
  }

  .fileRow{
    gap:8px;
    margin-top:8px;
  }

  .actions{
    margin-top:10px;
  }

  .subtext{
    margin-top:8px;
  }
}

@media (max-width: 430px){
  .topbar-inner{
    display:grid !important;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }

  .nav-main{
    grid-column: 1 / 2;
  }

  .nav-auth{
    grid-column: 2 / 3;
    justify-content:flex-end;
  }

  .nav-main a:nth-child(3){
    flex-basis: 100%;
  }

  .login-link{
    display:none;
  }

  .hero .sub{
    max-width: 34ch !important;
  }

  .flowProgress{
    justify-content:flex-start;
    overflow-x:auto;
    padding-bottom: 4px;
    flex-wrap:nowrap;
  }

  .flowProgress::-webkit-scrollbar{
    display:none;
  }

  .flowStep{
    white-space:nowrap;
  }

  .grid.stepCarousel{
    min-height: 520px !important;
  }

  .grid.stepCarousel .card{
    width: min(640px, 93vw) !important;
  }

  .card h2{
    font-size: 17px;
  }
}


/* --------------------------------------------------------------------------
   APUOPE INDEX PAGE-SPECIFIC STYLES MOVED FROM index.php
   -------------------------------------------------------------------------- */
/*
    |--------------------------------------------------------------------------
    | HERO LOGO SPACING FIX
    |--------------------------------------------------------------------------
    | Keeps the new APUOPE logo closer to the slogan.
    |--------------------------------------------------------------------------
    */

    .hero {
      padding-top: 26px;
    }

    .logoWrap {
      margin-bottom: 8px !important;
    }

    .logoHero {
      display: block;
      max-width: 280px;
      width: min(280px, 72vw);
      height: auto;
      margin: 0 auto;
    }

    .hero h1 {
      margin-top: 10px !important;
    }

    .hero .sub {
      margin-top: 12px;
    }

    /*
    |--------------------------------------------------------------------------
    | LOADING OVERLAY
    |--------------------------------------------------------------------------
    | Blue / white APUOPE brand style.
    |--------------------------------------------------------------------------
    */

    .apuope-loading {
      position: fixed;
      inset: 0;
      background: rgba(3, 4, 8, 0.94);
      backdrop-filter: blur(14px);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 99999;
      color: #fff;
    }

    .apuope-loading.hidden {
      display: none;
    }

    .apuope-loading-card {
      width: min(440px, 92vw);
      background:
        radial-gradient(circle at 50% 0%, rgba(255,255,255,0.10), transparent 35%),
        radial-gradient(circle at 50% 40%, rgba(47,128,237,0.10), transparent 42%),
        rgba(12, 14, 22, 0.96);
      border: 1px solid rgba(255,255,255,0.14);
      border-radius: 26px;
      padding: 36px 26px;
      text-align: center;
      box-shadow:
        0 28px 90px rgba(0,0,0,0.65),
        0 0 42px rgba(255, 255, 255, 0.08),
        0 0 52px rgba(47, 128, 237, 0.16);
    }

    .apuope-search-loader {
      width: 150px;
      height: 120px;
      margin: 0 auto 24px;
      position: relative;
      animation: searchFloat 2.8s ease-in-out infinite;
    }

    .search-glass {
      width: 78px;
      height: 78px;
      border-radius: 50%;
      position: absolute;
      left: 34px;
      top: 4px;

      border: 12px solid transparent;
      background:
        linear-gradient(#05070c, #05070c) padding-box,
        conic-gradient(
          from 0deg,
          #ffffff,
          #dbeafe,
          #2f80ed,
          #0047a0,
          #003b82,
          #2f80ed,
          #ffffff
        ) border-box;

      box-shadow:
        0 0 18px rgba(255,255,255,.32),
        0 0 34px rgba(47,128,237,.42),
        inset 0 0 18px rgba(255,255,255,.08);

      animation: glassWiggle 1.35s ease-in-out infinite;
    }

    .search-glass::after {
      content: "";
      position: absolute;
      width: 48px;
      height: 13px;
      border-radius: 999px;
      right: -42px;
      bottom: -22px;
      transform: rotate(45deg);
      background: linear-gradient(
        90deg,
        #ffffff,
        #2f80ed,
        #0047a0
      );
      box-shadow:
        0 0 16px rgba(255,255,255,.28),
        0 0 26px rgba(47,128,237,.42);
    }

    .search-glass::before {
      content: "";
      position: absolute;
      inset: 13px;
      border-radius: 50%;
      background:
        radial-gradient(circle at 35% 28%, rgba(255,255,255,.38), transparent 18%),
        radial-gradient(circle at 60% 70%, rgba(47,128,237,.22), transparent 35%);
    }

    .search-spark {
      position: absolute;
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: #fff;
      box-shadow:
        0 0 12px rgba(255,255,255,.9),
        0 0 22px rgba(47,128,237,.75);
      opacity: .85;
    }

    .spark-1 {
      left: 18px;
      top: 18px;
      animation: sparkBlink 1.2s ease-in-out infinite;
    }

    .spark-2 {
      right: 14px;
      top: 34px;
      animation: sparkBlink 1.6s ease-in-out infinite;
    }

    .spark-3 {
      left: 58px;
      bottom: 2px;
      animation: sparkBlink 1.9s ease-in-out infinite;
    }

    @keyframes searchFloat {
      0% {
        transform: translateX(-14px) translateY(0) rotate(-7deg);
      }

      35% {
        transform: translateX(18px) translateY(-10px) rotate(8deg);
      }

      70% {
        transform: translateX(-4px) translateY(8px) rotate(-3deg);
      }

      100% {
        transform: translateX(-14px) translateY(0) rotate(-7deg);
      }
    }

    @keyframes glassWiggle {
      0%, 100% {
        transform: rotate(0deg) scale(1);
      }

      50% {
        transform: rotate(18deg) scale(1.05);
      }
    }

    @keyframes sparkBlink {
      0%, 100% {
        transform: scale(.7);
        opacity: .35;
      }

      50% {
        transform: scale(1.25);
        opacity: 1;
      }
    }

    .apuope-loading-card h2 {
      margin: 0 0 10px;
      font-size: 1.35rem;
    }

    .apuope-loading-card p {
      margin: 0 0 22px;
      color: rgba(255,255,255,0.74);
      line-height: 1.45;
    }

    .apuope-progress {
      width: 100%;
      height: 9px;
      border-radius: 999px;
      background: rgba(255,255,255,0.08);
      overflow: hidden;
      margin-bottom: 18px;
    }

    .apuope-progress > div {
      width: 24%;
      height: 100%;
      border-radius: 999px;
      background:
        linear-gradient(
          90deg,
          #ffffff,
          #dbeafe,
          #2f80ed,
          #0047a0,
          #003b82
        );
      animation: apuopeProgress 2.2s ease-in-out infinite;
      box-shadow:
        0 0 12px rgba(255,255,255,.35),
        0 0 16px rgba(47,128,237,.45);
    }

    @keyframes apuopeProgress {
      0% {
        transform: translateX(-130%);
        width: 22%;
      }

      50% {
        width: 58%;
      }

      100% {
        transform: translateX(430%);
        width: 22%;
      }
    }

    .loading-steps {
      display: grid;
      gap: 10px;
    }

    .loading-step {
      padding: 11px 14px;
      border-radius: 13px;
      background: rgba(255,255,255,0.06);
      color: rgba(255,255,255,0.52);
      font-size: .92rem;
    }

    .loading-step.active {
      background:
        linear-gradient(
          90deg,
          rgba(255,255,255,.18),
          rgba(47,128,237,.22),
          rgba(0,71,160,.28)
        );
      color: #fff;
      animation: apuopePulse 1.2s ease-in-out infinite;
      box-shadow:
        0 0 18px rgba(47,128,237,.22),
        inset 0 0 0 1px rgba(255,255,255,.10);
    }

    @keyframes apuopePulse {
      0%, 100% {
        transform: scale(1);
        opacity: 1;
      }

      50% {
        transform: scale(1.025);
        opacity: .86;
      }
    }

    /*
    |--------------------------------------------------------------------------
    | STEP 2 SUPPORT TEXT FIX
    |--------------------------------------------------------------------------
    | Makes the extra upload guidance look like helper copy, not duplicate titles.
    |--------------------------------------------------------------------------
    */

    .titleBlock .uploadHint {
      margin: 6px 0 0;
      color: rgba(64,87,114,.92);
      font-size: .92rem;
      line-height: 1.4;
      font-weight: 500;
    }

    .titleBlock .uploadHint + .uploadHint {
      margin-top: 3px;
    }


    /*
    |--------------------------------------------------------------------------
    | STEP CAROUSEL / ONE STEP AT A TIME
    |--------------------------------------------------------------------------
    | Shows the active step in front and keeps nearby steps visible in the
    | background with a subtle 3D rotation.
    |--------------------------------------------------------------------------
    */

    .grid.stepCarousel {
      position: relative;
      display: grid;
      place-items: center;
      min-height: 500px;
      perspective: 1400px;
      overflow: visible;
    }

    .grid.stepCarousel .card {
      width: min(780px, 94vw);
      position: absolute;
      left: 50%;
      top: 50%;
      transform-style: preserve-3d;
      transition:
        transform .58s cubic-bezier(.2,.8,.2,1),
        opacity .36s ease,
        filter .36s ease;
      will-change: transform, opacity, filter;
    }

    .grid.stepCarousel .card:not(.step-active) {
      pointer-events: none;
    }

    .grid.stepCarousel .card.step-active {
      opacity: 1;
      filter: blur(0);
      transform: translate(-50%, -50%) rotateY(0deg) scale(1);
      z-index: 5;
    }

    .grid.stepCarousel .card.step-prev {
      opacity: .34;
      filter: blur(2px);
      transform: translate(calc(-50% - 34vw), -50%) rotateY(38deg) scale(.84);
      z-index: 2;
    }

    .grid.stepCarousel .card.step-next {
      opacity: .34;
      filter: blur(2px);
      transform: translate(calc(-50% + 34vw), -50%) rotateY(-38deg) scale(.84);
      z-index: 2;
    }

    .grid.stepCarousel .card.step-hidden {
      opacity: 0;
      filter: blur(5px);
      transform: translate(-50%, calc(-50% + 42px)) rotateX(18deg) scale(.74);
      z-index: 1;
    }

    .stepControls {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 12px;
      margin: 18px auto 0;
    }

    .stepArrow,
    .stepDot {
      border: 1px solid rgba(255,255,255,.28);
      background: rgba(255,255,255,.10);
      color: rgba(255,255,255,.82);
      box-shadow: 0 10px 30px rgba(0,0,0,.16);
    }

    .stepArrow {
      width: 38px;
      height: 38px;
      border-radius: 999px;
      cursor: pointer;
      font-size: 1.15rem;
      line-height: 1;
    }

    .stepArrow:disabled {
      opacity: .35;
      cursor: not-allowed;
    }

    .stepDots {
      display: flex;
      gap: 9px;
      align-items: center;
    }

    .stepDot {
      width: 10px;
      height: 10px;
      border-radius: 999px;
      padding: 0;
      cursor: pointer;
      transition: width .25s ease, background .25s ease, opacity .25s ease;
    }

    .stepDot.active {
      width: 32px;
      background: #fff;
      border-color: rgba(255,255,255,.85);
    }


    .stepSwipeHint {
      margin: 8px auto 0;
      text-align: center;
      font-size: 12px;
      color: rgba(51,73,99,.78);
      user-select: none;
    }

    .grid.stepCarousel {
      touch-action: pan-y;
      user-select: none;
      -webkit-user-select: none;
    }

    .grid.stepCarousel.is-swiping .card {
      transition: none;
    }

    @media (max-width: 760px) {
      .grid.stepCarousel {
        min-height: 540px;
        overflow: hidden;
      }

      .grid.stepCarousel .card.step-prev {
        transform: translate(calc(-50% - 58vw), -50%) rotateY(42deg) scale(.78);
      }

      .grid.stepCarousel .card.step-next {
        transform: translate(calc(-50% + 58vw), -50%) rotateY(-42deg) scale(.78);
      }
    }
.nav .blog-link {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #e8ecff);
  color: #111827;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35), 0 8px 22px rgba(0,0,0,0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.nav .blog-link:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #ffffff, #dbe4ff);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.55), 0 12px 30px rgba(0,0,0,0.26);
}

.nav .blog-link:active {
  transform: translateY(0);
}


/* --------------------------------------------------------------------------
   APUOPE SINGLE UPLOAD INDEX OVERRIDE
   --------------------------------------------------------------------------
   The index page now has one action only:
   Upload material -> create learning session -> analyze -> create practice.
   These overrides neutralize the old multi-step carousel layout.
   -------------------------------------------------------------------------- */

.flowProgress,
.flowStep,
.flowLine,
.stepControls,
.stepArrow,
.stepDots,
.stepDot,
.stepSwipeHint {
  display: none !important;
}

.wrap {
  max-width: var(--max) !important;
  margin: 0 auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

.grid,
.grid.stepCarousel {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 64px auto 0 !important;
  padding: 0 !important;
  position: static !important;
  perspective: none !important;
  overflow: visible !important;
  user-select: auto !important;
  -webkit-user-select: auto !important;
  touch-action: auto !important;
}

.grid.stepCarousel .card,
.grid .card,
#stepUpload {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: min(780px, 94vw) !important;
  max-width: 780px !important;
  margin: 0 auto !important;
  opacity: 1 !important;
  filter: none !important;
  z-index: auto !important;
  pointer-events: auto !important;
}

.grid.stepCarousel .card:not(.step-active),
.grid.stepCarousel .card.step-active,
.grid.stepCarousel .card.step-prev,
.grid.stepCarousel .card.step-next,
.grid.stepCarousel .card.step-hidden {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
  z-index: auto !important;
  pointer-events: auto !important;
}

.card:hover {
  transform: none !important;
}

@media (max-width: 760px) {
  .grid,
  .grid.stepCarousel {
    min-height: 0 !important;
    margin-top: 32px !important;
    overflow: visible !important;
  }

  .grid.stepCarousel .card,
  .grid .card,
  #stepUpload {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 430px) {
  .grid.stepCarousel {
    justify-content: center !important;
    overflow: visible !important;
  }

  .grid.stepCarousel .card,
  .grid.stepCarousel .card.step-prev,
  .grid.stepCarousel .card.step-next,
  .grid.stepCarousel .card.step-hidden,
  .grid.stepCarousel .card.step-active {
    width: 100% !important;
    transform: none !important;
  }
}
