/* ============================================================
   CYBER KNIGHTS — Royal Burgundy · Cream · Gold Luxury Design
   ============================================================ */

:root{
  /* ============ Base Colors (Burgundy Family) ============ */
  --bg-deep: #1A0810;
  --bg-base: #240C18;
  --bg-surface: #2E1120;
  --bg-elevated: #3A1528;
  --bg-glass: rgba(46, 17, 32, 0.78);

  /* ============ Accents (Gold Family) ============ */
  --primary: #D4AF37;              /* Rich gold */
  --primary-glow: #F4E4A6;          /* Light gold shimmer */
  --primary-dim: #8B6914;           /* Deep gold */
  --primary-soft: rgba(212, 175, 55, 0.09);
  --primary-tint: rgba(212, 175, 55, 0.16);

  /* ============ Secondary Accents ============ */
  --cyan: #E8D5B7;                  /* Cream accent (was cyan) */
  --cyan-soft: rgba(232, 213, 183, 0.1);
  --amber: #C9A227;                 /* Antique gold */
  --amber-soft: rgba(201, 162, 39, 0.1);
  --red: #B23A48;                   /* Wine red / danger */
  --red-soft: rgba(178, 58, 72, 0.1);
  --purple: #7C3A56;                /* Plum */

  /* ============ Text (Cream Family) ============ */
  --text-hi: #FAF3E3;               /* Cream white */
  --text-md: #D4C5A8;               /* Warm cream */
  --text-lo: #8B7B5F;               /* Muted gold-cream */

  /* ============ Borders ============ */
  --border-subtle: rgba(212, 175, 55, 0.1);
  --border-medium: rgba(212, 175, 55, 0.25);
  --border-strong: rgba(212, 175, 55, 0.45);
  --border-neutral: rgba(250, 243, 227, 0.07);

  /* ============ Shadows ============ */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.35);
  --shadow-glow-intense: 0 0 60px rgba(212, 175, 55, 0.55);

  /* ============ Radii ============ */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: dark; }

body {
  font-family: 'Manrope', system-ui, sans-serif;
  background: var(--bg-deep);
  color: var(--text-md);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  position: relative;
}

/* Ambient background gradient — burgundy with gold highlights */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(212, 175, 55, 0.08), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(178, 58, 72, 0.08), transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.04), transparent 60%);
  z-index: 0;
  pointer-events: none;
}

h1, h2, h3, .serif { font-family: 'Fraunces', serif; font-weight: 500; letter-spacing: -0.02em; color: var(--text-hi); }
.mono { font-family: 'JetBrains Mono', monospace; }
::selection { background: var(--primary-soft); color: var(--primary-glow); }
a { color: inherit; text-decoration: none; }

/* ============ Background Layers ============ */
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(212, 175, 55, 0.06), transparent 70%);
  transition: background .15s ease-out;
}

.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 30%, rgba(26, 8, 16, 0.75) 100%);
}

#trail { position: fixed; inset: 0; z-index: 40; pointer-events: none; }

.cursor-dot {
  position: fixed; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 16px var(--primary), 0 0 32px var(--primary-soft);
}
.cursor-ring {
  position: fixed; top: 0; left: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid rgba(212, 175, 55, 0.55); pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .25s ease, height .25s ease, border-color .25s, background .25s;
}
.cursor-ring.big {
  width: 72px; height: 72px;
  border-color: var(--primary); background: var(--primary-soft);
  box-shadow: 0 0 40px var(--primary-soft);
}
@media (pointer: coarse) { .cursor-dot, .cursor-ring, #trail { display: none; } }
body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor input { cursor: none; }

/* ============ Views ============ */
.view { display: none; min-height: 100vh; position: relative; z-index: 2; }
.view.active { display: block; animation: viewIn 0.6s cubic-bezier(.16, 1, .3, 1); }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.hidden { display: none !important; }

/* ============ Splash ============ */
#splash-screen {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(26, 8, 16, 0.55);
  backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .6s, visibility .6s;
}
#splash-screen.active { opacity: 1; visibility: visible; }
#splash-screen.fade-out { opacity: 0; visibility: hidden; }
.splash-inner { text-align: center; position: relative; }

.splash-ring {
  position: absolute; top: 50%; left: 50%;
  width: 260px; height: 260px; margin: -130px 0 0 -130px;
  border: 1px solid var(--primary); border-radius: 50%;
  opacity: 0;
  animation: splashRing 2.4s ease-out infinite;
}
.splash-ring:nth-child(1) { animation-delay: 0s; }
@keyframes splashRing {
  0%   { transform: scale(0.6); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}
.splash-shield {
  width: 200px;
  height: 200px;
  margin: 0 auto 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: transparent;
  animation: splashPulse 2.4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
  padding: 0;
}
.splash-shield img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: drop-shadow(0 0 20px var(--primary)) drop-shadow(0 0 40px var(--primary-soft));
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(212, 175, 55, 0.45); }
  50%      { transform: scale(1.06); box-shadow: 0 0 80px rgba(212, 175, 55, 0.75), 0 0 120px rgba(212, 175, 55, 0.4); }
}

.splash-title {
  font-family: 'Fraunces', serif; font-size: 3.5rem; font-weight: 500;
  letter-spacing: -0.03em; margin-bottom: 14px; line-height: 1;
  background: linear-gradient(135deg, #FAF3E3 0%, var(--primary-glow) 50%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.splash-title span { font-style: italic; font-weight: 300; color: var(--primary); -webkit-text-fill-color: var(--primary); }
.splash-sub {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.25em; color: var(--primary-dim); text-transform: uppercase;
  animation: subFlicker 2s ease-in-out infinite;
}
@keyframes subFlicker {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}
.splash-loader {
  width: 260px; height: 2px; background: rgba(212, 175, 55, 0.08);
  margin: 40px auto 0; position: relative; overflow: hidden; border-radius: 2px;
}
.splash-bar {
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: loaderSlide 1.6s ease-in-out infinite;
  box-shadow: 0 0 20px var(--primary);
}
@keyframes loaderSlide { 0% { left: -100%; } 100% { left: 100%; } }

/* ============ Login Page ============ */
.login-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 48px 24px 32px;
  position: relative; z-index: 2;
  animation: loginFadeIn 0.8s cubic-bezier(.16, 1, .3, 1);
}
@keyframes loginFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.login-brand { text-align: center; margin-bottom: 44px; }

.logo-circle-sm {
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  border-radius: 50%;
  background: transparent;
  box-shadow:
    0 0 30px rgba(212, 175, 55, 0.3),
    0 0 60px rgba(212, 175, 55, 0.12);
  position: relative;
  animation: logoFloat 4s ease-in-out infinite;
  overflow: hidden;
  padding: 0;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
.logo-circle-sm::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(212, 175, 55, 0.35);
  border-radius: 50%;
  animation: rotateRing 20s linear infinite;
}
@keyframes rotateRing { to { transform: rotate(360deg); } }
.logo-circle-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: drop-shadow(0 0 12px var(--primary));
}
.login-brand h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 500; letter-spacing: -0.03em;
  line-height: 1.1; margin-bottom: 12px;
  background: linear-gradient(135deg, #FAF3E3 0%, var(--primary-glow) 60%, var(--primary) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-brand h1 span {
  font-style: italic; font-weight: 300;
  color: var(--primary); -webkit-text-fill-color: var(--primary);
}
.login-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.2em;
  color: var(--primary-dim); text-transform: uppercase;
}

.login-card-clean {
  width: 100%; max-width: 440px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
  padding: 44px 40px;
  position: relative; overflow: hidden;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 30px 80px -20px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(212, 175, 55, 0.06),
    inset 0 1px 0 rgba(250, 243, 227, 0.04);
  animation: cardIn 0.8s cubic-bezier(.16, 1, .3, 1) 0.2s both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: none; }
}
.login-card-clean::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 20px var(--primary);
}
.login-card-header { margin-bottom: 32px; }
.login-card-header h2 {
  font-family: 'Fraunces', serif; font-size: 1.65rem;
  font-weight: 500; letter-spacing: -0.02em;
  color: var(--text-hi); margin-bottom: 6px;
}
.login-card-header p { font-size: 13px; color: var(--text-lo); }

/* ============ Forms ============ */
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block; font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: .15em;
  color: var(--primary); text-transform: uppercase; margin-bottom: 10px;
  font-weight: 500;
}
.form-group input,
.form-group select {
  width: 100%; padding: 14px 16px;
  background: rgba(26, 8, 16, 0.65);
  border: 1.5px solid var(--border-neutral); border-radius: var(--radius-md);
  color: var(--text-hi); font-family: 'Manrope', sans-serif;
  font-size: 14px; letter-spacing: .01em;
  transition: all .3s cubic-bezier(.16, 1, .3, 1); outline: none;
}
.form-group input::placeholder { color: var(--text-lo); }
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: rgba(212, 175, 55, 0.04);
  box-shadow:
    0 0 0 4px rgba(212, 175, 55, 0.1),
    0 0 20px rgba(212, 175, 55, 0.18);
}
.form-group input:disabled,
.form-group select:disabled { opacity: 0.5; cursor: not-allowed; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
.toggle-pw {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-lo); cursor: pointer;
  font-size: 15px; padding: 6px; transition: color .25s;
}
.toggle-pw:hover { color: var(--primary); }

textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(26, 8, 16, 0.65);
  border: 1.5px solid var(--border-neutral); border-radius: var(--radius-md);
  color: var(--text-hi); font-family: 'Manrope', sans-serif;
  font-size: 14px; resize: vertical; outline: none;
  transition: all 0.25s;
}
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-row .form-group { margin-bottom: 0; }
.form-group label .hint {
  color: var(--text-lo); font-family: 'Manrope', sans-serif;
  font-size: 11px; font-weight: 400; text-transform: none;
  letter-spacing: 0; margin-left: 6px;
}
.section-divider { height: 1px; background: var(--border-neutral); margin: 28px 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 8px; }
.form-actions .btn-primary { width: auto; padding: 12px 28px; margin: 0; font-size: 13px; }

/* ============ Buttons ============ */
.btn-primary {
  width: 100%; padding: 16px 22px;
  background: linear-gradient(135deg, var(--primary) 0%, #8B6914 100%);
  color: #1A0810; border: none; border-radius: var(--radius-md);
  font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700;
  letter-spacing: .06em; cursor: pointer; transition: all .3s cubic-bezier(.16, 1, .3, 1);
  margin-top: 8px; position: relative; overflow: hidden;
  box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
}
.btn-primary::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: left 0.7s;
}
.btn-primary:hover:not(:disabled)::before { left: 100%; }
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(212, 175, 55, 0.55),
    0 0 40px rgba(212, 175, 55, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-secondary {
  width: 100%; padding: 14px 20px;
  background: transparent; color: var(--text-hi);
  border: 1.5px solid var(--border-medium); border-radius: var(--radius-md);
  font-family: 'Manrope', sans-serif; font-size: 12.5px; font-weight: 600;
  letter-spacing: .04em; cursor: pointer; transition: all .3s; margin-top: 10px;
  text-transform: uppercase;
}
.btn-secondary:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.18);
}

.link-btn {
  background: none; border: none; color: var(--primary);
  font-family: 'Manrope', sans-serif; font-size: 12px;
  letter-spacing: .04em; cursor: pointer; padding: 10px 0; transition: all .25s;
  font-weight: 600;
}
.link-btn:hover { color: var(--primary-glow); text-shadow: 0 0 12px var(--primary); }

.mini-btn {
  background: var(--bg-elevated); border: 1px solid var(--border-neutral);
  color: var(--text-md); padding: 6px 12px; border-radius: var(--radius-sm);
  font-family: 'Manrope', sans-serif; font-size: 11px; font-weight: 600;
  letter-spacing: 0.05em; cursor: pointer; transition: all 0.2s;
  text-transform: uppercase;
}
.mini-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  transform: translateY(-1px);
}
.mini-btn.danger { color: var(--red); border-color: rgba(178, 58, 72, 0.35); }
.mini-btn.danger:hover {
  background: var(--red-soft);
  border-color: var(--red);
  box-shadow: 0 0 16px rgba(178, 58, 72, 0.25);
}

.icon-btn {
  background: var(--bg-surface); border: 1.5px solid var(--border-neutral);
  color: var(--text-md); width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s cubic-bezier(.16, 1, .3, 1);
}
.icon-btn:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-soft);
  transform: scale(1.08);
  box-shadow: 0 0 20px var(--primary-soft);
}

/* ============ Errors ============ */
.error-msg {
  background: var(--red-soft);
  border: 1.5px solid rgba(178, 58, 72, 0.35);
  color: #E8A0AA; padding: 14px 18px; font-size: 12.5px;
  margin-bottom: 18px; letter-spacing: .01em; border-radius: var(--radius-md);
  animation: shake .4s ease;
  display: flex; align-items: center; gap: 10px;
}
.error-msg::before {
  content: '⚠';
  font-size: 16px;
  color: var(--red);
}
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.lockout-msg {
  background: var(--amber-soft);
  border: 1.5px solid rgba(201, 162, 39, 0.35);
  color: var(--amber); padding: 14px 18px; font-size: 12.5px;
  margin-bottom: 18px; letter-spacing: .01em; border-radius: var(--radius-md);
  display: flex; align-items: center; gap: 10px;
}
.lockout-msg::before { content: '🔒'; font-size: 16px; }

