/* ==========================================================================
   ХКМ.PRO — Design System (Strictly White & Bright Sky/Cyan Blue)
   ========================================================================== */

:root {
  --bg-white: #ffffff;
  --bg-ice: #f4fbff;
  --bg-ice-2: #e6f7ff;
  --bg-cyan-soft: #d9f3ff;

  --cyan-neon: #00d4ff;
  --cyan-bright: #00b4ff;
  --sky-vivid: #38bdf8;
  --sky-light: #7dd3fc;
  --sky-border: #bae6fd;

  --blue-action: #0284c7;
  --blue-deep: #0369a1;
  --blue-text: #064e7a;
  --blue-muted: #2874a6;

  --glass-bg: rgba(255, 255, 255, 0.86);
  --glass-border: rgba(0, 180, 255, 0.24);
  --shadow-ice: 0 14px 40px -10px rgba(0, 162, 255, 0.16);
  --shadow-glow: 0 0 28px rgba(0, 212, 255, 0.28);

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'Manrope', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--blue-text);
  background: linear-gradient(180deg, #ffffff 0%, #f4fbff 45%, #ffffff 100%);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: var(--bg-ice);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--cyan-neon), var(--cyan-bright));
  border-radius: 99px;
}

#frost-particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1240px, 92vw);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  color: var(--blue-deep);
  line-height: 1.18;
}

p {
  margin: 0 0 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.muted-small {
  font-size: 0.9rem;
  color: var(--blue-muted);
  margin-bottom: 1rem;
}

.text-gradient {
  background: linear-gradient(110deg, var(--blue-action) 0%, var(--cyan-bright) 50%, var(--cyan-neon) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   HEADER & NAV
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--sky-border);
}

.header-progress-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-neon), var(--cyan-bright), var(--blue-action));
  transition: width 0.1s linear;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.78rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-cube {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan-neon), var(--blue-action));
  color: var(--bg-white);
  box-shadow: var(--shadow-glow);
  font-size: 1.25rem;
}

.brand-cube svg {
  width: 24px;
  height: 24px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--blue-deep);
}

.accent-dot {
  color: var(--cyan-bright);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--blue-muted);
  font-weight: 600;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.48rem 0.9rem;
  border-radius: 99px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--blue-text);
  transition: all 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--bg-ice-2);
  color: var(--blue-action);
  box-shadow: inset 0 0 0 1px var(--sky-border);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.xp-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem;
  border-radius: 99px;
  background: linear-gradient(135deg, #ffffff, var(--bg-ice-2));
  border: 1.5px solid var(--cyan-bright);
  font-size: 0.85rem;
  color: var(--blue-deep);
  box-shadow: 0 4px 14px rgba(0, 180, 255, 0.16);
}

.xp-icon {
  color: var(--cyan-bright);
  animation: spinSlow 9s linear infinite;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}
.mobile-menu-btn span {
  width: 20px;
  height: 2px;
  background: var(--blue-action);
  border-radius: 2px;
}

/* ==========================================================================
   BUTTONS & BADGES
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.45rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--cyan-bright) 0%, var(--blue-action) 100%);
  color: var(--bg-white);
  box-shadow: 0 10px 25px rgba(0, 165, 255, 0.34);
}
.btn-primary:hover {
  box-shadow: 0 14px 32px rgba(0, 180, 255, 0.46);
}

.btn-outline {
  background: var(--bg-white);
  color: var(--blue-action);
  border-color: var(--cyan-bright);
  box-shadow: 0 6px 18px rgba(0, 180, 255, 0.12);
}
.btn-outline:hover {
  background: var(--bg-ice-2);
}

.btn-ghost {
  background: var(--bg-ice);
  color: var(--blue-deep);
  border-color: var(--sky-border);
}
.btn-ghost:hover {
  background: var(--bg-cyan-soft);
}

.btn-mini {
  padding: 0.42rem 0.9rem;
  border-radius: 99px;
  border: 1.5px solid var(--cyan-bright);
  background: var(--bg-white);
  color: var(--blue-action);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-mini:hover {
  background: var(--cyan-bright);
  color: var(--bg-white);
}

.badge-icy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.72rem;
  border-radius: 99px;
  background: var(--bg-ice-2);
  border: 1px solid var(--sky-light);
  color: var(--blue-action);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1.5px solid var(--sky-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-ice);
}

.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 3.4rem 0 0;
  overflow: hidden;
  background: radial-gradient(circle at 80% 20%, rgba(0, 212, 255, 0.16), transparent 45%),
              radial-gradient(circle at 12% 75%, rgba(56, 189, 248, 0.14), transparent 42%),
              #ffffff;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 1;
}
.hero-glow-1 {
  width: 360px;
  height: 360px;
  background: rgba(0, 212, 255, 0.22);
  top: -80px;
  right: 8%;
  animation: floatOrb 8s ease-in-out infinite;
}
.hero-glow-2 {
  width: 280px;
  height: 280px;
  background: rgba(125, 211, 252, 0.25);
  bottom: 40px;
  left: -60px;
  animation: floatOrb 10s ease-in-out infinite reverse;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  padding-bottom: 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 1rem;
  border-radius: 99px;
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-light);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-action);
  margin-bottom: 1.2rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--cyan-neon);
  box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7);
  animation: pulseCyan 1.8s infinite;
  display: inline-block;
}

.hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.45rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 1.15rem;
  color: var(--blue-deep);
}

.kinetic-word-wrap {
  display: inline-block;
  position: relative;
  padding: 0 0.25rem;
}

.kinetic-word {
  display: inline-block;
  color: var(--cyan-bright);
  border-bottom: 3px solid var(--cyan-neon);
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.kinetic-word.switching {
  opacity: 0;
  transform: translateY(-10px);
}

.hero-desc {
  font-size: 1.06rem;
  color: var(--blue-text);
  max-width: 580px;
  margin-bottom: 1.7rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.stat-card {
  background: var(--bg-white);
  border: 1.5px solid var(--sky-border);
  border-radius: var(--radius-md);
  padding: 0.9rem 0.8rem;
  box-shadow: 0 6px 20px rgba(0, 180, 255, 0.08);
  transition: transform 0.22s ease, border-color 0.22s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--cyan-bright);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--cyan-bright);
}

.stat-label {
  font-size: 0.76rem;
  color: var(--blue-muted);
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.2rem;
}

/* Hero 3D Panel */
.hero-3d-frame {
  position: relative;
  border-radius: 26px;
  background: linear-gradient(155deg, #ffffff 0%, #e8f8ff 100%);
  border: 2px solid var(--sky-light);
  box-shadow: 0 24px 60px rgba(0, 174, 255, 0.22);
  overflow: hidden;
}

.hero-3d-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--sky-border);
  background: rgba(255, 255, 255, 0.82);
}

