@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --rx-bg: #03070f;
  --rx-bg-2: #071321;
  --rx-panel: rgba(8, 20, 35, 0.82);
  --rx-panel-strong: rgba(8, 19, 33, 0.96);
  --rx-border: rgba(82, 164, 192, 0.18);
  --rx-border-strong: rgba(82, 196, 220, 0.34);
  --rx-text: #e6f7fd;
  --rx-muted: #8fb3c2;
  --rx-dim: #5c7d8d;
  --rx-cyan: #22d3ee;
  --rx-cyan-soft: #67e8f9;
  --rx-teal: #2dd4bf;
  --rx-amber: #fbbf24;
  --rx-violet: #a78bfa;
  --rx-rose: #fb7185;
  --rx-emerald: #34d399;
  --rx-radius: 22px;
  --rx-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  --rx-font: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --rx-mono: 'JetBrains Mono', 'DejaVu Sans Mono', monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--rx-bg);
  color: var(--rx-text);
  font-family: var(--rx-font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 75% 4%, rgba(14, 116, 144, 0.18), transparent 65%),
    radial-gradient(800px 520px at 8% 42%, rgba(30, 64, 175, 0.13), transparent 70%),
    linear-gradient(180deg, #03070f 0%, #040b15 55%, #03070f 100%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.55;
  background-image:
    linear-gradient(rgba(80, 190, 220, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(80, 190, 220, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--rx-cyan); outline-offset: 3px; }

.rx-shell { width: min(1280px, calc(100% - 40px)); margin: 0 auto; }
.rx-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(80, 160, 190, 0.12);
  background: rgba(3, 8, 16, 0.78);
  backdrop-filter: blur(20px);
}
.rx-topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.rx-brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.rx-brand img { width: 42px; height: 42px; }
.rx-brand strong { display: block; font-size: 0.98rem; letter-spacing: 0.01em; }
.rx-brand span { display: block; font-family: var(--rx-mono); font-size: 0.64rem; letter-spacing: 0.16em; color: var(--rx-cyan); text-transform: uppercase; }
.rx-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.rx-nav a {
  padding: 9px 12px;
  color: var(--rx-muted);
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  transition: 0.2s ease;
}
.rx-nav a:hover, .rx-nav a[aria-current='page'] { color: var(--rx-text); background: rgba(34, 211, 238, 0.08); }
.rx-user { display: flex; align-items: center; gap: 10px; }
.rx-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.24), rgba(129, 140, 248, 0.2));
  border: 1px solid rgba(103, 232, 249, 0.35);
  font-family: var(--rx-mono); font-size: 0.72rem; font-weight: 700; color: var(--rx-cyan-soft);
}
.rx-user-meta { display: none; }
@media (min-width: 900px) { .rx-user-meta { display: block; } }
.rx-user-meta strong { display: block; font-size: 0.8rem; line-height: 1.2; }
.rx-user-meta span { display: block; font-family: var(--rx-mono); font-size: 0.62rem; color: var(--rx-muted); }