/* ============ Topbar ============ */
.topbar {
  position: sticky; top: 0; z-index: 50; padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(24px);
  background: rgba(36, 12, 24, 0.85);
  border-bottom: 1px solid var(--border-neutral);
}
.topbar-left { display: flex; align-items: center; gap: 44px; }
.logo-mini {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Fraunces', serif; font-size: 18px;
  letter-spacing: .02em; color: var(--text-hi);
  font-weight: 600;
}
.logo-mini img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: inline-block;
  filter: drop-shadow(0 0 10px var(--primary-soft));
}
.logo-mini:hover img { filter: drop-shadow(0 0 20px var(--primary)); }
.logo-mini svg { color: var(--primary); width: 22px; height: 22px; }

.main-nav { display: flex; gap: 28px; flex-wrap: wrap; }
.nav-link {
  background: none; border: none; color: var(--text-lo); cursor: pointer;
  font-family: 'Manrope', sans-serif; font-size: 12.5px; font-weight: 500;
  letter-spacing: .05em; padding: 8px 0; position: relative;
  transition: color .3s;
  text-transform: uppercase;
}
.nav-link:hover { color: var(--text-hi); }
.nav-link.active { color: var(--primary); font-weight: 700; }
.nav-link.active::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
  height: 2px; background: var(--primary); border-radius: 1px;
  box-shadow: 0 0 12px var(--primary);
}

.topbar-right { display: flex; align-items: center; gap: 20px; }
.user-menu { display: flex; align-items: center; gap: 16px; font-size: 12.5px; color: var(--text-md); }
.btn-logout {
  background: transparent; border: 1.5px solid var(--border-neutral);
  color: var(--text-md);
  padding: 10px 18px; font-family: 'Manrope', sans-serif; font-size: 11px;
  font-weight: 600; letter-spacing: .08em; cursor: pointer;
  transition: all .3s; border-radius: var(--radius-sm);
  text-transform: uppercase;
}
.btn-logout:hover {
  border-color: var(--red); color: var(--red);
  background: var(--red-soft);
  box-shadow: 0 0 16px rgba(178, 58, 72, 0.25);
}

/* ============ Content ============ */
.content { max-width: 1320px; margin: 0 auto; padding: 60px 40px 120px; position: relative; }
.page { display: none; }
.page.active { display: block; animation: pageIn .6s cubic-bezier(.16, 1, .3, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

.page h2 {
  font-family: 'Fraunces', serif; font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500; letter-spacing: -.03em; color: var(--text-hi);
  margin-bottom: 14px; line-height: 1.1;
}
.page-sub { font-size: 13.5px; color: var(--text-lo); letter-spacing: .01em; margin-bottom: 56px; max-width: 620px; line-height: 1.7; }

/* ============ Cards ============ */
.cards-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 56px; }
@media (min-width: 680px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-neutral);
  border-radius: var(--radius-lg); padding: 30px 26px;
  transition: all .4s cubic-bezier(.16, 1, .3, 1);
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px; background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .5s;
  box-shadow: 0 0 20px var(--primary);
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--border-medium);
  box-shadow:
    var(--shadow-lg),
    0 0 40px rgba(212, 175, 55, 0.1),
    0 0 0 1px rgba(212, 175, 55, 0.18);
}
.card:hover::before { transform: scaleX(1); }
.card h3 {
  font-family: 'Fraunces', serif; font-size: 17px; font-weight: 500;
  color: var(--text-hi); margin-bottom: 10px; letter-spacing: -.01em;
}
.card p { font-size: 13px; color: var(--text-md); line-height: 1.7; }
.card .stat {
  font-family: 'Fraunces', serif; font-size: 2.4rem; font-weight: 600;
  color: var(--primary); letter-spacing: -.03em;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.45);
}

/* Info Box */
.info-box {
  border: 1.5px solid var(--border-neutral);
  background: var(--bg-surface);
  padding: 36px 40px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.info-box h3 {
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: .2em; color: var(--primary);
  text-transform: uppercase; margin-bottom: 24px;
  font-weight: 600;
}
.info-box ul { list-style: none; }
.info-box li {
  padding: 14px 0; border-bottom: 1px solid var(--border-neutral);
  display: flex; gap: 24px; font-size: 13.5px; color: var(--text-hi); align-items: baseline;
}
.info-box li:last-child { border-bottom: none; }
.info-box li strong {
  min-width: 180px; font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: .08em; color: var(--text-lo);
  text-transform: uppercase; font-weight: 500;
}

/* Tables */
.table-wrap {
  border: 1.5px solid var(--border-neutral);
  background: var(--bg-surface);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 600px; }
.data-table th {
  text-align: left; padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .15em; color: var(--primary);
  text-transform: uppercase; font-weight: 600;
  border-bottom: 1.5px solid var(--border-subtle);
  background: rgba(212, 175, 55, 0.04);
}
.data-table td {
  padding: 16px 24px; color: var(--text-md);
  border-bottom: 1px solid var(--border-neutral);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .2s; }
.data-table tbody tr:hover td {
  background: rgba(212, 175, 55, 0.05);
}
.data-table [contenteditable] {
  background: rgba(212, 175, 55, 0.08); outline: none; min-width: 60px;
  padding: 6px 10px; border-radius: 4px; color: var(--text-hi);
}
.data-table [contenteditable]:focus { background: rgba(212, 175, 55, 0.15); box-shadow: 0 0 0 2px var(--primary); }

.logs-toolbar { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.logs-toolbar .btn-secondary { width: auto; padding: 12px 24px; margin: 0; }

.admin-toolbar {
  display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-neutral);
  border-radius: var(--radius-lg);
}
.admin-toolbar .btn-primary,
.admin-toolbar .btn-secondary { width: auto; padding: 10px 20px; margin: 0; font-size: 11px; }

/* ============ Tabs ============ */
.admin-tabs {
  display: flex; gap: 4px; border-bottom: 1.5px solid var(--border-neutral);
  margin-bottom: 32px; flex-wrap: wrap;
}
.admin-tab {
  background: none; border: none; padding: 14px 22px;
  font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; color: var(--text-lo); cursor: pointer;
  position: relative; transition: color 0.25s;
  text-transform: uppercase;
}
.admin-tab:hover { color: var(--text-hi); }
.admin-tab.active { color: var(--primary); }
.admin-tab.active::after {
  content: ''; position: absolute; bottom: -1.5px; left: 0; right: 0;
  height: 2.5px; background: var(--primary); border-radius: 2px;
  box-shadow: 0 0 12px var(--primary);
}
.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; animation: pageIn 0.5s ease; }

/* ============ Badges ============ */
.log-result {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em;
  padding: 4px 10px; border-radius: 4px; text-transform: uppercase;
}
.log-success {
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border-medium);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.18);
}
.log-fail {
  color: #E8A0AA;
  background: var(--red-soft);
  border: 1px solid rgba(178, 58, 72, 0.35);
}
.log-info {
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.ip-cell {
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
  color: var(--cyan); letter-spacing: 0.02em;
  padding: 3px 8px; background: var(--cyan-soft);
  border-radius: 4px; border: 1px solid rgba(232, 213, 183, 0.22);
  display: inline-block;
}

.duration-live {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border-medium);
  padding: 4px 10px; border-radius: 4px;
  display: inline-block; letter-spacing: 0.05em;
  min-width: 70px; text-align: center;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.12);
}

/* ============ Toast ============ */
#toast-container {
  position: fixed; bottom: 36px; left: 50%; transform: translateX(-50%);
  z-index: 1000; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  background: var(--bg-elevated);
  border: 1.5px solid var(--border-medium);
  border-left: 4px solid var(--primary);
  color: var(--text-hi);
  padding: 16px 24px; font-size: 13px;
  box-shadow: var(--shadow-lg), 0 0 30px rgba(212, 175, 55, 0.18);
  border-radius: var(--radius-md);
  animation: toastIn .4s cubic-bezier(.16, 1, .3, 1);
  pointer-events: auto; max-width: 440px; min-width: 280px;
}
.toast.success { border-left-color: var(--primary); box-shadow: var(--shadow-lg), 0 0 30px rgba(212, 175, 55, 0.22); }
.toast.error { border-left-color: var(--red); box-shadow: var(--shadow-lg), 0 0 30px rgba(178, 58, 72, 0.18); }
.toast.info { border-left-color: var(--cyan); box-shadow: var(--shadow-lg), 0 0 30px rgba(232, 213, 183, 0.18); }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ============ Success Overlay ============ */
.success-msg {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 9999;
  display: flex; align-items: center; gap: 14px;
  padding: 22px 36px;
  background: rgba(46, 17, 32, 0.96);
  backdrop-filter: blur(20px);
  border: 2px solid var(--primary); border-radius: var(--radius-lg);
  color: var(--primary);
  font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 600;
  box-shadow:
    0 20px 60px rgba(212, 175, 55, 0.35),
    0 0 0 8px rgba(212, 175, 55, 0.08),
    0 0 80px rgba(212, 175, 55, 0.35),
    inset 0 1px 0 rgba(250, 243, 227, 0.06);
  animation: accessIn 0.5s cubic-bezier(.16, 1, .3, 1) forwards;
  pointer-events: none; white-space: nowrap;
}
.success-msg strong { font-weight: 700; color: var(--primary-glow); text-shadow: 0 0 20px var(--primary); }
.success-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #1A0810;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 24px var(--primary);
  animation: successCheck 0.4s cubic-bezier(.16, 1.6, .3, 1) 0.15s both;
}
.success-icon svg {
  stroke-dasharray: 30; stroke-dashoffset: 30;
  animation: drawCheck 0.5s ease 0.3s forwards;
}
@keyframes accessIn {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
  60%  { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes successCheck { 0% { transform: scale(0); } 60% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes drawCheck { to { stroke-dashoffset: 0; } }

/* ============ Modal ============ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26, 8, 16, 0.8);
  backdrop-filter: blur(12px);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-lg); width: 100%; max-width: 580px;
  max-height: 90vh; overflow-y: auto;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.65),
    0 0 80px rgba(212, 175, 55, 0.1),
    0 0 0 1px rgba(212, 175, 55, 0.12);
  position: relative;
  animation: modalSlideIn 0.4s cubic-bezier(.16, 1, .3, 1);
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(30px) scale(0.94); }
  to { opacity: 1; transform: none; }
}
.modal-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 24px var(--primary);
}
.modal-card-lg { max-width: 780px; }
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 28px; border-bottom: 1.5px solid var(--border-neutral);
}
.modal-head h3 {
  font-family: 'Fraunces', serif; font-size: 1.25rem;
  font-weight: 500; letter-spacing: -0.02em; color: var(--text-hi);
}
.modal-close {
  background: none; border: none; font-size: 26px; color: var(--text-lo);
  cursor: pointer; line-height: 1; padding: 4px 10px; border-radius: var(--radius-sm);
  transition: all .2s;
}
.modal-close:hover {
  background: var(--red-soft); color: var(--red);
}
.modal-body { padding: 26px 28px 28px; }
.modal-body .form-group { margin-bottom: 0; }
.modal-body .form-row { margin-bottom: 18px; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 12px;
  margin-top: 24px; padding-top: 22px; border-top: 1.5px solid var(--border-neutral);
}
.modal-actions .btn-primary,
.modal-actions .btn-secondary {
  width: auto; margin: 0; padding: 11px 24px; font-size: 11.5px;
}
.modal-subtitle {
  font-family: 'Fraunces', serif; font-size: 15px;
  font-weight: 500; color: var(--text-hi); margin: 0;
}
.modal-hint { font-size: 12px; color: var(--text-lo); margin-bottom: 16px; }
.profile-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.profile-fields-grid .form-group { margin: 0; }

/* ============ Assignments / Quizzes / Exams ============ */
.assignment-card, .quiz-card, .exam-card {
  display: flex; flex-direction: column; gap: 12px;
}
.assignment-card.expired { opacity: 0.7; border-color: rgba(178, 58, 72, 0.28); }
.assignment-meta, .quiz-meta, .exam-meta {
  font-size: 12px; color: var(--text-lo);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}
.assignment-btn {
  width: auto; padding: 10px 22px; margin-top: 8px;
  font-size: 11.5px; align-self: flex-start;
}
.assignment-status {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  padding: 6px 12px; border-radius: 4px; display: inline-block;
  letter-spacing: 0.1em; text-transform: uppercase; font-weight: 700;
  align-self: flex-start;
}
.assignment-status.submitted {
  background: var(--primary-soft); color: var(--primary);
  border: 1px solid var(--border-medium);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.18);
}
.assignment-status.expired {
  background: var(--red-soft); color: var(--red);
  border: 1px solid rgba(178, 58, 72, 0.35);
}
.assignment-marks-earned {
  font-family: 'Fraunces', serif; font-size: 24px;
  color: var(--primary); margin-top: 8px;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.45);
}
.assignment-marks-pending { font-size: 12px; color: var(--text-lo); font-style: italic; }

.quiz-done {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  padding: 8px 14px;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--border-medium);
  border-radius: 4px; align-self: flex-start;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.15);
}

.card-actions {
  display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px;
  padding-top: 14px; border-top: 1px solid var(--border-neutral);
}

.empty-msg {
  font-size: 13px; color: var(--text-lo);
  padding: 40px 30px; text-align: center;
  grid-column: 1 / -1;
  font-style: italic;
}