.chip-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-action);
}

.chip-info {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-muted);
}

.hero-3d-canvas-wrap {
  width: 100%;
  height: 390px;
  cursor: grab;
  position: relative;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, #00aeff 0%, #0284c7 56%, #035388 100%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
}
.hero-3d-canvas-wrap:active {
  cursor: grabbing;
}

.hero-3d-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--sky-border);
}

.hud-pill {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  border-radius: 8px;
}
.hud-lbl {
  color: var(--blue-muted);
}
.hud-pill strong {
  color: var(--blue-action);
}

.hud-btn {
  border: 1.5px solid var(--cyan-bright);
  background: var(--bg-white);
  color: var(--blue-action);
  border-radius: 8px;
  padding: 0.3rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.hud-btn:hover {
  background: var(--cyan-bright);
  color: var(--bg-white);
}

.hero-3d-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--blue-muted);
  margin-top: 0.65rem;
  font-weight: 600;
}

/* Marquee Strip */
.marquee-strip {
  background: linear-gradient(90deg, var(--blue-action), var(--cyan-bright), var(--cyan-neon), var(--blue-action));
  color: var(--bg-white);
  padding: 0.72rem 0;
  overflow: hidden;
  white-space: nowrap;
  border-top: 1px solid var(--sky-light);
  border-bottom: 1px solid var(--sky-light);
}

.marquee-track {
  display: inline-flex;
  gap: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  animation: marqueeScroll 28s linear infinite;
}

/* ==========================================================================
   SECTIONS COMMON
   ========================================================================== */
.section {
  padding: 4.8rem 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(180deg, #f2faff 0%, #ffffff 55%, #f2faff 100%);
  border-top: 1px solid var(--sky-border);
  border-bottom: 1px solid var(--sky-border);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.8rem;
}

.section-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cyan-bright);
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 0.85rem;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  margin-bottom: 0.85rem;
}

.section-subtitle {
  color: var(--blue-muted);
  font-size: 1.02rem;
}

/* ==========================================================================
   SECTION 1: INFOGRAPHICS & CYCLE STUDIO
   ========================================================================== */
.cycle-controls-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  background: var(--bg-white);
  border: 1.5px solid var(--sky-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-ice);
  margin-bottom: 1.5rem;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: var(--blue-text);
}

.control-group label strong {
  font-family: var(--font-mono);
  color: var(--cyan-bright);
  background: var(--bg-ice);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--sky-border);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  background: var(--bg-ice-2);
  border-radius: 99px;
  outline: none;
  border: 1px solid var(--sky-border);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-neon), var(--blue-action));
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 10px rgba(0, 180, 255, 0.5);
  cursor: pointer;
}

.icy-select {
  width: 100%;
  padding: 0.52rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid var(--sky-light);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-family: inherit;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.cycle-visuals-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.legend-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.legend-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.24rem 0.65rem;
  border-radius: 99px;
}
.legend-pill.high-p {
  background: #e0f5ff;
  color: var(--blue-action);
  border: 1px solid var(--cyan-bright);
}
.legend-pill.low-p {
  background: #f4fbff;
  color: var(--blue-muted);
  border: 1px solid var(--sky-light);
}

.svg-wrapper {
  width: 100%;
  overflow: hidden;
}

.cycle-svg {
  width: 100%;
  height: auto;
  display: block;
}

.svg-zone-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  fill: var(--blue-muted);
  letter-spacing: 0.08em;
}

.svg-node {
  cursor: pointer;
  transition: transform 0.2s ease;
}
.svg-node:hover rect {
  stroke: var(--cyan-neon);
  stroke-width: 3.5;
}

.svg-node-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  fill: var(--blue-deep);
}

.svg-call-lbl {
  font-size: 9.5px;
  font-weight: 700;
  fill: var(--blue-muted);
}

.svg-call-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  fill: var(--blue-action);
}

.pipe-base {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pipe-high { stroke: #bae6fd; }
.pipe-high-liquid { stroke: #7dd3fc; }
.pipe-low-mist { stroke: #d8f3ff; }
.pipe-low { stroke: #e0f7ff; }

.pipe-flow-fast {
  fill: none;
  stroke: #00b4ff;
  stroke-width: 5;
  stroke-dasharray: 12 10;
  stroke-linecap: round;
  animation: pipeDash 0.8s linear infinite;
}
.pipe-flow-med {
  fill: none;
  stroke: #0284c7;
  stroke-width: 6;
  stroke-dasharray: 18 10;
  stroke-linecap: round;
  animation: pipeDash 1.3s linear infinite;
}
.pipe-flow-mist {
  fill: none;
  stroke: #38bdf8;
  stroke-width: 4.5;
  stroke-dasharray: 4 10;
  stroke-linecap: round;
  animation: pipeDash 1.1s linear infinite;
}
.pipe-flow-slow {
  fill: none;
  stroke: #00d4ff;
  stroke-width: 5;
  stroke-dasharray: 10 14;
  stroke-linecap: round;
  animation: pipeDash 1.6s linear infinite;
}

#svgCompRotor {
  transform-box: fill-box;
  transform-origin: center;
  animation: spinSlow 2.4s linear infinite;
}

.node-explainer-bar {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
}

/* Mollier P-h SVG */
.mollier-svg {
  width: 100%;
  height: auto;
  background: var(--bg-ice);
  border-radius: var(--radius-md);
  border: 1px solid var(--sky-border);
}
.mollier-axis {
  font-size: 10.5px;
  font-weight: 700;
  fill: var(--blue-muted);
}
.mollier-note {
  font-size: 9.5px;
  font-weight: 700;
  fill: var(--blue-action);
}
.mollier-pt {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  fill: var(--blue-deep);
}

.metrics-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1rem;
}
.metric-mini {
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  display: flex;
  flex-direction: column;
}
.metric-mini span {
  font-size: 0.76rem;
  color: var(--blue-muted);
  font-weight: 600;
}
.metric-mini strong {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  color: var(--blue-action);
}

/* Infographic Dual Grid */
.infographic-dual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.tab-pills {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.tab-pill {
  padding: 0.34rem 0.72rem;
  border-radius: 99px;
  border: 1px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-pill.active {
  background: var(--cyan-bright);
  color: var(--bg-white);
  border-color: var(--cyan-bright);
}

.bars-container {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}
.bar-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.32rem;
}
.bar-track {
  height: 13px;
  border-radius: 99px;
  background: var(--bg-ice-2);
  border: 1px solid var(--sky-border);
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sky-vivid), var(--cyan-neon));
  width: 0%;
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Install Timeline */
.install-timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.install-step-btn {
  padding: 0.55rem 0.4rem;
  border-radius: 12px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-text);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  transition: all 0.22s ease;
}
.install-step-btn span.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-white);
  border: 1px solid var(--sky-light);
  font-family: var(--font-mono);
  color: var(--blue-action);
}
.install-step-btn.active {
  background: linear-gradient(135deg, var(--cyan-bright), var(--blue-action));
  color: var(--bg-white);
  border-color: var(--blue-action);
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 180, 255, 0.25);
}
.install-step-btn.active span.step-num {
  background: var(--bg-white);
  color: var(--blue-action);
}