.rx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: 0.2s ease;
  white-space: nowrap;
}
.rx-btn svg { width: 17px; height: 17px; }
.rx-btn:hover { transform: translateY(-1px); }
.rx-btn-primary {
  color: #021018;
  background: linear-gradient(135deg, var(--rx-cyan-soft), var(--rx-cyan));
  box-shadow: 0 10px 32px rgba(34, 211, 238, 0.22);
}
.rx-btn-primary:hover { box-shadow: 0 14px 40px rgba(34, 211, 238, 0.32); }
.rx-btn-amber {
  color: #1a1202;
  background: linear-gradient(135deg, #fde68a, var(--rx-amber));
  box-shadow: 0 10px 32px rgba(251, 191, 36, 0.2);
}
.rx-btn-ghost {
  color: var(--rx-text);
  background: rgba(8, 21, 36, 0.72);
  border-color: var(--rx-border);
}
.rx-btn-ghost:hover { border-color: var(--rx-border-strong); background: rgba(12, 32, 50, 0.82); }
.rx-btn-small { padding: 8px 13px; border-radius: 9px; font-size: 0.76rem; }

.rx-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  background: rgba(10, 34, 48, 0.7);
  color: var(--rx-cyan-soft);
  font-family: var(--rx-mono);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rx-pill-amber { color: #fde68a; border-color: rgba(251, 191, 36, 0.28); background: rgba(42, 30, 5, 0.65); }
.rx-pill-emerald { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.25); background: rgba(5, 36, 28, 0.65); }
.rx-pill-violet { color: #ddd6fe; border-color: rgba(167, 139, 250, 0.28); background: rgba(28, 20, 52, 0.65); }
.rx-pill-rose { color: #fecdd3; border-color: rgba(251, 113, 133, 0.28); background: rgba(45, 12, 22, 0.65); }

.rx-hero {
  position: relative;
  margin-top: 28px;
  min-height: 610px;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(76, 160, 186, 0.2);
  box-shadow: var(--rx-shadow);
  background-image: url('/assets/brand/covers/hero-academia.webp');
  background-size: cover;
  background-position: center right;
}
.rx-hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 8, 16, 0.97) 0%, rgba(3, 8, 16, 0.9) 34%, rgba(3, 8, 16, 0.38) 68%, rgba(3, 8, 16, 0.12) 100%),
    linear-gradient(0deg, rgba(3, 8, 16, 0.72), transparent 55%);
}
.rx-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
  gap: 28px;
  align-items: end;
  padding: clamp(28px, 4vw, 58px);
  min-height: 610px;
}
.rx-hero-copy { max-width: 690px; }
.rx-eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  color: var(--rx-cyan);
  font-family: var(--rx-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
}
.rx-eyebrow::before { content: ''; width: 26px; height: 1px; background: var(--rx-cyan); }
.rx-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  max-width: 13ch;
}
.rx-hero h1 em { font-style: normal; color: var(--rx-cyan-soft); }
.rx-hero p {
  max-width: 58ch;
  color: #b4d3df;
  font-size: clamp(0.94rem, 1.15vw, 1.06rem);
  margin: 0 0 24px;
}
.rx-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rx-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
  max-width: 560px;
}
.rx-stat {
  border-left: 1px solid rgba(103, 232, 249, 0.28);
  padding-left: 14px;
}
.rx-stat strong { display: block; font-size: clamp(1.25rem, 2.2vw, 1.95rem); line-height: 1; letter-spacing: -0.03em; }
.rx-stat span { display: block; color: var(--rx-muted); font-size: 0.72rem; margin-top: 6px; }

.rx-rank-card {
  margin-left: auto;
  width: 100%;
  max-width: 370px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(9, 25, 41, 0.94), rgba(5, 14, 26, 0.9));
  border: 1px solid rgba(103, 232, 249, 0.24);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
}
.rx-rank-head { display: flex; align-items: center; gap: 14px; }
.rx-rank-head img { width: 76px; height: 76px; filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.18)); }
.rx-rank-head small { display: block; color: var(--rx-muted); font-family: var(--rx-mono); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.14em; }
.rx-rank-head strong { display: block; font-size: 1.02rem; line-height: 1.2; margin-top: 4px; }
.rx-rank-xp { display: flex; align-items: baseline; justify-content: space-between; margin-top: 18px; }
.rx-rank-xp strong { font-family: var(--rx-mono); font-size: 1.55rem; color: var(--rx-cyan-soft); }
.rx-rank-xp span { color: var(--rx-muted); font-size: 0.72rem; }
.rx-progress { height: 9px; border-radius: 999px; background: rgba(97, 140, 158, 0.18); overflow: hidden; margin: 8px 0 9px; }
.rx-progress > span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--rx-cyan), var(--rx-teal)); box-shadow: 0 0 18px rgba(34, 211, 238, 0.45); transition: width 0.8s cubic-bezier(.2,.8,.2,1); }
.rx-rank-next { color: var(--rx-muted); font-size: 0.72rem; }
.rx-rank-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(80, 150, 175, 0.16); }
.rx-rank-foot span { font-family: var(--rx-mono); font-size: 0.64rem; color: var(--rx-muted); }
.rx-rank-foot a { color: var(--rx-cyan-soft); font-size: 0.72rem; font-weight: 700; }