.student-checkbox-list {
  max-height: 240px; overflow-y: auto;
  border: 1.5px solid var(--border-neutral); border-radius: var(--radius-md);
  padding: 10px; background: rgba(26, 8, 16, 0.45);
}
.student-checkbox-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13px; color: var(--text-md);
  transition: all 0.15s;
}
.student-checkbox-item:hover { background: var(--primary-soft); color: var(--text-hi); }
.student-checkbox-item input[type=checkbox] {
  width: 16px; height: 16px; accent-color: var(--primary);
  cursor: pointer; flex-shrink: 0;
}
.student-checkbox-item em {
  color: var(--text-lo); font-style: normal; font-size: 11px;
}

.quiz-question-block {
  border: 1.5px solid var(--border-neutral); border-radius: var(--radius-md);
  padding: 16px; margin-top: 12px;
  background: rgba(26, 8, 16, 0.45);
}
.quiz-question-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.quiz-question-head strong { font-size: 12px; color: var(--primary); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; }

.quiz-timer {
  font-family: 'JetBrains Mono', monospace; font-size: 14px;
  color: var(--primary); font-weight: 700; letter-spacing: 0.1em;
  padding: 8px 16px; background: var(--primary-soft);
  border: 1.5px solid var(--border-medium); border-radius: var(--radius-sm);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.18);
  animation: timerPulse 2s ease-in-out infinite;
}
@keyframes timerPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(212, 175, 55, 0.18); }
  50%      { box-shadow: 0 0 30px rgba(212, 175, 55, 0.35); }
}
.quiz-q-block { padding: 20px 0; border-bottom: 1px solid var(--border-neutral); }
.quiz-q-block:last-child { border-bottom: none; }
.quiz-q-head { font-size: 14.5px; margin-bottom: 16px; color: var(--text-hi); }
.quiz-q-head em { color: var(--text-lo); font-size: 11px; font-style: normal; font-family: 'JetBrains Mono', monospace; }
.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border: 1.5px solid var(--border-neutral);
  border-radius: var(--radius-md); cursor: pointer; font-size: 13.5px;
  color: var(--text-md);
  transition: all 0.2s cubic-bezier(.16, 1, .3, 1);
}
.quiz-option:hover {
  background: var(--primary-soft);
  border-color: var(--border-medium);
  color: var(--text-hi);
  transform: translateX(4px);
}
.quiz-option input[type=radio] { accent-color: var(--primary); cursor: pointer; }
.quiz-option input[type=radio]:checked ~ span { color: var(--primary); font-weight: 600; }

.quiz-review-banner {
  padding: 18px 22px;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary); border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: inset 0 0 40px rgba(212, 175, 55, 0.06);
}
.quiz-review-banner h3 { font-family: 'Fraunces', serif; font-size: 17px; margin-bottom: 4px; color: var(--text-hi); }
.quiz-review-banner p { font-size: 12.5px; color: var(--text-lo); }
.quiz-review-item { padding: 14px 0; border-bottom: 1px solid var(--border-neutral); }
.quiz-review-q { font-size: 13.5px; margin-bottom: 6px; color: var(--text-hi); }
.quiz-review-a { font-size: 12px; color: var(--text-lo); font-family: 'JetBrains Mono', monospace; }

.quiz-result-hero { text-align: center; padding: 24px 20px; margin-bottom: 24px; }
.quiz-score-circle {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 180px; height: 180px; border-radius: 50%; margin: 0 auto 16px;
  animation: scoreReveal 0.8s cubic-bezier(.16, 1.6, .3, 1);
}
@keyframes scoreReveal {
  0%   { transform: scale(0.5); opacity: 0; }
  60%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.quiz-score-circle.pass {
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.06));
  border: 3px solid var(--primary);
  color: var(--primary);
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.45), inset 0 0 40px rgba(212, 175, 55, 0.18);
}
.quiz-score-circle.fail {
  background: radial-gradient(circle, rgba(178, 58, 72, 0.25), rgba(178, 58, 72, 0.06));
  border: 3px solid var(--red); color: var(--red);
  box-shadow: 0 0 60px rgba(178, 58, 72, 0.45), inset 0 0 40px rgba(178, 58, 72, 0.18);
}
.quiz-score-num { font-family: 'Fraunces', serif; font-size: 2.8rem; font-weight: 600; }
.quiz-score-pct { font-family: 'JetBrains Mono', monospace; font-size: 14px; margin-top: 4px; font-weight: 600; }
.quiz-score-label { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.25em; margin-top: 8px; font-weight: 700; }
.quiz-result-row {
  padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 10px;
  background: rgba(26, 8, 16, 0.45);
  border-left: 3px solid var(--border-neutral);
}
.quiz-result-row.correct { border-left-color: var(--primary); background: rgba(212, 175, 55, 0.05); }
.quiz-result-row.wrong { border-left-color: var(--red); background: rgba(178, 58, 72, 0.05); }
.quiz-result-ans {
  margin-top: 6px; font-size: 12px; color: var(--text-lo);
  font-family: 'JetBrains Mono', monospace;
}

/* ============ Progress ============ */
.progress-hero {
  padding: 44px 36px; border-radius: var(--radius-xl); text-align: center;
  margin-bottom: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.1), transparent 60%),
    var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(250, 243, 227, 0.04);
  position: relative;
  overflow: hidden;
}
.progress-hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 30px var(--primary);
}
.progress-score-big {
  font-family: 'Fraunces', serif; font-size: 4.5rem;
  font-weight: 600; color: var(--primary);
  letter-spacing: -0.04em; line-height: 1;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.55);
}
.progress-score-big span { font-size: 2rem; color: var(--text-lo); font-weight: 400; text-shadow: none; }
.progress-pct {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  letter-spacing: 0.25em; color: var(--text-md);
  margin-top: 12px; text-transform: uppercase;
  font-weight: 600;
}
.progress-bar-wrap {
  width: 100%; max-width: 520px; height: 10px;
  background: rgba(212, 175, 55, 0.08); border-radius: 5px;
  margin: 24px auto 8px; overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-dim), var(--primary), var(--primary-glow));
  border-radius: 5px; transition: width 1s cubic-bezier(.16, 1, .3, 1);
  box-shadow: 0 0 20px var(--primary), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
}
.progress-bar::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: progressShine 2s linear infinite;
}
@keyframes progressShine {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.progress-note { font-size: 12px; color: var(--text-lo); margin-top: 16px; }
.progress-breakdown {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.progress-card {
  background: var(--bg-surface); border: 1.5px solid var(--border-neutral);
  border-radius: var(--radius-lg); padding: 26px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(.16, 1, .3, 1);
  position: relative;
  overflow: hidden;
}
.progress-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
  background: var(--primary); opacity: 0.65;
}
.progress-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md), 0 0 30px rgba(212, 175, 55, 0.12);
}
.progress-card h4 {
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.2em; color: var(--text-lo);
  text-transform: uppercase; margin-bottom: 16px;
  font-weight: 600;
}
.progress-num {
  font-family: 'Fraunces', serif; font-size: 2.4rem;
  color: var(--primary); letter-spacing: -0.03em; line-height: 1;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
}
.progress-num span { font-size: 1.2rem; color: var(--text-lo); text-shadow: none; }
.progress-lines {
  margin-top: 20px; display: flex; flex-direction: column; gap: 8px;
  font-size: 12.5px; color: var(--text-md);
}
.progress-lines span { color: var(--text-lo); min-width: 80px; display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 11px; }

/* ============ Dev OTP panel ============ */
#dev-otp-panel {
  position: fixed; top: 24px; right: 24px; z-index: 9500;
  width: 340px;
  background: var(--bg-surface);
  border: 1.5px solid var(--primary); border-radius: var(--radius-lg);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.65),
    0 0 60px rgba(212, 175, 55, 0.22);
  opacity: 0; transform: translateY(-12px);
  transition: opacity .35s, transform .35s; pointer-events: none;
}
#dev-otp-panel.active { opacity: 1; transform: none; pointer-events: auto; }
.dev-otp-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; border-bottom: 1.5px solid var(--border-neutral);
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .2em; color: var(--primary); text-transform: uppercase;
  font-weight: 600;
}
.dev-otp-head button { background: none; border: none; color: var(--text-lo); cursor: pointer; font-size: 16px; }
.dev-otp-body { padding: 20px; }
.dev-otp-label {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: .1em; color: var(--text-lo); margin-bottom: 12px; text-transform: uppercase;
}
.dev-otp-code {
  font-family: 'Fraunces', serif; font-size: 2.4rem; font-weight: 600;
  letter-spacing: .2em; color: var(--primary); text-align: center;
  padding: 16px; background: var(--primary-soft);
  border: 1.5px solid var(--border-medium); border-radius: var(--radius-md);
  user-select: all;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.45);
}
.dev-otp-note { font-size: 11px; color: var(--text-lo); margin-top: 14px; line-height: 1.6; }

/* ============ Scrollbar ============ */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-dim), var(--primary));
  border: 2px solid var(--bg-deep); border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); box-shadow: 0 0 12px var(--primary); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============ Responsive ============ */
@media (max-width: 1000px) {
  .topbar { padding: 16px 20px; }
  .topbar-left { gap: 20px; }
  .main-nav { display: none; }
  .content { padding: 40px 20px 80px; }
  .info-box { padding: 26px 22px; }
  .login-card-clean { padding: 36px 26px; }
}
@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; gap: 16px; }
  .modal-card { max-height: 95vh; }
  .modal-head { padding: 18px 20px; }
  .modal-body { padding: 20px; }
  .profile-form { padding: 22px 20px 26px; }
  .profile-fields-grid { grid-template-columns: 1fr; }
  .quiz-score-circle { width: 150px; height: 150px; }
  .quiz-score-num { font-size: 2.2rem; }
}
@media (max-width: 600px) {
  .splash-title { font-size: 2.2rem; }
  .splash-shield { width: 110px; height: 110px; }
  .login-brand h1 { font-size: 2rem; }
  .page h2 { font-size: 1.85rem; }
  .progress-score-big { font-size: 3rem; }
  .success-msg {
    font-size: 12.5px; padding: 16px 22px; gap: 10px;
    white-space: normal; text-align: center;
    max-width: calc(100vw - 32px);
  }
  .success-icon { width: 28px; height: 28px; }
  #dev-otp-panel { width: calc(100vw - 32px); right: 16px; }
}

/* ============ Ambient scan line effect (Gold) ============ */
@keyframes scan {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(100vh); opacity: 0; }
}
body::after {
  content: '';
  position: fixed;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
  animation: scan 8s linear infinite;
  pointer-events: none;
  z-index: 100;
  opacity: 0.5;
}

/* ============================================================
   CYBER KNIGHTS — PREMIUM BOOK READER v4.0
   ============================================================ */