.install-step-detail {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-ice);
  border: 1px solid var(--sky-light);
  min-height: 92px;
}
.install-step-detail h4 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.install-step-detail p {
  font-size: 0.88rem;
  margin: 0;
}

/* ==========================================================================
   SECTION 2: 3D LABORATORY
   ========================================================================== */
.lab3d-shell {
  background: var(--bg-white);
  border: 1.5px solid var(--sky-light);
  border-radius: 26px;
  padding: 1.25rem;
  box-shadow: var(--shadow-ice);
}

.lab3d-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.lab-tab {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.72rem 0.85rem;
  border-radius: 14px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-text);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.22s ease;
}
.lab-tab:hover {
  border-color: var(--cyan-bright);
  background: var(--bg-ice-2);
}
.lab-tab.active {
  background: linear-gradient(135deg, var(--cyan-bright), var(--blue-action));
  color: var(--bg-white);
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(0, 174, 255, 0.3);
}

.lab-tab-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.24);
}

.lab3d-workspace {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 1.25rem;
}

.lab3d-viewport-wrap {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  border: 1.5px solid var(--sky-border);
  background: radial-gradient(circle at center, #ffffff 0%, #eaf8ff 100%);
  overflow: hidden;
}

.lab3d-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.7rem 0.95rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--sky-border);
}

.toolbar-left {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tool-toggle {
  padding: 0.4rem 0.78rem;
  border-radius: 10px;
  border: 1px solid var(--sky-light);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.tool-toggle.active {
  background: var(--cyan-bright);
  color: var(--bg-white);
  border-color: var(--cyan-bright);
}

.fps-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--blue-muted);
  font-weight: 600;
}

.lab3d-canvas-box {
  position: relative;
  width: 100%;
  height: 470px;
  cursor: grab;
  background:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    radial-gradient(circle at 50% 42%, #00aeff 0%, #0284c7 56%, #035388 100%);
  background-size: 38px 38px, 38px 38px, 100% 100%;
}
.lab3d-canvas-box:active {
  cursor: grabbing;
}

.hotspots-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.26rem 0.6rem 0.26rem 0.34rem;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--cyan-bright);
  color: var(--blue-deep);
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0, 180, 255, 0.28);
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease;
  white-space: nowrap;
}
.hotspot-pin:hover,
.hotspot-pin.active {
  background: var(--cyan-bright);
  color: var(--bg-white);
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 10;
}
.hotspot-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan-neon);
  border: 2px solid #ffffff;
}

.lab3d-inspector {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
  border-radius: 20px;
  padding: 1.25rem;
}

.inspector-header h3 {
  margin-top: 0.55rem;
  font-size: 1.25rem;
}
.inspector-header p {
  font-size: 0.9rem;
  color: var(--blue-muted);
  margin-bottom: 0;
}

.inspector-hotspot-box {
  background: var(--bg-white);
  border: 1.5px solid var(--cyan-bright);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(0, 180, 255, 0.12);
}
.hotspot-box-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--cyan-bright);
  margin-bottom: 0.3rem;
}
.inspector-hotspot-box h4 {
  font-size: 1.04rem;
  margin-bottom: 0.4rem;
}
.inspector-hotspot-box p {
  font-size: 0.87rem;
  margin-bottom: 0.7rem;
}
.hotspot-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.spec-tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.24rem 0.55rem;
  border-radius: 8px;
  background: var(--bg-ice-2);
  color: var(--blue-action);
  font-weight: 700;
}

.parts-list-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-muted);
  margin-bottom: 0.5rem;
}
.parts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.part-chip {
  padding: 0.38rem 0.7rem;
  border-radius: 99px;
  border: 1px solid var(--sky-light);
  background: var(--bg-white);
  color: var(--blue-text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
}
.part-chip.active,
.part-chip:hover {
  background: var(--blue-action);
  color: var(--bg-white);
  border-color: var(--blue-action);
}

/* ==========================================================================
   SECTION 3: LECTURES (TEXT + VIDEO PLAYER)
   ========================================================================== */
.lectures-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.lectures-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.lecture-nav-item {
  width: 100%;
  text-align: left;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-white);
  cursor: pointer;
  transition: all 0.22s ease;
  font-family: inherit;
}
.lecture-nav-item:hover {
  border-color: var(--cyan-bright);
  transform: translateX(3px);
}
.lecture-nav-item.active {
  background: linear-gradient(135deg, var(--bg-ice-2), #ffffff);
  border-color: var(--cyan-bright);
  box-shadow: 0 10px 24px rgba(0, 180, 255, 0.16);
}
.lecture-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan-bright);
  margin-bottom: 0.35rem;
}
.lecture-nav-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--blue-deep);
  display: block;
}
.lecture-nav-meta {
  font-size: 0.78rem;
  color: var(--blue-muted);
  margin-top: 0.25rem;
  display: block;
}

.lecture-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.lecture-stage-header h3 {
  margin-top: 0.45rem;
  font-size: 1.45rem;
}

.lecture-mode-switch {
  display: flex;
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  border-radius: 12px;
  padding: 4px;
}
.mode-btn {
  padding: 0.42rem 0.85rem;
  border: none;
  background: transparent;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-muted);
  cursor: pointer;
}
.mode-btn.active {
  background: var(--bg-white);
  color: var(--blue-action);
  box-shadow: 0 2px 8px rgba(0, 162, 255, 0.15);
}

