/* Keep the teaching tools' algorithms and controls, using the public palette. */

.offset-skip {
  position: absolute;
  top: -100px;
  left: 20px;
  padding: 12px;
  background: var(--ui-panel);
  z-index: 1000;
}

.offset-skip:focus {
  top: 10px;
}

.app-layout {
  max-width: var(--ui-page-width);
  margin: 0 auto;
  height: auto;
  min-height: calc(100vh - 100px);
  grid-template-columns: var(--sidebar-width) minmax(0,1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  background: var(--bg-body);
}

.main-content {
  min-width: 0;
  overflow: visible;
  height: auto;
}

.brand {
  font-weight: 550;
}

.nav-item.active {
  border-color: var(--primary);
}

.nav-group-label {
  font-size: 11px;
  letter-spacing: .03em;
}

.card,.panel,.module-card,.test-section {
  border: 1px solid var(--ui-border);
}

.hero-section:not(#hero-area) {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-color: var(--border) !important;
  border-radius: 5px !important;
  box-shadow: none !important;
}

.hero-section:not(#hero-area) .entropy-status {
  background: var(--bg-body);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.user-panel {
  border-color: var(--border);
}

@media (max-width:768px) {
  .app-layout {
    display: block;
    min-height: 0;
  }
  .sidebar {
    display: none;
    position: static;
    width: auto;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar.offset-open {
    display: flex;
    transform: none;
  }
  .sidebar .nav-menu {
    padding: 10px 20px;
  }
  .sidebar .user-panel {
    padding: 16px 20px;
  }
  .main-content {
    margin: 0;
    width: auto;
  }
  .main-content .page-header {
    flex-wrap: wrap;
    gap: 12px;
  }
  .main-content .btn {
    max-width: 100%;
  }
  .main-content pre {
    max-width: 100%;
    overflow: auto;
  }
  .main-content .matrix-container {
    max-width: 100%;
    overflow: auto;
  }
}

@media print {
  .site-header,.sidebar,.offset-skip {
    display: none;
  }
  .app-layout {
    display: block;
  }
}

.hero-section:not(#hero-area) canvas {
  opacity: .06 !important;
}

.hero-title {
  color: var(--text-main);
}

.hero-subtitle {
  color: var(--text-muted);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border);
}

@media (max-width:768px) {
  .module-grid {
    grid-template-columns: minmax(0,1fr);
  }
  .hero-section {
    height: 190px;
  }
}