#page-books { position: relative; isolation: isolate; padding-bottom: 120px; }
#page-books > h2 { max-width: 1180px; margin-inline: auto; font-size: clamp(2rem, 4vw, 3.2rem); color: var(--text-hi); }
#page-books > .page-sub { max-width: 1180px; margin: 8px auto 0; color: var(--text-lo); }
.book-hero { position: relative; max-width: 1180px; min-height: 720px; margin: 34px auto 0; padding: 20px 20px 72px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; overflow: hidden; border: 1px solid rgba(212, 175, 55, 0.16); border-radius: 28px; background: radial-gradient(circle at 50% 37%, rgba(212, 175, 55, 0.1), transparent 22rem), linear-gradient(180deg, rgba(36, 12, 24, 0.7), rgba(26, 8, 16, 0.1) 72%); box-shadow: inset 0 1px 0 rgba(250, 243, 227, 0.05), 0 30px 100px rgba(0, 0, 0, 0.25); }
.book-hero::before, .book-hero::after { content:""; pointer-events:none; border:1px solid rgba(212, 175, 55, 0.09); border-radius:50%; }
.book-hero::before { width:760px; height:760px; top:40px; left:50%; transform:translateX(-50%); }
.book-hero::after { width:540px; height:540px; top:150px; left:50%; transform:translateX(-50%); border-color:rgba(232, 213, 183, 0.07); }
.book-scene { position:relative; z-index:2; width:min(100%,720px); height:455px; display:grid; place-items:center; perspective:1800px; }
.book-scene::before { content:""; width:360px; height:180px; bottom:36px; border-radius:50%; background:rgba(212, 175, 55, 0.18); filter:blur(52px); opacity:.75; transform:rotateX(72deg); }
.book-3d { --book-width:284px; --book-height:380px; position:relative; z-index:3; width:var(--book-width); height:var(--book-height); transform-style:preserve-3d; transform:rotateY(-28deg) rotateX(6deg) rotateZ(-1deg); transition:width 1.15s cubic-bezier(.16,1,.3,1),transform 1.15s cubic-bezier(.16,1,.3,1),filter .6s ease; animation:bookFloat 5s ease-in-out infinite; filter:drop-shadow(28px 34px 34px rgba(0,0,0,.55)) drop-shadow(0 0 30px rgba(212, 175, 55, 0.15)); }
.book-3d.is-opening { animation-play-state:paused; transform:rotateY(0deg) rotateX(0deg) rotateZ(0deg); }
.book-3d.is-open { --book-width:580px; animation:none; transform:rotateY(0deg) rotateX(0deg) rotateZ(0deg); filter:drop-shadow(0 32px 46px rgba(0,0,0,.65)) drop-shadow(0 0 36px rgba(212, 175, 55, 0.25)); }
@keyframes bookFloat { 0%,100% { transform:rotateY(-28deg) rotateX(6deg) rotateZ(-1deg) translateY(0); } 50% { transform:rotateY(-28deg) rotateX(6deg) rotateZ(-1deg) translateY(-14px); } }
.book-cover-front,.book-page-spread,.book-pages-stack,.book-spine { position:absolute; top:0; height:100%; transform-style:preserve-3d; }
.book-cover-front { left:0; width:100%; z-index:5; transform-origin:left center; transition:transform 1.15s cubic-bezier(.16,1,.3,1),box-shadow .6s ease; border:1px solid rgba(212, 175, 55, 0.75); border-radius:5px 16px 16px 5px; background:linear-gradient(135deg,rgba(212, 175, 55, 0.2),transparent 35%),radial-gradient(circle at 20% 20%,rgba(244, 228, 166, 0.18),transparent 35%),linear-gradient(145deg,#4A1826,#3A1528 48%,#2E1120); box-shadow:inset -12px 0 18px rgba(0,0,0,.28),inset 0 0 0 5px rgba(212, 175, 55, 0.05),0 0 0 1px rgba(0,0,0,.9); }
.book-cover-front::before,.book-cover-front::after { content:""; pointer-events:none; }
.book-cover-front::before { inset:13px; border:1px solid rgba(212, 175, 55, 0.4); border-radius:3px 12px 12px 3px; }
.book-cover-front::after { inset:27px; border:1px dashed rgba(244, 228, 166, 0.2); border-radius:2px 9px 9px 2px; }
.book-3d.is-open .book-cover-front { transform:rotateY(-168deg); box-shadow:inset 12px 0 18px rgba(0,0,0,.35); }
.cover-inner { position:absolute; inset:46px 34px 38px; z-index:2; display:flex; flex-direction:column; align-items:center; text-align:center; color:var(--text-hi); transform:translateZ(2px); }
.cover-grid { position:absolute; inset:-25px; opacity:.42; background-image:linear-gradient(rgba(212, 175, 55, 0.1) 1px,transparent 1px),linear-gradient(90deg,rgba(212, 175, 55, 0.1) 1px,transparent 1px); background-size:18px 18px; mask-image:linear-gradient(to bottom,transparent,black 24%,black 76%,transparent); }
.cover-emblem { position:relative; z-index:1; display:grid; place-items:center; width:88px; height:88px; margin:12px 0 26px; border:1px solid rgba(212, 175, 55, 0.5); border-radius:50%; background:rgba(0,0,0,.18); box-shadow:0 0 36px rgba(212, 175, 55, 0.2); }
.cover-emblem svg { filter:drop-shadow(0 0 9px rgba(212, 175, 55, 0.7)); }
.cover-title { position:relative; z-index:1; font:500 26px/1.05 Fraunces,serif; letter-spacing:-.04em; color:#FAF3E3; }
.cover-subtitle { position:relative; z-index:1; margin-top:9px; font:500 10px/1.2 'JetBrains Mono',monospace; letter-spacing:.2em; text-transform:uppercase; color:var(--primary-glow); }
.cover-divider { position:relative; z-index:1; width:54px; height:1px; margin:24px 0 16px; background:var(--primary); box-shadow:0 0 12px var(--primary); }
.cover-author { position:relative; z-index:1; font:10px/1.3 'JetBrains Mono',monospace; letter-spacing:.12em; color:rgba(250, 243, 227, 0.68); }
.book-pages-stack { right:-10px; width:calc(100% - 8px); z-index:1; border-radius:4px 15px 15px 4px; background:repeating-linear-gradient(90deg,#E8DCC4 0,#E8DCC4 2px,#C4B896 2px,#C4B896 3px); transform:translateZ(-7px); box-shadow:10px 12px 0 -2px rgba(0,0,0,.5),15px 19px 0 -5px rgba(0,0,0,.35); }
.book-pages-stack::after { content:""; inset:7px 9px; border:1px solid rgba(0,0,0,.2); border-radius:3px 11px 11px 3px; }
.book-spine { left:-10px; width:20px; z-index:4; border-radius:5px 0 0 5px; border:1px solid rgba(212, 175, 55, 0.5); background:linear-gradient(90deg,#2E1120,#4A1826,#2E1120); transform:translateZ(-1px); }
.book-page-spread { left:0; width:100%; z-index:3; display:flex; opacity:0; transform:scaleX(.52) translateZ(-2px); transform-origin:center; transition:opacity .65s ease .28s,transform 1.1s cubic-bezier(.16,1,.3,1) .18s; border-radius:5px 14px 14px 5px; overflow:hidden; background:#F5EFE0; box-shadow:inset 0 0 0 1px rgba(74, 24, 38, 0.4),0 0 0 1px rgba(212, 175, 55, 0.3); }
.book-3d.is-open .book-page-spread { opacity:1; transform:scaleX(1) translateZ(-2px); }
.book-page-left,.book-page-right { position:relative; width:50%; padding:36px 32px; overflow:hidden; color:#4A1826; background:linear-gradient(135deg,#FAF5EC,#EDE4D3); }
.book-page-left { border-right:1px solid rgba(74, 24, 38, 0.18); transform:rotateY(1deg); }
.book-page-right { background:linear-gradient(225deg,#FAF5EC,#E8DCC4); transform:rotateY(-1deg); }
.book-page-left::after,.book-page-right::after { content:""; inset:0; opacity:.22; background-image:radial-gradient(rgba(74, 24, 38, 0.35) .5px,transparent .5px); background-size:5px 5px; }
.spread-kicker { position:relative; z-index:1; display:block; font:8px/1.3 'JetBrains Mono',monospace; letter-spacing:.13em; color:#8B6914; }
.spread-rule { position:relative; z-index:1; display:block; width:100%; height:1px; margin:14px 0 28px; background:rgba(139, 105, 20, 0.3); }
.book-page-left strong { position:relative; z-index:1; display:block; font:500 27px/1.08 Fraunces,serif; letter-spacing:-.04em; color:#2E1120; }
.spread-page-no { position:absolute; bottom:20px; right:28px; z-index:2; font:9px 'JetBrains Mono',monospace; color:#8B6914; }
.spread-lines { position:relative; z-index:1; display:grid; gap:13px; margin-top:38px; }
.spread-lines i { display:block; height:4px; border-radius:99px; background:rgba(74, 24, 38, 0.22); }
.spread-lines i:nth-child(1){width:88%}
.spread-lines i:nth-child(2){width:72%}
.spread-lines i:nth-child(3){width:92%}
.spread-lines i:nth-child(4){width:56%}
.spread-stamp { position:absolute; right:27px; bottom:51px; z-index:1; padding:10px 8px; border:1px solid rgba(139, 105, 20, 0.4); font:700 8px/1.2 'JetBrains Mono',monospace; letter-spacing:.14em; text-align:center; color:#8B6914; transform:rotate(-7deg); }
.book-hero-stats { position:relative; z-index:3; display:flex; gap:11px; align-items:center; justify-content:center; flex-wrap:wrap; margin:-8px 0 19px; font:11px 'JetBrains Mono',monospace; letter-spacing:.03em; color:var(--text-lo); }
.book-hero-stats strong { color:var(--text-hi); font-weight:500; }
.book-hero-stats .dot { color:var(--primary-dim); }
.book-start-btn,.book-start-btn-inline { position:relative; z-index:3; width:auto; min-width:220px; margin:0; padding:15px 24px; border:1px solid rgba(244, 228, 166, 0.8); border-radius:999px; font-weight:700; letter-spacing:.01em; transition:transform .3s cubic-bezier(.16,1,.3,1),box-shadow .3s ease; }
.book-start-btn:hover,.book-start-btn-inline:hover { transform:translateY(-3px); box-shadow:0 10px 34px rgba(212, 175, 55, 0.35),0 0 0 5px rgba(212, 175, 55, 0.08); }
.book-hero.book-reader-engaged .book-hero-stats,.book-hero.book-reader-engaged > .book-start-btn { opacity:0; transform:translateY(-10px); pointer-events:none; transition:opacity .35s ease,transform .35s ease; }
.book-progress-wrap { position:relative; z-index:3; width:min(100%,360px); margin-top:24px; text-align:center; }
.book-progress-track { height:3px; overflow:hidden; border-radius:99px; background:rgba(212, 175, 55, 0.1); }
.book-progress-bar { width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--primary-dim),var(--primary),var(--primary-glow)); box-shadow:0 0 16px rgba(212, 175, 55, 0.8); transition:width .65s cubic-bezier(.16,1,.3,1); }
.book-progress-label { margin-top:9px; font:9px 'JetBrains Mono',monospace; letter-spacing:.08em; color:var(--text-lo); }
.book-ambient-particles { position:absolute; inset:0; z-index:1; overflow:hidden; pointer-events:none; }
.book-ambient-particles i { --size:3px; position:absolute; left:50%; top:50%; width:var(--size); height:var(--size); border-radius:50%; background:var(--primary-glow); opacity:.15; box-shadow:0 0 12px var(--primary); animation:particleDrift 6s ease-in-out infinite alternate; animation-delay:-1.4s; }
.book-ambient-particles i:nth-child(1){left:8%;top:18%}
.book-ambient-particles i:nth-child(2){left:18%;top:54%;animation-delay:-2.1s}
.book-ambient-particles i:nth-child(3){left:27%;top:32%;animation-delay:-3.3s}
.book-ambient-particles i:nth-child(4){left:38%;top:76%;animation-delay:-.7s}
.book-ambient-particles i:nth-child(5){left:48%;top:14%;animation-delay:-4.2s}
.book-ambient-particles i:nth-child(6){left:59%;top:65%;animation-delay:-1.8s}
.book-ambient-particles i:nth-child(7){left:69%;top:28%;animation-delay:-2.7s}
.book-ambient-particles i:nth-child(8){left:78%;top:81%;animation-delay:-3.8s}
.book-ambient-particles i:nth-child(9){left:88%;top:42%;animation-delay:-.3s}
.book-ambient-particles i:nth-child(10){left:12%;top:88%;animation-delay:-2.4s}
.book-ambient-particles i:nth-child(11){left:33%;top:11%;animation-delay:-4.6s}
.book-ambient-particles i:nth-child(12){left:64%;top:92%;animation-delay:-1.1s}
.book-ambient-particles i:nth-child(13){left:94%;top:16%;animation-delay:-3s}
.book-ambient-particles i:nth-child(14){left:5%;top:67%;animation-delay:-5.1s}
.book-ambient-particles i:nth-child(15){left:84%;top:73%;animation-delay:-2.9s}
.book-ambient-particles i:nth-child(16){left:43%;top:50%;animation-delay:-.9s}
.book-ambient-particles i:nth-child(17){left:73%;top:8%;animation-delay:-4s}
.book-ambient-particles i:nth-child(18){left:24%;top:96%;animation-delay:-1.7s}
@keyframes particleDrift { from { transform:translate3d(0,10px,0); opacity:.08; } to { transform:translate3d(12px,-28px,0); opacity:.48; } }
.book-resume-prompt { position:relative; z-index:4; display:flex; align-items:center; gap:10px; width:min(100%,450px); margin:22px 0 -4px; padding:10px 12px; border:1px solid rgba(212, 175, 55, 0.25); border-radius:12px; background:rgba(36, 12, 24, 0.7); backdrop-filter:blur(14px); color:var(--text-md); }
.book-resume-prompt > span:nth-child(2) { display:grid; gap:2px; flex:1; text-align:left; }
.book-resume-prompt strong { color:var(--text-hi); font-size:11px; }
.book-resume-prompt small { font:10px 'JetBrains Mono',monospace; color:var(--text-lo); }
.resume-signal { display:grid; place-items:center; width:29px; height:29px; border-radius:9px; color:var(--primary); background:var(--primary-soft); }
.book-progress-map { position:relative; z-index:3; width:min(100%,660px); margin-top:25px; }
.progress-map-kicker { display:block; margin-bottom:8px; font:9px 'JetBrains Mono',monospace; letter-spacing:.16em; color:var(--primary-dim); }
.progress-map-track { display:flex; gap:4px; height:5px; }
.progress-map-part { position:relative; flex:var(--part); overflow:hidden; border-radius:99px; background:rgba(212, 175, 55, 0.1); }
.progress-map-part i { display:block; height:100%; border-radius:inherit; background:var(--primary); box-shadow:0 0 8px rgba(212, 175, 55, 0.5); }
.progress-map-copy { display:block; margin-top:10px; font-size:11px; color:var(--text-lo); }
.book-why,.book-build,.book-start-here,.book-outline-wrap { position:relative; max-width:1180px; margin:108px auto 0; }
.book-why-header,.book-build-header { max-width:670px; }
.book-why-tag { display:inline-flex; align-items:center; gap:8px; font:10px 'JetBrains Mono',monospace; letter-spacing:.18em; color:var(--primary); }
.book-why-tag::before { content:""; width:18px; height:1px; background:var(--primary); box-shadow:0 0 8px var(--primary); }
.book-why h3,.book-build h3,.book-start-here h3 { margin-top:13px; font:500 clamp(1.7rem,3.2vw,2.65rem)/1.08 Fraunces,serif; letter-spacing:-.04em; color:var(--text-hi); }
.book-build-header p,.book-start-here p { max-width:570px; margin-top:13px; color:var(--text-md); }
.book-why-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin-top:28px; }
.book-why-card { position:relative; min-height:212px; padding:26px 24px; border:1px solid rgba(212, 175, 55, 0.15); border-radius:14px; background:rgba(46, 17, 32, 0.4); transition:transform .35s cubic-bezier(.16,1,.3,1),border-color .35s ease,background .35s ease; }
.book-why-card:hover { transform:translateY(-5px); border-color:rgba(212, 175, 55, 0.42); background:rgba(74, 24, 38, 0.5); }
.bwc-icon { display:grid; place-items:center; width:36px; height:36px; margin-bottom:22px; border:1px solid rgba(212, 175, 55, 0.32); border-radius:10px; color:var(--primary); background:var(--primary-soft); }
.bwc-icon svg { width:19px; height:19px; }
.book-why-card h4 { color:var(--text-hi); font-size:15px; font-weight:600; }
.book-why-card p { margin-top:9px; font-size:12px; line-height:1.75; color:var(--text-lo); }
.book-terminal { max-width:810px; margin:28px auto 0; overflow:hidden; border:1px solid rgba(212, 175, 55, 0.22); border-radius:14px; background:rgba(10, 4, 8, 0.88); box-shadow:0 26px 80px rgba(0,0,0,.3),0 0 50px rgba(212, 175, 55, 0.08); }
.terminal-head { display:flex; align-items:center; gap:7px; height:38px; padding:0 14px; border-bottom:1px solid rgba(212, 175, 55, 0.13); background:rgba(212, 175, 55, 0.04); }
.terminal-dot { width:7px; height:7px; border-radius:50%; }
.terminal-dot.red { background:#B23A48; }
.terminal-dot.yellow { background:#D4AF37; }
.terminal-dot.green { background:#7A8B5C; }
.terminal-title { margin-left:7px; font:10px 'JetBrains Mono',monospace; color:var(--text-lo); }
.terminal-body { padding:24px; font:12px/1.9 'JetBrains Mono',monospace; }
.terminal-line { display:flex; gap:10px; }
.term-prompt { color:var(--primary); }
.term-cmd { color:var(--text-hi); }
.terminal-out { margin:1px 0 9px 20px; color:var(--text-lo); }
.term-ok { color:var(--primary); }
.book-start-here { display:flex; align-items:center; justify-content:space-between; gap:32px; padding:27px 30px; border:1px solid rgba(212, 175, 55, 0.28); border-radius:16px; background:linear-gradient(110deg,rgba(212, 175, 55, 0.1),rgba(46, 17, 32, 0.3)); }
.book-start-here h3 { font-size:clamp(1.45rem,3vw,2.15rem); }
.book-start-here p { font-size:13px; }
.book-start-here strong { color:var(--primary-glow); font-weight:600; }
.book-outline-wrap { margin-top:94px; scroll-margin-top:28px; }
.book-layout { display:grid; grid-template-columns:minmax(260px,320px) minmax(0,1fr); align-items:start; gap:28px; }
.book-sidebar { position:sticky; top:22px; max-height:calc(100vh - 44px); overflow:hidden; border:1px solid rgba(212, 175, 55, 0.2); border-radius:16px; background:rgba(36, 12, 24, 0.7); backdrop-filter:blur(16px); }
.book-sidebar-header { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:18px 18px 14px; border-bottom:1px solid rgba(212, 175, 55, 0.13); }
.book-sidebar-header h3 { color:var(--text-hi); font:500 1.3rem Fraunces,serif; }
.book-sidebar-header .mini-btn { width:auto; padding:8px 10px; }
.book-sidebar-tools { position:relative; padding:14px 14px 12px; border-bottom:1px solid rgba(212, 175, 55, 0.11); }
.book-search-label { display:flex; align-items:center; gap:6px; margin-bottom:7px; font:9px 'JetBrains Mono',monospace; letter-spacing:.12em; text-transform:uppercase; color:var(--primary-dim); }
.book-search-wrap { position:relative; }
.book-search { width:100%; padding:10px 58px 10px 12px; border:1px solid rgba(212, 175, 55, 0.2); border-radius:8px; outline:none; background:rgba(0,0,0,.28); color:var(--text-hi); font:11px 'JetBrains Mono',monospace; }
.book-search:focus { border-color:rgba(212, 175, 55, 0.65); box-shadow:0 0 0 3px rgba(212, 175, 55, 0.1); }
.book-search-count { position:absolute; top:50%; right:10px; transform:translateY(-50%); font:9px 'JetBrains Mono',monospace; color:var(--text-lo); }
.book-mobile-outline-close { display:none; }
.outline-list { max-height:calc(100vh - 196px); overflow:auto; padding:8px; scrollbar-color:rgba(212, 175, 55, 0.3) transparent; }
.outline-section { margin-bottom:4px; }
.outline-section-toggle { display:grid; grid-template-columns:25px minmax(0,1fr) auto 18px; align-items:center; gap:8px; width:100%; padding:11px 9px; border:0; border-radius:9px; background:transparent; color:var(--text-md); text-align:left; cursor:pointer; }
.outline-section-toggle:hover,.outline-section.is-expanded .outline-section-toggle { background:rgba(212, 175, 55, 0.06); color:var(--text-hi); }
.outline-section-icon { display:grid; place-items:center; width:25px; height:25px; border:1px solid rgba(212, 175, 55, 0.25); border-radius:7px; color:var(--primary); }
.outline-section-name { display:grid; gap:2px; min-width:0; }
.outline-section-name small { font:8px 'JetBrains Mono',monospace; color:var(--primary-dim); text-transform:uppercase; }
.outline-section-name strong { overflow:hidden; font-size:11px; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.outline-section-count { min-width:19px; padding:2px 5px; border-radius:5px; background:rgba(212, 175, 55, 0.09); color:var(--text-lo); font:9px 'JetBrains Mono',monospace; text-align:center; }
.outline-section-chevron { color:var(--text-lo); transition:transform .25s ease; }
.outline-section.is-expanded .outline-section-chevron { transform:rotate(180deg); color:var(--primary); }
.outline-chapters { display:none; padding:0 0 4px 13px; }
.outline-section.is-expanded .outline-chapters { display:grid; }
.outline-chapter { display:grid; grid-template-columns:18px minmax(0,1fr) auto auto; align-items:center; gap:7px; width:100%; min-height:38px; padding:7px 8px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--text-lo); text-align:left; cursor:pointer; }
.outline-chapter:hover { color:var(--text-hi); background:rgba(212, 175, 55, 0.05); }
.outline-chapter.is-active { border-color:rgba(212, 175, 55, 0.4); background:linear-gradient(90deg,rgba(212, 175, 55, 0.15),rgba(212, 175, 55, 0.04)); color:var(--text-hi); box-shadow:inset 2px 0 0 var(--primary); }
.outline-check { display:grid; place-items:center; width:16px; height:16px; border:1px solid rgba(168, 174, 184, 0.28); border-radius:50%; color:#1A0810; }
.outline-chapter.is-complete .outline-check { border-color:var(--primary); background:var(--primary); box-shadow:0 0 10px rgba(212, 175, 55, 0.4); }
.outline-chapter-copy { display:grid; min-width:0; gap:1px; }
.outline-chapter-copy strong { font:9px 'JetBrains Mono',monospace; color:var(--primary-dim); }
.outline-chapter-copy span { overflow:hidden; font-size:10px; line-height:1.3; text-overflow:ellipsis; white-space:nowrap; }
.outline-page { font:8px 'JetBrains Mono',monospace; color:#6B5B48; }
.outline-bookmark { color:var(--primary); }
.book-empty-state { display:grid; place-items:center; gap:8px; padding:32px 18px; color:var(--text-lo); text-align:center; }
.book-empty-state strong { color:var(--text-hi); font-size:12px; }
.book-empty-state span { font-size:10px; }
.book-empty-state svg { color:var(--primary); }
.book-content-panel { min-width:0; min-height:720px; max-height:calc(100vh - 44px); overflow:auto; padding:4px 4px 48px 0; scrollbar-color:rgba(212, 175, 55, 0.3) transparent; }
.book-content { min-height:100%; }
.chapter-reader { padding:14px 18px 22px; }
.chapter-header { padding-bottom:22px; border-bottom:1px solid rgba(212, 175, 55, 0.15); }
.chapter-breadcrumb { display:flex; align-items:center; gap:8px; font:10px 'JetBrains Mono',monospace; letter-spacing:.04em; color:var(--primary); }
.chapter-breadcrumb .sep { color:var(--text-lo); }
.chapter-heading-row { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-top:16px; }
.chapter-index,.section-eyebrow { font:9px 'JetBrains Mono',monospace; letter-spacing:.17em; color:var(--primary-dim); }
.chapter-title { max-width:720px; margin-top:7px; font:500 clamp(2rem,4vw,3.15rem)/1.04 Fraunces,serif; letter-spacing:-.05em; color:var(--text-hi); }
.chapter-bookmark { display:inline-flex; align-items:center; gap:7px; flex:0 0 auto; padding:9px 11px; border:1px solid rgba(212, 175, 55, 0.22); border-radius:9px; background:rgba(212, 175, 55, 0.04); color:var(--text-lo); font:10px 'JetBrains Mono',monospace; cursor:pointer; }
.chapter-bookmark:hover,.chapter-bookmark.is-bookmarked { border-color:rgba(212, 175, 55, 0.6); color:var(--primary); background:rgba(212, 175, 55, 0.1); }
.chapter-meta { display:flex; align-items:center; gap:9px; flex-wrap:wrap; margin-top:17px; color:var(--text-lo); font:10px 'JetBrains Mono',monospace; }
.chapter-meta span { display:inline-flex; align-items:center; gap:4px; }
.chapter-meta svg { color:var(--primary-dim); }
.chapter-done-badge { padding:4px 7px; border:1px solid rgba(212, 175, 55, 0.28); border-radius:99px; color:var(--primary); background:rgba(212, 175, 55, 0.09); }
.chapter-abstract { margin:25px 0 26px; padding:17px 20px; border-left:2px solid var(--primary); background:linear-gradient(90deg,rgba(212, 175, 55, 0.09),rgba(212, 175, 55, 0.02)); }
.chapter-abstract-label { margin-bottom:7px; font:9px 'JetBrains Mono',monospace; letter-spacing:.18em; color:var(--primary); }
.chapter-abstract p:last-child { max-width:760px; color:var(--text-md); font-size:13px; line-height:1.75; }
.chapter-content-intro { display:flex; gap:14px; align-items:flex-start; margin-bottom:22px; }
.chapter-content-icon { display:grid; place-items:center; flex:0 0 auto; width:40px; height:40px; border:1px solid rgba(212, 175, 55, 0.25); border-radius:11px; color:var(--primary); background:rgba(212, 175, 55, 0.07); }
.chapter-content-intro h3 { margin-top:5px; color:var(--text-hi); font:500 1.55rem Fraunces,serif; }
.chapter-content-intro p { max-width:680px; margin-top:5px; color:var(--text-lo); font-size:12px; }
.placeholder-blocks { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; }
.placeholder-block { min-height:96px; padding:15px; border:1px solid rgba(212, 175, 55, 0.13); border-radius:11px; background:rgba(46, 17, 32, 0.35); transition:transform .3s ease,border-color .3s ease,background .3s ease; }
.placeholder-block:hover { transform:translateY(-3px); border-color:rgba(212, 175, 55, 0.35); background:rgba(212, 175, 55, 0.05); }
.pb-label { display:block; color:var(--text-hi); font-size:12px; font-weight:600; }
.pb-hint { display:block; margin-top:6px; color:var(--text-lo); font-size:10px; line-height:1.45; }
.chapter-code-block { margin-top:22px; overflow:hidden; border:1px solid rgba(232, 213, 183, 0.22); border-radius:11px; background:rgba(10, 4, 8, 0.78); }
.code-block-head { display:flex; align-items:center; justify-content:space-between; padding:9px 13px; border-bottom:1px solid rgba(232, 213, 183, 0.15); color:rgba(232, 213, 183, 0.8); font:9px 'JetBrains Mono',monospace; letter-spacing:.08em; }
.code-copy { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border:1px solid rgba(232, 213, 183, 0.25); border-radius:6px; background:transparent; color:var(--text-lo); font:9px 'JetBrains Mono',monospace; cursor:pointer; }
.code-copy:hover { border-color:var(--cyan); color:var(--cyan); }
.chapter-code-block pre { margin:0; padding:17px; overflow:auto; color:#F4E4A6; font:11px/1.7 'JetBrains Mono',monospace; }
.chapter-code-block p { padding:0 17px 14px; color:#8B7B5F; font-size:10px; }
.chapter-build { margin-top:22px; padding:18px 20px; border:1px solid rgba(212, 175, 55, 0.22); border-radius:11px; background:linear-gradient(110deg,rgba(212, 175, 55, 0.09),rgba(46, 17, 32, 0.25)); }
.chapter-build-header { display:flex; align-items:center; gap:8px; color:var(--primary); }
.cb-label { font:10px 'JetBrains Mono',monospace; letter-spacing:.13em; text-transform:uppercase; }
.chapter-build-text { margin-top:8px; color:var(--text-hi); font-size:13px; }
.chapter-actions { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:30px; padding-top:19px; border-top:1px solid rgba(212, 175, 55, 0.15); }
.chapter-actions .btn-primary,.chapter-actions .btn-secondary { display:inline-flex; align-items:center; justify-content:center; gap:7px; width:auto; min-width:120px; margin:0; padding:11px 15px; }
.chapter-actions .btn-primary { min-width:170px; }
.chapter-actions button:disabled { opacity:.4; pointer-events:none; }
.chapter-actions .btn-primary.done { color:#1A0810; background:var(--primary-glow); }
.chapter-is-entering { animation:chapterIn .4s cubic-bezier(.16,1,.3,1) both; }
.completion-pulse { animation:completionPulse .8s ease both; }
@keyframes chapterIn { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
@keyframes completionPulse { 0% { filter:drop-shadow(0 0 0 rgba(212, 175, 55, 0)); } 45% { filter:drop-shadow(0 0 18px rgba(212, 175, 55, 0.6)); } 100% { filter:drop-shadow(0 0 0 rgba(212, 175, 55, 0)); } }
.book-mobile-bar { display:none; }
.sr-only { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.book-hero button:focus-visible,.book-sidebar button:focus-visible,.book-content button:focus-visible,.book-search:focus-visible { outline:2px solid var(--primary-glow); outline-offset:3px; }
@media (max-width:980px) { .book-hero,.book-why,.book-build,.book-start-here,.book-outline-wrap { max-width:calc(100% - 30px); } .book-layout { grid-template-columns:minmax(230px,280px) minmax(0,1fr); gap:18px; } .book-3d.is-open { --book-width:520px; } .chapter-title { font-size:clamp(1.9rem,4vw,2.6rem); } .placeholder-blocks { grid-template-columns:repeat(2,1fr); } }
@media (max-width:720px) { #page-books { padding-bottom:60px; } .book-hero { min-height:650px; margin-top:24px; padding-inline:14px; border-radius:19px; } .book-scene { height:390px; transform:scale(.82); transform-origin:center top; margin-bottom:-50px; } .book-3d.is-open { --book-width:500px; } .book-why,.book-build,.book-start-here,.book-outline-wrap { max-width:calc(100% - 30px); margin-top:72px; } .book-why-grid { grid-template-columns:1fr; } .book-why-card { min-height:auto; } .book-start-here { align-items:flex-start; flex-direction:column; padding:23px; } .book-start-btn-inline { width:100%; } .book-layout { display:block; } .book-mobile-bar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; padding:10px 0; } .book-mobile-bar .mini-btn { display:inline-flex; align-items:center; gap:7px; width:auto; } .book-mobile-current { overflow:hidden; color:var(--text-lo); font:9px 'JetBrains Mono',monospace; text-overflow:ellipsis; white-space:nowrap; } .book-sidebar { position:fixed; z-index:100; inset:auto 12px 12px; max-height:min(78vh,620px); transform:translateY(calc(100% + 30px)); opacity:0; pointer-events:none; transition:transform .4s cubic-bezier(.16,1,.3,1),opacity .3s ease; box-shadow:0 20px 80px rgba(0,0,0,.8); } .book-sidebar.is-mobile-open { transform:translateY(0); opacity:1; pointer-events:auto; } .book-sidebar-tools { padding-right:54px; } .book-mobile-outline-close { position:absolute; display:grid; place-items:center; top:13px; right:14px; width:30px; height:30px; border:1px solid rgba(212, 175, 55, 0.22); border-radius:8px; background:transparent; color:var(--text-lo); cursor:pointer; } .outline-list { max-height:calc(min(78vh,620px) - 164px); } .book-content-panel { max-height:none; min-height:0; overflow:visible; padding:0; } .chapter-reader { padding:4px 0 24px; } .chapter-heading-row { gap:10px; } .chapter-bookmark { padding:8px; } .chapter-bookmark span { display:none; } .chapter-title { font-size:clamp(1.9rem,8.5vw,2.5rem); } .chapter-meta { gap:6px; font-size:9px; } .chapter-meta .dot { display:none; } .placeholder-blocks { grid-template-columns:1fr 1fr; } .chapter-actions { display:grid; grid-template-columns:1fr 1fr; } .chapter-actions .btn-primary { grid-column:1 / -1; grid-row:1; width:100%; } .chapter-actions .btn-secondary { width:100%; min-width:0; } .book-terminal .terminal-body { padding:16px; font-size:10px; } .terminal-line { overflow-x:auto; white-space:nowrap; } .terminal-out { margin-left:0; } }
@media (max-width:410px) { .book-scene { transform:scale(.7); margin-bottom:-104px; } .book-hero { min-height:590px; } .book-hero-stats { font-size:9px; } .book-progress-map { margin-top:19px; } .progress-map-copy { font-size:10px; } .placeholder-block { min-height:88px; padding:12px; } .pb-hint { font-size:9px; } .book-page-left,.book-page-right { padding:28px 20px; } .book-page-left strong { font-size:20px; } }
@media (prefers-reduced-motion:reduce) { .book-3d,.book-ambient-particles i,.book-why-card,.placeholder-block,.chapter-is-entering,.completion-pulse { animation:none !important; transition:none !important; } .book-3d { transform:rotateY(-18deg) rotateX(3deg); } .book-3d.is-open { transform:none; } .book-3d.is-open .book-cover-front { transform:rotateY(-168deg); } .book-3d.is-open .book-page-spread { opacity:1; transform:none; } .book-progress-bar { transition:none; } }

/* ============================================================
   CYBER KNIGHTS — Curriculum Outline
   ============================================================ */

.curriculum-outline {
  position: relative;
  max-width: 1180px;
  margin: 108px auto 0;
  padding: 0 20px;
}

.curriculum-header {
  max-width: 720px;
  margin-bottom: 64px;
}

.curriculum-header h3 {
  margin-top: 13px;
  font: 500 clamp(1.9rem, 3.5vw, 2.9rem)/1.08 'Fraunces', serif;
  letter-spacing: -0.04em;
  color: var(--text-hi);
}

.curriculum-header p {
  max-width: 620px;
  margin-top: 16px;
  color: var(--text-md);
  font-size: 14px;
  line-height: 1.75;
}

.curriculum-timeline { position: relative; }

.curr-module {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  position: relative;
}

.curr-module-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.curr-marker-num {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1.5px solid rgba(212, 175, 55, 0.38);
  border-radius: 50%;
  background: rgba(26, 8, 16, 0.8);
  font: 600 13px 'JetBrains Mono', monospace;
  color: var(--primary);
  letter-spacing: 0.05em;
  box-shadow:
    0 0 24px rgba(212, 175, 55, 0.18),
    inset 0 0 16px rgba(212, 175, 55, 0.07);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2;
  position: relative;
}

.curr-module:hover .curr-marker-num {
  border-color: var(--primary);
  box-shadow:
    0 0 36px rgba(212, 175, 55, 0.45),
    inset 0 0 24px rgba(212, 175, 55, 0.15);
  transform: scale(1.08);
}

.curr-marker-line {
  flex: 1;
  width: 1.5px;
  background: linear-gradient(
    to bottom,
    rgba(212, 175, 55, 0.38),
    rgba(212, 175, 55, 0.08)
  );
  margin-top: 8px;
  position: relative;
}

.curr-marker-line::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 1.5px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--primary) 50%,
    transparent 100%
  );
  animation: currLineFlow 3s linear infinite;
  opacity: 0.65;
}

@keyframes currLineFlow {
  0%   { transform: translateY(-100%); }
  100% { transform: translateY(100%); }
}

.curr-module.is-front .curr-marker-num {
  border-color: rgba(232, 213, 183, 0.45);
  color: var(--cyan);
}

.curr-module.is-front .curr-marker-line {
  background: linear-gradient(
    to bottom,
    rgba(232, 213, 183, 0.32),
    rgba(232, 213, 183, 0.05)
  );
}

.curr-module.is-front .curr-marker-line::after {
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--cyan) 50%,
    transparent 100%
  );
}

.curr-module-body {
  padding-bottom: 56px;
  padding-top: 4px;
}

.curr-module.is-front .curr-module-body,
.curr-module[data-module="m7"] .curr-module-body {
  padding-bottom: 24px;
}

.curr-module-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.curr-module-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.06);
  color: var(--primary);
  flex-shrink: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.curr-module:hover .curr-module-icon {
  border-color: rgba(212, 175, 55, 0.55);
  background: rgba(212, 175, 55, 0.11);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 175, 55, 0.18);
}

.curr-module-info { flex: 1; min-width: 0; }

.curr-module-kicker {
  display: block;
  font: 10px 'JetBrains Mono', monospace;
  letter-spacing: 0.18em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.curr-module.is-front .curr-module-kicker { color: var(--cyan); }

.curr-module-info h4 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-hi);
  line-height: 1.15;
}

.curr-module-count {
  padding: 5px 12px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 100px;
  background: rgba(212, 175, 55, 0.07);
  font: 600 10px 'JetBrains Mono', monospace;
  color: var(--primary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
}

.curr-module.is-front .curr-module-count {
  border-color: rgba(232, 213, 183, 0.28);
  background: rgba(232, 213, 183, 0.07);
  color: var(--cyan);
}

.curr-module-desc {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-md);
  max-width: 720px;
  margin-bottom: 20px;
}

.curr-chapter-list {
  list-style: none;
  display: grid;
  gap: 1px;
  border-left: 1px dashed rgba(212, 175, 55, 0.18);
  padding-left: 20px;
  margin-left: 4px;
}

.curr-chapter-list li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-md);
  transition: all 0.2s ease;
  cursor: default;
  position: relative;
}

.curr-chapter-list li::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.38);
  border: 1px solid rgba(212, 175, 55, 0.55);
  transition: all 0.2s ease;
}

.curr-chapter-list li:hover {
  background: rgba(212, 175, 55, 0.05);
  color: var(--text-hi);
  padding-left: 16px;
}

.curr-chapter-list li:hover::before {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
  transform: translateY(-50%) scale(1.3);
}

.curr-ch-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--primary);
  font-weight: 600;
  flex-shrink: 0;
  min-width: 42px;
}

.curr-module.is-front .curr-ch-num { color: var(--cyan); }
.curr-module.is-front .curr-chapter-list { border-left-color: rgba(232, 213, 183, 0.18); }
.curr-module.is-front .curr-chapter-list li::before {
  background: rgba(232, 213, 183, 0.35);
  border-color: rgba(232, 213, 183, 0.55);
}
.curr-module.is-front .curr-chapter-list li:hover::before {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.curriculum-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 48px;
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(212, 175, 55, 0.07);
}

.curr-stat {
  background: rgba(26, 8, 16, 0.6);
  padding: 28px 24px;
  text-align: center;
  transition: background 0.3s ease;
}

.curr-stat:hover { background: rgba(212, 175, 55, 0.05); }

.curr-stat-num {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.45);
}

.curr-stat-label {
  display: block;
  margin-top: 10px;
  font: 10px 'JetBrains Mono', monospace;
  letter-spacing: 0.16em;
  color: var(--text-lo);
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .curriculum-outline { margin-top: 72px; padding: 0 14px; }
  .curriculum-header { margin-bottom: 44px; }
  .curr-module { grid-template-columns: 52px 1fr; gap: 16px; }
  .curr-marker-num { width: 42px; height: 42px; font-size: 11px; }
  .curr-module-body { padding-bottom: 40px; }
  .curr-module-head { flex-wrap: wrap; gap: 12px; }
  .curr-module-count { margin-left: 60px; margin-top: 0; }
  .curr-chapter-list { padding-left: 14px; }
  .curr-chapter-list li { font-size: 12px; padding: 8px 10px; }
  .curr-ch-num { min-width: 34px; font-size: 10px; }
  .curriculum-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 420px) {
  .curr-marker-num { width: 36px; height: 36px; font-size: 10px; }
  .curr-module { grid-template-columns: 44px 1fr; gap: 12px; }
  .curr-module-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .curr-module-count { margin-left: 48px; font-size: 9px; padding: 4px 10px; }
}

/* ============================================================
   CYBER KNIGHTS — Chapter Content Styling
   ============================================================ */

.chapter-content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 820px;
  color: var(--text-md);
  font-size: 14px;
  line-height: 1.85;
}

.content-block { position: relative; }

.content-h {
  font-family: 'Fraunces', serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-hi);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
}

.content-h::before {
  content: '';
  width: 3px;
  height: 22px;
  background: linear-gradient(180deg, var(--primary), var(--primary-dim));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.55);
}

.chapter-content p { margin-bottom: 14px; color: var(--text-md); }
.chapter-content p strong { color: var(--text-hi); font-weight: 600; }
.chapter-content em { color: var(--primary-glow); font-style: normal; font-weight: 500; }

.content-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-left: 4px;
}

.content-list li {
  position: relative;
  padding-left: 24px;
  color: var(--text-md);
  font-size: 13.5px;
}

.content-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.content-list li strong { color: var(--text-hi); }

/* CIA Cards */
.cia-card {
  margin-top: 24px;
  padding: 24px 26px;
  border: 1.5px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
  background: rgba(46, 17, 32, 0.4);
  backdrop-filter: blur(8px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.cia-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}

.cia-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 40px rgba(212, 175, 55, 0.1);
}

.cia-card:hover::before { opacity: 1; }

.cia-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.cia-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 11px;
  background: rgba(212, 175, 55, 0.06);
  flex-shrink: 0;
}

.cia-card-head h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text-hi);
  letter-spacing: -0.02em;
}

.cia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 20px;
}