/* Video Player */
.video-player-container {
  border-radius: 18px;
  border: 1.5px solid var(--sky-light);
  background: var(--bg-ice);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.video-screen-wrap {
  position: relative;
  background: linear-gradient(145deg, #ffffff, #e6f7ff);
}

#lectureVideoCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.video-captions {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 700px);
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--sky-light);
  color: var(--blue-deep);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 165, 255, 0.15);
}

.video-big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  background: linear-gradient(135deg, var(--cyan-neon), var(--blue-action));
  color: #ffffff;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 180, 255, 0.45);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.video-big-play:hover {
  transform: translate(-50%, -50%) scale(1.08);
}
.video-big-play.hidden-play {
  opacity: 0;
  pointer-events: none;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-white);
  border-top: 1px solid var(--sky-border);
}
.v-btn {
  border: 1px solid var(--sky-light);
  background: var(--bg-ice);
  color: var(--blue-action);
  border-radius: 8px;
  padding: 0.34rem 0.68rem;
  font-weight: 700;
  cursor: pointer;
}
.v-time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue-muted);
  white-space: nowrap;
}
.v-seek {
  flex: 1;
}

.video-chapters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 1rem;
  background: var(--bg-ice);
  border-top: 1px solid var(--sky-border);
}
.chapter-chip {
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  border: 1px solid var(--sky-border);
  background: var(--bg-white);
  color: var(--blue-text);
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}
.chapter-chip.active {
  background: var(--cyan-bright);
  color: var(--bg-white);
  border-color: var(--cyan-bright);
}

/* Text Lecture Styling */
.lecture-text-body h4 {
  font-size: 1.15rem;
  margin-top: 1.35rem;
  margin-bottom: 0.55rem;
  color: var(--blue-action);
}
.lecture-text-body ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}
.lecture-text-body li {
  margin-bottom: 0.42rem;
}

.lecture-callout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0 1.2rem;
}
.lecture-callout {
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
  border-radius: 14px;
  padding: 0.9rem;
}
.lecture-callout strong {
  display: block;
  color: var(--blue-action);
  margin-bottom: 0.25rem;
}

.formula-box {
  font-family: var(--font-mono);
  background: linear-gradient(135deg, #f4fbff, #e6f7ff);
  border: 1.5px solid var(--cyan-bright);
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
  color: var(--blue-deep);
  font-weight: 600;
}

.lecture-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--sky-border);
}

/* ==========================================================================
   SECTION 4: GAMES & DIAGNOSTIC SIMULATORS
   ========================================================================== */
.games-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.game-tab {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.15rem;
  border-radius: 18px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-white);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.22s ease;
}
.game-tab:hover {
  border-color: var(--cyan-bright);
  transform: translateY(-2px);
}
.game-tab.active {
  background: linear-gradient(135deg, var(--cyan-bright), var(--blue-action));
  color: var(--bg-white);
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(0, 174, 255, 0.28);
}
.game-tab strong {
  display: block;
  font-size: 1rem;
}
.game-tab small {
  opacity: 0.85;
  font-size: 0.8rem;
}
.game-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(0, 180, 255, 0.12);
  font-size: 1.35rem;
  flex-shrink: 0;
}
.game-tab.active .game-icon {
  background: rgba(255, 255, 255, 0.22);
}

.game-panel {
  display: none;
}
.game-panel.active {
  display: block;
  animation: fadeInUp 0.35s ease;
}

/* Game 1: Fault Finder */
.ff-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
}
.ff-case-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.ff-case-pill {
  padding: 0.42rem 0.85rem;
  border-radius: 99px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-text);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}
.ff-case-pill.active {
  background: var(--blue-action);
  color: var(--bg-white);
  border-color: var(--blue-action);
}
.ff-case-pill.solved {
  border-color: var(--cyan-neon);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.25);
}

.ff-score-box {
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.ff-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.5rem;
}

.ff-complaint-banner {
  background: var(--bg-ice);
  border: 1.5px solid var(--cyan-bright);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
}
.ff-complaint-banner p {
  margin: 0.45rem 0 0;
  font-weight: 700;
  color: var(--blue-deep);
}

.ff-unit-svg-wrap {
  background: var(--bg-white);
  border: 1.5px solid var(--sky-border);
  border-radius: 16px;
  padding: 0.5rem;
  margin-bottom: 0.9rem;
}
.ff-unit-svg {
  width: 100%;
  height: auto;
  display: block;
}
.ff-svg-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  fill: var(--blue-action);
}
.ff-zone-lbl {
  font-size: 9.5px;
  font-weight: 700;
  fill: var(--blue-muted);
}
.ff-gauge-lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  fill: var(--blue-muted);
}
.ff-gauge-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  fill: var(--blue-action);
}
.ff-inspect-zone {
  cursor: pointer;
}
.ff-inspect-zone:hover rect {
  stroke: var(--cyan-neon);
  stroke-width: 3;
}
#ffFanBlades {
  transform-box: fill-box;
  transform-origin: center;
  animation: spinSlow 2.6s linear infinite;
}
#ffFanBlades.stopped {
  animation: none;
}

.ff-tools-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}
.ff-tool-btn {
  padding: 0.62rem 0.75rem;
  border-radius: 12px;
  border: 1.5px solid var(--sky-light);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ff-tool-btn:hover,
.ff-tool-btn.used {
  background: var(--cyan-bright);
  color: var(--bg-white);
  border-color: var(--cyan-bright);
}

.ff-log-box {
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  border-radius: 14px;
  padding: 0.85rem;
  min-height: 110px;
  max-height: 190px;
  overflow-y: auto;
  font-size: 0.86rem;
}
.ff-log-entry {
  padding: 0.42rem 0.65rem;
  border-radius: 10px;
  background: var(--bg-white);
  border: 1px solid var(--sky-border);
  margin-bottom: 0.45rem;
}
.ff-log-entry strong {
  color: var(--blue-action);
}

.ff-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.ff-option-btn {
  text-align: left;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.ff-option-btn:hover {
  border-color: var(--cyan-bright);
  background: var(--bg-ice-2);
}
.ff-option-btn.correct {
  background: linear-gradient(135deg, var(--cyan-bright), var(--blue-action));
  color: var(--bg-white);
  border-color: transparent;
}
.ff-option-btn.wrong {
  border-style: dashed;
  border-color: var(--blue-action);
  opacity: 0.68;
}

.ff-feedback {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--bg-ice-2);
  border: 1.5px solid var(--cyan-bright);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Game 2: Vacuum & Charge */
.vc-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 1.5rem;
}
.vc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.vc-meters-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin: 1rem 0;
}
.vc-meter {
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
  border-radius: 14px;
  padding: 0.85rem;
}
.vc-meter span {
  font-size: 0.78rem;
  color: var(--blue-muted);
  font-weight: 600;
}
.vc-meter strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  color: var(--blue-action);
  margin: 0.3rem 0 0.5rem;
}
.vc-bar {
  height: 9px;
  border-radius: 99px;
  background: var(--bg-white);
  border: 1px solid var(--sky-border);
  overflow: hidden;
}
.vc-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan-neon), var(--blue-action));
  transition: width 0.35s ease;
}