.rx-section { padding: 76px 0 0; }
.rx-section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.rx-section-head h2 { margin: 8px 0 0; font-size: clamp(1.7rem, 3vw, 2.55rem); line-height: 1.1; letter-spacing: -0.035em; }
.rx-section-head p { max-width: 58ch; color: var(--rx-muted); font-size: 0.9rem; margin: 0; }
.rx-section-head .rx-btn { flex-shrink: 0; }

.rx-chapter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rx-chapter {
  position: relative; overflow: hidden; min-height: 232px; border-radius: 20px;
  border: 1px solid var(--rx-border); background: var(--rx-panel);
  display: flex; align-items: stretch; transition: 0.25s ease;
}
.rx-chapter:hover { transform: translateY(-3px); border-color: var(--rx-border-strong); box-shadow: 0 18px 42px rgba(0,0,0,.35); }
.rx-chapter > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .52; transition: 0.5s ease; }
.rx-chapter:hover > img { opacity: .68; transform: scale(1.03); }
.rx-chapter::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3,8,16,.96), rgba(3,8,16,.22) 62%, rgba(3,8,16,.5)); }
.rx-chapter.is-current { border-color: rgba(34,211,238,.55); box-shadow: 0 0 0 1px rgba(34,211,238,.12), 0 18px 48px rgba(0,0,0,.42); }
.rx-chapter.is-completed { border-color: rgba(52,211,153,.36); }
.rx-chapter.is-locked > img { filter: grayscale(1) brightness(.45); opacity: .45; }
.rx-chapter.is-locked::after { background: linear-gradient(0deg, rgba(3,8,16,.98), rgba(3,8,16,.66)); }
.rx-chapter-body { position: relative; z-index: 1; padding: 15px; display: flex; flex-direction: column; width: 100%; }
.rx-chapter-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rx-chapter-level { font-family: var(--rx-mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rx-cyan); }
.rx-chapter-status { font-family: var(--rx-mono); font-size: .52rem; text-transform: uppercase; letter-spacing: .08em; padding: 3px 6px; border-radius: 999px; border: 1px solid rgba(80,160,185,.22); color: var(--rx-muted); background: rgba(5,16,28,.72); }
.rx-chapter.is-current .rx-chapter-status { color: var(--rx-cyan-soft); border-color: rgba(34,211,238,.32); }
.rx-chapter.is-completed .rx-chapter-status { color: #a7f3d0; border-color: rgba(52,211,153,.3); }
.rx-chapter.is-locked .rx-chapter-status { color: #cbd5e1; }
.rx-chapter h3 { margin: 10px 0 5px; font-size: 1.02rem; line-height: 1.15; letter-spacing: -.02em; }
.rx-chapter p { margin: 0; color: #a9c7d3; font-size: .72rem; line-height: 1.45; flex: 1; }
.rx-chapter-progress { margin-top: 12px; }
.rx-chapter-progress .rx-progress { height: 6px; margin: 0 0 6px; }
.rx-chapter-meta { display: flex; justify-content: space-between; gap: 8px; font-family: var(--rx-mono); font-size: .56rem; color: var(--rx-muted); }
.rx-chapter-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rx-chapter-foot .rx-btn { padding: 6px 9px; border-radius: 7px; font-size: .64rem; }
.rx-chapter.is-locked .rx-chapter-foot .rx-btn { opacity: .65; pointer-events: none; }
.rx-chapter-lock { color: #cbd5e1; font-family: var(--rx-mono); font-size: .6rem; }

.rx-module-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rx-module.is-locked { opacity: .64; }
.rx-module.is-locked .rx-module-media img { filter: grayscale(1) brightness(.5); }
.rx-module.is-locked:hover { transform: none; border-color: var(--rx-border); box-shadow: none; }
.rx-module.is-locked .rx-module-state { color: #cbd5e1; border-color: rgba(148,163,184,.22); background: rgba(15,23,42,.82); }
.rx-module-lock { display: inline-flex; align-items: center; gap: 5px; margin: 0 0 12px; color: #cbd5e1; font-family: var(--rx-mono); font-size: .6rem; }
.rx-module {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: var(--rx-panel);
  border: 1px solid var(--rx-border);
  transition: 0.25s ease;
}
.rx-module:hover { transform: translateY(-4px); border-color: var(--rx-border-strong); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35); }
.rx-module-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #040b15; }
.rx-module-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.55s ease; }
.rx-module:hover .rx-module-media img { transform: scale(1.035); }
.rx-module-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3, 8, 16, 0.74), transparent 55%); }
.rx-module-number {
  position: absolute; z-index: 2; left: 14px; top: 14px;
  padding: 5px 9px; border-radius: 8px;
  background: rgba(3, 9, 17, 0.76);
  border: 1px solid rgba(103, 232, 249, 0.24);
  font-family: var(--rx-mono); font-size: 0.62rem; color: var(--rx-cyan-soft);
  backdrop-filter: blur(8px);
}
.rx-module-state {
  position: absolute; z-index: 2; right: 14px; top: 14px;
  padding: 5px 9px; border-radius: 999px;
  font-family: var(--rx-mono); font-size: 0.58rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  background: rgba(7, 24, 38, 0.82); border: 1px solid rgba(103, 232, 249, 0.22); color: var(--rx-muted);
  backdrop-filter: blur(8px);
}
.rx-module.is-done .rx-module-state { color: #a7f3d0; border-color: rgba(52, 211, 153, 0.3); background: rgba(5, 34, 26, 0.82); }
.rx-module-body { padding: 17px 17px 18px; display: flex; flex-direction: column; flex: 1; }
.rx-module-theme { font-family: var(--rx-mono); font-size: 0.6rem; color: var(--rx-cyan); letter-spacing: 0.12em; text-transform: uppercase; }
.rx-module h3 { margin: 7px 0 8px; font-size: 1.08rem; line-height: 1.18; letter-spacing: -0.02em; }
.rx-module p { margin: 0; color: var(--rx-muted); font-size: 0.8rem; line-height: 1.5; flex: 1; }
.rx-module-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0; }
.rx-module-tags span { font-family: var(--rx-mono); font-size: 0.56rem; color: #9ac3d1; padding: 3px 6px; border-radius: 5px; background: rgba(30, 64, 82, 0.32); border: 1px solid rgba(96, 170, 194, 0.12); }
.rx-module-extra { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; margin: 0 0 12px; color: var(--rx-cyan-soft); font-family: var(--rx-mono); font-size: 0.62rem; font-weight: 600; border-bottom: 1px dashed rgba(103,232,249,.28); }
.rx-module-extra:hover { color: #fff; border-bottom-color: rgba(103,232,249,.7); }
.rx-module-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid rgba(80, 150, 175, 0.13); padding-top: 13px; }
.rx-xp { font-family: var(--rx-mono); font-size: 0.68rem; color: var(--rx-amber); }
.rx-xp strong { font-size: 0.86rem; }
.rx-module .rx-btn { padding: 8px 12px; border-radius: 9px; font-size: 0.72rem; }
.rx-module.is-done .rx-module-state::before { content: '✓ '; }

.rx-lab-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rx-lab-card {
  position: relative; overflow: hidden; border-radius: 22px;
  border: 1px solid var(--rx-border);
  display: flex; flex-direction: column;
  background: var(--rx-panel);
  transition: 0.25s ease;
}
.rx-lab-card:hover { transform: translateY(-4px); border-color: var(--rx-border-strong); box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35); }
.rx-lab-card img { position: static; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: 1; transition: transform 0.55s ease; }
.rx-lab-card:hover img { transform: scale(1.03); }
.rx-lab-copy { position: relative; z-index: 1; padding: 18px; display: flex; flex-direction: column; flex: 1; }
.rx-lab-copy h3 { margin: 8px 0; font-size: 1.28rem; letter-spacing: -0.03em; }
.rx-lab-copy p { margin: 0 0 14px; max-width: 50ch; color: #aecbd8; font-size: 0.8rem; flex: 1; }
.rx-lab-copy .rx-btn { align-self: flex-start; }

.rx-ranks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.rx-rank {
  text-align: center; padding: 18px 12px; border-radius: 18px;
  background: rgba(8, 20, 35, 0.72); border: 1px solid var(--rx-border);
  transition: 0.25s ease;
}
.rx-rank img { width: 80px; height: 80px; margin: 0 auto 10px; filter: grayscale(0.55) opacity(0.7); transition: 0.25s ease; }
.rx-rank.is-current { border-color: rgba(251, 191, 36, 0.42); background: linear-gradient(160deg, rgba(44, 32, 8, 0.62), rgba(8, 20, 35, 0.8)); box-shadow: 0 0 36px rgba(251, 191, 36, 0.09); }
.rx-rank.is-current img { filter: none; }
.rx-rank strong { display: block; font-size: 0.78rem; line-height: 1.25; }
.rx-rank span { display: block; margin-top: 5px; font-family: var(--rx-mono); font-size: 0.58rem; color: var(--rx-muted); }

.rx-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.rx-info-card { padding: 24px; border-radius: 22px; background: var(--rx-panel); border: 1px solid var(--rx-border); }
.rx-info-card h3 { margin: 0 0 8px; font-size: 1.15rem; letter-spacing: -0.02em; }
.rx-info-card p { margin: 0 0 14px; color: var(--rx-muted); font-size: 0.82rem; }
.rx-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.rx-list li { display: flex; gap: 9px; color: #b7d4df; font-size: 0.8rem; }
.rx-list li::before { content: '→'; color: var(--rx-cyan); font-family: var(--rx-mono); flex-shrink: 0; }
.rx-code { font-family: var(--rx-mono); font-size: 0.7rem; color: var(--rx-cyan-soft); background: rgba(3, 10, 18, 0.75); border: 1px solid rgba(80, 160, 185, 0.14); padding: 2px 5px; border-radius: 4px; }

.rx-footer { margin-top: 80px; border-top: 1px solid rgba(80, 160, 190, 0.12); padding: 28px 0 42px; color: var(--rx-muted); font-size: 0.74rem; }
.rx-footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rx-footer strong { color: var(--rx-text); }
.rx-footer a { color: var(--rx-cyan-soft); }

.rx-modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; padding: 20px; background: rgba(1, 4, 9, 0.82); backdrop-filter: blur(12px); }
.rx-modal.is-open { display: grid; }
.rx-modal-panel { width: min(440px, 100%); border-radius: 24px; padding: 26px; background: var(--rx-panel-strong); border: 1px solid var(--rx-border-strong); box-shadow: var(--rx-shadow); }
.rx-modal-panel h2 { margin: 0 0 4px; font-size: 1.35rem; }
.rx-modal-panel p { margin: 0 0 18px; color: var(--rx-muted); font-size: 0.8rem; }
.rx-field { margin-bottom: 12px; }
.rx-field label { display: block; margin-bottom: 5px; color: #b9d6e1; font-size: 0.72rem; font-weight: 700; }
.rx-field input {
  width: 100%; padding: 11px 12px; border-radius: 10px; color: var(--rx-text);
  background: rgba(3, 9, 17, 0.85); border: 1px solid rgba(80, 160, 185, 0.22);
}
.rx-field input:focus { border-color: var(--rx-cyan); outline: none; box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12); }
.rx-modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.rx-error { display: none; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: rgba(80, 12, 26, 0.6); border: 1px solid rgba(251, 113, 133, 0.28); color: #fecdd3; font-size: 0.75rem; }
.rx-error.is-visible { display: block; }
.rx-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 24px);
  z-index: 120; opacity: 0; pointer-events: none; transition: 0.3s ease;
  padding: 12px 18px; border-radius: 12px; background: rgba(5, 26, 36, 0.96);
  border: 1px solid rgba(52, 211, 153, 0.3); color: #d1fae5; font-size: 0.8rem; font-weight: 700;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.rx-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.rx-lab-page { padding: 28px 0 0; }
.rx-lab-header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.rx-lab-header h1 { margin: 8px 0 8px; font-size: clamp(1.9rem, 4vw, 3.2rem); letter-spacing: -0.04em; line-height: 1; }
.rx-lab-header p { max-width: 72ch; margin: 0; color: var(--rx-muted); font-size: 0.88rem; }
.rx-lab-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr); gap: 18px; align-items: start; }
.rx-panel { border-radius: 20px; background: var(--rx-panel); border: 1px solid var(--rx-border); padding: 18px; }
.rx-panel h2, .rx-panel h3 { margin: 0 0 10px; letter-spacing: -0.02em; }
.rx-panel h2 { font-size: 1.1rem; }
.rx-panel h3 { font-size: 0.92rem; }
.rx-panel p { color: var(--rx-muted); font-size: 0.8rem; }
.rx-canvas-wrap { position: relative; border-radius: 16px; overflow: hidden; background: #02070d; border: 1px solid rgba(80, 160, 185, 0.16); }
.rx-canvas-wrap canvas { display: block; width: 100%; height: auto; }
.rx-controls { display: grid; gap: 13px; }
.rx-control label { display: flex; justify-content: space-between; gap: 10px; font-size: 0.74rem; color: #b9d6e1; font-weight: 700; }
.rx-control label span { font-family: var(--rx-mono); color: var(--rx-cyan-soft); font-weight: 500; }
.rx-control input[type='range'] { width: 100%; accent-color: var(--rx-cyan); margin-top: 4px; }
.rx-segment { display: flex; flex-wrap: wrap; gap: 6px; }
.rx-segment button {
  border: 1px solid rgba(80, 160, 185, 0.2); background: rgba(4, 14, 24, 0.75); color: var(--rx-muted);
  border-radius: 8px; padding: 7px 10px; font-size: 0.7rem; font-weight: 700;
}
.rx-segment button.is-active { border-color: var(--rx-cyan); color: var(--rx-cyan-soft); background: rgba(12, 46, 60, 0.65); }
.rx-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rx-metric { padding: 10px; border-radius: 10px; background: rgba(3, 10, 18, 0.55); border: 1px solid rgba(80, 160, 185, 0.12); }
.rx-metric span { display: block; font-family: var(--rx-mono); font-size: 0.57rem; color: var(--rx-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.rx-metric strong { display: block; margin-top: 3px; font-family: var(--rx-mono); font-size: 1.05rem; color: var(--rx-cyan-soft); }
.rx-metric strong.is-warn { color: var(--rx-amber); }
.rx-metric strong.is-bad { color: var(--rx-rose); }
.rx-metric strong.is-good { color: var(--rx-emerald); }
.rx-log { max-height: 190px; overflow: auto; padding: 10px; border-radius: 10px; background: rgba(1, 5, 10, 0.78); border: 1px solid rgba(80, 160, 185, 0.12); font-family: var(--rx-mono); font-size: 0.66rem; line-height: 1.55; }
.rx-log p { margin: 0 0 3px; color: #a9cbd8; }
.rx-log p.ok { color: #a7f3d0; }
.rx-log p.warn { color: #fde68a; }
.rx-log p.err { color: #fecdd3; }
.rx-checklist { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.rx-checklist label { display: flex; gap: 8px; align-items: start; font-size: 0.76rem; color: #b9d6e1; }
.rx-checklist input { margin-top: 3px; accent-color: var(--rx-cyan); }
.rx-table { width: 100%; border-collapse: collapse; font-size: 0.72rem; }
.rx-table th { text-align: left; color: var(--rx-muted); font-family: var(--rx-mono); font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 8px; border-bottom: 1px solid rgba(80, 160, 185, 0.18); }
.rx-table td { padding: 8px; border-bottom: 1px solid rgba(80, 160, 185, 0.09); color: #c4dde6; }
.rx-table tr:last-child td { border-bottom: 0; }
.rx-empty { padding: 24px; text-align: center; color: var(--rx-muted); font-size: 0.8rem; }

.rx-audio { display: inline-flex; align-items: center; }
.rx-audio-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  background: rgba(7, 22, 36, 0.78);
  color: var(--rx-cyan-soft);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  transition: 0.2s ease;
}
.rx-audio-btn:hover { border-color: rgba(103, 232, 249, 0.48); background: rgba(10, 34, 50, 0.9); }
.rx-audio-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.rx-audio-btn.is-playing { border-color: rgba(52, 211, 153, 0.45); color: #a7f3d0; background: rgba(5, 34, 28, 0.72); }
.rx-btn[aria-pressed='true'] { border-color: rgba(52, 211, 153, 0.45); color: #a7f3d0; background: rgba(5, 34, 28, 0.72); }
.rx-btn.is-loading, .rx-audio-btn.is-loading { opacity: .65; cursor: wait; }
.rx-audio-wave { display: inline-flex; align-items: center; gap: 2px; height: 13px; }
.rx-audio-wave i { display: block; width: 2px; height: 5px; border-radius: 2px; background: currentColor; opacity: 0.6; }
.rx-audio-btn.is-playing .rx-audio-wave i { animation: rx-wave 0.8s ease-in-out infinite alternate; }
.rx-audio-btn.is-playing .rx-audio-wave i:nth-child(2) { animation-delay: 0.16s; }
.rx-audio-btn.is-playing .rx-audio-wave i:nth-child(3) { animation-delay: 0.32s; }
@keyframes rx-wave { from { height: 4px; } to { height: 13px; } }
@media (max-width: 720px) {
  .rx-audio-btn { padding: 7px 9px; font-size: 0.64rem; }
  .rx-audio-label { max-width: 108px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.8,.2,1); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .rx-btn:hover, .rx-module:hover { transform: none; }
}

@media (max-width: 1050px) {
  .rx-hero-inner { grid-template-columns: 1fr; align-items: start; }
  .rx-rank-card { margin: 0; max-width: 420px; }
  .rx-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-chapter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-lab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-ranks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rx-lab-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .rx-shell { width: min(100% - 24px, 1280px); }
  .rx-topbar-inner { min-height: 64px; }
  .rx-brand span { display: none; }
  .rx-nav { display: none; }
  .rx-hero { min-height: auto; margin-top: 16px; border-radius: 22px; background-position: 62% center; }
  .rx-hero::before { background: linear-gradient(90deg, rgba(3, 8, 16, 0.98), rgba(3, 8, 16, 0.72) 70%), linear-gradient(0deg, rgba(3, 8, 16, 0.9), transparent 60%); }
  .rx-hero-inner { min-height: auto; padding: 26px 20px; }
  .rx-hero h1 { font-size: clamp(2.1rem, 11vw, 3.3rem); }
  .rx-hero-stats { grid-template-columns: 1fr 1fr; }
  .rx-module-grid, .rx-chapter-grid, .rx-lab-grid, .rx-two-col { grid-template-columns: 1fr; }
  .rx-ranks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rx-section { padding-top: 52px; }
  .rx-section-head { display: block; }
  .rx-section-head .rx-btn { margin-top: 14px; }
  .rx-lab-header { display: block; }
  .rx-lab-header .rx-btn { margin-top: 12px; }
  .rx-metrics { grid-template-columns: 1fr 1fr; }
  .rx-footer-inner { display: block; }
}
@media (max-width: 460px) {
  .rx-hero-actions .rx-btn { width: 100%; }
  .rx-hero-stats { gap: 8px; }
  .rx-stat strong { font-size: 1.35rem; }
  .rx-rank-head img { width: 62px; height: 62px; }
  .rx-segment button { flex: 1; }
}

@media print {
  body { background: #fff; color: #111; }
  body::before, body::after, .rx-topbar, .rx-footer, .rx-btn, .rx-nav, .rx-toast { display: none !important; }
  .rx-shell { width: 100%; }
}