.cia-attack, .cia-defense {
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(26, 8, 16, 0.5);
  border: 1px solid rgba(250, 243, 227, 0.06);
}

.cia-attack { border-left: 3px solid var(--red); }
.cia-defense { border-left: 3px solid var(--primary); }

.cia-label {
  display: block;
  font: 700 10px 'JetBrains Mono', monospace;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.cia-label.attack { color: #E8A0AA; }
.cia-label.defense { color: var(--primary); }

.cia-attack ul, .cia-defense ul { list-style: none; display: grid; gap: 6px; }

.cia-attack li, .cia-defense li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-md);
  line-height: 1.6;
}

.cia-attack li::before,
.cia-defense li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.cia-attack li::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.cia-defense li::before { background: var(--primary); box-shadow: 0 0 8px var(--primary); }

/* Perspective cards */
.perspective-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

.perspective-card {
  padding: 22px 24px;
  border-radius: 14px;
  background: rgba(46, 17, 32, 0.4);
  border: 1.5px solid rgba(212, 175, 55, 0.15);
}

.perspective-card.attack {
  border-color: rgba(178, 58, 72, 0.28);
  background: linear-gradient(135deg, rgba(178, 58, 72, 0.06), rgba(46, 17, 32, 0.4));
}

.perspective-card.defense {
  border-color: rgba(212, 175, 55, 0.3);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(46, 17, 32, 0.4));
}