.vc-controls-deck {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.vc-action-btn {
  padding: 0.78rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid var(--sky-light);
  background: var(--bg-white);
  color: var(--blue-deep);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.vc-action-btn:hover {
  background: var(--cyan-bright);
  color: var(--bg-white);
  border-color: var(--cyan-bright);
}
.vc-action-btn.done {
  background: var(--bg-ice-2);
  border-color: var(--cyan-neon);
  color: var(--blue-action);
}

.vc-console {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
  border-radius: 14px;
  padding: 0.9rem;
  min-height: 125px;
  max-height: 170px;
  overflow-y: auto;
  color: var(--blue-deep);
}
.vc-console div {
  margin-bottom: 0.35rem;
}

.vc-checklist-card {
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
  border-radius: 18px;
  padding: 1.2rem;
}
.vc-checklist {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 1.2rem;
}
.vc-checklist li {
  padding: 0.6rem 0.8rem 0.6rem 2.1rem;
  border-radius: 10px;
  background: var(--bg-white);
  border: 1px solid var(--sky-border);
  margin-bottom: 0.5rem;
  position: relative;
  font-size: 0.88rem;
  font-weight: 600;
}
.vc-checklist li::before {
  content: "○";
  position: absolute;
  left: 0.8rem;
  color: var(--sky-vivid);
  font-weight: 700;
}
.vc-checklist li.completed {
  border-color: var(--cyan-bright);
  background: var(--bg-ice-2);
}
.vc-checklist li.completed::before {
  content: "✓";
  color: var(--cyan-bright);
}
.vc-tip-box {
  background: var(--bg-white);
  border: 1px solid var(--sky-light);
  border-radius: 14px;
  padding: 0.9rem;
  font-size: 0.84rem;
}
.vc-tip-box p {
  margin: 0.35rem 0 0;
  color: var(--blue-muted);
}

/* Game 3: Loop Builder & Quiz */
.lb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
.lb-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.55rem;
  margin: 1rem 0;
}
.lb-slot {
  min-height: 82px;
  border-radius: 14px;
  border: 2px dashed var(--sky-light);
  background: var(--bg-ice);
  padding: 0.55rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-muted);
  cursor: pointer;
}
.lb-slot span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan-bright);
  margin-bottom: 0.25rem;
}
.lb-slot.filled {
  border-style: solid;
  border-color: var(--cyan-bright);
  background: var(--bg-ice-2);
  color: var(--blue-deep);
}
.lb-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.lb-piece {
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  border: 1.5px solid var(--cyan-bright);
  background: var(--bg-white);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
}
.lb-piece.used {
  opacity: 0.38;
  pointer-events: none;
}
.lb-actions {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.quiz-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin: 0.8rem 0 1rem;
}
.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   SECTION 5: CAREER
   ========================================================================== */
.career-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 1.75rem;
}
.career-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.24s ease, border-color 0.24s ease;
}
.career-card:hover {
  transform: translateY(-5px);
  border-color: var(--cyan-bright);
}
.career-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--bg-ice-2);
  border: 1px solid var(--sky-light);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.career-card p {
  font-size: 0.9rem;
  color: var(--blue-muted);
  flex: 1;
}
.career-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue-action);
  background: var(--bg-ice);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--sky-border);
  align-self: flex-start;
}

