:root {
  --asb-blue: #0798d2;
  --asb-blue-deep: #0b3b66;
  --asb-blue-soft: #eaf7fc;
  --asb-yellow: #ffc400;
  --asb-orange: #f47a32;
  --asb-green: #12a67d;
  --asb-ink: #0c1d38;
  --asb-muted: #637189;
  --asb-line: #dce7f1;
  --asb-bg: #f4f8fc;
  --asb-white: #fff;
  --asb-radius: 8px;
  --asb-shadow: 0 14px 36px rgba(12, 43, 75, 0.08);
}

html {
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  color: var(--asb-ink);
  background-color: var(--asb-bg);
  background-image: none;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  letter-spacing: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(7, 152, 210, 0.28);
  outline-offset: 2px;
}

img {
  max-width: 100%;
}

/* Public homepage */
.site-header {
  height: 72px;
  padding-inline: clamp(22px, 4vw, 64px);
  border-bottom-color: rgba(12, 29, 56, 0.08);
  box-shadow: 0 8px 28px rgba(12, 43, 75, 0.05);
}

.brand {
  min-width: 168px;
}

.brand img {
  width: 168px;
}

.nav-links {
  gap: clamp(10px, 1.05vw, 18px);
  color: #26374e;
  font-size: 13px;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding-block: 26px;
}

.nav-links a::after {
  position: absolute;
  right: 0;
  bottom: 17px;
  left: 0;
  height: 2px;
  content: "";
  background: var(--asb-blue);
  transform: scaleX(0);
  transition: transform 180ms ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--asb-blue-deep);
}

.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.buy-button,
.button.primary {
  color: #fff;
  background: var(--asb-blue);
}

.buy-button:hover,
.button.primary:hover {
  background: #067dac;
}

.mobile-nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--asb-line);
  border-radius: 6px;
  color: var(--asb-ink);
  background: #fff;
  cursor: pointer;
  flex: 0 0 42px;
  margin-left: auto;
}