.perspective-tag {
  display: block;
  font: 700 10px 'JetBrains Mono', monospace;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.perspective-card.attack .perspective-tag { color: #E8A0AA; }
.perspective-card.defense .perspective-tag { color: var(--primary); }

.perspective-card p { margin-bottom: 12px; font-size: 13px; }
.perspective-card ul { list-style: none; display: grid; gap: 6px; }

.perspective-card li {
  padding-left: 16px;
  position: relative;
  font-size: 12.5px;
  color: var(--text-md);
}

.perspective-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--text-lo);
}

.perspective-card.defense li::before { color: var(--primary); }

.perspective-note {
  margin-top: 14px !important;
  padding: 10px 12px;
  background: rgba(212, 175, 55, 0.07);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-hi) !important;
}

/* Content figure */
.content-figure {
  margin: 32px 0;
  padding: 24px;
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  background: rgba(26, 8, 16, 0.55);
  text-align: center;
}

.content-figure img {
  width: 100%;
  max-width: 720px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto 16px;
}

.content-figure figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-lo);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto;
}

.content-list.takeaways li::before {
  content: '✓';
  background: none;
  box-shadow: none;
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
}

.reading-list { display: grid; gap: 8px; margin-top: 12px; }

.reading-list a {
  display: block;
  padding: 12px 16px;
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: 8px;
  background: rgba(212, 175, 55, 0.03);
  color: var(--text-md);
  font-size: 13px;
  transition: all 0.25s ease;
  position: relative;
  padding-right: 40px;
}