.skills-roadmap {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 2rem;
  align-items: center;
}
.skills-roadmap-left h3 {
  margin-top: 0.6rem;
  font-size: 1.45rem;
}
.skills-bars {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

/* ==========================================================================
   FOOTER & TOASTS
   ========================================================================== */
.site-footer {
  background: var(--bg-ice);
  border-top: 1.5px solid var(--sky-border);
  padding: 2.2rem 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.footer-note {
  margin: 0.7rem 0 0;
  font-size: 0.86rem;
  color: var(--blue-muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--blue-action);
}
.footer-links a:hover {
  text-decoration: underline;
}

.toast-container {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.toast-msg {
  padding: 0.82rem 1.15rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, var(--bg-ice-2));
  border: 1.5px solid var(--cyan-bright);
  color: var(--blue-deep);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 12px 30px rgba(0, 174, 255, 0.25);
  animation: slideInToast 0.3s ease;
}

/* ==========================================================================
   REVEAL & KEYFRAME ANIMATIONS
   ========================================================================== */
.reveal-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }

@keyframes pulseCyan {
  0% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(0, 212, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0); }
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

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

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes pipeDash {
  to { stroke-dashoffset: -44; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInToast {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1080px) {
  .hero-grid,
  .cycle-visuals-grid,
  .infographic-dual-grid,
  .lab3d-workspace,
  .lectures-layout,
  .ff-grid,
  .vc-grid,
  .lb-grid,
  .skills-roadmap {
    grid-template-columns: 1fr;
  }
  .lab3d-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
  .career-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1.5px solid var(--sky-border);
  }
  .main-nav.open {
    display: flex;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .hero-stats,
  .cycle-controls-bar,
  .games-tabs,
  .vc-meters-row,
  .vc-controls-deck,
  .install-timeline,
  .lb-slots,
  .career-cards-grid,
  .lab3d-tabs {
    grid-template-columns: 1fr;
  }
  .hero-3d-canvas-wrap {
    height: 300px;
  }
  .lab3d-canvas-box {
    height: 360px;
  }
}

/* ==========================================================================
   AUTH, PROFILE & ACHIEVEMENTS MODALS
   ========================================================================== */
.xp-pill.clickable {
  cursor: pointer;
  transition: transform 0.18s ease;
}
.xp-pill.clickable:hover {
  transform: translateY(-1px);
}

.btn-auth-pill {
  padding: 0.48rem 0.95rem;
  border-radius: 99px;
  border: 1.5px solid var(--cyan-bright);
  background: linear-gradient(135deg, var(--cyan-bright), var(--blue-action));
  color: var(--bg-white);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 180, 255, 0.25);
  transition: transform 0.2s ease;
}
.btn-auth-pill:hover {
  transform: translateY(-1px);
}

.btn-profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.32rem 0.78rem 0.32rem 0.35rem;
  border-radius: 99px;
  border: 1.5px solid var(--cyan-bright);
  background: var(--bg-white);
  color: var(--blue-deep);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 180, 255, 0.16);
}
.avatar-badge,
.prof-avatar-lg {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan-neon), var(--blue-action));
  color: var(--bg-white);
  font-family: var(--font-display);
  font-weight: 700;
}
.avatar-badge {
  width: 28px;
  height: 28px;
  font-size: 0.76rem;
}
.ach-mini-pill {
  padding: 0.15rem 0.48rem;
  border-radius: 99px;
  background: var(--bg-ice-2);
  color: var(--blue-action);
  font-size: 0.76rem;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(2, 132, 199, 0.22);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-card {
  position: relative;
  width: min(470px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg-white);
  border: 2px solid var(--sky-light);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: 0 28px 70px rgba(0, 160, 255, 0.28);
  animation: fadeInUp 0.25s ease;
}
.modal-card.modal-wide {
  width: min(760px, 95vw);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-weight: 700;
  cursor: pointer;
}
.modal-close:hover {
  background: var(--cyan-bright);
  color: var(--bg-white);
}

.modal-head h3 {
  margin-top: 0.55rem;
  font-size: 1.4rem;
}

.server-notice {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--bg-ice-2);
  border: 1px solid var(--cyan-bright);
  font-size: 0.82rem;
  margin-bottom: 1rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 1.1rem;
}
.auth-tab-btn,
.prof-tab-btn {
  padding: 0.55rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--blue-muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.auth-tab-btn.active,
.prof-tab-btn.active {
  background: var(--bg-white);
  color: var(--blue-action);
  box-shadow: 0 2px 10px rgba(0, 174, 255, 0.16);
}

.auth-error {
  padding: 0.68rem 0.9rem;
  border-radius: 12px;
  background: var(--bg-ice-2);
  border: 1.5px solid var(--blue-action);
  color: var(--blue-deep);
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-text);
  margin-bottom: 0.3rem;
}
.form-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
}
.form-field input:focus {
  border-color: var(--cyan-bright);
  background: var(--bg-white);
}
.btn-full {
  width: 100%;
  margin-top: 0.3rem;
}

/* Profile Modal */
.profile-hero-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--bg-ice), #ffffff);
  border: 1.5px solid var(--sky-light);
  margin-bottom: 1rem;
}
.prof-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.prof-identity {
  flex: 1;
}
.prof-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.prof-name-row h3 {
  margin: 0;
}
.prof-identity p {
  margin: 0.2rem 0 0;
}
.prof-xp-box {
  text-align: right;
  padding: 0.55rem 0.95rem;
  border-radius: 14px;
  background: var(--bg-ice-2);
  border: 1px solid var(--cyan-bright);
}
.prof-xp-box span {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-muted);
}
.prof-xp-box strong {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--blue-action);
}

.prof-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.prof-stat {
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  text-align: center;
}
.prof-stat span {
  display: block;
  font-size: 0.75rem;
  color: var(--blue-muted);
  font-weight: 600;
}
.prof-stat strong {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--blue-action);
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 4px;
}
.ach-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: 16px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
}
.ach-card.unlocked {
  background: linear-gradient(135deg, #ffffff, var(--bg-ice-2));
  border-color: var(--cyan-bright);
  box-shadow: 0 6px 18px rgba(0, 180, 255, 0.14);
}
.ach-card.locked {
  opacity: 0.62;
}
.ach-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--bg-white);
  border: 1px solid var(--sky-light);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.ach-card.unlocked .ach-icon {
  background: linear-gradient(135deg, var(--cyan-neon), var(--blue-action));
  color: var(--bg-white);
  border-color: transparent;
}
.ach-info {
  flex: 1;
}
.ach-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}
.ach-top strong {
  font-size: 0.88rem;
  color: var(--blue-deep);
}
.ach-xp {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan-bright);
}
.ach-info p {
  font-size: 0.78rem;
  color: var(--blue-muted);
  margin: 0.25rem 0;
  line-height: 1.35;
}
.ach-status {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--blue-action);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 290px;
  overflow-y: auto;
}
.lb-user-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
}
.lb-rank-num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--cyan-bright);
  width: 34px;
}
.lb-user-meta {
  flex: 1;
}
.lb-user-meta strong {
  display: block;
  color: var(--blue-deep);
}
.lb-user-meta small {
  color: var(--blue-muted);
}
.lb-user-scores {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-mono);
  color: var(--blue-action);
}

.prof-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--sky-border);
}

@media (max-width: 680px) {
  .achievements-grid,
  .prof-stats-row {
    grid-template-columns: 1fr;
  }
}

/* P0: Lecture Mini-Quiz, Passphrase Hint & Profile Legacy XP Badge */
.form-hint {
  display: block;
  margin-top: 0.32rem;
  font-size: 0.76rem;
  line-height: 1.35;
  color: var(--blue-muted);
}

.prof-legacy-note {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue-muted);
}

.btn:disabled,
button[disabled] {
  opacity: 0.68;
  cursor: wait;
}

.lecture-quiz-box {
  margin-top: 1.25rem;
  padding: 1.05rem 1.15rem;
  border-radius: 16px;
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
}

.lecture-quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.lecture-quiz-head h4 {
  margin: 0;
  font-size: 0.96rem;
  color: var(--blue-deep);
}

.lecture-quiz-q {
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: var(--bg-white);
  border: 1px solid var(--sky-light);
  margin-bottom: 0.65rem;
}

.lecture-quiz-q:last-child {
  margin-bottom: 0;
}

.lecture-quiz-q p {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--blue-deep);
}

.lecture-quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lecture-quiz-opt {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.42rem 0.6rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.lecture-quiz-opt:hover {
  background: var(--bg-ice-2);
  border-color: var(--sky-light);
}

.lecture-quiz-opt input {
  margin-top: 0.2rem;
  accent-color: var(--cyan-bright);
}

/* P1: CoolProp Thermodynamic Studio & Dynamic P-h Diagram */
.cycle-controls-p1 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem 1.1rem;
  align-items: end;
}