.mobile-nav-toggle span,
.mobile-nav-toggle::before,
.mobile-nav-toggle::after {
  width: 18px;
  height: 2px;
  content: "";
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.mobile-nav-toggle {
  gap: 4px;
  flex-direction: column;
}

body.nav-open .mobile-nav-toggle span {
  opacity: 0;
}

body.nav-open .mobile-nav-toggle::before {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .mobile-nav-toggle::after {
  transform: translateY(-6px) rotate(-45deg);
}

.hero {
  min-height: 720px;
  height: calc(100svh - 28px);
  max-height: 820px;
  padding-top: 72px;
}

.hero-layer {
  inset: 72px 0 0;
  background: linear-gradient(180deg, rgba(5, 25, 47, 0.24), rgba(5, 25, 47, 0.62));
  backdrop-filter: none;
}

.hero-content {
  width: min(980px, calc(100% - 48px));
  margin-top: 20px;
}

.hero-content h1 {
  max-width: 980px;
  margin-inline: auto;
  font-size: 56px;
  line-height: 1.16;
}

.hero-content p {
  max-width: 860px;
  line-height: 1.85;
}

/* Public detail and curriculum pages */
.page-shell {
  width: min(1180px, calc(100% - 40px));
  padding-top: 0;
}

.top-nav {
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 1px solid var(--asb-line);
  background: rgba(244, 248, 252, 0.94);
  backdrop-filter: blur(16px);
}

.top-nav a {
  min-height: 42px;
  padding: 0 14px;
  color: #35465c;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 13px;
}

.top-nav a:hover {
  color: var(--asb-blue);
  background: var(--asb-blue-soft);
}

.top-nav a.active {
  color: var(--asb-blue-deep);
  background: transparent;
  box-shadow: inset 0 -3px var(--asb-yellow);
}

.hero-intro {
  margin: 28px 0 26px;
  padding: 40px 42px;
  background: var(--asb-blue-deep);
  border-radius: var(--asb-radius);
}

.hero-intro h1 {
  font-size: 40px;
}

.courses-overview .page-shell {
  width: min(1240px, calc(100% - 40px));
}

.courses-overview .hero-intro {
  position: relative;
  color: var(--asb-ink);
  background: var(--asb-blue-soft);
  border-top: 5px solid var(--asb-blue);
}

.courses-overview .hero-intro::after {
  position: absolute;
  top: -5px;
  right: 0;
  width: 24%;
  height: 5px;
  content: "";
  background: var(--asb-yellow);
}

.courses-overview .hero-intro p {
  color: #455a72;
}

.guide-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.guide-card {
  min-height: 132px;
  padding: 22px;
  border-color: var(--asb-line);
  border-radius: var(--asb-radius);
  box-shadow: none;
}

.guide-card strong {
  color: var(--asb-blue-deep);
  font-size: 18px;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.detail-card {
  border-color: var(--asb-line);
  border-radius: var(--asb-radius);
  box-shadow: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.detail-card:hover {
  border-color: #b8d7e7;
  box-shadow: var(--asb-shadow);
  transform: translateY(-3px);
}

.detail-card img {
  aspect-ratio: 16 / 9;
}

.card-body {
  padding: 18px 20px 22px;
}

.tag {
  color: #087da9;
  background: var(--asb-blue-soft);
}

.more,
.button-link {
  color: var(--asb-blue-deep);
  border-color: #c9e2ef;
  background: #f3fbfe;
}

.button-link.primary {
  color: #fff;
  border-color: var(--asb-blue);
  background: var(--asb-blue);
}

.course-hero {
  border-color: var(--asb-line);
  border-radius: var(--asb-radius);
  box-shadow: var(--asb-shadow);
}

.page-shell .course-section {
  padding-inline: 6px;
  border: 0;
  border-top: 1px solid var(--asb-line);
  border-radius: 0;
  box-shadow: none;
}

.eyebrow,
.section-heading span {
  color: var(--asb-blue);
}

.wide-visual img,
.process-visual img {
  border-color: #cbddeb;
  border-radius: var(--asb-radius);
}

.path-table {
  border: 1px solid #b9cddd;
}

.path-table th,
.path-table td {
  border-color: #b9cddd;
}

/* Coding hub and workbenches */
.hub-shell,
.platform-shell {
  width: min(1320px, calc(100% - 40px));
}

.hub-shell + *,
.platform-shell + * {
  letter-spacing: 0;
}

.hub-shell .top-nav,
.platform-shell .top-nav {
  justify-content: flex-start;
}

.hub-shell .hero-copy,
.hub-shell .hero-board,
.hub-shell .platform-card,
.hub-shell .path-card,
.platform-shell .hero-copy,
.platform-shell .hero-panel,
.platform-shell .mission-panel,
.platform-shell .workspace-panel {
  border-color: var(--asb-line);
  border-radius: var(--asb-radius);
  box-shadow: none;
}

.hub-shell .hero-kicker,
.platform-shell .hero-kicker {
  display: none;
}

.hub-shell .hero-copy h1,
.platform-shell .hero-copy h1 {
  margin-top: 0;
}

.hub-shell .board-stat {
  background: var(--asb-blue-deep);
  border-radius: var(--asb-radius);
}

.hub-shell .hero-board,
.platform-shell .hero-panel {
  padding: 0;
  background: transparent;
  border: 0;
}

.hub-shell .board-note,
.platform-shell .teacher-note,
.platform-shell .brief-card,
.platform-shell .hint-card {
  border-radius: var(--asb-radius);
}

/* Club learning and administration */
.login-body,
.club-shell {
  --red: var(--asb-blue);
  --red-dark: #067eae;
  --blue: var(--asb-blue);
}

.login-overlay {
  background: linear-gradient(90deg, rgba(5, 27, 52, 0.84), rgba(5, 27, 52, 0.52));
  backdrop-filter: none;
}

.login-intro > span {
  display: none;
}

.login-intro h1 {
  max-width: 760px;
  margin-top: 0;
  font-size: 54px;
  line-height: 1.16;
}

.login-card,
.admin-card,
.admin-login-card,
.club-hero-copy,
.club-hero-side,
.course-section,
.overview-card,
.module-card,
.resource-card,
.stat-card {
  border-color: var(--asb-line);
  border-radius: var(--asb-radius);
  box-shadow: none;
}

.login-card input,
.field-group input,
.field-group select,
.field-group textarea {
  border-radius: 6px;
}

.login-card .button.primary,
.club-shell .button.primary,
.admin-shell .button.primary {
  background: var(--asb-blue);
}

.account-request-card {
  border-color: #d9e6ee;
  border-radius: var(--asb-radius);
  background: #f8fbfd;
}

.club-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 66px;
  padding: 8px 0;
  background: rgba(244, 248, 252, 0.94);
  backdrop-filter: blur(16px);
}

.club-hero {
  gap: 16px;
}

.quick-links {
  gap: 8px;
}

.quick-link {
  min-height: 56px;
  border-color: var(--asb-line);
  border-radius: 6px;
}

.quick-link:hover {
  color: var(--asb-blue-deep);
  border-color: #acd6e8;
  background: var(--asb-blue-soft);
}

/* Assistant and parent portals */
.assistant-login-visual {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(10, 28, 50, 0.94), rgba(10, 28, 50, 0.74)),
    url("https://www.asblstem.com/hero-aisenbole.png") center / cover no-repeat;
}

.assistant-login-visual > * {
  position: relative;
  z-index: 1;
}

.assistant-login-visual span {
  color: #7fd7f3;
}

.assistant-login-card button {
  background: var(--asb-blue);
}

.assistant-login-card input {
  border-radius: 6px;
}

.xm-sidebar {
  background: #101c2c;
}

.xm-nav a,
.xm-nav i,
.panel,
.list-card,
.detail-hero,
.finance-metrics article,
.org-data,
.notice-strip,
.quick-panel,
.todo-panel {
  border-radius: var(--asb-radius);
}

.xm-nav a.active::before {
  background: var(--asb-yellow);
}

.primary-btn,
.toolbar-row .primary-btn,
.action-panel-footer button:last-child {
  background: var(--asb-blue);
}

.data-table th {
  color: #526178;
  background: #f3f7fa;
}

.data-table td,
.data-table th {
  border-bottom-color: var(--asb-line);
}

@media (max-width: 1180px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .guide-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    height: 68px;
    padding-inline: 18px;
  }

  .brand {
    min-width: 0;
    padding-right: 10px;
  }

  .brand img {
    width: 150px;
    max-width: 60vw;
  }

  .mobile-nav-toggle {
    display: flex;
  }

  .nav-actions {
    display: none;
  }

  .nav-links {
    position: absolute;
    top: 68px;
    right: 0;
    left: 0;
    display: none;
    max-height: calc(100svh - 68px);
    gap: 0;
    align-items: stretch;
    padding: 10px 18px 18px;
    overflow-y: auto;
    background: #fff;
    border-top: 1px solid var(--asb-line);
    box-shadow: 0 22px 46px rgba(10, 31, 55, 0.14);
  }

  body.nav-open .nav-links {
    display: grid;
  }

  .nav-links a {
    min-height: 48px;
    padding: 0 4px;
    border-bottom: 1px solid #edf2f6;
    font-size: 15px;
    line-height: 48px;
  }

  .nav-links a::after {
    display: none;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 760px) {
  .hero {
    min-height: 700px;
    height: 720px;
    max-height: none;
    padding-top: 68px;
    background-position: 55% center;
  }

  .hero-layer {
    inset: 68px 0 0;
    background: linear-gradient(180deg, rgba(5, 25, 47, 0.28), rgba(5, 25, 47, 0.7));
  }

  .hero-content {
    width: calc(100% - 36px);
    min-width: 0;
    margin-top: 0;
  }

  .hero-content h1 {
    margin-bottom: 18px;
    font-size: 34px;
    line-height: 1.22;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .hero-content p {
    margin-bottom: 26px;
    font-size: 15px;
    line-height: 1.85;
    overflow-wrap: anywhere;
  }

  .hero-actions {
    width: min(100%, 320px);
    margin-inline: auto;
  }

  .page-shell,
  .courses-overview .page-shell,
  .hub-shell,
  .platform-shell,
  .login-shell,
  .club-shell {
    width: min(100% - 28px, 100%);
  }

  .top-nav {
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-inline: -14px;
    padding-inline: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .top-nav::-webkit-scrollbar {
    display: none;
  }

  .top-nav a {
    flex: 0 0 auto;
  }

  .hero-intro,
  .courses-overview .hero-intro {
    margin-top: 18px;
    padding: 28px 22px;
  }

  .hero-intro h1 {
    font-size: 30px;
  }

  .guide-row,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .courses-overview .guide-row {
    display: flex;
    gap: 10px;
    margin-inline: -14px;
    padding: 0 14px 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .courses-overview .guide-row::-webkit-scrollbar {
    display: none;
  }

  .courses-overview .guide-card {
    min-height: 128px;
    flex: 0 0 236px;
    padding: 18px;
    scroll-snap-align: start;
  }

  .course-hero {
    padding: 18px;
  }

  .page-shell .course-section {
    padding-inline: 0;
  }

  .hub-hero,
  .platform-hero {
    grid-template-columns: 1fr;
  }

  .hub-shell .hero-copy,
  .platform-shell .hero-copy,
  .hero-board,
  .hero-panel,
  .mission-panel,
  .workspace-panel {
    padding: 22px;
  }

  .hub-shell .hero-copy h1,
  .platform-shell .hero-copy h1 {
    font-size: 34px;
  }

  .login-overlay {
    padding: 16px 14px 28px;
    background: linear-gradient(180deg, rgba(5, 27, 52, 0.82), rgba(5, 27, 52, 0.66));
  }

  .login-topbar,
  .club-topbar {
    align-items: center;
  }

  .login-topbar {
    display: grid;
    justify-items: center;
  }

  .login-brand img,
  .club-brand img {
    width: 150px;
    max-width: 52vw;
  }

  .login-topbar .top-links,
  .club-topbar .top-links {
    max-width: none;
    flex-wrap: nowrap;
    justify-content: flex-end;
    overflow: visible;
  }

  .login-topbar .top-links {
    width: 100%;
    justify-content: center;
  }

  .login-topbar .top-links a:nth-child(2),
  .club-topbar .top-links a:nth-child(2),
  .club-topbar .top-links a:nth-child(3) {
    display: none;
  }

  .login-topbar .top-links a,
  .club-topbar .top-links a,
  .club-topbar .top-links button {
    min-height: 34px;
    flex: 0 0 auto;
    padding-inline: 11px;
    font-size: 12px;
  }

  .login-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .login-intro,
  .login-card,
  .assistant-login-visual,
  .assistant-login-card {
    width: 100%;
    min-width: 0;
  }

  .login-intro {
    padding: 16px 2px 0;
  }

  .login-intro h1 {
    font-size: 34px;
    overflow-wrap: anywhere;
  }

  .login-intro p {
    font-size: 15px;
  }

  .login-points {
    display: none;
  }

  .login-card,
  .admin-card,
  .admin-login-card {
    padding: 22px;
  }

  .club-hero {
    grid-template-columns: 1fr;
  }

  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assistant-login-visual {
    min-height: 230px;
    padding: 26px 22px;
  }

  .assistant-login-visual h1 {
    font-size: 32px;
  }

  .assistant-login-card {
    min-height: calc(100vh - 230px);
    padding: 28px 22px;
  }

  .assistant-login-card h2,
  .assistant-login-card p,
  .assistant-login-visual h1,
  .assistant-login-visual p,
  .login-card h2,
  .login-card p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .assistant-login-card form,
  .assistant-login-card label,
  .assistant-login-card input,
  .assistant-login-card button {
    width: 100%;
    min-width: 0;
  }
}

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