.reading-list a::after {
  content: '↗';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-size: 14px;
}

.reading-list a:hover {
  border-color: rgba(212, 175, 55, 0.45);
  background: rgba(212, 175, 55, 0.07);
  color: var(--primary-glow);
  transform: translateX(4px);
}

@media (max-width: 720px) {
  .cia-grid, .perspective-grid { grid-template-columns: 1fr; }
  .content-h { font-size: 1.2rem; }
  .cia-card { padding: 20px; }
  .cia-card-head h4 { font-size: 1.15rem; }
  .content-figure { padding: 16px; }
}

/* ============================================================
   Extended Content Styles (Sub-headings, Cards, Flows)
   ============================================================ */

.sub-h {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text-hi);
  margin: 28px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-h::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.content-ordered {
  list-style: none;
  counter-reset: ord;
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.content-ordered li {
  counter-increment: ord;
  position: relative;
  padding-left: 44px;
  color: var(--text-md);
  font-size: 13.5px;
  line-height: 1.7;
}

.content-ordered li::before {
  content: counter(ord);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.09);
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.type-card {
  position: relative;
  padding: 20px 22px;
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  background: rgba(46, 17, 32, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.type-card:hover {
  border-color: rgba(212, 175, 55, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(212, 175, 55, 0.1);
}

.type-card.white { border-left: 3px solid var(--primary); }
.type-card.black { border-left: 3px solid var(--red); }
.type-card.grey { border-left: 3px solid var(--amber); }

.type-dot { display: inline-block; font-size: 1.1rem; margin-bottom: 10px; }

.type-card h4 {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-hi);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.type-card p { font-size: 12px; line-height: 1.65; color: var(--text-md); margin-bottom: 4px; }
.type-card p strong { color: var(--text-hi); font-weight: 600; font-size: 11px; letter-spacing: 0.02em; }

.step-flow {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 20px;
  border: 1.5px dashed rgba(212, 175, 55, 0.22);
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.02);
}

.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-md);
  line-height: 1.6;
}

.step-item strong { color: var(--text-hi); font-weight: 600; }
.step-item p { margin: 4px 0 0 !important; font-size: 12px; color: var(--text-lo); }
.step-item a { color: var(--primary); text-decoration: none; border-bottom: 1px dashed rgba(212, 175, 55, 0.45); }
.step-item a:hover { color: var(--primary-glow); }

.step-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.law-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.law-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  background: rgba(201, 162, 39, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.2);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-md);
}

.law-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--amber);
  flex-shrink: 0;
}

.lab-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 20px 0;
}

.lab-option {
  padding: 20px 18px;
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  background: rgba(46, 17, 32, 0.4);
  transition: all 0.3s ease;
}

.lab-option:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-3px);
}

.lab-tag {
  display: inline-block;
  padding: 3px 8px;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.lab-option h5 {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-hi);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.lab-option p { font-size: 12px; color: var(--text-md); margin-bottom: 10px; line-height: 1.6; }
.lab-option ul { list-style: none; display: grid; gap: 5px; }

.lab-option ul li {
  position: relative;
  padding-left: 16px;
  font-size: 11.5px;
  color: var(--text-lo);
  line-height: 1.5;
}

.lab-option ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
}

.tool-table {
  margin: 20px 0;
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(46, 17, 32, 0.4);
}

.tool-row {
  display: grid;
  grid-template-columns: 1.5fr 1.5fr 1fr;
  gap: 16px;
  padding: 12px 18px;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(250, 243, 227, 0.06);
  align-items: center;
}

.tool-row:last-child { border-bottom: none; }

.tool-row.tool-header {
  background: rgba(212, 175, 55, 0.07);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.tool-row span { color: var(--text-md); }

.tool-row a {
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}

.tool-row a:hover {
  color: var(--primary-glow);
  text-decoration: underline;
}

.career-card {
  margin-top: 20px;
  padding: 22px 24px;
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  background: rgba(46, 17, 32, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.career-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.career-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.career-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-size: 1.3rem;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 11px;
  background: rgba(212, 175, 55, 0.06);
  flex-shrink: 0;
}

.career-head h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-hi);
  letter-spacing: -0.02em;
  flex: 1;
  min-width: 0;
}

.career-salary {
  padding: 5px 12px;
  border: 1px solid rgba(212, 175, 55, 0.32);
  border-radius: 100px;
  background: rgba(212, 175, 55, 0.07);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.career-card p { font-size: 12.5px; line-height: 1.7; color: var(--text-md); margin-bottom: 8px; }
.career-card p strong { color: var(--text-hi); font-weight: 600; }
.career-card a { color: var(--primary); text-decoration: none; }
.career-card a:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .type-grid, .law-grid, .lab-options { grid-template-columns: 1fr; }
  .tool-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .tool-row.tool-header { display: none; }
  .career-head { flex-direction: column; align-items: flex-start; }
  .career-salary { align-self: flex-start; }


   /* ============================================================
   FEATURES V2 — Progress, Report Card, Assignment Types
   ============================================================ */

/* ---------- Results Tabs ---------- */
.results-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.15);
}
.results-tab {
  background: none; border: none;
  padding: 12px 20px;
  font-family: 'Manrope', sans-serif;
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-lo); cursor: pointer;
  position: relative; text-transform: uppercase;
  transition: color 0.25s;
}
.results-tab:hover { color: var(--text-hi); }
.results-tab.active { color: #D4AF37; }
.results-tab.active::after {
  content: '';
  position: absolute; bottom: -1.5px; left: 0; right: 0;
  height: 2.5px; background: #D4AF37;
  box-shadow: 0 0 12px #D4AF37;
}

/* ---------- Report Card ---------- */
.report-summary-card {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 24px;
}
@media (max-width: 600px) {
  .report-summary-card { grid-template-columns: 1fr; }
}
.report-stat {
  background: rgba(46, 17, 32, 0.4);
  border: 1.5px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
  padding: 24px; text-align: center;
  transition: all 0.3s ease;
}
.report-stat:hover {
  border-color: rgba(212, 175, 55, 0.4);
  transform: translateY(-3px);
}
.report-stat-num {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 2.4rem; font-weight: 600;
  color: #D4AF37; letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.3);
}
.report-stat-label {
  display: block; margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.15em;
  color: var(--text-lo); text-transform: uppercase;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 8px; font-size: 10px;
  font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-quiz { background: rgba(212, 175, 55, 0.15); color: #D4AF37; border: 1px solid rgba(212, 175, 55, 0.3); }
.badge-assignment { background: rgba(178, 58, 72, 0.15); color: #E8A0AA; border: 1px solid rgba(178, 58, 72, 0.3); }
.badge-exam { background: rgba(201, 162, 39, 0.15); color: #C9A227; border: 1px solid rgba(201, 162, 39, 0.3); }

/* ---------- Curriculum Progress ---------- */
.curriculum-hint {
  font-size: 12px; color: var(--text-lo);
  margin-left: auto; align-self: center;
}
.curriculum-progress-list {
  display: flex; flex-direction: column; gap: 20px;
}
.curriculum-module {
  background: rgba(46, 17, 32, 0.4);
  border: 1.5px solid rgba(212, 175, 55, 0.18);
  border-radius: 14px;
  padding: 20px 24px;
  transition: all 0.3s ease;
}
.curriculum-module:hover {
  border-color: rgba(212, 175, 55, 0.35);
}
.curriculum-module-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}
.curriculum-module-icon {
  font-size: 1.6rem;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 11px;
  background: rgba(212, 175, 55, 0.06);
  flex-shrink: 0;
}
.curriculum-module-head h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  color: var(--text-hi);
  margin: 0 0 4px;
}
.curriculum-module-meta {
  font-size: 11.5px; color: var(--text-lo);
  font-family: 'JetBrains Mono', monospace;
}
.curriculum-chapter-list {
  list-style: none; display: grid; gap: 6px;
}
.curriculum-chapter-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.curriculum-chapter-item:hover {
  background: rgba(212, 175, 55, 0.04);
}
.curriculum-chapter-item.taught {
  background: rgba(212, 175, 55, 0.06);
  border-left-color: #D4AF37;
}
.curriculum-checkbox {
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; flex: 1;
}
.curriculum-checkbox input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: #D4AF37;
  cursor: pointer;
  flex-shrink: 0;
}
.curriculum-chapter-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: #D4AF37;
  min-width: 40px;
}
.curriculum-chapter-title {
  font-size: 13px; color: var(--text-md);
}
.curriculum-chapter-item.taught .curriculum-chapter-title {
  color: var(--text-hi);
}
.curriculum-taught-date {
  font-size: 10.5px; color: var(--text-lo);
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- Student Progress ---------- */
.chapter-progress-list {
  list-style: none; margin-top: 12px;
  display: grid; gap: 4px;
}
.chapter-progress-item {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-lo);
  transition: all 0.2s;
}
.chapter-progress-item.taught {
  color: var(--text-md);
  background: rgba(212, 175, 55, 0.04);
}
.chapter-tick {
  width: 18px; text-align: center;
  font-weight: 700; font-size: 14px;
}
.chapter-tick.tick-done { color: #D4AF37; }
.chapter-tick.tick-pending { color: rgba(212, 197, 168, 0.35); }
.chapter-progress-item .chapter-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; color: #D4AF37;
  min-width: 40px;
}
.own-progress {
  margin-left: auto;
  font-size: 10px; padding: 2px 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px; color: #D4AF37;
}
.progress-card.completed {
  border-color: rgba(212, 175, 55, 0.5);
}
.progress-card-badge {
  padding: 3px 10px;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  font-size: 10px; font-weight: 700;
  color: #D4AF37; text-transform: uppercase;
  margin-left: auto;
}
.progress-card-head {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 12px;
}
.progress-card-icon {
  font-size: 1.4rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.05);
  flex-shrink: 0;
}
.progress-card-info h4 {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-hi);
  margin: 0 0 4px;
}
.progress-card-meta {
  font-size: 11px;
  color: var(--text-lo);
  font-family: 'JetBrains Mono', monospace;
}
.progress-bar-wrap.small {
  height: 6px;
  margin: 12px 0;
}

