/* ═══════════════════════════════════════════════════════
   Forces & Motion — Clay Design System Extensions
   Only page-specific overrides. Everything else comes from
   clay-system.css + content.css.
   ═══════════════════════════════════════════════════════ */

/* ── Sidebar Toggle Button ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 72px;
  left: 12px;
  z-index: 200;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(160,150,180,0.15);
  border-radius: 20px;
  padding: 8px 14px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-smooth);
  box-shadow: var(--shadow-card);
}
.sidebar-toggle:hover {
  background: rgba(255,255,255,1);
  border-color: var(--accent);
  color: var(--accent);
}
.sidebar-toggle i {
  font-size: 14px;
}

/* ── Content Sidebar ── */
.content-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  z-index: 150;
  width: 220px;
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(160,150,180,0.12);
  overflow-y: auto;
  padding: 20px 0;
  transition: transform 0.35s var(--ease-smooth);
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(160,150,180,0.2) transparent;
}
.content-sidebar::-webkit-scrollbar { width: 4px; }
.content-sidebar::-webkit-scrollbar-thumb { background: rgba(160,150,180,0.2); border-radius: 4px; }

.content-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 16px;
  border-bottom: 1px solid rgba(160,150,180,0.08);
  margin-bottom: 12px;
}
.content-sidebar-brand {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all var(--dur-fast);
}
.sidebar-close:hover {
  background: rgba(160,150,180,0.1);
  color: var(--text-primary);
}
.content-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px;
}
.content-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all var(--dur-fast) var(--ease-smooth);
  font-family: var(--font-heading);
}
.content-sidebar-link:hover {
  background: rgba(124,58,237,0.06);
  color: var(--text-primary);
}
.content-sidebar-link.active {
  background: rgba(124,58,237,0.1);
  color: var(--accent);
}
.sidebar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(160,150,180,0.1);
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all var(--dur-fast);
}
.content-sidebar-link.active .sidebar-num {
  background: rgba(124,58,237,0.15);
  color: var(--accent);
}
.sidebar-label {
  line-height: 1.2;
}

/* ── Content Main ── */
.content-main {
  max-width: 1300px;
  margin: 0 auto;
  padding: 80px 24px 48px 260px;
  position: relative;
  z-index: 1;
  transition: all 0.35s var(--ease-smooth);
}

/* ── Page heading ── */
.content-main > h1 {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-primary);
  margin-bottom: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* ── Simulation canvas backgrounds ── */
.sim-box canvas {
  display: block;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  border-radius: 16px;
  background: #f8f7fc;
}

/* ── Planet weight bars ── */
.planet-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.planet-icon { font-size: 1.4rem; width: 2rem; text-align: center; }
.planet-name {
  width: 70px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  font-family: var(--font-heading);
}
.planet-bar {
  flex: 1;
  height: 28px;
  background: rgba(160,150,180,0.15);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.planet-bar .fill {
  height: 100%;
  border-radius: 14px;
  transition: width 0.8s var(--ease-smooth);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  font-family: var(--font-heading);
}

/* ── Quiz overrides ── */
.quiz-card {
  background: rgba(255,255,255,0.5);
  border-radius: 24px;
  padding: 20px 24px;
  margin-bottom: 16px;
  border: 1px solid rgba(160,150,180,0.1);
  transition: all var(--dur-med) var(--ease-smooth);
}
.quiz-card:hover {
  background: rgba(255,255,255,0.7);
}
.quiz-card label {
  display: block;
  padding: 8px 14px;
  margin: 4px 0;
  border-radius: 14px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.quiz-card label:hover { background: rgba(124,58,237,0.05); }
.quiz-card input[type="radio"] { margin-right: 10px; accent-color: var(--accent); }

.result-box {
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 20px;
  padding: 16px 20px;
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
  color: var(--accent-emerald);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s var(--ease-smooth);
}
.result-box strong { color: inherit; }
.result-box.show { opacity: 1; transform: translateY(0); }

/* ── Grid utilities ── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.flex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.flex-row > * { flex: 1; min-width: 200px; }

/* ── Mobile ── */
@media (max-width: 900px) {
  .content-sidebar {
    left: 12px;
    right: 12px;
    width: auto;
    top: 76px;
    bottom: auto;
    max-height: calc(100vh - 100px);
    transform: translateX(-120%);
    opacity: 0;
    padding: 12px 8px;
  }
  .content-sidebar.open {
    transform: translateX(0);
    opacity: 1;
  }
  .content-sidebar .sidebar-close { display: flex; }
  .content-sidebar .sidebar-toggle {
    display: flex;
  }
  .content-main {
    margin-left: 0;
    margin-top: 72px;
    padding: 12px 16px 32px;
  }
  .content-main > h1 {
    font-size: 1.6rem;
    margin-bottom: 20px;
  }
  .grid-2 { grid-template-columns: 1fr; }
  .planet-name { width: 50px; font-size: 12px; }
}

/* ── Sidebar toggle button (mobile) ── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 78px;
  left: 12px;
  z-index: 600;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(160,150,180,0.15);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  font-size: 18px;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--dur-fast);
}
.sidebar-toggle:hover {
  color: var(--accent);
  background: rgba(255,255,255,0.95);
}
@media (max-width: 900px) {
  .sidebar-toggle { display: flex; }
}
@media(max-width:768px){
  .sidebar-toggle{display:flex}
  .content-sidebar{transform:translateX(-100%);width:260px}
  .content-sidebar.open{transform:translateX(0)}
  .sidebar-close{display:block}
  .content-main{padding:0 16px;margin-left:0}
}