.eta-controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icy-select-sm {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  padding: 0.42rem 0.6rem;
}

.icy-num {
  width: 68px;
  padding: 0.4rem 0.48rem;
  border-radius: 10px;
  border: 1.5px solid var(--sky-light);
  background: var(--bg-white);
  color: var(--blue-deep);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
}

.icy-num:focus {
  outline: none;
  border-color: var(--cyan-bright);
}

.thermo-details-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--blue-deep);
}

.thermo-chip {
  padding: 0.32rem 0.65rem;
  border-radius: 99px;
  background: var(--bg-ice);
  border: 1px solid var(--sky-border);
  font-weight: 600;
}

.mollier-stage {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f5fbff 100%);
  border: 1px solid var(--sky-border);
  border-radius: 14px;
  padding: 0.35rem;
}

.mollier-stage .mollier-svg {
  width: 100%;
  height: auto;
  display: block;
}

.mollier-tooltip {
  position: absolute;
  z-index: 10;
  pointer-events: none;
  min-width: 185px;
  max-width: 240px;
  padding: 0.55rem 0.72rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid var(--cyan-bright);
  box-shadow: 0 10px 26px rgba(2, 132, 199, 0.16);
  font-size: 0.76rem;
  line-height: 1.38;
  color: var(--blue-deep);
}

.mollier-tooltip strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--blue-action);
}

.mollier-pt-dot {
  cursor: pointer;
  transition: r 0.15s ease;
}

.mollier-pt-dot:hover,
.mollier-pt-dot:focus {
  outline: none;
}

.metrics-mini-grid-p1 {
  grid-template-columns: repeat(3, 1fr);
}

.thermo-footnote {
  margin: 0.65rem 0 0;
  font-size: 0.74rem;
  line-height: 1.38;
  color: var(--blue-muted);
}

@media (max-width: 1024px) {
  .cycle-controls-p1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .cycle-controls-p1 {
    grid-template-columns: 1fr;
  }
  .metrics-mini-grid-p1 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==========================================================================
   STAGE P2: VIDEO FULLSCREEN, LECTURE QUIZ FEEDBACK, CHEATSHEETS & SIMS
   ========================================================================== */
.video-player-container.video-pseudo-fullscreen {
  position: fixed;
  inset: 1rem;
  z-index: 1200;
  background: var(--bg-white);
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(2, 132, 199, 0.35);
  overflow-y: auto;
}

.lecture-quiz-fb {
  margin-top: 0.55rem;
  padding: 0.55rem 0.72rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.42;
  background: var(--bg-ice-2);
  border: 1px solid var(--cyan-bright);
  color: var(--blue-deep);
}

.lecture-quiz-status {
  margin-top: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}
.lecture-quiz-status.err {
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
  color: #991B1B;
}
.lecture-quiz-status.ok {
  background: var(--bg-ice-2);
  border: 1.5px solid var(--cyan-bright);
  color: var(--blue-deep);
}

/* Interactive Cheatsheets (5.1 & 5.2) */
.ref-tool-card {
  margin: 1.25rem 0;
  padding: 1.05rem;
  border-radius: 16px;
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
}
.ref-tool-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}
.ref-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--blue-action);
  background: var(--bg-white);
  border: 1px solid var(--sky-light);
  padding: 0.2rem 0.55rem;
  border-radius: 99px;
  margin-bottom: 0.35rem;
}
.ref-tool-title-wrap h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--blue-deep);
}
.ref-controls-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.65rem;
}
.ref-field label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue-muted);
  margin-bottom: 0.25rem;
}
.ref-field select,
.ref-search-input {
  width: 100%;
}
.ref-meta-strip {
  font-size: 0.8rem;
  color: var(--blue-action);
  font-weight: 600;
  margin-bottom: 0.65rem;
}
.ref-table-scroll {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--sky-border);
  background: var(--bg-white);
}
.ref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.ref-table th {
  text-align: left;
  padding: 0.55rem 0.65rem;
  background: var(--bg-ice-2);
  color: var(--blue-deep);
  font-weight: 700;
  border-bottom: 1.5px solid var(--sky-border);
  white-space: nowrap;
}
.ref-table td {
  padding: 0.45rem 0.65rem;
  border-bottom: 1px solid var(--sky-light);
  vertical-align: top;
}
.ref-td-mono {
  font-family: var(--font-mono);
  white-space: nowrap;
}
.ref-td-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--blue-action);
  white-space: nowrap;
}
.ref-td-src {
  font-size: 0.74rem;
  color: var(--blue-muted);
}
.ref-row-highlight {
  background: #E0F7FF;
  font-weight: 700;
}
.ref-row-edu {
  background: #FFFBEB;
}
.ref-err-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 0.65rem;
}
.ref-brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.ref-brand-btn {
  padding: 0.38rem 0.72rem;
  border-radius: 99px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-white);
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.ref-brand-btn.active {
  background: var(--blue-action);
  color: var(--bg-white);
  border-color: var(--blue-action);
}
.ref-disclaimer {
  margin-top: 0.7rem;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--blue-muted);
}

/* Fault Finder P2 Enhancements */
.ff-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.ff-equip-tag {
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--blue-action);
  background: var(--bg-white);
  border: 1px solid var(--sky-light);
  padding: 0.22rem 0.6rem;
  border-radius: 99px;
}
.ff-inspect-zone.probed rect {
  fill: #E0F7FF;
  stroke: var(--blue-action);
  stroke-width: 2.6;
}
.ff-thermo-box {
  background: linear-gradient(135deg, #f4fbff, #e6f7ff);
  border: 1.5px solid var(--cyan-bright);
  border-radius: 14px;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}
.ff-thermo-head {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 0.55rem;
}
.ff-thermo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
.ff-thermo-stat {
  background: var(--bg-white);
  border: 1px solid var(--sky-border);
  border-radius: 12px;
  padding: 0.65rem;
}
.ff-thermo-stat span {
  display: block;
  font-size: 0.75rem;
  color: var(--blue-muted);
  font-weight: 600;
}
.ff-thermo-stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.08rem;
  color: var(--blue-action);
  margin: 0.2rem 0;
}
.ff-thermo-stat small {
  display: block;
  font-size: 0.72rem;
  color: var(--blue-muted);
  line-height: 1.32;
}
.ff-feedback.ff-feedback-warn {
  background: #FFFBEB;
  border-color: #F59E0B;
  color: #78350F;
}
#ffProbesProgress.ready {
  color: var(--blue-action);
  font-weight: 700;
}