/* ---------- Submission Review ---------- */
.submission-review-card {
  border: 1.5px solid rgba(212, 175, 55, 0.15);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  background: rgba(46, 17, 32, 0.4);
}
.sub-review-head {
  display: flex; align-items: center;
  gap: 12px; margin-bottom: 10px;
}
.sub-review-head strong {
  font-size: 14px;
  color: var(--text-hi);
}
.sub-status {
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status-pending { background: rgba(201, 162, 39, 0.15); color: #C9A227; }
.status-accepted { background: rgba(212, 175, 55, 0.15); color: #D4AF37; }
.status-rejected { background: rgba(178, 58, 72, 0.15); color: #E8A0AA; }
.sub-marks {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: #D4AF37;
}
.sub-review-content {
  padding: 10px 14px;
  background: rgba(26, 8, 16, 0.5);
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-md);
  word-break: break-word;
}
.sub-review-actions {
  display: flex; gap: 8px;
  flex-wrap: wrap; align-items: center;
}
.sub-marks-input { width: 80px !important; padding: 8px 10px !important; }
.sub-feedback-input { flex: 1; min-width: 180px; padding: 8px 10px !important; }
.btn-sm {
  padding: 8px 16px !important;
  font-size: 11px !important;
  width: auto !important;
}
.sub-link, .sub-file-link {
  color: #D4AF37;
  text-decoration: underline;
  word-break: break-all;
}

/* ---------- File Upload Preview ---------- */
.file-preview {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-md);
}
.submission-hint {
  padding: 10px 14px;
  background: rgba(201, 162, 39, 0.08);
  border-left: 3px solid #C9A227;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: var(--text-md);
}

/* ---------- Quiz Detail Modal ---------- */
.quiz-detail-item {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 10px;
  background: rgba(26, 8, 16, 0.5);
  border-left: 3px solid var(--border-neutral);
}
.quiz-detail-item.correct {
  border-left-color: #D4AF37;
  background: rgba(212, 175, 55, 0.05);
}
.quiz-detail-item.wrong {
  border-left-color: #B23A48;
  background: rgba(178, 58, 72, 0.05);
}
.quiz-detail-q {
  font-size: 13.5px;
  margin-bottom: 8px;
  color: var(--text-hi);
}
.quiz-detail-answers {
  display: flex; gap: 12px;
  flex-wrap: wrap; font-size: 12px;
}
.detail-label {
  color: var(--text-lo);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  text-transform: uppercase;
}
.your-answer { color: var(--text-hi); }
.correct-answer { color: #D4AF37; font-weight: 600; }
.quiz-detail-marks {
  margin-top: 6px; font-size: 11.5px;
  color: var(--text-lo);
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- Loaders ---------- */
.loading-msg, .empty-msg {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-lo);
  font-size: 13px;
}
}


/* ============================================================
   FEATURES V2 — Progress, Report Card, Assignment Types
   ============================================================ */
.results-tabs { display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 1.5px solid rgba(212, 175, 55, 0.15); }
.results-tab { background: none; border: none; padding: 12px 20px; font-family: 'Manrope', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--text-lo); cursor: pointer; position: relative; text-transform: uppercase; transition: color 0.25s; }
.results-tab:hover { color: var(--text-hi); }
.results-tab.active { color: #D4AF37; }
.results-tab.active::after { content: ''; position: absolute; bottom: -1.5px; left: 0; right: 0; height: 2.5px; background: #D4AF37; box-shadow: 0 0 12px #D4AF37; }

.report-summary-card { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
@media (max-width: 600px) { .report-summary-card { grid-template-columns: 1fr; } }
.report-stat { background: rgba(46, 17, 32, 0.4); border: 1.5px solid rgba(212, 175, 55, 0.2); border-radius: 14px; padding: 24px; text-align: center; transition: all 0.3s ease; }
.report-stat:hover { border-color: rgba(212, 175, 55, 0.4); transform: translateY(-3px); }
.report-stat-num { display: block; font-family: 'Fraunces', serif; font-size: 2.4rem; font-weight: 600; color: #D4AF37; letter-spacing: -0.03em; line-height: 1; text-shadow: 0 0 24px rgba(212, 175, 55, 0.3); }
.report-stat-label { display: block; margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.15em; color: var(--text-lo); text-transform: uppercase; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.badge-quiz { background: rgba(212, 175, 55, 0.15); color: #D4AF37; border: 1px solid rgba(212, 175, 55, 0.3); }
.badge-assignment { background: rgba(178, 58, 72, 0.15); color: #E8A0AA; border: 1px solid rgba(178, 58, 72, 0.3); }
.badge-exam { background: rgba(201, 162, 39, 0.15); color: #C9A227; border: 1px solid rgba(201, 162, 39, 0.3); }

.curriculum-hint { font-size: 12px; color: var(--text-lo); margin-left: auto; align-self: center; }
.curriculum-progress-list { display: flex; flex-direction: column; gap: 20px; }
.curriculum-module { background: rgba(46, 17, 32, 0.4); border: 1.5px solid rgba(212, 175, 55, 0.18); border-radius: 14px; padding: 20px 24px; transition: all 0.3s ease; }
.curriculum-module:hover { border-color: rgba(212, 175, 55, 0.35); }
.curriculum-module-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(212, 175, 55, 0.15); }
.curriculum-module-icon { font-size: 1.6rem; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(212, 175, 55, 0.25); border-radius: 11px; background: rgba(212, 175, 55, 0.06); flex-shrink: 0; }
.curriculum-module-head h4 { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--text-hi); margin: 0 0 4px; }
.curriculum-module-meta { font-size: 11.5px; color: var(--text-lo); font-family: 'JetBrains Mono', monospace; }
.curriculum-chapter-list { list-style: none; display: grid; gap: 6px; }
.curriculum-chapter-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-radius: 8px; transition: all 0.2s; border-left: 3px solid transparent; }
.curriculum-chapter-item:hover { background: rgba(212, 175, 55, 0.04); }
.curriculum-chapter-item.taught { background: rgba(212, 175, 55, 0.06); border-left-color: #D4AF37; }
.curriculum-checkbox { display: flex; align-items: center; gap: 12px; cursor: pointer; flex: 1; }
.curriculum-checkbox input[type=checkbox] { width: 18px; height: 18px; accent-color: #D4AF37; cursor: pointer; flex-shrink: 0; }
.curriculum-chapter-id { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: #D4AF37; min-width: 40px; }
.curriculum-chapter-title { font-size: 13px; color: var(--text-md); }
.curriculum-chapter-item.taught .curriculum-chapter-title { color: var(--text-hi); }
.curriculum-taught-date { font-size: 10.5px; color: var(--text-lo); font-family: 'JetBrains Mono', monospace; }

.chapter-progress-list { list-style: none; margin-top: 12px; display: grid; gap: 4px; }
.chapter-progress-item { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 6px; font-size: 12px; color: var(--text-lo); transition: all 0.2s; }
.chapter-progress-item.taught { color: var(--text-md); background: rgba(212, 175, 55, 0.04); }
.chapter-tick { width: 18px; text-align: center; font-weight: 700; font-size: 14px; }
.chapter-tick.tick-done { color: #D4AF37; }
.chapter-tick.tick-pending { color: rgba(212, 197, 168, 0.35); }
.chapter-progress-item .chapter-id { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: #D4AF37; min-width: 40px; }
.own-progress { margin-left: auto; font-size: 10px; padding: 2px 8px; background: rgba(212, 175, 55, 0.1); border: 1px solid rgba(212, 175, 55, 0.3); border-radius: 10px; color: #D4AF37; }
.progress-card.completed { border-color: rgba(212, 175, 55, 0.5); }
.progress-card-badge { padding: 3px 10px; background: rgba(212, 175, 55, 0.15); border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 10px; font-size: 10px; font-weight: 700; color: #D4AF37; text-transform: uppercase; margin-left: auto; }
.progress-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.progress-card-icon { font-size: 1.4rem; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(212, 175, 55, 0.22); border-radius: 10px; background: rgba(212, 175, 55, 0.05); flex-shrink: 0; }
.progress-card-info h4 { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 500; color: var(--text-hi); margin: 0 0 4px; }
.progress-card-meta { font-size: 11px; color: var(--text-lo); font-family: 'JetBrains Mono', monospace; }
.progress-bar-wrap.small { height: 6px; margin: 12px 0; }

.submission-review-card { border: 1.5px solid rgba(212, 175, 55, 0.15); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; background: rgba(46, 17, 32, 0.4); }
.sub-review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.sub-review-head strong { font-size: 14px; color: var(--text-hi); }
.sub-status { padding: 3px 10px; border-radius: 10px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.status-pending { background: rgba(201, 162, 39, 0.15); color: #C9A227; }
.status-accepted { background: rgba(212, 175, 55, 0.15); color: #D4AF37; }
.status-rejected { background: rgba(178, 58, 72, 0.15); color: #E8A0AA; }
.sub-marks { margin-left: auto; font-family: 'JetBrains Mono', monospace; font-size: 12px; color: #D4AF37; }
.sub-review-content { padding: 10px 14px; background: rgba(26, 8, 16, 0.5); border-radius: 8px; margin-bottom: 12px; font-size: 13px; color: var(--text-md); word-break: break-word; }
.sub-review-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sub-marks-input { width: 80px !important; padding: 8px 10px !important; }
.sub-feedback-input { flex: 1; min-width: 180px; padding: 8px 10px !important; }
.btn-sm { padding: 8px 16px !important; font-size: 11px !important; width: auto !important; }
.sub-link, .sub-file-link { color: #D4AF37; text-decoration: underline; word-break: break-all; }

.file-preview { margin-top: 10px; padding: 10px 14px; background: rgba(212, 175, 55, 0.06); border: 1px solid rgba(212, 175, 55, 0.2); border-radius: 8px; font-size: 12px; color: var(--text-md); }
.submission-hint { padding: 10px 14px; background: rgba(201, 162, 39, 0.08); border-left: 3px solid #C9A227; border-radius: 6px; margin-bottom: 16px; font-size: 12.5px; color: var(--text-md); }

.quiz-detail-item { padding: 14px 18px; border-radius: 10px; margin-bottom: 10px; background: rgba(26, 8, 16, 0.5); border-left: 3px solid var(--border-neutral); }
.quiz-detail-item.correct { border-left-color: #D4AF37; background: rgba(212, 175, 55, 0.05); }
.quiz-detail-item.wrong { border-left-color: #B23A48; background: rgba(178, 58, 72, 0.05); }
.quiz-detail-q { font-size: 13.5px; margin-bottom: 8px; color: var(--text-hi); }
.quiz-detail-answers { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; }
.detail-label { color: var(--text-lo); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; text-transform: uppercase; }
.your-answer { color: var(--text-hi); }
.correct-answer { color: #D4AF37; font-weight: 600; }
.quiz-detail-marks { margin-top: 6px; font-size: 11.5px; color: var(--text-lo); font-family: 'JetBrains Mono', monospace; }

.loading-msg, .empty-msg { padding: 40px 20px; text-align: center; color: var(--text-lo); font-size: 13px; }


/* ============================================================
   STUDENT COURSE PROGRESS HERO
   ============================================================ */
.course-progress-hero {
  padding: 40px 36px;
  margin-bottom: 32px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.14), transparent 60%),
    linear-gradient(135deg, rgba(46, 17, 32, 0.65), rgba(26, 8, 16, 0.75));
  border: 1.5px solid rgba(212, 175, 55, 0.3);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 0 1px rgba(212, 175, 55, 0.05);
  position: relative;
  overflow: hidden;
  animation: courseHeroIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes courseHeroIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.course-progress-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  box-shadow: 0 0 30px #D4AF37;
}

.course-hero-head { margin-bottom: 28px; text-align: center; }
.course-hero-kicker {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  color: #D4AF37;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding: 4px 12px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 100px;
  background: rgba(212, 175, 55, 0.06);
}
.course-hero-head h3 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #FAF3E3;
  margin: 0 0 8px 0;
}
.course-hero-head p {
  font-size: 13px;
  color: #D4C5A8;
  margin: 0;
  opacity: 0.85;
}

.course-hero-stats {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 800px) {
  .course-hero-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .course-hero-stats { grid-template-columns: 1fr; }
}

.course-hero-stat {
  background: rgba(26, 8, 16, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.course-hero-stat:hover {
  border-color: rgba(212, 175, 55, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3), 0 0 30px rgba(212, 175, 55, 0.1);
}
.course-hero-stat.main {
  border-color: rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(26, 8, 16, 0.55));
}
.course-hero-stat.highlight .course-hero-num { color: #E8D5B7; }

.course-hero-num {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  color: #D4AF37;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(212, 175, 55, 0.4);
}
.course-hero-stat.main .course-hero-num {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  color: #F4E4A6;
  text-shadow: 0 0 32px rgba(212, 175, 55, 0.6);
}
.course-hero-num .pct-symbol {
  font-size: 0.55em;
  opacity: 0.8;
  margin-left: 2px;
}
.course-hero-num .divider {
  font-size: 0.6em;
  opacity: 0.5;
  margin: 0 4px;
}

.course-hero-label {
  display: block;
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #D4C5A8;
  text-transform: uppercase;
  opacity: 0.85;
}

.course-hero-bar-wrap {
  height: 10px;
  background: rgba(212, 175, 55, 0.08);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}
.course-hero-bar {
  height: 100%;
  background: linear-gradient(90deg, #8B6914 0%, #D4AF37 50%, #F4E4A6 100%);
  border-radius: 5px;
  box-shadow: 0 0 20px #D4AF37, inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.course-hero-bar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: courseShine 2s linear infinite;
}
@keyframes courseShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.course-hero-note {
  text-align: center;
  font-size: 13px;
  color: #D4C5A8;
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.1);
  line-height: 1.5;
}

/* Module cards grid */
.module-progress-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
.module-progress-card {
  background: rgba(46, 17, 32, 0.4) !important;
  border: 1.5px solid rgba(212, 175, 55, 0.18) !important;
}
.module-progress-card.completed {
  border-color: rgba(212, 175, 55, 0.5) !important;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(46, 17, 32, 0.4)) !important;
}
.progress-card-badge.complete {
  background: rgba(212, 175, 55, 0.2) !important;
  border-color: #D4AF37 !important;
  color: #F4E4A6 !important;
}

@media (max-width: 600px) {
  .course-progress-hero { padding: 28px 20px; }
  .course-hero-stat { padding: 16px 12px; }
  .course-hero-head h3 { font-size: 1.4rem; }
}