/* Vacuum & Charge P2 Workbench */
.vc-scen-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}
.vc-scen-tab {
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.vc-scen-tab.active {
  background: var(--blue-action);
  color: var(--bg-white);
  border-color: var(--blue-action);
}
.vc-scen-tab.done {
  border-color: var(--cyan-neon);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.22);
}
.vc-passport-card {
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.9rem;
}
.vc-passport-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--blue-deep);
}
.vc-passport-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 99px;
  background: var(--bg-white);
  border: 1px solid var(--cyan-bright);
  color: var(--blue-action);
}
.vc-passport-specs {
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--blue-action);
}
.vc-passport-note {
  margin-top: 0.28rem;
  font-size: 0.78rem;
  color: var(--blue-muted);
}
.vc-tools-wrap {
  margin-bottom: 0.85rem;
}
.vc-tools-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue-deep);
  margin-bottom: 0.45rem;
}
.vc-tools-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.vc-tool-chip {
  padding: 0.42rem 0.72rem;
  border-radius: 99px;
  border: 1.5px solid var(--sky-light);
  background: var(--bg-white);
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.vc-tool-chip.connected {
  background: var(--cyan-bright);
  color: var(--bg-white);
  border-color: var(--cyan-bright);
}
.vc-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.vc-subcard {
  background: var(--bg-ice);
  border: 1.5px solid var(--sky-border);
  border-radius: 14px;
  padding: 0.8rem;
}
.vc-subcard label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--blue-muted);
  margin-bottom: 0.35rem;
}
.vc-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}
.vc-mt-sm {
  margin-top: 0.5rem;
}
.vc-num-input {
  width: 96px;
}
.vc-chart-wrap {
  margin-top: 0.55rem;
}
.vc-chart-title {
  font-size: 0.75rem;
  color: var(--blue-deep);
  margin-bottom: 0.25rem;
}
.vc-vac-svg {
  width: 100%;
  height: auto;
  display: block;
}
.vc-charge-card {
  margin-bottom: 0.9rem;
}
.vc-charge-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.vc-workbench,
.vc-checklist-card,
.vc-subcard,
.ff-unit-stage,
.ff-diagnosis-panel,
.lecture-stage,
.lecture-text-body {
  min-width: 0;
  max-width: 100%;
}

.vc-subcard select,
.vc-subcard input,
.ref-tool-card select,
.ref-tool-card input {
  max-width: 100%;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  text-overflow: ellipsis;
}

.vc-subcard input.vc-num-input {
  width: 110px;
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }
  .header-inner {
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  .brand-sub {
    display: none;
  }
  .header-actions {
    gap: 0.38rem;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .xp-pill,
  .btn-auth-pill,
  .header-user-pill {
    padding: 0.32rem 0.62rem;
    font-size: 0.78rem;
    max-width: 100%;
  }
  .ref-controls-grid,
  .ff-thermo-grid,
  .vc-param-grid,
  .vc-charge-grid {
    grid-template-columns: 1fr;
  }
  .ff-tools-bar {
    grid-template-columns: 1fr;
  }
  .ff-unit-svg-wrap,
  .ref-table-scroll {
    max-width: 100%;
    overflow-x: auto;
  }
  .vc-isolation-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

.vc-isolation-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  background: var(--bg-ice-2);
  border: 1.5px solid var(--sky-light);
  border-radius: 14px;
  padding: 0.68rem 0.9rem;
  margin-bottom: 0.85rem;
}
.vc-iso-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.78rem;
  color: var(--blue-muted);
}
.vc-iso-meta strong {
  font-size: 0.86rem;
  color: var(--blue-deep);
}
.vc-press-abs {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--blue-muted);
  margin-bottom: 0.35rem;
}
.vc-unit-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--blue-action);
}

/* ==========================================================================
   P1: ЭКО-РЕЖИМ, REDUCED MOTION, 2D CAD FALLBACK И ИНДИКАЦИЯ ТАРИФОВ
   ========================================================================== */
.eco-toggle-btn {
  padding: 0.36rem 0.68rem;
  border-radius: 999px;
  border: 1.5px solid var(--sky-border);
  background: var(--bg-ice);
  color: var(--blue-deep);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.eco-toggle-btn.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.tool-toggle.pro-locked-btn {
  opacity: 0.78;
  border-style: dashed;
}

.games-tabs.is-plan-locked .game-tab {
  opacity: 0.82;
}

.prof-plan-badge {
  background: #0284c7;
  color: #ffffff;
}

.prof-plan-badge.is-locked {
  background: #dc2626;
}

.prof-plan-note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--blue-muted);
}

.lab-2d-fallback,
.hero-cad-fallback {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(rgba(14, 165, 233, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(14, 165, 233, 0.06) 1px, transparent 1px),
    var(--bg-ice);
  background-size: 24px 24px;
  color: var(--blue-deep);
  overflow: hidden;
}

.cad-fallback-svg-host {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
}

.fallback-cad-svg {
  width: 100%;
  max-width: 560px;
  height: auto;
  max-height: 360px;
}

.cad-fallback-pill {
  position: absolute;
  top: 0.65rem;
  left: 0.75rem;
  z-index: 4;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
}

.hotspot-pin-2d {
  transform: translate(-50%, -50%);
}

/* Устранение горизонтального переполнения и адаптив 320px–390px */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

@media (max-width: 480px) {
  .header-inner {
    gap: 0.45rem;
  }
  .header-actions {
    gap: 0.38rem;
  }
  .eco-toggle-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.68rem;
  }
  .xp-pill {
    padding: 0.3rem 0.52rem;
    font-size: 0.72rem;
  }
  .btn-auth-pill {
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
  }
  .lab3d-toolbar .toolbar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
  }
  .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}

/* Reduced Motion + Режим «Экономия ресурсов» */
html.hkm-eco-mode #frost-particles,
html.hkm-reduced-motion #frost-particles {
  display: none !important;
}

html.hkm-eco-mode .pulse-dot,
html.hkm-reduced-motion .pulse-dot,
html.hkm-eco-mode #ffFanBlades,
html.hkm-reduced-motion #ffFanBlades {
  animation: none !important;
}

html.hkm-eco-mode *,
html.hkm-reduced-motion * {
  scroll-behavior: auto !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  #frost-particles {
    display: none !important;
  }
}



